def SigSetType : NamedType<"sigset_t">; def SigSetPtrType : PtrType; def ConstSigSetPtrType : ConstType; def RestrictedSigSetType : RestrictedPtrType; def ConstRestrictedSigSetType : ConstType; def SigInfoType : NamedType<"siginfo_t">; def UnionSigVal : NamedType<"union sigval">; def StructSigaction : NamedType<"struct sigaction">; def StructSigactionPtr : PtrType; def ConstStructSigactionPtr : ConstType; def RestrictedStructSigactionPtr : RestrictedPtrType; def ConstRestrictedStructSigactionPtr : ConstType; def PThreadStartT : NamedType<"__pthread_start_t">; def PThreadTSSDtorT : NamedType<"__pthread_tss_dtor_t">; def PThreadKeyT : NamedType<"pthread_key_t">; def PThreadKeyTPtr : PtrType; def PThreadOnceT : NamedType<"pthread_once_t">; def PThreadOnceTPtr : PtrType; def PThreadOnceCallback : NamedType<"__pthread_once_func_t">; def InoT : NamedType<"ino_t">; def UidT : NamedType<"uid_t">; def GidT : NamedType<"gid_t">; def DevT : NamedType<"dev_t">; def ClockIdT : NamedType<"clockid_t">; def BlkSizeT : NamedType<"blksize_t">; def BlkCntT : NamedType<"blkcnt_t">; def NLinkT : NamedType<"nlink_t">; def StatType : NamedType<"struct stat">; def StatTypePtr : PtrType; def RestrictedStatTypePtr : RestrictedPtrType; def DIR : NamedType<"DIR">; def DIRPtr : PtrType; def DIRRestrictedPtr : RestrictedPtrType; def StructDirent : NamedType<"struct dirent">; def StructDirentPtr : PtrType; def StructDirentPtrPtr : PtrType; def ConstStructDirentPtrPtr : ConstType; def StructTimeSpec : NamedType<"struct timespec">; def StructTimeSpecPtr : PtrType; def StructSchedParam : NamedType<"struct sched_param">; def StructSchedParamPtr : PtrType; def ConstStructSchedParamPtr : ConstType; def ExecArgvT : NamedType<"__exec_argv_t">; def ExecEnvpT : NamedType<"__exec_envp_t">; def AtForkCallbackT : NamedType<"__atfork_callback_t">; def PosixSpawnFileActionsT : NamedType<"posix_spawn_file_actions_t">; def PosixSpawnFileActionsTPtr : PtrType; def ConstPosixSpawnFileActionsTPtr : ConstType; def PosixSpawnFileActionsTRestrictedPtr : RestrictedPtrType; def PosixSpawnAttrT : NamedType<"posix_spawnattr_t">; def RestrictedPosixSpawnAttrTPtrType : RestrictedPtrType; def CcT : NamedType<"cc_t">; def SpeedT : NamedType<"speed_t">; def StructTermios : NamedType<"struct termios">; def StructTermiosPtr : PtrType; def ConstStructTermiosPtr : ConstType; def TcFlagT : NamedType<"tcflag_t">; def StackT : NamedType<"stack_t">; def StackTPtr : PtrType; def RestrictedStackTPtr : RestrictedPtrType; def ConstRestrictedStackTPtr : ConstType; def FdSet : NamedType<"fd_set">; def FdSetPtr : PtrType; def RestrictedFdSetPtr : RestrictedPtrType; def GetoptArgvT : NamedType<"__getoptargv_t">; def StructSockAddr : NamedType<"struct sockaddr">; def StructSockAddrPtr : PtrType; def SAFamilyType : NamedType<"sa_family_t">; def POSIX : StandardSpec<"POSIX"> { PtrType CharPtr = PtrType; RestrictedPtrType RestrictedCharPtr = RestrictedPtrType; RestrictedPtrType CharRestrictedDoublePtr = RestrictedPtrType; ConstType ConstCharPtr = ConstType; ConstType ConstRestrictedCharPtr = ConstType; NamedType ModeTType = NamedType<"mode_t">; NamedType PThreadAttrTType = NamedType<"pthread_attr_t">; PtrType PThreadAttrTPtr = PtrType; RestrictedPtrType RestrictedPThreadAttrTPtr = RestrictedPtrType; ConstType ConstPThreadAttrTPtr = ConstType; ConstType ConstRestrictedPThreadAttrTPtr = ConstType; NamedType PThreadMutexAttrTType = NamedType<"pthread_mutexattr_t">; PtrType PThreadMutexAttrTPtr = PtrType; RestrictedPtrType RestrictedPThreadMutexAttrTPtr = RestrictedPtrType; ConstType ConstPThreadMutexAttrTPtr = ConstType; ConstType ConstRestrictedPThreadMutexAttrTPtr = ConstType; NamedType PThreadMutexTType = NamedType<"pthread_mutex_t">; PtrType PThreadMutexTPtr = PtrType; RestrictedPtrType RestrictedPThreadMutexTPtr = RestrictedPtrType; ConstType ConstPThreadMutexTPtr = ConstType; ConstType ConstRestrictedPThreadMutexTPtr = ConstType; PtrType PThreadTPtr = PtrType; RestrictedPtrType RestrictedPThreadTPtr = RestrictedPtrType; HeaderSpec Errno = HeaderSpec< "errno.h", [ Macro<"E2BIG">, Macro<"EACCES">, Macro<"EADDRINUSE">, Macro<"EADDRNOTAVAIL">, Macro<"EAFNOSUPPORT">, Macro<"EAGAIN">, Macro<"EALREADY">, Macro<"EBADF">, Macro<"EBADMSG">, Macro<"EBUSY">, Macro<"ECANCELED">, Macro<"ECHILD">, Macro<"ECONNABORTED">, Macro<"ECONNREFUSED">, Macro<"ECONNRESET">, Macro<"EDEADLK">, Macro<"EDESTADDRREQ">, Macro<"EDQUOT">, Macro<"EEXIST">, Macro<"EFAULT">, Macro<"EFBIG">, Macro<"EHOSTUNREACH">, Macro<"EIDRM">, Macro<"EINPROGRESS">, Macro<"EINTR">, Macro<"EINVAL">, Macro<"EIO">, Macro<"EISCONN">, Macro<"EISDIR">, Macro<"ELOOP">, Macro<"EMFILE">, Macro<"EMLINK">, Macro<"EMSGSIZE">, Macro<"EMULTIHOP">, Macro<"ENAMETOOLONG">, Macro<"ENETDOWN">, Macro<"ENETRESET">, Macro<"ENETUNREACH">, Macro<"ENFILE">, Macro<"ENOBUFS">, Macro<"ENODATA">, Macro<"ENODEV">, Macro<"ENOENT">, Macro<"ENOEXEC">, Macro<"ENOLCK">, Macro<"ENOLINK">, Macro<"ENOMEM">, Macro<"ENOMSG">, Macro<"ENOPROTOOPT">, Macro<"ENOSPC">, Macro<"ENOSR">, Macro<"ENOSTR">, Macro<"ENOSYS">, Macro<"ENOTCONN">, Macro<"ENOTDIR">, Macro<"ENOTEMPTY">, Macro<"ENOTRECOVERABLE">, Macro<"ENOTSOCK">, Macro<"ENOTSUP">, Macro<"ENOTTY">, Macro<"ENXIO">, Macro<"EOPNOTSUPP">, Macro<"EOVERFLOW">, Macro<"EOWNERDEAD">, Macro<"EPERM">, Macro<"EPIPE">, Macro<"EPROTO">, Macro<"EPROTONOSUPPORT">, Macro<"EPROTOTYPE">, Macro<"EROFS">, Macro<"ESPIPE">, Macro<"ESRCH">, Macro<"ESTALE">, Macro<"ETIME">, Macro<"ETIMEDOUT">, Macro<"ETXTBSY">, Macro<"EWOULDBLOCK">, Macro<"EXDEV">, ], [], // Types [], // Enumerations [] // Functions >; HeaderSpec FCntl = HeaderSpec< "fcntl.h", [], // Macros [ModeTType], [], // Enumerations [ FunctionSpec< "creat", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "open", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "openat", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, ] >; HeaderSpec SysMMan = HeaderSpec< "sys/mman.h", [ // TODO: Add a facility to bunch macros into bitwise-or-able groups. // POSIX requires it, so such thing should be captured in this spec. Macro<"PROT_EXEC">, Macro<"PROT_NONE">, Macro<"PROT_READ">, Macro<"PROT_WRITE">, Macro<"MAP_FIXED">, Macro<"MAP_PRIVATE">, Macro<"MAP_SHARED">, Macro<"MAP_FAILED">, ], [ SizeTType, OffTType, ], [], // Enumerations [ FunctionSpec< "madvise", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "mmap", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "mprotect", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "munmap", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "posix_madvise", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, ] >; HeaderSpec Signal = HeaderSpec< "signal.h", [], // Macros [ SigInfoType, SigSetType, StackT, StructSigaction, UnionSigVal, PidT, ], [], // Enumerations [ FunctionSpec< "kill", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "sigaction", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "sigaltstack", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "sigdelset", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "sigprocmask", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "sigemptyset", RetValSpec, [ArgSpec] >, FunctionSpec< "sigaddset", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "sigfillset", RetValSpec, [ArgSpec] >, ] >; HeaderSpec UniStd = HeaderSpec< "unistd.h", [], // Macros [ ExecArgvT, ExecEnvpT, OffTType, SSizeTType, SizeTType, PidT, UidT, GetoptArgvT, ], [], // Enumerations [ FunctionSpec< "access", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "chdir", RetValSpec, [ArgSpec] >, FunctionSpec< "dup", RetValSpec, [ArgSpec] >, FunctionSpec< "dup2", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "dup3", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "fchdir", RetValSpec, [ArgSpec] >, FunctionSpec< "getcwd", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "close", RetValSpec, [ArgSpec] >, FunctionSpec< "execv", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "execve", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "fork", RetValSpec, [ArgSpec] >, FunctionSpec< "fsync", RetValSpec, [ArgSpec] >, FunctionSpec< "ftruncate", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "geteuid", RetValSpec, [ArgSpec] >, FunctionSpec< "getpid", RetValSpec, [ArgSpec] >, FunctionSpec< "getppid", RetValSpec, [ArgSpec] >, FunctionSpec< "getuid", RetValSpec, [ArgSpec] >, FunctionSpec< "isatty", RetValSpec, [ArgSpec] >, FunctionSpec< "link", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "linkat", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "lseek", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "pread", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "pwrite", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "read", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "readlink", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "readlinkat", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "rmdir", RetValSpec, [ArgSpec] >, FunctionSpec< "getpid", RetValSpec, [ArgSpec] >, FunctionSpec< "getppid", RetValSpec, [ArgSpec] >, FunctionSpec< "link", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "linkat", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "lseek", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "pread", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "pwrite", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "read", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "readlink", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "readlinkat", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "rmdir", RetValSpec, [ArgSpec] >, FunctionSpec< "swab", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "symlink", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "symlinkat", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "sysconf", RetValSpec, [ArgSpec] >, FunctionSpec< "__llvm_libc_syscall", RetValSpec, [ArgSpec,ArgSpec,ArgSpec,ArgSpec,ArgSpec,ArgSpec,ArgSpec] >, FunctionSpec< "truncate", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "unlink", RetValSpec, [ArgSpec] >, FunctionSpec< "unlinkat", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "write", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "getopt", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, ], [ ObjectSpec<"environ", "char **">, ObjectSpec< "optarg", "char *" >, ObjectSpec< "optind", "int" >, ObjectSpec< "opterr", "int" >, ObjectSpec< "optopt", "int" >, ] >; HeaderSpec StdLib = HeaderSpec< "stdlib.h", [], // Macros [], // Types [], // Enumerations [ FunctionSpec< "getenv", RetValSpec, [ArgSpec] >, ] >; HeaderSpec Sched = HeaderSpec< "sched.h", [], // Macros [PidT, TimeTType, StructTimeSpec, StructSchedParam], // Types [], // Enumerations [ FunctionSpec< "sched_yield", RetValSpec, [ArgSpec] >, FunctionSpec< "sched_setparam", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "sched_getparam", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "sched_setscheduler", RetValSpec, [ArgSpec] >, FunctionSpec< "sched_getscheduler", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "sched_get_priority_min", RetValSpec, [ArgSpec] >, FunctionSpec< "sched_get_priority_max", RetValSpec, [ArgSpec] >, FunctionSpec< "sched_rr_get_interval", RetValSpec, [ArgSpec, ArgSpec] >, ] >; HeaderSpec String = HeaderSpec< "string.h", [ Macro<"NULL">, ], [ SizeTType, ], [], // Enumerations [ FunctionSpec< "memccpy", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "mempcpy", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "stpcpy", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "stpncpy", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "strnlen", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "strtok_r", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "strsignal", RetValSpec, [ArgSpec] >, ] >; HeaderSpec CType = HeaderSpec< "ctype.h", [], // Macros [], // Types [], // Enumerations [ FunctionSpec< "isascii", RetValSpec, [ArgSpec] >, ] >; NamedType RLimTType = NamedType<"rlim_t">; NamedType StructRLimitType = NamedType<"struct rlimit">; PtrType StructRLimitPtr = PtrType; ConstType ConstStructRLimitPtr = ConstType; HeaderSpec SysResource = HeaderSpec< "sys/resource.h", [], // Macros [RLimTType, StructRLimitType], // Types [], // Enumerations [ FunctionSpec< "getrlimit", RetValSpec, [ArgSpec] >, FunctionSpec< "setrlimit", RetValSpec, [ArgSpec] >, ] >; HeaderSpec SysStat = HeaderSpec< "sys/stat.h", [], // Macros [ ModeTType, DevT, InoT, UidT, GidT, StructTimeSpec, StructTimevalType, BlkSizeT, BlkCntT, OffTType, NLinkT, StatType, ], // Types [], // Enumerations [ FunctionSpec< "chmod", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "fchmod", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "fchmodat", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "fstat", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "lstat", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "mkdir", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "mkdirat", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "stat", RetValSpec, [ArgSpec, ArgSpec] >, ] >; NamedType StructUtsName = NamedType<"struct utsname">; PtrType StructUtsNamePtr = PtrType; HeaderSpec SysUtsName = HeaderSpec< "sys/utsname.h", [], // Macros [StructUtsName], // Types [], // Enumerations [ FunctionSpec< "uname", RetValSpec, [ArgSpec] >, ] >; HeaderSpec ArpaInet = HeaderSpec< "arpa/inet.h", [], // Macros [], // Types [], // Enumerations [ FunctionSpec< "htonl", RetValSpec, [ArgSpec] >, FunctionSpec< "htons", RetValSpec, [ArgSpec] >, FunctionSpec< "ntohl", RetValSpec, [ArgSpec] >, FunctionSpec< "ntohs", RetValSpec, [ArgSpec] >, ] >; HeaderSpec PThread = HeaderSpec< "pthread.h", [], // Macros [ AtForkCallbackT, PThreadAttrTType, PThreadKeyT, PThreadMutexAttrTType, PThreadMutexTType, PThreadOnceCallback, PThreadOnceT, PThreadStartT, PThreadTSSDtorT, PThreadTType, ], // Types [], // Enumerations [ FunctionSpec< "pthread_atfork", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "pthread_attr_init", RetValSpec, [ArgSpec] >, FunctionSpec< "pthread_attr_destroy", RetValSpec, [ArgSpec] >, FunctionSpec< "pthread_attr_getdetachstate", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_attr_setdetachstate", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_attr_getguardsize", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_attr_setguardsize", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_attr_getstacksize", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_attr_setstacksize", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_attr_getstack", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "pthread_attr_setstack", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "pthread_create", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "pthread_join", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_detach", RetValSpec, [ArgSpec] >, FunctionSpec< "pthread_exit", RetValSpec, [ArgSpec] >, FunctionSpec< "pthread_self", RetValSpec, [ArgSpec] >, FunctionSpec< "pthread_equal", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_mutexattr_init", RetValSpec, [ArgSpec] >, FunctionSpec< "pthread_mutexattr_destroy", RetValSpec, [ArgSpec] >, FunctionSpec< "pthread_mutexattr_gettype", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_mutexattr_settype", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_mutexattr_getrobust", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_mutexattr_setrobust", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_mutexattr_getpshared", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_mutexattr_setpshared", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_mutexattr_getprotocol", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_mutexattr_setprotocol", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_mutexattr_getprioceiling", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_mutexattr_setprioceiling", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_mutex_init", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_mutex_destroy", RetValSpec, [ArgSpec] >, FunctionSpec< "pthread_mutex_lock", RetValSpec, [ArgSpec] >, FunctionSpec< "pthread_mutex_unlock", RetValSpec, [ArgSpec] >, FunctionSpec< "pthread_key_create", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_key_delete", RetValSpec, [ArgSpec] >, FunctionSpec< "pthread_getspecific", RetValSpec, [ArgSpec] >, FunctionSpec< "pthread_setspecific", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "pthread_once", RetValSpec, [ArgSpec, ArgSpec] >, ] >; HeaderSpec StdIO = HeaderSpec< "stdio.h", [], // Macros [], // Types [], // Enumerations [ FunctionSpec< "flockfile", RetValSpec, [ArgSpec] >, FunctionSpec< "funlockfile", RetValSpec, [ArgSpec] >, FunctionSpec< "getc_unlocked", RetValSpec, [ArgSpec] >, FunctionSpec< "getchar_unlocked", RetValSpec, [ArgSpec] >, ] >; HeaderSpec Dirent = HeaderSpec< "dirent.h", [], // Macros [InoT, StructDirent, DIR], // Types [], // Enumerations [ FunctionSpec< "alphasort", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "closedir", RetValSpec, [ArgSpec] >, FunctionSpec< "dirfd", RetValSpec, [ArgSpec] >, FunctionSpec< "fdopendir", RetValSpec, [ArgSpec] >, FunctionSpec< "opendir", RetValSpec, [ArgSpec] >, FunctionSpec< "readdir", RetValSpec, [ArgSpec] >, ] >; HeaderSpec Time = HeaderSpec< "time.h", [], // Macros [ClockIdT, StructTimeSpec, StructTimevalType], // Types [], // Enumerations [ FunctionSpec< "clock_gettime", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "gettimeofday", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "nanosleep", RetValSpec, [ArgSpec, ArgSpec] >, ] >; HeaderSpec SysWait = HeaderSpec< "sys/wait.h", [], // Macros [PidT, StructRUsage], [], // Enumerations [ FunctionSpec< "wait", RetValSpec, [ArgSpec] >, FunctionSpec< "waitpid", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] > ] >; HeaderSpec SysIOctl = HeaderSpec< "sys/ioctl.h", [ Macro<"TIOCGETD">, ], // Macros [], // Types [], // Enumerations [] // Functions >; HeaderSpec Spawn = HeaderSpec< "spawn.h", [], // Macros [ModeTType, PosixSpawnAttrT, PidT, PosixSpawnFileActionsT], [], // Enumerations [ FunctionSpec< "posix_spawn_file_actions_addclose", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "posix_spawn_file_actions_adddup2", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "posix_spawn_file_actions_addopen", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, FunctionSpec< "posix_spawn_file_actions_destroy", RetValSpec, [ArgSpec] >, FunctionSpec< "posix_spawn_file_actions_init", RetValSpec, [ArgSpec] >, FunctionSpec< "posix_spawn", RetValSpec, [ArgSpec, ArgSpec, ArgSpec, ArgSpec, ArgSpec, ArgSpec] >, ] >; HeaderSpec Termios = HeaderSpec< "termios.h", [ Macro<"NCCS">, ], [CcT, PidT, SpeedT, StructTermios, TcFlagT], // Types [], // Enumerations [ FunctionSpec< "cfgetispeed", RetValSpec, [ArgSpec] >, FunctionSpec< "cfgetospeed", RetValSpec, [ArgSpec] >, FunctionSpec< "cfsetispeed", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "cfsetospeed", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "tcdrain", RetValSpec, [ArgSpec] >, FunctionSpec< "tcflow", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "tcflush", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "tcgetattr", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "tcgetsid", RetValSpec, [ArgSpec] >, FunctionSpec< "tcsendbreak", RetValSpec, [ArgSpec, ArgSpec] >, FunctionSpec< "tcsetattr", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, ] >; HeaderSpec SysSelect = HeaderSpec< "sys/select.h", [], // Macros [FdSet, SigSetType, StructTimevalType, StructTimeSpec, SuSecondsT, TimeTType], [], // Enumerations [ FunctionSpec< "select", RetValSpec, [ ArgSpec, ArgSpec, ArgSpec, ArgSpec, ArgSpec ] > ] >; HeaderSpec SysSocket = HeaderSpec< "sys/socket.h", [ Macro<"AF_UNSPEC">, Macro<"AF_UNIX">, Macro<"AF_LOCAL">, Macro<"AF_INET">, Macro<"AF_INET6">, Macro<"SOCK_STREAM">, Macro<"SOCK_DGRAM">, Macro<"SOCK_RAW">, Macro<"SOCK_RDM">, Macro<"SOCK_SEQPACKET">, Macro<"SOCK_PACKET">, ], // Macros [ StructSockAddr, SAFamilyType, ], // Types [], // Enumerations [ FunctionSpec< "socket", RetValSpec, [ArgSpec, ArgSpec, ArgSpec] >, ] // Functions >; HeaderSpec SysTypes = HeaderSpec< "sys/types.h", [], // Macros [BlkCntT, BlkSizeT, ClockIdT, DevT, GidT, InoT, ModeTType, NLinkT, OffTType, PidT, PThreadAttrTType, PThreadKeyT, PThreadMutexTType, PThreadMutexAttrTType, PThreadOnceT, PThreadTType, SizeTType, SSizeTType, SuSecondsT, TimeTType, UidT], [], // Enumerations [] // Functions >; let Headers = [ ArpaInet, CType, Dirent, Errno, FCntl, PThread, Sched, Signal, Spawn, StdIO, StdLib, SysIOctl, SysMMan, SysResource, SysSelect, SysSocket, SysStat, SysTypes, SysUtsName, SysWait, Time, Termios, UniStd, String ]; }