Mercurial > ms-int-types
changeset 23:b1e002710e2d
[Issue 4] Fix incorrect int8_t behaviour if compiled with /J flag.
author | alexander.chemeris@d525d15b-5824-0410-80a3-6185d19c2cde |
---|---|
date | Thu, 17 Sep 2009 19:46:49 +0000 |
parents | ff2caa6b48d1 |
children | fce0b7d5cef7 |
files | stdint.h |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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