mailing list of musl libc
 help / color / mirror / code / Atom feed
* option groups detection for libc-test
@ 2013-07-26 17:09 Rich Felker
  0 siblings, 0 replies; only message in thread
From: Rich Felker @ 2013-07-26 17:09 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 551 bytes --]

Attached is a cpp+sed template for generating an "options.h" file
indicating which POSIX option groups the implementation claims to
support. Option groups which are mandatory, obsolete, or deal with
utilities rather than system interfaces are not included, but could be
added. The resulting macros are the same as the standard ones in
unistd.h but with the leading underscores removed. The motivation is
to be able to test for option groups without including unistd.h, for
tests where unistd.h would possibly interfere with what's being
tested.

Rich

[-- Attachment #2: options.h.in --]
[-- Type: text/plain, Size: 3771 bytes --]

/* Usage: pipe the output of running the preprocessor on this file to:
 * sed -e '1,/optiongroups_unistd_end/d' -e '/^#/d' -e '/^[[:space:]]*$/d' -e 's/^/#define /'
 */
#include <unistd.h>
optiongroups_unistd_end

#if defined _POSIX_ADVISORY_INFO && _POSIX_ADVISORY_INFO >= 0
POSIX_ADVISORY_INFO _POSIX_ADVISORY_INFO
#endif

#if defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0
POSIX_CPUTIME _POSIX_CPUTIME
#endif

#if defined _POSIX_FSYNC && _POSIX_FSYNC >= 0
POSIX_FSYNC _POSIX_FSYNC
#endif

#if defined _POSIX_IPV6 && _POSIX_IPV6 >= 0
POSIX_IPV6 _POSIX_IPV6
#endif

#if defined _POSIX_MEMLOCK && _POSIX_MEMLOCK >= 0
POSIX_MEMLOCK _POSIX_MEMLOCK
#endif

#if defined _POSIX_MEMLOCK_RANGE && _POSIX_MEMLOCK_RANGE >= 0
POSIX_MEMLOCK_RANGE _POSIX_MEMLOCK_RANGE
#endif

#if defined _POSIX_MESSAGE_PASSING && _POSIX_MESSAGE_PASSING >= 0
POSIX_MESSAGE_PASSING _POSIX_MESSAGE_PASSING
#endif

#if defined _POSIX_MONOTONIC_CLOCK && _POSIX_MONOTONIC_CLOCK >= 0
POSIX_MONOTONIC_CLOCK _POSIX_MONOTONIC_CLOCK
#endif

#if defined _POSIX_PRIORITIZED_IO && _POSIX_PRIORITIZED_IO >= 0
POSIX_PRIORITIZED_IO _POSIX_PRIORITIZED_IO
#endif

#if defined _POSIX_PRIORITY_SCHEDULING && _POSIX_PRIORITY_SCHEDULING >= 0
POSIX_PRIORITY_SCHEDULING _POSIX_PRIORITY_SCHEDULING
#endif

#if defined _POSIX_RAW_SOCKETS && _POSIX_RAW_SOCKETS >= 0
POSIX_RAW_SOCKETS _POSIX_RAW_SOCKETS
#endif

#if defined _POSIX_SHARED_MEMORY_OBJECTS && _POSIX_SHARED_MEMORY_OBJECTS >= 0
POSIX_SHARED_MEMORY_OBJECTS _POSIX_SHARED_MEMORY_OBJECTS
#endif

#if defined _POSIX_SPAWN && _POSIX_SPAWN >= 0
POSIX_SPAWN _POSIX_SPAWN
#endif

#if defined _POSIX_SPORADIC_SERVER && _POSIX_SPORADIC_SERVER >= 0
POSIX_SPORADIC_SERVER _POSIX_SPORADIC_SERVER
#endif

#if defined _POSIX_SYNCHRONIZED_IO && _POSIX_SYNCHRONIZED_IO >= 0
POSIX_SYNCHRONIZED_IO _POSIX_SYNCHRONIZED_IO
#endif

#if defined _POSIX_THREAD_ATTR_STACKADDR && _POSIX_THREAD_ATTR_STACKADDR >= 0
POSIX_THREAD_ATTR_STACKADDR _POSIX_THREAD_ATTR_STACKADDR
#endif

#if defined _POSIX_THREAD_ATTR_STACKSIZE && _POSIX_THREAD_ATTR_STACKSIZE >= 0
POSIX_THREAD_ATTR_STACKSIZE _POSIX_THREAD_ATTR_STACKSIZE
#endif

#if defined _POSIX_THREAD_CPUTIME && _POSIX_THREAD_CPUTIME >= 0
POSIX_THREAD_CPUTIME _POSIX_THREAD_CPUTIME
#endif

#if defined _POSIX_THREAD_PRIO_INHERIT && _POSIX_THREAD_PRIO_INHERIT >= 0
POSIX_THREAD_PRIO_INHERIT _POSIX_THREAD_PRIO_INHERIT
#endif

#if defined _POSIX_THREAD_PRIO_PROTECT && _POSIX_THREAD_PRIO_PROTECT >= 0
POSIX_THREAD_PRIO_PROTECT _POSIX_THREAD_PRIO_PROTECT
#endif

#if defined _POSIX_THREAD_PRIORITY_SCHEDULING && _POSIX_THREAD_PRIORITY_SCHEDULING >= 0
POSIX_THREAD_PRIORITY_SCHEDULING _POSIX_THREAD_PRIORITY_SCHEDULING
#endif

#if defined _POSIX_THREAD_PROCESS_SHARED && _POSIX_THREAD_PROCESS_SHARED >= 0
POSIX_THREAD_PROCESS_SHARED _POSIX_THREAD_PROCESS_SHARED
#endif

#if defined _POSIX_THREAD_ROBUST_PRIO_INHERIT && _POSIX_THREAD_ROBUST_PRIO_INHERIT >= 0
POSIX_THREAD_ROBUST_PRIO_INHERIT _POSIX_THREAD_ROBUST_PRIO_INHERIT
#endif

#if defined _POSIX_THREAD_ROBUST_PRIO_PROTECT && _POSIX_THREAD_ROBUST_PRIO_PROTECT >= 0
POSIX_THREAD_ROBUST_PRIO_PROTECT _POSIX_THREAD_ROBUST_PRIO_PROTECT
#endif

#if defined _POSIX_THREAD_SPORADIC_SERVER && _POSIX_THREAD_SPORADIC_SERVER >= 0
POSIX_THREAD_SPORADIC_SERVER _POSIX_THREAD_SPORADIC_SERVER
#endif

#if defined _POSIX_TYPED_MEMORY_OBJECTS && _POSIX_TYPED_MEMORY_OBJECTS >= 0
POSIX_TYPED_MEMORY_OBJECTS _POSIX_TYPED_MEMORY_OBJECTS
#endif

#if defined _XOPEN_CRYPT && _XOPEN_CRYPT >= 0
XOPEN_CRYPT _XOPEN_CRYPT
#endif

#if defined _XOPEN_REALTIME && _XOPEN_REALTIME >= 0
XOPEN_REALTIME _XOPEN_REALTIME
#endif

#if defined _XOPEN_REALTIME_THREADS && _XOPEN_REALTIME_THREADS >= 0
XOPEN_REALTIME_THREADS _XOPEN_REALTIME_THREADS
#endif

#if defined _XOPEN_UNIX && _XOPEN_UNIX >= 0
XOPEN_UNIX _XOPEN_UNIX
#endif

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-07-26 17:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-26 17:09 option groups detection for libc-test Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).