Proper Conditionals for POSIX CX and XSI

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Thu Jul 18 04:15:00 GMT 2013


On 2013-07-17 15:34, Joel Sherrill wrote:
> While this was still fresh, I wanted to ask what was the
> proper conditional for methods marked as CX or XSI
> in the POSIX standard.

This is what is done in glibc:

http://man7.org/linux/man-pages/man7/feature_test_macros.7.html

In short, <features.h> recognizes _*_SOURCE macros, which it uses to set 
various __USE_* private macros which are used throughout the headers as 
conditionals to control which APIs are made available.

Having this done *properly* in the Newlib/Cygwin headers would be a big 
step to fixing a lot of compiling incompatibilities with glibc.  It is 
also a very tedious task, although it may not have to be done all at once.


Yaakov



More information about the Newlib mailing list