diff --git a/include/fmt/format.h b/include/fmt/format.h index 87b67948..99179922 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1039,10 +1039,12 @@ template struct is_contiguous> : std::true_type { }; +FMT_END_EXPORT namespace detail { FMT_API bool write_console(std::FILE* f, string_view text); FMT_API void print(std::FILE*, string_view); } // namespace detail +FMT_BEGIN_EXPORT // Suppress a misleading warning in older versions of clang. #if FMT_CLANG_VERSION diff --git a/src/fmt.cc b/src/fmt.cc index a956a70e..8ce91af5 100644 --- a/src/fmt.cc +++ b/src/fmt.cc @@ -29,12 +29,16 @@ module; #include #include #include +#include #include #include #include #include -#if _MSC_VER +#if __has_include() +# include +#endif +#if defined(_MSC_VER) || defined(__MINGW32__) # include #endif #if defined __APPLE__ || defined(__FreeBSD__) @@ -56,6 +60,12 @@ module; # endif #endif #ifdef _WIN32 +# if defined(__GLIBCXX__) +# include +# include +# elif defined(_LIBCPP_VERSION) +# include <__std_stream> +# endif # define WIN32_LEAN_AND_MEAN # include #endif