diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-05-11 16:17:08 +1000 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-05-11 22:13:06 +1000 |
commit | 0efbf18b80c261708da9ef61bcd420fa94cfed42 (patch) | |
tree | a9fe8bad32060fa4bf18adc6ff29c4844a3b0495 /includes | |
parent | 584ade67630f4e5c599c8422801e93f352b9a6df (diff) | |
download | haskell-0efbf18b80c261708da9ef61bcd420fa94cfed42.tar.gz |
rts: Fix C compiler warnings on Windows
Summary:
Specifcally we want the MinGW compiler to use ISO print format
specfifiers.
Test Plan: Validate on Linux, OS X and Windows
Reviewers: Phyx, austin, bgamari, simonmar
Reviewed By: bgamari, simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2192
Diffstat (limited to 'includes')
-rw-r--r-- | includes/stg/Types.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/stg/Types.h b/includes/stg/Types.h index 1a61c8bb46..0ad3c5c77d 100644 --- a/includes/stg/Types.h +++ b/includes/stg/Types.h @@ -21,6 +21,11 @@ #ifndef STGTYPES_H #define STGTYPES_H +#if defined(mingw32_HOST_OS) +/* Inform mingw we want the ISO rather than Windows printf format specifiers. */ +#define __USE_MINGW_ANSI_STDIO 1 +#endif + /* ISO C 99 says: * "C++ implementations should define these macros only when * __STDC_LIMIT_MACROS is defined before <stdint.h> is included." |