# HG changeset patch # User alexander.chemeris@d525d15b-5824-0410-80a3-6185d19c2cde # Date 1253216809 0 # Node ID b1e002710e2d2c229c87c4f6652d4f0a8fc77f33 # Parent ff2caa6b48d1dc7b58b5f25c501dcb62efdf4d44 [Issue 4] Fix incorrect int8_t behaviour if compiled with /J flag. diff --git a/stdint.h b/stdint.h --- a/stdint.h +++ b/stdint.h @@ -72,21 +72,21 @@ extern "C" { // realize that, e.g. char has the same size as __int8 // so we give up on __intX for them. #if (_MSC_VER < 1300) - typedef char int8_t; - typedef short int16_t; - typedef int int32_t; + typedef signed char int8_t; + typedef signed short int16_t; + typedef signed int int32_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #else - typedef __int8 int8_t; - typedef __int16 int16_t; - typedef __int32 int32_t; + typedef signed __int8 int8_t; + typedef signed __int16 int16_t; + typedef signed __int32 int32_t; typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; #endif -typedef __int64 int64_t; +typedef signed __int64 int64_t; typedef unsigned __int64 uint64_t; @@ -112,11 +112,11 @@ typedef uint64_t uint_fast64_t; // 7.18.1.4 Integer types capable of holding object pointers #ifdef _WIN64 // [ - typedef __int64 intptr_t; + typedef signed __int64 intptr_t; typedef unsigned __int64 uintptr_t; #else // _WIN64 ][ - typedef _W64 int intptr_t; - typedef _W64 unsigned int uintptr_t; + typedef _W64 signed int intptr_t; + typedef _W64 unsigned int uintptr_t; #endif // _WIN64 ] // 7.18.1.5 Greatest-width integer types