From 4230d7481ea1b7a2c211143f6cb6dd94962344fd Mon Sep 17 00:00:00 2001 From: Dimitrij Mijoski Date: Wed, 20 Jul 2022 21:24:24 +0200 Subject: [PATCH] Fix for non-Windows OSs --- include/fmt/format.h | 2 ++ include/fmt/ostream.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/fmt/format.h b/include/fmt/format.h index 40f15d15..aec91fae 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -921,7 +921,9 @@ struct is_contiguous> : std::true_type { }; namespace detail { +#ifdef _WIN32 bool write_console_on_windows(std::FILE* f, string_view text); +#endif FMT_API void print(std::FILE*, string_view); } diff --git a/include/fmt/ostream.h b/include/fmt/ostream.h index 8c02b0a0..acbf507a 100644 --- a/include/fmt/ostream.h +++ b/include/fmt/ostream.h @@ -87,8 +87,10 @@ template class filebuf_access(os.rdbuf())) if (FILE* f = get_file(*buf)) return write_console_on_windows(f, data); +#endif return false; } inline bool write_ostream_msvc_unicode(std::wostream&,