Skip to content

Commit 5ac5e9c

Browse files
committed
Check _POSIX_C_SOURCE instead of __POSIX_VISIBLE.
__POSIX_VISIBLE is internal to Newlib [1]. We should check if _POSIX_C_SOURCE is defined instead [2]. [1]: https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/sys/features.h#l183 [2]: https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/sys/features.h#l325
1 parent b6a99b1 commit 5ac5e9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/src/print.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#elif __has_include(<unistd.h>)
2424
# include <unistd.h>
2525
# if defined(_NEWLIB_VERSION)
26-
# if defined(__POSIX_VISIBLE) && __POSIX_VISIBLE && __has_include(<stdio.h>)
26+
# if defined(_POSIX_C_SOURCE) && __has_include(<stdio.h>)
2727
# include <stdio.h>
2828
# define HAS_FILENO_AND_ISATTY
2929
# endif

0 commit comments

Comments
 (0)