Mercurial > ms-int-types
comparison inttypes.h @ 18:eb2525abe43a
Better C99 conformance: macros for format specifiers should only be included in C++ implementations if __STDC_FORMAT_MACROS is defined before <inttypes.h> is included.
author | ipse.c99@d525d15b-5824-0410-80a3-6185d19c2cde |
---|---|
date | Tue, 09 Oct 2007 12:54:27 +0000 |
parents | f831bbea3401 |
children | fce0b7d5cef7 |
comparison
equal
deleted
inserted
replaced
17:5f2b8140b2cd | 18:eb2525abe43a |
---|---|
48 intmax_t quot; | 48 intmax_t quot; |
49 intmax_t rem; | 49 intmax_t rem; |
50 } imaxdiv_t; | 50 } imaxdiv_t; |
51 | 51 |
52 // 7.8.1 Macros for format specifiers | 52 // 7.8.1 Macros for format specifiers |
53 | |
54 #if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198 | |
53 | 55 |
54 // The fprintf macros for signed integers are: | 56 // The fprintf macros for signed integers are: |
55 #define PRId8 "d" | 57 #define PRId8 "d" |
56 #define PRIi8 "i" | 58 #define PRIi8 "i" |
57 #define PRIdLEAST8 "d" | 59 #define PRIdLEAST8 "d" |
257 # define SCNuPTR "lu" | 259 # define SCNuPTR "lu" |
258 # define SCNxPTR "lx" | 260 # define SCNxPTR "lx" |
259 # define SCNXPTR "lX" | 261 # define SCNXPTR "lX" |
260 #endif // _WIN64 ] | 262 #endif // _WIN64 ] |
261 | 263 |
264 #endif // __STDC_FORMAT_MACROS ] | |
265 | |
262 // 7.8.2 Functions for greatest-width integer types | 266 // 7.8.2 Functions for greatest-width integer types |
263 | 267 |
264 // 7.8.2.1 The imaxabs function | 268 // 7.8.2.1 The imaxabs function |
265 #define imaxabs _abs64 | 269 #define imaxabs _abs64 |
266 | 270 |