summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauricioAntunes <>2009-09-25 17:47:45 (GMT)
committerLuite Stegeman <luite@luite.com>2009-09-25 17:47:45 (GMT)
commit07065b97da63f83703d1feb1fda181118e7a3100 (patch)
treec80909d9149537d92c32da41a4d1408e4c3c0780
parentc23264b9c1d3e7f2d47baa626cb5966d786caf65 (diff)
version 1.01.0
-rw-r--r--.hg_archival.txt2
-rw-r--r--bindings-posix.cabal28
-rw-r--r--src/Bindings/Posix.hsc3364
-rw-r--r--src/Bindings/Posix/Errno.hsc86
-rw-r--r--src/Bindings/Posix/Signal.hsc12
-rw-r--r--src/Bindings/Posix/Sys/Select.hsc32
-rw-r--r--src/Bindings/Posix/Sys/Types.hsc67
-rw-r--r--src/Bindings/Posix/Sys/Utsname.hsc18
-rw-r--r--src/Bindings/Posix/Time.hsc16
-rw-r--r--src/Bindings/Posix/Unistd.hsc249
-rw-r--r--src/inlines.c27
-rw-r--r--src/test.hs4
12 files changed, 541 insertions, 3364 deletions
diff --git a/.hg_archival.txt b/.hg_archival.txt
index b7c8a21..eee06a4 100644
--- a/.hg_archival.txt
+++ b/.hg_archival.txt
@@ -1,2 +1,2 @@
repo: c1d900fe279ed394e13fbfd3c5d65142fc21d6e9
-node: 177093a98253f283431fdca82ea646b2d9abfdb4
+node: ffac32b2f31620096c144b276006c5c0d2748379
diff --git a/bindings-posix.cabal b/bindings-posix.cabal
index b12bee2..54288a9 100644
--- a/bindings-posix.cabal
+++ b/bindings-posix.cabal
@@ -1,25 +1,35 @@
cabal-version: >= 1.2.3
name: bindings-posix
-homepage: http://bitbucket.org/mauricio/bindings
+homepage: http://bitbucket.org/mauricio/bindings-posix
synopsis:
- Check bindings-common package for directions.
-version: 0.0.2
+ Low level bindings to posix.
+version: 1.0
license: BSD3
license-file: LICENSE
maintainer: MaurĂ­cio C. Antunes <mauricio.antunes@gmail.com>
author: MaurĂ­cio C. Antunes
bug-reports: http://bitbucket.org/mauricio/bindings-posix/issues
build-type: Simple
-stability: Needs users feedback
category: FFI
library
hs-source-dirs: src
extensions:
ForeignFunctionInterface
- TypeSynonymInstances
- ScopedTypeVariables
- EmptyDataDecls
- TypeFamilies
- build-depends: base >= 3 && <5, bindings-common
+ build-depends:
+ base >= 3 && < 5,
+ bindings-common >= 1 && < 2
exposed-modules:
+ -- Time e Signal incompletos!
Bindings.Posix
+ Bindings.Posix.Errno
+ Bindings.Posix.Signal
+ Bindings.Posix.Sys.Select
+ Bindings.Posix.Sys.Types
+ Bindings.Posix.Sys.Utsname
+ Bindings.Posix.Time
+ Bindings.Posix.Unistd
+ cc-options:
+ "-D_ISOC99_SOURCE"
+ "-D_POSIX_C_SOURCE=200112L"
+ "-D_XOPEN_SOURCE=600"
+ c-sources: src/inlines.c
diff --git a/src/Bindings/Posix.hsc b/src/Bindings/Posix.hsc
index 838d300..a622a31 100644
--- a/src/Bindings/Posix.hsc
+++ b/src/Bindings/Posix.hsc
@@ -1,3353 +1,17 @@
-#include <bindings.macros.h>
-
-#bindings_initialize _
-
module Bindings.Posix (
-
- -- * @aio.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/aio.h.html>
-
- #bindings_export_conids aiocb
- #bindings_export_varids AIO_ALLDONE|AIO_CANCELED
- #bindings_export_varids AIO_NOTCANCELED|LIO_NOP
- #bindings_export_varids LIO_NOWAIT|LIO_READ
- #bindings_export_varids LIO_WAIT|LIO_WRITE
- #bindings_export_varids aio_cancel|aio_error|aio_fsync
- #bindings_export_varids aio_read|aio_return|aio_suspend
- #bindings_export_varids aio_write|lio_listio
-
- -- * @arpa/inet.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/arpa_inet.h.html>
-
- #bindings_export_varids htonl|htons|ntohl|ntohs| \
- inet_addr|inet_ntop|inet_pton
-
- -- * @cpio.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/cpio.h.html>
-
- #bindings_export_varids C_IRUSR|C_IWUSR|C_IXUSR|C_IRGRP| \
- C_IWGRP|C_IXGRP|C_IROTH|C_IWOTH|C_IXOTH|C_ISUID|C_ISGID| \
- C_ISVTX|C_ISDIR|C_ISFIFO|C_ISREG|C_ISBLK|C_ISCHR|C_ISCTG| \
- C_ISLNK|C_ISSOCK|MAGIC
-
- -- * @ctype.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/ctype.h.html>
-
- -- * @dirent.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/dirent.h.html>
-
- #bindings_export_conids dirent
-
- DIR,
-
- #bindings_export_varids alphasort|closedir|dirfd| \
- fdopendir|opendir|readdir|readdir_r|rewinddir| \
- scandir|seekdir|telldir
-
- -- * @dlfcn.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/dlfcn.h.html>
-
- #bindings_export_varids RTLD_LAZY|RTLD_NOW|RTLD_GLOBAL|RTLD_LOCAL
-
- #bindings_export_varids dlclose|dlerror|dlopen|dlsym
-
- -- * @errno.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html>
-
- #bindings_export_varids E2BIG|EACCES|EADDRINUSE| \
- EADDRNOTAVAIL|EAFNOSUPPORT|EAGAIN|EALREADY|EBADF| \
- EBADMSG|EBUSY|ECANCELED|ECHILD|ECONNABORTED| \
- ECONNREFUSED|ECONNRESET|EDEADLK|EDESTADDRREQ|EDQUOT| \
- EEXIST|EFAULT|EFBIG|EHOSTUNREACH|EIDRM|EINPROGRESS|EINTR| \
- EINVAL|EIO|EISCONN|EISDIR|ELOOP|EMFILE|EMLINK|EMSGSIZE| \
- EMULTIHOP|ENAMETOOLONG|ENETDOWN|ENETRESET|ENETUNREACH| \
- ENFILE|ENOBUFS|ENODEV|ENOENT|ENOEXEC|ENOLCK|ENOLINK| \
- ENOMEM|ENOMSG|ENOPROTOOPT|ENOSPC|ENOSYS|ENOTCONN| \
- ENOTDIR|ENOTEMPTY|ENOTRECOVERABLE|ENOTSOCK|ENOTSUP| \
- ENOTTY|ENXIO|EOPNOTSUPP|EOVERFLOW|EOWNERDEAD|EPERM| \
- EPIPE|EPROTO|EPROTONOSUPPORT|EPROTOTYPE|EROFS|ESPIPE| \
- ESRCH|ESTALE|ETIMEDOUT|ETXTBSY|EWOULDBLOCK|EXDEV
-
- -- * @fcntl.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html>
-
- #bindings_export_varids F_DUPFD|F_GETFD|F_SETFD|F_GETFL| \
- F_SETFL|F_GETLK|F_SETLK|F_SETLKW|F_GETOWN|F_SETOWN| \
- FD_CLOEXEC|F_RDLCK|F_UNLCK|F_WRLCK|O_CREAT|O_EXCL| \
- O_NOCTTY|O_TRUNC|O_APPEND|O_DSYNC|O_NONBLOCK|O_RSYNC| \
- O_SYNC|O_ACCMODE|O_RDONLY|O_RDWR|O_WRONLY| \
- POSIX_FADV_DONTNEED|POSIX_FADV_NOREUSE|POSIX_FADV_NORMAL| \
- POSIX_FADV_RANDOM|POSIX_FADV_SEQUENTIAL|POSIX_FADV_WILLNEED
-
- #bindings_export_conids flock
-
- #bindings_export_varids creat|posix_fadvise|posix_fallocate
-
- -- * @fmtmsg.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/fmtmsg.h.html>
-
- #bindings_export_varids MM_HARD|MM_SOFT|MM_FIRM|MM_APPL| \
- MM_UTIL|MM_OPSYS|MM_RECOVER|MM_NRECOV|MM_HALT| \
- MM_ERROR|MM_WARNING|MM_INFO|MM_NOSEV|MM_PRINT|MM_CONSOLE| \
- MM_NULLLBL|MM_NULLSEV|MM_NULLMC|MM_NULLTXT|MM_NULLACT| \
- MM_NULLTAG|MM_OK|MM_NOTOK|MM_NOMSG|MM_NOCON
-
- #bindings_export_varids fmtmsg
-
- -- * @fnmatch.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/fnmatch.h.html>
-
- #bindings_export_varids FNM_NOMATCH|FNM_PATHNAME|FNM_PERIOD|FNM_NOESCAPE
-
- #bindings_export_varids fnmatch
-
- -- * @ftw.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/ftw.h.html>
-
--- #bindings_export_conids FTW
-
- #bindings_export_varids FTW_F|FTW_D|FTW_DNR| \
- FTW_NS|FTW_SL
-
--- #bindings_export_varids nftw
-
- -- * @glob.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/glob.h.html>
-
- #bindings_export_conids glob_t
-
- #bindings_export_varids GLOB_APPEND|GLOB_DOOFFS|GLOB_ERR| \
- GLOB_MARK|GLOB_NOCHECK|GLOB_NOESCAPE|GLOB_NOSORT| \
- GLOB_ABORTED|GLOB_NOMATCH|GLOB_NOSPACE
-
- #bindings_export_varids glob|globfree
-
- -- * @grp.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/grp.h.html>
-
- #bindings_export_conids group
-
- #bindings_export_varids endgrent|getgrent|getgrgid
- #bindings_export_varids getgrgid_r|getgrnam
- #bindings_export_varids getgrnam_r|setgrent
-
- -- * @iconv.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/iconv.h.html>
-
- CIconv,
-
- #bindings_export_varids iconv|iconv_close|iconv_open
-
- -- * @langinfo.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html>
-
- CNlItem,
-
- #bindings_export_varids CODESET|D_T_FMT|D_FMT|T_FMT| \
- T_FMT_AMPM|AM_STR|PM_STR|DAY_1|DAY_2|DAY_3|DAY_4| \
- DAY_5|DAY_6|DAY_7|ABDAY_1|ABDAY_2|ABDAY_3|ABDAY_4| \
- ABDAY_5|ABDAY_6|ABDAY_7|MON_1|MON_2|MON_3|MON_4|MON_5| \
- MON_6|MON_7|MON_8|MON_9|MON_10|MON_11|MON_12|ABMON_1| \
- ABMON_2|ABMON_3|ABMON_4|ABMON_5|ABMON_6|ABMON_7|ABMON_8| \
- ABMON_9|ABMON_10|ABMON_11|ABMON_12|ERA|ERA_D_FMT| \
- ERA_D_T_FMT|ERA_T_FMT|ALT_DIGITS|RADIXCHAR|THOUSEP| \
- YESEXPR|NOEXPR|CRNCYSTR
-
- #bindings_export_varids nl_langinfo
-
- -- * @libgen.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/libgen.h.html>
-
- #bindings_export_varids basename|dirname
-
- -- * @locale.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html>
-
- #bindings_export_varids LC_MESSAGES
-
- -- * @math@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/math.h.html>
-
- #bindings_export_varids M_E|M_LOG2E|M_LOG10E|M_LN2| \
- M_LN10|M_PI|M_PI_2|M_PI_4|M_1_PI|M_2_PI|M_2_SQRTPI| \
- M_SQRT2|M_SQRT1_2
-
- #bindings_export_varids j0|j1|jn|y0|y1|yn
-
- #bindings_export_varids signgam
-
- -- * @monetary.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/monetary.h.html>
-
- -- * @mqueue.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/mqueue.h.html>
-
- #bindings_export_conids mq_attr
-
- CMqd,
-
- #bindings_export_varids mq_close|mq_getattr|mq_notify| \
- mq_receive|mq_send|mq_setattr|mq_timedreceive| \
- mq_timedsend|mq_unlink
-
- -- * @net/if.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/net_if.h.html>
-
- #bindings_export_conids if_nameindex
-
- #bindings_export_varids IF_NAMESIZE
-
- #bindings_export_varids if_freenameindex|if_indextoname| \
- if_nameindex|if_nametoindex
-
- -- * @netdb.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/netdb.h.html>
-
- #bindings_export_conids hostent|netent|protoent|servent|addrinfo
-
- #bindings_export_varids AI_PASSIVE|AI_CANONNAME|AI_NUMERICHOST| \
- AI_NUMERICSERV|AI_V4MAPPED|AI_ALL|AI_ADDRCONFIG|NI_NOFQDN| \
- NI_NUMERICHOST|NI_NAMEREQD|NI_NUMERICSERV|NI_DGRAM|EAI_AGAIN| \
- EAI_BADFLAGS|EAI_FAIL|EAI_FAMILY|EAI_MEMORY|EAI_NONAME| \
- EAI_SERVICE|EAI_SOCKTYPE|EAI_SYSTEM|EAI_OVERFLOW
-
- #bindings_export_varids endhostent|endnetent|endprotoent| \
- endservent|freeaddrinfo|gai_strerror|getaddrinfo|gethostent| \
- getnameinfo|getnetbyaddr|getnetbyname|getnetent|getprotobyname| \
- getprotobynumber|getprotoent|getservbyname|getservbyport|\
- getservent|sethostent|setnetent|setprotoent|setservent
-
- -- * @netinet/in.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/netinet_in.h.html>
-
- #bindings_export_conids in_addr|sockaddr_in| \
- in6_addr|sockaddr_in6|ipv6_mreq
-
- CInPort,CInAddr,
-
- #bindings_export_varids IPPROTO_IP|IPPROTO_IPV6|IPPROTO_ICMP| \
- IPPROTO_RAW|IPPROTO_TCP|IPPROTO_UDP|INADDR_ANY| \
- INADDR_BROADCAST|INET_ADDRSTRLEN|IPV6_JOIN_GROUP| \
- IPV6_LEAVE_GROUP|IPV6_MULTICAST_HOPS|IPV6_MULTICAST_IF| \
- IPV6_MULTICAST_LOOP|IPV6_UNICAST_HOPS|IPV6_V6ONLY
-
- -- * @netinet/tcp.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/netinet_tcp.h.html>
-
- #bindings_export_varids TCP_NODELAY
-
- -- * @nl_types.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/nl_types.h.html>
-
- CNlCatd,
-
- #bindings_export_varids NL_SETD|NL_CAT_LOCALE
-
- #bindings_export_varids catclose|catgets|catopen
-
- -- * @poll.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/poll.h.html>
-
- #bindings_export_conids pollfd
-
- CNfds,
-
- #bindings_export_varids POLLIN|POLLPRI|POLLOUT| \
- POLLERR|POLLHUP|POLLNVAL
-
- #bindings_export_varids poll
-
- -- * @pthread.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/pthread.h.html>
-
- #bindings_export_varids PTHREAD_BARRIER_SERIAL_THREAD| \
- PTHREAD_CANCEL_ASYNCHRONOUS|PTHREAD_CANCEL_ENABLE| \
- PTHREAD_CANCEL_DEFERRED|PTHREAD_CANCEL_DISABLE| \
- PTHREAD_CANCELED|PTHREAD_CREATE_DETACHED| \
- PTHREAD_CREATE_JOINABLE|PTHREAD_EXPLICIT_SCHED| \
- PTHREAD_INHERIT_SCHED|PTHREAD_ONCE_INIT| \
- PTHREAD_PROCESS_SHARED|PTHREAD_PROCESS_PRIVATE| \
- PTHREAD_SCOPE_PROCESS|PTHREAD_SCOPE_SYSTEM
-
- #bindings_export_varids pthread_attr_destroy| \
- pthread_attr_getdetachstate|pthread_attr_getguardsize| \
- pthread_attr_getinheritsched| \
- pthread_attr_getschedparam|pthread_attr_getschedpolicy| \
- pthread_attr_getscope|pthread_attr_getstack| \
- pthread_attr_getstacksize|pthread_attr_init| \
- pthread_attr_setdetachstate|pthread_attr_setguardsize| \
- pthread_attr_setinheritsched|pthread_attr_setschedparam| \
- pthread_attr_setschedpolicy|pthread_attr_setscope| \
- pthread_attr_setstack|pthread_attr_setstacksize| \
- pthread_barrier_destroy|pthread_barrier_init| \
- pthread_barrier_wait|pthread_barrierattr_destroy| \
- pthread_barrierattr_getpshared|pthread_barrierattr_init| \
- pthread_barrierattr_setpshared| \
- pthread_cond_broadcast| \
- pthread_cond_destroy|pthread_cond_init|pthread_cond_signal| \
- pthread_cond_timedwait|pthread_cond_wait| \
- pthread_condattr_destroy|pthread_condattr_getclock| \
- pthread_condattr_getpshared|pthread_condattr_init| \
- pthread_condattr_setclock|pthread_condattr_setpshared| \
- pthread_create|pthread_exit|pthread_key_create| \
- pthread_mutex_destroy| \
- pthread_mutex_getprioceiling|pthread_mutex_init| \
- pthread_mutex_lock|pthread_mutex_setprioceiling| \
- pthread_mutex_timedlock|pthread_mutex_trylock| \
- pthread_mutex_unlock|pthread_mutexattr_destroy| \
- pthread_mutexattr_getprioceiling| \
- pthread_mutexattr_getprotocol|pthread_mutexattr_getpshared| \
- pthread_mutexattr_gettype| \
- pthread_mutexattr_init|pthread_mutexattr_setprioceiling| \
- pthread_mutexattr_setprotocol|pthread_mutexattr_setpshared| \
- pthread_mutexattr_settype| \
- pthread_once|pthread_rwlock_destroy|pthread_rwlock_init| \
- pthread_rwlock_rdlock|pthread_rwlock_timedrdlock| \
- pthread_rwlock_timedwrlock|pthread_rwlock_tryrdlock| \
- pthread_rwlock_trywrlock|pthread_rwlock_unlock| \
- pthread_rwlock_wrlock|pthread_rwlockattr_destroy| \
- pthread_rwlockattr_getpshared|pthread_rwlockattr_init| \
- pthread_rwlockattr_setpshared|pthread_setcancelstate| \
- pthread_setcanceltype|pthread_spin_destroy| \
- pthread_spin_init|pthread_spin_trylock| \
- pthread_spin_unlock|pthread_testcancel
-
- -- * @pwd.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/pwd.h.html>
-
- #bindings_export_conids passwd
-
- #bindings_export_varids endpwent|getpwent|getpwnam| \
- getpwnam_r|getpwuid|getpwuid_r|setpwent
-
- -- * @regex.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/regex.h.html>
-
- #bindings_export_conids regex_t|regmatch_t
-
- CRegoff,
-
- #bindings_export_varids REG_EXTENDED|REG_ICASE|REG_NOSUB| \
- REG_NEWLINE|REG_NOTBOL|REG_NOTEOL|REG_NOMATCH| \
- REG_BADPAT|REG_ECOLLATE|REG_ECTYPE|REG_EESCAPE| \
- REG_ESUBREG|REG_EBRACK|REG_EPAREN|REG_EBRACE|REG_BADBR| \
- REG_ERANGE|REG_ESPACE|REG_BADRPT
-
- #bindings_export_varids regcomp|regerror|regexec|regfree
-
- -- * @sched.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sched.h.html>
-
- #bindings_export_conids sched_param
-
- #bindings_export_varids SCHED_FIFO|SCHED_RR|SCHED_OTHER
-
- #bindings_export_varids sched_get_priority_max
- #bindings_export_varids sched_get_priority_min
- #bindings_export_varids sched_getparam|sched_getscheduler
- #bindings_export_varids sched_rr_get_interval|sched_setparam
- #bindings_export_varids sched_setscheduler|sched_yield
-
- -- * @search.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/search.h.html>
-
- ENTRY,ACTION,VISIT,
-
- #bindings_export_varids FIND|ENTER
-
- #bindings_export_varids preorder|postorder|endorder|leaf
-
- #bindings_export_varids hcreate|hdestroy|insque
- #bindings_export_varids lfind|lsearch|remque|tdelete
- #bindings_export_varids tfind|tsearch|twalk
-
- -- * @semaphore.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/semaphore.h.html>
-
- CSem,
-
- #bindings_export_varids SEM_FAILED
-
- #bindings_export_varids sem_close|sem_destroy
- #bindings_export_varids sem_getvalue|sem_init|sem_post
- #bindings_export_varids sem_timedwait|sem_trywait
- #bindings_export_varids sem_unlink|sem_wait
-
- -- * @signal.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html>
-
- #bindings_export_conids sigset_t|sigevent|sigval|sigaction
- #bindings_export_conids ucontext_t|stack_t|siginfo_t
-
- #bindings_export_varids SIGEV_NONE|SIGEV_SIGNAL|SIGEV_THREAD
-
- #bindings_export_varids SIGALRM|SIGBUS|SIGCHLD|SIGCONT
- #bindings_export_varids SIGHUP|SIGKILL|SIGPIPE|SIGQUIT
- #bindings_export_varids SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU
- #bindings_export_varids SIGUSR1|SIGUSR2|SIGSYS|SIGTRAP
- #bindings_export_varids SIGURG|SIGVTALRM|SIGXCPU|SIGXFSZ
-
- #bindings_export_varids SIG_BLOCK|SIG_UNBLOCK|SIG_SETMASK
- #bindings_export_varids SA_NOCLDSTOP|SA_ONSTACK|SA_RESETHAND
- #bindings_export_varids SA_RESTART|SA_SIGINFO|SA_NOCLDWAIT
- #bindings_export_varids SA_NODEFER|SS_ONSTACK|SS_DISABLE
- #bindings_export_varids MINSIGSTKSZ|SIGSTKSZ
-
- #bindings_export_varids ILL_ILLOPC|ILL_ILLOPN|ILL_ILLADR
- #bindings_export_varids ILL_ILLTRP|ILL_PRVOPC|ILL_PRVREG
- #bindings_export_varids ILL_COPROC|ILL_BADSTK|FPE_INTDIV
- #bindings_export_varids FPE_INTOVF|FPE_FLTDIV|FPE_FLTOVF
- #bindings_export_varids FPE_FLTUND|FPE_FLTRES|FPE_FLTINV
- #bindings_export_varids FPE_FLTSUB|SEGV_MAPERR|SEGV_ACCERR
- #bindings_export_varids BUS_ADRALN|BUS_ADRERR|BUS_OBJERR
- #bindings_export_varids TRAP_BRKPT|TRAP_TRACE|CLD_EXITED
- #bindings_export_varids CLD_KILLED|CLD_DUMPED|CLD_TRAPPED
- #bindings_export_varids CLD_STOPPED|CLD_CONTINUED|SI_USER
- #bindings_export_varids SI_QUEUE|SI_TIMER|SI_ASYNCIO
- #bindings_export_varids SI_MESGQ
-
- #bindings_export_varids kill|killpg|psignal
- #bindings_export_varids pthread_sigmask|sigaction
- #bindings_export_varids sigaddset|sigaltstack|sigdelset
- #bindings_export_varids sigemptyset|sigfillset
- #bindings_export_varids sigismember|sigpending
- #bindings_export_varids sigprocmask|sigsuspend
- #bindings_export_varids sigtimedwait|sigwait
- #bindings_export_varids sigwaitinfo
-
- -- * @spawn.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/spawn.h.html>
-
- #bindings_export_conids posix_spawnattr_t|posix_spawn_file_actions_t
-
- #bindings_export_varids POSIX_SPAWN_RESETIDS| \
- POSIX_SPAWN_SETPGROUP|POSIX_SPAWN_SETSCHEDPARAM| \
- POSIX_SPAWN_SETSCHEDULER|POSIX_SPAWN_SETSIGDEF| \
- POSIX_SPAWN_SETSIGMASK
-
- #bindings_export_varids posix_spawn| \
- posix_spawn_file_actions_addclose| \
- posix_spawn_file_actions_adddup2| \
- posix_spawn_file_actions_addopen| \
- posix_spawn_file_actions_destroy| \
- posix_spawn_file_actions_init|posix_spawnattr_destroy| \
- posix_spawnattr_getflags|posix_spawnattr_getpgroup| \
- posix_spawnattr_getschedparam| \
- posix_spawnattr_getschedpolicy|posix_spawnattr_getsigdefault| \
- posix_spawnattr_getsigmask|posix_spawnattr_init| \
- posix_spawnattr_setflags|posix_spawnattr_setpgroup| \
- posix_spawnattr_setschedparam|posix_spawnattr_setschedpolicy| \
- posix_spawnattr_setsigdefault|posix_spawnattr_setsigmask| \
- posix_spawnp
-
- -- * @stdbool.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdbool.h.html>
-
- #bindings_export_varids true|false
-
- -- * @stddef.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html>
-
- -- * @stdint.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdint.h.html>
-
- -- * @stdio.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdio.h.html>
-
- #bindings_export_varids L_ctermid
-
- #bindings_export_varids ctermid|fdopen|fileno|flockfile| \
- fseeko|ftello|ftrylockfile|funlockfile|getc_unlocked| \
- getchar_unlocked|getdelim|getline|open_memstream| \
- pclose|popen|putc_unlocked|putchar_unlocked|renameat
-
- -- * @stdlib.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/stdlib.h.html>
-
- #bindings_export_varids a64l|drand48|erand48|grantpt| \
- initstate|jrand48|l64a|lcong48|lrand48|mkdtemp|mkstemp| \
- mrand48|nrand48|posix_memalign|posix_openpt|ptsname| \
- putenv|rand_r|random|realpath|seed48|setenv| \
- setstate|srandom|unlockpt|unsetenv
-
- -- * @string.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/string.h.html>
-
- #bindings_export_varids memccpy|stpcpy|stpncpy
- #bindings_export_varids strdup|strerror_r|strndup
- #bindings_export_varids strnlen|strsignal|strtok_r
-
- -- * @strings.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/strings.h.html>
-
- -- * @stropts.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/stropts.h.html>
-
- -- * @sys/ipc.h@
-
- #bindings_export_conids ipc_perm
-
- #bindings_export_varids IPC_CREAT|IPC_EXCL|IPC_NOWAIT
-
- #bindings_export_varids IPC_PRIVATE
-
- #bindings_export_varids IPC_RMID|IPC_SET|IPC_STAT
-
- #bindings_export_varids ftok
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_ipc.h.html>
-
- -- * @sys/mman.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_mman.h.html>
-
-#bindings_export_varids PROT_EXEC|PROT_NONE|PROT_READ
-#bindings_export_varids PROT_WRITE|MAP_FIXED|MAP_PRIVATE
-#bindings_export_varids MAP_SHARED|MS_ASYNC|MS_INVALIDATE
-#bindings_export_varids MS_SYNC|MCL_CURRENT|MCL_FUTURE
-#bindings_export_varids MAP_FAILED|POSIX_MADV_DONTNEED
-#bindings_export_varids POSIX_MADV_NORMAL|POSIX_MADV_RANDOM
-#bindings_export_varids POSIX_MADV_SEQUENTIAL
-#bindings_export_varids POSIX_MADV_WILLNEED
--- #bindings_export_varids POSIX_TYPED_MEM_ALLOCATE
--- #bindings_export_varids POSIX_TYPED_MEM_ALLOCATE_CONTIG
--- #bindings_export_varids POSIX_TYPED_MEM_MAP_ALLOCATABLE
-
--- #bindings_export_conids posix_typed_mem_info
-
-#bindings_export_varids mlock|mlockall|mmap|mprotect
-#bindings_export_varids msync|munlock|munlockall|munmap
-#bindings_export_varids posix_madvise
--- #bindings_export_varids posix_mem_offset|posix_typed_mem_get_info
--- #bindings_export_varids posix_typed_mem_open
-#bindings_export_varids shm_open|shm_unlink
-
- -- * @sys/msg.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_msg.h.html>
-
- CMsgqnum,CMsglen,
-
- #bindings_export_varids MSG_NOERROR
-
- #bindings_export_conids msqid_ds
-
- #bindings_export_varids msgctl|msgget|msgrcv|msgsnd
-
- -- * @sys/resource.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_resource.h.html>
-
- #bindings_export_varids PRIO_PROCESS|PRIO_PGRP|PRIO_USER
-
- CRlim,
-
- #bindings_export_varids RLIM_INFINITY|RLIM_SAVED_MAX
- #bindings_export_varids RLIM_SAVED_CUR
-
- #bindings_export_varids RUSAGE_SELF|RUSAGE_CHILDREN
-
- #bindings_export_conids rlimit|rusage
-
- #bindings_export_varids RLIMIT_CORE|RLIMIT_CPU|RLIMIT_DATA
- #bindings_export_varids RLIMIT_FSIZE|RLIMIT_NOFILE
- #bindings_export_varids RLIMIT_STACK|RLIMIT_AS
-
- #bindings_export_varids getpriority|getrlimit|getrusage
- #bindings_export_varids setpriority|setrlimit
-
- -- * @sys/select.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_select.h.html>
-
- #bindings_export_conids timeval|fd_set
-
- #bindings_export_varids FD_SETSIZE
-
- #bindings_export_varids pselect|select
-
- -- * @sys/sem.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_sem.h.html>
-
- #bindings_export_varids SEM_UNDO|GETNCNT|GETPID|GETVAL| \
- GETALL|GETZCNT|SETVAL|SETALL
-
- #bindings_export_conids semid_ds|sembuf
-
- #bindings_export_varids semget|semop
-
- -- * @sys/shm.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_shm.h.html>
-
- #bindings_export_varids SHM_RDONLY|SHM_RND|SHMLBA
-
- #bindings_export_conids shmid_ds
-
- CShmatt,
-
- #bindings_export_varids shmat|shmctl|shmdt|shmget
-
- -- * @sys/socket.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html>
-
- #bindings_export_conids sockaddr|sockaddr_storage|msghdr|cmsghdr
-
- CSocklen, CSaFamily,
-
- #bindings_export_varids SCM_RIGHTS
-
- #bindings_export_conids linger
-
- #bindings_export_varids SOCK_DGRAM|SOCK_RAW|SOCK_SEQPACKET| \
- SOCK_STREAM|SOL_SOCKET|SO_ACCEPTCONN|SO_BROADCAST|SO_DEBUG| \
- SO_DONTROUTE|SO_ERROR|SO_KEEPALIVE|SO_LINGER|SO_OOBINLINE| \
- SO_RCVBUF|SO_RCVLOWAT|SO_RCVTIMEO|SO_REUSEADDR|SO_SNDBUF| \
- SO_SNDLOWAT|SO_SNDTIMEO|SO_TYPE|SOMAXCONN|MSG_CTRUNC| \
- MSG_DONTROUTE|MSG_EOR|MSG_OOB|MSG_NOSIGNAL|MSG_PEEK|MSG_TRUNC| \
- MSG_WAITALL|AF_INET|AF_INET6|AF_UNIX|AF_UNSPEC| \
- SHUT_RD|SHUT_RDWR|SHUT_WR
-
- #bindings_export_varids accept|bind|connect|getpeername| \
- getsockname|getsockopt|listen|recv|recvfrom|recvmsg|send| \
- sendmsg|sendto|setsockopt|shutdown|sockatmark|socket|socketpair
-
- -- * @sys/stat.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html>
-
- #bindings_export_conids stat
-
- #bindings_export_varids S_IFMT|S_IFBLK|S_IFCHR
- #bindings_export_varids S_IFIFO|S_IFREG|S_IFDIR
- #bindings_export_varids S_IFLNK|S_IFSOCK
-
- #bindings_export_varids S_IRWXU|S_IRUSR|S_IWUSR
- #bindings_export_varids S_IXUSR|S_IRWXG|S_IRGRP
- #bindings_export_varids S_IWGRP|S_IXGRP|S_IRWXO
- #bindings_export_varids S_IROTH|S_IWOTH|S_IXOTH
- #bindings_export_varids S_ISUID|S_ISGID|S_ISVTX
-
--- #bindings_export_varids UTIME_NOW|UTIME_OMIT
-
- #bindings_export_varids chmod|fchmod|fchmodat|fstat
- #bindings_export_varids fstatat|futimens|lstat|mkdir
- #bindings_export_varids mkdirat|mkfifo|mkfifoat|mknod
- #bindings_export_varids mknodat|stat|umask|utimensat
-
- -- * @sys/statvfs.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_statvfs.h.html>
-
- #bindings_export_conids statvfs
-
- #bindings_export_varids ST_RDONLY|ST_NOSUID
-
- #bindings_export_varids fstatvfs|statvfs
-
- -- * @sys/time.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_time.h.html>
-
- #bindings_export_varids utimes
-
- -- * @sys/times.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_times.h.html>
-
- #bindings_export_conids tms
-
- #bindings_export_varids times
-
- -- * @sys/types.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html>
-
- CClockid,CDev,CFsblkcnt,CFsfilcnt,CGid,CId,
- CIno,CKey,CMode,CNlink,COff,CPid,
- CSSize,CSuseconds,CTimer,CUid,
-
- #bindings_export_conids pthread_attr_t|pthread_barrier_t| \
- pthread_barrierattr_t|pthread_cond_t| \
- pthread_condattr_t|pthread_key_t|pthread_mutex_t| \
- pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t| \
- pthread_rwlockattr_t|pthread_spinlock_t|pthread_t
-
- -- * @sys/uio.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_uio.h.html>
-
- #bindings_export_conids iovec
-
- #bindings_export_varids readv|writev
-
- -- * @sys/un.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_un.h.html>
-
- #bindings_export_conids sockaddr_un
-
- -- * @sys/utsname.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_utsname.h.html>
-
- #bindings_export_conids utsname
-
- #bindings_export_varids uname
-
- -- * @sys/wait.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_wait.h.html>
-
- #bindings_export_varids WCONTINUED|WNOHANG|WUNTRACED
-
- #bindings_export_varids WEXITED|WNOWAIT|WSTOPPED
-
- CIdtype,
-
- #bindings_export_varids P_ALL|P_PGID|P_PID
-
- #bindings_export_varids wait|waitid|waitpid
-
- -- * @syslog.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/syslog.h.html>
-
- #bindings_export_varids LOG_PID|LOG_CONS|LOG_NDELAY| \
- LOG_ODELAY|LOG_NOWAIT|LOG_KERN|LOG_USER|LOG_MAIL| \
- LOG_NEWS|LOG_UUCP|LOG_DAEMON|LOG_AUTH|LOG_CRON|LOG_LPR| \
- LOG_LOCAL0|LOG_LOCAL1|LOG_LOCAL2|LOG_LOCAL3|LOG_LOCAL4| \
- LOG_LOCAL5|LOG_LOCAL6|LOG_LOCAL7|LOG_EMERG|LOG_ALERT| \
- LOG_CRIT|LOG_ERR|LOG_WARNING|LOG_NOTICE|LOG_INFO|LOG_DEBUG
-
- #bindings_export_varids closelog|openlog|setlogmask
-
- -- * @tar.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/tar.h.html>
-
- #bindings_export_varids TMAGIC|TMAGLEN|TVERSION|TVERSLEN
-
- #bindings_export_varids REGTYPE|AREGTYPE|LNKTYPE|SYMTYPE
- #bindings_export_varids CHRTYPE|BLKTYPE|DIRTYPE|FIFOTYPE|CONTTYPE
-
- #bindings_export_varids TSUID|TSGID|TSVTX|TUREAD
- #bindings_export_varids TUWRITE|TUEXEC|TGREAD|TGWRITE
- #bindings_export_varids TGEXEC|TOREAD|TOWRITE|TOEXEC
-
- -- * @termios.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/termios.h.html>
-
- #bindings_export_conids termios
-
- CCc, CSpeed, CTcflag,
-
- #bindings_export_varids NCCS|VEOF|VEOL|VERASE|VINTR|VKILL| \
- VMIN|VQUIT|VSTART|VSTOP|VSUSP|VTIME|BRKINT|ICRNL|IGNBRK| \
- IGNCR|IGNPAR|INLCR|INPCK|ISTRIP|IXANY|IXOFF|IXON|PARMRK| \
- OPOST|ONLCR|OCRNL|ONOCR|ONLRET|OFDEL|OFILL|NLDLY|NL0|NL1| \
- CRDLY|CR0|CR1|CR2|CR3|TABDLY|TAB0|TAB1|TAB2|TAB3|BSDLY|BS0| \
- BS1|VTDLY|VT0|VT1|FFDLY|FF0|FF1|B0|B50|B75|B110|B134|B150| \
- B200|B300|B600|B1200|B1800|B2400|B4800|B9600|B19200|B38400| \
- CSIZE|CS5|CS6|CS7|CS8|CSTOPB|CREAD|PARENB|PARODD|HUPCL| \
- CLOCAL|ECHO|ECHOE|ECHOK|ECHONL|ICANON|IEXTEN|ISIG|NOFLSH| \
- TOSTOP|TCSANOW|TCSADRAIN|TCSAFLUSH|TCIFLUSH|TCIOFLUSH| \
- TCOFLUSH|TCIOFF|TCION|TCOOFF|TCOON
-
- #bindings_export_varids cfgetispeed|cfgetospeed|cfsetispeed| \
- cfsetospeed|tcdrain|tcflow|tcflush|tcgetattr|tcgetsid| \
- tcsendbreak|tcsetattr
-
- -- * @time.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html>
-
- #bindings_export_conids timespec|itimerspec
-
- #bindings_export_varids CLOCK_MONOTONIC|CLOCK_PROCESS_CPUTIME_ID
- #bindings_export_varids CLOCK_REALTIME|CLOCK_THREAD_CPUTIME_ID
-
- #bindings_export_varids clock_getcpuclockid|clock_getres
- #bindings_export_varids clock_gettime|clock_nanosleep
- #bindings_export_varids clock_settime|getdate|gmtime_r
- #bindings_export_varids localtime_r|nanosleep|strptime
- #bindings_export_varids timer_create|timer_delete
- #bindings_export_varids timer_getoverrun|timer_gettime
- #bindings_export_varids timer_settime|tzset
-
- #bindings_export_varids daylight|timezone|tzname
-
- -- * @unistd.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html>
-
- #bindings_export_varids _POSIX_ASYNC_IO|F_OK|R_OK|W_OK| \
- X_OK|F_LOCK|F_TEST|F_TLOCK|F_ULOCK|_PC_2_SYMLINKS| \
- _PC_ALLOC_SIZE_MIN|_PC_ASYNC_IO|_PC_CHOWN_RESTRICTED| \
- _PC_FILESIZEBITS|_PC_LINK_MAX|_PC_MAX_CANON|_PC_MAX_INPUT| \
- _PC_NAME_MAX|_PC_NO_TRUNC|_PC_PATH_MAX|_PC_PIPE_BUF| \
- _PC_PRIO_IO|_PC_REC_INCR_XFER_SIZE|_PC_REC_MAX_XFER_SIZE| \
- _PC_REC_MIN_XFER_SIZE|_PC_REC_XFER_ALIGN|_PC_SYMLINK_MAX| \
- _PC_SYNC_IO|_PC_VDISABLE|_SC_2_C_BIND|_SC_2_C_DEV| \
- _SC_2_CHAR_TERM|_SC_2_FORT_DEV|_SC_2_FORT_RUN| \
- _SC_2_LOCALEDEF|_SC_2_PBS|_SC_2_PBS_ACCOUNTING| \
- _SC_2_PBS_CHECKPOINT|_SC_2_PBS_LOCATE|_SC_2_PBS_MESSAGE| \
- _SC_2_PBS_TRACK|_SC_2_SW_DEV|_SC_2_UPE|_SC_2_VERSION| \
- _SC_ADVISORY_INFO|_SC_AIO_LISTIO_MAX|_SC_AIO_MAX| \
- _SC_AIO_PRIO_DELTA_MAX|_SC_ARG_MAX|_SC_ASYNCHRONOUS_IO| \
- _SC_ATEXIT_MAX|_SC_BARRIERS|_SC_BC_BASE_MAX|_SC_BC_DIM_MAX| \
- _SC_BC_SCALE_MAX|_SC_BC_STRING_MAX|_SC_CHILD_MAX|_SC_CLK_TCK| \
- _SC_CLOCK_SELECTION|_SC_COLL_WEIGHTS_MAX|_SC_CPUTIME| \
- _SC_DELAYTIMER_MAX|_SC_EXPR_NEST_MAX|_SC_FSYNC| \
- _SC_GETGR_R_SIZE_MAX|_SC_GETPW_R_SIZE_MAX|_SC_HOST_NAME_MAX| \
- _SC_IOV_MAX|_SC_IPV6|_SC_JOB_CONTROL|_SC_LINE_MAX| \
- _SC_LOGIN_NAME_MAX|_SC_MAPPED_FILES|_SC_MEMLOCK| \
- _SC_MEMLOCK_RANGE|_SC_MEMORY_PROTECTION|_SC_MESSAGE_PASSING
-
- #bindings_export_varids _SC_MONOTONIC_CLOCK|_SC_MQ_OPEN_MAX| \
- _SC_MQ_PRIO_MAX|_SC_NGROUPS_MAX|_SC_OPEN_MAX|_SC_PAGE_SIZE| \
- _SC_PAGESIZE|_SC_PRIORITIZED_IO|_SC_PRIORITY_SCHEDULING| \
- _SC_RAW_SOCKETS|_SC_RE_DUP_MAX|_SC_READER_WRITER_LOCKS| \
- _SC_REALTIME_SIGNALS|_SC_REGEXP|_SC_RTSIG_MAX|_SC_SAVED_IDS| \
- _SC_SEM_NSEMS_MAX|_SC_SEM_VALUE_MAX|_SC_SEMAPHORES| \
- _SC_SHARED_MEMORY_OBJECTS|_SC_SHELL|_SC_SIGQUEUE_MAX| \
- _SC_SPAWN|_SC_SPIN_LOCKS|_SC_SPORADIC_SERVER| \
- _SC_STREAM_MAX|_SC_SYMLOOP_MAX|_SC_SYNCHRONIZED_IO| \
- _SC_THREAD_ATTR_STACKADDR|_SC_THREAD_ATTR_STACKSIZE| \
- _SC_THREAD_CPUTIME|_SC_THREAD_DESTRUCTOR_ITERATIONS| \
- _SC_THREAD_KEYS_MAX|_SC_THREAD_PRIO_INHERIT| \
- _SC_THREAD_PRIO_PROTECT|_SC_THREAD_PRIORITY_SCHEDULING| \
- _SC_THREAD_PROCESS_SHARED|_SC_THREAD_SAFE_FUNCTIONS| \
- _SC_THREAD_SPORADIC_SERVER|_SC_THREAD_STACK_MIN| \
- _SC_THREAD_THREADS_MAX|_SC_THREADS|_SC_TIMEOUTS| \
- _SC_TIMER_MAX|_SC_TIMERS|_SC_TRACE|_SC_TRACE_EVENT_FILTER| \
- _SC_TRACE_INHERIT|_SC_TRACE_LOG|_SC_TTY_NAME_MAX| \
- _SC_TYPED_MEMORY_OBJECTS|_SC_TZNAME_MAX|_SC_VERSION| \
- _SC_XOPEN_CRYPT|_SC_XOPEN_ENH_I18N|_SC_XOPEN_REALTIME| \
- _SC_XOPEN_REALTIME_THREADS|_SC_XOPEN_SHM|_SC_XOPEN_UNIX| \
- _SC_XOPEN_VERSION|STDERR_FILENO|STDIN_FILENO|STDOUT_FILENO
-
- #bindings_export_varids access|alarm|chdir|chown|close| \
- confstr|dup|dup2|_exit|execv| \
- execve|execvp|faccessat|fchdir|fchown|fchownat|fdatasync| \
- fexecve|fork|fpathconf|fsync|ftruncate|getcwd|getegid| \
- geteuid|getgid|getgroups|gethostid|gethostname|getlogin| \
- getlogin_r|getopt|getpgid|getpgrp|getpid|getppid|getsid| \
- getuid|isatty|lchown|link|linkat|lockf|lseek|nice|pathconf| \
- pause|pipe|pread|pwrite|read|readlink|readlinkat|rmdir| \
- setegid|seteuid|setgid|setpgid|setregid|setreuid|setsid| \
- setuid|sleep|swab|symlink|symlinkat|sync|sysconf|tcgetpgrp| \
- tcsetpgrp|truncate|ttyname|ttyname_r|unlink|unlinkat|write
-
- #bindings_export_varids optarg|opterr|optind|optopt
-
- -- * @utmpx.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/utmpx.h.html>
-
- #bindings_export_conids utmpx
-
- #bindings_export_varids BOOT_TIME|OLD_TIME|NEW_TIME| \
- USER_PROCESS|INIT_PROCESS|LOGIN_PROCESS|DEAD_PROCESS
-
- #bindings_export_varids endutxent|getutxent| \
- getutxid|getutxline|pututxline|setutxent
-
- -- * @wchar.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/wchar.h.html>
-
- #bindings_export_varids mbsnrtowcs|open_wmemstream
- #bindings_export_varids wcpcpy|wcpncpy|wcscasecmp
- #bindings_export_varids wcsdup|wcsncasecmp|wcsnlen
- #bindings_export_varids wcsnrtombs|wcswidth
-
- -- * @wctype.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/wctype.h.html>
-
- -- * @wordexp.h@
-
- -- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/wordexp.h.html>
-
- #bindings_export_conids wordexp_t
-
- #bindings_export_varids WRDE_APPEND|WRDE_DOOFFS|WRDE_NOCMD
- #bindings_export_varids WRDE_REUSE|WRDE_SHOWERR|WRDE_UNDEF
-
- #bindings_export_varids WRDE_BADCHAR|WRDE_BADVAL|WRDE_CMDSUB
- #bindings_export_varids WRDE_NOSPACE|WRDE_SYNTAX
-
- #bindings_export_varids wordexp|wordfree
-
+ module Bindings.Posix.Errno,
+ module Bindings.Posix.Signal,
+ module Bindings.Posix.Sys.Select,
+ module Bindings.Posix.Sys.Types,
+ module Bindings.Posix.Sys.Utsname,
+ module Bindings.Posix.Time,
+ module Bindings.Posix.Unistd,
) where
-
-import Prelude hiding (read,truncate)
-import Foreign
-import Foreign.C
-import Bindings.C
-import Bindings.Utilities
-
-#include <aio.h>
-
-#bindings_starttype struct aiocb
-#bindings_field aio_fildes , CInt
-#bindings_field aio_offset , COff
-#bindings_field aio_buf , Ptr ()
-#bindings_field aio_nbytes , CSize
-#bindings_field aio_reqprio , CInt
-#bindings_field aio_sigevent , Sigevent
-#bindings_field aio_lio_opcode , CInt
-#bindings_stoptype _
-
-#bindings_int AIO_ALLDONE
-#bindings_int AIO_CANCELED
-#bindings_int AIO_NOTCANCELED
-#bindings_int LIO_NOP
-#bindings_int LIO_NOWAIT
-#bindings_int LIO_READ
-#bindings_int LIO_WAIT
-#bindings_int LIO_WRITE
-
-#bindings_function aio_cancel , CInt -> Ptr Aiocb -> IO CInt
-#bindings_function aio_error , Ptr Aiocb -> IO CInt
-#bindings_function aio_fsync , CInt -> Ptr Aiocb -> IO CInt
-#bindings_function aio_read , Ptr Aiocb -> IO CInt
-#bindings_function aio_return , Ptr Aiocb -> IO CSSize
-#bindings_function aio_suspend , Ptr (Ptr Aiocb) -> CInt -> \
- Ptr Timespec -> IO CInt
-#bindings_function aio_write , Ptr Aiocb -> IO CInt
-#bindings_function lio_listio , CInt -> Ptr (Ptr Aiocb) -> \
- CInt -> Ptr Sigevent -> IO CInt
-
-#include <arpa/inet.h>
-
-#bindings_function htonl , Word32 -> IO Word32
-#bindings_function htons , Word16 -> IO Word16
-#bindings_function ntohl , Word32 -> IO Word32
-#bindings_function ntohs , Word16 -> IO Word16
-
-#bindings_function inet_addr , CString -> IO CInAddr
-#bindings_function inet_ntop , CInt -> Ptr () -> \
- CString -> CSocklen -> IO CString
-#bindings_function inet_pton , CInt -> CString -> \
- Ptr () -> IO CInt
-
-#include <cpio.h>
-
-#bindings_num C_IRUSR
-#bindings_num C_IWUSR
-#bindings_num C_IXUSR
-#bindings_num C_IRGRP
-#bindings_num C_IWGRP
-#bindings_num C_IXGRP
-#bindings_num C_IROTH
-#bindings_num C_IWOTH
-#bindings_num C_IXOTH
-#bindings_num C_ISUID
-#bindings_num C_ISGID
-#bindings_num C_ISVTX
-#bindings_num C_ISDIR
-#bindings_num C_ISFIFO
-#bindings_num C_ISREG
-#bindings_num C_ISBLK
-#bindings_num C_ISCHR
-#bindings_num C_ISCTG
-#bindings_num C_ISLNK
-#bindings_num C_ISSOCK
-
-#bindings_ptr MAGIC , CString
-
-#include <dirent.h>
-
-data DIR
-
-#bindings_starttype struct dirent
-#bindings_field d_ino , CIno
-#bindings_field d_name , CString
-#bindings_stoptype _
-
-#bindings_function alphasort , Ptr (Ptr Dirent) -> \
- Ptr (Ptr Dirent) -> IO CInt
-#bindings_function closedir , Ptr DIR -> IO CInt
-#bindings_function dirfd , Ptr DIR -> IO CInt
-#bindings_function fdopendir , CInt -> IO (Ptr DIR)
-#bindings_function opendir , CString -> IO (Ptr DIR)
-#bindings_function readdir , Ptr DIR -> IO (Ptr Dirent)
-#bindings_function readdir_r , Ptr DIR -> Ptr Dirent -> \
- Ptr (Ptr Dirent) -> IO CInt
-#bindings_function rewinddir , Ptr DIR -> IO ()
-#bindings_function scandir , CString -> \
- Ptr (Ptr (Ptr Dirent)) -> FunPtr (Ptr Dirent -> IO CInt) -> \
- FunPtr (Ptr (Ptr Dirent) -> Ptr (Ptr Dirent) -> IO CInt) -> \
- IO CInt
-#bindings_function seekdir , Ptr DIR -> CLong -> IO ()
-#bindings_function telldir , Ptr DIR -> IO CLong
-
-#include <dlfcn.h>
-
-#bindings_int RTLD_LAZY
-#bindings_int RTLD_NOW
-#bindings_int RTLD_GLOBAL
-#bindings_int RTLD_LOCAL
-
-#bindings_function dlclose , Ptr () -> IO CInt
-#bindings_function dlerror , IO CString
-#bindings_function dlopen , CString -> CInt -> IO (Ptr ())
-#bindings_function dlsym , Ptr () -> CString -> IO (Ptr ())
-
-#include <errno.h>
-
-#bindings_int E2BIG
-#bindings_int EACCES
-#bindings_int EADDRINUSE
-#bindings_int EADDRNOTAVAIL
-#bindings_int EAFNOSUPPORT
-#bindings_int EAGAIN
-#bindings_int EALREADY
-#bindings_int EBADF
-#bindings_int EBADMSG
-#bindings_int EBUSY
-#bindings_int ECANCELED
-#bindings_int ECHILD
-#bindings_int ECONNABORTED
-#bindings_int ECONNREFUSED
-#bindings_int ECONNRESET
-#bindings_int EDEADLK
-#bindings_int EDESTADDRREQ
-#bindings_int EDQUOT
-#bindings_int EEXIST
-#bindings_int EFAULT
-#bindings_int EFBIG
-#bindings_int EHOSTUNREACH
-#bindings_int EIDRM
-#bindings_int EINPROGRESS
-#bindings_int EINTR
-#bindings_int EINVAL
-#bindings_int EIO
-#bindings_int EISCONN
-#bindings_int EISDIR
-#bindings_int ELOOP
-#bindings_int EMFILE
-#bindings_int EMLINK
-#bindings_int EMSGSIZE
-#bindings_int EMULTIHOP
-#bindings_int ENAMETOOLONG
-#bindings_int ENETDOWN
-#bindings_int ENETRESET
-#bindings_int ENETUNREACH
-#bindings_int ENFILE
-#bindings_int ENOBUFS
-#bindings_int ENODEV
-#bindings_int ENOENT
-#bindings_int ENOEXEC
-#bindings_int ENOLCK
-#bindings_int ENOLINK
-#bindings_int ENOMEM
-#bindings_int ENOMSG
-#bindings_int ENOPROTOOPT
-#bindings_int ENOSPC
-#bindings_int ENOSYS
-#bindings_int ENOTCONN
-#bindings_int ENOTDIR
-#bindings_int ENOTEMPTY
-#bindings_int ENOTRECOVERABLE
-#bindings_int ENOTSOCK
-#bindings_int ENOTSUP
-#bindings_int ENOTTY
-#bindings_int ENXIO
-#bindings_int EOPNOTSUPP
-#bindings_int EOVERFLOW
-#bindings_int EOWNERDEAD
-#bindings_int EPERM
-#bindings_int EPIPE
-#bindings_int EPROTO
-#bindings_int EPROTONOSUPPORT
-#bindings_int EPROTOTYPE
-#bindings_int EROFS
-#bindings_int ESPIPE
-#bindings_int ESRCH
-#bindings_int ESTALE
-#bindings_int ETIMEDOUT
-#bindings_int ETXTBSY
-#bindings_int EWOULDBLOCK
-#bindings_int EXDEV
-
-#include <fcntl.h>
-
-#bindings_int F_DUPFD
--- #bindings_int F_DUPFD_CLOEXEC
-#bindings_int F_GETFD
-#bindings_int F_SETFD
-#bindings_int F_GETFL
-#bindings_int F_SETFL
-#bindings_int F_GETLK
-#bindings_int F_SETLK
-#bindings_int F_SETLKW
-#bindings_int F_GETOWN
-#bindings_int F_SETOWN
-#bindings_int FD_CLOEXEC
-#bindings_short F_RDLCK
-#bindings_short F_UNLCK
-#bindings_short F_WRLCK
-#bindings_int O_CREAT
-#bindings_int O_EXCL
-#bindings_int O_NOCTTY
-#bindings_int O_TRUNC
--- #bindings_int O_TTY_INIT
-#bindings_int O_APPEND
-#bindings_int O_DSYNC
-#bindings_int O_NONBLOCK
-#bindings_int O_RSYNC
-#bindings_int O_SYNC
-#bindings_int O_ACCMODE
--- #bindings_int O_EXEC
-#bindings_int O_RDONLY
-#bindings_int O_RDWR
--- #bindings_int O_SEARCH
-#bindings_int O_WRONLY
--- #bindings_int AT_FDCWD
--- #bindings_int AT_EACCESS
--- #bindings_int AT_SYMLINK_NOFOLLOW
--- #bindings_int AT_SYMLINK_FOLLOW
--- #bindings_int O_CLOEXEC
--- #bindings_int O_DIRECTORY
--- #bindings_int O_NOFOLLOW
--- #bindings_int AT_REMOVEDIR
-#bindings_int POSIX_FADV_DONTNEED
-#bindings_int POSIX_FADV_NOREUSE
-#bindings_int POSIX_FADV_NORMAL
-#bindings_int POSIX_FADV_RANDOM
-#bindings_int POSIX_FADV_SEQUENTIAL
-#bindings_int POSIX_FADV_WILLNEED
-
-#bindings_starttype struct flock
-#bindings_field l_type , CShort
-#bindings_field l_whence , CShort
-#bindings_field l_start , COff
-#bindings_field l_len , COff
-#bindings_field l_pid , CPid
-#bindings_stoptype _
-
-#bindings_function creat , CString -> CMode -> IO CInt
-#bindings_function posix_fadvise , CInt -> \
- COff -> COff -> CInt -> IO CInt
-#bindings_function posix_fallocate , CInt -> \
- COff -> COff -> IO CInt
-
-#include <fmtmsg.h>
-
-#bindings_long MM_HARD
-#bindings_long MM_SOFT
-#bindings_long MM_FIRM
-#bindings_long MM_APPL
-#bindings_long MM_UTIL
-#bindings_long MM_OPSYS
-#bindings_long MM_RECOVER
-#bindings_long MM_NRECOV
-#bindings_long MM_HALT
-#bindings_long MM_ERROR
-#bindings_long MM_WARNING
-#bindings_long MM_INFO
-#bindings_long MM_NOSEV
-#bindings_long MM_PRINT
-#bindings_long MM_CONSOLE
-
-#bindings_ptr MM_NULLLBL , CString
-#bindings_int MM_NULLSEV
-#bindings_long MM_NULLMC
-#bindings_ptr MM_NULLTXT , CString
-#bindings_ptr MM_NULLACT , CString
-#bindings_ptr MM_NULLTAG , CString
-
-#bindings_int MM_OK
-#bindings_int MM_NOTOK
-#bindings_int MM_NOMSG
-#bindings_int MM_NOCON
-#bindings_function fmtmsg , CLong -> CString -> CInt -> \
- CString -> CString -> CString -> IO CInt
-
-#include <fnmatch.h>
-
-#bindings_int FNM_NOMATCH
-#bindings_int FNM_PATHNAME
-#bindings_int FNM_PERIOD
-#bindings_int FNM_NOESCAPE
-
-#bindings_function fnmatch , CString -> CString -> CInt -> IO CInt
-
-#include <ftw.h>
-
--- #bindings_starttype struct FTW
--- #bindings_field base , CInt
--- #bindings_field level , CInt
--- #bindings_stoptype _
-
-#bindings_int FTW_F
-#bindings_int FTW_D
-#bindings_int FTW_DNR
--- #bindings_int FTW_DP
-#bindings_int FTW_NS
-#bindings_int FTW_SL
--- #bindings_int FTW_SLN
--- #bindings_int FTW_PHYS
--- #bindings_int FTW_MOUNT
--- #bindings_int FTW_DEPTH
--- #bindings_int FTW_CHDIR
-
--- #bindings_function nftw , CString -> FunPtr (CString -> \
--- Ptr Stat -> CInt -> Ptr FTW -> IO CInt) -> CInt -> \
--- CInt -> IO CInt
-
-#include <glob.h>
-
-#bindings_starttype glob_t
-#bindings_field gl_pathc , CSize
-#bindings_field gl_pathv , Ptr CString
-#bindings_field gl_offs , CSize
-#bindings_stoptype _
-
-#bindings_int GLOB_APPEND
-#bindings_int GLOB_DOOFFS
-#bindings_int GLOB_ERR
-#bindings_int GLOB_MARK
-#bindings_int GLOB_NOCHECK
-#bindings_int GLOB_NOESCAPE
-#bindings_int GLOB_NOSORT
-#bindings_int GLOB_ABORTED
-#bindings_int GLOB_NOMATCH
-#bindings_int GLOB_NOSPACE
-
-#bindings_function glob , CString -> CInt -> \
- FunPtr (CString -> CInt -> IO CInt) -> IO CInt
-#bindings_function globfree , Ptr Glob_t -> IO ()
-
-#include <grp.h>
-
-#bindings_starttype struct group
-#bindings_field gr_name , CString
-#bindings_field gr_gid , CGid
-#bindings_field gr_mem , Ptr CString
-#bindings_stoptype _
-
-#bindings_function endgrent , IO ()
-#bindings_function getgrent , IO (Ptr Group)
-#bindings_function getgrgid , CGid -> IO (Ptr Group)
-#bindings_function getgrgid_r , CGid -> Ptr Group -> \
- CString -> CSize -> Ptr (Ptr Group) -> IO CInt
-#bindings_function getgrnam , CString -> IO (Ptr Group)
-#bindings_function getgrnam_r , CString -> Ptr Group -> \
- CString -> CSize -> Ptr (Ptr Group) -> IO CInt
-#bindings_function setgrent , IO ()
-
-#include <iconv.h>
-
-type CIconv = #bindings_equivalent_integer iconv_t
-
-#bindings_function iconv , CIconv -> Ptr CString -> \
- Ptr CSize -> Ptr CString -> Ptr CSize -> IO CSize
-#bindings_function iconv_close , CIconv -> IO CInt
-#bindings_function iconv_open , CString -> CString -> IO CIconv
-
-#include <langinfo.h>
-
-type CNlItem = #bindings_equivalent_integer nl_item
-
-#bindings_integer_like CODESET , CNlItem
-#bindings_integer_like D_T_FMT , CNlItem
-#bindings_integer_like D_FMT , CNlItem
-#bindings_integer_like T_FMT , CNlItem
-#bindings_integer_like T_FMT_AMPM , CNlItem
-#bindings_integer_like AM_STR , CNlItem
-#bindings_integer_like PM_STR , CNlItem
-#bindings_integer_like DAY_1 , CNlItem
-#bindings_integer_like DAY_2 , CNlItem
-#bindings_integer_like DAY_3 , CNlItem
-#bindings_integer_like DAY_4 , CNlItem
-#bindings_integer_like DAY_5 , CNlItem
-#bindings_integer_like DAY_6 , CNlItem
-#bindings_integer_like DAY_7 , CNlItem
-#bindings_integer_like ABDAY_1 , CNlItem
-#bindings_integer_like ABDAY_2 , CNlItem
-#bindings_integer_like ABDAY_3 , CNlItem
-#bindings_integer_like ABDAY_4 , CNlItem
-#bindings_integer_like ABDAY_5 , CNlItem
-#bindings_integer_like ABDAY_6 , CNlItem
-#bindings_integer_like ABDAY_7 , CNlItem
-#bindings_integer_like MON_1 , CNlItem
-#bindings_integer_like MON_2 , CNlItem
-#bindings_integer_like MON_3 , CNlItem
-#bindings_integer_like MON_4 , CNlItem
-#bindings_integer_like MON_5 , CNlItem
-#bindings_integer_like MON_6 , CNlItem
-#bindings_integer_like MON_7 , CNlItem
-#bindings_integer_like MON_8 , CNlItem
-#bindings_integer_like MON_9 , CNlItem
-#bindings_integer_like MON_10 , CNlItem
-#bindings_integer_like MON_11 , CNlItem
-#bindings_integer_like MON_12 , CNlItem
-#bindings_integer_like ABMON_1 , CNlItem
-#bindings_integer_like ABMON_2 , CNlItem
-#bindings_integer_like ABMON_3 , CNlItem
-#bindings_integer_like ABMON_4 , CNlItem
-#bindings_integer_like ABMON_5 , CNlItem
-#bindings_integer_like ABMON_6 , CNlItem
-#bindings_integer_like ABMON_7 , CNlItem
-#bindings_integer_like ABMON_8 , CNlItem
-#bindings_integer_like ABMON_9 , CNlItem
-#bindings_integer_like ABMON_10 , CNlItem
-#bindings_integer_like ABMON_11 , CNlItem
-#bindings_integer_like ABMON_12 , CNlItem
-#bindings_integer_like ERA , CNlItem
-#bindings_integer_like ERA_D_FMT , CNlItem
-#bindings_integer_like ERA_D_T_FMT , CNlItem
-#bindings_integer_like ERA_T_FMT , CNlItem
-#bindings_integer_like ALT_DIGITS , CNlItem
-#bindings_integer_like RADIXCHAR , CNlItem
-#bindings_integer_like THOUSEP , CNlItem
-#bindings_integer_like YESEXPR , CNlItem
-#bindings_integer_like NOEXPR , CNlItem
-#bindings_integer_like CRNCYSTR , CNlItem
-
-#bindings_function nl_langinfo , CNlItem -> IO CString
-
-#include <libgen.h>
-
-#bindings_function basename , CString -> IO CString
-#bindings_function dirname , CString -> IO CString
-
-#include <locale.h>
-
-#bindings_int LC_MESSAGES
-
--- #bindings_int LC_COLLATE_MASK
--- #bindings_int LC_CTYPE_MASK
--- #bindings_int LC_MESSAGES_MASK
--- #bindings_int LC_MONETARY_MASK
--- #bindings_int LC_NUMERIC_MASK
--- #bindings_int LC_TIME_MASK
--- #bindings_int LC_ALL_MASK
-
--- #bindings_integer_like LC_GLOBAL_LOCALE , CLocale
-
--- type CLocale = #bindings_equivalent_integer locale_t
-
--- #bindings_function duplocale , CLocale -> IO CLocale
--- #bindings_function freelocale , CLocale -> IO CLocale
--- #bindings_function newlocale , CInt -> CString -> CLocale -> IO CLocale
--- #bindings_function uselocale , CLocale -> IO CLocale
-
-#include <math.h>
-
-#bindings_frac M_E
-#bindings_frac M_LOG2E
-#bindings_frac M_LOG10E
-#bindings_frac M_LN2
-#bindings_frac M_LN10
-#bindings_frac M_PI
-#bindings_frac M_PI_2
-#bindings_frac M_PI_4
-#bindings_frac M_1_PI
-#bindings_frac M_2_PI
-#bindings_frac M_2_SQRTPI
-#bindings_frac M_SQRT2
-#bindings_frac M_SQRT1_2
-
-#bindings_function j0 , CDouble -> IO CDouble
-#bindings_function j1 , CDouble -> IO CDouble
-#bindings_function jn , CInt -> CDouble -> IO CDouble
-
-#bindings_function y0 , CDouble -> IO CDouble
-#bindings_function y1 , CDouble -> IO CDouble
-#bindings_function yn , CInt -> CDouble -> IO CDouble
-
-#bindings_globalvar signgam , CInt
-
-#include <mqueue.h>
-
-type CMqd = #bindings_equivalent_integer mqd_t
-
-#bindings_starttype struct mq_attr
-#bindings_field mq_flags , CLong
-#bindings_field mq_maxmsg , CLong
-#bindings_field mq_msgsize , CLong
-#bindings_field mq_curmsgs , CLong
-#bindings_stoptype _
-
-#bindings_function mq_close , CMqd -> IO CInt
-#bindings_function mq_getattr , CMqd -> Ptr Mq_attr -> IO CInt
-#bindings_function mq_notify , CMqd -> Ptr Sigevent -> IO CInt
-#bindings_function mq_receive , CMqd -> CString -> CSize -> \
- Ptr CUInt -> IO CSSize
-#bindings_function mq_send , CMqd -> CString -> \
- CSize -> CUInt -> IO CInt
-#bindings_function mq_setattr , CMqd -> Ptr Mq_attr -> \
- Ptr Mq_attr -> IO CInt
-#bindings_function mq_timedreceive , CMqd -> CString -> \
- CSize -> Ptr CUInt -> Ptr Timespec -> IO CSSize
-#bindings_function mq_timedsend , CMqd -> CString -> CSize -> \
- CUInt -> Ptr Timespec -> IO CInt
-#bindings_function mq_unlink , CString -> IO CInt
-
-#include <net/if.h>
-
-#bindings_starttype struct if_nameindex
-#bindings_field if_index , CUInt
-#bindings_field if_name , CString
-#bindings_stoptype _
-
-#bindings_num IF_NAMESIZE
-
-#bindings_function if_freenameindex , Ptr If_nameindex -> IO ()
-#bindings_function if_indextoname , CUInt -> CString -> IO CString
-#bindings_function if_nameindex , IO (Ptr If_nameindex)
-#bindings_function if_nametoindex , CString -> IO CUInt
-
-#include <netdb.h>
-
-#bindings_starttype struct hostent
-#bindings_field h_name , CString
-#bindings_field h_aliases , Ptr CString
-#bindings_field h_addrtype , CInt
-#bindings_field h_length , CInt
-#bindings_field h_addr_list , Ptr CString
-#bindings_stoptype _
-
-#bindings_starttype struct netent
-#bindings_field n_name , CString
-#bindings_field n_aliases , Ptr CString
-#bindings_field n_addrtype , CInt
-#bindings_field n_net , Word32
-#bindings_stoptype _
-
-#bindings_starttype struct protoent
-#bindings_field p_name , CString
-#bindings_field p_aliases , Ptr CString
-#bindings_field p_proto , CInt
-#bindings_stoptype _
-
-#bindings_starttype struct servent
-#bindings_field s_name , CString
-#bindings_field s_aliases , Ptr CString
-#bindings_field s_port , CInt
-#bindings_field s_proto , CString
-#bindings_stoptype _
-
-#bindings_starttype struct addrinfo
-#bindings_field ai_flags , CInt
-#bindings_field ai_family , CInt
-#bindings_field ai_socktype , CInt
-#bindings_field ai_protocol , CInt
-#bindings_field ai_addrlen , CSocklen
-#bindings_field ai_addr , Ptr Sockaddr
-#bindings_field ai_canonname , CString
-#bindings_field ai_next , Ptr Addrinfo
-#bindings_stoptype _
-
-#bindings_int AI_PASSIVE
-#bindings_int AI_CANONNAME
-#bindings_int AI_NUMERICHOST
-#bindings_int AI_NUMERICSERV
-#bindings_int AI_V4MAPPED
-#bindings_int AI_ALL
-#bindings_int AI_ADDRCONFIG
-#bindings_int NI_NOFQDN
-#bindings_int NI_NUMERICHOST
-#bindings_int NI_NAMEREQD
-#bindings_int NI_NUMERICSERV
--- #bindings_int NI_NUMERICSCOPE
-#bindings_int NI_DGRAM
-#bindings_int EAI_AGAIN
-#bindings_int EAI_BADFLAGS
-#bindings_int EAI_FAIL
-#bindings_int EAI_FAMILY
-#bindings_int EAI_MEMORY
-#bindings_int EAI_NONAME
-#bindings_int EAI_SERVICE
-#bindings_int EAI_SOCKTYPE
-#bindings_int EAI_SYSTEM
-#bindings_int EAI_OVERFLOW
-
-#bindings_function endhostent , IO ()
-#bindings_function endnetent , IO ()
-#bindings_function endprotoent , IO ()
-#bindings_function endservent , IO ()
-#bindings_function freeaddrinfo , Ptr Addrinfo -> IO ()
-#bindings_function gai_strerror , CInt -> IO CString
-#bindings_function getaddrinfo , CString -> CString -> \
- Ptr Addrinfo -> Ptr (Ptr Addrinfo) -> IO CInt
-#bindings_function gethostent , IO (Ptr Hostent)
-#bindings_function getnameinfo , Ptr Sockaddr -> \
- CSocklen -> CString -> CSocklen -> CString -> \
- CSocklen -> CInt -> IO CInt
-#bindings_function getnetbyaddr , Word32 -> CInt -> IO (Ptr Netent)
-#bindings_function getnetbyname , CString -> IO (Ptr Netent)
-#bindings_function getnetent , IO (Ptr Netent)
-#bindings_function getprotobyname , CString -> IO (Ptr Protoent)
-#bindings_function getprotobynumber , CInt -> IO (Ptr Protoent)
-#bindings_function getprotoent , IO (Ptr Protoent)
-#bindings_function getservbyname , CString -> CString -> \
- IO (Ptr Servent)
-#bindings_function getservbyport , CInt -> CString -> \
- IO (Ptr Servent)
-#bindings_function getservent , IO (Ptr Servent)
-#bindings_function sethostent , CInt -> IO ()
-#bindings_function setnetent , CInt -> IO ()
-#bindings_function setprotoent , CInt -> IO ()
-#bindings_function setservent , CInt -> IO ()
-
-#include <netinet/in.h>
-
-type CInPort = #bindings_equivalent_integer in_port_t
-type CInAddr = #bindings_equivalent_integer in_addr_t
-
-#bindings_starttype struct in_addr
-#bindings_field s_addr , CInAddr
-#bindings_stoptype _
-
-#bindings_starttype struct sockaddr_in
-#bindings_field sin_family , CSaFamily
-#bindings_field sin_port , CInPort
-#bindings_field sin_addr , In_addr
-#bindings_stoptype _
-
-#bindings_starttype struct in6_addr
-#bindings_field s6_addr , Ptr Word8
-#bindings_stoptype _
-
-#bindings_starttype struct sockaddr_in6
-#bindings_field sin6_family , CSaFamily
-#bindings_field sin6_port , CInPort
-#bindings_field sin6_flowinfo , Word32
-#bindings_field sin6_addr , In6_addr
-#bindings_field sin6_scope_id , Word32
-#bindings_stoptype _
-
-#bindings_starttype struct ipv6_mreq
-#bindings_field ipv6mr_multiaddr , In6_addr
-#bindings_field ipv6mr_interface , CUInt
-#bindings_stoptype _
-
-#bindings_int IPPROTO_IP
-#bindings_int IPPROTO_IPV6
-#bindings_int IPPROTO_ICMP
-#bindings_int IPPROTO_RAW
-#bindings_int IPPROTO_TCP
-#bindings_int IPPROTO_UDP
-
-#bindings_num INADDR_ANY
-#bindings_num INADDR_BROADCAST
-
-#bindings_num INET_ADDRSTRLEN
-
-#bindings_int IPV6_JOIN_GROUP
-#bindings_int IPV6_LEAVE_GROUP
-#bindings_int IPV6_MULTICAST_HOPS
-#bindings_int IPV6_MULTICAST_IF
-#bindings_int IPV6_MULTICAST_LOOP
-#bindings_int IPV6_UNICAST_HOPS
-#bindings_int IPV6_V6ONLY
-
-#include <netinet/tcp.h>
-
-#bindings_int TCP_NODELAY
-
-#include <nl_types.h>
-
-type CNlCatd = #bindings_equivalent_integer nl_catd
-
-#bindings_int NL_SETD
-#bindings_int NL_CAT_LOCALE
-
-#bindings_function catclose , CNlCatd -> IO CInt
-#bindings_function catgets , CNlCatd -> CInt -> CInt -> CString -> IO CString
-#bindings_function catopen , CString -> CInt -> IO CNlCatd
-
-#include <poll.h>
-
-#bindings_starttype struct pollfd
-#bindings_field fd , CInt
-#bindings_field events , CShort
-#bindings_field revents , CShort
-#bindings_stoptype _
-
-type CNfds = #bindings_equivalent_integer nfds_t
-
-#bindings_short POLLIN
--- #bindings_short POLLRDNORM
--- #bindings_short POLLRDBAND
-#bindings_short POLLPRI
-#bindings_short POLLOUT
--- #bindings_short POLLWRNORM
--- #bindings_short POLLWRBAND
-#bindings_short POLLERR
-#bindings_short POLLHUP
-#bindings_short POLLNVAL
-
-#bindings_function poll , Ptr Pollfd -> CNfds -> CInt -> IO CInt
-
-#include <pthread.h>
-
-#bindings_num PTHREAD_BARRIER_SERIAL_THREAD
-#bindings_num PTHREAD_CANCEL_ASYNCHRONOUS
-#bindings_num PTHREAD_CANCEL_ENABLE
-#bindings_num PTHREAD_CANCEL_DEFERRED
-#bindings_num PTHREAD_CANCEL_DISABLE
-#bindings_num PTHREAD_CANCELED
-#bindings_num PTHREAD_CREATE_DETACHED
-#bindings_num PTHREAD_CREATE_JOINABLE
-#bindings_num PTHREAD_EXPLICIT_SCHED
-#bindings_num PTHREAD_INHERIT_SCHED
--- #bindings_num PTHREAD_MUTEX_DEFAULT
--- #bindings_num PTHREAD_MUTEX_ERRORCHECK
--- #bindings_num PTHREAD_MUTEX_NORMAL
--- #bindings_num PTHREAD_MUTEX_RECURSIVE
--- #bindings_num PTHREAD_MUTEX_ROBUST
--- #bindings_num PTHREAD_MUTEX_STALLED
-#bindings_num PTHREAD_ONCE_INIT
--- #bindings_num PTHREAD_PRIO_INHERIT
--- #bindings_num PTHREAD_PRIO_NONE
--- #bindings_num PTHREAD_PRIO_PROTECT
-#bindings_num PTHREAD_PROCESS_SHARED
-#bindings_num PTHREAD_PROCESS_PRIVATE
-#bindings_num PTHREAD_SCOPE_PROCESS
-#bindings_num PTHREAD_SCOPE_SYSTEM
-
--- #bindings_function pthread_atfork , FunPtr (IO ()) -> \
--- FunPtr (IO ()) -> FunPtr (IO ()) -> IO CInt
-#bindings_function pthread_attr_destroy , \
- Ptr Pthread_attr_t -> IO CInt
-#bindings_function pthread_attr_getdetachstate , \
- Ptr Pthread_attr_t -> Ptr CInt -> IO CInt
-#bindings_function pthread_attr_getguardsize , \
- Ptr Pthread_attr_t -> Ptr CSize -> IO CInt
-#bindings_function pthread_attr_getinheritsched , \
- Ptr Pthread_attr_t -> Ptr CInt -> IO CInt
-#bindings_function pthread_attr_getschedparam , \
- Ptr Pthread_attr_t -> Ptr Sched_param -> IO CInt
-#bindings_function pthread_attr_getschedpolicy , \
- Ptr Pthread_attr_t -> Ptr CInt -> IO CInt
-#bindings_function pthread_attr_getscope , \
- Ptr Pthread_attr_t -> Ptr CInt -> IO CInt
-#bindings_function pthread_attr_getstack , \
- Ptr Pthread_attr_t -> Ptr (Ptr ()) -> Ptr CSize -> IO CInt
-#bindings_function pthread_attr_getstacksize , \
- Ptr Pthread_attr_t -> Ptr CSize -> IO CInt
-#bindings_function pthread_attr_init , \
- Ptr Pthread_attr_t -> IO CInt
-#bindings_function pthread_attr_setdetachstate , \
- Ptr Pthread_attr_t -> CInt -> IO CInt
-#bindings_function pthread_attr_setguardsize , \
- Ptr Pthread_attr_t -> CSize -> IO CInt
-#bindings_function pthread_attr_setinheritsched , \
- Ptr Pthread_attr_t -> CInt -> IO CInt
-#bindings_function pthread_attr_setschedparam , \
- Ptr Pthread_attr_t -> Ptr Sched_param -> IO CInt
-#bindings_function pthread_attr_setschedpolicy , \
- Ptr Pthread_attr_t -> CInt -> IO CInt
-#bindings_function pthread_attr_setscope , \
- Ptr Pthread_attr_t -> CInt -> IO CInt
-#bindings_function pthread_attr_setstack , \
- Ptr Pthread_attr_t -> Ptr void -> CSize -> IO CInt
-#bindings_function pthread_attr_setstacksize , \
- Ptr Pthread_attr_t -> CSize -> IO CInt
-#bindings_function pthread_barrier_destroy , \
- Ptr Pthread_barrier_t -> IO CInt
-#bindings_function pthread_barrier_init , \
- Ptr Pthread_barrier_t -> Ptr Pthread_barrierattr_t -> CUInt -> IO CInt
-#bindings_function pthread_barrier_wait , \
- Ptr Pthread_barrier_t -> IO CInt
-#bindings_function pthread_barrierattr_destroy , \
- Ptr Pthread_barrierattr_t -> IO CInt
-#bindings_function pthread_barrierattr_getpshared , \
- Ptr Pthread_barrierattr_t -> Ptr CInt -> IO CInt
-#bindings_function pthread_barrierattr_init , \
- Ptr Pthread_barrierattr_t -> IO CInt
-#bindings_function pthread_barrierattr_setpshared , \
- Ptr Pthread_barrierattr_t -> CInt -> IO CInt
--- #bindings_function pthread_cancel , Pthread_t -> IO CInt
--- #bindings_function pthread_cleanup_pop , CInt -> IO ()
--- #bindings_function pthread_cleanup_push , \
--- FunPtr (Ptr () -> IO ()) -> Ptr () -> IO ()
-#bindings_function pthread_cond_broadcast , \
- Ptr Pthread_cond_t -> IO CInt
-#bindings_function pthread_cond_destroy , \
- Ptr Pthread_cond_t -> IO CInt
-#bindings_function pthread_cond_init , \
- Ptr Pthread_cond_t -> Ptr Pthread_condattr_t -> IO CInt
-#bindings_function pthread_cond_signal , \
- Ptr Pthread_cond_t -> IO CInt
-#bindings_function pthread_cond_timedwait , \
- Ptr Pthread_cond_t -> Ptr Pthread_mutex_t -> Ptr timespec -> IO CInt
-#bindings_function pthread_cond_wait , \
- Ptr Pthread_cond_t -> Ptr Pthread_mutex_t -> IO CInt
-#bindings_function pthread_condattr_destroy , \
- Ptr Pthread_condattr_t -> IO CInt
-#bindings_function pthread_condattr_getclock , \
- Ptr Pthread_condattr_t -> Ptr clockid_t -> IO CInt
-#bindings_function pthread_condattr_getpshared , \
- Ptr Pthread_condattr_t -> Ptr CInt -> IO CInt
-#bindings_function pthread_condattr_init , \
- Ptr Pthread_condattr_t -> IO CInt
-#bindings_function pthread_condattr_setclock , \
- Ptr Pthread_condattr_t -> CClock -> IO CInt
-#bindings_function pthread_condattr_setpshared , \
- Ptr Pthread_condattr_t -> CInt -> IO CInt
-#bindings_function pthread_create , \
- Ptr Pthread_t -> Ptr Pthread_attr_t -> FunPtr (Ptr () -> \
- IO (Ptr ())) -> Ptr void -> IO CInt
--- #bindings_function pthread_detach , Pthread_t -> IO CInt
--- #bindings_function pthread_equal , Pthread_t -> Pthread_t -> IO CInt
-#bindings_function pthread_exit , Ptr () -> IO ()
--- #bindings_function pthread_getcpuclockid , \
--- Pthread_t -> Ptr clockid_t -> IO CInt
--- #bindings_function pthread_getschedparam , \
--- Pthread_t -> Ptr CInt -> Ptr Sched_param -> IO CInt
--- #bindings_function pthread_getspecific , Pthread_key_t -> IO (Ptr ())
--- #bindings_function pthread_join , Pthread_t -> Ptr Ptr void -> IO CInt
-#bindings_function pthread_key_create , \
- Ptr Pthread_key_t -> FunPtr (Ptr () -> IO (Ptr ())) -> IO CInt
--- #bindings_function pthread_key_delete , Pthread_key_t -> IO CInt
--- #bindings_function pthread_mutex_consistent , \
--- Ptr Pthread_mutex_t -> IO CInt
-#bindings_function pthread_mutex_destroy , \
- Ptr Pthread_mutex_t -> IO CInt
-#bindings_function pthread_mutex_getprioceiling , \
- Ptr Pthread_mutex_t -> Ptr CInt -> IO CInt
-#bindings_function pthread_mutex_init , \
- Ptr Pthread_mutex_t -> Ptr Pthread_mutexattr_t -> IO CInt
-#bindings_function pthread_mutex_lock , Ptr Pthread_mutex_t -> IO CInt
-#bindings_function pthread_mutex_setprioceiling , \
- Ptr Pthread_mutex_t -> CInt -> Ptr CInt -> IO CInt
-#bindings_function pthread_mutex_timedlock , \
- Ptr Pthread_mutex_t -> Ptr timespec -> IO CInt
-#bindings_function pthread_mutex_trylock , Ptr Pthread_mutex_t -> IO CInt
-#bindings_function pthread_mutex_unlock , Ptr Pthread_mutex_t -> IO CInt
-#bindings_function pthread_mutexattr_destroy , \
- Ptr Pthread_mutexattr_t -> IO CInt
-#bindings_function pthread_mutexattr_getprioceiling , \
- Ptr Pthread_mutexattr_t -> Ptr CInt -> IO CInt
-#bindings_function pthread_mutexattr_getprotocol , \
- Ptr Pthread_mutexattr_t -> Ptr CInt -> IO CInt
-#bindings_function pthread_mutexattr_getpshared , \
- Ptr Pthread_mutexattr_t -> Ptr CInt -> IO CInt
--- #bindings_function pthread_mutexattr_getrobust , \
--- Ptr Pthread_mutexattr_t -> Ptr CInt -> IO CInt
-#bindings_function pthread_mutexattr_gettype , \
- Ptr Pthread_mutexattr_t -> Ptr CInt -> IO CInt
-#bindings_function pthread_mutexattr_init , \
- Ptr Pthread_mutexattr_t -> IO CInt
-#bindings_function pthread_mutexattr_setprioceiling , \
- Ptr Pthread_mutexattr_t -> CInt -> IO CInt
-#bindings_function pthread_mutexattr_setprotocol , \
- Ptr Pthread_mutexattr_t -> CInt -> IO CInt
-#bindings_function pthread_mutexattr_setpshared , \
- Ptr Pthread_mutexattr_t -> CInt -> IO CInt
--- #bindings_function pthread_mutexattr_setrobust , \
--- Ptr Pthread_mutexattr_t -> CInt -> IO CInt
-#bindings_function pthread_mutexattr_settype , \
- Ptr Pthread_mutexattr_t -> CInt -> IO CInt
-#bindings_function pthread_once , \
- Ptr Pthread_once_t -> FunPtr (IO ()) -> IO CInt
-#bindings_function pthread_rwlock_destroy , \
- Ptr Pthread_rwlock_t -> IO CInt
-#bindings_function pthread_rwlock_init , \
- Ptr Pthread_rwlock_t -> Ptr Pthread_rwlockattr_t -> IO CInt
-#bindings_function pthread_rwlock_rdlock , \
- Ptr Pthread_rwlock_t -> IO CInt
-#bindings_function pthread_rwlock_timedrdlock , \
- Ptr Pthread_rwlock_t -> Ptr timespec -> IO CInt
-#bindings_function pthread_rwlock_timedwrlock , \
- Ptr Pthread_rwlock_t -> Ptr timespec -> IO CInt
-#bindings_function pthread_rwlock_tryrdlock , \
- Ptr Pthread_rwlock_t -> IO CInt
-#bindings_function pthread_rwlock_trywrlock , \
- Ptr Pthread_rwlock_t -> IO CInt
-#bindings_function pthread_rwlock_unlock , \
- Ptr Pthread_rwlock_t -> IO CInt
-#bindings_function pthread_rwlock_wrlock , \
- Ptr Pthread_rwlock_t -> IO CInt
-#bindings_function pthread_rwlockattr_destroy , \
- Ptr Pthread_rwlockattr_t -> IO CInt
-#bindings_function pthread_rwlockattr_getpshared , \
- Ptr Pthread_rwlockattr_t -> Ptr CInt -> IO CInt
-#bindings_function pthread_rwlockattr_init , \
- Ptr Pthread_rwlockattr_t -> IO CInt
-#bindings_function pthread_rwlockattr_setpshared , \
- Ptr Pthread_rwlockattr_t -> CInt -> IO CInt
--- #bindings_function pthread_self , IO Pthread_t
-#bindings_function pthread_setcancelstate , \
- CInt -> Ptr CInt -> IO CInt
-#bindings_function pthread_setcanceltype , \
- CInt -> Ptr CInt -> IO CInt
--- #bindings_function pthread_setschedparam , \
--- Pthread_t -> CInt -> Ptr Sched_param -> IO CInt
--- #bindings_function pthread_setschedprio , \
--- Pthread_t -> CInt -> IO CInt
--- #bindings_function pthread_setspecific , \
--- Pthread_key_t -> Ptr void -> IO CInt
-#bindings_function pthread_spin_destroy , \
- Ptr Pthread_spinlock_t -> IO CInt
-#bindings_function pthread_spin_init , \
- Ptr Pthread_spinlock_t -> CInt -> IO CInt
--- #bindings_function pthread_spinlock , \
--- Ptr Pthread_spinlock_t -> IO CInt
-#bindings_function pthread_spin_trylock , \
- Ptr Pthread_spinlock_t -> IO CInt
-#bindings_function pthread_spin_unlock , \
- Ptr Pthread_spinlock_t -> IO CInt
-#bindings_function pthread_testcancel , IO ()
-
-#include <pwd.h>
-
-#bindings_starttype struct passwd
-#bindings_field pw_name , CString
-#bindings_field pw_uid , CUid
-#bindings_field pw_gid , CGid
-#bindings_field pw_dir , CString
-#bindings_field pw_shell , CString
-#bindings_stoptype _
-
-#bindings_function endpwent , IO ()
-#bindings_function getpwent , IO (Ptr Passwd)
-#bindings_function getpwnam , CString -> IO (Ptr Passwd)
-#bindings_function getpwnam_r , CString -> Ptr Passwd -> \
- CString -> CSize -> Ptr (Ptr Passwd) -> IO CInt
-#bindings_function getpwuid , CUid -> IO (Ptr Passwd)
-#bindings_function getpwuid_r , CUid -> Ptr Passwd -> \
- CString -> CSize -> Ptr (Ptr Passwd) -> IO CInt
-#bindings_function setpwent , IO ()
-
-#include <regex.h>
-
-#bindings_starttype regex_t
-#bindings_field re_nsub , CSize
-#bindings_stoptype _
-
-type CRegoff = #bindings_equivalent_integer regoff_t
-
-#bindings_starttype regmatch_t
-#bindings_field rm_so , CRegoff
-#bindings_field rm_eo , CRegoff
-#bindings_stoptype _
-
-#bindings_int REG_EXTENDED
-#bindings_int REG_ICASE
-#bindings_int REG_NOSUB
-#bindings_int REG_NEWLINE
-
-#bindings_int REG_NOTBOL
-#bindings_int REG_NOTEOL
-
-#bindings_int REG_NOMATCH
-#bindings_int REG_BADPAT
-#bindings_int REG_ECOLLATE
-#bindings_int REG_ECTYPE
-#bindings_int REG_EESCAPE
-#bindings_int REG_ESUBREG
-#bindings_int REG_EBRACK
-#bindings_int REG_EPAREN
-#bindings_int REG_EBRACE
-#bindings_int REG_BADBR
-#bindings_int REG_ERANGE
-#bindings_int REG_ESPACE
-#bindings_int REG_BADRPT
-
-#bindings_function regcomp , Ptr Regex_t -> \
- CString -> CInt -> IO CInt
-#bindings_function regerror , CInt -> Ptr Regex_t -> \
- CString -> CSize -> IO CSize
-#bindings_function regexec , Ptr Regex_t -> CString -> \
- CSize -> Ptr Regmatch_t -> CInt -> IO CInt
-#bindings_function regfree , Ptr Regex_t -> IO ()
-
-#include <time.h>
-
-#bindings_starttype struct timespec
-#bindings_field tv_sec , CTime
-#bindings_field tv_nsec , CLong
-#bindings_stoptype _
-
-#bindings_starttype struct itimerspec
-#bindings_field it_interval , Timespec
-#bindings_field it_value , Timespec
-#bindings_stoptype _
-
-#bindings_num CLOCK_MONOTONIC
-#bindings_num CLOCK_PROCESS_CPUTIME_ID
-#bindings_num CLOCK_REALTIME
-#bindings_num CLOCK_THREAD_CPUTIME_ID
-
-#bindings_function clock_getcpuclockid , CPid -> Ptr CClockid -> IO CInt
-#bindings_function clock_getres , CClockid -> Ptr Timespec -> IO CInt
-#bindings_function clock_gettime , CClockid -> Ptr Timespec -> IO CInt
-#bindings_function clock_nanosleep , CClockid -> CInt -> Ptr Timespec -> \
- Ptr Timespec -> IO CInt
-#bindings_function clock_settime , CClockid -> Ptr Timespec -> IO CInt
-#bindings_function getdate , CString -> IO (Ptr Tm)
-#bindings_function gmtime_r , Ptr CTime -> Ptr Tm -> IO (Ptr Tm)
-#bindings_function localtime_r , Ptr CTime -> Ptr Tm -> IO (Ptr Tm)
-#bindings_function nanosleep , Ptr Timespec -> Ptr timespec -> IO CInt
-#bindings_function strptime , CString -> CString -> Ptr Tm -> IO CString
-#bindings_function timer_create , CClockid -> Ptr Sigevent -> \
- Ptr CTimer -> IO CInt
-#bindings_function timer_delete , CTimer -> IO CInt
-#bindings_function timer_getoverrun , CTimer -> IO CInt
-#bindings_function timer_gettime , CTimer -> Ptr Itimerspec -> IO CInt
-#bindings_function timer_settime , CTimer -> CInt -> Ptr Itimerspec -> \
- Ptr Itimerspec -> IO CInt
-#bindings_function tzset , IO ()
-
-#bindings_globalvar daylight , CInt
-#bindings_globalvar timezone , CLong
-#bindings_globalvar tzname , Ptr (Ptr CString)
-
-#include <sched.h>
-
-#bindings_starttype struct sched_param
-#bindings_field sched_priority , CInt
-#bindings_stoptype _
-
-#bindings_num SCHED_FIFO
-#bindings_num SCHED_RR
--- #bindings_num SCHED_SPORADIC
-#bindings_num SCHED_OTHER
-
-#bindings_function sched_get_priority_max , CInt -> IO CInt
-#bindings_function sched_get_priority_min , CInt -> IO CInt
-#bindings_function sched_getparam , CPid -> \
- Ptr Sched_param -> IO CInt
-#bindings_function sched_getscheduler , CPid -> IO CInt
-#bindings_function sched_rr_get_interval , CPid -> \
- Ptr Timespec -> IO CInt
-#bindings_function sched_setparam , CPid -> \
- Ptr Sched_param -> IO CInt
-#bindings_function sched_setscheduler , CPid -> CInt -> \
- Ptr Sched_param -> IO CInt
-#bindings_function sched_yield , IO CInt
-
-#include <search.h>
-
-#bindings_starttype ENTRY
-#bindings_field key , CString
-#bindings_field data , Ptr ()
-#bindings_stoptype _
-
-type ACTION = #bindings_equivalent_integer ACTION
-type VISIT = #bindings_equivalent_integer VISIT
-
-#bindings_integer_like FIND , ACTION
-#bindings_integer_like ENTER , ACTION
-
-#bindings_integer_like preorder , VISIT
-#bindings_integer_like postorder , VISIT
-#bindings_integer_like endorder , VISIT
-#bindings_integer_like leaf , VISIT
-
-#bindings_function hcreate , CSize -> IO CInt
-#bindings_function hdestroy , IO ()
-#bindings_function insque , Ptr () -> Ptr () -> IO ()
-#bindings_function lfind , Ptr () -> Ptr () -> \
- Ptr CSize -> CSize -> FunPtr (Ptr () -> \
- Ptr () -> IO CInt) -> IO (Ptr ())
-#bindings_function lsearch , Ptr () -> Ptr () -> \
- Ptr CSize -> CSize -> FunPtr (Ptr () -> \
- Ptr () -> IO CInt) -> IO (Ptr ())
-#bindings_function remque , Ptr () -> IO ()
-#bindings_function tdelete , Ptr () -> Ptr (Ptr ()) -> \
- FunPtr (Ptr () -> Ptr () -> IO CInt) -> IO (Ptr ())
-#bindings_function tfind , Ptr () -> Ptr () -> \
- FunPtr (Ptr () -> Ptr () -> IO CInt) -> IO (Ptr ())
-#bindings_function tsearch , Ptr () -> Ptr (Ptr ()) -> \
- FunPtr (Ptr () -> Ptr () -> IO CInt) -> IO (Ptr ())
-#bindings_function twalk , Ptr () -> FunPtr (Ptr () -> \
- VISIT -> CInt -> IO ()) -> IO ()
-
-#include <semaphore.h>
-
-data CSem
-
-#bindings_ptr SEM_FAILED , Ptr CSem
-
-#bindings_function sem_close , Ptr CSem -> IO CInt
-#bindings_function sem_destroy , Ptr CSem -> IO CInt
-#bindings_function sem_getvalue , Ptr CSem -> Ptr CInt -> IO CInt
-#bindings_function sem_init , Ptr CSem -> CInt -> CUInt -> IO CInt
-#bindings_function sem_post , Ptr CSem -> IO CInt
-#bindings_function sem_timedwait , Ptr CSem -> Ptr Timespec -> IO CInt
-#bindings_function sem_trywait , Ptr CSem -> IO CInt
-#bindings_function sem_unlink , CString -> IO CInt
-#bindings_function sem_wait , Ptr CSem -> IO CInt
-
-#include <signal.h>
-
-#include <spawn.h>
-
-#bindings_starttype posix_spawnattr_t
-#bindings_stoptype _
-
-#bindings_starttype posix_spawn_file_actions_t
-#bindings_stoptype _
-
-#bindings_short POSIX_SPAWN_RESETIDS
-#bindings_short POSIX_SPAWN_SETPGROUP
-#bindings_short POSIX_SPAWN_SETSCHEDPARAM
-#bindings_short POSIX_SPAWN_SETSCHEDULER
-#bindings_short POSIX_SPAWN_SETSIGDEF
-#bindings_short POSIX_SPAWN_SETSIGMASK
-
-#bindings_function posix_spawn , Ptr CPid -> \
- CString -> Ptr Posix_spawn_file_actions_t -> \
- Ptr Posix_spawnattr_t -> \
- CString -> Ptr CString -> IO CInt
-#bindings_function posix_spawn_file_actions_addclose , \
- Ptr Posix_spawn_file_actions_t -> CInt -> IO CInt
-#bindings_function posix_spawn_file_actions_adddup2 , \
- Ptr Posix_spawn_file_actions_t -> CInt -> CInt -> IO CInt
-#bindings_function posix_spawn_file_actions_addopen , \
- Ptr Posix_spawn_file_actions_t -> CInt -> CString -> \
- CInt -> CMode -> IO CInt
-#bindings_function posix_spawn_file_actions_destroy , \
- Ptr Posix_spawn_file_actions_t -> IO CInt
-#bindings_function posix_spawn_file_actions_init , \
- Ptr Posix_spawn_file_actions_t -> IO CInt
-#bindings_function posix_spawnattr_destroy , \
- Ptr Posix_spawnattr_t -> IO CInt
-#bindings_function posix_spawnattr_getflags , \
- Ptr Posix_spawnattr_t -> Ptr CShort -> IO CInt
-#bindings_function posix_spawnattr_getpgroup , \
- Ptr Posix_spawnattr_t -> Ptr CPid -> IO CInt
-#bindings_function posix_spawnattr_getschedparam , \
- Ptr Posix_spawnattr_t -> Ptr Sched_param -> IO CInt
-#bindings_function posix_spawnattr_getschedpolicy , \
- Ptr Posix_spawnattr_t -> Ptr CInt -> IO CInt
-#bindings_function posix_spawnattr_getsigdefault , \
- Ptr Posix_spawnattr_t -> Ptr Sigset_t -> IO CInt
-#bindings_function posix_spawnattr_getsigmask , \
- Ptr Posix_spawnattr_t -> Ptr Sigset_t -> IO CInt
-#bindings_function posix_spawnattr_init , \
- Ptr Posix_spawnattr_t -> IO CInt
-#bindings_function posix_spawnattr_setflags , \
- Ptr Posix_spawnattr_t -> CShort -> IO CInt
-#bindings_function posix_spawnattr_setpgroup , \
- Ptr Posix_spawnattr_t -> CPid -> IO CInt
-#bindings_function posix_spawnattr_setschedparam , \
- Ptr Posix_spawnattr_t -> Ptr Sched_param -> IO CInt
-#bindings_function posix_spawnattr_setschedpolicy , \
- Ptr Posix_spawnattr_t -> CInt -> IO CInt
-#bindings_function posix_spawnattr_setsigdefault , \
- Ptr Posix_spawnattr_t -> Ptr Sigset_t -> IO CInt
-#bindings_function posix_spawnattr_setsigmask , \
- Ptr Posix_spawnattr_t -> \
- Ptr Sigset_t -> IO CInt
-#bindings_function posix_spawnp , Ptr CPid -> CString -> \
- Ptr Posix_spawn_file_actions_t -> Ptr Posix_spawnattr_t -> \
- Ptr CString -> Ptr CString -> IO CInt
-
-#include <stdbool.h>
-
-#bindings_num true
-#bindings_num false
-
-#include <stdio.h>
-
-#bindings_num L_ctermid
-
-#bindings_function ctermid , CString -> IO CString
-#bindings_function fdopen , CInt -> CString -> IO (Ptr CFile)
-#bindings_function fileno , Ptr CFile -> IO CInt
-#bindings_function flockfile , Ptr CFile -> IO ()
-#bindings_function fseeko , Ptr CFile -> COff -> CInt -> IO CInt
-#bindings_function ftello , Ptr CFile -> IO COff
-#bindings_function ftrylockfile , Ptr CFile -> IO CInt
-#bindings_function funlockfile , Ptr CFile -> IO ()
-#bindings_function getc_unlocked , Ptr CFile -> IO CInt
-#bindings_function getchar_unlocked , IO CInt
-#bindings_function getdelim , Ptr CString -> Ptr CSize -> \
- CInt -> Ptr CFile -> IO CSSize
-#bindings_function getline , Ptr CString -> Ptr CSize -> \
- Ptr CFile -> IO CSSize
-#bindings_function open_memstream , Ptr CString -> \
- Ptr CSize -> IO (Ptr CFile)
-#bindings_function pclose , Ptr CFile -> IO CInt
-#bindings_function popen , CString -> CString -> IO (Ptr CFile)
-#bindings_function putc_unlocked , CInt -> Ptr CFile -> IO CInt
-#bindings_function putchar_unlocked , CInt -> IO CInt
-#bindings_function renameat , CInt -> CString -> \
- CInt -> CString -> IO CInt
-
-#include <stdlib.h>
-
-#bindings_function a64l , CString -> IO CLong
-#bindings_function drand48 , IO CDouble
-#bindings_function erand48 , Ptr CUShort -> IO CDouble
-#bindings_function grantpt , CInt -> IO CInt
-#bindings_function initstate , CUInt -> CString -> CSize -> IO CString
-#bindings_function jrand48 , Ptr CUShort -> IO CLong
-#bindings_function l64a , CLong -> IO CString
-#bindings_function lcong48 , Ptr CUShort -> IO ()
-#bindings_function lrand48 , IO CLong
-#bindings_function mkdtemp , CString -> IO CString
-#bindings_function mkstemp , CString -> IO CInt
-#bindings_function mrand48 , IO CLong
-#bindings_function nrand48 , Ptr CUShort -> IO CLong
-#bindings_function posix_memalign , Ptr (Ptr ()) -> CSize -> CSize -> IO CInt
-#bindings_function posix_openpt , CInt -> IO CInt
-#bindings_function ptsname , CInt -> IO CString
-#bindings_function putenv , CString -> IO CInt
-#bindings_function rand_r , IO CInt
-#bindings_function random , IO CLong
-#bindings_function realpath , CString -> CString -> IO CString
-#bindings_function seed48 , Ptr CUShort -> IO (Ptr CUShort)
-#bindings_function setenv , CString -> CString -> CInt -> IO CInt
-#bindings_function setstate , CString -> IO CString
-#bindings_function srandom , CUInt -> IO ()
-#bindings_function unlockpt , CInt -> IO CInt
-#bindings_function unsetenv , CString -> IO CInt
-
-#include <string.h>
-
-#bindings_function memccpy , Ptr () -> Ptr () -> \
- CInt -> CSize -> IO (Ptr ())
-#bindings_function stpcpy , CString -> CString -> IO CString
-#bindings_function stpncpy , CString -> CString -> \
- CSize -> IO CString
-#bindings_function strdup , CString -> IO CString
-#bindings_function strerror_r , CInt -> CString -> \
- CSize -> IO CInt
-#bindings_function strndup , CString -> CSize -> IO CString
-#bindings_function strnlen , CString -> CSize -> IO CSize
-#bindings_function strsignal , CInt -> IO CString
-#bindings_function strtok_r , CString -> CString -> \
- Ptr CString -> IO CString
-
-#include <strings.h>
-
-#bindings_function strcasecmp , CString -> CString -> IO CInt
-#bindings_function strncasecmp , CString -> CString -> CSize -> IO CInt
-
-#include <ucontext.h>
-
-#bindings_starttype sigset_t
-#bindings_stoptype _
-
-#bindings_starttype struct sigevent
-#bindings_field sigev_notify , CInt
-#bindings_field sigev_signo , CInt
-#bindings_field sigev_value , Sigval
-#bindings_field sigev_notify_function , FunPtr (Sigval -> IO ())
-#bindings_field sigev_notify_attributes , Ptr ()
-#bindings_stoptype _
-
-#bindings_int SIGEV_NONE
-#bindings_int SIGEV_SIGNAL
-#bindings_int SIGEV_THREAD
-
-#bindings_starttype union sigval
-#bindings_field sival_int , CInt
-#bindings_field sival_ptr , Ptr ()
-#bindings_stoptype _
-
-#bindings_int SIGALRM
-#bindings_int SIGBUS
-#bindings_int SIGCHLD
-#bindings_int SIGCONT
-#bindings_int SIGHUP
-#bindings_int SIGKILL
-#bindings_int SIGPIPE
-#bindings_int SIGQUIT
-#bindings_int SIGSTOP
-#bindings_int SIGTSTP
-#bindings_int SIGTTIN
-#bindings_int SIGTTOU
-#bindings_int SIGUSR1
-#bindings_int SIGUSR2
-#bindings_int SIGSYS
-#bindings_int SIGTRAP
-#bindings_int SIGURG
-#bindings_int SIGVTALRM
-#bindings_int SIGXCPU
-#bindings_int SIGXFSZ
-
-#bindings_starttype struct sigaction
-#bindings_field sa_handler , FunPtr (CInt -> IO ())
-#bindings_field sa_flags , CInt
-#bindings_field sa_sigaction , FunPtr (CInt -> \
- Ptr Siginfo_t -> Ptr () -> IO ())
-#bindings_stoptype _
-
-#bindings_int SIG_BLOCK
-#bindings_int SIG_UNBLOCK
-#bindings_int SIG_SETMASK
-#bindings_int SA_NOCLDSTOP
-#bindings_int SA_ONSTACK
-#bindings_int SA_RESETHAND
-#bindings_int SA_RESTART
-#bindings_int SA_SIGINFO
-#bindings_int SA_NOCLDWAIT
-#bindings_int SA_NODEFER
-#bindings_int SS_ONSTACK
-#bindings_int SS_DISABLE
-#bindings_num MINSIGSTKSZ
-#bindings_num SIGSTKSZ
-
-#bindings_starttype ucontext_t
-#bindings_field uc_link , Ptr Ucontext_t
-#bindings_field uc_stack , Stack_t
-#bindings_stoptype _
-
-#bindings_starttype stack_t
-#bindings_field ss_sp , Ptr ()
-#bindings_field ss_size , CSize
-#bindings_field ss_flags , CInt
-#bindings_stoptype _
-
-#bindings_starttype siginfo_t
-#bindings_field si_signo , CInt
-#bindings_field si_code , CInt
-#bindings_field si_errno , CInt
-#bindings_field si_pid , CPid
-#bindings_field si_uid , CUid
-#bindings_field si_addr , Ptr ()
-#bindings_field si_status , CInt
-#bindings_field si_band , CLong
-#bindings_field si_value , Sigval
-#bindings_stoptype _
-
-#bindings_int ILL_ILLOPC
-#bindings_int ILL_ILLOPN
-#bindings_int ILL_ILLADR
-#bindings_int ILL_ILLTRP
-#bindings_int ILL_PRVOPC
-#bindings_int ILL_PRVREG
-#bindings_int ILL_COPROC
-#bindings_int ILL_BADSTK
-#bindings_int FPE_INTDIV
-#bindings_int FPE_INTOVF
-#bindings_int FPE_FLTDIV
-#bindings_int FPE_FLTOVF
-#bindings_int FPE_FLTUND
-#bindings_int FPE_FLTRES
-#bindings_int FPE_FLTINV
-#bindings_int FPE_FLTSUB
-#bindings_int SEGV_MAPERR
-#bindings_int SEGV_ACCERR
-#bindings_int BUS_ADRALN
-#bindings_int BUS_ADRERR
-#bindings_int BUS_OBJERR
-#bindings_int TRAP_BRKPT
-#bindings_int TRAP_TRACE
-#bindings_int CLD_EXITED
-#bindings_int CLD_KILLED
-#bindings_int CLD_DUMPED
-#bindings_int CLD_TRAPPED
-#bindings_int CLD_STOPPED
-#bindings_int CLD_CONTINUED
-#bindings_int SI_USER
-#bindings_int SI_QUEUE
-#bindings_int SI_TIMER
-#bindings_int SI_ASYNCIO
-#bindings_int SI_MESGQ
-
-#bindings_function kill , CPid -> CInt -> IO CInt
-#bindings_function killpg , CPid -> CInt -> IO CInt
--- #bindings_function psiginfo , Ptr Siginfo_t -> CString -> IO ()
-#bindings_function psignal , CInt -> CString -> IO ()
-#bindings_function pthread_sigmask , CInt -> Ptr Sigset_t -> \
- Ptr Sigset_t -> IO CInt
-#bindings_function sigaction , CInt -> Ptr Sigaction -> \
- Ptr Sigaction -> IO CInt
-#bindings_function sigaddset , Ptr Sigset_t -> CInt -> IO CInt
-#bindings_function sigaltstack , Ptr Stack_t -> Ptr Stack_t -> IO CInt
-#bindings_function sigdelset , Ptr Sigset_t -> CInt -> IO CInt
-#bindings_function sigemptyset , Ptr Sigset_t -> IO CInt
-#bindings_function sigfillset , Ptr Sigset_t -> IO CInt
-#bindings_function sigismember , Ptr Sigset_t -> CInt -> IO CInt
-#bindings_function sigpending , Ptr Sigset_t -> IO CInt
-#bindings_function sigprocmask , CInt -> \
- Ptr Sigset_t -> Ptr Sigset_t -> IO CInt
-#bindings_function sigsuspend , Ptr Sigset_t -> IO CInt
-#bindings_function sigtimedwait , Ptr Sigset_t -> Ptr Siginfo_t -> \
- Ptr Timespec -> IO CInt
-#bindings_function sigwait , Ptr Sigset_t -> Ptr CInt -> IO CInt
-#bindings_function sigwaitinfo , Ptr Sigset_t -> Ptr Siginfo_t -> \
- IO CInt
-
-#include <sys/ipc.h>
-
-#bindings_starttype struct ipc_perm
-#bindings_field uid , CUid
-#bindings_field gid , CGid
-#bindings_field cuid , CUid
-#bindings_field cgid , CGid
-#bindings_field mode , CMode
-#bindings_stoptype _
-
-#bindings_int IPC_CREAT
-#bindings_int IPC_EXCL
-#bindings_int IPC_NOWAIT
-
-#bindings_integer_like IPC_PRIVATE , CKey
-
-#bindings_num IPC_RMID
-#bindings_num IPC_SET
-#bindings_num IPC_STAT
-
-#bindings_function ftok , CString -> CInt -> IO CKey
-
-#include <sys/mman.h>
-
-#bindings_int PROT_EXEC
-#bindings_int PROT_NONE
-#bindings_int PROT_READ
-#bindings_int PROT_WRITE
-
-#bindings_int MAP_FIXED
-#bindings_int MAP_PRIVATE
-#bindings_int MAP_SHARED
-
-#bindings_int MS_ASYNC
-#bindings_int MS_INVALIDATE
-#bindings_int MS_SYNC
-
-#bindings_int MCL_CURRENT
-#bindings_int MCL_FUTURE
-
-#bindings_ptr MAP_FAILED , Ptr ()
-
-#bindings_int POSIX_MADV_DONTNEED
-#bindings_int POSIX_MADV_NORMAL
-#bindings_int POSIX_MADV_RANDOM
-#bindings_int POSIX_MADV_SEQUENTIAL
-#bindings_int POSIX_MADV_WILLNEED
--- #bindings_int POSIX_TYPED_MEM_ALLOCATE
--- #bindings_int POSIX_TYPED_MEM_ALLOCATE_CONTIG
--- #bindings_int POSIX_TYPED_MEM_MAP_ALLOCATABLE
-
--- #bindings_starttype posix_typed_mem_info
--- #bindings_field posix_tmi_length , CSize
--- #bindings_stoptype _
-
-#bindings_function mlock , Ptr () -> CSize -> IO CInt
-#bindings_function mlockall , CInt -> IO CInt
-#bindings_function mmap , Ptr () -> CSize -> CInt -> \
- CInt -> CInt -> COff -> IO (Ptr ())
-#bindings_function mprotect , Ptr () -> CSize -> CInt -> IO CInt
-#bindings_function msync , Ptr () -> CSize -> CInt -> IO CInt
-#bindings_function munlock , Ptr () -> CSize -> IO CInt
-#bindings_function munlockall , IO CInt
-#bindings_function munmap , Ptr () -> CSize -> IO CInt
-#bindings_function posix_madvise , Ptr () -> CSize -> \
- CInt -> IO CInt
--- #bindings_function posix_mem_offset , Ptr () -> CSize -> \
--- Ptr COff -> Ptr CSize -> Ptr CInt -> IO CInt
--- #bindings_function posix_typed_mem_get_info , CInt -> \
--- Ptr Posix_typed_mem_info -> IO CInt
--- #bindings_function posix_typed_mem_open , CString -> \
--- CInt -> CInt -> IO CInt
-#bindings_function shm_open , CString -> CInt -> CMode -> IO CInt
-#bindings_function shm_unlink , CString -> IO CInt
-
-#include <sys/msg.h>
-
-type CMsgqnum = #bindings_equivalent_integer msgqnum_t
-type CMsglen = #bindings_equivalent_integer msgqnum_t
-
-#bindings_num MSG_NOERROR
-
-#bindings_starttype struct msqid_ds
-#bindings_field msg_perm , Ipc_perm
-#bindings_field msg_qnum , CMsgqnum
-#bindings_field msg_qbytes , CMsglen
-#bindings_field msg_lspid , CPid
-#bindings_field msg_lrpid , CPid
-#bindings_field msg_stime , CTime
-#bindings_field msg_rtime , CTime
-#bindings_field msg_ctime , CTime
-#bindings_stoptype _
-
-#bindings_function msgctl , CInt -> CInt -> Ptr Msqid_ds -> IO CInt
-#bindings_function msgget , CKey -> CInt -> IO CInt
-#bindings_function msgrcv , CInt -> Ptr () -> CSize -> CLong -> \
- CInt -> IO CSSize
-#bindings_function msgsnd , CInt -> Ptr () -> CSize -> CInt -> IO CInt
-
-
-#include <sys/resource.h>
-
-#bindings_int PRIO_PROCESS
-#bindings_int PRIO_PGRP
-#bindings_int PRIO_USER
-
-type CRlim = #bindings_equivalent_integer rlim_t
-
-#bindings_integer_like RLIM_INFINITY , CRlim
-#bindings_integer_like RLIM_SAVED_MAX , CRlim
-#bindings_integer_like RLIM_SAVED_CUR , CRlim
-
-#bindings_int RUSAGE_SELF
-#bindings_int RUSAGE_CHILDREN
-
-#bindings_starttype struct rlimit
-#bindings_field rlim_cur , CRlim
-#bindings_field rlim_max , CRlim
-#bindings_stoptype _
-
-#bindings_starttype struct rusage
-#bindings_field ru_utime , Timeval
-#bindings_field ru_stime , Timeval
-#bindings_stoptype _
-
-#bindings_int RLIMIT_CORE
-#bindings_int RLIMIT_CPU
-#bindings_int RLIMIT_DATA
-#bindings_int RLIMIT_FSIZE
-#bindings_int RLIMIT_NOFILE
-#bindings_int RLIMIT_STACK
-#bindings_int RLIMIT_AS
-
-#bindings_function getpriority , CInt -> CId -> IO CInt
-#bindings_function getrlimit , CInt -> Ptr Rlimit -> IO CInt
-#bindings_function getrusage , CInt -> Ptr Rusage -> IO CInt
-#bindings_function setpriority , CInt -> CId -> CInt -> IO CInt
-#bindings_function setrlimit , CInt -> Ptr Rlimit -> IO CInt
-
-#include <sys/select.h>
-
-#bindings_starttype struct timeval
-#bindings_field tv_sec , CTime
-#bindings_field tv_usec , CSuseconds
-#bindings_stoptype _
-
-#bindings_starttype fd_set
-#bindings_stoptype _
-
-#bindings_num FD_SETSIZE
-
-#bindings_function pselect , CInt -> Ptr Fd_set -> \
- Ptr Fd_set -> Ptr Fd_set -> Ptr Timespec -> Ptr Sigset_t -> IO CInt
-#bindings_function select , CInt -> Ptr Fd_set -> \
- Ptr Fd_set -> Ptr Fd_set -> Ptr Timeval -> IO CInt
-
-#include <sys/shm.h>
-
-#bindings_num SHM_RDONLY
-#bindings_num SHM_RND
-#bindings_num SHMLBA
-
-type CShmatt = #bindings_equivalent_integer shmatt_t
-
-#bindings_starttype struct shmid_ds
-#bindings_field shm_perm , Ipc_perm
-#bindings_field shm_segsz , CSize
-#bindings_field shm_lpid , CPid
-#bindings_field shm_cpid , CPid
-#bindings_field shm_nattch , CShmatt
-#bindings_field shm_atime , CTime
-#bindings_field shm_dtime , CTime
-#bindings_field shm_ctime , CTime
-#bindings_stoptype _
-
-#bindings_function shmat , CInt -> Ptr () -> CInt -> IO (Ptr ())
-#bindings_function shmctl , CInt -> CInt -> Ptr Shmid_ds -> IO CInt
-#bindings_function shmdt , Ptr () -> IO CInt
-#bindings_function shmget , CKey -> CSize -> CInt -> IO CInt
-
-#include <sys/socket.h>
-
-type CSocklen = #bindings_equivalent_integer socklen_t
-
-type CSaFamily = #bindings_equivalent_integer sa_family_t
-
-#bindings_starttype struct sockaddr
-#bindings_field sa_family , CSaFamily
-#bindings_field sa_data , CString
-#bindings_stoptype _
-
-#bindings_starttype struct sockaddr_storage
-#bindings_field ss_family , CSaFamily
-#bindings_stoptype _
-
-#bindings_starttype struct msghdr
-#bindings_field msg_name , Ptr ()
-#bindings_field msg_namelen , CSocklen
-#bindings_field msg_iov , Ptr Iovec
-#bindings_field msg_iovlen , CInt
-#bindings_field msg_control , Ptr ()
-#bindings_field msg_controllen , CSocklen
-#bindings_field msg_flags , CInt
-#bindings_stoptype _
-
-#bindings_starttype struct cmsghdr
-#bindings_field cmsg_len , CSocklen
-#bindings_field cmsg_level , CInt
-#bindings_field cmsg_type , CInt
-#bindings_stoptype _
-
-#bindings_int SCM_RIGHTS
-
-#bindings_starttype struct linger
-#bindings_field l_onoff , CInt
-#bindings_field l_linger , CInt
-#bindings_stoptype
-
-#bindings_num SOCK_DGRAM
-#bindings_num SOCK_RAW
-#bindings_num SOCK_SEQPACKET
-#bindings_num SOCK_STREAM
-
-#bindings_int SOL_SOCKET
-
-#bindings_int SO_ACCEPTCONN
-#bindings_int SO_BROADCAST
-#bindings_int SO_DEBUG
-#bindings_int SO_DONTROUTE
-#bindings_int SO_ERROR
-#bindings_int SO_KEEPALIVE
-#bindings_int SO_LINGER
-#bindings_int SO_OOBINLINE
-#bindings_int SO_RCVBUF
-#bindings_int SO_RCVLOWAT
-#bindings_int SO_RCVTIMEO
-#bindings_int SO_REUSEADDR
-#bindings_int SO_SNDBUF
-#bindings_int SO_SNDLOWAT
-#bindings_int SO_SNDTIMEO
-#bindings_int SO_TYPE
-
-#bindings_int SOMAXCONN
-
-#bindings_int MSG_CTRUNC
-#bindings_int MSG_DONTROUTE
-#bindings_int MSG_EOR
-#bindings_int MSG_OOB
-#bindings_int MSG_NOSIGNAL
-#bindings_int MSG_PEEK
-#bindings_int MSG_TRUNC
-#bindings_int MSG_WAITALL
-
-#bindings_num AF_INET
-#bindings_num AF_INET6
-#bindings_num AF_UNIX
-#bindings_num AF_UNSPEC
-
-#bindings_num SHUT_RD
-#bindings_num SHUT_RDWR
-#bindings_num SHUT_WR
-
-#bindings_function accept , CInt -> Ptr Sockaddr -> \
- Ptr CSocklen -> IO CInt
-#bindings_function bind , CInt -> Ptr Sockaddr -> \
- CSocklen -> IO CInt
-#bindings_function connect , CInt -> Ptr Sockaddr -> \
- CSocklen -> IO CInt
-#bindings_function getpeername , CInt -> Ptr Sockaddr -> \
- Ptr CSocklen -> IO CInt
-#bindings_function getsockname , CInt -> Ptr Sockaddr -> \
- Ptr CSocklen -> IO CInt
-#bindings_function getsockopt , CInt -> CInt -> \
- CInt -> Ptr () -> Ptr CSocklen -> IO CInt
-#bindings_function listen , CInt -> CInt -> IO CInt
-#bindings_function recv , CInt -> Ptr () -> \
- CSize -> CInt -> IO CSSize
-#bindings_function recvfrom , CInt -> Ptr () -> \
- CSize -> CInt -> Ptr Sockaddr -> Ptr CSocklen -> IO CSSize
-#bindings_function recvmsg , CInt -> Ptr Msghdr -> \
- CInt -> IO CSSize
-#bindings_function send , CInt -> Ptr () -> \
- CSize -> CInt -> IO CSSize
-#bindings_function sendmsg , CInt -> Ptr Msghdr -> CInt -> IO CSSize
-#bindings_function sendto , CInt -> Ptr () -> \
- CSize -> CInt -> Ptr Sockaddr -> CSocklen -> IO CSSize
-#bindings_function setsockopt , CInt -> CInt -> \
- CInt -> Ptr () -> CSocklen -> IO CInt
-#bindings_function shutdown , CInt -> CInt -> IO CInt
-#bindings_function sockatmark , CInt -> IO CInt
-#bindings_function socket , CInt -> CInt -> CInt -> IO CInt
-#bindings_function socketpair , CInt -> CInt -> \
- CInt -> Ptr CInt -> IO CInt
-
-#include <sys/stat.h>
-
-#bindings_starttype struct stat
-#bindings_field st_dev , CDev
-#bindings_field st_ino , CIno
-#bindings_field st_mode , CMode
-#bindings_field st_nlink , CNlink
-#bindings_field st_uid , CUid
-#bindings_field st_gid , CGid
-#bindings_field st_rdev , CDev
-#bindings_field st_size , COff
-#bindings_field st_atim , Timespec
-#bindings_field st_mtim , Timespec
-#bindings_field st_ctim , Timespec
--- #bindings_field st_blksize , CBlksize
-#bindings_field st_blocks , CBlkcnt
-#bindings_stoptype _
-
-#bindings_integer_like S_IFMT , CMode
-#bindings_integer_like S_IFBLK , CMode
-#bindings_integer_like S_IFCHR , CMode
-#bindings_integer_like S_IFIFO , CMode
-#bindings_integer_like S_IFREG , CMode
-#bindings_integer_like S_IFDIR , CMode
-#bindings_integer_like S_IFLNK , CMode
-#bindings_integer_like S_IFSOCK , CMode
-
-#bindings_integer_like S_IRWXU , CMode
-#bindings_integer_like S_IRUSR , CMode
-#bindings_integer_like S_IWUSR , CMode
-#bindings_integer_like S_IXUSR , CMode
-#bindings_integer_like S_IRWXG , CMode
-#bindings_integer_like S_IRGRP , CMode
-#bindings_integer_like S_IWGRP , CMode
-#bindings_integer_like S_IXGRP , CMode
-#bindings_integer_like S_IRWXO , CMode
-#bindings_integer_like S_IROTH , CMode
-#bindings_integer_like S_IWOTH , CMode
-#bindings_integer_like S_IXOTH , CMode
-#bindings_integer_like S_ISUID , CMode
-#bindings_integer_like S_ISGID , CMode
-#bindings_integer_like S_ISVTX , CMode
-
--- #bindings_long UTIME_NOW
--- #bindings_long UTIME_OMIT
-
-#bindings_function chmod , CString -> CMode -> IO CInt
-#bindings_function fchmod , CInt -> CMode -> IO CInt
-#bindings_function fchmodat , CInt -> CString -> \
- CMode -> CInt -> IO CInt
-#bindings_function fstat , CInt -> Ptr Stat -> IO CInt
-#bindings_function fstatat , CInt -> CString -> \
- Ptr Stat -> CInt -> IO CInt
-#bindings_function futimens , CInt -> Ptr (Ptr Timespec) -> \
- IO CInt
-#bindings_function lstat , CString -> Ptr Stat -> IO CInt
-#bindings_function mkdir , CString -> CMode -> IO CInt
-#bindings_function mkdirat , CInt -> CString -> CMode -> IO CInt
-#bindings_function mkfifo , CString -> CMode -> IO CInt
-#bindings_function mkfifoat , CInt -> CString -> \
- CMode -> IO CInt
-#bindings_function mknod , CString -> CMode -> CDev -> IO CInt
-#bindings_function mknodat , CInt -> CString -> \
- CMode -> CDev -> IO CInt
-#bindings_function stat , CString -> Ptr Stat -> IO CInt
-#bindings_function umask , CMode -> IO CMode
-#bindings_function utimensat , CInt -> CString -> \
- Ptr (Ptr Timespec) -> CInt -> IO CInt
-
-#include <sys/statvfs.h>
-
-#bindings_starttype struct statvfs
-#bindings_field f_bsize , CULong
-#bindings_field f_frsize , CULong
-#bindings_field f_blocks , CFsblkcnt
-#bindings_field f_bfree , CFsblkcnt
-#bindings_field f_bavail , CFsblkcnt
-#bindings_field f_files , CFsfilcnt
-#bindings_field f_ffree , CFsfilcnt
-#bindings_field f_favail , CFsfilcnt
-#bindings_field f_fsid , CULong
-#bindings_field f_flag , CULong
-#bindings_field f_namemax , CULong
-#bindings_stoptype _
-
-#bindings_ulong ST_RDONLY
-#bindings_ulong ST_NOSUID
-
-#bindings_function fstatvfs , CInt -> Ptr Statvfs -> IO CInt
-#bindings_function statvfs , CString -> Ptr Statvfs -> IO CInt
-
-#include <sys/time.h>
-
-#bindings_function utimes , CString -> Ptr (Ptr Timeval) -> IO CInt
-
-#include <sys/times.h>
-
-#bindings_starttype struct tms
-#bindings_field tms_utime , CClock
-#bindings_field tms_stime , CClock
-#bindings_field tms_cutime , CClock
-#bindings_field tms_cstime , CClock
-#bindings_stoptype _
-
-#bindings_function times , Ptr Tms -> IO CClock
-
-#include <sys/types.h>
-
-type CBlkcnt = #bindings_equivalent_integer blkcnt_t
--- type CBlksize = #bindings_equivalent_integer blksize_t
-type CClockid = #bindings_equivalent_integer clockid_t
-type CDev = #bindings_equivalent_integer dev_t
-type CFsblkcnt = #bindings_equivalent_integer fsblkcnt_t
-type CFsfilcnt = #bindings_equivalent_integer fsfilcnt_t
-type CGid = #bindings_equivalent_integer gid_t
-type CId = #bindings_equivalent_integer id_t
-type CIno = #bindings_equivalent_integer ino_t
-type CKey = #bindings_equivalent_integer key_t
-type CMode = #bindings_equivalent_integer mode_t
-type CNlink = #bindings_equivalent_integer nlink_t
-type COff = #bindings_equivalent_integer off_t
-type CPid = #bindings_equivalent_integer pid_t
-type CSSize = #bindings_equivalent_integer ssize_t
-type CSuseconds = #bindings_equivalent_integer suseconds_t
-type CTimer = #bindings_equivalent_integer timer_t
-type CUid = #bindings_equivalent_integer uid_t
-
-#bindings_starttype pthread_attr_t
-#bindings_stoptype _
-#bindings_starttype pthread_barrier_t
-#bindings_stoptype _
-#bindings_starttype pthread_barrierattr_t
-#bindings_stoptype _
-#bindings_starttype pthread_cond_t
-#bindings_stoptype _
-#bindings_starttype pthread_condattr_t
-#bindings_stoptype _
-#bindings_starttype pthread_key_t
-#bindings_stoptype _
-#bindings_starttype pthread_mutex_t
-#bindings_stoptype _
-#bindings_starttype pthread_mutexattr_t
-#bindings_stoptype _
-#bindings_starttype pthread_once_t
-#bindings_stoptype _
-#bindings_starttype pthread_rwlock_t
-#bindings_stoptype _
-#bindings_starttype pthread_rwlockattr_t
-#bindings_stoptype _
-#bindings_starttype pthread_spinlock_t
-#bindings_stoptype _
-#bindings_starttype pthread_t
-#bindings_stoptype _
-
-#include <sys/uio.h>
-
-#bindings_starttype struct iovec
-#bindings_field iov_base , Ptr ()
-#bindings_field iov_len , CSize
-#bindings_stoptype _
-
-#bindings_function readv , CInt -> Ptr Iovec -> CInt -> IO CSSize
-#bindings_function writev , CInt -> Ptr Iovec -> CInt -> IO CSSize
-
-#include <sys/un.h>
-
-#bindings_starttype struct sockaddr_un
-#bindings_field sun_family , CSaFamily
-#bindings_field sun_path , CString
-#bindings_stoptype _
-
-#include <sys/sem.h>
-
-#bindings_short SEM_UNDO
-
-#bindings_int GETNCNT
-#bindings_int GETPID
-#bindings_int GETVAL
-#bindings_int GETALL
-#bindings_int GETZCNT
-#bindings_int SETVAL
-#bindings_int SETALL
-
-#bindings_starttype struct semid_ds
-#bindings_field sem_perm , Ipc_perm
-#bindings_field sem_nsems , CUShort
-#bindings_field sem_otime , CTime
-#bindings_field sem_ctime , CTime
-#bindings_stoptype _
-
-#bindings_starttype struct sembuf
-#bindings_field sem_num , CUShort
-#bindings_field sem_op , CShort
-#bindings_field sem_flg , CShort
-#bindings_stoptype _
-
-#bindings_function semget , CKey -> CInt -> CInt -> IO CInt
-#bindings_function semop , CInt -> Ptr Sembuf -> CSize -> IO CInt
-
-#include <sys/utsname.h>
-
-#bindings_starttype struct utsname
-#bindings_field sysname , CString
-#bindings_field nodename , CString
-#bindings_stoptype _
-
-#bindings_function uname , Ptr Utsname -> IO CInt
-
-#include <sys/wait.h>
-
-#bindings_int WCONTINUED
-#bindings_int WNOHANG
-#bindings_int WUNTRACED
-
-#bindings_int WEXITED
-#bindings_int WNOWAIT
-#bindings_int WSTOPPED
-
-type CIdtype = #bindings_equivalent_integer idtype_t
-
-#bindings_integer_like P_ALL , CIdtype
-#bindings_integer_like P_PGID , CIdtype
-#bindings_integer_like P_PID , CIdtype
-
-#bindings_function wait , Ptr CInt -> IO CPid
-#bindings_function waitid , CIdtype -> CId -> Ptr Siginfo_t -> \
- CInt -> IO CInt
-#bindings_function waitpid , CPid -> Ptr CInt -> CInt -> \
- IO CPid
-
-#include <syslog.h>
-
-#bindings_int LOG_PID
-#bindings_int LOG_CONS
-#bindings_int LOG_NDELAY
-#bindings_int LOG_ODELAY
-#bindings_int LOG_NOWAIT
-#bindings_int LOG_KERN
-#bindings_int LOG_USER
-#bindings_int LOG_MAIL
-#bindings_int LOG_NEWS
-#bindings_int LOG_UUCP
-#bindings_int LOG_DAEMON
-#bindings_int LOG_AUTH
-#bindings_int LOG_CRON
-#bindings_int LOG_LPR
-#bindings_int LOG_LOCAL0
-#bindings_int LOG_LOCAL1
-#bindings_int LOG_LOCAL2
-#bindings_int LOG_LOCAL3
-#bindings_int LOG_LOCAL4
-#bindings_int LOG_LOCAL5
-#bindings_int LOG_LOCAL6
-#bindings_int LOG_LOCAL7
-#bindings_int LOG_EMERG
-#bindings_int LOG_ALERT
-#bindings_int LOG_CRIT
-#bindings_int LOG_ERR
-#bindings_int LOG_WARNING
-#bindings_int LOG_NOTICE
-#bindings_int LOG_INFO
-#bindings_int LOG_DEBUG
-
-#bindings_function closelog , IO ()
-#bindings_function openlog , CString -> CInt -> CInt -> IO ()
-#bindings_function setlogmask , CInt -> IO CInt
-
-#include <tar.h>
-
-#bindings_ptr TMAGIC , CString
-#bindings_num TMAGLEN
-#bindings_ptr TVERSION , CString
-#bindings_num TVERSLEN
-
-#bindings_char REGTYPE
-#bindings_char AREGTYPE
-#bindings_char LNKTYPE
-#bindings_char SYMTYPE
-#bindings_char CHRTYPE
-#bindings_char BLKTYPE
-#bindings_char DIRTYPE
-#bindings_char FIFOTYPE
-#bindings_char CONTTYPE
-
-#bindings_num TSUID
-#bindings_num TSGID
-#bindings_num TSVTX
-#bindings_num TUREAD
-#bindings_num TUWRITE
-#bindings_num TUEXEC
-#bindings_num TGREAD
-#bindings_num TGWRITE
-#bindings_num TGEXEC
-#bindings_num TOREAD
-#bindings_num TOWRITE
-#bindings_num TOEXEC
-
-#include <termios.h>
-
-type CCc = #bindings_equivalent_integer cc_t
-type CSpeed = #bindings_equivalent_integer speed_t
-type CTcflag = #bindings_equivalent_integer tcflag_t
-
-#bindings_starttype struct termios
-#bindings_field c_iflag , CTcflag
-#bindings_field c_oflag , CTcflag
-#bindings_field c_cflag , CTcflag
-#bindings_field c_lflag , CTcflag
-#bindings_field c_cc , Ptr CCc
-#bindings_stoptype _
-
-#bindings_num NCCS
-
-#bindings_num VEOF
-#bindings_num VEOL
-#bindings_num VERASE
-#bindings_num VINTR
-#bindings_num VKILL
-#bindings_num VMIN
-#bindings_num VQUIT
-#bindings_num VSTART
-#bindings_num VSTOP
-#bindings_num VSUSP
-#bindings_num VTIME
-
-#bindings_integer_like BRKINT , CTcflag
-#bindings_integer_like ICRNL , CTcflag
-#bindings_integer_like IGNBRK , CTcflag
-#bindings_integer_like IGNCR , CTcflag
-#bindings_integer_like IGNPAR , CTcflag
-#bindings_integer_like INLCR , CTcflag
-#bindings_integer_like INPCK , CTcflag
-#bindings_integer_like ISTRIP , CTcflag
-#bindings_integer_like IXANY , CTcflag
-#bindings_integer_like IXOFF , CTcflag
-#bindings_integer_like IXON , CTcflag
-#bindings_integer_like PARMRK , CTcflag
-#bindings_integer_like OPOST , CTcflag
-#bindings_integer_like ONLCR , CTcflag
-#bindings_integer_like OCRNL , CTcflag
-#bindings_integer_like ONOCR , CTcflag
-#bindings_integer_like ONLRET , CTcflag
-#bindings_integer_like OFDEL , CTcflag
-#bindings_integer_like OFILL , CTcflag
-#bindings_integer_like NLDLY , CTcflag
-#bindings_integer_like NL0 , CTcflag
-#bindings_integer_like NL1 , CTcflag
-#bindings_integer_like CRDLY , CTcflag
-#bindings_integer_like CR0 , CTcflag
-#bindings_integer_like CR1 , CTcflag
-#bindings_integer_like CR2 , CTcflag
-#bindings_integer_like CR3 , CTcflag
-#bindings_integer_like TABDLY , CTcflag
-#bindings_integer_like TAB0 , CTcflag
-#bindings_integer_like TAB1 , CTcflag
-#bindings_integer_like TAB2 , CTcflag
-#bindings_integer_like TAB3 , CTcflag
-#bindings_integer_like BSDLY , CTcflag
-#bindings_integer_like BS0 , CTcflag
-#bindings_integer_like BS1 , CTcflag
-#bindings_integer_like VTDLY , CTcflag
-#bindings_integer_like VT0 , CTcflag
-#bindings_integer_like VT1 , CTcflag
-#bindings_integer_like FFDLY , CTcflag
-#bindings_integer_like FF0 , CTcflag
-#bindings_integer_like FF1 , CTcflag
-
-#bindings_integer_like B0 , CSpeed
-#bindings_integer_like B50 , CSpeed
-#bindings_integer_like B75 , CSpeed
-#bindings_integer_like B110 , CSpeed
-#bindings_integer_like B134 , CSpeed
-#bindings_integer_like B150 , CSpeed
-#bindings_integer_like B200 , CSpeed
-#bindings_integer_like B300 , CSpeed
-#bindings_integer_like B600 , CSpeed
-#bindings_integer_like B1200 , CSpeed
-#bindings_integer_like B1800 , CSpeed
-#bindings_integer_like B2400 , CSpeed
-#bindings_integer_like B4800 , CSpeed
-#bindings_integer_like B9600 , CSpeed
-#bindings_integer_like B19200 , CSpeed
-#bindings_integer_like B38400 , CSpeed
-
-#bindings_integer_like CSIZE , CTcflag
-#bindings_integer_like CS5 , CTcflag
-#bindings_integer_like CS6 , CTcflag
-#bindings_integer_like CS7 , CTcflag
-#bindings_integer_like CS8 , CTcflag
-#bindings_integer_like CSTOPB , CTcflag
-#bindings_integer_like CREAD , CTcflag
-#bindings_integer_like PARENB , CTcflag
-#bindings_integer_like PARODD , CTcflag
-#bindings_integer_like HUPCL , CTcflag
-#bindings_integer_like CLOCAL , CTcflag
-#bindings_integer_like ECHO , CTcflag
-#bindings_integer_like ECHOE , CTcflag
-#bindings_integer_like ECHOK , CTcflag
-#bindings_integer_like ECHONL , CTcflag
-#bindings_integer_like ICANON , CTcflag
-#bindings_integer_like IEXTEN , CTcflag
-#bindings_integer_like ISIG , CTcflag
-#bindings_integer_like NOFLSH , CTcflag
-#bindings_integer_like TOSTOP , CTcflag
-
-#bindings_int TCSANOW
-#bindings_int TCSADRAIN
-#bindings_int TCSAFLUSH
-#bindings_int TCIFLUSH
-#bindings_int TCIOFLUSH
-#bindings_int TCOFLUSH
-#bindings_int TCIOFF
-#bindings_int TCION
-#bindings_int TCOOFF
-#bindings_int TCOON
-
-#bindings_function cfgetispeed , Ptr Termios -> IO CSpeed
-#bindings_function cfgetospeed , Ptr Termios -> IO CSpeed
-#bindings_function cfsetispeed , Ptr Termios -> CSpeed -> IO CInt
-#bindings_function cfsetospeed , Ptr Termios -> CSpeed -> IO CInt
-#bindings_function tcdrain , CInt -> IO CInt
-#bindings_function tcflow , CInt -> CInt -> IO CInt
-#bindings_function tcflush , CInt -> CInt -> IO CInt
-#bindings_function tcgetattr , CInt -> Ptr Termios -> IO CInt
-#bindings_function tcgetsid , CInt -> IO CPid
-#bindings_function tcsendbreak , CInt -> CInt -> IO CInt
-#bindings_function tcsetattr , CInt -> CInt -> Ptr Termios -> IO CInt
-
-#include <unistd.h>
-
-#bindings_int _POSIX_ASYNC_IO
-
-#bindings_int F_OK
-#bindings_int R_OK
-#bindings_int W_OK
-#bindings_int X_OK
-
-#bindings_int F_LOCK
-#bindings_int F_TEST
-#bindings_int F_TLOCK
-#bindings_int F_ULOCK
-
-#bindings_int _PC_2_SYMLINKS
-#bindings_int _PC_ALLOC_SIZE_MIN
-#bindings_int _PC_ASYNC_IO
-#bindings_int _PC_CHOWN_RESTRICTED
-#bindings_int _PC_FILESIZEBITS
-#bindings_int _PC_LINK_MAX
-#bindings_int _PC_MAX_CANON
-#bindings_int _PC_MAX_INPUT
-#bindings_int _PC_NAME_MAX
-#bindings_int _PC_NO_TRUNC
-#bindings_int _PC_PATH_MAX
-#bindings_int _PC_PIPE_BUF
-#bindings_int _PC_PRIO_IO
-#bindings_int _PC_REC_INCR_XFER_SIZE
-#bindings_int _PC_REC_MAX_XFER_SIZE
-#bindings_int _PC_REC_MIN_XFER_SIZE
-#bindings_int _PC_REC_XFER_ALIGN
-#bindings_int _PC_SYMLINK_MAX
-#bindings_int _PC_SYNC_IO
-#bindings_int _PC_VDISABLE
-
-#bindings_int _SC_2_C_BIND
-#bindings_int _SC_2_C_DEV
-#bindings_int _SC_2_CHAR_TERM
-#bindings_int _SC_2_FORT_DEV
-#bindings_int _SC_2_FORT_RUN
-#bindings_int _SC_2_LOCALEDEF
-#bindings_int _SC_2_PBS
-#bindings_int _SC_2_PBS_ACCOUNTING
-#bindings_int _SC_2_PBS_CHECKPOINT
-#bindings_int _SC_2_PBS_LOCATE
-#bindings_int _SC_2_PBS_MESSAGE
-#bindings_int _SC_2_PBS_TRACK
-#bindings_int _SC_2_SW_DEV
-#bindings_int _SC_2_UPE
-#bindings_int _SC_2_VERSION
-#bindings_int _SC_ADVISORY_INFO
-#bindings_int _SC_AIO_LISTIO_MAX
-#bindings_int _SC_AIO_MAX
-#bindings_int _SC_AIO_PRIO_DELTA_MAX
-#bindings_int _SC_ARG_MAX
-#bindings_int _SC_ASYNCHRONOUS_IO
-#bindings_int _SC_ATEXIT_MAX
-#bindings_int _SC_BARRIERS
-#bindings_int _SC_BC_BASE_MAX
-#bindings_int _SC_BC_DIM_MAX
-#bindings_int _SC_BC_SCALE_MAX
-#bindings_int _SC_BC_STRING_MAX
-#bindings_int _SC_CHILD_MAX
-#bindings_int _SC_CLK_TCK
-#bindings_int _SC_CLOCK_SELECTION
-#bindings_int _SC_COLL_WEIGHTS_MAX
-#bindings_int _SC_CPUTIME
-#bindings_int _SC_DELAYTIMER_MAX
-#bindings_int _SC_EXPR_NEST_MAX
-#bindings_int _SC_FSYNC
-#bindings_int _SC_GETGR_R_SIZE_MAX
-#bindings_int _SC_GETPW_R_SIZE_MAX
-#bindings_int _SC_HOST_NAME_MAX
-#bindings_int _SC_IOV_MAX
-#bindings_int _SC_IPV6
-#bindings_int _SC_JOB_CONTROL
-#bindings_int _SC_LINE_MAX
-#bindings_int _SC_LOGIN_NAME_MAX
-#bindings_int _SC_MAPPED_FILES
-#bindings_int _SC_MEMLOCK
-#bindings_int _SC_MEMLOCK_RANGE
-#bindings_int _SC_MEMORY_PROTECTION
-#bindings_int _SC_MESSAGE_PASSING
-#bindings_int _SC_MONOTONIC_CLOCK
-#bindings_int _SC_MQ_OPEN_MAX
-#bindings_int _SC_MQ_PRIO_MAX
-#bindings_int _SC_NGROUPS_MAX
-#bindings_int _SC_OPEN_MAX
-#bindings_int _SC_PAGE_SIZE
-#bindings_int _SC_PAGESIZE
-#bindings_int _SC_PRIORITIZED_IO
-#bindings_int _SC_PRIORITY_SCHEDULING
-#bindings_int _SC_RAW_SOCKETS
-#bindings_int _SC_RE_DUP_MAX
-#bindings_int _SC_READER_WRITER_LOCKS
-#bindings_int _SC_REALTIME_SIGNALS
-#bindings_int _SC_REGEXP
-#bindings_int _SC_RTSIG_MAX
-#bindings_int _SC_SAVED_IDS
-#bindings_int _SC_SEM_NSEMS_MAX
-#bindings_int _SC_SEM_VALUE_MAX
-#bindings_int _SC_SEMAPHORES
-#bindings_int _SC_SHARED_MEMORY_OBJECTS
-#bindings_int _SC_SHELL
-#bindings_int _SC_SIGQUEUE_MAX
-#bindings_int _SC_SPAWN
-#bindings_int _SC_SPIN_LOCKS
-#bindings_int _SC_SPORADIC_SERVER
-#bindings_int _SC_STREAM_MAX
-#bindings_int _SC_SYMLOOP_MAX
-#bindings_int _SC_SYNCHRONIZED_IO
-#bindings_int _SC_THREAD_ATTR_STACKADDR
-#bindings_int _SC_THREAD_ATTR_STACKSIZE
-#bindings_int _SC_THREAD_CPUTIME
-#bindings_int _SC_THREAD_DESTRUCTOR_ITERATIONS
-#bindings_int _SC_THREAD_KEYS_MAX
-#bindings_int _SC_THREAD_PRIO_INHERIT
-#bindings_int _SC_THREAD_PRIO_PROTECT
-#bindings_int _SC_THREAD_PRIORITY_SCHEDULING
-#bindings_int _SC_THREAD_PROCESS_SHARED
-#bindings_int _SC_THREAD_SAFE_FUNCTIONS
-#bindings_int _SC_THREAD_SPORADIC_SERVER
-#bindings_int _SC_THREAD_STACK_MIN
-#bindings_int _SC_THREAD_THREADS_MAX
-#bindings_int _SC_THREADS
-#bindings_int _SC_TIMEOUTS
-#bindings_int _SC_TIMER_MAX
-#bindings_int _SC_TIMERS
-#bindings_int _SC_TRACE
-#bindings_int _SC_TRACE_EVENT_FILTER
-#bindings_int _SC_TRACE_INHERIT
-#bindings_int _SC_TRACE_LOG
-#bindings_int _SC_TTY_NAME_MAX
-#bindings_int _SC_TYPED_MEMORY_OBJECTS
-#bindings_int _SC_TZNAME_MAX
-#bindings_int _SC_VERSION
-#bindings_int _SC_XOPEN_CRYPT
-#bindings_int _SC_XOPEN_ENH_I18N
-#bindings_int _SC_XOPEN_REALTIME
-#bindings_int _SC_XOPEN_REALTIME_THREADS
-#bindings_int _SC_XOPEN_SHM
-#bindings_int _SC_XOPEN_UNIX
-#bindings_int _SC_XOPEN_VERSION
-
-#bindings_num STDERR_FILENO
-#bindings_num STDIN_FILENO
-#bindings_num STDOUT_FILENO
-
-#bindings_function access , CString -> CInt -> IO CInt
-#bindings_function alarm , CUInt -> IO CUInt
-#bindings_function chdir , CString -> IO CInt
-#bindings_function chown , CString -> CUid -> CGid -> IO CInt
-#bindings_function close , CInt -> IO CInt
-#bindings_function confstr , CInt -> CString -> CSize -> IO CSize
-#bindings_function dup , CInt -> IO CInt
-#bindings_function dup2 , CInt -> CInt -> IO CInt
-#bindings_function _exit , CInt -> IO ()
-#bindings_function execv , CString -> Ptr CString -> IO CInt
-#bindings_function execve , CString -> Ptr CString -> \
- Ptr CString -> IO CInt
-#bindings_function execvp , CString -> Ptr CString -> IO CInt
-#bindings_function faccessat , CInt -> CString -> \
- CInt -> CInt -> IO CInt
-#bindings_function fchdir , CInt -> IO CInt
-#bindings_function fchown , CInt -> CUid -> CGid -> IO CInt
-#bindings_function fchownat , CInt -> CString -> \
- CUid -> CGid -> CInt -> IO CInt
-#bindings_function fdatasync , CInt -> IO CInt
-#bindings_function fexecve , CInt -> Ptr CString -> \
- Ptr CString -> IO CInt
-#bindings_function fork , IO CPid
-#bindings_function fpathconf , CInt -> CInt -> IO CLong
-#bindings_function fsync , CInt -> IO CInt
-#bindings_function ftruncate , CInt -> COff -> IO CInt
-#bindings_function getcwd , CString -> CSize -> IO CString
-#bindings_function getegid , IO CGid
-#bindings_function geteuid , IO CUid
-#bindings_function getgid , IO CGid
-#bindings_function getgroups , CInt -> Ptr CGid -> IO CInt
-#bindings_function gethostid , IO CLong
-#bindings_function gethostname , CString -> CSize -> IO CInt
-#bindings_function getlogin , IO CString
-#bindings_function getlogin_r , CString -> CSize -> IO CInt
-#bindings_function getopt , CInt -> Ptr CString -> \
- CString -> IO CInt
-#bindings_function getpgid , CPid -> IO CPid
-#bindings_function getpgrp , IO CPid
-#bindings_function getpid , IO CPid
-#bindings_function getppid , IO CPid
-#bindings_function getsid , CPid -> IO CPid
-#bindings_function getuid , IO CUid
-#bindings_function isatty , CInt -> IO CInt
-#bindings_function lchown , CString -> CUid -> CGid -> IO CInt
-#bindings_function link , CString -> CString -> IO CInt
-#bindings_function linkat , CInt -> CString -> \
- CInt -> CString -> CInt -> IO CInt
-#bindings_function lockf , CInt -> CInt -> COff -> IO CInt
-#bindings_function lseek , CInt -> COff -> CInt -> IO COff
-#bindings_function nice , CInt -> IO CInt
-#bindings_function pathconf , CString -> CInt -> IO CLong
-#bindings_function pause , IO CInt
-#bindings_function pipe , Ptr CInt -> IO CInt
-#bindings_function pread , CInt -> Ptr () -> \
- CSize -> COff -> IO CSSize
-#bindings_function pwrite , CInt -> Ptr () -> \
- CSize -> COff -> IO CSSize
-#bindings_function read , CInt -> Ptr () -> CSize -> IO CSSize
-#bindings_function readlink , CString -> CString -> \
- CSize -> IO CSSize
-#bindings_function readlinkat , CInt -> CString -> \
- CString -> CSize -> IO CSSize
-#bindings_function rmdir , CString -> IO CInt
-#bindings_function setegid , CGid -> IO CInt
-#bindings_function seteuid , CUid -> IO CInt
-#bindings_function setgid , CGid -> IO CInt
-#bindings_function setpgid , CPid -> CPid -> IO CInt
-#bindings_function setregid , CGid -> CGid -> IO CInt
-#bindings_function setreuid , CUid -> CUid -> IO CInt
-#bindings_function setsid , IO CPid
-#bindings_function setuid , CUid -> IO CInt
-#bindings_function sleep , CUInt -> IO CUInt
-#bindings_function swab , Ptr () -> Ptr () -> CSSize -> IO ()
-#bindings_function symlink , CString -> CString -> IO CInt
-#bindings_function symlinkat , CString -> CInt -> CString -> IO CInt
-#bindings_function sync , IO ()
-#bindings_function sysconf , CInt -> IO CULong
-#bindings_function tcgetpgrp , CInt -> IO CPid
-#bindings_function tcsetpgrp , CInt -> CPid -> IO CInt
-#bindings_function truncate , CString -> COff -> IO CInt
-#bindings_function ttyname , CInt -> IO CString
-#bindings_function ttyname_r , CInt -> CString -> CSize -> IO CInt
-#bindings_function unlink , CString -> IO CInt
-#bindings_function unlinkat , CInt -> CString -> CInt -> IO CInt
-#bindings_function write , CInt -> Ptr () -> CSize -> IO CSSize
-
-#bindings_globalvar optarg , CString
-#bindings_globalvar opterr , CInt
-#bindings_globalvar optind , CInt
-#bindings_globalvar optopt , CInt
-
-#include <utmpx.h>
-
-#bindings_starttype struct utmpx
-#bindings_field ut_user , CChar
-#bindings_field ut_id , CString
-#bindings_field ut_line , CChar
-#bindings_field ut_pid , CPid
-#bindings_field ut_type , CShort
-#bindings_field ut_tv , Timeval
-#bindings_stoptype _
-
-#bindings_short BOOT_TIME
-#bindings_short OLD_TIME
-#bindings_short NEW_TIME
-#bindings_short USER_PROCESS
-#bindings_short INIT_PROCESS
-#bindings_short LOGIN_PROCESS
-#bindings_short DEAD_PROCESS
-
-#bindings_function endutxent , IO ()
-#bindings_function getutxent , IO (Ptr Utmpx)
-#bindings_function getutxid , Ptr Utmpx -> IO (Ptr Utmpx)
-#bindings_function getutxline , Ptr Utmpx -> IO (Ptr Utmpx)
-#bindings_function pututxline , Ptr Utmpx -> IO (Ptr Utmpx)
-#bindings_function setutxent , IO ()
-
-#include <wchar.h>
-
-#bindings_function mbsnrtowcs , Ptr CWchar -> Ptr CString -> \
- CSize -> CSize -> Ptr Mbstate_t -> IO CSize
-#bindings_function open_wmemstream , Ptr (Ptr CWchar) -> \
- Ptr CSize -> IO (Ptr CFile)
-#bindings_function wcpcpy , Ptr CWchar -> \
- Ptr CWchar -> IO (Ptr CWchar)
-#bindings_function wcpncpy , Ptr CWchar -> \
- Ptr CWchar -> CSize -> IO CWchar
-#bindings_function wcscasecmp , Ptr CWchar -> \
- Ptr CWchar -> IO CInt
-#bindings_function wcsdup , Ptr CWchar -> IO CWchar
-#bindings_function wcsncasecmp , Ptr CWchar -> \
- Ptr CWchar -> CSize -> IO CInt
-#bindings_function wcsnlen , Ptr CWchar -> CSize -> IO CSize
-#bindings_function wcsnrtombs , CString -> \
- Ptr (Ptr CWchar) -> CSize -> CSize -> Ptr Mbstate_t -> IO CSize
-#bindings_function wcswidth , Ptr CWchar -> CSize -> IO CInt
-
-#include <wordexp.h>
-
-#bindings_starttype wordexp_t
-#bindings_field we_wordc , CSize
-#bindings_field we_wordv , Ptr CString
-#bindings_field we_offs , CSize
-#bindings_stoptype _
-
-#bindings_int WRDE_APPEND
-#bindings_int WRDE_DOOFFS
-#bindings_int WRDE_NOCMD
-#bindings_int WRDE_REUSE
-#bindings_int WRDE_SHOWERR
-#bindings_int WRDE_UNDEF
-
-#bindings_int WRDE_BADCHAR
-#bindings_int WRDE_BADVAL
-#bindings_int WRDE_CMDSUB
-#bindings_int WRDE_NOSPACE
-#bindings_int WRDE_SYNTAX
-
-#bindings_function wordexp , CString -> \
- Ptr Wordexp_t -> CInt -> IO CInt
-#bindings_function wordfree , Ptr Wordexp_t -> IO ()
+import Bindings.Posix.Errno
+import Bindings.Posix.Signal
+import Bindings.Posix.Sys.Select
+import Bindings.Posix.Sys.Types
+import Bindings.Posix.Sys.Utsname
+import Bindings.Posix.Time
+import Bindings.Posix.Unistd
diff --git a/src/Bindings/Posix/Errno.hsc b/src/Bindings/Posix/Errno.hsc
new file mode 100644
index 0000000..3f5ee5d
--- /dev/null
+++ b/src/Bindings/Posix/Errno.hsc
@@ -0,0 +1,86 @@
+#include <bindings.macros.h>
+#include <errno.h>
+
+-- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html>
+
+module Bindings.Posix.Errno where
+import Foreign
+import Foreign.C
+
+#num E2BIG
+#num EACCES
+#num EADDRINUSE
+#num EADDRNOTAVAIL
+#num EAFNOSUPPORT
+#num EAGAIN
+#num EALREADY
+#num EBADF
+#num EBADMSG
+#num EBUSY
+#num ECANCELED
+#num ECHILD
+#num ECONNABORTED
+#num ECONNREFUSED
+#num ECONNRESET
+#num EDEADLK
+#num EDESTADDRREQ
+#num EDOM
+#num EDQUOT
+#num EEXIST
+#num EFAULT
+#num EFBIG
+#num EHOSTUNREACH
+#num EIDRM
+#num EILSEQ
+#num EINPROGRESS
+#num EINTR
+#num EINVAL
+#num EIO
+#num EISCONN
+#num EISDIR
+#num ELOOP
+#num EMFILE
+#num EMLINK
+#num EMSGSIZE
+#num EMULTIHOP
+#num ENAMETOOLONG
+#num ENETDOWN
+#num ENETRESET
+#num ENETUNREACH
+#num ENFILE
+#num ENOBUFS
+#num ENODEV
+#num ENOENT
+#num ENOEXEC
+#num ENOLCK
+#num ENOLINK
+#num ENOMEM
+#num ENOMSG
+#num ENOPROTOOPT
+#num ENOSPC
+#num ENOSYS
+#num ENOTCONN
+#num ENOTDIR
+#num ENOTEMPTY
+#num ENOTRECOVERABLE
+#num ENOTSOCK
+#num ENOTSUP
+#num ENOTTY
+#num ENXIO
+#num EOPNOTSUPP
+#num EOVERFLOW
+#num EOWNERDEAD
+#num EPERM
+#num EPIPE
+#num EPROTO
+#num EPROTONOSUPPORT
+#num EPROTOTYPE
+#num ERANGE
+#num EROFS
+#num ESPIPE
+#num ESRCH
+#num ESTALE
+#num ETIMEDOUT
+#num ETXTBSY
+#num EWOULDBLOCK
+#num EXDEV
diff --git a/src/Bindings/Posix/Signal.hsc b/src/Bindings/Posix/Signal.hsc
new file mode 100644
index 0000000..4741f9c
--- /dev/null
+++ b/src/Bindings/Posix/Signal.hsc
@@ -0,0 +1,12 @@
+#include <bindings.macros.h>
+#include <signal.h>
+
+-- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html>
+
+module Bindings.Posix.Signal where
+import Foreign
+import Foreign.C
+
+#starttype sigset_t
+#stoptype
+
diff --git a/src/Bindings/Posix/Sys/Select.hsc b/src/Bindings/Posix/Sys/Select.hsc
new file mode 100644
index 0000000..ac9e039
--- /dev/null
+++ b/src/Bindings/Posix/Sys/Select.hsc
@@ -0,0 +1,32 @@
+#include <bindings.macros.h>
+#include <sys/select.h>
+
+-- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_select.h.html>
+
+module Bindings.Posix.Sys.Select where
+import Foreign
+import Foreign.C
+import Bindings.Posix.Sys.Types
+import Bindings.Posix.Time
+import Bindings.Posix.Signal
+
+#starttype struct timeval
+#field tv_sec , CTime
+#field tv_usec , <suseconds_t>
+#stoptype
+
+#starttype fd_set
+#stoptype
+
+#num FD_SETSIZE
+
+#cinline FD_CLR , CInt -> Ptr <fd_set> -> IO ()
+#cinline FD_ISSET , CInt -> Ptr <fd_set> -> IO CInt
+#cinline FD_SET , CInt -> Ptr <fd_set> -> IO ()
+#cinline FD_ZERO , Ptr <fd_set> -> IO ()
+
+#ccall pselect , CInt -> Ptr <fd_set> -> Ptr <fd_set> -> \
+ Ptr <fd_set> -> Ptr <timespec> -> Ptr <sigset_t> -> IO CInt
+#ccall select , CInt -> Ptr <fd_set> -> Ptr <fd_set> -> \
+ Ptr <fd_set> -> Ptr <timeval> -> IO CInt
+
diff --git a/src/Bindings/Posix/Sys/Types.hsc b/src/Bindings/Posix/Sys/Types.hsc
new file mode 100644
index 0000000..4d66bc0
--- /dev/null
+++ b/src/Bindings/Posix/Sys/Types.hsc
@@ -0,0 +1,67 @@
+#include <bindings.macros.h>
+#include <sys/types.h>
+
+-- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html>
+
+module Bindings.Posix.Sys.Types where
+import Foreign
+import Foreign.C
+
+#integral_t blkcnt_t
+#integral_t blksize_t
+#integral_t clockid_t
+#integral_t dev_t
+#integral_t gid_t
+#integral_t id_t
+#integral_t ino_t
+#integral_t mode_t
+#integral_t nlink_t
+#integral_t off_t
+#integral_t pid_t
+
+#starttype pthread_attr_t
+#stoptype
+
+#starttype pthread_barrier_t
+#stoptype
+
+#starttype pthread_barrierattr_t
+#stoptype
+
+#starttype pthread_cond_t
+#stoptype
+
+#starttype pthread_condattr_t
+#stoptype
+
+#starttype pthread_key_t
+#stoptype
+
+#starttype pthread_mutex_t
+#stoptype
+
+#starttype pthread_mutexattr_t
+#stoptype
+
+#starttype pthread_once_t
+#stoptype
+
+#starttype pthread_rwlock_t
+#stoptype
+
+#starttype pthread_rwlockattr_t
+#stoptype
+
+#starttype pthread_spinlock_t
+#stoptype
+
+#starttype pthread_t
+#stoptype
+
+#integral_t size_t
+#integral_t ssize_t
+#integral_t suseconds_t
+#integral_t time_t
+#integral_t timer_t
+#integral_t uid_t
+
diff --git a/src/Bindings/Posix/Sys/Utsname.hsc b/src/Bindings/Posix/Sys/Utsname.hsc
new file mode 100644
index 0000000..4b15799
--- /dev/null
+++ b/src/Bindings/Posix/Sys/Utsname.hsc
@@ -0,0 +1,18 @@
+#include <bindings.macros.h>
+#include <sys/utsname.h>
+
+-- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/sys_utsname.h.html>
+
+module Bindings.Posix.Sys.Utsname where
+import Foreign
+import Foreign.C
+
+#starttype struct utsname
+#field sysname , CString
+#field nodename , CString
+#field release , CString
+#field version , CString
+#field machine , CString
+#stoptype
+
+#ccall uname , Ptr <utsname> -> IO CInt
diff --git a/src/Bindings/Posix/Time.hsc b/src/Bindings/Posix/Time.hsc
new file mode 100644
index 0000000..8aa908e
--- /dev/null
+++ b/src/Bindings/Posix/Time.hsc
@@ -0,0 +1,16 @@
+#include <bindings.macros.h>
+#include <time.h>
+
+-- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html>
+
+module Bindings.Posix.Time where
+import Foreign
+import Foreign.C
+
+#starttype struct timespec
+#field tv_sec , CTime
+#field tv_nsec , CLong
+#stoptype
+
+#globalvar tzname , Ptr CString
+
diff --git a/src/Bindings/Posix/Unistd.hsc b/src/Bindings/Posix/Unistd.hsc
new file mode 100644
index 0000000..9a5bf1a
--- /dev/null
+++ b/src/Bindings/Posix/Unistd.hsc
@@ -0,0 +1,249 @@
+#include <bindings.macros.h>
+#include <unistd.h>
+
+-- | <http://www.opengroup.org/onlinepubs/9699919799/basedefs/unistd.h.html>
+
+module Bindings.Posix.Unistd where
+import Foreign
+import Foreign.C
+import Bindings.Posix.Sys.Types
+
+#num _POSIX_VERSION
+#num _POSIX2_VERSION
+#num _POSIX_ASYNCHRONOUS_IO
+#num _POSIX_BARRIERS
+#num _POSIX_CHOWN_RESTRICTED
+#num _POSIX_CLOCK_SELECTION
+#num _POSIX_IPV6
+#num _POSIX_JOB_CONTROL
+#num _POSIX_MAPPED_FILES
+#num _POSIX_MEMORY_PROTECTION
+#num _POSIX_NO_TRUNC
+#num _POSIX_READER_WRITER_LOCKS
+#num _POSIX_REALTIME_SIGNALS
+#num _POSIX_REGEXP
+#num _POSIX_SAVED_IDS
+#num _POSIX_SEMAPHORES
+#num _POSIX_SHELL
+#num _POSIX_SPIN_LOCKS
+#num _POSIX_THREAD_SAFE_FUNCTIONS
+#num _POSIX_THREADS
+#num _POSIX_TIMEOUTS
+#num _POSIX_TIMERS
+#num _POSIX2_C_BIND
+#num _POSIX2_CHAR_TERM
+#num _POSIX2_LOCALEDEF
+#num F_OK
+#num R_OK
+#num W_OK
+#num X_OK
+#num F_LOCK
+#num F_TEST
+#num F_TLOCK
+#num F_ULOCK
+#num _PC_2_SYMLINKS
+#num _PC_ALLOC_SIZE_MIN
+#num _PC_ASYNC_IO
+#num _PC_CHOWN_RESTRICTED
+#num _PC_FILESIZEBITS
+#num _PC_LINK_MAX
+#num _PC_MAX_CANON
+#num _PC_MAX_INPUT
+#num _PC_NAME_MAX
+#num _PC_NO_TRUNC
+#num _PC_PATH_MAX
+#num _PC_PIPE_BUF
+#num _PC_PRIO_IO
+#num _PC_REC_INCR_XFER_SIZE
+#num _PC_REC_MAX_XFER_SIZE
+#num _PC_REC_MIN_XFER_SIZE
+#num _PC_REC_XFER_ALIGN
+#num _PC_SYMLINK_MAX
+#num _PC_SYNC_IO
+#num _PC_VDISABLE
+#num _SC_2_C_BIND
+#num _SC_2_C_DEV
+#num _SC_2_CHAR_TERM
+#num _SC_2_FORT_DEV
+#num _SC_2_FORT_RUN
+#num _SC_2_LOCALEDEF
+#num _SC_2_PBS
+#num _SC_2_PBS_ACCOUNTING
+#num _SC_2_PBS_CHECKPOINT
+#num _SC_2_PBS_LOCATE
+#num _SC_2_PBS_MESSAGE
+#num _SC_2_PBS_TRACK
+#num _SC_2_SW_DEV
+#num _SC_2_UPE
+#num _SC_2_VERSION
+#num _SC_ADVISORY_INFO
+#num _SC_AIO_LISTIO_MAX
+#num _SC_AIO_MAX
+#num _SC_AIO_PRIO_DELTA_MAX
+#num _SC_ARG_MAX
+#num _SC_ASYNCHRONOUS_IO
+#num _SC_ATEXIT_MAX
+#num _SC_BARRIERS
+#num _SC_BC_BASE_MAX
+#num _SC_BC_DIM_MAX
+#num _SC_BC_SCALE_MAX
+#num _SC_BC_STRING_MAX
+#num _SC_CHILD_MAX
+#num _SC_CLK_TCK
+#num _SC_CLOCK_SELECTION
+#num _SC_COLL_WEIGHTS_MAX
+#num _SC_CPUTIME
+#num _SC_DELAYTIMER_MAX
+#num _SC_EXPR_NEST_MAX
+#num _SC_FSYNC
+#num _SC_GETGR_R_SIZE_MAX
+#num _SC_GETPW_R_SIZE_MAX
+#num _SC_HOST_NAME_MAX
+#num _SC_IOV_MAX
+#num _SC_IPV6
+#num _SC_JOB_CONTROL
+#num _SC_LINE_MAX
+#num _SC_LOGIN_NAME_MAX
+#num _SC_MAPPED_FILES
+#num _SC_MEMLOCK
+#num _SC_MEMLOCK_RANGE
+#num _SC_MEMORY_PROTECTION
+#num _SC_MESSAGE_PASSING
+#num _SC_MONOTONIC_CLOCK
+#num _SC_MQ_OPEN_MAX
+#num _SC_MQ_PRIO_MAX
+#num _SC_NGROUPS_MAX
+#num _SC_OPEN_MAX
+#num _SC_PAGE_SIZE
+#num _SC_PAGESIZE
+#num _SC_PRIORITIZED_IO
+#num _SC_PRIORITY_SCHEDULING
+#num _SC_RAW_SOCKETS
+#num _SC_RE_DUP_MAX
+#num _SC_READER_WRITER_LOCKS
+#num _SC_REALTIME_SIGNALS
+#num _SC_REGEXP
+#num _SC_RTSIG_MAX
+#num _SC_SAVED_IDS
+#num _SC_SEM_NSEMS_MAX
+#num _SC_SEM_VALUE_MAX
+#num _SC_SEMAPHORES
+#num _SC_SHARED_MEMORY_OBJECTS
+#num _SC_SHELL
+#num _SC_SIGQUEUE_MAX
+#num _SC_SPAWN
+#num _SC_SPIN_LOCKS
+#num _SC_SPORADIC_SERVER
+#num _SC_STREAM_MAX
+#num _SC_SYMLOOP_MAX
+#num _SC_SYNCHRONIZED_IO
+#num _SC_THREAD_ATTR_STACKADDR
+#num _SC_THREAD_ATTR_STACKSIZE
+#num _SC_THREAD_CPUTIME
+#num _SC_THREAD_DESTRUCTOR_ITERATIONS
+#num _SC_THREAD_KEYS_MAX
+#num _SC_THREAD_PRIO_INHERIT
+#num _SC_THREAD_PRIO_PROTECT
+#num _SC_THREAD_PRIORITY_SCHEDULING
+#num _SC_THREAD_PROCESS_SHARED
+#num _SC_THREAD_SAFE_FUNCTIONS
+#num _SC_THREAD_SPORADIC_SERVER
+#num _SC_THREAD_STACK_MIN
+#num _SC_THREAD_THREADS_MAX
+#num _SC_THREADS
+#num _SC_TIMEOUTS
+#num _SC_TIMER_MAX
+#num _SC_TIMERS
+#num _SC_TRACE
+#num _SC_TRACE_EVENT_FILTER
+#num _SC_TRACE_INHERIT
+#num _SC_TRACE_LOG
+#num _SC_TTY_NAME_MAX
+#num _SC_TYPED_MEMORY_OBJECTS
+#num _SC_TZNAME_MAX
+#num _SC_VERSION
+#num _SC_XOPEN_CRYPT
+#num _SC_XOPEN_ENH_I18N
+#num _SC_XOPEN_REALTIME
+#num _SC_XOPEN_REALTIME_THREADS
+#num _SC_XOPEN_SHM
+#num _SC_XOPEN_UNIX
+#num _SC_XOPEN_VERSION
+#num STDERR_FILENO
+#num STDIN_FILENO
+#num STDOUT_FILENO
+#num _POSIX_VDISABLE
+
+#ccall access , CString -> CInt -> IO CInt
+#ccall alarm , CUInt -> IO CUInt
+#ccall chdir , CString -> IO CInt
+#ccall chown , CString -> <uid_t> -> <gid_t> -> IO CInt
+#ccall close , CInt -> IO CInt
+#ccall confstr , CInt -> CString -> CSize -> IO CSize
+#ccall dup , CInt -> IO CInt
+#ccall dup2 , CInt -> CInt -> IO CInt
+#ccall _exit , CInt -> IO ()
+#ccall execv , CString -> Ptr CString -> IO CInt
+#ccall execve , CString -> Ptr CString -> Ptr CString -> IO CInt
+#ccall execvp , CString -> Ptr CString -> IO CInt
+#ccall faccessat , CInt -> CString -> CInt -> CInt -> IO CInt
+#ccall fchdir , CInt -> IO CInt
+#ccall fchown , CInt -> <uid_t> -> <gid_t> -> IO CInt
+#ccall fchownat , CInt -> CString -> <uid_t> -> <gid_t> -> CInt -> IO CInt
+#ccall fexecve , CInt -> Ptr CString -> Ptr CString -> IO CInt
+#ccall fork , IO <pid_t>
+#ccall fpathconf , CInt -> CInt -> IO CLong
+#ccall ftruncate , CInt -> <off_t> -> IO CInt
+#ccall getcwd , CString -> CSize -> IO CString
+#ccall getegid , IO <gid_t>
+#ccall geteuid , IO <uid_t>
+#ccall getgid , IO <gid_t>
+#ccall getgroups , CInt -> Ptr <gid_t> -> IO CInt
+#ccall gethostname , CString -> CSize -> IO CInt
+#ccall getlogin , IO CString
+#ccall getlogin_r , CString -> CSize -> IO CInt
+#ccall getopt , CInt -> Ptr CString -> CString -> IO CInt
+#ccall getpgid , <pid_t> -> IO <pid_t>
+#ccall getpgrp , IO <pid_t>
+#ccall getpid , IO <pid_t>
+#ccall getppid , IO <pid_t>
+#ccall getsid , <pid_t> -> IO <pid_t>
+#ccall getuid , IO <uid_t>
+#ccall isatty , CInt -> IO CInt
+#ccall lchown , CString -> <uid_t> -> <gid_t> -> IO CInt
+#ccall link , CString -> CString -> IO CInt
+#ccall linkat , CInt -> CString -> CInt -> CString -> CInt -> IO CInt
+#ccall lseek , CInt -> <off_t> -> CInt -> IO <off_t>
+#ccall pathconf , CString -> CInt -> IO CLong
+#ccall pause , IO CInt
+#ccall pipe , Ptr CInt -> IO CInt
+#ccall pread , CInt -> Ptr () -> CSize -> <off_t> -> IO <ssize_t>
+#ccall pwrite , CInt -> Ptr () -> CSize -> <off_t> -> IO <ssize_t>
+#ccall read , CInt -> Ptr () -> CSize -> IO <ssize_t>
+#ccall readlink , CString -> CString -> CSize -> IO <ssize_t>
+#ccall readlinkat , CInt -> CString -> CString -> CSize -> IO <ssize_t>
+#ccall rmdir , CString -> IO CInt
+#ccall setegid , <gid_t> -> IO CInt
+#ccall seteuid , <uid_t> -> IO CInt
+#ccall setgid , <gid_t> -> IO CInt
+#ccall setpgid , <pid_t> -> <pid_t> -> IO CInt
+#ccall setsid , IO <pid_t>
+#ccall setuid , <uid_t> -> IO CInt
+#ccall sleep , CUInt -> IO CUInt
+#ccall symlink , CString -> CString -> IO CInt
+#ccall symlinkat , CString -> CInt -> CString -> IO CInt
+#ccall sysconf , CInt -> IO CLong
+#ccall tcgetpgrp , CInt -> IO <pid_t>
+#ccall tcsetpgrp , CInt -> <pid_t> -> IO CInt
+#ccall truncate , CString -> <off_t> -> IO CInt
+#ccall ttyname , CInt -> IO CString
+#ccall ttyname_r , CInt -> CString -> CSize -> IO CInt
+#ccall unlink , CString -> IO CInt
+#ccall unlinkat , CInt -> CString -> CInt -> IO CInt
+#ccall write , CInt -> Ptr () -> CSize -> IO <ssize_t>
+
+#globalvar optarg , CString
+#globalvar opterr , CInt
+#globalvar optind , CInt
+#globalvar optopt , CInt
+
diff --git a/src/inlines.c b/src/inlines.c
new file mode 100644
index 0000000..b1e874b
--- /dev/null
+++ b/src/inlines.c
@@ -0,0 +1,27 @@
+#include <sys/select.h>
+
+void
+inline_FD_CLR(int a, fd_set *b)
+{
+ FD_CLR(a,b);
+}
+
+int
+inline_FD_ISSET(int a, fd_set *b)
+{
+ return FD_ISSET(a,b);
+}
+
+void
+inline_FD_SET(int a, fd_set *b)
+{
+ FD_SET(a,b);
+}
+
+void
+inline_FD_ZERO(fd_set *b)
+{
+ FD_ZERO(b);
+}
+
+
diff --git a/src/test.hs b/src/test.hs
deleted file mode 100644
index 70375f1..0000000
--- a/src/test.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-import Bindings.C
-import Bindings.Posix
-
-main = return ()