This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Joel Sherrill wrote:
Hi,
I am in the process of preparing a patch to add POSIX barriers and rwlocks to newlib's pthread.h and sys/types.h. The glibc headers have them protected with the ifdef __USE_XOPEN2K. As far as I can tell, this is always defined since a simple program which doesn't define this can use barriers.
How should these definitions be wrapper in newlib?
--joel
Glibc's features.h sets __USE_XOPEN2K if _POSIX_C_SOURCE is >= 200112L. _POSIX_C_SOURCE gets defaulted to 200112L if __STRICT_ANSI__ is not defined or _XOPEN_SOURCE >= 600.
I don't think newlib should go down the path that glibc did for all the various compliance levels. Thus, the wrapper could be something simple and encompassing like __WANT_POSIX_APIS__ that can be used generally in shared newlib header files for optional POSIX APIs.
* _POSIX_BARRIERS * _POSIX_SPIN_LOCKS * _POSIX_THREAD_CPUTIME * _POSIX_THREAD_SPORADIC_SERVER
-- Jeff J.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |