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

login
register
mail settings
Submitter elson.wei@gmail.com
Date Sept. 13, 2013, 1:55 a.m.
Message ID <2568e12faa83466c0a35.1379037356@ElsonWei-NB.PrimeVOLT>
Download mbox | patch
Permalink /patch/2431/
State Accepted
Commit 7999f4fa155a30e9c7a28fe775d1d7a75c7711a0
Headers show

Comments

elson.wei@gmail.com - Sept. 13, 2013, 1:55 a.m.
# HG changeset patch
# User Wei, Elson <elson.wei@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.
Matt Mackall - Sept. 13, 2013, 10:30 p.m.
On Fri, 2013-09-13 at 09:55 +0800, elson.wei@gmail.com wrote:
> # HG changeset patch
> # User Wei, Elson <elson.wei@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.

Queued for default, thanks.

Patch

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