From 1c9a674d24eafd45c73b75af491a7bdf4a405d87 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 1 Oct 2016 21:32:16 -0700 Subject: [PATCH] Fix compilation on Cygwin (#388) (cherry picked from commit cee50b7572e4416f5aa7a2a6068543c1e5cd04a9) --- fmt/posix.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fmt/posix.h b/fmt/posix.h index 229a98b7..96983417 100644 --- a/fmt/posix.h +++ b/fmt/posix.h @@ -10,7 +10,7 @@ #ifndef FMT_POSIX_H_ #define FMT_POSIX_H_ -#ifdef __MINGW32__ +#if defined(__MINGW32__) || defined(__CYGWIN__) // Workaround MinGW bug https://sourceforge.net/p/mingw/bugs/2024/. # undef __STRICT_ANSI__ #endif @@ -321,7 +321,8 @@ class File { // Returns the memory page size. long getpagesize(); -#if (defined(LC_NUMERIC_MASK) || defined(_MSC_VER)) && !defined(__ANDROID__) +#if (defined(LC_NUMERIC_MASK) || defined(_MSC_VER)) && \ + !defined(__ANDROID__) && !defined(__CYGWIN__) # define FMT_LOCALE #endif