From fe2e381de570881352ebb621f5e39234f2d8efc9 Mon Sep 17 00:00:00 2001 From: Dimitrij Mijoski Date: Wed, 20 Jul 2022 21:04:59 +0200 Subject: [PATCH] Fix warning -Wundef --- include/fmt/ostream.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h index 4a0df987..8c02b0a0 100644 --- a/include/fmt/ostream.h +++ b/include/fmt/ostream.h @@ -10,7 +10,7 @@ #include #include -#if _WIN32 && __GLIBCXX__ +#if defined(_WIN32) && defined(__GLIBCXX__) # include # include #endif @@ -96,7 +96,7 @@ inline bool write_ostream_msvc_unicode(std::wostream&, return false; } -#if _WIN32 && __GLIBCXX__ +#if defined(_WIN32) && defined(__GLIBCXX__) inline bool write_ostream_gcc_mingw_unicode(std::ostream& os, fmt::string_view data) { auto* rdbuf = os.rdbuf(); @@ -124,7 +124,7 @@ void write_buffer(std::basic_ostream& os, buffer& buf) { // TODO: check detail::is_utf8(). Here or bellow in print or in vprint? #if FMT_MSC_VERSION if (write_ostream_msvc_unicode(os, {buf.data(), buf.size()})) return; -#elif _WIN32 && __GLIBCXX__ +#elif defined(_WIN32) && defined(__GLIBCXX__) if (write_ostream_gcc_mingw_unicode(os, {buf.data(), buf.size()})) return; #endif const Char* buf_data = buf.data();