diff options
Diffstat (limited to 'rts/PosixSource.h')
-rw-r--r-- | rts/PosixSource.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rts/PosixSource.h b/rts/PosixSource.h index 0ba74dfa69..edf16b5b1a 100644 --- a/rts/PosixSource.h +++ b/rts/PosixSource.h @@ -38,4 +38,17 @@ #define _XOPEN_SOURCE 700 #endif +#if defined(mingw32_HOST_OS) +/* Without this gcc will warn about %ull and the like since some msvcrt versions + do not support them. See + https://sourceforge.net/p/mingw-w64/mailman/message/28557333/ + + Note that this is implied by _POSIX_C_SOURCE in the msys2 toolchain that we + now use. However, we retain this explicit #define to preserve the ability to + bootstrap GHC with compilers still using msys (e.g. GHC 7.10.1 and 7.10.2). + This can be removed in for GHC 8.4. See #12951. + */ +#define __USE_MINGW_ANSI_STDIO 1 +#endif + #endif /* POSIXSOURCE_H */ |