diff options
author | Ulrich Drepper <drepper@redhat.com> | 2010-01-09 10:56:41 -0800 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-01-09 10:56:41 -0800 |
commit | f095bb7204d80f609a73a22796edd6cffd4c6add (patch) | |
tree | 2b909bba9e4857eaee4761cacc16a69e7ecd480a /conform/data | |
parent | 44dcc00292b965b3b6bff8415175d6a3e290aab7 (diff) | |
download | glibc-f095bb7204d80f609a73a22796edd6cffd4c6add.tar.gz glibc-f095bb7204d80f609a73a22796edd6cffd4c6add.tar.xz glibc-f095bb7204d80f609a73a22796edd6cffd4c6add.zip |
Add support for XPG7 testing.
The header conformance testing code needed extending for XPG7. This exposed a few bugs in the headers. There are more changes to come.
Diffstat (limited to 'conform/data')
53 files changed, 621 insertions, 33 deletions
diff --git a/conform/data/ctype.h-data b/conform/data/ctype.h-data index 7454bd3288..d082230f94 100644 --- a/conform/data/ctype.h-data +++ b/conform/data/ctype.h-data @@ -12,7 +12,7 @@ function int isxdigit (int) function int tolower (int) function int toupper (int) -#ifndef ISO +#if !defined ISO && !defined POSIX && !defined POSIX2008 function int isascii (int) function int toascii (int) @@ -26,4 +26,22 @@ allow is* allow to* allow *_t + +# if defined XOPEN2K8 || defined XOPEN2K8 || defined POSIX2008 +type locale_t + +function int isalnum_l (int, locale_t) +function int isalpha_l (int, locale_t) +function int iscntrl_l (int, locale_t) +function int isdigit_l (int, locale_t) +function int isgraph_l (int, locale_t) +function int islower_l (int, locale_t) +function int isprint_l (int, locale_t) +function int ispunct_l (int, locale_t) +function int isspace_l (int, locale_t) +function int isupper_l (int, locale_t) +function int isxdigit_l (int, locale_t) +function int tolower_l (int, locale_t) +function int toupper_l (int, locale_t) +# endif #endif diff --git a/conform/data/dirent.h-data b/conform/data/dirent.h-data index e496dab0dd..761d5786b5 100644 --- a/conform/data/dirent.h-data +++ b/conform/data/dirent.h-data @@ -3,7 +3,9 @@ type DIR type {struct dirent} +# if !defined POSIX && !defined POSIX2008 element {struct dirent} ino_t d_ino +# endif element {struct dirent} char d_name [] type ino_t @@ -13,9 +15,18 @@ function {DIR*} opendir (const char*) function {struct dirent*} readdir (DIR*) function int readdir_r (DIR*, struct dirent*, struct dirent**) function void rewinddir (DIR*) +# if !defined POSIX && !defined POSIX2008 function void seekdir (DIR*, long int) function {long int} telldir (DIR*) +# endif allow d_* allow *_t + +# if defined XOPEN2K8 || defined POSIX2008 +function int alphasort (const struct dirent**, const struct dirent**) +function int dirfd (DIR*) +function int scandir (const char*, struct dirent***, int(*)(const struct dirent*), int(*)(const struct dirent**,const struct dirent **)) +function {DIR*} fdopendir (int) +# endif #endif diff --git a/conform/data/errno.h-data b/conform/data/errno.h-data index 67225248a2..ffdf6b5c4d 100644 --- a/conform/data/errno.h-data +++ b/conform/data/errno.h-data @@ -79,6 +79,11 @@ constant ETXTBSY constant EWOULDBLOCK constant EXDEV +# if defined XOPEN2K8 || defined POSIX2008 +constant ENOTRECOVERABLE +constant EOWNERDEAD +# endif + // variable int errno allow errno diff --git a/conform/data/fcntl.h-data b/conform/data/fcntl.h-data index c8caf0360f..7769a446dd 100644 --- a/conform/data/fcntl.h-data +++ b/conform/data/fcntl.h-data @@ -60,9 +60,11 @@ constant S_IWOTH constant S_IXOTH constant S_ISUID constant S_ISGID +#if !defined POSIX && !defined POSIX2008 constant S_ISVTX +#endif -#ifdef XOPEN2K +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 constant POSIX_FADV_NORMAL constant POSIX_FADV_SEQUENTIAL constant POSIX_FADV_RANDOM @@ -86,11 +88,32 @@ type pid_t function int creat (const char*, mode_t) function int fcntl (int, int, ...) function int open (const char*, int, ...) -#ifdef XOPEN2K +#if defined XOPEN2K8 || defined POSIX2008 +function int openat (int, const char*, int, ...) +#endif +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int posix_fadvise (int, off_t, off_t, int) function int posix_fallocate (int, off_t, off_t) #endif +#if defined XOPEN2K8 || defined POSIX2008 +constant O_TTY_INIT +constant O_CLOEXEC +constant O_EXEC +constant O_SEARCH +constant O_DIRECTORY +constant O_NOFOLLOW +constant FD_CLOEXEC +constant F_DUPFD_CLOEXEC +constant AT_FDCWD +constant AT_EACCESS +constant AT_SYMLINK_NOFOLLOW +constant AT_SYMLINK_FOLLOW +constant AT_REMOVEDIR + +function int openat(int, const char*, int, ...) +#endif + allow-header sys/stat.h allow-header unistd.h @@ -99,4 +122,8 @@ allow F_* allow O_* allow S_* allow *_t + +allow timespec +allow tv_nsec +allow tv_sec #endif diff --git a/conform/data/fmtmsg.h-data b/conform/data/fmtmsg.h-data index da1ed65ac4..67c35c1c93 100644 --- a/conform/data/fmtmsg.h-data +++ b/conform/data/fmtmsg.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined POSIX && !defined POSIX2008 macro MM_HARD constant MM_HARD diff --git a/conform/data/fnmatch.h-data b/conform/data/fnmatch.h-data index ef34fc4e04..96591d6d43 100644 --- a/conform/data/fnmatch.h-data +++ b/conform/data/fnmatch.h-data @@ -3,7 +3,9 @@ constant FNM_NOMATCH constant FNM_PATHNAME constant FNM_PERIOD constant FNM_NOESCAPE +#if !defined XOPEN2K8 && !defined POSIX2008 constant FNM_NOSYS +#endif function int fnmatch (const char*, const char*, int) diff --git a/conform/data/ftw.h-data b/conform/data/ftw.h-data index 81c50070d1..eb499243a5 100644 --- a/conform/data/ftw.h-data +++ b/conform/data/ftw.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined POSIX && !defined POSIX2008 type {struct FTW} element {struct FTW} int base element {struct FTW} int level diff --git a/conform/data/glob.h-data b/conform/data/glob.h-data index 221a3154cb..9f90f8b84b 100644 --- a/conform/data/glob.h-data +++ b/conform/data/glob.h-data @@ -15,7 +15,9 @@ constant GLOB_NOSORT constant GLOB_ABORTED constant GLOB_NOMATCH constant GLOB_NOSPACE +# if !defined XOPEN2K8 && !defined POSIX2008 constant GLOB_NOSYS +# endif function int glob (const char*, int, int (*) (const char*, int), glob_t*) function void globfree (glob_t *) diff --git a/conform/data/grp.h-data b/conform/data/grp.h-data index 91401b31d9..16519506e5 100644 --- a/conform/data/grp.h-data +++ b/conform/data/grp.h-data @@ -7,6 +7,9 @@ element {struct group} {char**} gr_mem # ifndef POSIX type gid_t # endif +# if defined XOPEN2K8 || defined POSIX2008 +type size_t +# endif function {struct group*} getgrgid (gid_t) function {struct group*} getgrnam (const char*) @@ -15,7 +18,9 @@ function int getgrgid_r (gid_t, struct group*, char *, size_t, struct group**) function int getgrnam_r (const char *, struct group *, char *, size_t, struct group**) function {struct group*} getgrent (void) function void endgrent (void) +# ifndef POSIX2008 function void setgrent (void) +# endif # endif allow gr_* diff --git a/conform/data/iconv.h-data b/conform/data/iconv.h-data index f1e2ea0527..7071d90f60 100644 --- a/conform/data/iconv.h-data +++ b/conform/data/iconv.h-data @@ -1,5 +1,8 @@ #if !defined ISO && !defined POSIX type iconv_t +# if defined XOPEN2K8 || defined POSIX2008 +type size_t +# endif function iconv_t iconv_open (const char*, const char*) function size_t iconv (iconv_t, char**, size_t*, char**, size_t*) diff --git a/conform/data/langinfo.h-data b/conform/data/langinfo.h-data index 2fe38a266d..95bc3f934e 100644 --- a/conform/data/langinfo.h-data +++ b/conform/data/langinfo.h-data @@ -55,7 +55,15 @@ constant YESEXPR constant NOEXPR constant CRNCYSTR +type nl_item +# if defined XOPEN2K8 || defined POSIX2008 +type locale_t +# endif + function {char*} nl_langinfo (nl_item) +# if defined XOPEN2K8 || defined POSIX2008 +function {char*} nl_langinfo_l (nl_item, locale_t) +# endif allow-header nl_types.h diff --git a/conform/data/libgen.h-data b/conform/data/libgen.h-data index ca0126fbb1..b749b8dcde 100644 --- a/conform/data/libgen.h-data +++ b/conform/data/libgen.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined POSIX && !defined POSIX2008 function {char*} basename (char*) function {char*} dirname (char*) diff --git a/conform/data/limits.h-data b/conform/data/limits.h-data index 9801ddeb86..2e720a9b78 100644 --- a/conform/data/limits.h-data +++ b/conform/data/limits.h-data @@ -11,7 +11,9 @@ allow LOGIN_NAME_MAX allow MQ_OPEN_MAX allow OPEN_MAX allow PAGESIZE +#if !defined POSIX && !defined POSIX2008 allow PAGE_SIZE +#endif allow PTHREAD_DESTRUCTOR_ITERATIONS allow PTHREAD_KEYS_MAX allow PTHREAD_STACK_MIN @@ -131,12 +133,18 @@ constant SHRT_MIN <= -32767 optional-constant CHARCLASS_NAME_MAX >= 14 optional-constant NL_ARGMAX >= 9 +#if !defined POSIX && !defined POSIX2008 optional-constant NL_LANGMAX >= 14 +#endif optional-constant NL_MSGMAX >= 32767 +#if !defined XOPEN2K8 && !defined POSIX2008 optional-constant NL_NMAX +#endif optional-constant NL_SETMAX >= 255 optional-constant NL_TEXTMAX +#if !defined POSIX && !defined POSIX2008 optional-constant NZERO >= 20 +#endif optional-constant TMP_MAX >= 10000 allow *_MAX diff --git a/conform/data/locale.h-data b/conform/data/locale.h-data index 84bd6abc09..f6e6c22c80 100644 --- a/conform/data/locale.h-data +++ b/conform/data/locale.h-data @@ -17,7 +17,7 @@ element {struct lconv} char p_cs_precedes element {struct lconv} char p_sep_by_space element {struct lconv} char p_sign_posn element {struct lconv} {char*} thousands_sep -#ifdef XOPEN2K +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 element {struct lconv} char int_n_cs_precedes element {struct lconv} char int_n_sep_by_space element {struct lconv} char int_n_sign_posn @@ -36,8 +36,31 @@ macro LC_MONETARY macro LC_NUMERIC macro LC_TIME +#if defined XOPEN2K8 || defined POSIX2008 +constant LC_GLOBAL_LOCALE + +macro LC_COLLATE_MASK +macro LC_CTYPE_MASK +macro LC_MESSAGES_MASK +macro LC_MONETARY_MASK +macro LC_NUMERIC_MASK +macro LC_TIME_MASK +macro LC_ALL_MASK + +type locale_t +#endif + function {struct lconv*} localeconv (void) function {char*} setlocale (int, const char*) +#if defined XOPEN2K8 || defined POSIX2008 +function locale_t duplocale (locale_t) +function void freelocale (locale_t) +function locale_t newlocale (int, const char*, locale_t) +function locale_t uselocale (locale_t) +#endif allow LC_* allow *_t +#if defined XOPEN2K8 || defined POSIX2008 +allow LC_*_MASK +#endif diff --git a/conform/data/math.h-data b/conform/data/math.h-data index 40312effdd..da9ce68fc2 100644 --- a/conform/data/math.h-data +++ b/conform/data/math.h-data @@ -12,6 +12,7 @@ macro islessequal macro islessgreater macro isunordered +# ifndef POSIX2008 constant M_E constant M_LOG2E constant M_LOG10E @@ -27,6 +28,7 @@ constant M_SQRT2 constant M_SQRT1_2 constant MAXFLOAT +# endif constant HUGE_VAL constant HUGE_VALF constant HUGE_VALL @@ -79,14 +81,18 @@ function double erf (double) function double erfc (double) function double gamma (double) function double hypot (double, double) +#if !defined POSIX && !defined POSIX2008 function double j0 (double) function double j1 (double) function double jn (int, double) +#endif function double lgamma (double) function double tgamma (double) +#if !defined POSIX && !defined POSIX2008 function double y0 (double) function double y1 (double) function double yn (int, double) +#endif function int isnan (double) function double acosh (double) function double asinh (double) @@ -117,8 +123,10 @@ function double fmin (double, double) function double fma (double, double, double) function double nan (const char*) +#if !defined POSIX && !defined POSIX2008 // variable signgam allow signgam +#endif #if !defined ISO && !defined POSIX function float acosf (float) diff --git a/conform/data/monetary.h-data b/conform/data/monetary.h-data index eab8384d76..7935f2ab85 100644 --- a/conform/data/monetary.h-data +++ b/conform/data/monetary.h-data @@ -1,8 +1,14 @@ #if !defined ISO && !defined POSIX type size_t type ssize_t +# if defined XOPEN2K8 || defined POSIX2008 +type locale_t +# endif function ssize_t strfmon (char*, size_t, const char*, ...) +# if defined XOPEN2K8 || defined POSIX2008 +function ssize_t strfmon_l (char*, size_t, locale_t, const char*, ...) +# endif allow *_t #endif diff --git a/conform/data/mqueue.h-data b/conform/data/mqueue.h-data index 6ec1e312d5..16335a556f 100644 --- a/conform/data/mqueue.h-data +++ b/conform/data/mqueue.h-data @@ -18,11 +18,19 @@ function ssize_t mq_receive (mqd_t, char*, size_t, unsigned int*) function int mq_send (mqd_t, const char*, size_t, unsigned int) function int mq_setattr (mqd_t, const struct mq_attr*, struct mq_attr*) function int mq_unlink (const char*) -#ifdef XOPEN2K +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 optional-function ssize_t mq_timedreceive (mqd_t, char*, size_t, unsigned int*, const struct timespec*) optional-function int mq_timedsend (mqd_t, const char*, size_t, unsigned int, const struct timespec*) #endif +#if defined XOPEN2K8 || defined POSIX2008 +type pthread_attr_t +type size_t +type ssize_t +type {struct timespec} +type {struct sigevent} +#endif + allow-header fcntl.h allow-header signal.h allow-header sys/types.h diff --git a/conform/data/ndbm.h-data b/conform/data/ndbm.h-data index 6e606e589c..af091de0fd 100644 --- a/conform/data/ndbm.h-data +++ b/conform/data/ndbm.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined POSIX && !defined POSIX2008 type datum element datum {void*} dptr element datum size_t dsize diff --git a/conform/data/netdb.h-data b/conform/data/netdb.h-data index 483a3fcc96..254ea65027 100644 --- a/conform/data/netdb.h-data +++ b/conform/data/netdb.h-data @@ -34,6 +34,7 @@ element {struct servent} {char*} s_proto macro IPPORT_RESERVED +#if !defined XOPEN2K8 && !defined POSIX2008 // variable int h_errno allow h_errno @@ -41,6 +42,7 @@ macro HOST_NOT_FOUND macro NO_DATA macro NO_RECOVERY macro TRY_AGAIN +#endif type {struct addrinfo} element {struct addrinfo} int ai_flags diff --git a/conform/data/pthread.h-data b/conform/data/pthread.h-data index aa5861f1d8..5a536c7bf9 100644 --- a/conform/data/pthread.h-data +++ b/conform/data/pthread.h-data @@ -25,6 +25,10 @@ macro PTHREAD_MUTEX_INITIALIZER constant PTHREAD_MUTEX_RECURSIVE macro PTHREAD_RWLOCK_INITIALIZER # endif +# if defined XOPEN2K8 || defined POSIX2008 +constant PTHREAD_MUTEX_ROBUST +constant PTHREAD_MUTEX_STALLED +# endif type pthread_attr_t type pthread_barrier_t @@ -90,7 +94,7 @@ function int pthread_create (pthread_t*, const pthread_attr_t*, void *(*) (void* function int pthread_detach (pthread_t) function int pthread_equal (pthread_t, pthread_t) function void pthread_exit (void*) -# ifndef POSIX +# if !defined POSIX && !defined POSIX2008 function int pthread_getconcurrency (void) # endif function int pthread_getcpuclockid (pthread_t, clockid_t*) @@ -135,12 +139,12 @@ function int pthread_rwlockattr_setpshared (pthread_rwlockattr_t*, int) function pthread_t pthread_self (void) function int pthread_setcancelstate (int, int*) function int pthread_setcanceltype (int, int*) -# ifndef POSIX +# if !defined POSIX && !defined POSIX2008 function int pthread_setconcurrency (int) # endif function int pthread_setschedparam (pthread_t, int, const struct sched_param*) function int pthread_setspecific (pthread_key_t, const void*) -#ifndef XOPEN2K +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 function int pthread_sigmask (int, const sigset_t*, sigset_t*) #endif function int pthread_spin_destroy (pthread_spinlock_t*) @@ -149,6 +153,11 @@ function int pthread_spin_lock (pthread_spinlock_t*) function int pthread_spin_trylock (pthread_spinlock_t*) function int pthread_spin_unlock (pthread_spinlock_t*) function void pthread_testcancel (void) +# if defined XOPEN2K8 || defined POSIX2008 +function int pthread_mutex_consistent (pthread_mutex_t *) +function int pthread_mutexattr_getrobust (__const pthread_mutexattr_t*, int*) +function int pthread_mutexattr_setrobust (pthread_mutexattr_t*, int) +# endif allow-header sched.h allow-header time.h diff --git a/conform/data/pwd.h-data b/conform/data/pwd.h-data index 1267708b98..a8edf27730 100644 --- a/conform/data/pwd.h-data +++ b/conform/data/pwd.h-data @@ -9,15 +9,20 @@ element {struct passwd} {char*} pw_shell # ifndef POSIX type uid_t type gid_t +# if defined XOPEN2K8 || defined POSIX2008 +type size_t +# endif # endif function {struct passwd*} getpwnam (const char*) function {struct passwd*} getpwuid (uid_t) function int getpwnam_r (const char*, struct passwd*, char*, size_t, struct passwd**) function int getpwuid_r (uid_t, struct passwd*, char*, size_t, struct passwd**) +# ifndef POSIX2008 function void endpwent (void) function {struct passwd*} getpwent (void) function void setpwent (void) +# endif allow pw_* allow *_t diff --git a/conform/data/regex.h-data b/conform/data/regex.h-data index 38495d5b83..73e06a8266 100644 --- a/conform/data/regex.h-data +++ b/conform/data/regex.h-data @@ -28,7 +28,9 @@ constant REG_EBRACE constant REG_BADBR constant REG_ESPACE constant REG_BADRPT +# if !defined XOPEN2K8 && !defined POSIX2008 constant REG_ENOSYS +# endif function int regcomp (regex_t*, const char*, int) function int regexec (const regex_t*, const char*, size_t, regmatch_t[], int) diff --git a/conform/data/sched.h-data b/conform/data/sched.h-data index d4c5ae72cd..585145011a 100644 --- a/conform/data/sched.h-data +++ b/conform/data/sched.h-data @@ -6,6 +6,12 @@ optional-element {struct sched_param} {struct timespec} sched_ss_repl_period optional-element {struct sched_param} {struct timespec} sched_ss_init_budget optional-element {struct sched_param} int sched_ss_max_repl +# if defined XOPEN2K8 || defined POSIX2008 +type pid_t +type time_t +type {struct timespec} +# endif + constant SCHED_FIFO constant SCHED_RR optional-constant SCHED_SPORADIC diff --git a/conform/data/search.h-data b/conform/data/search.h-data index da7f2a1332..dadb1ff71c 100644 --- a/conform/data/search.h-data +++ b/conform/data/search.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined POSIX && !defined POSIX2008 type ENTRY type {struct entry} element {struct entry} {char*} key diff --git a/conform/data/semaphore.h-data b/conform/data/semaphore.h-data index 20fe0706b7..5484884fff 100644 --- a/conform/data/semaphore.h-data +++ b/conform/data/semaphore.h-data @@ -14,7 +14,7 @@ function int sem_trywait (sem_t*) function int sem_unlink (const char*) function int sem_wait (sem_t*) -# if !defined POSIX +# ifndef POSIX allow-header fcntl.h allow-header sys/types.h # endif diff --git a/conform/data/setjmp.h-data b/conform/data/setjmp.h-data index ef29c9cbe8..a89a33fa73 100644 --- a/conform/data/setjmp.h-data +++ b/conform/data/setjmp.h-data @@ -6,7 +6,7 @@ type sigjmp_buf function void longjmp (jmp_buf, int) #ifndef ISO function void siglongjmp (sigjmp_buf, int) -# ifndef POSIX +# if !defined POSIX && !defined POSIX2008 function void _longjmp (jmp_buf, int) # endif #endif @@ -14,7 +14,7 @@ function void _longjmp (jmp_buf, int) macro-function int setjmp (jmp_buf) #ifndef ISO macro-function int sigsetjmp (sigjmp_buf, int) -# ifndef POSIX +# if !defined POSIX && !defined POSIX2008 macro-function int _setjmp (jmp_buf) # endif #endif diff --git a/conform/data/signal.h-data b/conform/data/signal.h-data index 95bd37299b..b48a1ff7da 100644 --- a/conform/data/signal.h-data +++ b/conform/data/signal.h-data @@ -6,6 +6,20 @@ typed-constant SIG_IGN {void(*)(int)} type sig_atomic_t type sigset_t type pid_t +#if defined XOPEN2K8 || defined POSIX2008 +type size_t +type pthread_t +type uid_t + +type mcontext_t + +type ucontext_t + +element ucontext_t {ucontext_t*} uc_link +element ucontext_t sigset_t uc_sigmask +element ucontext_t stack_t uc_stack +element ucontext_t mcontext_t uc_mcontext +#endif element {union sigval} int sival_int element {union sigval} {void*} sival_ptr @@ -52,7 +66,9 @@ constant SIGBUS constant SIGPOLL constant SIGPROF constant SIGSYS +#if !defined POSIX && !defined POSIX2008 constant SIGTRAP +#endif constant SIGURG constant SIGVTALRM constant SIGXCPU @@ -69,16 +85,20 @@ constant SA_NOCLDSTOP constant SIG_BLOCK constant SIG_UNBLOCK constant SIG_SETMASK +#if !defined POSIX && !defined POSIX2008 constant SA_ONSTACK +#endif constant SA_RESETHAND constant SA_RESTART constant SA_SIGINFO constant SA_NOCLDWAIT constant SA_NODEFER +#if !defined POSIX && !defined POSIX2008 constant SS_ONSTACK constant SS_DISABLE constant MINSIGSTKSZ constant SIGSTKSZ +#endif type ucontext_t @@ -101,7 +121,9 @@ element {struct sigstack} {void*} ss_sp type siginfo_t element siginfo_t int si_signo +#if !defined POSIX && !defined POSIX2008 element siginfo_t int si_errno +#endif element siginfo_t int si_code element siginfo_t pid_t si_pid element siginfo_t uid_t si_uid @@ -153,32 +175,46 @@ constant SI_MESGQ function void (*bsd_signal (int, void(*)(int)))(int) function int kill (pid_t, int) +#if !defined POSIX && !defined POSIX2008 function int killpg (pid_t, int) +#endif function int pthread_kill (pthread_t, int) function int pthread_sigmask (int, const sigset_t*, sigset_t*) function int raise (int) function int sigaction (int, const struct sigaction*, struct sigaction*) function int sigaddset (sigset_t*, int) +#if !defined POSIX && !defined POSIX2008 function int sigaltstack (const stack_t*, stack_t*) +#endif function int sigdelset (sigset_t*, int) function int sigemptyset (sigset_t*) function int sigfillset (sigset_t*) +#if !defined POSIX && !defined POSIX2008 function int sighold (int) function int sigignore (int) function int siginterrupt (int, int) +#endif function int sigismember (const sigset_t*, int) function void (*signal (int, void(*)(int)))(int) +#if !defined POSIX && !defined POSIX2008 function int sigpause (int) +#endif function int sigpending (sigset_t*) function int sigprocmask (int, const sigset_t*, sigset_t*) function int sigqueue (pid_t, int, const union sigval) +#if !defined POSIX && !defined POSIX2008 function int sigrelse (int) function void (*sigset (int, void(*)(int)))(int) +#endif function int sigstack (struct sigstack*, struct sigstack*) function int sigsuspend (const sigset_t*) function int sigtimedwait (const sigset_t*, siginfo_t*, const struct timespec*) function int sigwait (const sigset_t*, int*) function int sigwaitinfo (const sigset_t*, siginfo_t*) +#if defined XOPEN2K8 || defined POSIX2008 +function void psiginfo (const siginfo_t*, const char*) +function void psignal (int, const char*) +#endif // The following expressions are not entirely correct but the current // poorfnmatch implementation doesn't grok the right form. diff --git a/conform/data/spawn.h-data b/conform/data/spawn.h-data index 8afca02216..81f32d0308 100644 --- a/conform/data/spawn.h-data +++ b/conform/data/spawn.h-data @@ -1,6 +1,12 @@ #ifndef ISO type posix_spawnattr_t type posix_spawn_file_actions_t +# if defined XOPEN2K8 || defined POSIX2008 +type mode_t +type pid_t +type sigset_t +type {struct sched_param} +# endif constant POSIX_SPAWN_RESETIDS constant POSIX_SPAWN_SETPGROUP diff --git a/conform/data/stdio.h-data b/conform/data/stdio.h-data index c3f071e8f9..fcc61c9df4 100644 --- a/conform/data/stdio.h-data +++ b/conform/data/stdio.h-data @@ -7,7 +7,9 @@ constant _IOLBF constant _IONBF constant L_ctermid +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 constant L_cuserid +#endif constant L_tmpnam constant SEEK_CUR @@ -20,7 +22,9 @@ constant EOF constant NULL +#if !defined POSIX && !defined POSIX2008 constant P_tmpdir +#endif macro stdin macro stdout @@ -30,10 +34,16 @@ type FILE type fpos_t type va_list type size_t +#if defined XOPEN2K8 || defined POSIX2008 +type off_t +#endif function void clearerr (FILE*) function {char*} ctermid (char*) function {char*} cuserid (char*) +#if defined XOPEN2K8 || defined POSIX2008 +function int dprintf (int, const char*, ...) +#endif function int fclose (FILE*) function {FILE*} fdopen (int, const char*) function int feof (FILE*) @@ -44,6 +54,9 @@ function int fgetpos (FILE*, fpos_t*) function {char*} fgets (char*, int, FILE*) function int fileno (FILE*) function void flockfile (FILE*) +#if defined XOPEN2K8 || defined POSIX2008 +function {FILE*} fmemopen (void*, size_t, const char*) +#endif function {FILE*} fopen (const char*, const char*) function int fprintf (FILE*, const char*, ...) function int fputc (int, FILE*) @@ -63,13 +76,20 @@ function int getc (FILE*) function int getchar (void) function int getc_unlocked (FILE*) function int getchar_unlocked () -#ifndef XOPEN2K +#if defined XOPEN2K8 || defined POSIX2008 +function ssize_t getdelim (char**, size_t*, int, FILE*) +function ssize_t getline (char**, size_t*, FILE*) +#endif +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 function int getopt (int, char *const[], const char *) #endif function {char*} gets (char*) -#ifndef XOPEN2K +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 function int getw (FILE*) #endif +#if defined XOPEN2K8 || defined POSIX2008 +function {FILE*} open_memstream (char**, size_t*) +#endif function int pclose (FILE*) function void perror (const char*) function {FILE*} popen (const char*, const char*) @@ -79,11 +99,14 @@ function int putchar (int) function int putc_unlocked (int, FILE*) function int putchar_unlocked (int) function int puts (const char*) -#ifndef XOPEN2K +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 function int putw (int, FILE*) #endif function int remove (const char*) function int rename (const char*, const char*) +#if defined XOPEN2K8 || defined POSIX2008 +function int renameat (int, const char*, int, const char*) +#endif function void rewind (FILE*) function int scanf (const char*, ...) function void setbuf (FILE*, char*) @@ -91,26 +114,31 @@ function int setvbuf (FILE*, char*, int, size_t) function int snprintf (char*, size_t, const char*, ...) function int sprintf (char *, const char *, ...) function int sscanf (const char*, const char*, ...) +#if !defined POSIX && !defined POSIX2008 function {char*} tempnam (const char*, const char*) +#endif function {FILE*} tmpfile (void) function {char*} tmpnam (char*) function int ungetc (int, FILE*) +#if defined XOPEN2K8 || defined POSIX2008 +function int vdprintf (int, const char*, va_list) +#endif function int vfprintf (FILE*, const char*, va_list) -#ifdef XOPEN2K +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int vfscanf (FILE*, const char*, va_list) #endif function int vprintf (const char*, va_list) -#ifdef XOPEN2K +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int vscanf (const char*, va_list) #endif function int vsnprintf (char*, size_t, const char*, va_list) function int vsprintf (char*, const char*, va_list) -#ifdef XOPEN2K +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int vsscanf (const char*, const char*, va_list) #endif #if !defined ISO && !defined POSIX -#ifndef XOPEN2K +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 variable {char*} optarg variable int opterr variable int optind diff --git a/conform/data/stdlib.h-data b/conform/data/stdlib.h-data index c639bb52d0..760b5b3b4c 100644 --- a/conform/data/stdlib.h-data +++ b/conform/data/stdlib.h-data @@ -10,7 +10,7 @@ element div_t int rem type ldiv_t element ldiv_t long quot element ldiv_t long rem -#ifdef XOPEN2K +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 type lldiv_t element lldiv_t {long long} quot element lldiv_t {long long} rem @@ -29,77 +29,116 @@ macro WSTOPSIG macro WTERMSIG function void _Exit (int) +#if !defined POSIX && !defined POSIX2008 function long a64l (const char*) +#endif function void abort (void) function int abs (int) function int atexit (void(*)(void)) function double atof (const char*) function int atoi (const char*) function {long int} atol (const char*) -#ifdef XOPEN2K +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function {long long} atoll (const char*) #endif function {void*} bsearch (const void*, const void*, size_t, size_t, int(*)(const void*, const void*)) function {void*} calloc (size_t, size_t) function div_t div (int, int) +#if !defined POSIX && !defined POSIX2008 function double drand48 (void) +#endif +#if !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 function {char*} ecvt (double, int, int*, int*) +#endif +#if !defined POSIX && !defined POSIX2008 function double erand48 (unsigned short int[3]) +#endif function void exit (int) +#if !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 function {char*} fcvt (double, int, int*, int*) +#endif function void free (void*) +#if !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 function {char*} gcvt (double, int, char*) +#endif function {char*} getenv (const char*) function int getsubopt (char**, char *const*, char**) +#if !defined POSIX && !defined POSIX2008 function int grantpt (int) function {char*} initstate (unsigned int, char*, size_t) function {long int} jrand48 (unsigned short int[3]) function {char*} l64a (long) +#endif function {long int} labs (long int) +#if !defined POSIX && !defined POSIX2008 function void lcong48 (unsigned short int[7]) +#endif function ldiv_t ldiv (long int, long int) -#ifdef XOPEN2K +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function {long long} llabs (long long) function lldiv_t lldiv (long long, long long) #endif +#if !defined POSIX && !defined POSIX2008 function {long int} lrand48 (void) +#endif function {void*} malloc (size_t) function int mblen (const char*, size_t) function size_t mbstowcs (wchar_t*, const char*, size_t) function int mbtowc (wchar_t*, const char*, size_t) +#if defined XOPEN2K8 || defined POSIX2008 +function {char*} mkdtemp (char*) +#endif +#if !defined XOPEN2K8 && !defined POSIX2008 function {char*} mktemp (char*) +#endif function int mkstemp (char*) +#if !defined POSIX && !defined POSIX2008 function {long int} mrand48 (void) function {long int} nrand48 (unsigned short int[3]) +#endif function int posix_memalign (void**, size_t, size_t) -#ifdef XOPEN2K +#if defined XOPEN2K || defined XOPEN2K8 function int posix_openpt (int) #endif +#if !defined POSIX && !defined POSIX2008 function {char*} ptsname (int) function int putenv (char*) +#endif function void qsort (void*, size_t, size_t, int(*)(const void*, const void*)) function int rand (void) function int rand_r (unsigned int*) +#if !defined POSIX && !defined POSIX2008 function long random (void) +#endif function {void*} realloc (void*, size_t) +#if !defined POSIX && !defined POSIX2008 function {char*} realpath (const char*, char*) function {unsigned short int*} seed48 (unsigned short int[3]) +#endif function int setenv (const char*, const char*, int) +#if !defined POSIX && !defined POSIX2008 function void setkey (const char*) function {char*} setstate (char*) +#endif function void srand (unsigned int) +#if !defined POSIX && !defined POSIX2008 function void srand48 (long int) function void srandom (unsigned) +#endif function double strtod (const char*, char**) function {long int} strtol (const char*, char**, int) function {unsigned long int} strtoul (const char*, char**, int) function int system (const char*) -#ifndef XOPEN2K +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 function int ttyslot (void) #endif +#if !defined POSIX && !defined POSIX2008 function int unlockpt (int) +#endif function int unsetenv (const char*) +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008 function {void*} valloc (size_t) +#endif function size_t wcstombs (char*, const wchar_t*, size_t) function int wctomb (char*, wchar_t) diff --git a/conform/data/string.h-data b/conform/data/string.h-data index 19c06d292c..1c4ae0814e 100644 --- a/conform/data/string.h-data +++ b/conform/data/string.h-data @@ -1,35 +1,61 @@ constant NULL type size_t +#if defined XOPEN2K8 || defined POSIX2008 +type locale_t +#endif +#if !defined POSIX && !defined POSIX2008 function {void*} memccpy (void*, const void*, int, size_t) +#endif function {void*} memchr (const void*, int, size_t) function int memcmp (const void*, const void*, size_t) function {void*} memcpy (void*, const void*, size_t) function {void*} memmove (void*, const void*, size_t) function {void*} memset (void*, int, size_t) +#if defined XOPEN2K8 || defined POSIX2008 +function {char*} stpcpy (char*, const char*) +function {char*} stpncpy (char*, const char*, size_t) + +#endif function {char*} strcat (char*, const char*) function {char*} strchr (const char*, int) function int strcmp (const char*, const char*) function int strcoll (const char*, const char*) +#if defined XOPEN2K8 || defined POSIX2008 +function int strcoll_l (const char*, const char*, locale_t) +#endif function {char*} strcpy (char*, const char*) function size_t strcspn (const char*, const char*) function {char*} strdup (const char*) function {char*} strerror (int) -#ifdef XOPEN2K +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int strerror_r (int, char*, size_t) #endif +#if defined XOPEN2K8 || defined POSIX2008 +function {char*} strerror_l (int, locale_t) +#endif function size_t strlen (const char*) function {char*} strncat (char*, const char*, size_t) function int strncmp (const char*, const char*, size_t) function {char*} strncpy (char*, const char*, size_t) +#if defined XOPEN2K8 || defined POSIX2008 +function {char*} strndup (const char*, size_t) +function size_t strnlen (const char*, size_t) +#endif function {char*} strpbrk (const char*, const char*) function {char*} strrchr (const char*, int) +#if defined XOPEN2K8 || defined POSIX2008 +function {char*} strsignal (int) +#endif function size_t strspn (const char*, const char*) function {char*} strstr (const char*, const char*) function {char*} strtok (char*, const char*) function {char*} strtok_r (char*, const char*, char**) function size_t strxfrm (char*, const char*, size_t) +#if defined XOPEN2K8 || defined POSIX2008 +function size_t strxfrm_l (char*, const char*, size_t, locale_t) +#endif allow-header stddef.h diff --git a/conform/data/strings.h-data b/conform/data/strings.h-data index 201780c8d3..fb4f02c75d 100644 --- a/conform/data/strings.h-data +++ b/conform/data/strings.h-data @@ -1,12 +1,21 @@ function int bcmp (const void*, const void*, size_t) function void bcopy (const void*, void*, size_t) function void bzero (void*, size_t) +#if !defined POSIX && !defined POSIX2008 function int ffs (int) +#endif function {char*} index (const char*, int) function {char*} rindex (const char*, int) function int strcasecmp (const char*, const char*) function int strncasecmp (const char*, const char*, size_t) +#if defined XOPEN2K8 || defined POSIX2008 +function int strcasecmp_l (const char*, const char*, locale_t) +function int strncasecmp_l (const char*, const char*, size_t, locale_t) +#endif type size_t +#if defined XOPEN2K8 || defined POSIX2008 +type locale_t +#endif allow *_t diff --git a/conform/data/sys/ipc.h-data b/conform/data/sys/ipc.h-data index 1b2ec99d37..28918c196d 100644 --- a/conform/data/sys/ipc.h-data +++ b/conform/data/sys/ipc.h-data @@ -1,3 +1,4 @@ +#if !defined ISO && !defined POSIX && !defined POSIX2008 type {struct ipc_perm} element {struct ipc_perm} uid_t uid @@ -26,3 +27,4 @@ function key_t ftok (const char*, int) allow ipc_* allow IPC_* allow *_t +#endif diff --git a/conform/data/sys/msg.h-data b/conform/data/sys/msg.h-data index 7a1df4cbed..ae83356b54 100644 --- a/conform/data/sys/msg.h-data +++ b/conform/data/sys/msg.h-data @@ -1,3 +1,4 @@ +#if !defined ISO && !defined POSIX && !defined POSIX2008 type {struct msqid_ds} type msgqnum_t @@ -30,3 +31,4 @@ allow-header sys/ipc.h allow msg* allow MSG* allow *_h +#endif diff --git a/conform/data/sys/resource.h-data b/conform/data/sys/resource.h-data index d9f9b9ab8c..52f83f523b 100644 --- a/conform/data/sys/resource.h-data +++ b/conform/data/sys/resource.h-data @@ -1,3 +1,4 @@ +#if !defined ISO && !defined POSIX && !defined POSIX2008 constant PRIO_PROCESS constant PRIO_PGRP constant PRIO_USER @@ -48,3 +49,4 @@ allow RLIM_* allow RLIMIT_* allow RUSAGE_* allow *_t +#endif diff --git a/conform/data/sys/sem.h-data b/conform/data/sys/sem.h-data index 8b4598b7b2..665b397c58 100644 --- a/conform/data/sys/sem.h-data +++ b/conform/data/sys/sem.h-data @@ -1,3 +1,4 @@ +#if !defined ISO && !defined POSIX && !defined POSIX2008 constant SEM_UNDO constant GETNCNT @@ -35,3 +36,4 @@ allow-header sys/ipc.h allow sem* allow SEM_* allow *_t +#endif diff --git a/conform/data/sys/shm.h-data b/conform/data/sys/shm.h-data index cac0163406..39df8944ab 100644 --- a/conform/data/sys/shm.h-data +++ b/conform/data/sys/shm.h-data @@ -1,3 +1,4 @@ +#if !defined ISO && !defined POSIX && !defined POSIX2008 constant SHM_RDONLY symbol SHMLBA constant SHM_RND @@ -30,3 +31,4 @@ allow-header sys/ipc.h allow shm* allow SHM* allow *_t +#endif diff --git a/conform/data/sys/socket.h-data b/conform/data/sys/socket.h-data index dd1f265b2b..5fdd6cf6bf 100644 --- a/conform/data/sys/socket.h-data +++ b/conform/data/sys/socket.h-data @@ -3,6 +3,11 @@ type socklen_t type sa_family_t +# if defined XOPEN2K8 || defined POSIX2008 +type size_t +type ssize_t +# endif + type {struct sockaddr} element {struct sockaddr} sa_family_t sa_family @@ -76,6 +81,9 @@ macro MSG_OOB macro MSG_PEEK macro MSG_TRUNC macro MSG_WAITALL +# if defined XOPEN2K8 || defined POSIX2008 +constant MSG_NOSIGNAL +# endif macro AF_UNIX macro AF_UNSPEC diff --git a/conform/data/sys/stat.h-data b/conform/data/sys/stat.h-data index c0f8d45a38..72c656f19e 100644 --- a/conform/data/sys/stat.h-data +++ b/conform/data/sys/stat.h-data @@ -8,13 +8,17 @@ element {struct stat} mode_t st_mode element {struct stat} nlink_t st_nlink element {struct stat} uid_t st_uid element {struct stat} gid_t st_gid +#if !defined POSIX && !defined POSIX2008 element {struct stat} dev_t st_rdev +#endif element {struct stat} off_t st_size element {struct stat} time_t st_atime element {struct stat} time_t st_mtime element {struct stat} time_t st_ctime +#if !defined POSIX && !defined POSIX2008 element {struct stat} blksize_t st_blksize element {struct stat} blkcnt_t st_blocks +#endif type blkcnt_t type blksize_t @@ -26,7 +30,13 @@ type uid_t type gid_t type off_t type time_t +# ifdef XOPEN2K8 +type {struct timespec} +element {struct timespec} time_t tv_sec +element {struct timespec} long tv_nsec +# endif +#if !defined POSIX && !defined POSIX2008 constant S_IFMT constant S_IFBLK constant S_IFCHR @@ -34,6 +44,8 @@ constant S_IFIFO constant S_IFREG constant S_IFDIR constant S_IFLNK +constant S_IFSOCK +#endif constant S_IRWXU constant S_IRUSR @@ -48,14 +60,20 @@ constant S_IWOTH constant S_IXOTH constant S_ISUID constant S_ISGID +#if !defined POSIX && !defined POSIX2008 constant S_ISVTX +#endif +#if !defined POSIX && !defined POSIX2008 +macro S_IFMT macro S_ISBLK macro S_ISCHR macro S_ISDIR macro S_ISFIFO macro S_ISREG macro S_ISLNK +macro S_IFSOCK +#endif // How to represent optional tests? optional-macro S_TYPEISMQ @@ -63,15 +81,41 @@ optional-macro S_TYPEISSEM optional-macro S_TYPEISSHM optional-macro S_TYPEISTMO +# if defined XOPEN2K8 || defined POSIX2008 +constant UTIME_NOW +constant UTIME_OMIT +# endif + function int chmod (const char*, mode_t) function int fchmod (int, mode_t) +# if defined XOPEN2K8 || defined POSIX2008 +function int fchmodat (int, const char*, mode_t, int) +# endif function int fstat (int, struct stat*) +# if defined XOPEN2K8 || defined POSIX2008 +function int fstatat (int, const char*, struct stat*, int) +function int futimens (int, const struct timespec[2]) +# endif function int lstat (const char*, struct stat*) function int mkdir (const char*, mode_t) +# if defined XOPEN2K8 || defined POSIX2008 +function int mkdirat (int, const char*, mode_t) +# endif function int mkfifo (const char*, mode_t) +# if defined XOPEN2K8 || defined POSIX2008 +function int mkfifoat (int, const char*, mode_t) +# endif +# if !defined POSIX && !defined POSIX2008 function int mknod (const char*, mode_t, dev_t) +# endif +# if defined XOPEN2K8 || defined POSIX2008 +function int mknodat (int, const char*, mode_t, dev_t) +# endif function int stat (const char*, struct stat*) function mode_t umask (mode_t) +# if defined XOPEN2K8 || defined POSIX2008 +function int utimensat (int, const char*, const struct timespec[2], int) +# endif allow st_* allow S_* diff --git a/conform/data/sys/time.h-data b/conform/data/sys/time.h-data index 174708b53d..7e3407ab07 100644 --- a/conform/data/sys/time.h-data +++ b/conform/data/sys/time.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined POSIX && !defined POSIX2008 type {struct timeval} element {struct timeval} time_t tv_sec diff --git a/conform/data/sys/types.h-data b/conform/data/sys/types.h-data index ed7236b8b6..be61d08751 100644 --- a/conform/data/sys/types.h-data +++ b/conform/data/sys/types.h-data @@ -1,14 +1,19 @@ +#ifndef ISO type blkcnt_t type blksize_t type clock_t type clockid_t type dev_t +# if !defined POSIX && !defined POSIX2008 type fsblkcnt_t type fsfilcnt_t +# endif type gid_t type id_t type ino_t +# if !defined POSIX && !defined POSIX2008 type key_t +# endif type mode_t type nlink_t type off_t @@ -28,10 +33,13 @@ type pthread_spinlock_t type pthread_t type size_t type ssize_t +# if !defined POSIX && !defined POSIX2008 type suseconds_t +# endif type time_t type timer_t type uid_t type useconds_t allow *_t +#endif diff --git a/conform/data/sys/uio.h-data b/conform/data/sys/uio.h-data index 258032b871..7833e72268 100644 --- a/conform/data/sys/uio.h-data +++ b/conform/data/sys/uio.h-data @@ -1,3 +1,4 @@ +#if !defined ISO && !defined POSIX && !defined POSIX2008 type {struct iovec} element {struct iovec} {void*} iov_base @@ -10,3 +11,4 @@ allow iov_* allow IOV_* allow *_t allow UIO_MAXIOV +#endif diff --git a/conform/data/sys/wait.h-data b/conform/data/sys/wait.h-data index 731c9551f7..81c0dc44f8 100644 --- a/conform/data/sys/wait.h-data +++ b/conform/data/sys/wait.h-data @@ -1,8 +1,11 @@ +#ifndef ISO constant WNOHANG constant WUNTRACED macro WEXITSTATUS +# if !defined POSIX && !defined POSIX2008 macro WIFCONTINUED +# endif macro WIFEXITED macro WIFSIGNALED macro WIFSTOPPED @@ -11,7 +14,9 @@ macro WTERMSIG constant WEXITED constant WSTOPPED +# if !defined POSIX && !defined POSIX2008 constant WCONTINUED +# endif constant WNOHANG constant WNOWAIT @@ -62,3 +67,4 @@ allow SEGV_ allow SI_ allow TRAP_ allow *_t +#endif diff --git a/conform/data/syslog.h-data b/conform/data/syslog.h-data index 87414e8a7e..f0aa65c693 100644 --- a/conform/data/syslog.h-data +++ b/conform/data/syslog.h-data @@ -1,3 +1,4 @@ +#if !defined ISO && !defined POSIX && !defined POSIX2008 constant LOG_PID constant LOG_CONS constant LOG_NDELAY @@ -40,3 +41,4 @@ function void syslog (int, const char*, ...) allow LOG_* allow *_t +#endif diff --git a/conform/data/tar.h-data b/conform/data/tar.h-data index 919167d92b..fcbfb127b4 100644 --- a/conform/data/tar.h-data +++ b/conform/data/tar.h-data @@ -1,3 +1,4 @@ +#ifndef ISO macro-str TMAGIC "ustar" constant TMAGLEN 6 macro-str TVERSION "00" @@ -15,7 +16,9 @@ constant CONTTYPE constant TSUID 04000 constant TSGID 02000 +# if !defined POSIX && !defined POSIX2008 constant TSVTX 01000 +# endif constant TUREAD 00400 constant TUWRITE 00200 constant TUEXEC 00100 @@ -27,3 +30,4 @@ constant TOWRITE 00002 constant TOEXEC 00001 allow *_t +#endif diff --git a/conform/data/termios.h-data b/conform/data/termios.h-data index d867d4cd6b..d32bd6bf3c 100644 --- a/conform/data/termios.h-data +++ b/conform/data/termios.h-data @@ -1,9 +1,14 @@ +#ifndef ISO type cc_t type speed_t type tcflag_t type {struct termios} +#if defined XOPEN2K8 || defined POSIX2008 +type pid_t +#endif + element {struct termios} tcflag_t c_iflag element {struct termios} tcflag_t c_oflag element {struct termios} tcflag_t c_cflag @@ -32,18 +37,24 @@ constant IGNPAR constant INLCR constant INPCK constant ISTRIP +# if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 constant IUCLC +# <endif constant IXANY constant IXOFF constant IXON constant PARMRK constant OPOST +# if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 constant OLCUC +# endif +# if !defined POSIX && !defined POSIX2008 constant ONLCR constant OCRNL constant ONOCR constant ONLRET +constant OFDEL constant OFILL constant NLDLY constant NL0 @@ -67,6 +78,7 @@ constant VT1 constant FFDLY constant FF0 constant FF1 +# endif constant B0 constant B50 @@ -106,7 +118,9 @@ constant IEXTEN constant ISIG constant NOFLSH constant TOSTOP +# if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 constant XCASE +# endif constant TCSANOW constant TCSADRAIN @@ -157,3 +171,4 @@ allow O* allow TC* allow B* allow *_t +#endif diff --git a/conform/data/time.h-data b/conform/data/time.h-data index 805c48dd6f..631cb76a1e 100644 --- a/conform/data/time.h-data +++ b/conform/data/time.h-data @@ -11,7 +11,7 @@ element {struct tm} int tm_yday element {struct tm} int tm_isdst constant NULL -#ifndef XOPEN2K +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 constant CLK_TCK #endif constant CLOCKS_PER_SEC @@ -38,6 +38,12 @@ type size_t type time_t type timer_t +#if defined XOPEN2K8 || defined POSIX2008 +type pid_t +type locale_t +tag {struct sigevent} +#endif + variable int getdate_err function {char*} asctime (const struct tm*) @@ -51,7 +57,9 @@ function int clock_settime (clockid_t, const struct timespec*) function {char*} ctime (const time_t*) function {char*} ctime_r (const time_t*, char*) function double difftime (time_t, time_t) +#if !defined POSIX && !defined POSIX2008 function {struct tm*} getdate (const char*) +#endif function {struct tm*} gmtime (const time_t*) function {struct tm*} gmtime_r (const time_t*, struct tm*) function {struct tm*} localtime (const time_t*) @@ -59,7 +67,12 @@ function {struct tm*} localtime_r (const time_t*, struct tm*) function time_t mktime (struct tm*) function int nanosleep (const struct timespec*, struct timespec*) function size_t strftime (char*, size_t, const char*, const struct tm*) +#if defined XOPEN2K8 || defined POSIX2008 +function size_t strftime_l (char*, size_t, const char*, const struct tm*, locale_t) +#endif +#if !defined POSIX && !defined POSIX2008 function {char*} strptime (const char*, const char*, struct tm*) +#endif function time_t time (time_t*) function int timer_create (clockid_t, struct sigevent*, timer_t*) function int timer_delete (timer_t) @@ -68,8 +81,10 @@ function int timer_getoverrun (timer_t) function int timer_settime (timer_t, int, const struct itimerspec*, struct itimerspec*) function void tzset (void) +#if !defined POSIX && !defined POSIX2008 variable int daylight variable {long int} timezone +#endif variable {char*} tzname [2] allow tm_* diff --git a/conform/data/ulimit.h-data b/conform/data/ulimit.h-data index 84ab56c1d1..9e7e6f4e9a 100644 --- a/conform/data/ulimit.h-data +++ b/conform/data/ulimit.h-data @@ -1,3 +1,4 @@ +#if !defined ISO && !defined POSIX && !defined POSIX2008 constant UL_GETFSIZE constant UL_SETFSIZE @@ -5,3 +6,4 @@ function {long int} ulimit (int, ...) allow UL_* allow *_t +#endif diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data index b6effa064e..96cdf6a3aa 100644 --- a/conform/data/unistd.h-data +++ b/conform/data/unistd.h-data @@ -41,10 +41,24 @@ optional-constant _POSIX_THREAD_PROCESS_SHARED optional-constant _POSIX_THREAD_SAFE_FUNCTIONS optional-constant _POSIX_THREAD_SPORADIC_SERVER +# ifdef XOPEN2K +optional-constant _POSIX_V6_ILP32_OFF32 +optional-constant _POSIX_V6_ILP32_OFFBIG +optional-constant _POSIX_V6_LP64_OFF64 +optional-constant _POSIX_V6_LPBIG_OFFBIG +# endif +# if defined XOPEN2K8 || defined POSIX2008 +optional-constant _POSIX_V7_ILP32_OFF32 +optional-constant _POSIX_V7_ILP32_OFFBIG +optional-constant _POSIX_V7_LP64_OFF64 +optional-constant _POSIX_V7_LPBIG_OFFBIG +# endif + optional-constant _POSIX2_C_DEV optional-constant _POSIX2_FORT_DEV optional-constant _POSIX2_FORT_RUN optional-constant _POSIX2_SW_DEV +# if !defined POSIX && !defined POSIX2008 optional-constant _XOPEN_CRYPT optional-constant _XOPEN_ENH_I18N optional-constant _XOPEN_LEGACY @@ -52,6 +66,7 @@ optional-constant _XOPEN_REALTIME optional-constant _XOPEN_REALTIME_THREADS optional-constant _XOPEN_SHM optional-constant _XOPEN_STREAMS +# endif allow _XBS5_ILP32_OFF32 allow _XBS5_ILP32_OFBIG allow _XBS5_LP64_OFF64 @@ -89,6 +104,8 @@ optional-constant _POSIX2_PBS_LOCATE optional-constant _POSIX2_PBS_MESSAGE optional-constant _POSIX2_PBS_TRACK +optional-constant _POSIX_TIMESTAMP_RESOLUTION + constant NULL constant R_OK @@ -219,7 +236,20 @@ constant _SC_TYPED_MEMORY_OBJECTS constant _SC_TZNAME_MAX constant _SC_USER_GROUPS constant _SC_USER_GROUPS_R +# ifdef XOPEN2K +constant _SC_V6_ILP32_OFF32 +constant _SC_V6_ILP32_OFFBIG +constant _SC_V6_LP64_OFF64 +constant _SC_V6_LPBIG_OFFBIG +# endif +# if defined XOPEN2K8 || defined POSIX2008 +constant _SC_V7_ILP32_OFF32 +constant _SC_V7_ILP32_OFFBIG +constant _SC_V7_LP64_OFF64 +constant _SC_V7_LPBIG_OFFBIG +# endif constant _SC_VERSION +# if !defined POSIX && !defined POSIX2008 constant _SC_XOPEN_VERSION constant _SC_XOPEN_CRYPT constant _SC_XOPEN_ENH_I18N @@ -229,11 +259,46 @@ constant _SC_XOPEN_XCU_VERSION constant _SC_XOPEN_LEGACY constant _SC_XOPEN_REALTIME constant _SC_XOPEN_REALTIME_THREADS +# endif constant _SC_STREAMS constant _SC_XBS5_ILP32_OFF32 constant _SC_XBS5_ILP32_OFFBIG constant _SC_XBS5_LP64_OFF64 constant _SC_XBS5_LPBIG_OFFBIG +# ifdef XOPEN2K +constant _CS_POSIX_V6_ILP32_OFF32_CFLAGS +constant _CS_POSIX_V6_ILP32_OFF32_LDFLAGS +constant _CS_POSIX_V6_ILP32_OFF32_LIBS +constant _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS +constant _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS +constant _CS_POSIX_V6_ILP32_OFFBIG_LIBS +constant _CS_POSIX_V6_LP64_OFF64_CFLAGS +constant _CS_POSIX_V6_LP64_OFF64_LDFLAGS +constant _CS_POSIX_V6_LP64_OFF64_LIBS +constant _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS +constant _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS +constant _CS_POSIX_V6_LPBIG_OFFBIG_LIBS +constant _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS +constant _CS_V6_ENV +# endif +# if defined XOPEN2K8 || defined POSIX2008 +constant _CS_POSIX_V7_ILP32_OFF32_CFLAGS +constant _CS_POSIX_V7_ILP32_OFF32_LDFLAGS +constant _CS_POSIX_V7_ILP32_OFF32_LIBS +constant _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS +constant _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS +constant _CS_POSIX_V7_ILP32_OFFBIG_LIBS +constant _CS_POSIX_V7_LP64_OFF64_CFLAGS +constant _CS_POSIX_V7_LP64_OFF64_LDFLAGS +constant _CS_POSIX_V7_LP64_OFF64_LIBS +constant _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS +constant _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS +constant _CS_POSIX_V7_LPBIG_OFFBIG_LIBS +constant _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS +constant _CS_V7_ENV +# endif +constant _SC_THREAD_ROBUST_PRIO_INHERIT +constant _SC_THREAD_ROBUST_PRIO_PROTECT constant F_LOCK constant F_ULOCK @@ -283,14 +348,18 @@ function int chroot (const char*) function int chown (const char*, uid_t, gid_t) function int close (int) function size_t confstr (int, char*, size_t) +#if !defined POSIX && !defined POSIX2008 function {char*} crypt (const char*, const char*) +#endif function {char*} ctermid (char*) #if defined XPG3 || defined XPG4 || defined UNIX98 function {char*} cuserid (char*) #endif function int dup (int) function int dup2 (int, int) +#if !defined POSIX && !defined POSIX2008 function void encrypt (char[64], int) +#endif function int execl (const char*, const char*, ...) function int execle (const char*, const char*, ...) function int execlp (const char*, const char*, ...) @@ -298,9 +367,18 @@ function int execv (const char*, char *const[]) function int execve (const char*, char *const[], char *const[]) function int execvp (const char*, char *const[]) function void _exit (int) +# if defined XOPEN2K8 || defined POSIX2008 +function int faccessat (int, const char*, int, int) +# endif function int fchown (int, uid_t, gid_t) +# if defined XOPEN2K8 || defined POSIX2008 +function int fchownat (int, const char*, uid_t, gid_t, int) +# endif function int fchdir (int) function int fdatasync (int) +# if defined XOPEN2K8 || defined POSIX2008 +function int fexecve (int, char *const[], char *const[]) +# endif function pid_t fork (void) function {long int} fpathconf (int, int) function int fsync (int) @@ -311,7 +389,9 @@ function gid_t getegid (void) function uid_t geteuid (void) function gid_t getgid (void) function int getgroups (int, gid_t[]) +#if !defined POSIX && !defined POSIX2008 function long gethostid (void) +#endif function int gethostname (char*, size_t) function {char*} getlogin (void) function int getlogin_r (char*, size_t) @@ -330,34 +410,53 @@ function {char*} getwd (char*) function int isatty (int) function int lchown (const char*, uid_t, gid_t) function int link (const char*, const char*) +# if defined XOPEN2K8 || defined POSIX2008 +function int linkat (int, const char*, int, const char*, int) +# endif +# if !defined POSIX && !defined POSIX2008 function int lockf (int, int, off_t) +# endif function off_t lseek (int, off_t, int) +# if !defined POSIX && !defined POSIX2008 function int nice (int) +# endif function {long int} pathconf (const char*, int) function int pause (void) function int pipe (int[2]) function ssize_t pread (int, void*, size_t, off_t) -#ifndef XOPEN2K +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 function int pthread_atfork (void(*)(void), void(*)(void), void(*)(void)) #endif function ssize_t pwrite (int, const void*, size_t, off_t) function ssize_t read (int, void*, size_t) function ssize_t readlink (const char*, char*, size_t) +# if defined XOPEN2K8 || defined POSIX2008 +function ssize_t readlinkat (int, const char*, char*, size_t) +# endif function int rmdir (const char*) function {void*} sbrk (intptr_t) function int setegid (gid_t) function int seteuid (uid_t) function int setgid (gid_t) function int setpgid (pid_t, pid_t) +# if !defined POSIX && !defined POSIX2008 function pid_t setpgrp (void) function int setregid (gid_t, gid_t) function int setreuid (uid_t, uid_t) +# endif function pid_t setsid (void) function int setuid (uid_t) function {unsigned int} sleep (unsigned int) +# if !defined POSIX && !defined POSIX2008 function void swab (const void*, void*, ssize_t) +# endif function int symlink (const char*, const char*) +# if defined XOPEN2K8 || defined POSIX2008 +function int symlinkat (const char*, int, const char*) +# endif +# if !defined POSIX && !defined POSIX2008 function void sync (void) +# endif function {long int} sysconf (int) function pid_t tcgetpgrp (int) function int tcsetpgrp (int, pid_t) @@ -366,6 +465,9 @@ function {char*} ttyname (int) function int ttyname_r (int, char*, size_t) function useconds_t ualarm (useconds_t, useconds_t) function int unlink (const char*) +# if defined XOPEN2K8 || defined POSIX2008 +function int unlinkat (int, const char*, int) +# endif function int usleep (useconds_t) function pid_t vfork (void) function ssize_t write (int, const void*, size_t) diff --git a/conform/data/utmpx.h-data b/conform/data/utmpx.h-data index ba034f0deb..af3c229fc0 100644 --- a/conform/data/utmpx.h-data +++ b/conform/data/utmpx.h-data @@ -1,3 +1,4 @@ +#if !defined ISO && !defined POSIX && !defined POSIX2008 type {struct utmpx} element {struct utmpx} char ut_user [] @@ -34,3 +35,4 @@ allow-header sys/time.h allow ut_* allow *_t +#endif diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data index 7c1589506a..0911f12e48 100644 --- a/conform/data/wchar.h-data +++ b/conform/data/wchar.h-data @@ -1,14 +1,19 @@ type wchar_t type wint_t +# if !defined ISO && !defined POSIX && !defined POSIX2008 type wctype_t +#endif type mbstate_t type FILE type size_t +#if defined XOPEN2K8 || defined POSIX2008 +type locale_t +#endif function wint_t btowc (int) function int fwprintf (FILE*, const wchar_t*, ...) function int fwscanf (FILE*, const wchar_t*, ...) -#if !ISO +#if !defined ISO && !defined POSIX && !defined POSIX2008 function int iswalnum (wint_t) function int iswalpha (wint_t) function int iswcntrl (wint_t) @@ -32,13 +37,21 @@ function wint_t getwchar (void) function int mbsinit (const mbstate_t*) function size_t mbrlen (const char*, size_t, mbstate_t*) function size_t mbrtowc (wchar_t*, const char*, size_t, mbstate_t*) +#if defined XOPEN2K8 || defined POSIX2008 +function size_t mbsnrtowcs (wchar_t*, const char**, size_t, size_t, mbstate_t*) +#endif function size_t mbsrtowcs (wchar_t*, const char**, size_t, mbstate_t*) +#if defined XOPEN2K8 || defined POSIX2008 +function {FILE*} open_wmemstream (wchar_t**, size_t*) +#endif function wint_t putwc (wchar_t, FILE*) function wint_t putwchar (wchar_t) function int swprintf (wchar_t*, size_t, const wchar_t*, ...) function int swscanf (const wchar_t*, const wchar_t*, ...) +#if !defined ISO && !defined POSIX && !defined POSIX2008 function wint_t towlower (wint_t) function wint_t towupper (wint_t) +#endif function wint_t ungetwc (wint_t, FILE*) function int vfwprintf (FILE*, const wchar_t*, va_list) function int vfwscanf (FILE*, const wchar_t*, va_list) @@ -46,18 +59,40 @@ function int vwprintf (const wchar_t*, va_list) function int vwscanf (const wchar_t*, va_list) function int vswprintf (wchar_t*, size_t, const wchar_t*, va_list) function int vswscanf (const wchar_t*, const wchar_t*, va_list) +#if defined XOPEN2K8 || defined POSIX2008 +function {wchar_t*} wcpcpy (wchar_t*, const wchar_t*) +function {wchar_t*} wcpncpy (wchar_t*, const wchar_t*, size_t) +#endif function size_t wcrtomb (char*, wchar_t, mbstate_t*) +#if defined XOPEN2K8 || defined POSIX2008 +function int wcscasecmp(const wchar_t*, const wchar_t*) +function int wcscasecmp_l(const wchar_t*, const wchar_t*, locale_t) +#endif function {wchar_t*} wcscat (wchar_t*, const wchar_t*) function {wchar_t*} wcschr (const wchar_t*, wchar_t) function int wcscmp (const wchar_t*, const wchar_t*) function int wcscoll (const wchar_t*, const wchar_t*) +#if defined XOPEN2K8 || defined POSIX2008 +function int wcscoll_l (const wchar_t*, const wchar_t*, locale_t) +#endif function {wchar_t*} wcscpy (wchar_t*, const wchar_t*) function size_t wcscspn (const wchar_t*, const wchar_t*) +#if defined XOPEN2K8 || defined POSIX2008 +function {wchar_t*} wcsdup (const wchar_t*) +#endif function size_t wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*) function size_t wcslen (const wchar_t*) +#if defined XOPEN2K8 || defined POSIX2008 +function int wcsncasecmp (const wchar_t*, const wchar_t*, size_t) +function int wcsncasecmp_l (const wchar_t*, const wchar_t*, size_t, locale_t) +#endif function {wchar_t*} wcsncat (wchar_t*, const wchar_t*, size_t) function int wcsncmp (const wchar_t*, const wchar_t*, size_t) function {wchar_t*} wcsncpy (wchar_t*, const wchar_t*, size_t) +#if defined XOPEN2K8 || defined POSIX2008 +function size_t wcsnlen (const wchar_t*, size_t) +function size_t wcsnrtombs (char*, const wchar_t**, size_t, size_t, mbstate_t*) +#endif function {wchar_t*} wcspbrk (const wchar_t*, const wchar_t*) function {wchar_t*} wcsrchr (const wchar_t*, wchar_t) function size_t wcsrtombs (char*, const wchar_t**, size_t, mbstate_t*) @@ -68,11 +103,18 @@ function {wchar_t*} wcstok (wchar_t*, const wchar_t*, wchar_t**) function {long int} wcstol (const wchar_t*, wchar_t**, int) function {unsigned long int} wcstoul (const wchar_t*, wchar_t**, int) function {wchar_t*} wcswcs (const wchar_t*, const wchar_t*) +#if !defined ISO && !defined POSIX && !defined POSIX2008 function int wcswidth (const wchar_t*, size_t) +#endif function size_t wcsxfrm (wchar_t*, const wchar_t*, size_t) +#if defined XOPEN2K8 || defined POSIX2008 +function size_t wcsxfrm_l (wchar_t*, const wchar_t*, size_t, locale_t) +#endif function int wctob (wint_t) +#if !defined ISO && !defined POSIX && !defined POSIX2008 function wctype_t wctype (const char*) function int wcwidth (wchar_t) +#endif function {wchar_t*} wmemchr (const wchar_t*, wchar_t, size_t) function int wmemcmp (const wchar_t*, const wchar_t*, size_t) function {wchar_t*} wmemcpy (wchar_t*, const wchar_t*, size_t) diff --git a/conform/data/wctype.h-data b/conform/data/wctype.h-data index 230d7482a6..a3f8c54a85 100644 --- a/conform/data/wctype.h-data +++ b/conform/data/wctype.h-data @@ -1,6 +1,9 @@ type wint_t type wctrans_t type wctype_t +#if defined XOPEN2K8 || defined POSIX2008 +type locale_t +#endif function int iswalnum (wint_t) function int iswalpha (wint_t) @@ -19,6 +22,25 @@ function wint_t towlower (wint_t) function wint_t towupper (wint_t) function wctrans_t wctrans (const char*) function wctype_t wctype (const char*) +#if defined XOPEN2K8 || defined POSIX2008 +function int iswalnum_l (wint_t, locale_t) +function int iswalpha_l (wint_t, locale_t) +function int iswcntrl_l (wint_t, locale_t) +function int iswdigit_l (wint_t, locale_t) +function int iswgraph_l (wint_t, locale_t) +function int iswlower_l (wint_t, locale_t) +function int iswprint_l (wint_t, locale_t) +function int iswpunct_l (wint_t, locale_t) +function int iswspace_l (wint_t, locale_t) +function int iswupper_l (wint_t, locale_t) +function int iswxdigit_l (wint_t, locale_t) +function int iswctype_l (wint_t, wctype_t, locale_t) +function wint_t towctrans_l (wint_t, wctrans_t, locale_t) +function wint_t towlower_l (wint_t, locale_t) +function wint_t towupper_l (wint_t, locale_t) +function wctrans_t wctrans_l (const char*, locale_t) +function wctype_t wctype_l (const char*, locale_t) +#endif macro WEOF diff --git a/conform/data/wordexp.h-data b/conform/data/wordexp.h-data index bfa66e8f15..12eecbeee2 100644 --- a/conform/data/wordexp.h-data +++ b/conform/data/wordexp.h-data @@ -14,7 +14,9 @@ constant WRDE_UNDEF constant WRDE_BADCHAR constant WRDE_CMDSUB constant WRDE_NOSPACE +#if defined XOPEN2K8 || defined POSIX2008 constant WRDE_NOSYS +#endif constant WRDE_SYNTAX function int wordexp (const char*, wordexp_t*, int) |