Skip to content

Commit

Permalink
Restore symbol from 10.1
Browse files Browse the repository at this point in the history
Fixes fmtlib#3785.

the write_console symbol has changed from 10.1 to 10.2. Here we restore
the symbol as introduced in 10.1.
  • Loading branch information
saraedum committed Jan 3, 2024
1 parent 67c0c0c commit e71b7c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/fmt/format-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1446,6 +1446,10 @@ FMT_FUNC bool write_console(int fd, string_view text) {
}
#endif

FMT_FUNC auto write_console(std::FILE* f, string_view text) -> bool {
return write_console(_fileno(f), text);
}

#ifdef _WIN32
// Print assuming legacy (non-Unicode) encoding.
FMT_FUNC void vprint_mojibake(std::FILE* f, string_view fmt, format_args args) {
Expand Down
1 change: 1 addition & 0 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,7 @@ struct is_contiguous<basic_memory_buffer<T, SIZE, Allocator>> : std::true_type {
FMT_END_EXPORT
namespace detail {
FMT_API auto write_console(int fd, string_view text) -> bool;
FMT_API auto write_console(std::FILE* f, string_view text) -> bool;
FMT_API void print(std::FILE*, string_view);
} // namespace detail

Expand Down

0 comments on commit e71b7c1

Please sign in to comment.