From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3756 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: option groups detection for libc-test Date: Fri, 26 Jul 2013 13:09:14 -0400 Message-ID: <20130726170914.GA22654@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="yrj/dFKFPuw6o+aM" X-Trace: ger.gmane.org 1374858571 31561 80.91.229.3 (26 Jul 2013 17:09:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Jul 2013 17:09:31 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3760-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jul 26 19:09:33 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1V2lWE-00065b-0P for gllmg-musl@plane.gmane.org; Fri, 26 Jul 2013 19:09:30 +0200 Original-Received: (qmail 5794 invoked by uid 550); 26 Jul 2013 17:09:28 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5782 invoked from network); 26 Jul 2013 17:09:27 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3756 Archived-At: --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="options.h.in" /* 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 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 --yrj/dFKFPuw6o+aM--