From 3134156779108fe8b46e0f4cd60d837572faaa93 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 25 Feb 2012 23:18:39 -0500 Subject: First steps to get conformtest fully working --- conform/data/aio.h-data | 2 +- conform/data/arpa/inet.h-data | 2 +- conform/data/assert.h-data | 4 ++ conform/data/complex.h-data | 8 +++- conform/data/cpio.h-data | 2 +- conform/data/ctype.h-data | 2 +- conform/data/dirent.h-data | 2 +- conform/data/dlfcn.h-data | 2 +- conform/data/errno.h-data | 11 ++++-- conform/data/fcntl.h-data | 2 +- conform/data/float.h-data | 19 ++++++++++ conform/data/fmtmsg.h-data | 2 +- conform/data/fnmatch.h-data | 4 +- conform/data/ftw.h-data | 2 +- conform/data/glob.h-data | 2 +- conform/data/grp.h-data | 4 +- conform/data/iconv.h-data | 2 +- conform/data/inttypes.h-data | 2 + conform/data/langinfo.h-data | 2 +- conform/data/libgen.h-data | 2 +- conform/data/limits.h-data | 49 +++++++++++++++--------- conform/data/locale.h-data | 2 +- conform/data/math.h-data | 41 +++++++++++++------- conform/data/monetary.h-data | 2 +- conform/data/mqueue.h-data | 2 +- conform/data/ndbm.h-data | 2 +- conform/data/net/if.h-data | 2 +- conform/data/netdb.h-data | 2 +- conform/data/netinet/in.h-data | 2 +- conform/data/nl_types.h-data | 2 +- conform/data/poll.h-data | 2 +- conform/data/pthread.h-data | 28 ++++++++++++-- conform/data/pwd.h-data | 4 +- conform/data/regex.h-data | 4 +- conform/data/sched.h-data | 2 +- conform/data/search.h-data | 2 +- conform/data/semaphore.h-data | 4 +- conform/data/setjmp.h-data | 6 +-- conform/data/signal.h-data | 73 ++++++++++++++++++++++-------------- conform/data/spawn.h-data | 2 +- conform/data/stdarg.h-data | 3 ++ conform/data/stdio.h-data | 56 +++++++++++++++++++++------ conform/data/stdlib.h-data | 81 ++++++++++++++++++++++++++-------------- conform/data/string.h-data | 6 ++- conform/data/strings.h-data | 18 +++++---- conform/data/stropts.h-data | 2 + conform/data/sys/ipc.h-data | 2 +- conform/data/sys/mman.h-data | 2 + conform/data/sys/msg.h-data | 2 +- conform/data/sys/resource.h-data | 2 +- conform/data/sys/select.h-data | 2 +- conform/data/sys/sem.h-data | 2 +- conform/data/sys/shm.h-data | 2 +- conform/data/sys/socket.h-data | 2 +- conform/data/sys/stat.h-data | 2 +- conform/data/sys/statvfs.h-data | 2 + conform/data/sys/time.h-data | 2 +- conform/data/sys/timeb.h-data | 2 + conform/data/sys/times.h-data | 2 + conform/data/sys/types.h-data | 2 +- conform/data/sys/uio.h-data | 2 +- conform/data/sys/un.h-data | 2 +- conform/data/sys/utsname.h-data | 2 +- conform/data/sys/wait.h-data | 2 +- conform/data/syslog.h-data | 2 +- conform/data/tar.h-data | 2 +- conform/data/termios.h-data | 8 ++-- conform/data/time.h-data | 80 +++++++++++++++++++++++---------------- conform/data/uchar.h-data | 12 ++++++ conform/data/ucontext.h-data | 2 + conform/data/ulimit.h-data | 2 +- conform/data/unistd.h-data | 2 +- conform/data/utime.h-data | 2 + conform/data/utmpx.h-data | 2 +- conform/data/varargs.h-data | 2 + conform/data/wchar.h-data | 70 ++++++++++++++++++---------------- conform/data/wctype.h-data | 10 +++-- conform/data/wordexp.h-data | 6 ++- 78 files changed, 470 insertions(+), 245 deletions(-) create mode 100644 conform/data/uchar.h-data (limited to 'conform/data') diff --git a/conform/data/aio.h-data b/conform/data/aio.h-data index 75698cb..b810014 100644 --- a/conform/data/aio.h-data +++ b/conform/data/aio.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 type {struct aiocb} // Test elements of the AIO control struct. diff --git a/conform/data/arpa/inet.h-data b/conform/data/arpa/inet.h-data index 98f5e0e..becee2f 100644 --- a/conform/data/arpa/inet.h-data +++ b/conform/data/arpa/inet.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX // in_port_t should have exactly 16 bits type in_port_t // in_addr_t should have exactly 32 bits diff --git a/conform/data/assert.h-data b/conform/data/assert.h-data index 1b11808..9c3cc04 100644 --- a/conform/data/assert.h-data +++ b/conform/data/assert.h-data @@ -1,3 +1,7 @@ macro assert +#ifdef ISO11 +macro static_assert +#endif + allow *_t diff --git a/conform/data/complex.h-data b/conform/data/complex.h-data index 006d6e4..8f31d22 100644 --- a/conform/data/complex.h-data +++ b/conform/data/complex.h-data @@ -1,4 +1,4 @@ -#if defined XOPEN2K || defined POSIX2008 +#if defined ISO99 || defined ISO11 || defined XOPEN2K || defined POSIX2008 macro complex macro _Complex_I optional-macro imaginary @@ -73,4 +73,10 @@ function {long double complex} csinl (long double complex) function {long double complex} csqrtl (long double complex) function {long double complex} ctanhl (long double complex) function {long double complex} ctanl (long double complex) + +# if defined ISO11 +macro-function {double complex} CMPLX (double, double) +macro-function {float complex} CMPLXF (float, float) +macro-function {long double complex} CMPLXL (long double, long double) +# endif #endif diff --git a/conform/data/cpio.h-data b/conform/data/cpio.h-data index c6f4d89..6e71319 100644 --- a/conform/data/cpio.h-data +++ b/conform/data/cpio.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 constant C_IRUSR 0000400 constant C_IWUSR 0000200 constant C_IXUSR 0000100 diff --git a/conform/data/ctype.h-data b/conform/data/ctype.h-data index 091d377..e2c6019 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) -#if !defined ISO && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function int isascii (int) function int toascii (int) diff --git a/conform/data/dirent.h-data b/conform/data/dirent.h-data index f1cd59c..be7ad06 100644 --- a/conform/data/dirent.h-data +++ b/conform/data/dirent.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 type DIR type {struct dirent} diff --git a/conform/data/dlfcn.h-data b/conform/data/dlfcn.h-data index 93e3354..59dd028 100644 --- a/conform/data/dlfcn.h-data +++ b/conform/data/dlfcn.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX macro RTLD_LAZY macro RTLD_NOW macro RTLD_GLOBAL diff --git a/conform/data/errno.h-data b/conform/data/errno.h-data index ffdf6b5..328687f 100644 --- a/conform/data/errno.h-data +++ b/conform/data/errno.h-data @@ -2,7 +2,10 @@ constant EDOM constant EILSEQ constant ERANGE -#ifndef ISO +// variable int errno +allow errno + +#if !defined ISO && !defined ISO99 && !defined ISO11 constant E2BIG constant EACCES constant EADDRINUSE @@ -84,9 +87,9 @@ constant ENOTRECOVERABLE constant EOWNERDEAD # endif -// variable int errno -allow errno - allow E* allow *_t #endif + +allow E[0123456789]* +allow E[ABCDEFGHIJKLMNOPQRSTUVWXYZ]* diff --git a/conform/data/fcntl.h-data b/conform/data/fcntl.h-data index 7769a44..54eed41 100644 --- a/conform/data/fcntl.h-data +++ b/conform/data/fcntl.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX constant F_DUPFD constant F_GETFD constant F_SETFD diff --git a/conform/data/float.h-data b/conform/data/float.h-data index 71a429b..49d953a 100644 --- a/conform/data/float.h-data +++ b/conform/data/float.h-data @@ -38,4 +38,23 @@ macro FLT_MIN macro DBL_MIN macro LDBL_MIN +#if !defined ISO && !defined XPG3 && !defined XPG4 && !defined POSIX && !defined UNIX98 +constant DECIMAL_DIG >= 10 +constant FLT_EVAL_METHOD +#endif + +#if defined ISO11 +constant DBL_HAS_SUBNORM +constant FLT_HAS_SUBNORM +constant LDBL_HAS_SUBNORM + +constant DBL_DECIMAL_DIG >= 10 +constant FLT_DECIMAL_DIG >= 6 +constant LDBL_DECIMAL_DIG >= 10 + +constant DBL_TRUE_MIN <= 1E-37 +constant FLT_TRUE_MIN <= 1E-37 +constant LDBL_TRUE_MIN <= 1E-37 +#endif + allow *_t diff --git a/conform/data/fmtmsg.h-data b/conform/data/fmtmsg.h-data index 67c35c1..d6d0ff1 100644 --- a/conform/data/fmtmsg.h-data +++ b/conform/data/fmtmsg.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !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 96591d6..12a9a4a 100644 --- a/conform/data/fnmatch.h-data +++ b/conform/data/fnmatch.h-data @@ -1,9 +1,9 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 constant FNM_NOMATCH constant FNM_PATHNAME constant FNM_PERIOD constant FNM_NOESCAPE -#if !defined XOPEN2K8 && !defined POSIX2008 +#if !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 constant FNM_NOSYS #endif diff --git a/conform/data/ftw.h-data b/conform/data/ftw.h-data index eb49924..0fa586a 100644 --- a/conform/data/ftw.h-data +++ b/conform/data/ftw.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !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 9f90f8b..23a5077 100644 --- a/conform/data/glob.h-data +++ b/conform/data/glob.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 type glob_t element glob_t size_t gl_pathc element glob_t {char**} gl_pathv diff --git a/conform/data/grp.h-data b/conform/data/grp.h-data index 1651950..384e1ad 100644 --- a/conform/data/grp.h-data +++ b/conform/data/grp.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 type {struct group} element {struct group} {char*} gr_name element {struct group} gid_t gr_gid @@ -13,9 +13,9 @@ type size_t function {struct group*} getgrgid (gid_t) function {struct group*} getgrnam (const char*) -# ifndef POSIX 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**) +# ifndef POSIX function {struct group*} getgrent (void) function void endgrent (void) # ifndef POSIX2008 diff --git a/conform/data/iconv.h-data b/conform/data/iconv.h-data index 7071d90..79fb2d6 100644 --- a/conform/data/iconv.h-data +++ b/conform/data/iconv.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX type iconv_t # if defined XOPEN2K8 || defined POSIX2008 type size_t diff --git a/conform/data/inttypes.h-data b/conform/data/inttypes.h-data index 17d2b97..d308a52 100644 --- a/conform/data/inttypes.h-data +++ b/conform/data/inttypes.h-data @@ -1,3 +1,4 @@ +#if defined ISO99 || defined ISO11 || defined XOPEN2K || defined POSIX2008 type int8_t type int16_t type int32_t @@ -141,3 +142,4 @@ allow INT* allow UINT* allow PRI[Xa-z]* allow SCN[Xa-z]* +#endif diff --git a/conform/data/langinfo.h-data b/conform/data/langinfo.h-data index 95bc3f9..51dd925 100644 --- a/conform/data/langinfo.h-data +++ b/conform/data/langinfo.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX constant CODESET constant D_T_FMT constant D_FMT diff --git a/conform/data/libgen.h-data b/conform/data/libgen.h-data index b749b8d..f59bbb0 100644 --- a/conform/data/libgen.h-data +++ b/conform/data/libgen.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !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 2e720a9..27ae77a 100644 --- a/conform/data/limits.h-data +++ b/conform/data/limits.h-data @@ -1,3 +1,31 @@ +constant CHAR_BIT >= 8 +constant SCHAR_MIN <= -127 +constant SCHAR_MAX >= 127 +constant UCHAR_MAX >= 255 +#ifdef __CHAR_UNSIGNED__ +constant CHAR_MIN 0 +constant CHAR_MAX UCHAR_MAX +#else +constant CHAR_MIN SCHAR_MIN +constant CHAR_MAX SCHAR_MAX +#endif +constant MB_LEN_MAX >= 1 +constant SHRT_MIN <= -32767 +constant SHRT_MAX >= 32767 +constant USHRT_MAX >= 65535 +constant INT_MAX >= 2147483647 +constant INT_MIN <= 2147483647 +constant UINT_MAX >= 4294967295 +constant LONG_MAX >= 2147483647 +constant LONG_MIN <= 2147483647 +constant ULONG_MAX >= 4294967295 +#if defined ISO99 || defined ISO11 || defined XOPEN2K8 || defined POSIX2008 +constant LLONG_MIN <= -9223372036854775807ll +constant LLONG_MAX >= 9223372036854775807ll +constant ULLONG_MAX >= 18446744073709551615ull +#endif + +#if !defined ISO && !defined ISO99 && !defined ISO11 // if these values exist, we should check the minimal value allow AIO_LIST_MAX allow AIO_MAX @@ -111,25 +139,11 @@ optional-constant _POSIX2_LINE_MAX 2048 optional-constant _POSIX2_RE_DUP_MAX 255 optional-constant _XOPEN_IOV_MAX 16 -constant CHAR_BIT >= 8 -constant CHAR_MAX -constant INT_MAX >= 2147483647 +#if !defined POSIX && !defined POSIX2008 +constant WORD_BIT >= 16 constant LONG_BIT >= 32 -constant MB_LEN_MAX >= 1 -constant LONG_MAX >= 2147483647 -constant SCHAR_MAX >= 127 -constant SHRT_MAX >= 32767 +#endif constant SSIZE_MAX -constant UCHAR_MAX >= 255 -constant UINT_MAX >= 4294967295 -constant ULONG_MAX >= 4294967295 -constant USHRT_MAX >= 65535 -constant WORD_BIT >= 16 -constant CHAR_MIN -constant INT_MIN <= 2147483647 -constant LONG_MIN <= 2147483647 -constant SCHAR_MIN <= -127 -constant SHRT_MIN <= -32767 optional-constant CHARCLASS_NAME_MAX >= 14 optional-constant NL_ARGMAX >= 9 @@ -149,3 +163,4 @@ optional-constant TMP_MAX >= 10000 allow *_MAX allow *_MIN +#endif diff --git a/conform/data/locale.h-data b/conform/data/locale.h-data index f6e6c22..8897ee0 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 -#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 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 diff --git a/conform/data/math.h-data b/conform/data/math.h-data index f55e632..5f1f11d 100644 --- a/conform/data/math.h-data +++ b/conform/data/math.h-data @@ -1,3 +1,5 @@ +constant HUGE_VAL + #if !defined ISO && !defined POSIX macro fpclassify macro isfinite @@ -12,7 +14,7 @@ macro islessequal macro islessgreater macro isunordered -# ifndef POSIX2008 +# if !defined ISO99 && !defined ISO11 && !defined POSIX2008 constant M_E constant M_LOG2E constant M_LOG10E @@ -29,7 +31,6 @@ constant M_SQRT1_2 constant MAXFLOAT # endif -constant HUGE_VAL constant HUGE_VALF constant HUGE_VALL constant INFINITY @@ -48,22 +49,28 @@ optional-macro FP_FAST_FMAL constant FP_ILOGB0 constant FP_ILOGBNAN +# if !defined XPG3 && !defined XPG4 && !defined UNIX98 macro MATH_ERRNO == 1 macro MATH_ERREXCEPT == 2 -#endif macro math_errhandling +# endif +#endif function double acos (double) function double asin (double) function double atan (double) function double atan2 (double, double) function double ceil (double) +#if !defined ISO && !defined POSIX function double copysign (double, double) +#endif function double cos (double) function double cosh (double) function double exp (double) +#if !defined ISO && !defined POSIX function double exp2 (double) +#endif function double fabs (double) function double floor (double) function double fmod (double, double) @@ -71,7 +78,9 @@ function double frexp (double, int*) function double ldexp (double, int) function double log (double) function double log10 (double) +#if !defined ISO && !defined POSIX function double log2 (double) +#endif function double modf (double, double*) function double pow (double, double) function double sin (double) @@ -79,24 +88,27 @@ function double sinh (double) function double sqrt (double) function double tan (double) function double tanh (double) +#if !defined ISO && !defined POSIX function double erf (double) function double erfc (double) +#endif #if defined XPG3 || defined XPG4 || defined UNIX98 function double gamma (double) #endif +#if !defined ISO && !defined POSIX function double hypot (double, double) -#if !defined POSIX && !defined POSIX2008 +# if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function double j0 (double) function double j1 (double) function double jn (int, double) -#endif +# endif function double lgamma (double) function double tgamma (double) -#if !defined POSIX && !defined POSIX2008 +# if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function double y0 (double) function double y1 (double) function double yn (int, double) -#endif +# endif function double acosh (double) function double asinh (double) function double atanh (double) @@ -117,9 +129,9 @@ function {long long} llrint (double) function long lround (double) function {long long} llround (double) function double remquo (double, double, int*) -#if defined XPG3 && defined XPG4 && defined UNIX98 && defined XOPEN2K +# if defined XPG3 && defined XPG4 && defined UNIX98 && defined XOPEN2K function double scalb (double, double) -#endif +# endif function double scalbn (double, int) function double scalbln (double, long) function double fdim (double, double) @@ -128,9 +140,10 @@ function double fmin (double, double) function double fma (double, double, double) function double nan (const char*) -#if !defined POSIX && !defined POSIX2008 +# if !defined POSIX && !defined POSIX2008 // variable signgam allow signgam +# endif #endif #if !defined ISO && !defined POSIX @@ -165,14 +178,14 @@ function float erfcf (float) function float gammaf (float) #endif function float hypotf (float, float) -#if !defined POSIX && !defined POSIX2008 +#if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function float j0f (float) function float j1f (float) function float jnf (int, float) #endif function float lgammaf (float) function float tgammaf (float) -#if !defined POSIX && !defined POSIX2008 +#if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function float y0f (float) function float y1f (float) function float ynf (int, float) @@ -239,14 +252,14 @@ function {long double} erfcl (long double) function {long double} gammal (long double) #endif function {long double} hypotl (long double, long double) -#if !defined POSIX && !defined POSIX2008 +#if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function {long double} j0l (long double) function {long double} j1l (long double) function {long double} jnl (int, long double) #endif function {long double} lgammal (long double) function {long double} tgammal (long double) -#if !defined POSIX && !defined POSIX2008 +#if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function {long double} y0l (long double) function {long double} y1l (long double) function {long double} ynl (int, long double) diff --git a/conform/data/monetary.h-data b/conform/data/monetary.h-data index 7935f2a..4f0cb9b 100644 --- a/conform/data/monetary.h-data +++ b/conform/data/monetary.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX type size_t type ssize_t # if defined XOPEN2K8 || defined POSIX2008 diff --git a/conform/data/mqueue.h-data b/conform/data/mqueue.h-data index 16335a5..d6313b3 100644 --- a/conform/data/mqueue.h-data +++ b/conform/data/mqueue.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 // should test for not an array type. type mqd_t diff --git a/conform/data/ndbm.h-data b/conform/data/ndbm.h-data index af091de..5d1fc6a 100644 --- a/conform/data/ndbm.h-data +++ b/conform/data/ndbm.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 type datum element datum {void*} dptr element datum size_t dsize diff --git a/conform/data/net/if.h-data b/conform/data/net/if.h-data index d019978..2c3eb4d 100644 --- a/conform/data/net/if.h-data +++ b/conform/data/net/if.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX type {struct if_nameindex} element {struct if_nameindex} {unsigned int} if_index diff --git a/conform/data/netdb.h-data b/conform/data/netdb.h-data index 95afed8..a73004c 100644 --- a/conform/data/netdb.h-data +++ b/conform/data/netdb.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX optional-type in_port_t optional-type in_addr_t diff --git a/conform/data/netinet/in.h-data b/conform/data/netinet/in.h-data index 391e1a5..020a97e 100644 --- a/conform/data/netinet/in.h-data +++ b/conform/data/netinet/in.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX type in_port_t type in_addr_t diff --git a/conform/data/nl_types.h-data b/conform/data/nl_types.h-data index ec2c18b..67a0d7a 100644 --- a/conform/data/nl_types.h-data +++ b/conform/data/nl_types.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX type nl_catd type nl_item diff --git a/conform/data/poll.h-data b/conform/data/poll.h-data index 69fd724..395e4b5 100644 --- a/conform/data/poll.h-data +++ b/conform/data/poll.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX type {struct pollfd} element {struct pollfd} int fd element {struct pollfd} {short int} events diff --git a/conform/data/pthread.h-data b/conform/data/pthread.h-data index 70486cc..bf25902 100644 --- a/conform/data/pthread.h-data +++ b/conform/data/pthread.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 constant PTHREAD_CANCEL_ASYNCHRONOUS constant PTHREAD_CANCEL_ENABLE constant PTHREAD_CANCEL_DEFERRED @@ -31,19 +31,27 @@ constant PTHREAD_MUTEX_STALLED # endif type pthread_attr_t +# if !defined POSIX type pthread_barrier_t type pthread_barrierattr_t +# endif type pthread_cond_t type pthread_condattr_t type pthread_key_t type pthread_mutex_t type pthread_mutexattr_t type pthread_once_t +# if !defined POSIX type pthread_rwlock_t type pthread_rwlockattr_t type pthread_spinlock_t +# endif type pthread_t +#ifdef POSIX +# define sigset_t __sigset_t +#endif + function int pthread_attr_destroy (pthread_attr_t*) function int pthread_attr_getdetachstate (const pthread_attr_t*, int*) # ifndef POSIX @@ -66,6 +74,7 @@ function int pthread_attr_setschedpolicy (pthread_attr_t*, int) function int pthread_attr_setscope (pthread_attr_t*, int) function int pthread_attr_setstackaddr (pthread_attr_t*, void*) function int pthread_attr_setstacksize (pthread_attr_t*, size_t) +# if !defined POSIX function int pthread_barrier_destroy (pthread_barrier_t*) function int pthread_barrier_init (pthread_barrier_t*, const pthread_barrierattr_t*, unsigned int) function int pthread_barrier_wait (pthread_barrier_t*) @@ -73,6 +82,7 @@ function int pthread_barrierattr_destroy (pthread_barrierattr_t*) function int pthread_barrierattr_getpshared (const pthread_barrierattr_t*, int*) function int pthread_barrierattr_init (pthread_barrierattr_t*) function int pthread_barrierattr_setpshared (pthread_barrierattr_t*, int) +# endif function int pthread_cancel (pthread_t) // function int pthread_cleanup_push (void (*) (void*), void*) macro pthread_cleanup_push @@ -97,7 +107,9 @@ function void pthread_exit (void*) # if !defined POSIX && !defined POSIX2008 function int pthread_getconcurrency (void) # endif +# if !defined POSIX function int pthread_getcpuclockid (pthread_t, clockid_t*) +# endif function int pthread_getschedparam (pthread_t, int*, struct sched_param*) function {void*} pthread_getspecific (pthread_key_t) function int pthread_join (pthread_t, void**) @@ -108,21 +120,27 @@ optional-function int pthread_mutex_getprioceiling (const pthread_mutex_t*, int* function int pthread_mutex_init (pthread_mutex_t*, const pthread_mutexattr_t*) function int pthread_mutex_lock (pthread_mutex_t*) optional-function int pthread_mutex_setprioceiling (pthread_mutex_t*, int, int*) +# if !defined POSIX function int pthread_mutex_timedlock (pthread_mutex_t*, const struct timespec*) +# endif function int pthread_mutex_trylock (pthread_mutex_t*) function int pthread_mutex_unlock (pthread_mutex_t*) function int pthread_mutexattr_destroy (pthread_mutexattr_t*) optional-function int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t*, int*) optional-function int pthread_mutexattr_getprotocol (const pthread_mutexattr_t*, int*) function int pthread_mutexattr_getpshared (const pthread_mutexattr_t*, int*) +# if !defined POSIX function int pthread_mutexattr_gettype (const pthread_mutexattr_t*, int*) +# endif function int pthread_mutexattr_init (pthread_mutexattr_t*) optional-function int pthread_mutexattr_setprioceiling (pthread_mutexattr_t*, int) optional-function int pthread_mutexattr_setprotocol (pthread_mutexattr_t*, int) function int pthread_mutexattr_setpshared (pthread_mutexattr_t*, int) +# if !defined POSIX function int pthread_mutexattr_settype (pthread_mutexattr_t*, int) +# endif function int pthread_once (pthread_once_t*, void (*) (void)) -# ifndef POSIX +# if !defined POSIX function int pthread_rwlock_init (pthread_rwlock_t*, const pthread_rwlockattr_t*) function int pthread_rwlock_rdlock (pthread_rwlock_t*) function int pthread_rwlock_timedrdlock (pthread_rwlock_t*, const struct timespec*) @@ -144,14 +162,16 @@ 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*) -#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 +# if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 function int pthread_sigmask (int, const sigset_t*, sigset_t*) -#endif +# endif +# if !defined POSIX function int pthread_spin_destroy (pthread_spinlock_t*) function int pthread_spin_init (pthread_spinlock_t*, int) function int pthread_spin_lock (pthread_spinlock_t*) function int pthread_spin_trylock (pthread_spinlock_t*) function int pthread_spin_unlock (pthread_spinlock_t*) +# endif function void pthread_testcancel (void) # if defined XOPEN2K8 || defined POSIX2008 function int pthread_mutex_consistent (pthread_mutex_t *) diff --git a/conform/data/pwd.h-data b/conform/data/pwd.h-data index a8edf27..f779a69 100644 --- a/conform/data/pwd.h-data +++ b/conform/data/pwd.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 type {struct passwd} element {struct passwd} {char*} pw_name element {struct passwd} uid_t pw_uid @@ -18,7 +18,7 @@ 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 +# if !defined POSIX && !defined POSIX2008 function void endpwent (void) function {struct passwd*} getpwent (void) function void setpwent (void) diff --git a/conform/data/regex.h-data b/conform/data/regex.h-data index 73e06a8..2822f0b 100644 --- a/conform/data/regex.h-data +++ b/conform/data/regex.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 type regex_t element regex_t size_t re_nsub @@ -28,7 +28,7 @@ constant REG_EBRACE constant REG_BADBR constant REG_ESPACE constant REG_BADRPT -# if !defined XOPEN2K8 && !defined POSIX2008 +# if !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 constant REG_ENOSYS # endif diff --git a/conform/data/sched.h-data b/conform/data/sched.h-data index 5851450..78eb2e4 100644 --- a/conform/data/sched.h-data +++ b/conform/data/sched.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 type {struct sched_param} element {struct sched_param} int sched_priority optional-element {struct sched_param} int sched_ss_low_priority diff --git a/conform/data/search.h-data b/conform/data/search.h-data index dadb1ff..3abbc66 100644 --- a/conform/data/search.h-data +++ b/conform/data/search.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !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 5484884..9bb3d44 100644 --- a/conform/data/semaphore.h-data +++ b/conform/data/semaphore.h-data @@ -1,4 +1,4 @@ -#if !defined ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 type sem_t constant SEM_FAILED @@ -9,7 +9,9 @@ function int sem_getvalue (sem_t*, int*) function int sem_init (sem_t*, int, unsigned int) function {sem_t*} sem_open (const char*, int, ...) function int sem_post (sem_t*) +# if !defined POSIX function int sem_timedwait (sem_t*, const struct timespec*) +# endif function int sem_trywait (sem_t*) function int sem_unlink (const char*) function int sem_wait (sem_t*) diff --git a/conform/data/setjmp.h-data b/conform/data/setjmp.h-data index a89a33f..310105b 100644 --- a/conform/data/setjmp.h-data +++ b/conform/data/setjmp.h-data @@ -1,10 +1,10 @@ type jmp_buf -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 type sigjmp_buf #endif function void longjmp (jmp_buf, int) -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 function void siglongjmp (sigjmp_buf, int) # if !defined POSIX && !defined POSIX2008 function void _longjmp (jmp_buf, int) @@ -12,7 +12,7 @@ function void _longjmp (jmp_buf, int) #endif macro-function int setjmp (jmp_buf) -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 macro-function int sigsetjmp (sigjmp_buf, int) # if !defined POSIX && !defined POSIX2008 macro-function int _setjmp (jmp_buf) diff --git a/conform/data/signal.h-data b/conform/data/signal.h-data index 6dbf1fb..927211b 100644 --- a/conform/data/signal.h-data +++ b/conform/data/signal.h-data @@ -1,13 +1,15 @@ typed-constant SIG_DFL {void(*)(int)} typed-constant SIG_ERR {void(*)(int)} -#if !defined ISO && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 typed-constant SIG_HOLD {void(*)(int)} #endif typed-constant SIG_IGN {void(*)(int)} type sig_atomic_t +#if !defined ISO && !defined ISO99 && !defined ISO11 type sigset_t type pid_t +#endif #if defined XOPEN2K8 || defined POSIX2008 type size_t type pthread_t @@ -26,6 +28,7 @@ element {struct timespec} __time_t tv_sec element {struct timespec} long tv_nsec #endif +#if defined UNIX98 || defined XOPEN2K8 || defined POSIX2008 element {union sigval} int sival_int element {union sigval} {void*} sival_ptr @@ -46,19 +49,25 @@ type {union sigval} macro SIGRTMIN macro SIGRTMAX +#endif constant SIGABRT -constant SIGALRM constant SIGFPE -constant SIGHUP constant SIGILL constant SIGINT +constant SIGSEGV +constant SIGTERM + +function void (*signal (int, void(*)(int)))(int) +function int raise (int) + +#if !defined ISO && !defined ISO99 && !defined ISO11 +constant SIGALRM +constant SIGHUP constant SIGIO constant SIGKILL constant SIGPIPE constant SIGQUIT -constant SIGSEGV -constant SIGTERM constant SIGUSR1 constant SIGUSR2 constant SIGCHLD @@ -71,9 +80,9 @@ constant SIGBUS constant SIGPOLL constant SIGPROF constant SIGSYS -#if !defined POSIX && !defined POSIX2008 +# if !defined POSIX && !defined POSIX2008 constant SIGTRAP -#endif +# endif constant SIGURG constant SIGVTALRM constant SIGXCPU @@ -90,21 +99,24 @@ constant SA_NOCLDSTOP constant SIG_BLOCK constant SIG_UNBLOCK constant SIG_SETMASK -#if !defined POSIX && !defined POSIX2008 +# if !defined POSIX && !defined POSIX2008 constant SA_ONSTACK -#endif +# endif +# if !defined POSIX constant SA_RESETHAND constant SA_RESTART constant SA_SIGINFO constant SA_NOCLDWAIT constant SA_NODEFER -#if !defined POSIX && !defined POSIX2008 +# endif +# if !defined POSIX && !defined POSIX2008 constant SS_ONSTACK constant SS_DISABLE constant MINSIGSTKSZ constant SIGSTKSZ -#endif +# endif +# if !defined POSIX type ucontext_t element ucontext_t {ucontext_t*} uc_link @@ -122,13 +134,14 @@ type {struct sigstack} element {struct sigstack} int ss_onstack element {struct sigstack} {void*} ss_sp +# endif type siginfo_t element siginfo_t int si_signo -#if !defined POSIX && !defined POSIX2008 +# if !defined POSIX && !defined POSIX2008 element siginfo_t int si_errno -#endif +# endif element siginfo_t int si_code element siginfo_t pid_t si_pid element siginfo_t uid_t si_uid @@ -178,50 +191,50 @@ constant SI_TIMER constant SI_ASYNCIO constant SI_MESGQ -#if !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008 +# if !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008 function void (*bsd_signal (int, void(*)(int)))(int) -#endif +# endif function int kill (pid_t, int) -#if !defined POSIX && !defined POSIX2008 +# if !defined POSIX && !defined POSIX2008 function int killpg (pid_t, int) -#endif +# 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 +# if !defined POSIX && !defined POSIX2008 function int sigaltstack (const stack_t*, stack_t*) -#endif +# endif function int sigdelset (sigset_t*, int) function int sigemptyset (sigset_t*) function int sigfillset (sigset_t*) -#if !defined POSIX && !defined POSIX2008 +# if !defined POSIX && !defined POSIX2008 function int sighold (int) function int sigignore (int) function int siginterrupt (int, int) -#endif +# 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 +# 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 +# if !defined POSIX && !defined POSIX2008 function int sigrelse (int) function void (*sigset (int, void(*)(int)))(int) -#endif +# endif +# if !defined POSIX function int sigstack (struct sigstack*, struct sigstack*) +# endif 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 +# if defined XOPEN2K8 || defined POSIX2008 function void psiginfo (const siginfo_t*, const char*) function void psignal (int, const char*) -#endif +# endif // The following expressions are not entirely correct but the current // poorfnmatch implementation doesn't grok the right form. @@ -248,3 +261,7 @@ allow TRAP_* allow *_t allow-header time.h +#endif + +allow SIG[ABCDEFGHIJKLMNOPQRSTUVWXYZ]* +allow SIG_* diff --git a/conform/data/spawn.h-data b/conform/data/spawn.h-data index 81f32d0..889b5bc 100644 --- a/conform/data/spawn.h-data +++ b/conform/data/spawn.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 type posix_spawnattr_t type posix_spawn_file_actions_t # if defined XOPEN2K8 || defined POSIX2008 diff --git a/conform/data/stdarg.h-data b/conform/data/stdarg.h-data index ee228d0..a9b5d65 100644 --- a/conform/data/stdarg.h-data +++ b/conform/data/stdarg.h-data @@ -4,6 +4,9 @@ type va_list macro va_start macro va_arg macro va_end + +#if defined ISO99 || defined ISO11 || defined POSIX2008 || defined XOPEN2K8 macro va_copy +#endif allow *_t diff --git a/conform/data/stdio.h-data b/conform/data/stdio.h-data index cba7721..ac2dfc4 100644 --- a/conform/data/stdio.h-data +++ b/conform/data/stdio.h-data @@ -6,9 +6,11 @@ constant _IOFBF constant _IOLBF constant _IONBF +#if !defined ISO && !defined ISO99 && !defined ISO11 constant L_ctermid -#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 +# if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 constant L_cuserid +# endif #endif constant L_tmpnam @@ -22,7 +24,7 @@ constant EOF constant NULL -#if !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 constant P_tmpdir #endif @@ -32,7 +34,11 @@ macro stderr type FILE type fpos_t +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX type va_list +#else +#define va_list _G_va_list +#endif type size_t #if defined XOPEN2K8 || defined POSIX2008 type off_t @@ -40,23 +46,31 @@ type ssize_t #endif function void clearerr (FILE*) +#if !defined ISO && !defined ISO99 && !defined ISO11 function {char*} ctermid (char*) -#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 +# if defined XPG3 || defined XPG4 || defined UNIX98 function {char*} cuserid (char*) +# endif #endif #if defined XOPEN2K8 || defined POSIX2008 function int dprintf (int, const char*, ...) #endif function int fclose (FILE*) +#if defined XOPEN2K8 || defined POSIX2008 function {FILE*} fdopen (int, const char*) +#endif function int feof (FILE*) function int ferror (FILE*) function int fflush (FILE*) function int fgetc (FILE*) function int fgetpos (FILE*, fpos_t*) function {char*} fgets (char*, int, FILE*) +#if !defined ISO && !defined ISO99 && !defined ISO11 function int fileno (FILE*) +#endif +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function void flockfile (FILE*) +#endif #if defined XOPEN2K8 || defined POSIX2008 function {FILE*} fmemopen (void*, size_t, const char*) #endif @@ -68,41 +82,57 @@ function size_t fread (void*, size_t, size_t, FILE*) function {FILE*} freopen (const char*, const char*, FILE*) function int fscanf (FILE*, const char*, ...) function int fseek (FILE*, long int, int) +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int fseeko (FILE*, off_t, int) +#endif function int fsetpos (FILE*, const fpos_t*) function {long int} ftell (FILE*) +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function off_t ftello (FILE*) +#endif +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int ftrylockfile (FILE*) function void funlockfile (FILE*) +#endif function size_t fwrite (const void*, size_t, size_t, FILE*) function int getc (FILE*) function int getchar (void) +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int getc_unlocked (FILE*) function int getchar_unlocked () +#endif #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 +#if defined XPG3 || defined XPG4 || defined UNIX98 function int getopt (int, char *const[], const char *) #endif +#if !defined ISO11 function {char*} gets (char*) -#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 +#endif +#if defined XPG3 || defined XPG4 || defined UNIX98 function int getw (FILE*) #endif #if defined XOPEN2K8 || defined POSIX2008 function {FILE*} open_memstream (char**, size_t*) #endif +#if !defined ISO && !defined ISO99 && !defined ISO11 function int pclose (FILE*) +#endif function void perror (const char*) +#if !defined ISO && !defined ISO99 && !defined ISO11 function {FILE*} popen (const char*, const char*) +#endif function int printf (const char*, ...) function int putc (int, FILE*) function int putchar (int) +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int putc_unlocked (int, FILE*) function int putchar_unlocked (int) +#endif function int puts (const char*) -#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 +#if defined XPG3 || defined XPG4 || defined UNIX98 function int putw (int, FILE*) #endif function int remove (const char*) @@ -114,10 +144,12 @@ function void rewind (FILE*) function int scanf (const char*, ...) function void setbuf (FILE*, char*) function int setvbuf (FILE*, char*, int, size_t) +#if !defined ISO && !defined POSIX function int snprintf (char*, size_t, const char*, ...) +#endif function int sprintf (char *, const char *, ...) function int sscanf (const char*, const char*, ...) -#if !defined POSIX && !defined POSIX2008 +#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 function {char*} tempnam (const char*, const char*) #endif function {FILE*} tmpfile (void) @@ -127,20 +159,22 @@ function int ungetc (int, FILE*) function int vdprintf (int, const char*, va_list) #endif function int vfprintf (FILE*, const char*, va_list) -#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +#if !defined ISO && !defined XPG3 && !defined XPG4 && !defined UNIX98 function int vfscanf (FILE*, const char*, va_list) #endif function int vprintf (const char*, va_list) -#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +#if !defined ISO && !defined XPG3 && !defined XPG4 && !defined UNIX98 function int vscanf (const char*, va_list) #endif +#ifndef ISO function int vsnprintf (char*, size_t, const char*, va_list) +#endif function int vsprintf (char*, const char*, va_list) -#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +#if !defined ISO && !defined XPG3 && !defined XPG4 && !defined UNIX98 function int vsscanf (const char*, const char*, va_list) #endif -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX #if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 variable {char*} optarg variable int opterr diff --git a/conform/data/stdlib.h-data b/conform/data/stdlib.h-data index 760b5b3..e6abfed 100644 --- a/conform/data/stdlib.h-data +++ b/conform/data/stdlib.h-data @@ -1,15 +1,17 @@ -macro EXIT_FAILURE -constant EXIT_SUCCESS 0 -macro NULL -constant RAND_MAX >= 32767 -macro MB_CUR_MAX - type div_t element div_t int quot element div_t int rem type ldiv_t element ldiv_t long quot element ldiv_t long rem + +macro EXIT_FAILURE +macro EXIT_SUCCESS 0 + +macro NULL +constant RAND_MAX >= 32767 +macro MB_CUR_MAX + #if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 type lldiv_t element lldiv_t {long long} quot @@ -18,6 +20,7 @@ element lldiv_t {long long} rem type size_t type wchar_t +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX constant WNOHANG constant WUNTRACED @@ -27,58 +30,69 @@ macro WIFSIGNALED macro WIFSTOPPED macro WSTOPSIG macro WTERMSIG +#endif +#if !defined ISO && !defined XPG3 && !defined XPG4 && !defined UNIX98 && !defined POSIX function void _Exit (int) -#if !defined POSIX && !defined POSIX2008 +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function long a64l (const char*) #endif function void abort (void) function int abs (int) +#if defined ISO11 +function {void *} aligned_alloc (size_t, size_t) +#endif function int atexit (void(*)(void)) +#if defined ISO11 +function int at_quick_exit (void (*) (void)) +#endif function double atof (const char*) function int atoi (const char*) function {long int} atol (const char*) -#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 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 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function double drand48 (void) #endif -#if !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 +#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K function {char*} ecvt (double, int, int*, int*) #endif -#if !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function double erand48 (unsigned short int[3]) #endif function void exit (int) -#if !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 +#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K function {char*} fcvt (double, int, int*, int*) #endif function void free (void*) -#if !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 +#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K function {char*} gcvt (double, int, char*) #endif function {char*} getenv (const char*) +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX function int getsubopt (char**, char *const*, char**) -#if !defined POSIX && !defined POSIX2008 +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !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 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function void lcong48 (unsigned short int[7]) #endif function ldiv_t ldiv (long int, long int) -#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98 function {long long} llabs (long long) function lldiv_t lldiv (long long, long long) #endif -#if !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function {long int} lrand48 (void) #endif function {void*} malloc (size_t) @@ -88,40 +102,51 @@ function int mbtowc (wchar_t*, const char*, size_t) #if defined XOPEN2K8 || defined POSIX2008 function {char*} mkdtemp (char*) #endif -#if !defined XOPEN2K8 && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 function {char*} mktemp (char*) #endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX function int mkstemp (char*) -#if !defined POSIX && !defined POSIX2008 +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function {long int} mrand48 (void) function {long int} nrand48 (unsigned short int[3]) #endif +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int posix_memalign (void**, size_t, size_t) +#endif #if defined XOPEN2K || defined XOPEN2K8 function int posix_openpt (int) #endif -#if !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !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*)) +#if defined ISO11 +function void quick_exit (int) +#endif function int rand (void) +#if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int rand_r (unsigned int*) -#if !defined POSIX && !defined POSIX2008 +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function long random (void) #endif function {void*} realloc (void*, size_t) -#if !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function {char*} realpath (const char*, char*) function {unsigned short int*} seed48 (unsigned short int[3]) #endif +#if !defined ISO && !defined ISO99 && !defined ISO11 function int setenv (const char*, const char*, int) -#if !defined POSIX && !defined POSIX2008 +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function void setkey (const char*) function {char*} setstate (char*) #endif function void srand (unsigned int) -#if !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function void srand48 (long int) function void srandom (unsigned) #endif @@ -129,14 +154,16 @@ 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*) -#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 +#if defined XPG3 || defined XPG4 || defined UNIX98 function int ttyslot (void) #endif -#if !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 function int unlockpt (int) #endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX function int unsetenv (const char*) -#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008 +#endif +#if defined XPG3 || defined XPG4 || defined UNIX98 function {void*} valloc (size_t) #endif function size_t wcstombs (char*, const wchar_t*, size_t) diff --git a/conform/data/string.h-data b/conform/data/string.h-data index 1c4ae08..0403c2e 100644 --- a/conform/data/string.h-data +++ b/conform/data/string.h-data @@ -5,7 +5,7 @@ type size_t type locale_t #endif -#if !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined POSIX && !defined POSIX2008 function {void*} memccpy (void*, const void*, int, size_t) #endif function {void*} memchr (const void*, int, size_t) @@ -27,7 +27,9 @@ 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*) +#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined POSIX && !defined POSIX2008 function {char*} strdup (const char*) +#endif function {char*} strerror (int) #if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function int strerror_r (int, char*, size_t) @@ -51,7 +53,9 @@ function {char*} strsignal (int) function size_t strspn (const char*, const char*) function {char*} strstr (const char*, const char*) function {char*} strtok (char*, const char*) +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 function {char*} strtok_r (char*, const char*, char**) +#endif 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) diff --git a/conform/data/strings.h-data b/conform/data/strings.h-data index 01cd867..b61ac50 100644 --- a/conform/data/strings.h-data +++ b/conform/data/strings.h-data @@ -1,23 +1,25 @@ -#if !defined XOPEN2K8 && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +# if !defined XOPEN2K8 && !defined POSIX2008 function int bcmp (const void*, const void*, size_t) function void bcopy (const void*, void*, size_t) function void bzero (void*, size_t) function {char*} index (const char*, int) function {char*} rindex (const char*, int) -#endif -#if !defined POSIX && !defined POSIX2008 +# endif +# if !defined POSIX2008 function int ffs (int) -#endif +# endif function int strcasecmp (const char*, const char*) function int strncasecmp (const char*, const char*, size_t) -#if defined XOPEN2K8 || defined POSIX2008 +# 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 +# endif type size_t -#if defined XOPEN2K8 || defined POSIX2008 +# if defined XOPEN2K8 || defined POSIX2008 type locale_t -#endif +# endif allow *_t +#endif diff --git a/conform/data/stropts.h-data b/conform/data/stropts.h-data index c760282..882f916 100644 --- a/conform/data/stropts.h-data +++ b/conform/data/stropts.h-data @@ -1,3 +1,4 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 type {struct bandinfo} element {struct bandinfo} {unsigned char} bi_pri @@ -135,3 +136,4 @@ allow S_* allow SND* allow STR* allow *_t +#endif diff --git a/conform/data/sys/ipc.h-data b/conform/data/sys/ipc.h-data index 28918c1..8f06d2b 100644 --- a/conform/data/sys/ipc.h-data +++ b/conform/data/sys/ipc.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 type {struct ipc_perm} element {struct ipc_perm} uid_t uid diff --git a/conform/data/sys/mman.h-data b/conform/data/sys/mman.h-data index c737efb..3392ad1 100644 --- a/conform/data/sys/mman.h-data +++ b/conform/data/sys/mman.h-data @@ -1,3 +1,4 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 constant PROT_READ constant PROT_WRITE constant PROT_EXEC @@ -54,3 +55,4 @@ allow MCL_* allow MS_* allow PROT_* allow *_t +#endif diff --git a/conform/data/sys/msg.h-data b/conform/data/sys/msg.h-data index ae83356..a8290ca 100644 --- a/conform/data/sys/msg.h-data +++ b/conform/data/sys/msg.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 type {struct msqid_ds} type msgqnum_t diff --git a/conform/data/sys/resource.h-data b/conform/data/sys/resource.h-data index 52f83f5..67517ad 100644 --- a/conform/data/sys/resource.h-data +++ b/conform/data/sys/resource.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 constant PRIO_PROCESS constant PRIO_PGRP constant PRIO_USER diff --git a/conform/data/sys/select.h-data b/conform/data/sys/select.h-data index ea890d6..84e07e9 100644 --- a/conform/data/sys/select.h-data +++ b/conform/data/sys/select.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX type time_t type suseconds_t diff --git a/conform/data/sys/sem.h-data b/conform/data/sys/sem.h-data index 665b397..61eecf2 100644 --- a/conform/data/sys/sem.h-data +++ b/conform/data/sys/sem.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 constant SEM_UNDO constant GETNCNT diff --git a/conform/data/sys/shm.h-data b/conform/data/sys/shm.h-data index 39df894..a006cdb 100644 --- a/conform/data/sys/shm.h-data +++ b/conform/data/sys/shm.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 constant SHM_RDONLY symbol SHMLBA constant SHM_RND diff --git a/conform/data/sys/socket.h-data b/conform/data/sys/socket.h-data index 5fdd6cf..60d8b00 100644 --- a/conform/data/sys/socket.h-data +++ b/conform/data/sys/socket.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX type socklen_t type sa_family_t diff --git a/conform/data/sys/stat.h-data b/conform/data/sys/stat.h-data index b0e10a4..547f607 100644 --- a/conform/data/sys/stat.h-data +++ b/conform/data/sys/stat.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 type {struct stat} diff --git a/conform/data/sys/statvfs.h-data b/conform/data/sys/statvfs.h-data index d7312cd..750f22b 100644 --- a/conform/data/sys/statvfs.h-data +++ b/conform/data/sys/statvfs.h-data @@ -1,3 +1,4 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX type {struct statvfs} element {struct statvfs} {unsigned long} f_bsize @@ -24,3 +25,4 @@ function int fstatvfs (int, struct statvfs*) allow f_* allow ST_* allow *_t +#endif diff --git a/conform/data/sys/time.h-data b/conform/data/sys/time.h-data index 7e3407a..98e5909 100644 --- a/conform/data/sys/time.h-data +++ b/conform/data/sys/time.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 type {struct timeval} element {struct timeval} time_t tv_sec diff --git a/conform/data/sys/timeb.h-data b/conform/data/sys/timeb.h-data index d012f5d..460da6e 100644 --- a/conform/data/sys/timeb.h-data +++ b/conform/data/sys/timeb.h-data @@ -1,3 +1,4 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX type {struct timeb} element {struct timeb} time_t time @@ -10,3 +11,4 @@ type time_t function int ftime (struct timeb*) allow *_t +#endif diff --git a/conform/data/sys/times.h-data b/conform/data/sys/times.h-data index 9c3237e..d10444d 100644 --- a/conform/data/sys/times.h-data +++ b/conform/data/sys/times.h-data @@ -1,3 +1,4 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX type {struct tms} element {struct tms} clock_t tms_utime @@ -11,3 +12,4 @@ function clock_t times (struct tms*) allow tms_* allow *_t +#endif diff --git a/conform/data/sys/types.h-data b/conform/data/sys/types.h-data index 4070be5..2befff5 100644 --- a/conform/data/sys/types.h-data +++ b/conform/data/sys/types.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 type blkcnt_t type blksize_t type clock_t diff --git a/conform/data/sys/uio.h-data b/conform/data/sys/uio.h-data index 03d0a3b..3352695 100644 --- a/conform/data/sys/uio.h-data +++ b/conform/data/sys/uio.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX type {struct iovec} element {struct iovec} {void*} iov_base diff --git a/conform/data/sys/un.h-data b/conform/data/sys/un.h-data index bb976f2..ee157ed 100644 --- a/conform/data/sys/un.h-data +++ b/conform/data/sys/un.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX type {struct sockaddr_un} element {struct sockaddr_un} sa_family_t sun_family diff --git a/conform/data/sys/utsname.h-data b/conform/data/sys/utsname.h-data index 680b666..3564627 100644 --- a/conform/data/sys/utsname.h-data +++ b/conform/data/sys/utsname.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 type {struct utsname} element {struct utsname} char sysname [] diff --git a/conform/data/sys/wait.h-data b/conform/data/sys/wait.h-data index 2fd4c8d..56dea06 100644 --- a/conform/data/sys/wait.h-data +++ b/conform/data/sys/wait.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 constant WNOHANG constant WUNTRACED diff --git a/conform/data/syslog.h-data b/conform/data/syslog.h-data index f0aa65c..26fef76 100644 --- a/conform/data/syslog.h-data +++ b/conform/data/syslog.h-data @@ -1,4 +1,4 @@ -#if !defined ISO && !defined POSIX && !defined POSIX2008 +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 constant LOG_PID constant LOG_CONS constant LOG_NDELAY diff --git a/conform/data/tar.h-data b/conform/data/tar.h-data index fcbfb12..aa0cebc 100644 --- a/conform/data/tar.h-data +++ b/conform/data/tar.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 macro-str TMAGIC "ustar" constant TMAGLEN 6 macro-str TVERSION "00" diff --git a/conform/data/termios.h-data b/conform/data/termios.h-data index d32bd6b..3f7ab4b 100644 --- a/conform/data/termios.h-data +++ b/conform/data/termios.h-data @@ -1,4 +1,4 @@ -#ifndef ISO +#if !defined ISO && !defined ISO99 && !defined ISO11 type cc_t type speed_t type tcflag_t @@ -39,7 +39,7 @@ constant INPCK constant ISTRIP # if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 constant IUCLC -#