diff options
Diffstat (limited to 'REORG.TODO/conform/data')
87 files changed, 6008 insertions, 0 deletions
diff --git a/REORG.TODO/conform/data/aio.h-data b/REORG.TODO/conform/data/aio.h-data new file mode 100644 index 0000000000..adb291b6e1 --- /dev/null +++ b/REORG.TODO/conform/data/aio.h-data @@ -0,0 +1,43 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42 +type {struct aiocb} + +// Test elements of the AIO control struct. +element {struct aiocb} int aio_fildes +element {struct aiocb} off_t aio_offset +element {struct aiocb} {volatile void*} aio_buf +element {struct aiocb} size_t aio_nbytes +element {struct aiocb} int aio_reqprio +element {struct aiocb} {struct sigevent} aio_sigevent +element {struct aiocb} int aio_lio_opcode + +constant AIO_CANCELED +constant AIO_NOTCANCELED +constant AIO_ALLDONE +constant LIO_WAIT +constant LIO_NOWAIT +constant LIO_READ +constant LIO_WRITE +constant LIO_NOP + +function int aio_cancel (int, struct aiocb*) +function int aio_error (const struct aiocb*) +function int aio_fsync (int, struct aiocb*) +function int aio_read (struct aiocb*) +function ssize_t aio_return (struct aiocb*) +function int aio_suspend (const struct aiocb* const[], int, const struct timespec*) +function int aio_write (struct aiocb*) +function int lio_listio (int, struct aiocb *const[], int, struct sigevent*) + +// POSIX in theory doesn't allow the header to be self contained but +// this was fixed later and we do not test for this here. +allow-header fcntl.h +allow-header signal.h +allow-header sys/types.h +allow-header time.h + +allow aio_* +allow lio_* +allow AIO_* +allow LIO_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/arpa/inet.h-data b/REORG.TODO/conform/data/arpa/inet.h-data new file mode 100644 index 0000000000..d4ab6bb72a --- /dev/null +++ b/REORG.TODO/conform/data/arpa/inet.h-data @@ -0,0 +1,31 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 +// in_port_t should have exactly 16 bits +type in_port_t +// in_addr_t should have exactly 32 bits +type in_addr_t + +type uint32_t +type uint16_t + +macro INET_ADDRSTRLEN +macro INET6_ADDRSTRLEN + +// The following can be declared as functions, defined as macros or both: +function uint32_t htonl (uint32_t); +function uint16_t htons (uint16_t); +function uint32_t ntohl (uint32_t); +function uint16_t htons (uint16_t); + +function in_addr_t inet_addr (const char*); +function in_addr_t inet_lnaof (struct in_addr); +function {struct in_addr} inet_makeaddr (in_addr_t, in_addr_t); +function in_addr_t inet_netof (struct in_addr); +function in_addr_t inet_network (const char *); +function {char*} inet_ntoa (struct in_addr); +function {const char*} inet_ntop (int, const void*, char*, socklen_t); +function int inet_pton (int, const char*, void*); + +allow-header netinet/in.h +allow-header inttypes.h + +#endif diff --git a/REORG.TODO/conform/data/assert.h-data b/REORG.TODO/conform/data/assert.h-data new file mode 100644 index 0000000000..acdfef99e1 --- /dev/null +++ b/REORG.TODO/conform/data/assert.h-data @@ -0,0 +1,9 @@ +macro assert + +#ifdef ISO11 +macro static_assert +#endif + +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow *_t +#endif diff --git a/REORG.TODO/conform/data/complex.h-data b/REORG.TODO/conform/data/complex.h-data new file mode 100644 index 0000000000..4af7757bd7 --- /dev/null +++ b/REORG.TODO/conform/data/complex.h-data @@ -0,0 +1,113 @@ +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +macro complex +macro _Complex_I +optional-macro imaginary +optional-macro _Imaginary_I +macro I + +function double cabs (double complex) +function {double complex} cacos (double complex) +function {double complex} cacosh (double complex) +function double carg (double complex) +function {double complex} casin (double complex) +function {double complex} casinh (double complex) +function {double complex} catan (double complex) +function {double complex} catanh (double complex) +function {double complex} ccos (double complex) +function {double complex} ccosh (double complex) +function {double complex} cexp (double complex) +function double cimag (double complex) +function {double complex} clog (double complex) +function {double complex} conj (double complex) +function {double complex} cpow (double complex, double complex) +function {double complex} cproj (double complex) +function double creal (double complex) +function {double complex} csin (double complex) +function {double complex} csinh (double complex) +function {double complex} csqrt (double complex) +function {double complex} ctan (double complex) +function {double complex} ctanh (double complex) + +function float cabsf (float complex) +function {float complex} cacosf (float complex) +function {float complex} cacoshf (float complex) +function float cargf (float complex) +function {float complex} casinf (float complex) +function {float complex} casinhf (float complex) +function {float complex} catanf (float complex) +function {float complex} catanhf (float complex) +function {float complex} ccosf (float complex) +function {float complex} ccoshf (float complex) +function {float complex} cexpf (float complex) +function float cimagf (float complex) +function {float complex} clogf (float complex) +function {float complex} conjf (float complex) +function {float complex} cpowf (float complex, float complex) +function {float complex} cprojf (float complex) +function float crealf (float complex) +function {float complex} csinf (float complex) +function {float complex} csinhf (float complex) +function {float complex} csqrtf (float complex) +function {float complex} ctanf (float complex) +function {float complex} ctanhf (float complex) + +function {long double} cabsl (long double complex) +function {long double complex} cacosl (long double complex) +function {long double complex} cacoshl (long double complex) +function {long double} cargl (long double complex) +function {long double complex} casinhl (long double complex) +function {long double complex} casinl (long double complex) +function {long double complex} catanhl (long double complex) +function {long double complex} catanl (long double complex) +function {long double complex} ccoshl (long double complex) +function {long double complex} ccosl (long double complex) +function {long double complex} cexpl (long double complex) +function {long double} cimagl (long double complex) +function {long double complex} clogl (long double complex) +function {long double complex} conjl (long double complex) +function {long double complex} cpowl (long double complex, long double complex) +function {long double complex} cprojl (long double complex) +function {long double} creall (long double complex) +function {long double complex} csinhl (long double complex) +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 + +allow cerf +allow cerfc +allow cexp2 +allow cexpm1 +allow clog10 +allow clog1p +allow clog2 +allow clgamma +allow ctgamma + +allow cerff +allow cerfcf +allow cexp2f +allow cexpm1f +allow clog10f +allow clog1pf +allow clog2f +allow clgammaf +allow ctgammaf + +allow cerfl +allow cerfcl +allow cexp2l +allow cexpm1l +allow clog10l +allow clog1pl +allow clog2l +allow clgammal +allow ctgammal + +#endif diff --git a/REORG.TODO/conform/data/cpio.h-data b/REORG.TODO/conform/data/cpio.h-data new file mode 100644 index 0000000000..ac7d40fd5e --- /dev/null +++ b/REORG.TODO/conform/data/cpio.h-data @@ -0,0 +1,26 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +constant C_IRUSR == 0000400 +constant C_IWUSR == 0000200 +constant C_IXUSR == 0000100 +constant C_IRGRP == 0000040 +constant C_IWGRP == 0000020 +constant C_IXGRP == 0000010 +constant C_IROTH == 0000004 +constant C_IWOTH == 0000002 +constant C_IXOTH == 0000001 +constant C_ISUID == 0004000 +constant C_ISGID == 0002000 +constant C_ISVTX == 0001000 +constant C_ISDIR == 0040000 +constant C_ISFIFO == 0010000 +constant C_ISREG == 0100000 +constant C_ISBLK == 0060000 +constant C_ISCHR == 0020000 +constant C_ISCTG == 0110000 +constant C_ISLNK == 0120000 +constant C_ISSOCK == 0140000 + +macro-str MAGIC "070707" + +allow *_t +#endif diff --git a/REORG.TODO/conform/data/ctype.h-data b/REORG.TODO/conform/data/ctype.h-data new file mode 100644 index 0000000000..7e10794e46 --- /dev/null +++ b/REORG.TODO/conform/data/ctype.h-data @@ -0,0 +1,51 @@ +function int isalnum (int) +function int isalpha (int) +function int iscntrl (int) +function int isdigit (int) +function int isgraph (int) +function int islower (int) +function int isprint (int) +function int ispunct (int) +function int isspace (int) +function int isupper (int) +function int isxdigit (int) +function int tolower (int) +function int toupper (int) + +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function int isblank (int) +#endif + +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +function int isascii (int) +function int toascii (int) + +// XPG says the following two are macros. But we test a bit more strictly. +function int _toupper (int) +function int _tolower (int) +#endif + +# if 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 + +allow is[abcdefghijklmnopqrstuvwxyz]* +allow to[abcdefghijklmnopqrstuvwxyz]* + +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow *_t +#endif diff --git a/REORG.TODO/conform/data/dirent.h-data b/REORG.TODO/conform/data/dirent.h-data new file mode 100644 index 0000000000..be7ad06fd8 --- /dev/null +++ b/REORG.TODO/conform/data/dirent.h-data @@ -0,0 +1,34 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +type DIR + +type {struct dirent} + +# if !defined POSIX && !defined POSIX2008 +element {struct dirent} ino_t d_ino +# endif +element {struct dirent} char d_name [] + +# if !defined POSIX && !defined POSIX2008 +type ino_t +#endif + +function int closedir (DIR*) +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/REORG.TODO/conform/data/dlfcn.h-data b/REORG.TODO/conform/data/dlfcn.h-data new file mode 100644 index 0000000000..b6658ae8ca --- /dev/null +++ b/REORG.TODO/conform/data/dlfcn.h-data @@ -0,0 +1,14 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 +macro RTLD_LAZY +macro RTLD_NOW +macro RTLD_GLOBAL +macro RTLD_LOCAL + +function {void*} dlopen (const char*, int) +function {void*} dlsym (void *, const char*) +function int dlclose (void*) +function {char*} dlerror (void) + +allow *_t +allow RTLD_* +#endif diff --git a/REORG.TODO/conform/data/errno.h-data b/REORG.TODO/conform/data/errno.h-data new file mode 100644 index 0000000000..12730ba974 --- /dev/null +++ b/REORG.TODO/conform/data/errno.h-data @@ -0,0 +1,134 @@ +macro-int-constant EDOM {int} > 0 +#if !defined ISO && !defined POSIX +macro-int-constant EILSEQ {int} > 0 +#endif +macro-int-constant ERANGE {int} > 0 + +// variable int errno +allow errno + +#if !defined ISO && !defined ISO99 && !defined ISO11 +macro-int-constant E2BIG {int} > 0 +macro-int-constant EACCES {int} > 0 +# if !defined POSIX +macro-int-constant EADDRINUSE {int} > 0 +macro-int-constant EADDRNOTAVAIL {int} > 0 +macro-int-constant EAFNOSUPPORT {int} > 0 +# endif +macro-int-constant EAGAIN {int} > 0 +# if !defined POSIX +macro-int-constant EALREADY {int} > 0 +# endif +macro-int-constant EBADF {int} > 0 +macro-int-constant EBADMSG {int} > 0 +macro-int-constant EBUSY {int} > 0 +macro-int-constant ECANCELED {int} > 0 +macro-int-constant ECHILD {int} > 0 +# if !defined POSIX +macro-int-constant ECONNABORTED {int} > 0 +macro-int-constant ECONNREFUSED {int} > 0 +macro-int-constant ECONNRESET {int} > 0 +# endif +macro-int-constant EDEADLK {int} > 0 +# if !defined POSIX +macro-int-constant EDESTADDRREQ {int} > 0 +macro-int-constant EDQUOT {int} > 0 +# endif +macro-int-constant EEXIST {int} > 0 +macro-int-constant EFAULT {int} > 0 +macro-int-constant EFBIG {int} > 0 +# if !defined POSIX +macro-int-constant EHOSTUNREACH {int} > 0 +macro-int-constant EIDRM {int} > 0 +# endif +macro-int-constant EINPROGRESS {int} > 0 +macro-int-constant EINTR {int} > 0 +macro-int-constant EINVAL {int} > 0 +macro-int-constant EIO {int} > 0 +# if !defined POSIX +macro-int-constant EISCONN {int} > 0 +# endif +macro-int-constant EISDIR {int} > 0 +# if !defined POSIX +macro-int-constant ELOOP {int} > 0 +# endif +macro-int-constant EMFILE {int} > 0 +macro-int-constant EMLINK {int} > 0 +macro-int-constant EMSGSIZE {int} > 0 +# if !defined POSIX +macro-int-constant EMULTIHOP {int} > 0 +# endif +macro-int-constant ENAMETOOLONG {int} > 0 +# if !defined POSIX +macro-int-constant ENETDOWN {int} > 0 +macro-int-constant ENETUNREACH {int} > 0 +# endif +macro-int-constant ENFILE {int} > 0 +# if !defined POSIX +macro-int-constant ENOBUFS {int} > 0 +macro-int-constant ENODATA {int} > 0 +# endif +macro-int-constant ENODEV {int} > 0 +macro-int-constant ENOENT {int} > 0 +macro-int-constant ENOEXEC {int} > 0 +macro-int-constant ENOLCK {int} > 0 +# if !defined POSIX +macro-int-constant ENOLINK {int} > 0 +# endif +macro-int-constant ENOMEM {int} > 0 +# if !defined POSIX +macro-int-constant ENOMSG {int} > 0 +macro-int-constant ENOPROTOOPT {int} > 0 +# endif +macro-int-constant ENOSPC {int} > 0 +# if !defined POSIX +macro-int-constant ENOSR {int} > 0 +macro-int-constant ENOSTR {int} > 0 +# endif +macro-int-constant ENOSYS {int} > 0 +# if !defined POSIX +macro-int-constant ENOTCONN {int} > 0 +# endif +macro-int-constant ENOTDIR {int} > 0 +macro-int-constant ENOTEMPTY {int} > 0 +# if !defined POSIX +macro-int-constant ENOTSOCK {int} > 0 +# endif +macro-int-constant ENOTSUP {int} > 0 +macro-int-constant ENOTTY {int} > 0 +macro-int-constant ENXIO {int} > 0 +# if !defined POSIX +macro-int-constant EOPNOTSUPP {int} > 0 +macro-int-constant EOVERFLOW {int} > 0 +# endif +macro-int-constant EPERM {int} > 0 +macro-int-constant EPIPE {int} > 0 +# if !defined POSIX +macro-int-constant EPROTO {int} > 0 +macro-int-constant EPROTONOSUPPORT {int} > 0 +macro-int-constant EPROTOTYPE {int} > 0 +# endif +macro-int-constant EROFS {int} > 0 +macro-int-constant ESPIPE {int} > 0 +macro-int-constant ESRCH {int} > 0 +# if !defined POSIX +macro-int-constant ESTALE {int} > 0 +macro-int-constant ETIME {int} > 0 +# endif +macro-int-constant ETIMEDOUT {int} > 0 +# if !defined POSIX +macro-int-constant ETXTBSY {int} > 0 +macro-int-constant EWOULDBLOCK {int} > 0 +# endif +macro-int-constant EXDEV {int} > 0 + +# if defined XOPEN2K8 || defined POSIX2008 +macro-int-constant ENOTRECOVERABLE {int} > 0 +macro-int-constant EOWNERDEAD {int} > 0 +# endif + +allow *_t +#endif + +allow E[0123456789]* +allow E[ABCDEFGHIJKLMNOPQRSTUVWXYZ]* diff --git a/REORG.TODO/conform/data/fcntl.h-data b/REORG.TODO/conform/data/fcntl.h-data new file mode 100644 index 0000000000..17596f5ff1 --- /dev/null +++ b/REORG.TODO/conform/data/fcntl.h-data @@ -0,0 +1,134 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +constant F_DUPFD +constant F_GETFD +constant F_SETFD +constant F_GETFL +constant F_SETFL +constant F_GETLK +constant F_SETLK +constant F_SETLKW +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +constant F_GETOWN +constant F_SETOWN +#endif + +constant FD_CLOEXEC + +constant F_RDLCK +constant F_UNLCK +constant F_WRLCK + +#if defined POSIX +allow SEEK_SET +allow SEEK_CUR +allow SEEK_END +#else +constant SEEK_SET +constant SEEK_CUR +constant SEEK_END +#endif + +constant O_CREAT +constant O_EXCL +constant O_NOCTTY +constant O_TRUNC + +constant O_APPEND +constant O_NONBLOCK +constant O_SYNC +#if !defined XPG4 && !defined XPG42 +constant O_DSYNC +constant O_RSYNC +#endif + +constant O_ACCMODE + +constant O_RDONLY +constant O_RDWR +constant O_WRONLY + +#if !defined POSIX +constant S_IRWXU +constant S_IRUSR +constant S_IWUSR +constant S_IXUSR +constant S_IRWXG +constant S_IRGRP +constant S_IWGRP +constant S_IXGRP +constant S_IRWXO +constant S_IROTH +constant S_IWOTH +constant S_IXOTH +constant S_ISUID +constant S_ISGID +#if !defined POSIX2008 +constant S_ISVTX +#endif +#endif + +#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +constant POSIX_FADV_NORMAL +constant POSIX_FADV_SEQUENTIAL +constant POSIX_FADV_RANDOM +constant POSIX_FADV_WILLNEED +constant POSIX_FADV_DONTNEED +constant POSIX_FADV_NOREUSE +#endif + +type {struct flock} + +element {struct flock} short l_type +element {struct flock} short l_whence +element {struct flock} off_t l_start +element {struct flock} off_t l_len +element {struct flock} pid_t l_pid + +#if !defined POSIX +# if !defined UNIX98 +type mode_t +# endif +type off_t +type pid_t +#endif + +function int creat (const char*, mode_t) +function int fcntl (int, int, ...) +function int open (const char*, int, ...) +#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 +// Bug 18228: O_TTY_INIT, O_EXEC, O_SEARCH missing. +xfail-constant O_TTY_INIT +constant O_CLOEXEC +xfail-constant O_EXEC +xfail-constant O_SEARCH +constant O_DIRECTORY +constant O_NOFOLLOW +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 + +#if !defined POSIX +allow-header sys/stat.h +allow-header unistd.h +#endif + +allow l_* +allow F_* +allow O_* +allow S_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/fenv.h-data b/REORG.TODO/conform/data/fenv.h-data new file mode 100644 index 0000000000..280b72864c --- /dev/null +++ b/REORG.TODO/conform/data/fenv.h-data @@ -0,0 +1,36 @@ +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +type fenv_t +type fexcept_t + +optional-macro-int-constant FE_DIVBYZERO +optional-macro-int-constant FE_INEXACT +optional-macro-int-constant FE_INVALID +optional-macro-int-constant FE_OVERFLOW +optional-macro-int-constant FE_UNDERFLOW +macro-int-constant FE_ALL_EXCEPT + +optional-macro-int-constant FE_DOWNWARD +optional-macro-int-constant FE_TONEAREST +optional-macro-int-constant FE_TOWARDZERO +optional-macro-int-constant FE_UPWARD + +allow FE_[ABCDEFGHIJKLMNOPQRSTUVWXYZ]* + +macro FE_DFL_ENV {const fenv_t *} + +function int feclearexcept (int) +function int fegetexceptflag (fexcept_t*, int) +function int feraiseexcept (int) +function int fesetexceptflag (const fexcept_t*, int) +function int fetestexcept (int) +function int fegetround (void) +function int fesetround (int) +function int fegetenv (fenv_t*) +function int feholdexcept (fenv_t*) +function int fesetenv (const fenv_t*) +function int feupdateenv (const fenv_t *) + +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow *_t +#endif +#endif diff --git a/REORG.TODO/conform/data/float.h-data b/REORG.TODO/conform/data/float.h-data new file mode 100644 index 0000000000..7b98fc0344 --- /dev/null +++ b/REORG.TODO/conform/data/float.h-data @@ -0,0 +1,62 @@ +macro-int-constant FLT_RADIX >= 2 + +macro FLT_ROUNDS + +macro-int-constant FLT_MANT_DIG +macro-int-constant DBL_MANT_DIG +macro-int-constant LDBL_MANT_DIG + +macro-int-constant FLT_DIG >= 6 +macro-int-constant DBL_DIG >= 10 +macro-int-constant LDBL_DIG >= 10 + +macro-int-constant FLT_MIN_EXP < 0 +macro-int-constant DBL_MIN_EXP < 0 +macro-int-constant LDBL_MIN_EXP < 0 + +macro-int-constant FLT_MIN_10_EXP <= -37 +macro-int-constant DBL_MIN_10_EXP <= -37 +macro-int-constant LDBL_MIN_10_EXP <= -37 + +macro-int-constant FLT_MAX_EXP +macro-int-constant DBL_MAX_EXP +macro-int-constant LDBL_MAX_EXP + +macro-int-constant FLT_MAX_10_EXP >= 37 +macro-int-constant DBL_MAX_10_EXP >= 37 +macro-int-constant LDBL_MAX_10_EXP >= 37 + +macro-constant FLT_MAX >= 1.0E37 +macro-constant DBL_MAX >= 1.0E37 +macro-constant LDBL_MAX >= 1.0E37 + +macro-constant FLT_EPSILON <= 1.0E-5 +macro-constant DBL_EPSILON <= 1.0E-9 +macro-constant LDBL_EPSILON <= 1.0E-9 + +macro-constant FLT_MIN <= 1.0E-37 +macro-constant DBL_MIN <= 1.0E-37 +macro-constant LDBL_MIN <= 1.0E-37 + +#if !defined ISO && !defined XPG4 && !defined XPG42 && !defined POSIX && !defined UNIX98 +macro-int-constant DECIMAL_DIG >= 10 +macro-int-constant FLT_EVAL_METHOD +#endif + +#if defined ISO11 +macro-int-constant DBL_HAS_SUBNORM +macro-int-constant FLT_HAS_SUBNORM +macro-int-constant LDBL_HAS_SUBNORM + +macro-int-constant DBL_DECIMAL_DIG >= 10 +macro-int-constant FLT_DECIMAL_DIG >= 6 +macro-int-constant LDBL_DECIMAL_DIG >= 10 + +macro-constant DBL_TRUE_MIN <= 1E-37 +macro-constant FLT_TRUE_MIN <= 1E-37 +macro-constant LDBL_TRUE_MIN <= 1E-37 +#endif + +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow *_t +#endif diff --git a/REORG.TODO/conform/data/fmtmsg.h-data b/REORG.TODO/conform/data/fmtmsg.h-data new file mode 100644 index 0000000000..c1b18ad4a4 --- /dev/null +++ b/REORG.TODO/conform/data/fmtmsg.h-data @@ -0,0 +1,63 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 +macro MM_HARD +constant MM_HARD + +macro MM_SOFT +constant MM_SOFT + +macro MM_FIRM +constant MM_FIRM + +macro MM_APPL +constant MM_APPL + +macro MM_UTIL +constant MM_UTIL + +macro MM_OPSYS +constant MM_OPSYS + +macro MM_RECOVER +constant MM_RECOVER + +macro MM_NRECOV +constant MM_NRECOV + +macro MM_HALT +constant MM_HALT + +macro MM_ERROR +constant MM_ERROR + +macro MM_WARNING +constant MM_WARNING + +macro MM_INFO +constant MM_INFO + +macro MM_NOSEV +constant MM_NOSEV + +macro MM_PRINT +constant MM_PRINT + +macro MM_CONSOLE +constant MM_CONSOLE + +constant MM_NULLLBL == 0 +constant MM_NULLSEV == 0 +constant MM_NULLMC == 0 +constant MM_NULLTXT == 0 +constant MM_NULLACT == 0 +constant MM_NULLTAG == 0 + +macro MM_OK +macro MM_NOTOK +macro MM_NOMSG +macro MM_NOCON + +function int fmtmsg (long, const char*, int, const char*, const char*, const char*) + +allow *_t +allow MM_* +#endif diff --git a/REORG.TODO/conform/data/fnmatch.h-data b/REORG.TODO/conform/data/fnmatch.h-data new file mode 100644 index 0000000000..12a9a4ac2e --- /dev/null +++ b/REORG.TODO/conform/data/fnmatch.h-data @@ -0,0 +1,14 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +constant FNM_NOMATCH +constant FNM_PATHNAME +constant FNM_PERIOD +constant FNM_NOESCAPE +#if !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 +constant FNM_NOSYS +#endif + +function int fnmatch (const char*, const char*, int) + +allow FNM_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/ftw.h-data b/REORG.TODO/conform/data/ftw.h-data new file mode 100644 index 0000000000..340334bfd4 --- /dev/null +++ b/REORG.TODO/conform/data/ftw.h-data @@ -0,0 +1,35 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +# ifndef XPG4 +type {struct FTW} +element {struct FTW} int base +element {struct FTW} int level +# endif + +macro FTW_F +macro FTW_D +macro FTW_DNR +# if !defined XPG4 && !defined XPG42 +macro FTW_DP +# endif +macro FTW_NS + +# ifndef XPG4 +macro FTW_SL +macro FTW_SLN + +macro FTW_PHYS +macro FTW_MOUNT +macro FTW_DEPTH +macro FTW_CHDIR +# endif + +function int ftw (const char*, int (*) (const char *, const struct stat*, int), int) +# ifndef XPG4 +function int nftw (const char*, int (*) (const char *, const struct stat*, int, struct FTW *), int, int) +# endif + +allow-header sys/stat.h + +allow *_t +allow FTW* +#endif diff --git a/REORG.TODO/conform/data/glob.h-data b/REORG.TODO/conform/data/glob.h-data new file mode 100644 index 0000000000..eca83937af --- /dev/null +++ b/REORG.TODO/conform/data/glob.h-data @@ -0,0 +1,32 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +#ifdef POSIX +# define size_t __size_t +#endif + +type glob_t +element glob_t size_t gl_pathc +element glob_t {char**} gl_pathv +element glob_t size_t gl_offs + +constant GLOB_APPEND +constant GLOB_DOOFFS +constant GLOB_ERR +constant GLOB_MARK +constant GLOB_NOCHECK +constant GLOB_NOESCAPE +constant GLOB_NOSORT + +constant GLOB_ABORTED +constant GLOB_NOMATCH +constant GLOB_NOSPACE +# if !defined XOPEN2K8 && !defined POSIX2008 && !defined POSIX +constant GLOB_NOSYS +# endif + +function int glob (const char*, int, int (*) (const char*, int), glob_t*) +function void globfree (glob_t *) + +allow gl_* +allow GLOB_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/grp.h-data b/REORG.TODO/conform/data/grp.h-data new file mode 100644 index 0000000000..1688444586 --- /dev/null +++ b/REORG.TODO/conform/data/grp.h-data @@ -0,0 +1,30 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +#ifdef POSIX +# define gid_t __gid_t +#endif + +type {struct group} +element {struct group} {char*} gr_name +element {struct group} gid_t gr_gid +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*) +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**) +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 +function {struct group*} getgrent (void) +function void endgrent (void) +function void setgrent (void) +# endif + +allow gr_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/iconv.h-data b/REORG.TODO/conform/data/iconv.h-data new file mode 100644 index 0000000000..79fb2d6def --- /dev/null +++ b/REORG.TODO/conform/data/iconv.h-data @@ -0,0 +1,12 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !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*) +function int iconv_close (iconv_t) + +allow *_t +#endif diff --git a/REORG.TODO/conform/data/inttypes.h-data b/REORG.TODO/conform/data/inttypes.h-data new file mode 100644 index 0000000000..2ae5b951be --- /dev/null +++ b/REORG.TODO/conform/data/inttypes.h-data @@ -0,0 +1,177 @@ +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +#include "stdint.h-data" + +type imaxdiv_t +element imaxdiv_t intmax_t rem +element imaxdiv_t intmax_t quot + +function intmax_t imaxabs (intmax_t) +function imaxdiv_t imaxdiv (intmax_t, intmax_t) +function intmax_t strtoimax (const char*, char**, int) +function uintmax_t strtoumax (const char*, char**, int) +function intmax_t wcstoimax (const __gwchar_t*, __gwchar_t**, int) +function uintmax_t wcstoumax (const __gwchar_t*, __gwchar_t**, int) + +macro PRId8 +macro PRIi8 +macro PRIo8 +macro PRIu8 +macro PRIx8 +macro PRIX8 +macro SCNd8 +macro SCNi8 +macro SCNo8 +macro SCNu8 +macro SCNx8 +macro PRIdLEAST8 +macro PRIiLEAST8 +macro PRIoLEAST8 +macro PRIuLEAST8 +macro PRIxLEAST8 +macro PRIXLEAST8 +macro SCNdLEAST8 +macro SCNiLEAST8 +macro SCNoLEAST8 +macro SCNuLEAST8 +macro SCNxLEAST8 +macro PRIdFAST8 +macro PRIiFAST8 +macro PRIoFAST8 +macro PRIuFAST8 +macro PRIxFAST8 +macro PRIXFAST8 +macro SCNdFAST8 +macro SCNiFAST8 +macro SCNoFAST8 +macro SCNuFAST8 +macro SCNxFAST8 + +macro PRId16 +macro PRIi16 +macro PRIo16 +macro PRIu16 +macro PRIx16 +macro PRIX16 +macro SCNd16 +macro SCNi16 +macro SCNo16 +macro SCNu16 +macro SCNx16 +macro PRIdLEAST16 +macro PRIiLEAST16 +macro PRIoLEAST16 +macro PRIuLEAST16 +macro PRIxLEAST16 +macro PRIXLEAST16 +macro SCNdLEAST16 +macro SCNiLEAST16 +macro SCNoLEAST16 +macro SCNuLEAST16 +macro SCNxLEAST16 +macro PRIdFAST16 +macro PRIiFAST16 +macro PRIoFAST16 +macro PRIuFAST16 +macro PRIxFAST16 +macro PRIXFAST16 +macro SCNdFAST16 +macro SCNiFAST16 +macro SCNoFAST16 +macro SCNuFAST16 +macro SCNxFAST16 + +macro PRId32 +macro PRIi32 +macro PRIo32 +macro PRIu32 +macro PRIx32 +macro PRIX32 +macro SCNd32 +macro SCNi32 +macro SCNo32 +macro SCNu32 +macro SCNx32 +macro PRIdLEAST32 +macro PRIiLEAST32 +macro PRIoLEAST32 +macro PRIuLEAST32 +macro PRIxLEAST32 +macro PRIXLEAST32 +macro SCNdLEAST32 +macro SCNiLEAST32 +macro SCNoLEAST32 +macro SCNuLEAST32 +macro SCNxLEAST32 +macro PRIdFAST32 +macro PRIiFAST32 +macro PRIoFAST32 +macro PRIuFAST32 +macro PRIxFAST32 +macro PRIXFAST32 +macro SCNdFAST32 +macro SCNiFAST32 +macro SCNoFAST32 +macro SCNuFAST32 +macro SCNxFAST32 + +macro PRId64 +macro PRIi64 +macro PRIo64 +macro PRIu64 +macro PRIx64 +macro PRIX64 +macro SCNd64 +macro SCNi64 +macro SCNo64 +macro SCNu64 +macro SCNx64 +macro PRIdLEAST64 +macro PRIiLEAST64 +macro PRIoLEAST64 +macro PRIuLEAST64 +macro PRIxLEAST64 +macro PRIXLEAST64 +macro SCNdLEAST64 +macro SCNiLEAST64 +macro SCNoLEAST64 +macro SCNuLEAST64 +macro SCNxLEAST64 +macro PRIdFAST64 +macro PRIiFAST64 +macro PRIoFAST64 +macro PRIuFAST64 +macro PRIxFAST64 +macro PRIXFAST64 +macro SCNdFAST64 +macro SCNiFAST64 +macro SCNoFAST64 +macro SCNuFAST64 +macro SCNxFAST64 + +macro PRIdMAX +macro PRIiMAX +macro PRIoMAX +macro PRIuMAX +macro PRIxMAX +macro PRIXMAX +macro SCNdMAX +macro SCNiMAX +macro SCNoMAX +macro SCNuMAX +macro SCNxMAX + +macro PRIdPTR +macro PRIiPTR +macro PRIoPTR +macro PRIuPTR +macro PRIxPTR +macro PRIXPTR +macro SCNdPTR +macro SCNiPTR +macro SCNoPTR +macro SCNuPTR +macro SCNxPTR + +allow PRI[Xa-z]* +allow SCN[Xa-z]* +#endif diff --git a/REORG.TODO/conform/data/iso646.h-data b/REORG.TODO/conform/data/iso646.h-data new file mode 100644 index 0000000000..9e307f734d --- /dev/null +++ b/REORG.TODO/conform/data/iso646.h-data @@ -0,0 +1,17 @@ +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 +macro and +macro and_eq +macro bitand +macro bitor +macro compl +macro not +macro not_eq +macro or +macro or_eq +macro xor +macro xor_eq + +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow *_t +#endif +#endif diff --git a/REORG.TODO/conform/data/langinfo.h-data b/REORG.TODO/conform/data/langinfo.h-data new file mode 100644 index 0000000000..6bbb3872a0 --- /dev/null +++ b/REORG.TODO/conform/data/langinfo.h-data @@ -0,0 +1,76 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +constant CODESET +constant D_T_FMT +constant D_FMT +constant T_FMT +constant T_FMT_AMPM +constant AM_STR +constant PM_STR +constant DAY_1 +constant DAY_2 +constant DAY_3 +constant DAY_4 +constant DAY_5 +constant DAY_6 +constant DAY_7 +constant ABDAY_1 +constant ABDAY_2 +constant ABDAY_3 +constant ABDAY_4 +constant ABDAY_5 +constant ABDAY_6 +constant ABDAY_7 +constant MON_1 +constant MON_2 +constant MON_3 +constant MON_4 +constant MON_5 +constant MON_6 +constant MON_7 +constant MON_8 +constant MON_9 +constant MON_10 +constant MON_11 +constant MON_12 +constant ABMON_1 +constant ABMON_2 +constant ABMON_3 +constant ABMON_4 +constant ABMON_5 +constant ABMON_6 +constant ABMON_7 +constant ABMON_8 +constant ABMON_9 +constant ABMON_10 +constant ABMON_11 +constant ABMON_12 +constant ERA +constant ERA_D_FMT +constant ERA_D_T_FMT +constant ERA_T_FMT +constant ALT_DIGITS +constant RADIXCHAR +constant THOUSEP +constant YESEXPR +constant NOEXPR +constant CRNCYSTR + +# if defined XPG4 || defined XPG42 || defined UNIX98 +constant YESSTR +constant NOSTR +# endif + +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 + +allow *_t +#endif diff --git a/REORG.TODO/conform/data/libgen.h-data b/REORG.TODO/conform/data/libgen.h-data new file mode 100644 index 0000000000..e9eb5fafc9 --- /dev/null +++ b/REORG.TODO/conform/data/libgen.h-data @@ -0,0 +1,6 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 +function {char*} basename (char*) +function {char*} dirname (char*) + +allow *_t +#endif diff --git a/REORG.TODO/conform/data/limits.h-data b/REORG.TODO/conform/data/limits.h-data new file mode 100644 index 0000000000..23114a5fa0 --- /dev/null +++ b/REORG.TODO/conform/data/limits.h-data @@ -0,0 +1,200 @@ +macro-int-constant CHAR_BIT >= 8 +macro-int-constant SCHAR_MIN {promoted:signed char} <= -127 +macro-int-constant SCHAR_MAX {promoted:signed char} >= 127 +macro-int-constant UCHAR_MAX {promoted:unsigned char} >= 255 +#ifdef __CHAR_UNSIGNED__ +macro-int-constant CHAR_MIN {promoted:char} == 0 +macro-int-constant CHAR_MAX {promoted:char} == UCHAR_MAX +#else +macro-int-constant CHAR_MIN {promoted:char} == SCHAR_MIN +macro-int-constant CHAR_MAX {promoted:char} == SCHAR_MAX +#endif +macro-int-constant MB_LEN_MAX >= 1 +macro-int-constant SHRT_MIN {promoted:short int} <= -32767 +macro-int-constant SHRT_MAX {promoted:short int} >= 32767 +macro-int-constant USHRT_MAX {promoted:unsigned short int} >= 65535 +// The ranges for int and unsigned int are from POSIX. +macro-int-constant INT_MAX {int} >= 2147483647 +macro-int-constant INT_MIN {int} <= -2147483647 +macro-int-constant UINT_MAX {unsigned int} >= 4294967295U +macro-int-constant LONG_MAX {long int} >= 2147483647L +macro-int-constant LONG_MIN {long int} <= -2147483647L +macro-int-constant ULONG_MAX {unsigned long int} >= 4294967295UL +#if defined ISO99 || defined ISO11 || defined XOPEN2K8 || defined POSIX2008 +macro-int-constant LLONG_MIN {long long int} <= -9223372036854775807ll +macro-int-constant LLONG_MAX {long long int} >= 9223372036854775807ll +macro-int-constant ULLONG_MAX {unsigned long long int} >= 18446744073709551615ull +#endif + +#if !defined ISO && !defined ISO99 && !defined ISO11 +// if these values exist, we should check the minimal value +allow AIO_LISTIO_MAX +allow AIO_MAX +allow AIO_PRIO_DELTA_MAX +allow ARG_MAX +#if !defined POSIX && !defined XPG4 +allow ATEXIT_MAX +#endif +allow CHILD_MAX +allow DELAYTIMER_MAX +#if !defined POSIX && !defined POSIX2008 && !defined XPG4 +allow IOV_MAX +#endif +allow LOGIN_NAME_MAX +allow MQ_OPEN_MAX +allow MQ_PRIO_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 +allow PTHREAD_THREADS_MAX +allow RTSIG_MAX +allow SEM_NSEMS_MAX +allow SEM_VALUE_MAX +allow SIGQUEUE_MAX +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +allow SS_REPL_MAX +#endif +allow STREAM_MAX +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +allow SYMLOOP_MAX +#endif +allow TIMER_MAX +allow TTY_NAME_MAX +allow TZNAME_MAX + +#if !defined POSIX && !defined XPG4 && !defined XPG42 +allow FILESIZEBITS +#endif +allow LINK_MAX +allow MAX_CANON +allow MAX_INPUT +allow NAME_MAX +allow PATH_MAX +allow PIPE_BUF +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +allow POSIX_ALLOC_SIZE_MIN +allow POSIX_REC_INCR_XFER_SIZE +allow POSIX_REC_MAX_XFER_SIZE +allow POSIX_REC_XFER_ALIGN +allow SYMLINK_MAX +#endif + +macro-constant BC_BASE_MAX >= _POSIX2_BC_BASE_MAX +macro-constant BC_DIM_MAX >= _POSIX2_BC_DIM_MAX +macro-constant BC_SCALE_MAX >= _POSIX2_BC_SCALE_MAX +macro-constant BC_STRING_MAX >= _POSIX2_BC_STRING_MAX +#if !defined POSIX && !defined XPG4 && !defined XPG42 +macro CHARCLASS_NAME_MAX +#endif +macro-constant COLL_WEIGHTS_MAX >= _POSIX2_COLL_WEIGHTS_MAX +macro-constant EXPR_NEST_MAX >= _POSIX2_EXPR_NEST_MAX +macro-constant LINE_MAX >= _POSIX2_LINE_MAX +constant NGROUPS_MAX >= 8 +macro-constant RE_DUP_MAX >= _POSIX2_RE_DUP_MAX + +constant _POSIX_CLOCKRES_MIN == 20000000 + +constant _POSIX_AIO_LISTIO_MAX == 2 +constant _POSIX_AIO_MAX == 1 +constant _POSIX_ARG_MAX == 4096 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +constant _POSIX_CHILD_MAX == 25 +#else +constant _POSIX_CHILD_MAX == 6 +#endif +constant _POSIX_DELAYTIMER_MAX == 32 +constant _POSIX_LINK_MAX == 8 +constant _POSIX_LOGIN_NAME_MAX == 9 +constant _POSIX_MAX_CANON == 255 +constant _POSIX_MAX_INPUT == 255 +constant _POSIX_MQ_OPEN_MAX == 8 +constant _POSIX_MQ_PRIO_MAX == 32 +constant _POSIX_NAME_MAX == 14 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +constant _POSIX_NGROUPS_MAX == 8 +#else +constant _POSIX_NGROUPS_MAX == 0 +#endif +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +constant _POSIX_OPEN_MAX == 20 +#else +constant _POSIX_OPEN_MAX == 16 +#endif +// Value was 255, corrected to 256 following an interpretation request. +constant _POSIX_PATH_MAX == 256 +constant _POSIX_PIPE_BUF == 512 +constant _POSIX_RTSIG_MAX == 8 +constant _POSIX_SEM_NSEMS_MAX == 256 +constant _POSIX_SEM_VALUE_MAX == 32767 +constant _POSIX_SIGQUEUE_MAX == 32 +constant _POSIX_SSIZE_MAX == 32767 +constant _POSIX_STREAM_MAX == 8 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +optional-constant _POSIX_SS_REPL_MAX == 4 +optional-constant _POSIX_SYMLINK_MAX == 255 +optional-constant _POSIX_SYMLOOP_MAX == 8 +#endif +constant _POSIX_THREAD_DESTRUCTOR_ITERATIONS == 4 +constant _POSIX_THREAD_KEYS_MAX == 128 +constant _POSIX_THREAD_THREADS_MAX == 64 +constant _POSIX_TIMER_MAX == 32 +constant _POSIX_TTY_NAME_MAX == 9 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +constant _POSIX_TZNAME_MAX == 6 +#else +constant _POSIX_TZNAME_MAX == 3 +#endif +macro-constant _POSIX2_BC_BASE_MAX == 99 +macro-constant _POSIX2_BC_DIM_MAX == 2048 +macro-constant _POSIX2_BC_SCALE_MAX == 99 +macro-constant _POSIX2_BC_STRING_MAX == 1000 +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +constant _POSIX2_CHARCLASS_NAME_MAX == 14 +#endif +macro-constant _POSIX2_COLL_WEIGHTS_MAX == 2 +macro-constant _POSIX2_EXPR_NEST_MAX == 32 +macro-constant _POSIX2_LINE_MAX == 2048 +macro-constant _POSIX2_RE_DUP_MAX == 255 +#if !defined POSIX && !defined POSIX2008 && !defined XPG4 +optional-constant _XOPEN_IOV_MAX == 16 +#endif + +#if !defined POSIX && !defined POSIX2008 +constant WORD_BIT >= 16 +constant LONG_BIT >= 32 +#endif +constant SSIZE_MAX + +#if !defined POSIX +optional-constant CHARCLASS_NAME_MAX >= 14 +#endif +#if !defined POSIX +optional-constant NL_ARGMAX >= 9 +# if !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 POSIX2008 +optional-constant NZERO >= 20 +# endif +#endif +#if defined XPG4 || defined XPG42 || defined UNIX98 +optional-constant TMP_MAX >= 10000 +#endif + +allow *_MAX +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +allow *_MIN +#endif +allow *_t +#endif diff --git a/REORG.TODO/conform/data/locale.h-data b/REORG.TODO/conform/data/locale.h-data new file mode 100644 index 0000000000..266264ac6d --- /dev/null +++ b/REORG.TODO/conform/data/locale.h-data @@ -0,0 +1,70 @@ +type {struct lconv} +element {struct lconv} {char*} currency_symbol +element {struct lconv} {char*} decimal_point +element {struct lconv} char frac_digits +element {struct lconv} {char*} grouping +element {struct lconv} {char*} int_curr_symbol +element {struct lconv} char int_frac_digits +element {struct lconv} {char*} mon_decimal_point +element {struct lconv} {char*} mon_thousands_sep +element {struct lconv} {char*} mon_grouping +element {struct lconv} {char*} negative_sign +element {struct lconv} char n_cs_precedes +element {struct lconv} char n_sep_by_space +element {struct lconv} char n_sign_posn +element {struct lconv} {char*} positive_sign +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 ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !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 +element {struct lconv} char int_p_cs_precedes +element {struct lconv} char int_p_sep_by_space +element {struct lconv} char int_p_sign_posn +#endif + +macro-constant NULL == 0 + +macro-int-constant LC_ALL +macro-int-constant LC_COLLATE +macro-int-constant LC_CTYPE +#if !defined ISO && !defined ISO99 && !defined ISO11 +macro-int-constant LC_MESSAGES +#endif +macro-int-constant LC_MONETARY +macro-int-constant LC_NUMERIC +macro-int-constant 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_[ABCDEFGHIJKLMNOPQRSTUVWXYZ]* +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow *_t +#endif +#if defined XOPEN2K8 || defined POSIX2008 +allow LC_*_MASK +#endif diff --git a/REORG.TODO/conform/data/math.h-data b/REORG.TODO/conform/data/math.h-data new file mode 100644 index 0000000000..0c50755792 --- /dev/null +++ b/REORG.TODO/conform/data/math.h-data @@ -0,0 +1,335 @@ +macro-constant HUGE_VAL {double} + +#if !defined ISO && !defined POSIX +# if !defined XPG4 && !defined XPG42 && !defined UNIX98 +macro fpclassify +macro isfinite +macro isinf +macro isnan +macro isnormal +macro signbit +macro isgreater +macro isgreaterequal +macro isless +macro islessequal +macro islessgreater +macro isunordered +type float_t +type double_t +# endif +# if defined XPG4 || defined XPG42 || defined UNIX98 +function int isnan (double) +# endif + +# if !defined ISO99 && !defined ISO11 && !defined POSIX2008 +constant M_E +constant M_LOG2E +constant M_LOG10E +constant M_LN2 +constant M_LN10 +constant M_PI +constant M_PI_2 +constant M_PI_4 +constant M_1_PI +constant M_2_PI +constant M_2_SQRTPI +constant M_SQRT2 +constant M_SQRT1_2 + +constant MAXFLOAT +# endif +# if !defined XPG4 && !defined XPG42 && !defined UNIX98 +macro-constant HUGE_VALF {float} +macro-constant HUGE_VALL {long double} +macro-constant INFINITY {float} +macro-constant NAN {float} + +macro-int-constant FP_INFINITE +macro-int-constant FP_NAN +macro-int-constant FP_NORMAL +macro-int-constant FP_SUBNORMAL +macro-int-constant FP_ZERO + +optional-macro-int-constant FP_FAST_FMA {int} == 1 +optional-macro-int-constant FP_FAST_FMAF {int} == 1 +optional-macro-int-constant FP_FAST_FMAL {int} == 1 + +macro-int-constant FP_ILOGB0 +macro-int-constant FP_ILOGBNAN + +macro-int-constant MATH_ERRNO {int} == 1 +macro-int-constant MATH_ERREXCEPT {int} == 2 + +macro math_errhandling {int} +# 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 && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function double copysign (double, double) +#endif +function double cos (double) +function double cosh (double) +function double exp (double) +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function double exp2 (double) +#endif +function double fabs (double) +function double floor (double) +function double fmod (double, double) +function double frexp (double, int*) +function double ldexp (double, int) +function double log (double) +function double log10 (double) +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function double log2 (double) +#endif +function double modf (double, double*) +function double pow (double, double) +function double sin (double) +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 XPG4 || defined XPG42 || defined UNIX98 +function double gamma (double) +#endif +#if !defined ISO && !defined POSIX +function double hypot (double, double) +# if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +function double j0 (double) +function double j1 (double) +function double jn (int, double) +# endif +function double lgamma (double) +# if !defined XPG4 && !defined XPG42 && !defined UNIX98 +function double tgamma (double) +# endif +# if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +function double y0 (double) +function double y1 (double) +function double yn (int, double) +# endif +# if !defined XPG4 +function double acosh (double) +function double asinh (double) +function double atanh (double) +function double cbrt (double) +function double expm1 (double) +function int ilogb (double) +function double log1p (double) +function double logb (double) +function double nextafter (double, double) +# if !defined XPG42 && !defined UNIX98 +function double nexttoward (double, long double) +function double nearbyint (double) +# endif +function double remainder (double, double) +function double rint (double) +# if !defined XPG42 && !defined UNIX98 +function double round (double) +function double trunc (double) +function long lrint (double) +function {long long} llrint (double) +function long lround (double) +function {long long} llround (double) +function double remquo (double, double, int*) +# endif +# if defined XPG42 || defined UNIX98 || defined XOPEN2K +function double scalb (double, double) +# endif +# if !defined XPG42 && !defined UNIX98 +function double scalbn (double, int) +function double scalbln (double, long) +function double fdim (double, double) +function double fmax (double, double) +function double fmin (double, double) +function double fma (double, double, double) +function double nan (const char*) +# endif +# endif + +# if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +// variable signgam +allow signgam +# endif +#endif + +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function float acosf (float) +function float asinf (float) +function float atanf (float) +function float atan2f (float, float) +function float ceilf (float) +function float copysignf (float, float) +function float cosf (float) +function float coshf (float) +function float expf (float) +function float exp2f (float) +function float fabsf (float) +function float floorf (float) +function float fmodf (float, float) +function float frexpf (float, int*) +function float ldexpf (float, int) +function float logf (float) +function float log10f (float) +function float log2f (float) +function float modff (float, float*) +function float powf (float, float) +function float sinf (float) +function float sinhf (float) +function float sqrtf (float) +function float tanf (float) +function float tanhf (float) +function float erff (float) +function float erfcf (float) +function float hypotf (float, float) +function float lgammaf (float) +function float tgammaf (float) +function float acoshf (float) +function float asinhf (float) +function float atanhf (float) +function float cbrtf (float) +function float expm1f (float) +function int ilogbf (float) +function float log1pf (float) +function float logbf (float) +function float nextafterf (float, float) +function float nexttowardf (float, long double) +function float nearbyintf (float) +function float remainderf (float, float) +function float rintf (float) +function float roundf (float) +function float truncf (float) +function long lrintf (float) +function {long long} llrintf (float) +function long lroundf (float) +function {long long} llroundf (float) +function float remquof (float, float, int*) +function float scalbnf (float, int) +function float scalblnf (float, long) +function float fdimf (float, float) +function float fmaxf (float, float) +function float fminf (float, float) +function float fmaf (float, float, float) +function float nanf (const char*) + +function {long double} acosl (long double) +function {long double} asinl (long double) +function {long double} atanl (long double) +function {long double} atan2l (long double, long double) +function {long double} ceill (long double) +function {long double} copysignl (long double, long double) +function {long double} cosl (long double) +function {long double} coshl (long double) +function {long double} expl (long double) +function {long double} exp2l (long double) +function {long double} fabsl (long double) +function {long double} floorl (long double) +function {long double} fmodl (long double, long double) +function {long double} frexpl (long double, int*) +function {long double} ldexpl (long double, int) +function {long double} logl (long double) +function {long double} log10l (long double) +function {long double} log2l (long double) +function {long double} modfl (long double, long double*) +function {long double} powl (long double, long double) +function {long double} sinl (long double) +function {long double} sinhl (long double) +function {long double} sqrtl (long double) +function {long double} tanl (long double) +function {long double} tanhl (long double) +function {long double} erfl (long double) +function {long double} erfcl (long double) +function {long double} hypotl (long double, long double) +function {long double} lgammal (long double) +function {long double} tgammal (long double) +function {long double} acoshl (long double) +function {long double} asinhl (long double) +function {long double} atanhl (long double) +function {long double} cbrtl (long double) +function {long double} expm1l (long double) +function int ilogbl (long double) +function {long double} log1pl (long double) +function {long double} logbl (long double) +function {long double} nextafterl (long double, long double) +function {long double} nexttowardl (long double, long double) +function {long double} nearbyintl (long double) +function {long double} remainderl (long double, long double) +function {long double} rintl (long double) +function {long double} roundl (long double) +function {long double} truncl (long double) +function long lrintl (long double) +function {long long} llrintl (long double) +function long lroundl (long double) +function {long long} llroundl (long double) +function {long double} remquol (long double, long double, int*) +function {long double} scalbnl (long double, int) +function {long double} scalblnl (long double, long) +function {long double} fdiml (long double, long double) +function {long double} fmaxl (long double, long double) +function {long double} fminl (long double, long double) +function {long double} fmal (long double, long double, long double) +function {long double} nanl (const char*) +#else +allow acosf +allow asinf +allow atanf +allow atan2f +allow ceilf +allow cosf +allow coshf +allow expf +allow fabsf +allow floorf +allow fmodf +allow frexpf +allow ldexpf +allow logf +allow log10f +allow modff +allow powf +allow sinf +allow sinhf +allow sqrtf +allow tanf +allow tanhf + +allow acosl +allow asinl +allow atanl +allow atan2l +allow ceill +allow cosl +allow coshl +allow expl +allow fabsl +allow floorl +allow fmodl +allow frexpl +allow ldexpl +allow logl +allow log10l +allow modfl +allow powl +allow sinl +allow sinhl +allow sqrtl +allow tanl +allow tanhl +#endif + +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow *_t +#endif +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +allow FP_[ABCDEFGHIJKLMNOPQRSTUVWXYZ]* +#endif diff --git a/REORG.TODO/conform/data/monetary.h-data b/REORG.TODO/conform/data/monetary.h-data new file mode 100644 index 0000000000..4f0cb9b681 --- /dev/null +++ b/REORG.TODO/conform/data/monetary.h-data @@ -0,0 +1,14 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !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/REORG.TODO/conform/data/mqueue.h-data b/REORG.TODO/conform/data/mqueue.h-data new file mode 100644 index 0000000000..42ccd8551e --- /dev/null +++ b/REORG.TODO/conform/data/mqueue.h-data @@ -0,0 +1,47 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42 +// should test for not an array type. +type mqd_t + +type {struct sigevent} +element {struct sigevent} int sigev_notify +element {struct sigevent} int sigev_signo +element {struct sigevent} {union sigval} sigev_value +element {struct sigevent} {void(*} sigev_notify_function )(union sigval) +element {struct sigevent} {pthread_attr_t*} sigev_notify_attributes + +type {struct mq_attr} +// Bug 21279: mq_attr elements have wrong type. +xfail[x86_64-x32-linux]-element {struct mq_attr} long mq_flags +xfail[x86_64-x32-linux]-element {struct mq_attr} long mq_maxmsg +xfail[x86_64-x32-linux]-element {struct mq_attr} long mq_msgsize +xfail[x86_64-x32-linux]-element {struct mq_attr} long mq_curmsgs + +function int mq_close (mqd_t) +function int mq_getattr (mqd_t, struct mq_attr*) +function int mq_notify (mqd_t, const struct sigevent*) +function mqd_t mq_open (const char*, int, ...) +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*) +#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} +#endif + +allow-header fcntl.h +allow-header signal.h +allow-header sys/types.h +allow-header time.h + +allow mq_* +allow MQ_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/ndbm.h-data b/REORG.TODO/conform/data/ndbm.h-data new file mode 100644 index 0000000000..2ee7a59253 --- /dev/null +++ b/REORG.TODO/conform/data/ndbm.h-data @@ -0,0 +1,28 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 +type datum +element datum {void*} dptr +element datum size_t dsize + +type size_t + +type DBM + +type mode_t + +constant DBM_INSERT +constant DBM_REPLACE + +function int dbm_clearerr (DBM*) +function void dbm_close (DBM*) +function int dbm_delete (DBM*, datum) +function int dbm_error (DBM*) +function datum dbm_fetch (DBM*, datum) +function datum dbm_firstkey (DBM*) +function datum dbm_nextkey (DBM*) +function {DBM*} dbm_open (const char*, int, mode_t) +function int dbm_store (DBM*, datum, datum, int) + +allow dbm_* +allow DBM_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/net/if.h-data b/REORG.TODO/conform/data/net/if.h-data new file mode 100644 index 0000000000..8a4d89c067 --- /dev/null +++ b/REORG.TODO/conform/data/net/if.h-data @@ -0,0 +1,16 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +type {struct if_nameindex} + +element {struct if_nameindex} {unsigned int} if_index +element {struct if_nameindex} {char*} if_name + +macro IF_NAMESIZE + +function {unsigned int} if_nametoindex (const char*) +function {char*} if_indextoname (unsigned int, char*) +function {struct if_nameindex*} if_nameindex (void) +function void if_freenameindex (struct if_nameindex*) + +allow *_t +allow IF_* +#endif diff --git a/REORG.TODO/conform/data/netdb.h-data b/REORG.TODO/conform/data/netdb.h-data new file mode 100644 index 0000000000..c6d8b70a0d --- /dev/null +++ b/REORG.TODO/conform/data/netdb.h-data @@ -0,0 +1,118 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 +optional-type in_port_t +optional-type in_addr_t + +type {struct hostent} + +element {struct hostent} {char*} h_name +element {struct hostent} {char**} h_aliases +element {struct hostent} int h_addrtype +element {struct hostent} int h_length +element {struct hostent} {char**} h_addr_list + +type {struct netent} + +element {struct netent} {char*} n_name +element {struct netent} {char**} n_aliases +element {struct netent} int n_addrtype +// Bug 21260: n_net has wrong type. +xfail[alpha-linux]-element {struct netent} uint32_t n_net + +type uint32_t + +type {struct protoent} + +element {struct protoent} {char*} p_name +element {struct protoent} {char**} p_aliases +element {struct protoent} int p_proto + +type {struct servent} + +element {struct servent} {char*} s_name +element {struct servent} {char**} s_aliases +element {struct servent} int s_port +element {struct servent} {char*} s_proto + +macro IPPORT_RESERVED + +#if !defined XOPEN2K8 && !defined POSIX2008 +// variable int h_errno +allow h_errno + +macro HOST_NOT_FOUND +macro NO_DATA +macro NO_RECOVERY +macro TRY_AGAIN +#endif + +#if !defined XPG42 && !defined UNIX98 +type {struct addrinfo} +element {struct addrinfo} int ai_flags +element {struct addrinfo} int ai_family +element {struct addrinfo} int ai_socktype +element {struct addrinfo} int ai_protocol +element {struct addrinfo} socklen_t ai_addrlen +element {struct addrinfo} {struct sockaddr*} ai_addr +element {struct addrinfo} {char*} ai_canonname +element {struct addrinfo} {struct addrinfo*} ai_next + +macro AI_PASSIVE +macro AI_CANONNAME +macro AI_NUMERICHOST +macro AI_V4MAPPED +macro AI_ALL +macro AI_ADDRCONFIG +macro AI_NUMERICSERV + +macro NI_NOFQDN +macro NI_NUMERICHOST +macro NI_NAMEREQD +macro NI_NUMERICSERV +macro NI_DGRAM + +macro EAI_AGAIN +macro EAI_BADFLAGS +macro EAI_FAIL +macro EAI_FAMILY +macro EAI_MEMORY +macro EAI_NONAME +macro EAI_SERVICE +macro EAI_SOCKTYPE +macro EAI_SYSTEM +macro EAI_OVERFLOW +#endif + +function void endhostent (void) +function void endnetent (void) +function void endprotoent (void) +function void endservent (void) +#if !defined XPG42 && !defined UNIX98 +function void freeaddrinfo (struct addrinfo*) +function {const char*} gai_strerror (int) +function int getaddrinfo (const char*, const char*, const struct addrinfo*, struct addrinfo**) +#endif +function {struct hostent*} gethostbyaddr (const void*, socklen_t, int) +function {struct hostent*} gethostbyname (const char*) +function {struct hostent*} gethostent (void) +#if !defined XPG42 && !defined UNIX98 +function int getnameinfo (const struct sockaddr*, socklen_t, char*, socklen_t, char*, socklen_t, int) +#endif +function {struct netent*} getnetbyaddr (uint32_t, int) +function {struct netent*} getnetbyname (const char*) +function {struct netent*} getnetent (void) +function {struct protoent*} getprotobyname (const char *) +function {struct protoent*} getprotobynumber (int) +function {struct protoent*} getprotoent (void) +function {struct servent*} getservbyname (const char*, const char*) +function {struct servent*} getservbyport (int, const char*) +function {struct servent*} getservent (void) +function void sethostent (int) +function void setnetent (int) +function void setprotoent (int) +function void setservent (int) + +type socklen_t + +allow-header netinet/in.h +allow-header inttypes.h +#endif diff --git a/REORG.TODO/conform/data/netinet/in.h-data b/REORG.TODO/conform/data/netinet/in.h-data new file mode 100644 index 0000000000..ac26a74e9e --- /dev/null +++ b/REORG.TODO/conform/data/netinet/in.h-data @@ -0,0 +1,95 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 +type in_port_t +type in_addr_t + +type sa_family_t + +type {struct in_addr} + +element {struct in_addr} in_addr_t s_addr + +type {struct sockaddr_in} + +element {struct sockaddr_in} sa_family_t sin_family +element {struct sockaddr_in} in_port_t sin_port +element {struct sockaddr_in} {struct in_addr} sin_addr +element {struct sockaddr_in} {unsigned char} sin_zero [8] + +type {struct in6_addr} + +element {struct in6_addr} uint8_t s6_addr [16] + +type {struct sockaddr_in6} + +element {struct sockaddr_in6} sa_family_t sin6_family +element {struct sockaddr_in6} in_port_t sin6_port +element {struct sockaddr_in6} uint32_t sin6_flowinfo +element {struct sockaddr_in6} {struct in6_addr} sin6_addr +element {struct sockaddr_in6} uint32_t sin6_scope_id + +variable {const struct in6_addr} in6addr_any + +// constant IN6ADDR_ANY_INIT +macro IN6ADDR_ANY_INIT + +variable {const struct in6_addr} in6addr_loopback + +// constant IN6ADDR_LOOPBACK_INIT +macro IN6ADDR_LOOPBACK_INIT + +type {struct ipv6_mreq} + +element {struct ipv6_mreq} {struct in6_addr} ipv6mr_multiaddr +element {struct ipv6_mreq} {unsigned int} ipv6mr_interface + +macro IPPROTO_IP +macro IPPROTO_IPV6 +macro IPPROTO_ICMP +macro IPPROTO_TCP +macro IPPROTO_UDP + +macro INADDR_ANY +macro INADDR_BROADCAST + +constant INET_ADDRSTRLEN == 16 + +function uint32_t htonl (uint32_t) +function uint16_t htons (uint16_t) +function uint32_t ntohl (uint32_t) +function uint16_t ntohs (uint16_t) + +allow-header inttypes.h +allow-header sys/socket.h + +constant INET6_ADDRSTRLEN == 46 + +macro IPV6_JOIN_GROUP +macro IPV6_LEAVE_GROUP +macro IPV6_MULTICAST_HOPS +macro IPV6_MULTICAST_IF +macro IPV6_MULTICAST_LOOP +macro IPV6_UNICAST_HOPS + +macro IN6_IS_ADDR_UNSPECIFIED +macro IN6_IS_ADDR_LOOPBACK +macro IN6_IS_ADDR_MULTICAST +macro IN6_IS_ADDR_LINKLOCAL +macro IN6_IS_ADDR_SITELOCAL +macro IN6_IS_ADDR_V4MAPPED +macro IN6_IS_ADDR_V4COMPAT +macro IN6_IS_ADDR_MC_NODELOCAL +macro IN6_IS_ADDR_MC_LINKLOCAL +macro IN6_IS_ADDR_MC_SITELOCAL +macro IN6_IS_ADDR_MC_ORGLOCAL +macro IN6_IS_ADDR_MC_GLOBAL + +allow IMPLINK_* +allow IN_* +allow IN6_* +allow INADDR_* +allow IP_* +allow IPV6_* +allow IPPORT_* +allow IPPROTO_* +allow SOCK_* +#endif diff --git a/REORG.TODO/conform/data/netinet/tcp.h-data b/REORG.TODO/conform/data/netinet/tcp.h-data new file mode 100644 index 0000000000..298808780d --- /dev/null +++ b/REORG.TODO/conform/data/netinet/tcp.h-data @@ -0,0 +1,5 @@ +#if defined XOPEN2K || defined POSIX2008 || defined XOPEN2K8 +macro TCP_NODELAY + +allow TCP_* +#endif diff --git a/REORG.TODO/conform/data/nl_types.h-data b/REORG.TODO/conform/data/nl_types.h-data new file mode 100644 index 0000000000..67a0d7a198 --- /dev/null +++ b/REORG.TODO/conform/data/nl_types.h-data @@ -0,0 +1,14 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +type nl_catd +type nl_item + +constant NL_SETD +constant NL_CAT_LOCALE + +function int catclose (nl_catd) +function {char*} catgets (nl_catd, int, int, const char*) +function nl_catd catopen (const char*, int) + +allow NL_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/poll.h-data b/REORG.TODO/conform/data/poll.h-data new file mode 100644 index 0000000000..f7ebb91715 --- /dev/null +++ b/REORG.TODO/conform/data/poll.h-data @@ -0,0 +1,27 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 +type {struct pollfd} +element {struct pollfd} int fd +element {struct pollfd} {short int} events +element {struct pollfd} {short int} revents + +type nfds_t + +constant POLLIN +constant POLLRDNORM +constant POLLRDBAND +constant POLLPRI +constant POLLOUT +constant POLLWRNORM +constant POLLWRBAND +constant POLLERR +constant POLLHUP +constant POLLNVAL + +function int poll (struct pollfd[], nfds_t, int) + +allow pd_* +allow ph_* +allow ps_* +allow POLL* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/pthread.h-data b/REORG.TODO/conform/data/pthread.h-data new file mode 100644 index 0000000000..6b10499458 --- /dev/null +++ b/REORG.TODO/conform/data/pthread.h-data @@ -0,0 +1,195 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42 +constant PTHREAD_CANCEL_ASYNCHRONOUS +constant PTHREAD_CANCEL_ENABLE +constant PTHREAD_CANCEL_DEFERRED +constant PTHREAD_CANCEL_DISABLE +constant PTHREAD_CANCELED +macro PTHREAD_COND_INITIALIZER +constant PTHREAD_CREATE_DETACHED +constant PTHREAD_CREATE_JOINABLE +constant PTHREAD_EXPLICIT_SCHED +constant PTHREAD_INHERIT_SCHED +constant PTHREAD_ONCE_INIT +optional-constant PTHREAD_PRIO_INHERIT +optional-constant PTHREAD_PRIO_NONE +optional-constant PTHREAD_PRIO_PROTECT +constant PTHREAD_PROCESS_SHARED +constant PTHREAD_PROCESS_PRIVATE +constant PTHREAD_SCOPE_PROCESS +constant PTHREAD_SCOPE_SYSTEM +macro PTHREAD_MUTEX_INITIALIZER +# ifndef POSIX +constant PTHREAD_MUTEX_DEFAULT +constant PTHREAD_MUTEX_ERRORCHECK +constant PTHREAD_MUTEX_NORMAL +constant PTHREAD_MUTEX_RECURSIVE +macro PTHREAD_RWLOCK_INITIALIZER +# endif +# if defined XOPEN2K8 || defined POSIX2008 +constant PTHREAD_MUTEX_ROBUST +constant PTHREAD_MUTEX_STALLED +# endif + +# ifndef POSIX +type pthread_attr_t +# ifndef UNIX98 +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 +type pthread_rwlock_t +type pthread_rwlockattr_t +# ifndef UNIX98 +type pthread_spinlock_t +# endif +type pthread_t +# endif + +function int pthread_atfork (void (*) (void), void (*) (void), void (*) (void)) +function int pthread_attr_destroy (pthread_attr_t*) +function int pthread_attr_getdetachstate (const pthread_attr_t*, int*) +# ifndef POSIX +function int pthread_attr_getguardsize (const pthread_attr_t*, size_t*) +# endif +function int pthread_attr_getinheritsched (const pthread_attr_t*, int*) +function int pthread_attr_getschedparam (const pthread_attr_t*, struct sched_param*) +function int pthread_attr_getschedpolicy (const pthread_attr_t*, int*) +function int pthread_attr_getscope (const pthread_attr_t*, int*) +function int pthread_attr_getstackaddr (const pthread_attr_t*, void**) +function int pthread_attr_getstacksize (const pthread_attr_t*, size_t*) +function int pthread_attr_init (pthread_attr_t*) +function int pthread_attr_setdetachstate (pthread_attr_t*, int) +# ifndef POSIX +function int pthread_attr_setguardsize (pthread_attr_t*, size_t) +# endif +function int pthread_attr_setinheritsched (pthread_attr_t*, int) +function int pthread_attr_setschedparam (pthread_attr_t*, const struct sched_param*) +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 && !defined UNIX98 +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*) +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 +// function int pthread_cleanup_pop (int) +macro pthread_cleanup_pop +function int pthread_cond_broadcast (pthread_cond_t*) +function int pthread_cond_destroy (pthread_cond_t*) +function int pthread_cond_init (pthread_cond_t*, const pthread_condattr_t*) +function int pthread_cond_signal (pthread_cond_t*) +function int pthread_cond_timedwait (pthread_cond_t*, pthread_mutex_t*, const struct timespec*) +function int pthread_cond_wait (pthread_cond_t*, pthread_mutex_t*) +function int pthread_condattr_destroy (pthread_condattr_t*) +#if !defined POSIX && !defined UNIX98 && !defined XOPEN2K +optional-function int pthread_condattr_getclock (const pthread_condattr_t*, clockid_t*) +#endif +function int pthread_condattr_getpshared (const pthread_condattr_t*, int*) +function int pthread_condattr_init (pthread_condattr_t*) +#if !defined POSIX && !defined UNIX98 && !defined XOPEN2K +optional-function int pthread_condattr_setclock (pthread_condattr_t*, clockid_t) +#endif +function int pthread_condattr_setpshared (pthread_condattr_t*, int) +function int pthread_create (pthread_t*, const pthread_attr_t*, void *(*) (void*), void*) +function int pthread_detach (pthread_t) +function int pthread_equal (pthread_t, pthread_t) +function void pthread_exit (void*) +# if !defined POSIX && !defined POSIX2008 +function int pthread_getconcurrency (void) +# endif +# if !defined POSIX && !defined UNIX98 +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**) +function int pthread_key_create (pthread_key_t*, void (*)(void*)) +function int pthread_key_delete (pthread_key_t) +function int pthread_mutex_destroy (pthread_mutex_t*) +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 && !defined UNIX98 +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)) +# if !defined POSIX +function int pthread_rwlock_init (pthread_rwlock_t*, const pthread_rwlockattr_t*) +function int pthread_rwlock_rdlock (pthread_rwlock_t*) +# endif +# if !defined POSIX && !defined UNIX98 +function int pthread_rwlock_timedrdlock (pthread_rwlock_t*, const struct timespec*) +function int pthread_rwlock_timedwrlock (pthread_rwlock_t*, const struct timespec*) +# endif +# if !defined POSIX +function int pthread_rwlock_tryrdlock (pthread_rwlock_t*) +function int pthread_rwlock_trywrlock (pthread_rwlock_t*) +function int pthread_rwlock_unlock (pthread_rwlock_t*) +function int pthread_rwlock_wrlock (pthread_rwlock_t*) +function int pthread_rwlockattr_destroy (pthread_rwlockattr_t*) +function int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t*, int*) +function int pthread_rwlockattr_init (pthread_rwlockattr_t*) +function int pthread_rwlockattr_setpshared (pthread_rwlockattr_t*, int) +# endif +function pthread_t pthread_self (void) +function int pthread_setcancelstate (int, int*) +function int pthread_setcanceltype (int, int*) +# 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*) +# if !defined POSIX && !defined UNIX98 && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 +function int pthread_sigmask (int, const sigset_t*, sigset_t*) +# endif +# if !defined POSIX && !defined UNIX98 +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 *) +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 + +allow PTHREAD_* +allow pthread_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/pwd.h-data b/REORG.TODO/conform/data/pwd.h-data new file mode 100644 index 0000000000..e86433d6a7 --- /dev/null +++ b/REORG.TODO/conform/data/pwd.h-data @@ -0,0 +1,34 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +#ifdef POSIX +# define uid_t __uid_t +# define gid_t __gid_t +#endif + +type {struct passwd} +element {struct passwd} {char*} pw_name +element {struct passwd} uid_t pw_uid +element {struct passwd} gid_t pw_gid +element {struct passwd} {char*} pw_dir +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**) +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 +function void endpwent (void) +function {struct passwd*} getpwent (void) +function void setpwent (void) +# endif + +allow pw_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/regex.h-data b/REORG.TODO/conform/data/regex.h-data new file mode 100644 index 0000000000..04f9034f81 --- /dev/null +++ b/REORG.TODO/conform/data/regex.h-data @@ -0,0 +1,45 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +type regex_t +element regex_t size_t re_nsub + +type regoff_t + +type regmatch_t +element regmatch_t regoff_t rm_so +element regmatch_t regoff_t rm_eo + +constant REG_EXTENDED +constant REG_ICASE +constant REG_NOSUB +constant REG_NEWLINE + +constant REG_NOTBOL +constant REG_NOTEOL + +constant REG_NOMATCH +constant REG_BADPAT +constant REG_ECOLLATE +constant REG_ECTYPE +constant REG_EESCAPE +constant REG_ESUBREG +constant REG_EBRACK +constant REG_EPAREN +constant REG_EBRACE +constant REG_BADBR +constant REG_ERANGE +constant REG_ESPACE +constant REG_BADRPT +# if !defined POSIX && !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) +function size_t regerror (int, const regex_t*, char*, size_t) +function void regfree (regex_t*) + +allow REG_* +allow re_* +allow rm_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/sched.h-data b/REORG.TODO/conform/data/sched.h-data new file mode 100644 index 0000000000..63e5eb2567 --- /dev/null +++ b/REORG.TODO/conform/data/sched.h-data @@ -0,0 +1,42 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42 +# if defined POSIX || defined UNIX98 +# include "time.h-data" +# else +allow-header time.h +# endif + +type {struct sched_param} +element {struct sched_param} int sched_priority +# if !defined POSIX && !defined UNIX98 +optional-element {struct sched_param} int sched_ss_low_priority +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 +# endif + +# if defined XOPEN2K8 || defined POSIX2008 +type pid_t +type time_t +type {struct timespec} +# endif + +constant SCHED_FIFO +constant SCHED_RR +# if !defined POSIX && !defined UNIX98 +optional-constant SCHED_SPORADIC +# endif +constant SCHED_OTHER + +function int sched_get_priority_max (int) +function int sched_get_priority_min (int) +function int sched_getparam (pid_t, struct sched_param*) +function int sched_getscheduler (pid_t) +function int sched_rr_get_interval (pid_t, struct timespec*) +function int sched_setparam (pid_t, const struct sched_param*) +function int sched_setscheduler (pid_t, int, const struct sched_param*) +function int sched_yield (void) + +allow sched_* +allow SCHED_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/search.h-data b/REORG.TODO/conform/data/search.h-data new file mode 100644 index 0000000000..e99f7e6c1d --- /dev/null +++ b/REORG.TODO/conform/data/search.h-data @@ -0,0 +1,34 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +type ENTRY +type {struct entry} +element {struct entry} {char*} key +element {struct entry} {void*} data + +type ACTION +constant FIND +constant ENTER + +type VISIT +constant preorder +constant postorder +constant endorder +constant leaf + +function int hcreate (size_t) +function void hdestroy (void) +function {ENTRY*} hsearch (ENTRY, ACTION) +#ifndef XPG4 +function void insque (void*, void*) +#endif +function {void*} lfind (const void*, const void*, size_t*, size_t, int (*)(const void*, const void*)) +function {void*} lsearch (const void*, void*, size_t*, size_t, int (*)(const void*, const void*)) +#ifndef XPG4 +function void remque (void*) +#endif +function {void*} tdelete (const void*, void**, int(*)(const void*, const void*)) +function {void*} tfind (const void*, void*const*, int(*)(const void*, const void*)) +function {void*} tsearch (const void*, void**, int(*)(const void*, const void*)) +function void twalk (const void*, void (*) (const void*, VISIT, int)) + +allow *_t +#endif diff --git a/REORG.TODO/conform/data/semaphore.h-data b/REORG.TODO/conform/data/semaphore.h-data new file mode 100644 index 0000000000..066c2f721b --- /dev/null +++ b/REORG.TODO/conform/data/semaphore.h-data @@ -0,0 +1,32 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42 +type sem_t + +constant SEM_FAILED + +function int sem_close (sem_t*) +function int sem_destroy (sem_t*) +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 && !defined UNIX98 +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*) + +allow-header fcntl.h +# if !defined POSIX2008 && !defined XOPEN2K8 +allow-header sys/types.h +# endif +// Consider addition of this permission in POSIX.1:2008 as a bug fix, +// so allow for POSIX.1:2001 as well since that includes sem_timedwait. +# if !defined POSIX && !defined UNIX98 +allow-header time.h +# endif + +allow sem_* +allow SEM_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/setjmp.h-data b/REORG.TODO/conform/data/setjmp.h-data new file mode 100644 index 0000000000..af28ddb59a --- /dev/null +++ b/REORG.TODO/conform/data/setjmp.h-data @@ -0,0 +1,24 @@ +type jmp_buf +#if !defined ISO && !defined ISO99 && !defined ISO11 +type sigjmp_buf +#endif + +function void longjmp (jmp_buf, int) +#if !defined ISO && !defined ISO99 && !defined ISO11 +function void siglongjmp (sigjmp_buf, int) +# if !defined POSIX && !defined POSIX2008 +function void _longjmp (jmp_buf, int) +# endif +#endif + +macro-function int setjmp (jmp_buf) +#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) +# endif +#endif + +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow *_t +#endif diff --git a/REORG.TODO/conform/data/signal.h-data b/REORG.TODO/conform/data/signal.h-data new file mode 100644 index 0000000000..571816484f --- /dev/null +++ b/REORG.TODO/conform/data/signal.h-data @@ -0,0 +1,313 @@ +macro-constant SIG_DFL {void(*)(int)} +macro-constant SIG_ERR {void(*)(int)} +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +macro-constant SIG_HOLD {void(*)(int)} +#endif +macro-constant SIG_IGN {void(*)(int)} + +type sig_atomic_t +#if !defined ISO && !defined ISO99 && !defined ISO11 +type sigset_t +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +type pid_t +#elif defined POSIX +# define pid_t __pid_t +# define uid_t __uid_t +#endif +#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 + +type {struct timespec} +element {struct timespec} __time_t tv_sec +// Bug 16437: tv_nsec has wrong type. +xfail[x86_64-x32-linux]-element {struct timespec} long tv_nsec +#endif + +#if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +element {union sigval} int sival_int +element {union sigval} {void*} sival_ptr + +type {struct sigevent} + +// Test the elements of the sigevent_t structure. +element {struct sigevent} int sigev_notify +element {struct sigevent} int sigev_signo +element {struct sigevent} {union sigval} sigev_value +element {struct sigevent} {void(*} sigev_notify_function )(union sigval) +element {struct sigevent} {pthread_attr_t*} sigev_notify_attributes + +constant SIGEV_NONE +constant SIGEV_SIGNAL +constant SIGEV_THREAD + +type {union sigval} + +macro SIGRTMIN +macro SIGRTMAX +#endif + +macro-int-constant SIGABRT {int} > 0 +macro-int-constant SIGFPE {int} > 0 +macro-int-constant SIGILL {int} > 0 +macro-int-constant SIGINT {int} > 0 +macro-int-constant SIGSEGV {int} > 0 +macro-int-constant SIGTERM {int} > 0 + +function void (*signal (int, void(*)(int)))(int) +function int raise (int) + +#if !defined ISO && !defined ISO99 && !defined ISO11 +macro-int-constant SIGALRM {int} > 0 +macro-int-constant SIGHUP {int} > 0 +macro-int-constant SIGKILL {int} > 0 +macro-int-constant SIGPIPE {int} > 0 +macro-int-constant SIGQUIT {int} > 0 +macro-int-constant SIGUSR1 {int} > 0 +macro-int-constant SIGUSR2 {int} > 0 +macro-int-constant SIGCHLD {int} > 0 +macro-int-constant SIGCONT {int} > 0 +macro-int-constant SIGSTOP {int} > 0 +macro-int-constant SIGTSTP {int} > 0 +macro-int-constant SIGTTIN {int} > 0 +macro-int-constant SIGTTOU {int} > 0 +# ifndef XPG4 +macro-int-constant SIGBUS {int} > 0 +# endif +# if !defined POSIX && !defined XPG4 +macro-int-constant SIGPOLL {int} > 0 +macro-int-constant SIGPROF {int} > 0 +macro-int-constant SIGSYS {int} > 0 +# endif +# if !defined POSIX && !defined XPG4 && !defined POSIX2008 +macro-int-constant SIGTRAP {int} > 0 +# endif +# if !defined POSIX && !defined XPG4 +macro-int-constant SIGURG {int} > 0 +macro-int-constant SIGVTALRM {int} > 0 +macro-int-constant SIGXCPU {int} > 0 +macro-int-constant SIGXFSZ {int} > 0 +# endif + +type {struct sigaction} + +element {struct sigaction} {void(*} sa_handler )(int) +element {struct sigaction} sigset_t sa_mask +element {struct sigaction} int sa_flags +# ifndef XPG4 +element {struct sigaction} {void(*} sa_sigaction )(int, siginfo_t*, void*) +# endif + +constant SA_NOCLDSTOP +# ifndef XPG4 +constant SA_SIGINFO +# endif +constant SIG_BLOCK +constant SIG_UNBLOCK +constant SIG_SETMASK +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 +constant SA_ONSTACK +# endif +# if !defined XPG4 && !defined POSIX +constant SA_RESETHAND +constant SA_RESTART +constant SA_NOCLDWAIT +constant SA_NODEFER +# endif +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 +constant SS_ONSTACK +constant SS_DISABLE +constant MINSIGSTKSZ +constant SIGSTKSZ +# endif + +# if !defined XPG4 && !defined POSIX +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 + +type stack_t + +element stack_t {void*} ss_sp +element stack_t size_t ss_size +element stack_t int ss_flags + +# if !defined XOPEN2K8 && !defined POSIX2008 +type {struct sigstack} + +element {struct sigstack} int ss_onstack +element {struct sigstack} {void*} ss_sp +# endif +# endif + +# ifndef XPG4 +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 +# ifndef POSIX +element siginfo_t pid_t si_pid +element siginfo_t uid_t si_uid +element siginfo_t {void*} si_addr +element siginfo_t int si_status +element siginfo_t long si_band +# endif +# ifndef XPG42 +element siginfo_t {union sigval} si_value +# endif +# endif + +# if !defined POSIX && !defined XPG4 +constant ILL_ILLOPC +constant ILL_ILLOPN +constant ILL_ILLADR +constant ILL_ILLTRP +constant ILL_PRVOPC +constant ILL_PRVREG +constant ILL_COPROC +constant ILL_BADSTK +constant FPE_INTDIV +constant FPE_INTOVF +constant FPE_FLTDIV +constant FPE_FLTOVF +constant FPE_FLTUND +constant FPE_FLTRES +constant FPE_FLTINV +constant FPE_FLTSUB +constant SEGV_MAPERR +constant SEGV_ACCERR +constant BUS_ADRALN +constant BUS_ADRERR +constant BUS_OBJERR +constant CLD_EXITED +constant CLD_KILLED +constant CLD_DUMPED +constant CLD_TRAPPED +constant CLD_STOPPED +constant CLD_CONTINUED +constant POLL_IN +constant POLL_OUT +constant POLL_MSG +constant POLL_ERR +constant POLL_PRI +constant POLL_HUP +# endif +# if !defined POSIX && !defined XPG4 && !defined POSIX2008 +constant TRAP_BRKPT +constant TRAP_TRACE +# endif +# if !defined XPG4 && !defined XPG42 +constant SI_USER +constant SI_QUEUE +constant SI_TIMER +constant SI_ASYNCIO +constant SI_MESGQ +# endif + +# if !defined XPG4 && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008 +function void (*bsd_signal (int, void(*)(int)))(int) +# endif +function int kill (pid_t, int) +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 +function int killpg (pid_t, int) +# endif +# if !defined XPG4 && !defined XPG42 +function int pthread_kill (pthread_t, int) +function int pthread_sigmask (int, const sigset_t*, sigset_t*) +# endif +function int sigaction (int, const struct sigaction*, struct sigaction*) +function int sigaddset (sigset_t*, int) +# if !defined XPG4 && !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 XPG4 && !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) +#if !defined XPG4 && !defined POSIX && !defined POSIX2008 +function int sigpause (int) +# endif +function int sigpending (sigset_t*) +function int sigprocmask (int, const sigset_t*, sigset_t*) +# if !defined XPG4 && !defined XPG42 +function int sigqueue (pid_t, int, const union sigval) +# endif +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 +function int sigrelse (int) +function void (*sigset (int, void(*)(int)))(int) +# endif +# if defined XPG42 || defined UNIX98 +function int sigstack (struct sigstack*, struct sigstack*) +# endif +function int sigsuspend (const sigset_t*) +# if !defined XPG4 && !defined XPG42 +function int sigtimedwait (const sigset_t*, siginfo_t*, const struct timespec*) +# endif +# if !defined XPG4 && !defined XPG42 +function int sigwait (const sigset_t*, int*) +function int sigwaitinfo (const sigset_t*, siginfo_t*) +# endif +# 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. +allow sa_* +allow SA_* +# ifndef XPG4 +allow si_* +allow SI_* +# endif +# if !defined XPG4 && !defined XPG42 +allow sigev_* +allow SIGEV_* +allow sival_* +# endif +# if !defined POSIX && !defined XPG4 && !defined XPG42 +allow uc_* +# endif +# if !defined POSIX && !defined XPG4 +allow BUS_* +allow CLD_* +allow FPE_* +allow ILL_* +allow POLL_* +allow SEGV_* +# endif +# if !defined POSIX && !defined XPG4 && !defined POSIX2008 +allow SS_* +allow SV_* +allow TRAP_* +allow ss_* +allow sv_* +# endif +allow *_t + +allow-header time.h +#endif + +allow SIG[ABCDEFGHIJKLMNOPQRSTUVWXYZ]* +allow SIG_* diff --git a/REORG.TODO/conform/data/spawn.h-data b/REORG.TODO/conform/data/spawn.h-data new file mode 100644 index 0000000000..de4aaa7fe2 --- /dev/null +++ b/REORG.TODO/conform/data/spawn.h-data @@ -0,0 +1,43 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +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 +constant POSIX_SPAWN_SETSCHEDPARAM +constant POSIX_SPAWN_SETSCHEDULER +constant POSIX_SPAWN_SETSIGDEF +constant POSIX_SPAWN_SETSIGMASK + +function int posix_spawnattr_destroy (posix_spawnattr_t*) +function int posix_spawnattr_getsigdefault (const posix_spawnattr_t*, sigset_t*) +function int posix_spawnattr_getflags (const posix_spawnattr_t*, short*) +function int posix_spawnattr_getpgroup (const posix_spawnattr_t*, pid_t*) +function int posix_spawnattr_getschedparam (const posix_spawnattr_t*, struct sched_param*) +function int posix_spawnattr_getschedpolicy (const posix_spawnattr_t*, int*) +function int posix_spawnattr_getsigmask (const posix_spawnattr_t*, sigset_t*) +function int posix_spawnattr_init (posix_spawnattr_t*) +function int posix_spawnattr_setsigdefault (posix_spawnattr_t*, const sigset_t*) +function int posix_spawnattr_setflags (posix_spawnattr_t*, short) +function int posix_spawnattr_setpgroup (posix_spawnattr_t*, pid_t) +function int posix_spawnattr_setschedparam (posix_spawnattr_t*, const struct sched_param*) +function int posix_spawnattr_setschedpolicy (posix_spawnattr_t*, int) +function int posix_spawnattr_setsigmask (posix_spawnattr_t*, const sigset_t*) +function int posix_spawn_file_actions_addclose (posix_spawn_file_actions_t*, int) +function int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t*, int, int) +function int posix_spawn_file_actions_addopen (posix_spawn_file_actions_t*, int, const char *, int, mode_t) +function int posix_spawn_file_actions_destroy (posix_spawn_file_actions_t*) +function int posix_spawn_file_actions_init (posix_spawn_file_actions_t*) +function int posix_spawn (pid_t*, const char*, const posix_spawn_file_actions_t*, const posix_spawnattr_t*, char *const[], char *const[]); +function int posix_spawnp (pid_t*, const char*, const posix_spawn_file_actions_t*, const posix_spawnattr_t*, char *const[], char *const[]); + +allow-header sched.h +allow-header signal.h +allow-header sys/types.h +#endif diff --git a/REORG.TODO/conform/data/stdalign.h-data b/REORG.TODO/conform/data/stdalign.h-data new file mode 100644 index 0000000000..edc2310e98 --- /dev/null +++ b/REORG.TODO/conform/data/stdalign.h-data @@ -0,0 +1,6 @@ +#if defined ISO11 +macro alignas +macro alignof +macro-int-constant __alignas_is_defined {int} == 1 +macro-int-constant __alignof_is_defined {int} == 1 +#endif diff --git a/REORG.TODO/conform/data/stdarg.h-data b/REORG.TODO/conform/data/stdarg.h-data new file mode 100644 index 0000000000..53addb91fa --- /dev/null +++ b/REORG.TODO/conform/data/stdarg.h-data @@ -0,0 +1,14 @@ +type va_list + +// XXX We didn't check the parameters. +macro va_start +macro va_arg +macro va_end + +#if defined ISO99 || defined ISO11 || defined XOPEN2K || defined POSIX2008 || defined XOPEN2K8 +macro va_copy +#endif + +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow *_t +#endif diff --git a/REORG.TODO/conform/data/stdbool.h-data b/REORG.TODO/conform/data/stdbool.h-data new file mode 100644 index 0000000000..a030e9cffe --- /dev/null +++ b/REORG.TODO/conform/data/stdbool.h-data @@ -0,0 +1,10 @@ +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +macro bool +macro-int-constant true {int} == 1 +macro-int-constant false {int} == 0 +macro-int-constant __bool_true_false_are_defined {int} == 1 + +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow *_t +#endif +#endif diff --git a/REORG.TODO/conform/data/stddef.h-data b/REORG.TODO/conform/data/stddef.h-data new file mode 100644 index 0000000000..9ded4f1ca0 --- /dev/null +++ b/REORG.TODO/conform/data/stddef.h-data @@ -0,0 +1,15 @@ +macro-constant NULL == 0 + +macro offsetof + +type ptrdiff_t +type wchar_t +type size_t + +#if defined ISO11 +type max_align_t +#endif + +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow *_t +#endif diff --git a/REORG.TODO/conform/data/stdint.h-data b/REORG.TODO/conform/data/stdint.h-data new file mode 100644 index 0000000000..4e84e17fb8 --- /dev/null +++ b/REORG.TODO/conform/data/stdint.h-data @@ -0,0 +1,119 @@ +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +// The requirements for some types and corresponding macros are from POSIX. +type int8_t +type int16_t +type int32_t +type int64_t +type uint8_t +type uint16_t +type uint32_t +type uint64_t + +type int_least8_t +type int_least16_t +type int_least32_t +type int_least64_t +type uint_least8_t +type uint_least16_t +type uint_least32_t +type uint_least64_t + +type int_fast8_t +type int_fast16_t +type int_fast32_t +type int_fast64_t +type uint_fast8_t +type uint_fast16_t +type uint_fast32_t +type uint_fast64_t + +type intptr_t +type uintptr_t + +type intmax_t +type uintmax_t + +macro-int-constant INT8_MIN {promoted:int8_t} == -128 +macro-int-constant INT8_MAX {promoted:int8_t} == 127 +macro-int-constant INT16_MIN {promoted:int16_t} == -32768 +macro-int-constant INT16_MAX {promoted:int16_t} == 32767 +macro-int-constant INT32_MIN {promoted:int32_t} == -2147483647-1 +macro-int-constant INT32_MAX {promoted:int32_t} == 2147483647 +macro-int-constant INT64_MIN {promoted:int64_t} == -9223372036854775807LL-1 +macro-int-constant INT64_MAX {promoted:int64_t} == 9223372036854775807LL + +macro-int-constant UINT8_MAX {promoted:uint8_t} == 255 +macro-int-constant UINT16_MAX {promoted:uint16_t} == 65535 +macro-int-constant UINT32_MAX {promoted:uint32_t} == 4294967295U +macro-int-constant UINT64_MAX {promoted:uint64_t} == 18446744073709551615ULL + +macro-int-constant INT_LEAST8_MIN {promoted:int_least8_t} <= -128 +macro-int-constant INT_LEAST8_MAX {promoted:int_least8_t} >= 127 +macro-int-constant INT_LEAST16_MIN {promoted:int_least16_t} <= -32768 +macro-int-constant INT_LEAST16_MAX {promoted:int_least16_t} >= 32767 +macro-int-constant INT_LEAST32_MIN {promoted:int_least32_t} <= -2147483647-1 +macro-int-constant INT_LEAST32_MAX {promoted:int_least32_t} >= 2147483647 +macro-int-constant INT_LEAST64_MIN {promoted:int_least64_t} <= -9223372036854775807LL-1 +macro-int-constant INT_LEAST64_MAX {promoted:int_least64_t} >= 9223372036854775807LL + +macro-int-constant UINT_LEAST8_MAX {promoted:uint_least8_t} >= 255 +macro-int-constant UINT_LEAST16_MAX {promoted:uint_least16_t} >= 65535 +macro-int-constant UINT_LEAST32_MAX {promoted:uint_least32_t} >= 4294967295U +macro-int-constant UINT_LEAST64_MAX {promoted:uint_least64_t} >= 18446744073709551615ULL + +macro-int-constant INT_FAST8_MIN {promoted:int_fast8_t} <= -128 +macro-int-constant INT_FAST8_MAX {promoted:int_fast8_t} >= 127 +macro-int-constant INT_FAST16_MIN {promoted:int_fast16_t} <= -32768 +macro-int-constant INT_FAST16_MAX {promoted:int_fast16_t} >= 32767 +macro-int-constant INT_FAST32_MIN {promoted:int_fast32_t} <= -2147483647-1 +macro-int-constant INT_FAST32_MAX {promoted:int_fast32_t} >= 2147483647 +macro-int-constant INT_FAST64_MIN {promoted:int_fast64_t} <= -9223372036854775807LL-1 +macro-int-constant INT_FAST64_MAX {promoted:int_fast64_t} >= 9223372036854775807LL + +macro-int-constant UINT_FAST8_MAX {promoted:uint_fast8_t} >= 255 +macro-int-constant UINT_FAST16_MAX {promoted:uint_fast16_t} >= 65535 +macro-int-constant UINT_FAST32_MAX {promoted:uint_fast32_t} >= 4294967295U +macro-int-constant UINT_FAST64_MAX {promoted:uint_fast64_t} >= 18446744073709551615ULL + +macro-int-constant INTPTR_MIN {promoted:intptr_t} <= -32768 +macro-int-constant INTPTR_MAX {promoted:intptr_t} >= 32767 + +macro-int-constant UINTPTR_MAX {promoted:uintptr_t} >= 65535 + +macro-int-constant INTMAX_MIN {promoted:intmax_t} <= -9223372036854775807LL-1 +macro-int-constant INTMAX_MAX {promoted:intmax_t} >= 9223372036854775807LL + +macro-int-constant UINTMAX_MAX {promoted:uintmax_t} >= 18446744073709551615ULL + +macro-int-constant PTRDIFF_MIN {promoted:__PTRDIFF_TYPE__} <= -65535 +macro-int-constant PTRDIFF_MAX {promoted:__PTRDIFF_TYPE__} >= 65535 + +macro-int-constant SIG_ATOMIC_MIN {promoted:__SIG_ATOMIC_TYPE__} +macro-int-constant SIG_ATOMIC_MAX {promoted:__SIG_ATOMIC_TYPE__} >= 127 + +macro-int-constant SIZE_MAX {promoted:__SIZE_TYPE__} >= 65535 + +macro-int-constant WCHAR_MIN {promoted:__WCHAR_TYPE__} +macro-int-constant WCHAR_MAX {promoted:__WCHAR_TYPE__} >= 127 + +macro-int-constant WINT_MIN {promoted:__WINT_TYPE__} +macro-int-constant WINT_MAX {promoted:__WINT_TYPE__} >= 127 + +macro INT8_C +macro INT16_C +macro INT32_C +macro INT64_C +macro UINT8_C +macro UINT16_C +macro UINT32_C +macro UINT64_C +macro INTMAX_C +macro UINTMAX_C + +// The following expressions are not entirely correct but the current +// poorfnmatch implementation doesn't grok the right forms (INT*_MAX, +// INT*_MIN, INT*_C, UINT*_MAX, UINT*_MIN, UINT*_C, int*_t, uint*_t). +allow INT* +allow UINT* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/stdio.h-data b/REORG.TODO/conform/data/stdio.h-data new file mode 100644 index 0000000000..f69802cc70 --- /dev/null +++ b/REORG.TODO/conform/data/stdio.h-data @@ -0,0 +1,194 @@ +macro-int-constant BUFSIZ >= 256 +macro-int-constant FILENAME_MAX +macro-int-constant FOPEN_MAX >= 8 + +macro-int-constant _IOFBF +macro-int-constant _IOLBF +macro-int-constant _IONBF + +#if !defined ISO && !defined ISO99 && !defined ISO11 +constant L_ctermid +# if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 +# ifdef POSIX +optional-constant L_cuserid +# else +constant L_cuserid +# endif +# endif +#endif +macro-int-constant L_tmpnam + +macro-int-constant SEEK_CUR +macro-int-constant SEEK_END +macro-int-constant SEEK_SET + +macro-int-constant TMP_MAX >= 10000 + +macro-int-constant EOF < 0 + +macro-constant NULL == 0 + +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +constant P_tmpdir +#endif + +macro stdin {FILE *} +macro stdout {FILE *} +macro stderr {FILE *} + +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 +type ssize_t +#endif + +function void clearerr (FILE*) +#if !defined ISO && !defined ISO99 && !defined ISO11 +function {char*} ctermid (char*) +# if defined XPG4 || defined XPG42 || 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 ISO && !defined ISO99 && !defined ISO11 +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 POSIX || defined UNIX98 || 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 +function {FILE*} fopen (const char*, const char*) +function int fprintf (FILE*, const char*, ...) +function int fputc (int, FILE*) +function int fputs (const char*, FILE*) +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 UNIX98 || 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 UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +function off_t ftello (FILE*) +#endif +#if defined POSIX || defined UNIX98 || 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 POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +function int getc_unlocked (FILE*) +function int getchar_unlocked (void) +#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 XPG4 || defined XPG42 || defined UNIX98 +function int getopt (int, char *const[], const char *) +#endif +#if !defined ISO11 +function {char*} gets (char*) +#endif +#if defined XPG4 || defined XPG42 || 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 POSIX || defined UNIX98 || 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 XPG4 || defined XPG42 || defined UNIX98 +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*) +function int setvbuf (FILE*, char*, int, size_t) +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 +function int snprintf (char*, size_t, const char*, ...) +#endif +function int sprintf (char *, const char *, ...) +function int sscanf (const char*, const char*, ...) +#if defined XPG4 || defined XPG42 || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 +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) +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function int vfscanf (FILE*, const char*, va_list) +#endif +function int vprintf (const char*, va_list) +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function int vscanf (const char*, va_list) +#endif +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 +function int vsnprintf (char*, size_t, const char*, va_list) +#endif +function int vsprintf (char*, const char*, va_list) +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function int vsscanf (const char*, const char*, va_list) +#endif + +#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 +variable {char*} optarg +variable int opterr +variable int optind +variable int optopt +#endif + +#if !defined POSIX +allow-header stddef.h +#endif + +allow *_t +#endif diff --git a/REORG.TODO/conform/data/stdlib.h-data b/REORG.TODO/conform/data/stdlib.h-data new file mode 100644 index 0000000000..d8fcccc2fb --- /dev/null +++ b/REORG.TODO/conform/data/stdlib.h-data @@ -0,0 +1,202 @@ +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-int-constant EXIT_FAILURE +macro-int-constant EXIT_SUCCESS == 0 + +macro-constant NULL == 0 +macro-int-constant RAND_MAX >= 32767 +macro MB_CUR_MAX + +#if defined ISO99 || defined ISO11 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008 +type lldiv_t +element lldiv_t {long long} quot +element lldiv_t {long long} rem +#endif +type size_t +type wchar_t + +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +constant WNOHANG +constant WUNTRACED + +macro WEXITSTATUS +macro WIFEXITED +macro WIFSIGNALED +macro WIFSTOPPED +macro WSTOPSIG +macro WTERMSIG +#endif + +#if !defined ISO && !defined XPG4 && !defined XPG42 && !defined UNIX98 && !defined POSIX +function void _Exit (int) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !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 ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !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 ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +function double drand48 (void) +#endif +#if defined XPG42 || defined UNIX98 || defined XOPEN2K +function {char*} ecvt (double, int, int*, int*) +#endif +#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 XPG42 || defined UNIX98 || defined XOPEN2K +function {char*} fcvt (double, int, int*, int*) +#endif +function void free (void*) +#if defined XPG42 || defined UNIX98 || defined XOPEN2K +function {char*} gcvt (double, int, char*) +#endif +function {char*} getenv (const char*) +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX +function int getsubopt (char**, char *const*, char**) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +function int grantpt (int) +function {char*} initstate (unsigned int, char*, size_t) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +function {long int} jrand48 (unsigned short int[3]) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +function {char*} l64a (long) +#endif +function {long int} labs (long int) +#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 ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function {long long} llabs (long long) +function lldiv_t lldiv (long long, long long) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !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 ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 +function {char*} mktemp (char*) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX +function int mkstemp (char*) +#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 ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +function {char*} ptsname (int) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +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*) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +function long random (void) +#endif +function {void*} realloc (void*, size_t) +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +function {char*} realpath (const char*, char*) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +function {unsigned short int*} seed48 (unsigned short int[3]) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function int setenv (const char*, const char*, int) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +function void setkey (const char*) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +function {char*} setstate (char*) +#endif +function void srand (unsigned int) +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +function void srand48 (long int) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +function void srandom (unsigned) +#endif +function double strtod (const char*, char**) +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function float strtof (const char*, char**) +function {long double} strtold (const char*, char**) +#endif +function {long int} strtol (const char*, char**, int) +function {unsigned long int} strtoul (const char*, char**, int) +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function {long long int} strtoll (const char*, char**, int) +function {unsigned long long int} strtoull (const char*, char**, int) +#endif +function int system (const char*) +#if defined XPG42 || defined UNIX98 +function int ttyslot (void) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +function int unlockpt (int) +#endif +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function int unsetenv (const char*) +#endif +#if defined XPG42 || defined UNIX98 +function {void*} valloc (size_t) +#endif +function size_t wcstombs (char*, const wchar_t*, size_t) +function int wctomb (char*, wchar_t) + +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +allow-header stddef.h +allow-header limits.h +allow-header math.h +allow-header sys/wait.h +#endif + +allow str[abcdefghijklmnopqrstuvwxyz]* +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow *_t +#endif diff --git a/REORG.TODO/conform/data/stdnoreturn.h-data b/REORG.TODO/conform/data/stdnoreturn.h-data new file mode 100644 index 0000000000..77b9a589d8 --- /dev/null +++ b/REORG.TODO/conform/data/stdnoreturn.h-data @@ -0,0 +1,3 @@ +#if defined ISO11 +macro noreturn +#endif diff --git a/REORG.TODO/conform/data/string.h-data b/REORG.TODO/conform/data/string.h-data new file mode 100644 index 0000000000..e06f941498 --- /dev/null +++ b/REORG.TODO/conform/data/string.h-data @@ -0,0 +1,73 @@ +macro-constant NULL == 0 + +type size_t +#if defined XOPEN2K8 || defined POSIX2008 +type locale_t +#endif + +#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) +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*) +#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined XPG4 && !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) +#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*) +#if defined POSIX || defined UNIX98 || 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) +#endif + +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX +allow-header stddef.h +#endif + +allow str[abcdefghijklmnopqrstuvwxyz]* +allow mem[abcdefghijklmnopqrstuvwxyz]* +allow wcs[abcdefghijklmnopqrstuvwxyz]* +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow *_t +#endif diff --git a/REORG.TODO/conform/data/strings.h-data b/REORG.TODO/conform/data/strings.h-data new file mode 100644 index 0000000000..13827ebed9 --- /dev/null +++ b/REORG.TODO/conform/data/strings.h-data @@ -0,0 +1,25 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 +# 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 POSIX2008 +function int ffs (int) +# endif +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 +#endif diff --git a/REORG.TODO/conform/data/stropts.h-data b/REORG.TODO/conform/data/stropts.h-data new file mode 100644 index 0000000000..c4b1343411 --- /dev/null +++ b/REORG.TODO/conform/data/stropts.h-data @@ -0,0 +1,140 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 +type {struct bandinfo} + +element {struct bandinfo} {unsigned char} bi_pri +element {struct bandinfo} int bi_flag + +type {struct strpeek} + +element {struct strpeek} {struct strbuf} ctlbuf +element {struct strpeek} {struct strbuf} databuf +element {struct strpeek} t_uscalar_t flags + +type {struct strbuf} + +element {struct strbuf} int maxlen +element {struct strbuf} int len +element {struct strbuf} {char*} buf + +type {struct strfdinsert} + +element {struct strfdinsert} {struct strbuf} ctlbuf +element {struct strfdinsert} {struct strbuf} databuf +element {struct strfdinsert} t_uscalar_t flags +element {struct strfdinsert} int fildes +element {struct strfdinsert} int offset + +type {struct strioctl} + +element {struct strioctl} int ic_cmd +element {struct strioctl} int ic_timout +element {struct strioctl} int ic_len +element {struct strioctl} {char*} ic_dp + +type {struct strrecvfd} + +element {struct strrecvfd} int fd +element {struct strrecvfd} uid_t uid +element {struct strrecvfd} gid_t gid + +type uid_t +type gid_t + +type t_uscalar_t + +type {struct str_list} + +element {struct str_list} int sl_nmods +element {struct str_list} {struct str_mlist*} sl_modlist + +type {struct str_mlist} + +element {struct str_mlist} char l_name [FMNAMESZ+1] + +macro I_PUSH +macro I_POP +macro I_LOOK +macro FMNAMESZ +macro I_FLUSH +macro FLUSHR +macro FLUSHW +macro FLUSHRW +macro I_FLUSHBAND +macro I_SETSIG +macro S_RDNORM +macro S_RDBAND +macro S_INPUT +macro S_HIPRI +macro S_OUTPUT +macro S_WRNORM +macro S_WRBAND +macro S_MSG +macro S_ERROR +macro S_HANGUP +macro S_BANDURG +macro I_GETSIG +macro I_FIND +macro I_PEEK +macro RS_HIPRI +macro I_SRDOPT +macro RNORM +macro RMSGD +macro RMSGN +macro RPROTNORM +macro RPROTDAT +macro RPROTDIS +macro I_GRDOPT +macro I_NREAD +macro I_FDINSERT +macro I_STR +macro I_SWROPT +macro SNDZERO +macro I_GWROPT +macro I_SENDFD +macro I_RECVFD +macro I_LIST +macro I_ATMARK +macro ANYMARK +macro LASTMARK +macro I_CKBAND +macro I_GETBAND +macro I_CANPUT +macro I_SETCLTIME +macro I_GETCLTIME +macro I_LINK +macro I_UNLINK +macro I_PLINK +macro I_PUNLINK + +macro MSG_ANY +macro MSG_BAND +macro MSG_HIPRI +macro MORECTL +macro MOREDATA + +function int isastream (int) +function int getmsg (int, struct strbuf*, struct strbuf*, int*) +function int getpmsg (int, struct strbuf*, struct strbuf*, int*, int*) +// Bug 14362: wrong type for ioctl. +xfail-function int ioctl (int, int, ...) +function int putmsg (int, const struct strbuf*, const struct strbuf*, int) +function int putpmsg (int, const struct strbuf*, const struct strbuf*, int, int) +function int fattach (int, const char*) +function int fdetach (const char*) + +allow-header unistd.h + +allow bi_* +allow ic_* +allow l_* +allow sl_* +allow str_* +allow FLUSH* +allow I_* +allow M_* +allow MUXID_R* +allow S_* +allow SND* +allow STR* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/sys/ipc.h-data b/REORG.TODO/conform/data/sys/ipc.h-data new file mode 100644 index 0000000000..70dc3f6fe6 --- /dev/null +++ b/REORG.TODO/conform/data/sys/ipc.h-data @@ -0,0 +1,31 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +type {struct ipc_perm} + +element {struct ipc_perm} uid_t uid +element {struct ipc_perm} gid_t gid +element {struct ipc_perm} uid_t cuid +element {struct ipc_perm} gid_t cgid +// Bug 18231: wrong type for mode member. +xfail-element {struct ipc_perm} mode_t mode + +type uid_t +type gid_t +type mode_t +type key_t + +constant IPC_CREAT +constant IPC_EXCL +constant IPC_NOWAIT + +constant IPC_PRIVATE + +constant IPC_RMID +constant IPC_SET +constant IPC_STAT + +function key_t ftok (const char*, int) + +allow ipc_* +allow IPC_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/sys/mman.h-data b/REORG.TODO/conform/data/sys/mman.h-data new file mode 100644 index 0000000000..a74388338e --- /dev/null +++ b/REORG.TODO/conform/data/sys/mman.h-data @@ -0,0 +1,64 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 +constant PROT_READ +constant PROT_WRITE +constant PROT_EXEC +constant PROT_NONE + +constant MAP_SHARED +constant MAP_PRIVATE +constant MAP_FIXED + +constant MS_ASYNC +constant MS_SYNC +constant MS_INVALIDATE + +constant MCL_CURRENT +constant MCL_FUTURE + +constant MAP_FAILED + +# if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +constant POSIX_MADV_NORMAL +constant POSIX_MADV_SEQUENTIAL +constant POSIX_MADV_RANDOM +constant POSIX_MADV_WILLNEED +constant POSIX_MADV_DONTNEED + +optional-constant POSIX_TYPED_MEM_ALLOCATE +optional-constant POSIX_TYPED_MEM_ALLOCATE_CONTIG +optional-constant POSIX_TYPED_MEM_MAP_ALLOCATABLE + +type mode_t + +optional-type {struct posix_typedmem_info} +optional-element {struct posix_typedmem_info} size_t posix_tmi_length + +function int posix_madvise (void*, size_t, int) +optional-function int posix_mem_offset (const void*, size_t, off_t*, size_t*, int*) +optional-function int posix_typed_mem_get_info (int, struct posix_typed_mem_info*) +optional-function int posix_typed_mem_open (const char*, int, int) +# endif + +# ifndef POSIX +type size_t +type off_t +# endif + +function int mlock (const void*, size_t) +function int mlockall (int) +function {void*} mmap (void*, size_t, int, int, int, off_t) +function int mprotect (void*, size_t, int) +function int msync (void*, size_t, int) +function int munlock (const void*, size_t) +function int munlockall (void) +function int munmap (void*, size_t) +function int shm_open (const char*, int, mode_t) +function int shm_unlink (const char*) + +allow shm_* +allow MAP_* +allow MCL_* +allow MS_* +allow PROT_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/sys/msg.h-data b/REORG.TODO/conform/data/sys/msg.h-data new file mode 100644 index 0000000000..a8290cab52 --- /dev/null +++ b/REORG.TODO/conform/data/sys/msg.h-data @@ -0,0 +1,34 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +type {struct msqid_ds} + +type msgqnum_t +type msglen_t + +constant MSG_NOERROR + +element {struct msqid_ds} {struct ipc_perm} msg_perm +element {struct msqid_ds} msgqnum_t msg_qnum +element {struct msqid_ds} msglen_t msg_qbytes +element {struct msqid_ds} pid_t msg_lspid +element {struct msqid_ds} pid_t msg_lrpid +element {struct msqid_ds} time_t msg_stime +element {struct msqid_ds} time_t msg_rtime +element {struct msqid_ds} time_t msg_ctime + +type pid_t +type time_t +type key_t +type size_t +type ssize_t + +function int msgctl (int, int, struct msqid_ds*) +function int msgget (key_t, int) +function ssize_t msgrcv (int, void*, size_t, long int, int) +function int msgsnd (int, const void*, size_t, int) + +allow-header sys/ipc.h + +allow msg* +allow MSG* +allow *_h +#endif diff --git a/REORG.TODO/conform/data/sys/resource.h-data b/REORG.TODO/conform/data/sys/resource.h-data new file mode 100644 index 0000000000..cedbee1a40 --- /dev/null +++ b/REORG.TODO/conform/data/sys/resource.h-data @@ -0,0 +1,52 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 +constant PRIO_PROCESS +constant PRIO_PGRP +constant PRIO_USER + +type rlim_t + +constant RLIM_INFINITY +constant RLIM_SAVED_MAX +constant RLIM_SAVED_CUR + +constant RUSAGE_SELF +constant RUSAGE_CHILDREN + +type {struct rlimit} + +element {struct rlimit} rlim_t rlim_cur +element {struct rlimit} rlim_t rlim_max + +type {struct rusage} + +element {struct rusage} {struct timeval} ru_utime +element {struct rusage} {struct timeval} ru_stime + +type {struct timeval} + +constant RLIMIT_CORE +constant RLIMIT_CPU +constant RLIMIT_DATA +constant RLIMIT_FSIZE +constant RLIMIT_NOFILE +constant RLIMIT_STACK +constant RLIMIT_AS + +function int getpriority (int, id_t) +function int getrlimit (int, struct rlimit*) +function int getrusage (int, struct rusage*) +function int setpriority (int, id_t, int) +function int setrlimit (int, const struct rlimit*) + +type id_t + +allow-header sys/time.h + +allow rlim_* +allow ru_* +allow PRIO_* +allow RLIM_* +allow RLIMIT_* +allow RUSAGE_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/sys/select.h-data b/REORG.TODO/conform/data/sys/select.h-data new file mode 100644 index 0000000000..44d63ebd2d --- /dev/null +++ b/REORG.TODO/conform/data/sys/select.h-data @@ -0,0 +1,36 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +type time_t +type suseconds_t + +type {struct timeval} +element {struct timeval} time_t tv_sec +element {struct timeval} suseconds_t tv_usec + +type sigset_t + +type {struct timespec} +element {struct timespec} time_t tv_sec +// Bug 16437: tv_nsec has wrong type. +xfail[x86_64-x32-linux]-element {struct timespec} long tv_nsec + +type fd_set +#if defined XPG4 || defined XPG42 || defined UNIX98 +element fd_set long fds_bits [] +#endif + +macro FD_CLR +macro FD_ISSET +macro FD_SET +macro FD_ZERO + +macro FD_SETSIZE + +#if defined XOPEN2K || defined POSIX2008 || defined XOPEN2K8 +function int pselect (int, fd_set*, fd_set*, fd_set*, const struct timespec*, const sigset_t*) +#endif +function int select (int, fd_set*, fd_set*, fd_set*, struct timeval*) + +allow-header signal.h +allow-header sys/time.h +allow-header time.h +#endif diff --git a/REORG.TODO/conform/data/sys/sem.h-data b/REORG.TODO/conform/data/sys/sem.h-data new file mode 100644 index 0000000000..a36ab1bd91 --- /dev/null +++ b/REORG.TODO/conform/data/sys/sem.h-data @@ -0,0 +1,40 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +constant SEM_UNDO + +constant GETNCNT +constant GETPID +constant GETVAL +constant GETALL +constant GETZCNT +constant SETVAL +constant SETALL + +type {struct semid_ds} + +element {struct semid_ds} {struct ipc_perm} sem_perm +// Bug 18232: wrong type for sem_nsems member. +xfail-element {struct semid_ds} {unsigned short int} sem_nsems +element {struct semid_ds} time_t sem_otime +element {struct semid_ds} time_t sem_ctime + +type pid_t +type time_t +type key_t +type size_t + +type {struct sembuf} + +element {struct sembuf} {unsigned short int} sem_num +element {struct sembuf} {short int} sem_op +element {struct sembuf} {short int} sem_flg + +function int semctl (int, int, int, ...) +function int semget (key_t, int, int) +function int semop (int, struct sembuf*, size_t) + +allow-header sys/ipc.h + +allow sem* +allow SEM_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/sys/shm.h-data b/REORG.TODO/conform/data/sys/shm.h-data new file mode 100644 index 0000000000..a006cdbb92 --- /dev/null +++ b/REORG.TODO/conform/data/sys/shm.h-data @@ -0,0 +1,34 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +constant SHM_RDONLY +symbol SHMLBA +constant SHM_RND + +type shmatt_t + +type {struct shmid_ds} + +element {struct shmid_ds} {struct ipc_perm} shm_perm +element {struct shmid_ds} size_t shm_segsz +element {struct shmid_ds} pid_t shm_lpid +element {struct shmid_ds} pid_t shm_cpid +element {struct shmid_ds} shmatt_t shm_nattch +element {struct shmid_ds} time_t shm_atime +element {struct shmid_ds} time_t shm_dtime +element {struct shmid_ds} time_t shm_ctime + +type pid_t +type time_t +type key_t +type size_t + +function {void*} shmat (int, const void*, int) +function int shmctl (int, int, struct shmid_ds*) +function int shmdt (const void*) +function int shmget (key_t, size_t, int) + +allow-header sys/ipc.h + +allow shm* +allow SHM* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/sys/socket.h-data b/REORG.TODO/conform/data/sys/socket.h-data new file mode 100644 index 0000000000..8796c57570 --- /dev/null +++ b/REORG.TODO/conform/data/sys/socket.h-data @@ -0,0 +1,140 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 +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 +element {struct sockaddr} char sa_data [] + +type {struct sockaddr_storage} + +element {struct sockaddr_storage} sa_family_t ss_family + +type {struct msghdr} + +element {struct msghdr} {void*} msg_name +element {struct msghdr} socklen_t msg_namelen +element {struct msghdr} {struct iovec*} msg_iov +// Bug 16919: wrong type for msg_iovlen and msg_controllen members. +xfail-element {struct msghdr} int msg_iovlen +element {struct msghdr} {void*} msg_control +xfail-element {struct msghdr} socklen_t msg_controllen +element {struct msghdr} int msg_flags + +type {struct iovec} + +element {struct iovec} {void*} iov_base +element {struct iovec} size_t iov_len + +type {struct cmsghdr} + +// Bug 16919: wrong type for cmsg_len member. +xfail-element {struct cmsghdr} socklen_t cmsg_len +element {struct cmsghdr} int cmsg_level +element {struct cmsghdr} int cmsg_type + +macro SCM_RIGHTS + +macro CMSG_DATA +macro CMSG_NXTHDR +macro CMSG_FIRSTHDR + +type {struct linger} + +element {struct linger} int l_onoff +element {struct linger} int l_linger + +macro SOCK_DGRAM +macro SOCK_STREAM +macro SOCK_SEQPACKET + +macro SOL_SOCKET + +macro SO_ACCEPTCONN +macro SO_BROADCAST +macro SO_DEBUG +macro SO_DONTROUTE +macro SO_ERROR +macro SO_KEEPALIVE +macro SO_LINGER +macro SO_OOBINLINE +macro SO_RCVBUF +macro SO_RCVLOWAT +macro SO_RCVTIMEO +macro SO_REUSEADDR +macro SO_SNDBUF +macro SO_SNDLOWAT +macro SO_SNDTIMEO +macro SO_TYPE + +macro SOMAXCONN + +macro MSG_CTRUNC +macro MSG_DONTROUTE +macro MSG_EOR +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 +macro AF_INET +macro AF_INET6 + +macro SHUT_RD +macro SHUT_WR +macro SHUT_RDWR + +function int accept (int, struct sockaddr*, socklen_t*) +function int bind (int, const struct sockaddr*, socklen_t) +function int connect (int, const struct sockaddr*, socklen_t) +function int getpeername (int, struct sockaddr*, socklen_t*) +function int getsockname (int, struct sockaddr*, socklen_t*) +function int getsockopt (int, int, int, void*, socklen_t*) +function int listen (int, int) +function ssize_t recv (int, void*, size_t, int) +function ssize_t recvfrom (int, void*, size_t, int, struct sockaddr*, socklen_t*) +function ssize_t recvmsg (int, struct msghdr*, int) +function ssize_t send (int, const void*, size_t, int) +function ssize_t sendmsg (int, const struct msghdr*, int) +function ssize_t sendto (int, const void*, size_t, int, const struct sockaddr*, socklen_t) +function int setsockopt (int, int, int, const void*, socklen_t) +function int shutdown (int, int) +function int socket (int, int, int) +function int socketpair (int, int, int, int[2]) +#if !defined XPG42 && !defined UNIX98 +function int sockatmark (int) +#endif + +allow-header sys/uio.h + +allow ss_* +allow sa_* +allow if_* +allow ifc_* +allow ifru_* +allow infu_* +allow ifra_* +allow msg_* +allow cmsg_* +allow l_* +allow SO* +allow AF_* +allow CMSG_* +allow MSG_* +allow PF_* +allow SCM_* +allow SHUT_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/sys/stat.h-data b/REORG.TODO/conform/data/sys/stat.h-data new file mode 100644 index 0000000000..84452aef78 --- /dev/null +++ b/REORG.TODO/conform/data/sys/stat.h-data @@ -0,0 +1,161 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 + +#if !defined POSIX && !defined POSIX2008 && !defined XPG4 && !defined XPG42 +type blkcnt_t +type blksize_t +#endif +#ifndef POSIX +type dev_t +type ino_t +type mode_t +type nlink_t +type uid_t +type gid_t +type off_t +type time_t +#else +# define dev_t __dev_t +# define ino_t __ino_t +# define mode_t __mode_t +# define nlink_t __nlink_t +# define uid_t __uid_t +# define gid_t __gid_t +# define off_t __off_t +# define time_t __time_t +#endif + +type {struct stat} + +// Bug 17786: st_dev has wrong type. +xfail[mips-o32-linux]-element {struct stat} dev_t st_dev +element {struct stat} ino_t st_ino +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 +// Bug 21278: st_rdev has wrong type. +xfail[mips-o32-linux]-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 XOPEN2K8 || defined POSIX2008 +element {struct stat} {struct timespec} st_atim +element {struct stat} {struct timespec} st_mtim +element {struct stat} {struct timespec} st_ctim +#endif +#if !defined XPG4 && !defined POSIX && !defined POSIX2008 +# ifdef XPG42 +// The XPG42 use of "long" for these fields is not compatible with the +// use of typedefs in future standards to support values outside the +// range of "long". +xfail-element {struct stat} long st_blksize +xfail-element {struct stat} long st_blocks +# else +element {struct stat} blksize_t st_blksize +element {struct stat} blkcnt_t st_blocks +# endif +#endif + +# if defined XOPEN2K8 || defined POSIX2008 +type {struct timespec} +element {struct timespec} time_t tv_sec +// Bug 16437: tv_nsec has wrong type. +xfail[x86_64-x32-linux]-element {struct timespec} long tv_nsec +# endif + +#if !defined POSIX && !defined POSIX2008 +constant S_IFMT +constant S_IFBLK +constant S_IFCHR +constant S_IFIFO +constant S_IFREG +constant S_IFDIR +# ifndef XPG4 +constant S_IFLNK +constant S_IFSOCK +# endif +#endif + +constant S_IRWXU +constant S_IRUSR +constant S_IWUSR +constant S_IXUSR +constant S_IRWXG +constant S_IRGRP +constant S_IWGRP +constant S_IXGRP +constant S_IRWXO +constant S_IROTH +constant S_IWOTH +constant S_IXOTH +constant S_ISUID +constant S_ISGID +#if !defined XPG4 && !defined POSIX && !defined POSIX2008 +constant S_ISVTX +#endif + +macro S_ISBLK +macro S_ISCHR +macro S_ISDIR +macro S_ISFIFO +macro S_ISREG +#if !defined XPG4 && !defined POSIX +macro S_ISLNK +macro S_ISSOCK +#endif + +// How to represent optional tests? +optional-macro S_TYPEISMQ +optional-macro S_TYPEISSEM +optional-macro S_TYPEISSHM +# if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +optional-macro S_TYPEISTMO +# endif + +# if defined XOPEN2K8 || defined POSIX2008 +constant UTIME_NOW +constant UTIME_OMIT +# endif + +function int chmod (const char*, mode_t) +# ifndef XPG4 +function int fchmod (int, mode_t) +# endif +# 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 +#if !defined XPG4 && !defined POSIX +function int lstat (const char*, struct stat*) +#endif +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 XPG4 && !defined POSIX && !defined POSIX2008 +function int mknod (const char*, mode_t, dev_t) +# endif +# ifdef XOPEN2K8 +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_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/sys/statvfs.h-data b/REORG.TODO/conform/data/sys/statvfs.h-data new file mode 100644 index 0000000000..efdbff012d --- /dev/null +++ b/REORG.TODO/conform/data/sys/statvfs.h-data @@ -0,0 +1,28 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 +type {struct statvfs} + +element {struct statvfs} {unsigned long} f_bsize +element {struct statvfs} {unsigned long} f_frsize +element {struct statvfs} fsblkcnt_t f_blocks +element {struct statvfs} fsblkcnt_t f_bfree +element {struct statvfs} fsblkcnt_t f_bavail +element {struct statvfs} fsfilcnt_t f_files +element {struct statvfs} fsfilcnt_t f_ffree +element {struct statvfs} fsfilcnt_t f_favail +element {struct statvfs} {unsigned long} f_fsid +element {struct statvfs} {unsigned long} f_flag +element {struct statvfs} {unsigned long} f_namemax + +type fsblkcnt_t +type fsfilcnt_t + +constant ST_RDONLY +constant ST_NOSUID + +function int statvfs (const char*, struct statvfs*) +function int fstatvfs (int, struct statvfs*) + +allow f_* +allow ST_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/sys/time.h-data b/REORG.TODO/conform/data/sys/time.h-data new file mode 100644 index 0000000000..30523e1af4 --- /dev/null +++ b/REORG.TODO/conform/data/sys/time.h-data @@ -0,0 +1,43 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 +type {struct timeval} + +element {struct timeval} time_t tv_sec +element {struct timeval} suseconds_t tv_usec + +type {struct itimerval} + +element {struct itimerval} {struct timeval} it_interval +element {struct itimerval} {struct timeval} it_value + +type time_t +type suseconds_t + +type fd_set +element fd_set long fds_bits [] + +constant ITIMER_REAL +constant ITIMER_VIRTUAL +constant ITIMER_PROF + +macro FD_CLR +macro FD_ISSET +macro FD_SET +macro FD_ZERO + +constant FD_SETSIZE + +function int getitimer (int, struct itimerval*) +function int setitimer (int, const struct itimerval*, struct itimerval*) +function int gettimeofday (struct timeval*, void*) +function int select (int, fd_set*, fd_set*, fd_set*, struct timeval*) +function int utimes (const char*, const struct timeval [2]) + +allow fds_* +allow it_* +allow tv_* +allow FD_* +allow ITIMER_* +allow *_t + +allow-header sys/select.h +#endif diff --git a/REORG.TODO/conform/data/sys/timeb.h-data b/REORG.TODO/conform/data/sys/timeb.h-data new file mode 100644 index 0000000000..9638f73c8f --- /dev/null +++ b/REORG.TODO/conform/data/sys/timeb.h-data @@ -0,0 +1,14 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined POSIX2008 && !defined XOPEN2K8 +type {struct timeb} + +element {struct timeb} time_t time +element {struct timeb} {unsigned short} millitm +element {struct timeb} short timezone +element {struct timeb} short dstflag + +type time_t + +function int ftime (struct timeb*) + +allow *_t +#endif diff --git a/REORG.TODO/conform/data/sys/times.h-data b/REORG.TODO/conform/data/sys/times.h-data new file mode 100644 index 0000000000..c93357b793 --- /dev/null +++ b/REORG.TODO/conform/data/sys/times.h-data @@ -0,0 +1,15 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +type {struct tms} + +element {struct tms} clock_t tms_utime +element {struct tms} clock_t tms_stime +element {struct tms} clock_t tms_cutime +element {struct tms} clock_t tms_cstime + +type clock_t + +function clock_t times (struct tms*) + +allow tms_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/sys/types.h-data b/REORG.TODO/conform/data/sys/types.h-data new file mode 100644 index 0000000000..cc28eb76d4 --- /dev/null +++ b/REORG.TODO/conform/data/sys/types.h-data @@ -0,0 +1,62 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +#if !defined POSIX +# if !defined XPG4 && !defined XPG42 +type blkcnt_t +type blksize_t +# endif +type clock_t +# if !defined XPG4 && !defined XPG42 +type clockid_t +# endif +#endif +type dev_t +# if !defined POSIX +type fsblkcnt_t +type fsfilcnt_t +# endif +type gid_t +#if !defined POSIX +type id_t +#endif +type ino_t +# if !defined POSIX && !defined POSIX2008 +type key_t +# endif +type mode_t +type nlink_t +type off_t +type pid_t +#if !defined XPG4 && !defined XPG42 +type pthread_attr_t +#if !defined POSIX && !defined UNIX98 +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 +#endif +#if !defined POSIX && !defined UNIX98 +type pthread_spinlock_t +#endif +type pthread_t +#endif +type size_t +type ssize_t +# if !defined POSIX && !defined POSIX2008 +type suseconds_t +# endif +# ifndef POSIX +type time_t +type timer_t +# endif +type uid_t + +allow *_t +#endif diff --git a/REORG.TODO/conform/data/sys/uio.h-data b/REORG.TODO/conform/data/sys/uio.h-data new file mode 100644 index 0000000000..b9fc66177c --- /dev/null +++ b/REORG.TODO/conform/data/sys/uio.h-data @@ -0,0 +1,14 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined POSIX2008 +type {struct iovec} + +element {struct iovec} {void*} iov_base +element {struct iovec} size_t iov_len + +function ssize_t readv (int, const struct iovec*, int) +function ssize_t writev (int, const struct iovec*, int) + +allow iov_* +allow IOV_* +allow *_t +allow UIO_MAXIOV +#endif diff --git a/REORG.TODO/conform/data/sys/un.h-data b/REORG.TODO/conform/data/sys/un.h-data new file mode 100644 index 0000000000..1068440042 --- /dev/null +++ b/REORG.TODO/conform/data/sys/un.h-data @@ -0,0 +1,8 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 +type {struct sockaddr_un} + +element {struct sockaddr_un} sa_family_t sun_family +element {struct sockaddr_un} char sun_path [] + +type sa_family_t +#endif diff --git a/REORG.TODO/conform/data/sys/utsname.h-data b/REORG.TODO/conform/data/sys/utsname.h-data new file mode 100644 index 0000000000..82f7f397ca --- /dev/null +++ b/REORG.TODO/conform/data/sys/utsname.h-data @@ -0,0 +1,12 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +type {struct utsname} + +element {struct utsname} char sysname [] +element {struct utsname} char nodename [] +element {struct utsname} char release [] +element {struct utsname} char version [] +element {struct utsname} char machine [] + +function int uname (struct utsname *) +allow *_t +#endif diff --git a/REORG.TODO/conform/data/sys/wait.h-data b/REORG.TODO/conform/data/sys/wait.h-data new file mode 100644 index 0000000000..74a062e90c --- /dev/null +++ b/REORG.TODO/conform/data/sys/wait.h-data @@ -0,0 +1,88 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +#ifdef POSIX +# define pid_t __pid_t +#endif + +constant WNOHANG +constant WUNTRACED + +macro WEXITSTATUS +# if !defined POSIX && !defined POSIX2008 +macro WIFCONTINUED +# endif +macro WIFEXITED +macro WIFSIGNALED +macro WIFSTOPPED +macro WSTOPSIG +macro WTERMSIG + +# ifndef POSIX +constant WEXITED +constant WSTOPPED +# ifndef POSIX2008 +constant WCONTINUED +# endif +constant WNOHANG +constant WNOWAIT +# endif + +#if !defined POSIX +type idtype_t + +constant P_ALL +constant P_PID +constant P_PGID + +type id_t + +type siginfo_t + +element siginfo_t int si_signo +element siginfo_t int si_errno +element siginfo_t int si_code +element siginfo_t pid_t si_pid +element siginfo_t uid_t si_uid +element siginfo_t {void*} si_addr +element siginfo_t int si_status +element siginfo_t long si_band +element siginfo_t {union sigval} si_value +#endif + +#if !defined POSIX && !defined XPG4 && !defined XOPEN2K8 && !defined POSIX2008 +type {struct rusage} + +element {struct rusage} {struct timeval} ru_utime +element {struct rusage} {struct timeval} ru_stime +#endif + +#if !defined POSIX +type pid_t +#endif + +function pid_t wait (int*) +#if !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 +function pid_t wait3 (int*, int, struct rusage*) +#endif +#if !defined POSIX +function int waitid (idtype_t, id_t, siginfo_t*, int) +#endif +function pid_t waitpid (pid_t, int*, int) + +#if !defined POSIX +allow-header signal.h +allow-header sys/resource.h + +allow si_* +allow W* +allow P_* +allow BUS_ +allow CLD_ +allow FPE_ +allow ILL_ +allow POLL_ +allow SEGV_ +allow SI_ +allow TRAP_ +#endif +allow *_t +#endif diff --git a/REORG.TODO/conform/data/syslog.h-data b/REORG.TODO/conform/data/syslog.h-data new file mode 100644 index 0000000000..6604d76d3e --- /dev/null +++ b/REORG.TODO/conform/data/syslog.h-data @@ -0,0 +1,44 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 +constant LOG_PID +constant LOG_CONS +constant LOG_NDELAY +constant LOG_ODELAY +constant LOG_NOWAIT + +constant LOG_KERN +constant LOG_USER +constant LOG_MAIL +constant LOG_NEWS +constant LOG_UUCP +constant LOG_DAEMON +constant LOG_AUTH +constant LOG_CRON +constant LOG_LPR +constant LOG_LOCAL0 +constant LOG_LOCAL1 +constant LOG_LOCAL2 +constant LOG_LOCAL3 +constant LOG_LOCAL4 +constant LOG_LOCAL5 +constant LOG_LOCAL6 +constant LOG_LOCAL7 + +macro LOG_MASK + +constant LOG_EMERG +constant LOG_ALERT +constant LOG_CRIT +constant LOG_ERR +constant LOG_WARNING +constant LOG_NOTICE +constant LOG_INFO +constant LOG_DEBUG + +function void closelog (void) +function void openlog (const char*, int, int) +function int setlogmask (int) +function void syslog (int, const char*, ...) + +allow LOG_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/tar.h-data b/REORG.TODO/conform/data/tar.h-data new file mode 100644 index 0000000000..8477860e57 --- /dev/null +++ b/REORG.TODO/conform/data/tar.h-data @@ -0,0 +1,33 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +macro-str TMAGIC "ustar" +macro-int-constant TMAGLEN {int} == 6 +macro-str TVERSION "00" +macro-int-constant TVERSLEN {int} == 2 + +macro-int-constant REGTYPE {int} == '0' +macro-int-constant AREGTYPE {int} == '\0' +macro-int-constant LNKTYPE {int} == '1' +macro-int-constant SYMTYPE {int} == '2' +macro-int-constant CHRTYPE {int} == '3' +macro-int-constant BLKTYPE {int} == '4' +macro-int-constant DIRTYPE {int} == '5' +macro-int-constant FIFOTYPE {int} == '6' +macro-int-constant CONTTYPE {int} == '7' + +macro-int-constant TSUID {int} == 04000 +macro-int-constant TSGID {int} == 02000 +# if !defined POSIX2008 +macro-int-constant TSVTX {int} == 01000 +# endif +macro-int-constant TUREAD {int} == 00400 +macro-int-constant TUWRITE {int} == 00200 +macro-int-constant TUEXEC {int} == 00100 +macro-int-constant TGREAD {int} == 00040 +macro-int-constant TGWRITE {int} == 00020 +macro-int-constant TGEXEC {int} == 00010 +macro-int-constant TOREAD {int} == 00004 +macro-int-constant TOWRITE {int} == 00002 +macro-int-constant TOEXEC {int} == 00001 + +allow *_t +#endif diff --git a/REORG.TODO/conform/data/termios.h-data b/REORG.TODO/conform/data/termios.h-data new file mode 100644 index 0000000000..9aec2f5a17 --- /dev/null +++ b/REORG.TODO/conform/data/termios.h-data @@ -0,0 +1,180 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +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 +element {struct termios} tcflag_t c_lflag +element {struct termios} cc_t c_cc[NCCS] + +constant NCCS + +constant VEOF +constant VEOL +constant VERASE +constant VINTR +constant VKILL +constant VMIN +constant VQUIT +constant VSTART +constant VSTOP +constant VSUSP +constant VTIME + +constant BRKINT +constant ICRNL +constant IGNBRK +constant IGNCR +constant IGNPAR +constant INLCR +constant INPCK +constant ISTRIP +# if !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 +constant IUCLC +# endif +# ifndef POSIX +constant IXANY +# endif +constant IXOFF +constant IXON +constant PARMRK + +constant OPOST +# if !defined POSIX && !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 +constant NL1 +constant CRDLY +constant CR0 +constant CR1 +constant CR2 +constant CR3 +constant TABDLY +constant TAB0 +constant TAB1 +constant TAB2 +constant TAB3 +constant BSDLY +constant BS0 +constant BS1 +constant VTDLY +constant VT0 +constant VT1 +constant FFDLY +constant FF0 +constant FF1 +# endif + +constant B0 +constant B50 +constant B75 +constant B110 +constant B134 +constant B150 +constant B200 +constant B300 +constant B600 +constant B1200 +constant B1800 +constant B2400 +constant B4800 +constant B9600 +constant B19200 +constant B38400 + +constant CSIZE +constant CS5 +constant CS6 +constant CS7 +constant CS8 +constant CSTOPB +constant CREAD +constant PARENB +constant PARODD +constant HUPCL +constant CLOCAL + +constant ECHO +constant ECHOE +constant ECHOK +constant ECHONL +constant ICANON +constant IEXTEN +constant ISIG +constant NOFLSH +constant TOSTOP +# if !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 +constant XCASE +# endif + +constant TCSANOW +constant TCSADRAIN +constant TCSAFLUSH + +constant TCIFLUSH +constant TCIOFLUSH + +constant TCIOFF +constant TCION +constant TCOOFF +constant TCOON + +function speed_t cfgetispeed (const struct termios*) +function speed_t cfgetospeed (const struct termios*) +function int cfsetispeed (struct termios*, speed_t) +function int cfsetospeed (struct termios*, speed_t) +function int tcdrain (int) +function int tcflow (int, int) +function int tcflush (int, int) +function int tcgetattr (int, struct termios*) +#if !defined POSIX && !defined XPG4 +function pid_t tcgetsid (int) +#endif +function int tcsendbreak (int, int) +function int tcsetattr (int, int, const struct termios*) + +#if !defined POSIX && !defined POSIX2008 +allow CBAUD +allow DEFECHO +allow ECHOCTL +allow ECHOKE +allow ECHOPRT +allow EXTA +allow EXTB +allow FLUSHO +allow LOBLK +allow PENDIN +allow SWTCH +allow VDISCARD +allow VDSUSP +allow VLNEXT +allow VREPRINT +allow VSTATUS +allow VWERASE +#endif + +allow c_* +allow V* +allow I* +allow O* +allow TC* +allow B[0123456789]* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/tgmath.h-data b/REORG.TODO/conform/data/tgmath.h-data new file mode 100644 index 0000000000..d852adc3e4 --- /dev/null +++ b/REORG.TODO/conform/data/tgmath.h-data @@ -0,0 +1,66 @@ +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +#include "math.h-data" +#include "complex.h-data" + +macro acos +macro asin +macro atan +macro acosh +macro asinh +macro atanh +macro cos +macro sin +macro tan +macro cosh +macro sinh +macro tanh +macro exp +macro pow +macro sqrt +macro fabs + +macro atan2 +macro cbrt +macro ceil +macro copysign +macro erf +macro erfc +macro exp2 +macro expm1 +macro fdim +macro floor +macro fma +macro fmax +macro fmin +macro fmod +macro frexp +macro hypot +macro ilogb +macro ldexp +macro lgamma +macro llrint +macro llround +macro log10 +macro log1p +macro log2 +macro logb +macro lrint +macro lround +macro nearbyint +macro nextafter +macro nexttoward +macro remainder +macro remquo +macro rint +macro round +macro scalbn +macro scalbln +macro tgamma +macro trunc + +macro carg +macro cimag +macro conj +macro cproj +macro creal +#endif diff --git a/REORG.TODO/conform/data/time.h-data b/REORG.TODO/conform/data/time.h-data new file mode 100644 index 0000000000..9c1c19596e --- /dev/null +++ b/REORG.TODO/conform/data/time.h-data @@ -0,0 +1,135 @@ +macro-constant NULL == 0 +macro CLOCKS_PER_SEC {clock_t} + +#ifdef ISO11 +macro-int-constant TIME_UTC > 0 +#endif + +#if !defined ISO && !defined ISO99 && !defined XPG4 && !defined XPG42 +type {struct timespec} + +element {struct timespec} time_t tv_sec +// Bug 16437: tv_nsec has wrong type. +xfail[x86_64-x32-linux]-element {struct timespec} long tv_nsec +#endif + +type size_t +type clock_t +type time_t + +type {struct tm} + +element {struct tm} int tm_sec +element {struct tm} int tm_min +element {struct tm} int tm_hour +element {struct tm} int tm_mday +element {struct tm} int tm_mon +element {struct tm} int tm_year +element {struct tm} int tm_wday +element {struct tm} int tm_yday +element {struct tm} int tm_isdst + +function clock_t clock (void) +function double difftime (time_t, time_t) +function time_t mktime (struct tm*) +function time_t time (time_t*) +function {char*} asctime (const struct tm*) +function {char*} ctime (const time_t*) +function {struct tm*} gmtime (const time_t*) +function {struct tm*} localtime (const time_t*) +function size_t strftime (char*, size_t, const char*, const struct tm*) +#if defined ISO11 +function int timespec_get (struct timespec *, int) +#endif + +#if !defined ISO && !defined ISO99 && !defined ISO11 +# if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 +symbol CLK_TCK +# endif +# if !defined XPG4 && !defined XPG42 +# if !defined POSIX && !defined UNIX98 +constant CLOCK_PROCESS_CPUTIME_ID +constant CLOCK_THREAD_CPUTIME_ID +# endif + +type {struct itimerspec} + +element {struct itimerspec} {struct timespec} it_interval +element {struct itimerspec} {struct timespec} it_value + +constant CLOCK_REALTIME +constant TIMER_ABSTIME +# if !defined POSIX && !defined UNIX98 +constant CLOCK_MONOTONIC +# endif + +type clockid_t +type timer_t +# endif + +# if defined XOPEN2K8 || defined POSIX2008 +type pid_t +type locale_t +tag {struct sigevent} +# endif + +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 +variable int getdate_err +# endif + +function {char*} asctime_r (const struct tm*, char*) +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function int clock_getcpuclockid (pid_t, clockid_t*) +#endif +#if !defined XPG4 && !defined XPG42 +function int clock_getres (clockid_t, struct timespec*) +function int clock_gettime (clockid_t, struct timespec*) +#endif +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function int clock_nanosleep (clockid_t, int, const struct timespec*, struct timespec*) +#endif +#if !defined XPG4 && !defined XPG42 +function int clock_settime (clockid_t, const struct timespec*) +#endif +function {char*} ctime_r (const time_t*, char*) +# if !defined XPG4 && !defined POSIX && !defined POSIX2008 +function {struct tm*} getdate (const char*) +# endif +function {struct tm*} gmtime_r (const time_t*, struct tm*) +function {struct tm*} localtime_r (const time_t*, struct tm*) +# if !defined XPG4 && !defined XPG42 +function int nanosleep (const struct timespec*, struct timespec*) +# endif +# 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 +# if !defined XPG4 && !defined XPG42 +function int timer_create (clockid_t, struct sigevent*, timer_t*) +function int timer_delete (timer_t) +function int timer_gettime (timer_t, struct itimerspec*) +function int timer_getoverrun (timer_t) +function int timer_settime (timer_t, int, const struct itimerspec*, struct itimerspec*) +# endif +function void tzset (void) + +# if !defined POSIX && !defined POSIX2008 +variable int daylight +variable {long int} timezone +# endif +variable {char*} tzname [2] + +# ifndef POSIX +allow tm_* +# endif +allow clock_* +allow timer_* +allow it_* +allow tv_* +allow CLOCK_* +allow TIMER_* +allow *_t +allow sigevent +#endif diff --git a/REORG.TODO/conform/data/uchar.h-data b/REORG.TODO/conform/data/uchar.h-data new file mode 100644 index 0000000000..ef27617bc4 --- /dev/null +++ b/REORG.TODO/conform/data/uchar.h-data @@ -0,0 +1,12 @@ +#if defined ISO11 +type mbstate_t +type size_t +type char16_t +type char32_t + +function size_t mbrtoc16 (char16_t *, const char *, size_t, mbstate_t *) +function size_t c16rtomb (char *, char16_t, mbstate_t *) +function size_t mbrtoc32 (char32_t *, const char *, size_t, mbstate_t *) +function size_t c32rtomb (char *, char32_t, mbstate_t *) + +#endif diff --git a/REORG.TODO/conform/data/ucontext.h-data b/REORG.TODO/conform/data/ucontext.h-data new file mode 100644 index 0000000000..c1ddf19d94 --- /dev/null +++ b/REORG.TODO/conform/data/ucontext.h-data @@ -0,0 +1,22 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined POSIX2008 && !defined XOPEN2K8 +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 + +type sigset_t +type stack_t + +function int getcontext (ucontext_t*) +function int setcontext (const ucontext_t*) +function void makecontext (ucontext_t*, void(*)(void), int, ...) +function int swapcontext (ucontext_t*, const ucontext_t*) + +allow uc_* +allow ss_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/ulimit.h-data b/REORG.TODO/conform/data/ulimit.h-data new file mode 100644 index 0000000000..1e5e5b471d --- /dev/null +++ b/REORG.TODO/conform/data/ulimit.h-data @@ -0,0 +1,9 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 +constant UL_GETFSIZE +constant UL_SETFSIZE + +function {long int} ulimit (int, ...) + +allow UL_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/unistd.h-data b/REORG.TODO/conform/data/unistd.h-data new file mode 100644 index 0000000000..ddf4f25132 --- /dev/null +++ b/REORG.TODO/conform/data/unistd.h-data @@ -0,0 +1,615 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +#ifdef POSIX +# define uid_t __uid_t +# define gid_t __gid_t +# define off_t __off_t +# define pid_t __pid_t +#endif + +constant _POSIX_VERSION +#if defined POSIX || defined XPG4 || defined XPG42 || defined UNIX98 +constant _POSIX2_C_VERSION +#endif +#ifndef POSIX +optional-constant _XOPEN_VERSION +optional-constant _XOPEN_XCU_VERSION +#endif + +#ifndef POSIX +optional-constant _POSIX2_C_BIND +#endif +optional-constant _POSIX2_CHAR_TERM +optional-constant _POSIX2_LOCALEDEF +optional-constant _POSIX2_UPE +#ifndef POSIX +optional-constant _POSIX2_VERSION +#endif + +#ifndef POSIX +optional-constant _XOPEN_XPG2 +optional-constant _XOPEN_XPG3 +optional-constant _XOPEN_XPG4 +optional-constant _XOPEN_UNIX +#endif + +#ifndef POSIX +optional-constant _POSIX_ADVISORY_INFO +#endif +optional-constant _POSIX_ASYNCHRONOUS_IO +#ifndef POSIX +optional-constant _POSIX_BARRIERS +#endif +optional-constant _POSIX_CHOWN_RESTRICTED +#ifndef POSIX +optional-constant _POSIX_CLOCK_SELECTION +optional-constant _POSIX_CPUTIME +#endif +optional-constant _POSIX_NO_TRUNC +optional-constant _POSIX_VDISABLE +optional-constant _POSIX_SAVED_IDS +optional-constant _POSIX_JOB_CONTROL +#ifndef POSIX +optional-constant _POSIX_MONOTONIC_CLOCK +optional-constant _POSIX_READER_WRITER_LOCKS +optional-constant _POSIX_SHELL +optional-constant _POSIX_SPAWN +optional-constant _POSIX_SPIN_LOCKS +optional-constant _POSIX_SPORADIC_SERVER +optional-constant _POSIX_THREAD_CPUTIME +optional-constant _POSIX_TYPED_MEMORY_OBJECTS +#endif + +optional-constant _POSIX_THREADS +optional-constant _POSIX_THREAD_ATTR_STACKADDR +optional-constant _POSIX_THREAD_ATTR_STACKSIZE +optional-constant _POSIX_THREAD_PROCESS_SHARED +optional-constant _POSIX_THREAD_SAFE_FUNCTIONS +#ifndef POSIX +optional-constant _POSIX_THREAD_SPORADIC_SERVER +#endif + +# 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 +optional-constant _XOPEN_REALTIME +optional-constant _XOPEN_REALTIME_THREADS +optional-constant _XOPEN_SHM +optional-constant _XOPEN_STREAMS +# endif +# ifndef POSIX +allow _XBS5_ILP32_OFF32 +allow _XBS5_ILP32_OFBIG +allow _XBS5_LP64_OFF64 +allow _XBS5_LPBIG_OFFBIG +#endif +optional-constant _POSIX_MEMLOCK +optional-constant _POSIX_MEMLOCK_RANGE +optional-constant _POSIX_MESSAGE_PASSING +optional-constant _POSIX_PRIORITY_SCHEDULING +optional-constant _POSIX_REALTIME_SIGNALS +optional-constant _POSIX_SEMAPHORES +optional-constant _POSIX_SHARED_MEMORY_OBJECTS +optional-constant _POSIX_SYNCHRONIZED_IO +optional-constant _POSIX_TIMERS +#ifndef POSIX +optional-constant _POSIX_TIMEOUTS +#endif + +optional-constant _POSIX_FSYNC +optional-constant _POSIX_MAPPED_FILES +optional-constant _POSIX_MEMORY_PROTECTION + +optional-constant _POSIX_PRIORITIZED_IO + +optional-constant _POSIX_THREAD_PRIORITY_SCHEDULING +optional-constant _POSIX_THREAD_PRIO_INHERIT +optional-constant _POSIX_THREAD_PRIO_PROTECT + +optional-constant _POSIX_ASYNC_IO +optional-constant _POSIX_PRIO_IO +optional-constant _POSIX_SYNC_IO + +#ifndef POSIX +optional-constant _POSIX2_PBS +optional-constant _POSIX2_PBS_ACCOUNTING +optional-constant _POSIX2_PBS_CHECKPOINT +optional-constant _POSIX2_PBS_LOCATE +optional-constant _POSIX2_PBS_MESSAGE +optional-constant _POSIX2_PBS_TRACK +#endif + +#ifndef POSIX +optional-constant _POSIX_TIMESTAMP_RESOLUTION +#endif + +constant NULL + +constant R_OK +constant W_OK +constant X_OK +constant F_OK + +constant _CS_PATH +#ifndef POSIX +constant _CS_XBS5_ILP32_OFF32_CFLAGS +constant _CS_XBS5_ILP32_OFF32_LDFLAGS +constant _CS_XBS5_ILP32_OFF32_LIBS +constant _CS_XBS5_ILP32_OFF32_LINTFLAGS +constant _CS_XBS5_ILP32_OFFBIG_CFLAGS +constant _CS_XBS5_ILP32_OFFBIG_LDFLAGS +constant _CS_XBS5_ILP32_OFFBIG_LIBS +constant _CS_XBS5_ILP32_OFFBIG_LINTFLAGS +constant _CS_XBS5_LP64_OFF64_CFLAGS +constant _CS_XBS5_LP64_OFF64_LDFLAGS +constant _CS_XBS5_LP64_OFF64_LIBS +constant _CS_XBS5_LP64_OFF64_LINTFLAGS +constant _CS_XBS5_LPBIG_OFFBIG_CFLAGS +constant _CS_XBS5_LPBIG_OFFBIG_LDFLAGS +constant _CS_XBS5_LPBIG_OFFBIG_LIBS +constant _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS +#endif + +constant SEEK_SET +constant SEEK_CUR +constant SEEK_END + +#ifndef POSIX +constant _SC_2_C_BIND +#endif +constant _SC_2_C_DEV +#ifndef POSIX +constant _SC_2_C_VERSION +#endif +constant _SC_2_CHAR_TERM +constant _SC_2_FORT_DEV +constant _SC_2_FORT_RUN +constant _SC_2_LOCALEDEF +#ifndef POSIX +constant _SC_2_PBS +constant _SC_2_PBS_ACCOUNTING +constant _SC_2_PBS_CHECKPOINT +constant _SC_2_PBS_LOCATE +constant _SC_2_PBS_MESSAGE +constant _SC_2_PBS_TRACK +#endif +constant _SC_2_SW_DEV +constant _SC_2_UPE +constant _SC_2_VERSION +constant _SC_ARG_MAX +constant _SC_AIO_LISTIO_MAX +constant _SC_AIO_MAX +constant _SC_AIO_PRIO_DELTA_MAX +constant _SC_ASYNCHRONOUS_IO +#ifndef POSIX +constant _SC_ATEXIT_MAX +constant _SC_BARRIERS +constant _SC_BASE +#endif +constant _SC_BC_BASE_MAX +constant _SC_BC_DIM_MAX +constant _SC_BC_SCALE_MAX +constant _SC_BC_STRING_MAX +constant _SC_CHILD_MAX +constant _SC_CLK_TCK +#ifndef POSIX +constant _SC_CLOCK_SELECTION +#endif +constant _SC_COLL_WEIGHTS_MAX +constant _SC_DELAYTIMER_MAX +#ifndef POSIX +constant _SC_DEVICE_IO +constant _SC_DEVICE_SPECIFIC +constant _SC_DEVICE_SPECIFIC_R +#endif +constant _SC_EXPR_NEST_MAX +#ifndef POSIX +constant _SC_FD_MGMT +constant _SC_FIFO +constant _SC_FILE_ATTRIBUTES +constant _SC_FILE_LOCKING +constant _SC_FILE_SYSTEM +#endif +constant _SC_FSYNC +constant _SC_GETGR_R_SIZE_MAX +constant _SC_GETPW_R_SIZE_MAX +#ifndef POSIX +constant _SC_IOV_MAX +#endif +constant _SC_JOB_CONTROL +constant _SC_LINE_MAX +constant _SC_LOGIN_NAME_MAX +constant _SC_MAPPED_FILES +constant _SC_MEMLOCK +constant _SC_MEMLOCK_RANGE +constant _SC_MEMORY_PROTECTION +constant _SC_MESSAGE_PASSING +#ifndef POSIX +constant _SC_MONOTONIC_CLOCK +#endif +constant _SC_MQ_OPEN_MAX +constant _SC_MQ_PRIO_MAX +#ifndef POSIX +constant _SC_NETWORKING +#endif +constant _SC_NGROUPS_MAX +constant _SC_OPEN_MAX +constant _SC_PAGESIZE +#ifndef POSIX +constant _SC_PAGE_SIZE +constant _SC_PASS_MAX +constant _SC_PIPE +#endif +constant _SC_PRIORITIZED_IO +constant _SC_PRIORITY_SCHEDULING +constant _SC_RE_DUP_MAX +#ifndef POSIX +constant _SC_READER_WRITER_LOCKS +#endif +constant _SC_REALTIME_SIGNALS +#ifndef POSIX +constant _SC_REGEXP +#endif +constant _SC_RTSIG_MAX +constant _SC_SAVED_IDS +constant _SC_SEMAPHORES +constant _SC_SEM_NSEMS_MAX +constant _SC_SEM_VALUE_MAX +constant _SC_SHARED_MEMORY_OBJECTS +#ifndef POSIX +constant _SC_SHELL +constant _SC_SIGNALS +#endif +constant _SC_SIGQUEUE_MAX +#ifndef POSIX +constant _SC_SINGLE_PROCESS +constant _SC_SPIN_LOCKS +#endif +constant _SC_STREAM_MAX +constant _SC_SYNCHRONIZED_IO +constant _SC_THREADS +constant _SC_THREAD_ATTR_STACKADDR +constant _SC_THREAD_ATTR_STACKSIZE +constant _SC_THREAD_DESTRUCTOR_ITERATIONS +constant _SC_THREAD_KEYS_MAX +constant _SC_THREAD_PRIORITY_SCHEDULING +constant _SC_THREAD_PRIO_INHERIT +constant _SC_THREAD_PRIO_PROTECT +constant _SC_THREAD_PROCESS_SHARED +constant _SC_THREAD_SAFE_FUNCTIONS +constant _SC_THREAD_STACK_MIN +constant _SC_THREAD_THREADS_MAX +constant _SC_TIMERS +constant _SC_TIMER_MAX +constant _SC_TTY_NAME_MAX +#ifndef POSIX +constant _SC_TYPED_MEMORY_OBJECTS +#endif +constant _SC_TZNAME_MAX +#ifndef POSIX +constant _SC_USER_GROUPS +constant _SC_USER_GROUPS_R +#endif +# 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 +constant _SC_XOPEN_SHM +constant _SC_XOPEN_UNIX +constant _SC_XOPEN_XCU_VERSION +constant _SC_XOPEN_LEGACY +constant _SC_XOPEN_REALTIME +constant _SC_XOPEN_REALTIME_THREADS +# endif +# ifndef POSIX +constant _SC_STREAMS +constant _SC_XBS5_ILP32_OFF32 +constant _SC_XBS5_ILP32_OFFBIG +constant _SC_XBS5_LP64_OFF64 +constant _SC_XBS5_LPBIG_OFFBIG +# endif +# 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 +# ifndef POSIX +constant _SC_THREAD_ROBUST_PRIO_INHERIT +constant _SC_THREAD_ROBUST_PRIO_PROTECT +#endif + +#if !defined XPG4 && !defined POSIX && !defined POSIX2008 +constant F_LOCK +constant F_ULOCK +constant F_TEST +constant F_TLOCK +#endif + +constant _PC_ASYNC_IO +constant _PC_CHOWN_RESTRICTED +#ifndef POSIX +constant _PC_FILESIZEBITS +#endif +constant _PC_LINK_MAX +constant _PC_MAX_CANON +constant _PC_MAX_INPUT +constant _PC_NAME_MAX +constant _PC_NO_TRUNC +constant _PC_PATH_MAX +constant _PC_PIPE_BUF +constant _PC_PRIO_IO +#ifndef POSIX +constant _PC_REC_INCR_XFER_SIZE +constant _PC_REC_MAX_XFER_SIZE +constant _PC_REC_MIN_XFER_SIZE +constant _PC_REC_XFER_ALIGN +#endif +constant _PC_SYNC_IO +constant _PC_VDISABLE + +constant STDIN_FILENO +constant STDOUT_FILENO +constant STDERR_FILENO + +type size_t +type ssize_t +#ifndef POSIX +type uid_t +type gid_t +type off_t +type pid_t +#endif + +#if !defined POSIX && !defined XPG4 +type useconds_t + +# ifndef XPG42 +type intptr_t +# endif +#endif + +function int access (const char*, int) +function {unsigned int} alarm (unsigned int) +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +function int brk (void*) +#endif +function int chdir (const char*) +#if defined XPG4 || defined XPG42 || defined UNIX98 +function int chroot (const char*) +#endif +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 +#if defined XPG4 || defined XPG42 || defined UNIX98 +function {char*} ctermid (char*) +function {char*} cuserid (char*) +#endif +#ifdef POSIX +allow cuserid +#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*, ...) +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 +#if !defined XPG4 && !defined POSIX +function int fchown (int, uid_t, gid_t) +#endif +# if defined XOPEN2K8 || defined POSIX2008 +function int fchownat (int, const char*, uid_t, gid_t, int) +# endif +#if !defined XPG4 && !defined POSIX +function int fchdir (int) +#endif +#if !defined XPG4 && !defined XPG42 +function int fdatasync (int) +#endif +# 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) +#ifndef XPG4 +function int ftruncate (int, off_t) +#endif +function {char*} getcwd (char*, size_t) +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +function int getdtablesize (void) +#endif +function gid_t getegid (void) +function uid_t geteuid (void) +function gid_t getgid (void) +function int getgroups (int, gid_t[]) +#if !defined XPG4 && !defined POSIX && !defined POSIX2008 +function long gethostid (void) +#endif +#if !defined POSIX && !defined XPG4 +function int gethostname (char*, size_t) +#endif +function {char*} getlogin (void) +#if !defined XPG4 && !defined XPG42 +function int getlogin_r (char*, size_t) +#endif +function int getopt (int, char*const[], const char*) +#if defined XPG42 || defined UNIX98 +function int getpagesize (void) +#endif +#if defined XPG4 || defined XPG42 || defined UNIX98 +function {char*} getpass (const char*) +#endif +#if !defined XPG4 && !defined POSIX +function pid_t getpgid (pid_t) +#endif +function pid_t getpgrp (void) +function pid_t getpid (void) +function pid_t getppid (void) +#if !defined XPG4 && !defined POSIX +function pid_t getsid (pid_t) +#endif +function uid_t getuid (void) +#if defined XPG42 || defined UNIX98 || defined XOPEN2K +function {char*} getwd (char*) +#endif +function int isatty (int) +#if !defined XPG4 && !defined POSIX +function int lchown (const char*, uid_t, gid_t) +#endif +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 XPG4 && !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]) +#if !defined POSIX && !defined XPG4 && !defined XPG42 +function ssize_t pread (int, void*, size_t, off_t) +#endif +#if !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 && !defined XPG4 && !defined XPG42 +function int pthread_atfork (void(*)(void), void(*)(void), void(*)(void)) +#endif +#if !defined POSIX && !defined XPG4 && !defined XPG42 +function ssize_t pwrite (int, const void*, size_t, off_t) +#endif +function ssize_t read (int, void*, size_t) +#if !defined XPG4 && !defined POSIX +function ssize_t readlink (const char*, char*, size_t) +#endif +# if defined XOPEN2K8 || defined POSIX2008 +function ssize_t readlinkat (int, const char*, char*, size_t) +# endif +function int rmdir (const char*) +#if !defined XOPEN2K && !defined XOPEN2K8 && !defined XPG4 && !defined POSIX && !defined POSIX2008 +function {void*} sbrk (intptr_t) +#endif +#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98 +function int setegid (gid_t) +function int seteuid (uid_t) +#endif +function int setgid (gid_t) +function int setpgid (pid_t, pid_t) +# if !defined XPG4 && !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 +#if !defined XPG4 && !defined POSIX +function int symlink (const char*, const char*) +# endif +# if defined XOPEN2K8 || defined POSIX2008 +function int symlinkat (const char*, int, const char*) +# endif +# if !defined XPG4 && !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) +#if !defined XPG4 && !defined POSIX +function int truncate (const char*, off_t) +#endif +function {char*} ttyname (int) +function int ttyname_r (int, char*, size_t) +#if defined XPG42 || defined UNIX98 || defined XOPEN2K +function useconds_t ualarm (useconds_t, useconds_t) +#endif +function int unlink (const char*) +# if defined XOPEN2K8 || defined POSIX2008 +function int unlinkat (int, const char*, int) +# endif +#if defined XPG42 || defined UNIX98 || defined XOPEN2K +function int usleep (useconds_t) +function pid_t vfork (void) +#endif +function ssize_t write (int, const void*, size_t) + +variable {char*} optarg +variable int optind +variable int opterr +variable int optopt + +allow *_t +#endif diff --git a/REORG.TODO/conform/data/utime.h-data b/REORG.TODO/conform/data/utime.h-data new file mode 100644 index 0000000000..e3201651c1 --- /dev/null +++ b/REORG.TODO/conform/data/utime.h-data @@ -0,0 +1,17 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +#ifdef POSIX +# define time_t __time_t +#endif + +type {struct utimbuf} + +element {struct utimbuf} time_t actime +element {struct utimbuf} time_t modtime + +type time_t + +function int utime (const char*, const struct utimbuf*) + +allow utim_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/utmpx.h-data b/REORG.TODO/conform/data/utmpx.h-data new file mode 100644 index 0000000000..cfe2a08634 --- /dev/null +++ b/REORG.TODO/conform/data/utmpx.h-data @@ -0,0 +1,41 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4 +type {struct utmpx} + +element {struct utmpx} char ut_user [] +element {struct utmpx} char ut_id [] +element {struct utmpx} char ut_line [] +element {struct utmpx} pid_t ut_pid +element {struct utmpx} {short int} ut_type +// Layout chosen to be compatible on 32-bit and 64-bit bi-arch +// systems, which is incompatible with the standard type (see bug +// 18235). +xfail-element {struct utmpx} {struct timeval} ut_tv + +type pid_t + +type {struct timeval} + +element {struct timeval} time_t tv_sec +element {struct timeval} suseconds_t tv_usec + +constant EMPTY +constant BOOT_TIME +constant OLD_TIME +constant NEW_TIME +constant USER_PROCESS +constant INIT_PROCESS +constant LOGIN_PROCESS +constant DEAD_PROCESS + +function void endutxent (void) +function {struct utmpx*} getutxent (void) +function {struct utmpx*} getutxid (const struct utmpx*) +function {struct utmpx*} getutxline (const struct utmpx*) +function {struct utmpx*} pututxline (const struct utmpx*) +function void setutxent (void) + +allow-header sys/time.h + +allow ut_* +allow *_t +#endif diff --git a/REORG.TODO/conform/data/varargs.h-data b/REORG.TODO/conform/data/varargs.h-data new file mode 100644 index 0000000000..2366edb1fa --- /dev/null +++ b/REORG.TODO/conform/data/varargs.h-data @@ -0,0 +1,10 @@ +#if defined XPG4 || defined XPG42 || defined UNIX98 +macro va_alist +macro va_dcl +type va_list +macro va_start +macro va_arg +macro va_end + +allow *_t +#endif diff --git a/REORG.TODO/conform/data/wchar.h-data b/REORG.TODO/conform/data/wchar.h-data new file mode 100644 index 0000000000..0beae8957d --- /dev/null +++ b/REORG.TODO/conform/data/wchar.h-data @@ -0,0 +1,169 @@ +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 +type wchar_t +type wint_t +# if !defined ISO99 && !defined ISO11 && !defined POSIX2008 +type wctype_t +# endif +type mbstate_t +# if !defined ISO99 && !defined ISO11 +type FILE +# else +# define FILE __FILE +# endif +type size_t +# if defined XOPEN2K8 || defined POSIX2008 +type locale_t +# endif +tag {struct tm} + +function wint_t btowc (int) +function int fwprintf (FILE*, const wchar_t*, ...) +function int fwscanf (FILE*, const wchar_t*, ...) +# if !defined ISO99 && !defined ISO11 && !defined POSIX2008 +function int iswalnum (wint_t) +function int iswalpha (wint_t) +function int iswcntrl (wint_t) +function int iswdigit (wint_t) +function int iswgraph (wint_t) +function int iswlower (wint_t) +function int iswprint (wint_t) +function int iswpunct (wint_t) +function int iswspace (wint_t) +function int iswupper (wint_t) +function int iswxdigit (wint_t) +function int iswctype (wint_t, wctype_t) +# endif +function wint_t fgetwc (FILE*) +function {wchar_t*} fgetws (wchar_t*, int, FILE*) +function wint_t fputwc (wchar_t, FILE*) +function int fputws (const wchar_t*, FILE*) +function int fwide (FILE*, int) +function wint_t getwc (FILE*) +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 ISO99 && !defined ISO11 && !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*, __gnuc_va_list) +# ifndef UNIX98 +function int vfwscanf (FILE*, const wchar_t*, __gnuc_va_list) +# endif +function int vwprintf (const wchar_t*, __gnuc_va_list) +# ifndef UNIX98 +function int vwscanf (const wchar_t*, __gnuc_va_list) +# endif +function int vswprintf (wchar_t*, size_t, const wchar_t*, __gnuc_va_list) +# ifndef UNIX98 +function int vswscanf (const wchar_t*, const wchar_t*, __gnuc_va_list) +# endif +# 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*) +function size_t wcsspn (const wchar_t*, const wchar_t*) +function {wchar_t*} wcsstr (const wchar_t*, const wchar_t*) +function double wcstod (const wchar_t*, wchar_t**) +# ifndef UNIX98 +function float wcstof (const wchar_t*, wchar_t**) +function {long double} wcstold (const wchar_t*, wchar_t**) +# endif +function {wchar_t*} wcstok (wchar_t*, const wchar_t*, wchar_t**) +function {long int} wcstol (const wchar_t*, wchar_t**, int) +# ifndef UNIX98 +function {long long int} wcstoll (const wchar_t*, wchar_t**, int) +# endif +function {unsigned long int} wcstoul (const wchar_t*, wchar_t**, int) +# ifndef UNIX98 +function {unsigned long long int} wcstoull (const wchar_t*, wchar_t**, int) +# endif +# if defined UNIX98 || defined XOPEN2K +function {wchar_t*} wcswcs (const wchar_t*, const wchar_t*) +# endif +# if !defined ISO99 && !defined ISO11 && !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 ISO99 && !defined ISO11 && !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) +function {wchar_t*} wmemmove (wchar_t*, const wchar_t*, size_t) +function {wchar_t*} wmemset (wchar_t*, wchar_t, size_t) +function int wprintf (const wchar_t*, ...) +function int wscanf (const wchar_t*, ...) + +macro-int-constant WCHAR_MIN {promoted:wchar_t} +macro-int-constant WCHAR_MAX {promoted:wchar_t} >= 127 +macro-constant WEOF {wint_t} +macro-constant NULL == 0 + +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow-header ctype.h +allow-header stdio.h +allow-header stdarg.h +allow-header stdlib.h +allow-header string.h +allow-header stddef.h +allow-header time.h +#endif + +allow wcs[abcdefghijklmnopqrstuvwxyz]* +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow *_t +#endif +#endif diff --git a/REORG.TODO/conform/data/wctype.h-data b/REORG.TODO/conform/data/wctype.h-data new file mode 100644 index 0000000000..944fe6efab --- /dev/null +++ b/REORG.TODO/conform/data/wctype.h-data @@ -0,0 +1,68 @@ +#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 +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) +# ifndef UNIX98 +function int iswblank (wint_t) +# endif +function int iswcntrl (wint_t) +function int iswdigit (wint_t) +function int iswgraph (wint_t) +function int iswlower (wint_t) +function int iswprint (wint_t) +function int iswpunct (wint_t) +function int iswspace (wint_t) +function int iswupper (wint_t) +function int iswxdigit (wint_t) +function int iswctype (wint_t, wctype_t) +function wint_t towctrans (wint_t, wctrans_t) +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 iswblank_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-constant WEOF {wint_t} + +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow-header ctype.h +allow-header stdio.h +allow-header stdarg.h +allow-header stdlib.h +allow-header string.h +allow-header stddef.h +allow-header time.h +allow-header wchar.h +#endif + +allow is[abcdefghijklmnopqrstuvwxyz]* +allow to[abcdefghijklmnopqrstuvwxyz]* +#if !defined ISO && !defined ISO99 && !defined ISO11 +allow *_t +#endif +#endif diff --git a/REORG.TODO/conform/data/wordexp.h-data b/REORG.TODO/conform/data/wordexp.h-data new file mode 100644 index 0000000000..0d96d68edc --- /dev/null +++ b/REORG.TODO/conform/data/wordexp.h-data @@ -0,0 +1,30 @@ +#if !defined ISO && !defined ISO99 && !defined ISO11 +type wordexp_t + +element wordexp_t size_t we_wordc +element wordexp_t {char**} we_wordv +element wordexp_t size_t we_offs + +constant WRDE_APPEND +constant WRDE_DOOFFS +constant WRDE_NOCMD +constant WRDE_REUSE +constant WRDE_SHOWERR +constant WRDE_UNDEF + +constant WRDE_BADCHAR +constant WRDE_BADVAL +constant WRDE_CMDSUB +constant WRDE_NOSPACE +# if !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008 +constant WRDE_NOSYS +# endif +constant WRDE_SYNTAX + +function int wordexp (const char*, wordexp_t*, int) +function void wordfree (wordexp_t*) + +allow WRDE_* +allow we_* +allow *_t +#endif |