summary refs log tree commit diff
path: root/conform/data/sys
diff options
context:
space:
mode:
Diffstat (limited to 'conform/data/sys')
-rw-r--r--conform/data/sys/ipc.h-data4
-rw-r--r--conform/data/sys/mman.h-data7
-rw-r--r--conform/data/sys/msg.h-data4
-rw-r--r--conform/data/sys/resource.h-data50
-rw-r--r--conform/data/sys/sem.h-data37
-rw-r--r--conform/data/sys/shm.h-data32
-rw-r--r--conform/data/sys/stat.h-data75
-rw-r--r--conform/data/sys/statvfs.h-data26
-rw-r--r--conform/data/sys/time.h-data40
-rw-r--r--conform/data/sys/timeb.h-data12
-rw-r--r--conform/data/sys/times.h-data13
-rw-r--r--conform/data/sys/types.h-data34
-rw-r--r--conform/data/sys/uio.h-data11
-rw-r--r--conform/data/sys/wait.h-data64
14 files changed, 409 insertions, 0 deletions
diff --git a/conform/data/sys/ipc.h-data b/conform/data/sys/ipc.h-data
index 0bfd22bad2..1b2ec99d37 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 f45ea0c8c3..8a696d349b 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 69bd82f956..7a1df4cbed 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 0000000000..d9f9b9ab8c
--- /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 0000000000..8b4598b7b2
--- /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 0000000000..a08d6f5596
--- /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 0000000000..97ab81287d
--- /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 0000000000..d7312cdb87
--- /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 0000000000..49d5fbc2d1
--- /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 0000000000..d012f5d69a
--- /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 0000000000..9c3237eb83
--- /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 0000000000..6a08c1940e
--- /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 0000000000..593cb18ef8
--- /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 0000000000..731c9551f7
--- /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