Skip to content

Commit 6d8a0c3

Browse files
committed
Resolved warning C4996: 'fileno': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _fileno.
1 parent 116a9ce commit 6d8a0c3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/os.cc

+2-4
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,9 @@ void buffered_file::close() {
183183

184184
int buffered_file::descriptor() const {
185185
#ifdef FMT_HAS_SYSTEM
186-
// fileno is a macro on OpenBSD.
187-
# ifdef fileno
188-
# undef fileno
189-
# endif
190186
int fd = FMT_POSIX_CALL(fileno(file_));
187+
#elif defined(_WIN32)
188+
int fd = _fileno(file_);
191189
#else
192190
int fd = fileno(file_);
193191
#endif

0 commit comments

Comments
 (0)