Skip to content

Commit 52d01c2

Browse files
committed
Force use of "%I64d" format for 64 bit ints on MinGW.
Both this and "%lld" work, but the compiler's format checking doesn't like "%lld", so we get all sorts of spurious warnings.
1 parent c43d079 commit 52d01c2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/include/port/win32.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,19 @@
8888
#define PGDLLEXPORT
8989
#endif
9090

91+
/*
92+
* MinGW compilers accept both "%I64d" and "%lld" for 64 bit ints,
93+
* but whine about the latter, so force the former, regardless of what
94+
* configure found.
95+
*/
96+
#if __GNUC__
97+
#ifdef INT64_FORMAT
98+
#undef INT64_FORMAT
99+
#undef UINT64_FORMAT
100+
#endif
101+
#define INT64_FORMAT "%I64d"
102+
#define UINT64_FORMAT "%I64u"
103+
#endif
91104

92105
/*
93106
* IPC defines

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy