Mercurial > ms-int-types
comparison stdint.h @ 20:9be805b7c8c6
[Issue 3] Visual Studio 6 and Embedded Visual C++ 4 doesn't realize that, e.g. char has the same size as __int8 so we give up on __intX for them.
his should close Issue 3 in issue tracker.
| author | ipse.c99@d525d15b-5824-0410-80a3-6185d19c2cde |
|---|---|
| date | Mon, 11 May 2009 18:22:15 +0000 |
| parents | febb32e4ac04 |
| children | c0040f8fc49b |
comparison
equal
deleted
inserted
replaced
| 19:febb32e4ac04 | 20:9be805b7c8c6 |
|---|---|
| 64 | 64 |
| 65 | 65 |
| 66 // 7.18.1 Integer types | 66 // 7.18.1 Integer types |
| 67 | 67 |
| 68 // 7.18.1.1 Exact-width integer types | 68 // 7.18.1.1 Exact-width integer types |
| 69 typedef __int8 int8_t; | 69 |
| 70 typedef __int16 int16_t; | 70 // Visual Studio 6 and Embedded Visual C++ 4 doesn't |
| 71 typedef __int32 int32_t; | 71 // realize that, e.g. char has the same size as __int8 |
| 72 typedef __int64 int64_t; | 72 // so we give up on __intX for them. |
| 73 typedef unsigned __int8 uint8_t; | 73 #if (_MSC_VER < 1300) |
| 74 typedef unsigned __int16 uint16_t; | 74 typedef char int8_t; |
| 75 typedef unsigned __int32 uint32_t; | 75 typedef short int16_t; |
| 76 typedef unsigned __int64 uint64_t; | 76 typedef int int32_t; |
| 77 typedef unsigned char uint8_t; | |
| 78 typedef unsigned short uint16_t; | |
| 79 typedef unsigned int uint32_t; | |
| 80 #else | |
| 81 typedef __int8 int8_t; | |
| 82 typedef __int16 int16_t; | |
| 83 typedef __int32 int32_t; | |
| 84 typedef unsigned __int8 uint8_t; | |
| 85 typedef unsigned __int16 uint16_t; | |
| 86 typedef unsigned __int32 uint32_t; | |
| 87 #endif | |
| 88 typedef __int64 int64_t; | |
| 89 typedef unsigned __int64 uint64_t; | |
| 90 | |
| 77 | 91 |
| 78 // 7.18.1.2 Minimum-width integer types | 92 // 7.18.1.2 Minimum-width integer types |
| 79 typedef int8_t int_least8_t; | 93 typedef int8_t int_least8_t; |
| 80 typedef int16_t int_least16_t; | 94 typedef int16_t int_least16_t; |
| 81 typedef int32_t int_least32_t; | 95 typedef int32_t int_least32_t; |
