Patchwork D7876: sha1dc: manually define integer types on msvc 2008

login
register
mail settings
Submitter phabricator
Date Jan. 15, 2020, 1:17 p.m.
Message ID <4eed341146ab3d8c4c0b5948c51fa454@localhost.localdomain>
Download mbox | patch
Permalink /patch/44359/
State Not Applicable
Headers show

Comments

phabricator - Jan. 15, 2020, 1:17 p.m.
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




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

Patch

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 */