https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51749

--- Comment #32 from Yaakov Selkowitz <yselkowi at redhat dot com> ---
In an effort to enable C99-in-C++ functionality on newlib-based targets
(including Cygwin and RTEMS), we just overhauled our feature test macros to be
functionally compatible with glibc's.  Ignoring the lack of missing long double
real and complex math functions (which are anyways guarded separately), we were
able to thereby enable the rest of _GLIBCXX_USE_C99* functionality without the
-D_GNU_SOURCE hack.

Our approach was (in glibc terms):

* enable __USE_ISOC99 in features.h if defined(__cplusplus), for C99-in-TR1;

* enable __USE_ISOC11 in features.h if __cplusplus >= 201103L, for *quick_exit
in C++11.

* define the _POSIX_* capability macros in <unistd.h> regardless of
__USE_POSIX*, for gthr-posix.h.

Note that the public -D_ISOC*_SOURCE macros were NOT defined in g++.

However, we don't need ftello64 (Cygwin's off_t is naturally 64-bit) nor do we
have the locale_t group of functions, which according to the Linux man-pages
are SUSv4.  These functions may be best served by their own special guards.

Reply via email to