[PATCH V2] util.h: add stdint basic type definitions

elson.wei at gmail.com elson.wei at gmail.com
Thu Sep 12 20:55:56 CDT 2013


# HG changeset patch
# User Wei, Elson <elson.wei at gmail.com>
# Date 1379037283 -28800
#      Fri Sep 13 09:54:43 2013 +0800
# Node ID 2568e12faa83466c0a350eb6fe64ba5ce7eaa77d
# Parent  d69e06724b96a985f29fd493a5dfe356a75af387
util.h: add stdint basic type definitions

MS C compiler v15 doesn't have stdint.h. Add basic int types those are defined
in stdint.h.

diff --git a/mercurial/util.h b/mercurial/util.h
--- a/mercurial/util.h
+++ b/mercurial/util.h
@@ -121,7 +121,12 @@
 #ifdef _MSC_VER
 /* msvc 6.0 has problems */
 #define inline __inline
+typedef signed char int8_t;
+typedef short int16_t;
+typedef long int32_t;
+typedef __int64 int64_t;
 typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
 typedef unsigned long uint32_t;
 typedef unsigned __int64 uint64_t;
 #else


More information about the Mercurial-devel mailing list