changeset 44099:b4420cea45e8

sha1dc: avoid including the nonexistent stdint.h with Visual Studio 2008 Differential Revision: https://phab.mercurial-scm.org/D7903
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 15 Jan 2020 23:34:04 -0500
parents 19533e4c3450
children 969527ac7b44
files mercurial/thirdparty/sha1dc/lib/ubc_check.c mercurial/thirdparty/sha1dc/lib/ubc_check.h
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/thirdparty/sha1dc/lib/ubc_check.c	Thu Jan 16 12:17:03 2020 -0800
+++ b/mercurial/thirdparty/sha1dc/lib/ubc_check.c	Wed Jan 15 23:34:04 2020 -0500
@@ -25,8 +25,10 @@
 */
 
 #ifndef SHA1DC_NO_STANDARD_INCLUDES
+#if !defined(_MSC_VER) || _MSC_VER >= 1600
 #include <stdint.h>
 #endif
+#endif
 #ifdef SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C
 #include SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C
 #endif
--- a/mercurial/thirdparty/sha1dc/lib/ubc_check.h	Thu Jan 16 12:17:03 2020 -0800
+++ b/mercurial/thirdparty/sha1dc/lib/ubc_check.h	Wed Jan 15 23:34:04 2020 -0500
@@ -28,7 +28,12 @@
 #endif
 
 #ifndef SHA1DC_NO_STANDARD_INCLUDES
+#if !defined(_MSC_VER) || _MSC_VER >= 1600
 #include <stdint.h>
+#else
+/* prior to Visual Studio 2010 */
+typedef unsigned __int32 uint32_t;
+#endif
 #endif
 
 #define DVMASKSIZE 1