diff --git a/include/fmt/os.h b/include/fmt/os.h index bb6503a8..7f2b2b28 100644 --- a/include/fmt/os.h +++ b/include/fmt/os.h @@ -357,7 +357,7 @@ struct buffer_size { struct ostream_params { int oflag = file::WRONLY | file::CREATE; - size_t buffer_size = BUFSIZ; + size_t buffer_size = BUFSIZ > 65536 ? BUFSIZ : 65536; ostream_params() {} @@ -430,7 +430,7 @@ class ostream : private detail::buffer { /** Opens a file for writing. Supported parameters passed in `params`: * ````: Output flags (``file::WRONLY | file::CREATE`` by default) - * ``buffer_size=``: Output buffer size (``BUFSIZ`` by default) + * ``buffer_size=``: Output buffer size */ template inline ostream output_file(cstring_view path, T... params) {