diff options
author | Aaron Giles <aaron@aarongiles.com> | 2009-08-19 08:49:01 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2009-08-19 08:49:01 +0000 |
commit | df435f870159c4ad05eb3d9a87a368b38e32c3bd (patch) | |
tree | 3eb794c8ef8c0459dbc825b82fbcaa9e99e3ca2b /src/osd | |
parent | 03d5253dcab9149fa1b49f48b07261b7a457260c (diff) |
Attempt to define an I64FMT string that can be used for printf'ing 64-bit
integers. This is defined to be "I64" on MSVC and recent mingw compilers,
and "ll" for all others.
Updated all instances of 64-bit prints to use the new macro.
Diffstat (limited to 'src/osd')
-rw-r--r-- | src/osd/osdcomm.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/osd/osdcomm.h b/src/osd/osdcomm.h index 82566a73f2d..d55af081a50 100644 --- a/src/osd/osdcomm.h +++ b/src/osd/osdcomm.h @@ -158,6 +158,13 @@ __extension__ typedef signed long long INT64; #define S64(val) val #endif +/* MINGW has adopted the MSVC formatting for 64-bit ints as of gcc 4.4 */ +#if (defined(__MINGW32__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))) || defined(_MSVC_VER) +#define I64FMT "I64" +#else +#define I64FMT "ll" +#endif + /* Highly useful macro for compile-time knowledge of an array size */ #define ARRAY_LENGTH(x) (sizeof(x) / sizeof(x[0])) |