D7876: sha1dc: manually define integer types on msvc 2008

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Wed Jan 15 08:17:32 EST 2020


Closed by commit rHGef36156eac9f: sha1dc: manually define integer types on msvc 2008 (authored by indygreg).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7876?vs=19275&id=19287

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7876/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7876

AFFECTED FILES
  mercurial/thirdparty/sha1dc/lib/sha1.h

CHANGE DETAILS

diff --git a/mercurial/thirdparty/sha1dc/lib/sha1.h b/mercurial/thirdparty/sha1dc/lib/sha1.h
--- a/mercurial/thirdparty/sha1dc/lib/sha1.h
+++ b/mercurial/thirdparty/sha1dc/lib/sha1.h
@@ -13,7 +13,14 @@
 #endif
 
 #ifndef SHA1DC_NO_STANDARD_INCLUDES
+/* PY27 this can be changed to a straight #include once Python 2.7 is
+   dropped, since this is for MSVC 2008 support. */
+#if !defined(_MSC_VER) || _MSC_VER >= 1600
 #include <stdint.h>
+#else
+typedef unsigned __int32 uint32_t;
+typedef unsigned __int64 uint64_t;
+#endif
 #endif
 
 /* sha-1 compression function that takes an already expanded message, and additionally store intermediate states */



To: indygreg, #hg-reviewers, pulkit
Cc: durin42, mercurial-devel


More information about the Mercurial-devel mailing list