summaryrefslogtreecommitdiff
path: root/cmake/config.h.in
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2021-05-30 20:40:35 +0200
committerJoel Rosdahl <joel@rosdahl.net>2021-05-30 20:53:30 +0200
commita57f70eda32e99221de56f5499079b4f00dc2bc5 (patch)
tree40deaccf3c951d62313939033c2576cb360f7041 /cmake/config.h.in
parentb76a89a3378f3b205de3d00694835eabe8e176ef (diff)
downloadccache-a57f70eda32e99221de56f5499079b4f00dc2bc5.tar.gz
Include config.h via command line instead of via system.h
This makes the definitions in config.h available to all source code, including third_party_lib. It’s also a first step towards not having to include system.hpp and its libc headers from all files.
Diffstat (limited to 'cmake/config.h.in')
-rw-r--r--cmake/config.h.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/config.h.in b/cmake/config.h.in
index d10e1641..fe99e16d 100644
--- a/cmake/config.h.in
+++ b/cmake/config.h.in
@@ -6,6 +6,11 @@
# endif
#endif
+#ifdef __MINGW32__
+# define __USE_MINGW_ANSI_STDIO 1
+# define __STDC_FORMAT_MACROS 1
+#endif
+
// For example for vasprintf under i686-w64-mingw32-g++-posix. The later
// definition of _XOPEN_SOURCE disables certain features on Linux, so we need
// _GNU_SOURCE to re-enable them (makedev, tm_zone).