Kaydet (Commit) 9a33bfda authored tarafından Fridrich Štrba's avatar Fridrich Štrba

mingw64: force C99 formating strings for consistency

Change-Id: I1399596a3edc3324ae4aa04e3866ae2f5e673985
üst f8df80b4
...@@ -29,6 +29,15 @@ ...@@ -29,6 +29,15 @@
extern "C" { extern "C" {
#endif #endif
#if defined ( __MINGW32__ ) && !defined ( __USE_MINGW_ANSI_STDIO )
/* Define to use the C99 formating string for coherence reasons.
* In mingw-w64 some functions are ported to the ms formating string
* some are not yet. This is the only way to make the formatting
* strings work all the time
*/
#define __USE_MINGW_ANSI_STDIO 1
#endif
/********************************************************************************/ /********************************************************************************/
/* Data types /* Data types
*/ */
...@@ -101,17 +110,10 @@ typedef unsigned char sal_uInt8; ...@@ -101,17 +110,10 @@ typedef unsigned char sal_uInt8;
#define SAL_CONST_INT64(x) x##ll #define SAL_CONST_INT64(x) x##ll
#define SAL_CONST_UINT64(x) x##ull #define SAL_CONST_UINT64(x) x##ull
#ifdef __MINGW32__
#define SAL_PRIdINT64 "I64d"
#define SAL_PRIuUINT64 "I64u"
#define SAL_PRIxUINT64 "I64x"
#define SAL_PRIXUINT64 "I64X"
#else
#define SAL_PRIdINT64 "lld" #define SAL_PRIdINT64 "lld"
#define SAL_PRIuUINT64 "llu" #define SAL_PRIuUINT64 "llu"
#define SAL_PRIxUINT64 "llx" #define SAL_PRIxUINT64 "llx"
#define SAL_PRIXUINT64 "llX" #define SAL_PRIXUINT64 "llX"
#endif
#else #else
#error "Could not find 64-bit type, add support for your architecture" #error "Could not find 64-bit type, add support for your architecture"
#endif #endif
...@@ -158,7 +160,7 @@ typedef void * sal_Handle; ...@@ -158,7 +160,7 @@ typedef void * sal_Handle;
/* printf-style conversion specification length modifiers for size_t and /* printf-style conversion specification length modifiers for size_t and
ptrdiff_t (most platforms support C99, MSC has its own extension) */ ptrdiff_t (most platforms support C99, MSC has its own extension) */
#if defined(_MSC_VER) || defined(__MINGW32__) #if defined(_MSC_VER)
#define SAL_PRI_SIZET "I" #define SAL_PRI_SIZET "I"
#define SAL_PRI_PTRDIFFT "I" #define SAL_PRI_PTRDIFFT "I"
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment