diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-02-28 05:08:01 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-02-28 05:08:01 +0000 |
commit | 0ed99ce46d9521347c2fd1c72f7b4e9aa0e3f4d0 (patch) | |
tree | 5aa27fb2d06f760ba64c7424d36f2bf91a1940f9 /conform | |
parent | 919e98fa39e74f1bbd5c4b0b21edbce3d293f03f (diff) | |
download | glibc-0ed99ce46d9521347c2fd1c72f7b4e9aa0e3f4d0.zip glibc-0ed99ce46d9521347c2fd1c72f7b4e9aa0e3f4d0.tar.gz glibc-0ed99ce46d9521347c2fd1c72f7b4e9aa0e3f4d0.tar.bz2 |
Update.
2000-02-27 Ulrich Drepper <drepper@redhat.com>
* conform/conformtest.pl (@headers): Add wordexp.h, wctype.h, wchar.h,
varargs.h, utmpx.h, utime.h, unistd.h, ulimit.h, ucontext.h, time.h,
termios.h, tar.h, sys/wait.h, sys/uio.h, sys/types.h, sys/times.h,
sys/timeb.h, sys/time.h, sys/statvfs.h, sys/stat.h, sys/shm.h,
sys/sem.h, and sys/resource.h.
Implement handling of allow-header.
* conform/data/fcntl.h-data: Correct various bugs.
* conform/data/fnmatch.h-data: Likewise.
* conform/data/math.h-data: Likewise.
* conform/data/ndbm.h-data: Likewise.
* conform/data/nl_types.h-data: Likewise.
* conform/data/poll.h-data: Likewise.
* conform/data/pthread.h-data: Likewise.
* conform/data/semaphore.h-data: Likewise.
* conform/data/setjmp.h-data: Likewise.
* conform/data/signal.h-data: Likewise.
* conform/data/stdarg.h-data: Likewise.
* conform/data/stddef.h-data: Likewise.
* conform/data/stdio.h-data: Likewise.
* conform/data/stdlib.h-data: Likewise.
* conform/data/string.h-data: Likewise.
* conform/data/strings.h-data: Likewise.
* conform/data/stropts.h-data: Likewise.
* conform/data/syslog.h-data: Likewise.
* conform/data/sys/ipc.h-data: Likewise.
* conform/data/sys/mman.h-data: Likewise.
* conform/data/sys/msg.h-data: Likewise.
* conform/data/tar.h-data: New file.
* conform/data/termios.h-data: New file.
* conform/data/time.h-data: New file.
* conform/data/ucontext.h-data: New file.
* conform/data/ulimit.h-data: New file.
* conform/data/unistd.h-data: New file.
* conform/data/utime.h-data: New file.
* conform/data/utmpx.h-data: New file.
* conform/data/varargs.h-data: New file.
* conform/data/wchar.h-data: New file.
* conform/data/wctype.h-data: New file.
* conform/data/wordexp.h-data: New file.
* conform/data/sys/resource.h-data: New file.
* conform/data/sys/sem.h-data: New file.
* conform/data/sys/shm.h-data: New file.
* conform/data/sys/stat.h-data: New file.
* conform/data/sys/statvfs.h-data: New file.
* conform/data/sys/time.h-data: New file.
* conform/data/sys/timeb.h-data: New file.
* conform/data/sys/times.h-data: New file.
* conform/data/sys/types.h-data: New file.
* conform/data/sys/uio.h-data: New file.
* conform/data/sys/wait.h-data: New file.
* grp/grp.h (getgrent_r): Declare only if __USE_GNU.
* include/sys/time.h (__itimes): Fix type of second parameter.
* io/sys/stat.h (S_IFLNK): Define also if __USE_XOPEN.
(S_ISVTX): Likewise.
* io/sys/statvfs.h: Define fsblkcnt_t and fsfilcnt_t.
* locale/langindo.h: Make ERA_YEAR, INT_CURR_SYMBOL, CURRENCY_SYMBOL,
MON_DECIMAL_POINT, MON_THOUSANDS_SEP, MON_GROUPING, POSITIVE_SIGN,
NEGATIVE_SIGN, INT_FRAC_DIGITS, FRAC_DIGITS, P_CS_PRECEDES,
P_SEP_BY_SPACE, N_CS_PRECEDES, N_SEP_BY_SPACE, P_SIGN_POSN,
N_SIGN_POSN, DECIMAL_POINT, THOUSANDS_SEP, GROUPING, YESEXPR,
NOEXPR, YESSTR, and NOSTR only available if __USE_GNU.
* math/bits/mathcalls.h: Don't declare tgamma and scalbn if only
__USE_XOPEN.
* posix/unistd.h: Don't define ptrdiff_t.
(sbrk): Correct type of parameter.
* sysdeps/generic/sbrk.c: Likewise.
* sysdeps/mach/hurd/sbrk.c: Likewise.
* posix/sys/types.h: Allow id_t, suseconds_t, fsblkcnt_t, and
fsfilcnt_t being defined elsewhere.
* resource/sys/resource.h: Define id_t.
If __USE_XOPEN use int for type of first parameter if getrlimit,
getrlimit64, setrlimit, setrlimit64, getrusage, getpriority, and
setpriority.
* sysdeps/generic/getpriority.c: Fix type of second parameter.
* sysdeps/generic/setpriority.c: Likewise.
* sysdeps/mach/hurd/getpriority.c: Likewise.
* sysdeps/mach/hurd/setpriority.c: Likewise.
* sysdeps/unix/sysv/irix4/getpriority.c: Likewise.
* sysdeps/unix/sysv/irix4/setpriority.c: Likewise.
* sysdeps/unix/sysv/linux/getpriority.c: Likewise.
* sysdeps/generic/utimes.c: Fix parameter of third parameter.
* sysdeps/mach/hurd/utimes.c: Likewise.
* sysdeps/posix/utimes.c: Likewise.
* sysdeps/generic/bits/shm.h: Define shmatt_t type and use it in
struct shmid_ds definition.
* sysdeps/gnu/bits/shm.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/shm.h: Likewise.
* sysdeps/unix/sysv/linux/bits/shm.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/shm.h: Likewise.
* sysvipc/sys/shm.h: Define time_t.
* sysvipc/sys/sem.h (struct sembuf): Make sem_num field unsigned.
* sysdeps/gnu/bits/sem.h: Rename anonymous type struct sem_queue and
struct sem_undo to struct __sem_queue and struct __sem_undo resp.
* time/time.h: Define suseconds_t if not already done.
* sysdeps/unix/sysv/linux/bits/statvfs.h: Rename f_spare to __f_spare.
* sysdeps/unix/sysv/linux/fstatvfs64.c: Likewise.
* sysdeps/unix/sysv/linux/statvfs64.c: Likewise.
* sysdeps/unix/sysv/linux/internal_statvfs.c: Likewise.
* intl/bindtextdom.c: Use rwlock to avoid surprising results in
multithreaded applications.
* intl/dcigettext.c: Likewise.
* intl/textdomain.c: Likewise.
* intl/*.c: Update copyright.
* sysdeps/generic/bits/libc-lock.h: Define __libc_rwlock_* stubs.
2000-02-27 Andreas Jaeger <aj@suse.de>
* sysdeps/unix/sysv/linux/configure.in: Treat also "/usr/" as
prefix especially.
2000-02-27 Ulrich Drepper <drepper@redhat.com>
* po/de.po: Update from translation team.
* po/ko.po: Likewise.
Diffstat (limited to 'conform')
45 files changed, 1334 insertions, 3 deletions
diff --git a/conform/conformtest.pl b/conform/conformtest.pl index 23fff70..0608d9f 100644 --- a/conform/conformtest.pl +++ b/conform/conformtest.pl @@ -4,7 +4,12 @@ $CC = "gcc"; $CFLAGS = "-I. '-D__attribute__(x)=' -D_XOPEN_SOURCE=500"; # List of the headers we are testing. -@headers = ("sys/msg.h", "sys/mman.h", "sys/ipc.h", "syslog.h", +@headers = ("wordexp.h", "wctype.h", "wchar.h", "varargs.h", "utmpx.h", + "utime.h", "unistd.h", "ulimit.h", "ucontext.h", "time.h", + "termios.h", "tar.h", "sys/wait.h", "sys/uio.h", "sys/types.h", + "sys/times.h", "sys/timeb.h", "sys/time.h", "sys/statvfs.h", + "sys/stat.h", "sys/shm.h", "sys/sem.h", "sys/resource.h", + "sys/msg.h", "sys/mman.h", "sys/ipc.h", "syslog.h", "stropts.h", "strings.h", "string.h", "stdlib.h", "stdio.h", "stddef.h", "stdarg.h", "signal.h", "setjmp.h", "semaphore.h", "search.h", "sched.h", "regex.h", "pwd.h", "pthread.h", @@ -240,6 +245,7 @@ while ($#headers >= 0) { my($fnamebase) = "$tmpdir/$hf-test"; my($missing); my(@allow) = (); + my(@allowheader) = (); my($prepend) = $mustprepend{$h}; printf ("Testing <$h>\n"); @@ -539,6 +545,10 @@ while ($#headers >= 0) { my($pattern) = $1; push @allow, $pattern; next control; + } elsif (/^allow-header *(.*)/) { + my($pattern) = $1; + push @allowheader, $pattern; + next control; } else { # printf ("line is `%s'\n", $_); next control; @@ -548,6 +558,51 @@ while ($#headers >= 0) { } close (CONTROL); + # Read the data files for the header files which are allowed to be included. + while ($#allowheader >= 0) { + my($ah) = pop @allowheader; + + open (ALLOW, "$CC -E -D$dialect - < data/$ah-data |"); + acontrol: while (<ALLOW>) { + next acontrol if (/^#/); + next acontrol if (/^[ ]*$/); + + if (/^element *({([^}]*)}|([^ ]*)) *({([^}]*)}|([^ ]*)) *([A-Za-z0-9_]*) *(.*)/) { + push @allow, $7; + } elsif (/^constant *([a-zA-Z0-9_]*) *([A-Za-z0-9_]*)?/) { + push @allow, $1; + } elsif (/^typed-constant *([a-zA-Z0-9_]*) *({([^}]*)}|([^ ]*)) *([A-Za-z0-9_]*)?/) { + push @allow, 1; + } elsif (/^type *({([^}]*)|([a-zA-Z0-9_]*))/) { + my($type) = "$2$3"; + + # Remember that this name is allowed. + if ($type =~ /^struct *(.*)/) { + push @allow, $1; + } elsif ($type =~ /^union *(.*)/) { + push @allow, $1; + } else { + push @allow, $type; + } + } elsif (/^function *({([^}]*)}|([a-zA-Z0-9_]*)) [(][*]([a-zA-Z0-9_]*) ([(].*[)])/) { + push @allow, $4; + } elsif (/^function *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) { + push @allow, $4; + } elsif (/^variable *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*)/) { + push @allow, $4; + } elsif (/^macro-function *({([^}]*)}|([a-zA-Z0-9_]*)) ([a-zA-Z0-9_]*) ([(].*[)])/) { + push @allow, $4; + } elsif (/^macro *([^ ]*)/) { + push @allow, $1; + } elsif (/^allow *(.*)/) { + push @allow, $1; + } elsif (/^allow-header *(.*)/) { + push @allowheader, $1; + } + } + close (ALLOW); + } + # Now check the namespace. printf (" Checking the namespace of \"%s\"... ", $h); if ($missing) { diff --git a/conform/data/fcntl.h-data b/conform/data/fcntl.h-data index 0344ce9..cf34c2b 100644 --- a/conform/data/fcntl.h-data +++ b/conform/data/fcntl.h-data @@ -50,6 +50,9 @@ function int open (const char*, int, ...) allow-header sys/stat.h allow-header unistd.h -allow *_t allow l_* +allow F_* +allow O_* +allow S_* +allow *_t #endif diff --git a/conform/data/fnmatch.h-data b/conform/data/fnmatch.h-data index 82a4136..ef34fc4 100644 --- a/conform/data/fnmatch.h-data +++ b/conform/data/fnmatch.h-data @@ -7,5 +7,6 @@ constant FNM_NOSYS function int fnmatch (const char*, const char*, int) +allow FNM_* allow *_t #endif diff --git a/conform/data/math.h-data b/conform/data/math.h-data index 466de7d..0d391eb 100644 --- a/conform/data/math.h-data +++ b/conform/data/math.h-data @@ -32,6 +32,7 @@ function double frexp (double, int*) function double ldexp (double, int) function double log (double) function double log10 (double) +function double modf (double, double*) function double pow (double, double) function double sin (double) function double sinh (double) diff --git a/conform/data/ndbm.h-data b/conform/data/ndbm.h-data index 7843941..6e606e5 100644 --- a/conform/data/ndbm.h-data +++ b/conform/data/ndbm.h-data @@ -22,5 +22,7 @@ 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/conform/data/nl_types.h-data b/conform/data/nl_types.h-data index 7cabf3f..ec2c18b 100644 --- a/conform/data/nl_types.h-data +++ b/conform/data/nl_types.h-data @@ -9,5 +9,6 @@ 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/conform/data/poll.h-data b/conform/data/poll.h-data index fdc7b2f..b695cad 100644 --- a/conform/data/poll.h-data +++ b/conform/data/poll.h-data @@ -19,5 +19,9 @@ constant POLLNVAL function int poll (struct pollfd[], nfsd_t, int) +allow pd_* +allow ph_* +allow ps_* +allow POLL* allow *_t #endif diff --git a/conform/data/pthread.h-data b/conform/data/pthread.h-data index eb0523e..f437814 100644 --- a/conform/data/pthread.h-data +++ b/conform/data/pthread.h-data @@ -1,4 +1,4 @@ -#ifdef ISO +#ifndef ISO constant PTHREAD_CANCEL_ASYNCHRONOUS constant PTHREAD_CANCEL_ENABLE constant PTHREAD_CANCEL_DEFERRED diff --git a/conform/data/semaphore.h-data b/conform/data/semaphore.h-data index 9664b67..8a59746 100644 --- a/conform/data/semaphore.h-data +++ b/conform/data/semaphore.h-data @@ -20,4 +20,5 @@ allow-header sys/types.h allow sem_* allow SEM_* +allow *_t #endif diff --git a/conform/data/setjmp.h-data b/conform/data/setjmp.h-data index 806dacf..ef29c9c 100644 --- a/conform/data/setjmp.h-data +++ b/conform/data/setjmp.h-data @@ -18,3 +18,5 @@ macro-function int sigsetjmp (sigjmp_buf, int) macro-function int _setjmp (jmp_buf) # endif #endif + +allow *_t diff --git a/conform/data/signal.h-data b/conform/data/signal.h-data index fda1af9..ee6ec52 100644 --- a/conform/data/signal.h-data +++ b/conform/data/signal.h-data @@ -189,3 +189,14 @@ allow SI_* allow sigev_* allow SIGEV_* allow sival_* +allow SA_* +allow BUS_* +allow CLD_* +allow FPE_* +allow ILL_* +allow POLL_* +allow SEGV_* +allow SS_* +allow SV_* +allow TRAP_* +allow *_t diff --git a/conform/data/stdarg.h-data b/conform/data/stdarg.h-data index 719d504..ee228d0 100644 --- a/conform/data/stdarg.h-data +++ b/conform/data/stdarg.h-data @@ -5,3 +5,5 @@ macro va_start macro va_arg macro va_end macro va_copy + +allow *_t diff --git a/conform/data/stddef.h-data b/conform/data/stddef.h-data index 05b1570..630e017 100644 --- a/conform/data/stddef.h-data +++ b/conform/data/stddef.h-data @@ -6,3 +6,5 @@ type ptrdiff_t type wchar_t type size_t type wint_t + +allow *_t diff --git a/conform/data/stdio.h-data b/conform/data/stdio.h-data index 93238ba..9299a9a 100644 --- a/conform/data/stdio.h-data +++ b/conform/data/stdio.h-data @@ -100,4 +100,6 @@ variable int optind variable int optopt allow-header stddef.h + +allow *_t #endif diff --git a/conform/data/stdlib.h-data b/conform/data/stdlib.h-data index 00fd032..74dc452 100644 --- a/conform/data/stdlib.h-data +++ b/conform/data/stdlib.h-data @@ -83,3 +83,6 @@ allow-header stddef.h allow-header limits.h allow-header math.h allow-header sys/wait.h + +allow str* +allow *_t diff --git a/conform/data/string.h-data b/conform/data/string.h-data index fe27c8a..4773cb2 100644 --- a/conform/data/string.h-data +++ b/conform/data/string.h-data @@ -29,3 +29,7 @@ function {char*} strtok_r (char*, const char*, char**) function size_t strxfrm (char*, const char*, size_t) allow-header stddef.h + +allow str* +allow wcs* +allow *_t diff --git a/conform/data/strings.h-data b/conform/data/strings.h-data index 7d7d67e..201780c 100644 --- a/conform/data/strings.h-data +++ b/conform/data/strings.h-data @@ -8,3 +8,5 @@ function int strcasecmp (const char*, const char*) function int strncasecmp (const char*, const char*, size_t) type size_t + +allow *_t diff --git a/conform/data/stropts.h-data b/conform/data/stropts.h-data index 318dc11..c760282 100644 --- a/conform/data/stropts.h-data +++ b/conform/data/stropts.h-data @@ -121,3 +121,17 @@ 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 diff --git a/conform/data/sys/ipc.h-data b/conform/data/sys/ipc.h-data index 0bfd22b..1b2ec99 100644 --- a/conform/data/sys/ipc.h-data +++ b/conform/data/sys/ipc.h-data @@ -22,3 +22,7 @@ constant IPC_SET constant IPC_STAT function key_t ftok (const char*, int) + +allow ipc_* +allow IPC_* +allow *_t diff --git a/conform/data/sys/mman.h-data b/conform/data/sys/mman.h-data index f45ea0c..8a696d3 100644 --- a/conform/data/sys/mman.h-data +++ b/conform/data/sys/mman.h-data @@ -30,3 +30,10 @@ 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 diff --git a/conform/data/sys/msg.h-data b/conform/data/sys/msg.h-data index 69bd82f..7a1df4c 100644 --- a/conform/data/sys/msg.h-data +++ b/conform/data/sys/msg.h-data @@ -26,3 +26,7 @@ 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 diff --git a/conform/data/sys/resource.h-data b/conform/data/sys/resource.h-data new file mode 100644 index 0000000..d9f9b9a --- /dev/null +++ b/conform/data/sys/resource.h-data @@ -0,0 +1,50 @@ +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 diff --git a/conform/data/sys/sem.h-data b/conform/data/sys/sem.h-data new file mode 100644 index 0000000..8b4598b --- /dev/null +++ b/conform/data/sys/sem.h-data @@ -0,0 +1,37 @@ +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 +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 diff --git a/conform/data/sys/shm.h-data b/conform/data/sys/shm.h-data new file mode 100644 index 0000000..a08d6f5 --- /dev/null +++ b/conform/data/sys/shm.h-data @@ -0,0 +1,32 @@ +constant SHM_RDONLY +constant 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 diff --git a/conform/data/sys/stat.h-data b/conform/data/sys/stat.h-data new file mode 100644 index 0000000..97ab812 --- /dev/null +++ b/conform/data/sys/stat.h-data @@ -0,0 +1,75 @@ +type {struct stat} + +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 +element {struct stat} dev_t st_rdev +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 +element {struct stat} blksize_t st_blksize +element {struct stat} blkcnt_t st_blocks + +type blkcnt_t +type blksize_t +type dev_t +type ino_t +type mode_t +type nlink_t +type uid_t +type gid_t +type off_t +type time_t + +constant S_IFMT +constant S_IFBLK +constant S_IFCHR +constant S_IFIFO +constant S_IFREG +constant S_IFDIR +constant S_IFLNK + +constant S_IRWXU +constant S_IRUSR +constant S_IWUSR +constant S_IXUSR +constant S_IRWXG +constant S_IWGRP +constant S_IXGRP +constant S_IRWXO +constant S_IROTH +constant S_IWOTH +constant S_IXOTH +constant S_ISUID +constant S_ISGID +constant S_ISVTX + +macro S_ISBLK +macro S_ISCHR +macro S_ISDIR +macro S_ISFIFO +macro S_ISREG +macro S_ISLNK + +# How to represent optional tests? +# macro S_TYPEISMQ +# macro S_TYPEISSEM +# macro S_TYPEISSHM + +function int chmod (const char*, mode_t) +function int fchmod (int, mode_t) +function int fstat (int, struct stat*) +function int lstat (const char*, struct stat*) +function int mkdir (const char*, mode_t) +function int mkfifo (const char*, mode_t) +function int mknod (const char*, mode_t, dev_t) +function int stat (const char*, struct stat*) +function mode_t umask (mode_t) + +allow st_* +allow S_* +allow *_t diff --git a/conform/data/sys/statvfs.h-data b/conform/data/sys/statvfs.h-data new file mode 100644 index 0000000..d7312cd --- /dev/null +++ b/conform/data/sys/statvfs.h-data @@ -0,0 +1,26 @@ +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 diff --git a/conform/data/sys/time.h-data b/conform/data/sys/time.h-data new file mode 100644 index 0000000..49d5fbc --- /dev/null +++ b/conform/data/sys/time.h-data @@ -0,0 +1,40 @@ +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 {struct fd_set} + +element {struct 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 diff --git a/conform/data/sys/timeb.h-data b/conform/data/sys/timeb.h-data new file mode 100644 index 0000000..d012f5d --- /dev/null +++ b/conform/data/sys/timeb.h-data @@ -0,0 +1,12 @@ +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 diff --git a/conform/data/sys/times.h-data b/conform/data/sys/times.h-data new file mode 100644 index 0000000..9c3237e --- /dev/null +++ b/conform/data/sys/times.h-data @@ -0,0 +1,13 @@ +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 diff --git a/conform/data/sys/types.h-data b/conform/data/sys/types.h-data new file mode 100644 index 0000000..6a08c19 --- /dev/null +++ b/conform/data/sys/types.h-data @@ -0,0 +1,34 @@ +type blkcnt_t +type blksize_t +type clock_t +type clockid_t +type dev_t +type fsblkcnt_t +type fsfilcnt_t +type gid_t +type id_t +type ino_t +type key_t +type mode_t +type nlink_t +type off_t +type pid_t +type pthread_attr_t +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 +type pthread_t +type size_t +type ssize_t +type suseconds_t +type time_t +type timer_t +type uid_t +type useconds_t + +allow *_t diff --git a/conform/data/sys/uio.h-data b/conform/data/sys/uio.h-data new file mode 100644 index 0000000..593cb18 --- /dev/null +++ b/conform/data/sys/uio.h-data @@ -0,0 +1,11 @@ +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 diff --git a/conform/data/sys/wait.h-data b/conform/data/sys/wait.h-data new file mode 100644 index 0000000..731c955 --- /dev/null +++ b/conform/data/sys/wait.h-data @@ -0,0 +1,64 @@ +constant WNOHANG +constant WUNTRACED + +macro WEXITSTATUS +macro WIFCONTINUED +macro WIFEXITED +macro WIFSIGNALED +macro WIFSTOPPED +macro WSTOPSIG +macro WTERMSIG + +constant WEXITED +constant WSTOPPED +constant WCONTINUED +constant WNOHANG +constant WNOWAIT + +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 + +type {struct rusage} + +element {struct rusage} {struct timeval} ru_utime +element {struct rusage} {struct timeval} ru_stime + +type pid_t + +function pid_t wait (int*) +function pid_t wait3 (int*, int, struct rusage*) +function int waitid (idtype_t, id_t, siginfo_t*, int) +function pid_t waitpid (pid_t, int*, int) + +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_ +allow *_t diff --git a/conform/data/syslog.h-data b/conform/data/syslog.h-data index 62ae551..87414e8 100644 --- a/conform/data/syslog.h-data +++ b/conform/data/syslog.h-data @@ -37,3 +37,6 @@ 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 diff --git a/conform/data/tar.h-data b/conform/data/tar.h-data new file mode 100644 index 0000000..79f6fb4 --- /dev/null +++ b/conform/data/tar.h-data @@ -0,0 +1,29 @@ +constant TMAGIC +constant TMAGLEN +constant TVERSION +constant TVERSLEN + +constant REGTYPE +constant AREGTYPE +constant LNKTYPE +constant SYMTYPE +constant CHRTYPE +constant BLKTYPE +constant DIRTYPE +constant FIFOTYPE +constant CONTTYPE + +constant TSUID +constant TSGID +constant TSVTX +constant TUREAD +constant TUWRITE +constant TUEXEC +constant TGREAD +constant TGWRITE +constant TGEXEC +constant TOREAD +constant TOWRITE +constant TOEXEC + +allow *_t diff --git a/conform/data/termios.h-data b/conform/data/termios.h-data new file mode 100644 index 0000000..07351b4 --- /dev/null +++ b/conform/data/termios.h-data @@ -0,0 +1,159 @@ +type cc_t +type speed_t +type tcflag_t + +type {struct termios} + +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 +constant IUCLC +constant IXANY +constant IXOFF +constant IXON +constant PARMRK + +constant OPOST +constant OLCUC +constant ONLCR +constant OCRNL +constant ONOCR +constant ONLRET +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 + +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 +constant XCASE + +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*) +function pid_t tcgetsid (int) +function int tcsendbreak (int, int) +function int tcsetattr (int, int, struct termios*) + +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 + +allow c_* +allow V* +allow I* +allow O* +allow TC* +allow B* +allow *_t diff --git a/conform/data/time.h-data b/conform/data/time.h-data new file mode 100644 index 0000000..045ed49 --- /dev/null +++ b/conform/data/time.h-data @@ -0,0 +1,75 @@ +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 + +constant NULL +constant CLK_TCK +constant CLOCKS_PER_SEC + +type {struct timespec} + +element {struct timespec} time_t tv_sec +element {struct timespec} long tv_nsec + +type {struct itimerspec} + +element {struct itimerspec} {struct timespec} it_interval +element {struct itimerspec} {struct timespec} it_value + +constant CLOCK_REALTIME +constant TIME_ABSTIME + +type clock_t +type clockid_t +type size_t +type time_t +type timer_t + +variable int getdate_err + +function {char*} asctime (const struct tm*) +function {char*} asctime_r (const struct tm*, char*) +function clock_t clock (void) +function int clock_getres (clockid_t, struct timespec*) +function int clock_gettime (clockid_t, struct timespec*) +function int clock_settime (clockid_t, const struct timespec*) +function {char*} ctime (const time_t*) +function {char*} ctime_r (const time_t*, char*) +function double difftime (time_t, time_t) +function {struct tm*} getdate (const char*) +function {struct tm*} gmtime (const time_t*) +function {struct tm*} gmtime_t (const time_t*, struct tm*) +function {struct tm*} localtime (const time_t*) +function {struct tm*} localtime_r (const time_t*, struct tm*) +function time_t mktime (struct tm*) +function int nanosleep (const struct timespec*, struct timespec*) +function size_t strftime (char*, size_t, const char*, const struct tm*) +function {char*} strptime (const char*, const char*, struct tm*) +function time_t time (time_t*) +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*) +function void tzset (void) + +variable int daylight +variable {long int} timezone +# variable {char*} tzname [] + +allow tm_* +allow clock_* +allow timer_* +allow it_* +allow tv_* +allow CLOCK_* +allow TIMER_* +allow *_t diff --git a/conform/data/ucontext.h-data b/conform/data/ucontext.h-data new file mode 100644 index 0000000..3ad661e --- /dev/null +++ b/conform/data/ucontext.h-data @@ -0,0 +1,20 @@ +type mcontext_t + +type ucontext_t + +element {struct ucontext_t} {ucontext_t*} uc_link +element {struct ucontext_t} sigset_t uc_sigmask +element {struct ucontext_t} stack_t uc_stack +element {struct 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 diff --git a/conform/data/ulimit.h-data b/conform/data/ulimit.h-data new file mode 100644 index 0000000..84ab56c --- /dev/null +++ b/conform/data/ulimit.h-data @@ -0,0 +1,7 @@ +constant UL_GETFSIZE +constant UL_SETFSIZE + +function {long int} ulimit (int, ...) + +allow UL_* +allow *_t diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data new file mode 100644 index 0000000..e3008e7 --- /dev/null +++ b/conform/data/unistd.h-data @@ -0,0 +1,308 @@ +constant _POSIX_VERSION +constant _POSIX2_VERSION +constant _POSIX2_C_VERSION +constant _XOPEN_VERSION +constant _XOPEN_XCU_VERSION + +constant _POSIX2_C_BIND +constant _POSIX2_CHAR_TERM +constant _POSIX2_LOCALDEF +constant _POSIX2_UPE +constant _POSIX2_VERSION + +constant _XOPEN_XPG2 +constant _XOPEN_XPG3 +constant _XOPEN_XPG4 +constant _XOPEN_UNIX + +constant _POSIX_CHOWN_RESTRICTED +constant _POSIX_NO_TRUNC +constant _POSIX_VDISABLE +constant _POSIX_SAVED_IDS +constant _POSIX_JOB_CONTROL + +constant _POSIX_THREADS +constant _POSIX_THREAD_ATTR_STACKADDR +constant _POSIX_THREAD_ATTR_STACKSIZE +constant _POSIX_THREAD_PROCESS_SHARED +constant _POSIX_THREAD_SAFE_FUNCTIONS + +constant _POSIX2_C_DEV +constant _POSIX2_FORT_DEV +constant _POSIX2_FORT_RUN +constant _POSIX2_SW_DEV +constant _XOPEN_CRYPT +constant _XOPEN_ENH_I18N +constant _XOPEN_LEGACY +constant _XOPEN_REALTIME +constant _XOPEN_REALTIME_THREADS +constant _XOPEN_SHM +allow _XBS5_ILP32_OFF32 +allow _XBS5_ILP32_OFBIG +allow _XBS5_LP64_OFF64 +allow _XBS5_LPBIG_OFFBIG +constant _POSIX_ASYNCHRONOUS_IO +constant _POSIX_MEMLOCK +constant _POSIX_MEMLOCK_RANGE +constant _POSIX_MESSAGE_PASSING +constant _POSIX_PRIORITY_SCHEDULING +constant _POSIX_REALTIME_SIGNALS +constant _POSIX_SEMAPHORES +constant _POSIX_SHARED_MEMORY_OBJECTS +constant _POSIX_SYNCHRONIZED_IO +constant _POSIX_TIMERS + +constant _POSIX_FSYNC +constant _POSIX_MAPPED_FILES +constant _POSIX_MEMORY_PROTECTION + +constant _POSIX_PRIORITIZED_IO + +constant _POSIX_THREAD_PRIORITY_SCHEDULING +constant _POSIX_THREAD_PRIO_INHERIT +constant _POSIX_THREAD_PRIO_PROTECT + +constant _POSIX_ASYNC_IO +constant _POSIX_PRIO_IO +constant _POSIX_SYNC_IO + +constant NULL + +constant R_OK +constant W_OK +constant X_OK +constant F_OK + +constant _CS_PATH +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 + +constant SEEK_SET +constant SEEK_CUR +constant SEEK_END + +constant _SC_2_C_BIND +constant _SC_2_C_DEV +constant _SC_2_C_VERSION +constant _SC_2_FORT_DEV +constant _SC_2_FORT_RUN +constant _SC_2_LOCALEDEF +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 +constant _SC_ATEXIT_MAX +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 +constant _SC_COLL_WEIGHTS_MAX +constant _SC_DELAYTIMER_MAX +constant _SC_EXPR_NEST_MAX +constant _SC_FSYNC +constant _SC_GETGR_R_SIZE_MAX +constant _SC_GETPW_R_SIZE_MAX +constant _SC_IOV_MAX +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_MQ_OPEN_MAX +constant _SC_MQ_PRIO_MAX +constant _SC_NGROUPS_MAX +constant _SC_OPEN_MAX +constant _SC_PAGESIZE +constant _SC_PAGE_SIZE +constant _SC_PASS_MAX +constant _SC_PRIORITIZED_IO +constant _SC_PRIORITY_SCHEDULING +constant _SC_RE_DUP_MAX +constant _SC_REALTIME_SIGNALS +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 +constant _SC_SIGQUEUE_MAX +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 +constant _SC_TZNAME_MAX +constant _SC_VERSION +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 +constant _SC_XBS5_ILP32_OFF32 +constant _SC_XBS5_ILP32_OFFBIG +constant _SC_XBS5_ILP64_OFF64 +constant _SC_XBS5_ILPIBIG_OFFBIG + +constant F_LOCK +constant F_ULOCK +constant F_TEST +constant F_TLOCK + +constant _PC_ASYNC_IO +constant _PC_CHOWN_RESTRICTED +constant _PC_FILESIZEBITS +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 +constant _PC_SYNC_IO +constant _PC_VDISABLE + +constant STDIN_FILENO +constant STDOUT_FILENO +constant STDERR_FILENO + +type size_t +type ssize_t +type uid_t +type gid_t +type uid_t +type pid_t + +type useconds_t + +type intptr_t + +function int access (const char*, int) +function {unsigned int} alarm (unsigned int) +function int brk (void*) +function int chdir (const char*) +function int chroot (const char*) +function int chown (const char*, uid_t, gid_t) +function int close (int) +function size_t confstr (int, char*, size_t) +function {char*} crypt (const char*, const char*) +function {char*} ctermid (char*) +function {char*} cuserid (char*) +function int dup (int) +function int dup2 (int, int) +function void encrypt (char[64], int) +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[]) +function int execvp (const char*, char *const[]) +function void _exit (int) +function int fchown (int, uid_t, gid_t) +function int fchdir (int) +function int fdatasync (int) +function pid_t fork (void) +function {long int} fpathconf (int, int) +function int fsync (int) +function int ftruncate (int, off_t) +function {char*} getcwd (char*, size_t) +function int getdtablesize (void) +function gid_t getegid (void) +function uid_t geteuid (void) +function gid_t getgid (void) +function int getgroups (int, gid_t[]) +function long gethostid (void) +function {char*} getlogin (void) +function int getlogin_r (char*, size_t) +function int getopt (int, char*const[], const char*) +function int getpagesize (void) +function {char*} getpass (const char*) +function pid_t getpgid (pid_t) +function pid_t getpgrp (void) +function pid_t getpid (void) +function pid_t getppid (void) +function pid_t getsid (void) +function uid_t getuid (void) +function {char*} getwd (char*) +function int isatty (int) +function int lchown (const char*, uid_t, gid_t) +function int link (const char*, const char*) +function int lockf (int, int, off_t) +function off_t lseek (int, off_t, int) +function int nice (int) +function {long int} pathconf (const char*, int) +function int pause (void) +function int pipe (int[2]) +function ssize_t pread (int, void*, size_t, off_t) +function int pthread_atfork (void(*)(void), void(*)(void), void(*)(void)) +function ssize_t pwrite (int, const void*, size_t, off_t) +function ssize_t read (int, void*, size_t) +function int readlink (const char*, char*, size_t) +function int rmdir (const char*) +function {void*} sbrk (intptr_t) +function int setgid (gid_t) +function int setpgid (pid_t, pid_t) +function pid_t setpgrp (void) +function int setregid (gid_t, gid_t) +function int setreuid (uid_t, uid_t) +function pid_t setsid (void) +function int setuid (uid_t) +function {unsigned int} sleep (unsigned int) +function void swab (const char*, void*, ssize_t) +function int symlink (const char*, const char*) +function void sync (void) +function {long int} sysconf (int) +function pid_t tcgetpgrp (int) +function int tcsetpgrp (int, pid_t) +function int truncate (const char*, off_t) +function {char*} ttyname (int) +function int ttyname_r (int, char*, size_t) +function useconds_t ualarm (useconds_t, useconds_t) +function int unlink (const char*) +function int usleep (useconds_t) +function pid_t vfork (void) +function ssize_t write (int, const void*, size_t) + +variable {char*} optarg +variable int optind +variable int opterr +variable int optopt + +allow *_t diff --git a/conform/data/utime.h-data b/conform/data/utime.h-data new file mode 100644 index 0000000..15d4487 --- /dev/null +++ b/conform/data/utime.h-data @@ -0,0 +1,11 @@ +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 diff --git a/conform/data/utmpx.h-data b/conform/data/utmpx.h-data new file mode 100644 index 0000000..ba034f0 --- /dev/null +++ b/conform/data/utmpx.h-data @@ -0,0 +1,36 @@ +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 +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 diff --git a/conform/data/varargs.h-data b/conform/data/varargs.h-data new file mode 100644 index 0000000..11dc38c --- /dev/null +++ b/conform/data/varargs.h-data @@ -0,0 +1,8 @@ +macro va_alist +macro va_dcl +type va_list +macro va_start +macro va_arg +macro va_end + +allow *_t diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data new file mode 100644 index 0000000..49f85c5 --- /dev/null +++ b/conform/data/wchar.h-data @@ -0,0 +1,95 @@ +type wchar_t +type wint_t +type wctype_t +type mbstate_t +type FILE +type size_t + +function wint_t btowc (int) +function int fwprintf (FILE*, const wchar_t*, ...) +function int fwscanf (FILE*, const wchar_t*, ...) +#if !ISO +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_*) +function size_t mbsrtowcs (wchar_t*, const char**, size_t, mbstate_t*) +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*, ...) +function wint_t towlower (wint_t) +function wint_t towupper (wint_t) +function wint_t ungetwc (wint_t, FILE*) +function int vfwprintf (FILE, const wchar_t*, va_list) +function int vwprintf (const wchar_t*, va_list) +function int vswprintf (wchar_t*, size_t, const wchar_t*, va_list) +function size_t wcrtomb (char*, wchar_t, mbstate_t*) +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*) +function {wchar_t*} wcscpy (wchar_t*, const wchar_t*) +function size_t wcscspn (const wchar_t*, const wchar_t*) +function size_t wcsftime (wchar_t*, size_t, const wchar_t*, const struct tm*) +function size_t wcslen (const wchar_t*) +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) +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**) +function {wchar_t*} wcstok (wchar_t*, const wchar_t*, wchar_t**) +function {long int} wcstol (const wchar_t*, wchar_t**, int) +function {unsigned long int} wcstoul (const wchar_t*, wchar_t**, int) +function {wchar_t*} wcswcs (const wchar_t*, const wchar_t*) +function int wcswidth (const wchar_t*, size_t) +function size_t wcsxfrm (wchar_t*, const wchar_t*, size_t) +function int wctob (wint_t) +function wctype_t wctype (const char*) +function int wcwidth (wchar_t) +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 WCHAR_MAX +macro WCHAR_MIN +macro WEOF +macro NULL + +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 wcs* +allow *_t diff --git a/conform/data/wctype.h-data b/conform/data/wctype.h-data new file mode 100644 index 0000000..230d748 --- /dev/null +++ b/conform/data/wctype.h-data @@ -0,0 +1,36 @@ +type wint_t +type wctrans_t +type wctype_t + +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) +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*) + +macro WEOF + +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 + +allow is* +allow to* +allow *_t diff --git a/conform/data/wordexp.h-data b/conform/data/wordexp.h-data new file mode 100644 index 0000000..7ff2145 --- /dev/null +++ b/conform/data/wordexp.h-data @@ -0,0 +1,25 @@ +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_DOOFS +constant WRDE_NOCMD +constant WRDE_REUSE +constant WRDE_SHOWERR +constant WRDE_UNDEF + +constant WRDE_BADCHAR +constant WRDE_CMDSUB +constant WRDE_NOSPACE +constant WRDE_NOSYS +constant WRDE_SYNTAX + +function int wordexp (const char*, wordexp_t*, int) +function void wordfree (wordexp_t*) + +allow WRDE_* +allow we_* +allow *_t |