core/sys/posix
posix
Types
122AF
AF :: enum c.int {
// Unspecified.
UNSPEC = AF_UNSPEC,
// Internet domain sockets for use with IPv4 addresses.
INET = AF_INET,
// Internet domain sockets for use with IPv6 addresses.
INET6 = AF_INET6,
// UNIX domain sockets.
UNIX = AF_UNIX,
}SourceAT_Flag_Bits
AT_Flag_Bits :: enum c.int {
EACCESS = log2(AT_EACCESS),
SYMLINK_NOFOLLOW = log2(AT_SYMLINK_NOFOLLOW),
SYMLINK_FOLLOW = log2(AT_SYMLINK_FOLLOW),
REMOVEDIR = log2(AT_REMOVEDIR),
}SourceAT_Flags
AT_Flags :: bit_set[AT_Flag_Bits; c.int]SourceAddrinfo_Flag_Bits
Addrinfo_Flag_Bits :: enum c.int {
// Socket address is intended for bind().
PASSIVE = log2(AI_PASSIVE),
// Request for canonical name.
CANONNAME = log2(AI_CANONNAME),
// Return numeric host address as name.
NUMERICHOST = log2(AI_NUMERICHOST),
// Inhibit service name resolution.
NUMERICSERV = log2(AI_NUMERICSERV),
// If no IPv6 addresses are found, query for IPv4 addresses and return them to the
// caller as IPv4-mapped IPv6 addresses.
V4MAPPED = log2(AI_V4MAPPED),
// Query for both IPv4 and IPv6 addresses.
ALL = log2(AI_ALL),
// Query for IPv4 addresses only when an IPv4 address is configured; query for IPv6 addresses
// only when an IPv6 address is configured.
ADDRCONFIG = log2(AI_ADDRCONFIG),
}SourceAddrinfo_Flags
Addrinfo_Flags :: bit_set[Addrinfo_Flag_Bits; c.int]SourceAny_Code
Any_Code :: enum c.int {
// Signal sent by kill().
USER = SI_USER,
// Signal sent by sigqueue().
QUEUE = SI_QUEUE,
// Signal generated by expiration of a timer set by timer_settime().
TIMER = SI_TIMER,
// Signal generated by completion of an asynchronous I/O request.
ASYNCIO = SI_ASYNCIO,
// Signal generated by arrival of a message on an empty message queue.
MESGQ = SI_MESGQ,
}SourceBUS_Code
BUS_Code :: enum c.int {
// Invalid address alignment.
ADRALN = BUS_ADRALN,
// Nonexistent physical address.
ADRERR = BUS_ADRERR,
// Object-specific hardware error.
OBJERR = BUS_OBJERR,
}SourceCControl_Flag_Bits
CControl_Flag_Bits :: enum tcflag_t {
// CS5 = log2(CS5), /* 5 bits (pseudo) (default) */
CS6 = log2(CS6), // 6 bits
CS7 = log2(CS7), // 7 bits
CS8 = log2(CS8), // 8 bits
CSTOPB = log2(CSTOPB), // send 2 stop bits
CREAD = log2(CREAD), // enable receiver
PARENB = log2(PARENB), // parity enable
PARODD = log2(PARODD), // odd parity, else even
HUPCL = log2(HUPCL), // hang up on last close
CLOCAL = log2(CLOCAL), // ignore modem status lines
}SourceCControl_Flags
CControl_Flags :: bit_set[CControl_Flag_Bits; tcflag_t]SourceCInput_Flag_Bits
CInput_Flag_Bits :: enum tcflag_t {
IGNBRK = log2(IGNBRK), // ignore BREAK condition
BRKINT = log2(BRKINT), // map BREAK to SIGINTR
IGNPAR = log2(IGNPAR), // ignore (discard) parity errors
PARMRK = log2(PARMRK), // mark parity and framing errors
INPCK = log2(INPCK), // enable checking of parity errors
ISTRIP = log2(ISTRIP), // strip 8th bit off chars
INLCR = log2(INLCR), // map NL into CR
IGNCR = log2(IGNCR), // ignore CR
ICRNL = log2(ICRNL), // map CR to NL (ala CRMOD)
IXON = log2(IXON), // enable output flow control
IXOFF = log2(IXOFF), // enable input flow control
IXANY = log2(IXANY), // any char will restart after stop
}SourceCInput_Flags
CInput_Flags :: bit_set[CInput_Flag_Bits; tcflag_t]SourceCLD_Code
CLD_Code :: enum c.int {
// Child has exited..
EXITED = CLD_EXITED,
// Child has terminated abnormally and did not create a core file.
KILLED = CLD_KILLED,
// Child has terminated abnormally and created a core file.
DUMPED = CLD_DUMPED,
// Traced child trapped.
TRAPPED = CLD_TRAPPED,
// Child has stopped.
STOPPED = CLD_STOPPED,
// Stopped child has continued.
CONTINUED = CLD_CONTINUED,
}SourceCLocal_Flag_Bits
CLocal_Flag_Bits :: enum tcflag_t {
ECHO = log2(ECHO), // visual erase for line kill
ECHOE = log2(ECHOE), // visually erase chars
ECHOK = log2(ECHOK), // echo NL after line kill
ECHONL = log2(ECHONL), // echo NL even if ECHO is off
ICANON = log2(ICANON), // canonicalize input lines
IEXTEN = log2(IEXTEN), // enable DISCARD and LNEXT
ISIG = log2(ISIG), // enable signals INTR, QUIT, [D]SUSP
NOFLSH = log2(NOFLSH), // don't flush after interrupt
TOSTOP = log2(TOSTOP), // stop background jobs from output
}SourceCLocal_Flags
CLocal_Flags :: bit_set[CLocal_Flag_Bits; tcflag_t]SourceCOutput_Flag_Bits
COutput_Flag_Bits :: enum tcflag_t {
OPOST = log2(OPOST), // enable following output processing
ONLCR = log2(ONLCR), // map NL to CR-NL (ala CRMOD)
OCRNL = log2(OCRNL), // map CR to NL on output
ONOCR = log2(ONOCR), // no CR output at column 0
ONLRET = log2(ONLRET), // NL performs CR function
OFDEL = log2(OFDEL), // fill is DEL, else NUL
OFILL = log2(OFILL), // use fill characters for delay
// NL0 = log2(NL0), /* \n delay 0 (default) */
NL1 = log2(NL1), // \n delay 1
// CR0 = log2(CR0), /* \r delay 0 (default) */
CR1 = log2(CR1), // \r delay 1
CR2 = log2(CR2), // \r delay 2
CR3 = log2(CR3), // \r delay 3
// TAB0 = log2(TAB0),/* horizontal tab delay 0 (default) */
TAB1 = log2(TAB1), // horizontal tab delay 1
TAB3 = log2(TAB3), // horizontal tab delay 3
// BS0 = log2(BS0), /* \b delay 0 (default) */
BS1 = log2(BS1), // \b delay 1
// VT0 = log2(VT0), /* vertical tab delay 0 (default) */
VT1 = log2(VT1), // vertical tab delay 1
// FF0 = log2(FF0), /* form feed delay 0 (default) */
FF1 = log2(FF1), // form feed delay 1
}SourceCOutput_Flags
COutput_Flags :: bit_set[COutput_Flag_Bits; tcflag_t]SourceCS
CS :: enum c.int {
_PATH = _CS_PATH,
_POSIX_V6_ILP32_OFF32_CFLAGS = _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
_POSIX_V6_ILP32_OFF32_LDFLAGS = _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
_POSIX_V6_ILP32_OFF32_LIBS = _CS_POSIX_V6_ILP32_OFF32_LIBS,
_POSIX_V6_ILP32_OFFBIG_CFLAGS = _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
_POSIX_V6_ILP32_OFFBIG_LDFLAGS = _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
_POSIX_V6_ILP32_OFFBIG_LIBS = _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
_POSIX_V6_LP64_OFF64_CFLAGS = _CS_POSIX_V6_LP64_OFF64_CFLAGS,
_POSIX_V6_LP64_OFF64_LDFLAGS = _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
_POSIX_V6_LP64_OFF64_LIBS = _CS_POSIX_V6_LP64_OFF64_LIBS,
_POSIX_V6_LPBIG_OFFBIG_CFLAGS = _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
_POSIX_V6_LPBIG_OFFBIG_LIBS = _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
_POSIX_V6_WIDTH_RESTRICTED_ENVS = _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS,
}SourceCancel_State
Cancel_State :: enum c.int {
// Cancel takes place at next cancellation point.
ENABLE = PTHREAD_CANCEL_ENABLE,
// Cancel postponed.
DISABLE = PTHREAD_CANCEL_DISABLE,
}SourceCancel_Type
Cancel_Type :: enum c.int {
// Cancel waits until cancellation point.
DEFERRED = PTHREAD_CANCEL_DEFERRED,
// Cancel occurs immediately.
ASYNCHRONOUS = PTHREAD_CANCEL_ASYNCHRONOUS,
}SourceClock
Clock :: enum clockid_t {
// system-wide monotonic clock, defined as clock measuring real time,
// can be set with clock_settime() and cannot have negative clock jumps.
MONOTONIC = CLOCK_MONOTONIC,
// CPU-time clock associated with the process making a clock() function call.
PROCESS_CPUTIME_ID = CLOCK_PROCESS_CPUTIME_ID,
// system-wide clock measuring real time.
REALTIME = CLOCK_REALTIME,
// CPU-time clock associated with the thread making a clock() function call.
THREAD_CPUTIME_ID = CLOCK_THREAD_CPUTIME_ID,
}SourceControl_Char
Control_Char :: enum c.int {
VEOF = VEOF,
VEOL = VEOL,
VERASE = VERASE,
VINTR = VINTR,
VKILL = VKILL,
VMIN = VMIN,
VQUIT = VQUIT,
VSTART = VSTART,
VSTOP = VSTOP,
VSUSP = VSUSP,
VTIME = VTIME,
NCCS = NCCS-1,
}SourceDIR
DIR :: rawptrSourceD_Type
D_Type :: enum c.uint8_t {
UNKNOWN = 0,
FIFO = 1,
CHR = 2,
DIR = 4,
BLK = 6,
REG = 8,
LNK = 10,
SOCK = 12,
WHT = 14,
}SourceNOTE: d_type is not a POSIX standard field, but all targets we support add it.
Detach_State
Detach_State :: enum c.int {
// Causes all threads to be in the joinable state.
CREATE_JOINABLE = PTHREAD_CREATE_JOINABLE,
// Causes all threads to be in the detached state.
CREATE_DETACHED = PTHREAD_CREATE_DETACHED,
}SourceErrno
Errno :: enum c.int {
NONE = 0,
EDOM = EDOM,
EILSEQ = EILSEQ,
ERANGE = ERANGE,
E2BIG = E2BIG,
EACCES = EACCES,
EADDRINUSE = EADDRINUSE,
EADDRNOTAVAIL = EADDRNOTAVAIL,
EAFNOSUPPORT = EAFNOSUPPORT,
EAGAIN = EAGAIN,
EALREADY = EALREADY,
EBADF = EBADF,
EBADMSG = EBADMSG,
EBUSY = EBUSY,
ECANCELED = ECANCELED,
ECHILD = ECHILD,
ECONNABORTED = ECONNABORTED,
ECONNREFUSED = ECONNREFUSED,
ECONNRESET = ECONNRESET,
EDEADLK = EDEADLK,
EDESTADDRREQ = EDESTADDRREQ,
EDQUOT = EDQUOT,
EEXIST = EEXIST,
EFAULT = EFAULT,
EFBIG = EFBIG,
EHOSTUNREACH = EHOSTUNREACH,
EIDRM = EIDRM,
EINPROGRESS = EINPROGRESS,
EINTR = EINTR,
EINVAL = EINVAL,
EIO = EIO,
EISCONN = EISCONN,
EISDIR = EISDIR,
ELOOP = ELOOP,
EMFILE = EMFILE,
EMLINK = EMLINK,
EMSGSIZE = EMSGSIZE,
EMULTIHOP = EMULTIHOP,
ENAMETOOLONG = ENAMETOOLONG,
ENETDOWN = ENETDOWN,
ENETRESET = ENETRESET,
ENETUNREACH = ENETUNREACH,
ENFILE = ENFILE,
ENOBUFS = ENOBUFS,
ENODATA = ENODATA,
ENODEV = ENODEV,
ENOENT = ENOENT,
ENOEXEC = ENOEXEC,
ENOLCK = ENOLCK,
ENOLINK = ENOLINK,
ENOMEM = ENOMEM,
ENOMSG = ENOMSG,
ENOPROTOOPT = ENOPROTOOPT,
ENOSPC = ENOSPC,
ENOSR = ENOSR,
ENOSTR = ENOSTR,
ENOSYS = ENOSYS,
ENOTCONN = ENOTCONN,
ENOTDIR = ENOTDIR,
ENOTEMPTY = ENOTEMPTY,
ENOTRECOVERABLE = ENOTRECOVERABLE,
ENOTSOCK = ENOTSOCK,
ENOTSUP = ENOTSUP,
ENOTTY = ENOTTY,
ENXIO = ENXIO,
EOPNOTSUPP = EOPNOTSUPP,
EOVERFLOW = EOVERFLOW,
EOWNERDEAD = EOWNERDEAD,
EPERM = EPERM,
EPIPE = EPIPE,
EPROTO = EPROTO,
EPROTONOSUPPORT = EPROTONOSUPPORT,
EPROTOTYPE = EPROTOTYPE,
EROFS = EROFS,
ESPIPE = ESPIPE,
ESRCH = ESRCH,
ESTALE = ESTALE,
ETIME = ETIME,
ETIMEDOUT = ETIMEDOUT,
ETXTBSY = ETXTBSY,
EWOULDBLOCK = EWOULDBLOCK,
EXDEV = EXDEV,
}SourceFCNTL_Cmd
FCNTL_Cmd :: enum c.int {
DUPFD = F_DUPFD,
DUPFD_CLOEXEC = F_DUPFD_CLOEXEC,
GETFD = F_GETFD,
SETFD = F_SETFD,
GETFL = F_GETFL,
SETFL = F_SETFL,
GETLK = F_GETLK,
SETLK = F_SETLK,
SETLKW = F_SETLKW,
GETOWN = F_GETOWN,
SETOWN = F_SETOWN,
}SourceFD
FD :: c.intSourceFILE
FILE :: FILESourceFNM_Flag_Bits
FNM_Flag_Bits :: enum c.int {
// A <slash> character ( '/' ) in string shall be explicitly matched by a <slash> in pattern;
// it shall not be matched by either the <asterisk> or <question-mark> special characters,
// nor by a bracket expression.
PATHNAME = log2(FNM_PATHNAME),
// A leading <period> ( '.' ) in string shall match a <period> in pattern;
// as described by rule 2 in XCU [[ Patterns Used for Filename Expansion; https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13_03 ]]
// where the location of "leading" is indicated by the value of PATHNAME:
// 1. If PATHNAME is set, a <period> is "leading" if it is the first character in string or if it immediately follows a <slash>.
// 2. If PATHNAME is not set, a <period> is "leading" only if it is the first character of string.
PERIOD = log2(FNM_PERIOD),
// A <backslash> character shall be treated as an ordinary character.
NOESCAPE = log2(FNM_NOESCAPE),
}SourceFNM_Flags
FNM_Flags :: bit_set[FNM_Flag_Bits; c.int]SourceFPE_Code
FPE_Code :: enum c.int {
// Integer divide by zero.
INTDIV = FPE_INTDIV,
// Integer overflow.
INTOVF = FPE_INTOVF,
// Floating-point divide by zero.
FLTDIV = FPE_FLTDIV,
// Floating-point overflow.
FLTOVF = FPE_FLTOVF,
// Floating-point underflow.
FLTUND = FPE_FLTUND,
// Floating-point inexact result.
FLTRES = FPE_FLTRES,
// Invalid floating-point operation.
FLTINV = FPE_FLTINV,
// Subscript out of range.
FLTSUB = FPE_FLTSUB,
}SourceGlob_Flag_Bits
Glob_Flag_Bits :: enum c.int {
// Append pathnames generated to the ones from a previous call to glob().
APPEND = log2(GLOB_APPEND),
// Make use of pglob->gl_offs. If this flag is set, pglob->gl_offs is used to specify how many null pointers to add to the beginning of pglob->gl_pathv.
// In other words, pglob->gl_pathv shall point to pglob->gl_offs null pointers, followed by pglob->gl_pathc pathname pointers, followed by a null pointer.
DOOFFS = log2(GLOB_DOOFFS),
// Cause glob() to return when it encounters a directory that it cannot open or read. Ordinarily,
// glob() continues to find matches.
ERR = log2(GLOB_ERR),
// Each pathname that is a directory that matches pattern shall have a <slash> appended.
MARK = log2(GLOB_MARK),
// Supports rule 3 in [[ XCU Patterns Used for Filename Expansion; https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13_03 ]].
// If pattern does not match any pathname, then glob() shall return a list consisting of only pattern,
// and the number of matched pathnames is 1.
NOCHECK = log2(GLOB_NOCHECK),
// Disable backslash escaping.
NOESCAPE = log2(GLOB_NOESCAPE),
// Ordinarily, glob() sorts the matching pathnames according to the current setting of the
// LC_COLLATE category; see XBD LC_COLLATE. When this flag is used,
// the order of pathnames returned is unspecified.
NOSORT = log2(GLOB_NOSORT),
}SourceGlob_Flags
Glob_Flags :: bit_set[Glob_Flag_Bits; c.int]SourceGlob_Result
Glob_Result :: enum c.int {
SUCCESS = 0,
ABORTED = GLOB_ABORTED,
NOMATCH = GLOB_NOMATCH,
NOSPACE = GLOB_NOSPACE,
}SourceILL_Code
ILL_Code :: enum c.int {
// Illegal opcode.
ILLOPC = ILL_ILLOPC,
// Illegal operand.
ILLOPN = ILL_ILLOPN,
// Illegal addressing mode.
ILLADR = ILL_ILLADR,
// Illegal trap.
ILLTRP = ILL_ILLTRP,
// Priviledged opcode.
PRVOPC = ILL_PRVOPC,
// Priviledged register.
PRVREG = ILL_PRVREG,
// Coprocessor error.
COPROC = ILL_COPROC,
// Internal stack error.
BADSTK = ILL_BADSTK,
}SourceIPC_Cmd
IPC_Cmd :: enum c.int {
RMID = IPC_RMID,
SET = IPC_SET,
STAT = IPC_STAT,
}SourceIPC_Flag_Bits
IPC_Flag_Bits :: enum c.int {
CREAT = log2(IPC_CREAT),
EXCL = log2(IPC_EXCL),
NOWAIT = log2(IPC_NOWAIT),
MSG_NOERROR = log2(MSG_NOERROR),
}SourceIPC_Flags
IPC_Flags :: bit_set[IPC_Flag_Bits; c.int]SourceITimer
ITimer :: enum c.int {
// Decrements in real time.
REAL = ITIMER_REAL,
// Decrements in process virtual time, only when the process is executing.
VIRTUAL = ITIMER_VIRTUAL,
// Decrements both in process virtual time and when the system is running on
// behalf of the process.
PROF = ITIMER_PROF,
}SourceInfo_Errno
Info_Errno :: enum c.int {
NONE = 0,
// The name could not be resolved at this time. Future attempts may succeed.
AGAIN = EAI_AGAIN,
// The flags had an invalid value.
BADFLAGS = EAI_BADFLAGS,
// A non-recoverable error ocurred.
FAIL = EAI_FAIL,
// The address family was not recognized or the address length was invald for the specified family.
FAMILY = EAI_FAMILY,
// There was a memory allocation failure.
MEMORY = EAI_MEMORY,
// The name does not resolve for the supplied parameters.
NONAME = EAI_NONAME,
// The service passed was not recognized for the specified socket.
SERVICE = EAI_SERVICE,
// The intended socket type was not recognized.
SOCKTYPE = EAI_SOCKTYPE,
// A system error occurred. The error code can be found in errno.
SYSTEM = EAI_SYSTEM,
// An argument buffer overflowed.
OVERFLOW = EAI_OVERFLOW,
}SourceInherit_Sched
Inherit_Sched :: enum c.int {
// Threads inherit from the creating thread.
INHERIT_SCHED = PTHREAD_INHERIT_SCHED,
// Threads scheduling shall be set to the corresponding values from the attributes object.
EXPLICIT_SCHED = PTHREAD_EXPLICIT_SCHED,
}SourceLocale_Category
Locale_Category :: Locale_CategorySourceLock_Flag_Bits
Lock_Flag_Bits :: enum c.int {
// Lock all pages currently mapped into the address space of the process.
CURRENT = log2(MCL_CURRENT),
// Lock all pages that become mapped into the address space of the process in the future,
// when those mappings are established.
FUTURE = log2(MCL_FUTURE),
}SourceLock_Flags
Lock_Flags :: bit_set[Lock_Flag_Bits; c.int]SourceLock_Function
Lock_Function :: enum c.int {
// Lock a section for exclusive use.
LOCK = F_LOCK,
// Test a section for locks by other processes.
TEST = F_TEST,
// Test and lock a section for exclusive use.
TLOCK = F_TLOCK,
// Unlock locked sections.
ULOCK = F_ULOCK,
}SourceLock_Type
Lock_Type :: enum c.short {
RDLCK = F_RDLCK,
UNLCK = F_UNLCK,
WRLCK = F_WRLCK,
}SourceMAdvice
MAdvice :: enum c.int {
DONTNEED = POSIX_MADV_DONTNEED,
NORMAL = POSIX_MADV_NORMAL,
RANDOM = POSIX_MADV_RANDOM,
SEQUENTIAL = POSIX_MADV_SEQUENTIAL,
WILLNEED = POSIX_MADV_WILLNEED,
}SourceMap_Flag_Bits
Map_Flag_Bits :: enum c.int {
// Map anonymous memory.
ANONYMOUS = log2(MAP_ANONYMOUS),
// Interpret addr exactly.
FIXED = log2(MAP_FIXED),
// Changes are private.
PRIVATE = log2(MAP_PRIVATE),
// Changes are shared.
SHARED = log2(MAP_SHARED),
}SourceMap_Flags
Map_Flags :: bit_set[Map_Flag_Bits; c.int]SourceMode_Bits
Mode_Bits :: enum c.int {
// File type:
IFCHR = log2(_S_IFCHR), // Character special
IFIFO = log2(_S_IFIFO), // FIFO special
IFREG = log2(_S_IFREG), // Regular
IFDIR = log2(_S_IFDIR), // Directory
// Permissions:
IRUSR = log2(_S_IRUSR), // R for owner
IWUSR = log2(_S_IWUSR), // W for owner
IXUSR = log2(_S_IXUSR), // X for owner
IRGRP = log2(_S_IRGRP), // R for group
IWGRP = log2(_S_IWGRP), // W for group
IXGRP = log2(_S_IXGRP), // X for group
IROTH = log2(_S_IROTH), // R for other
IWOTH = log2(_S_IWOTH), // W for other
IXOTH = log2(_S_IXOTH), // X for other
ISUID = log2(_S_ISUID), // Set user ID on execution
ISGID = log2(_S_ISGID), // Set group ID on execution
ISVXT = log2(_S_ISVTX), // On directories, restricted deletion flag
}SourceMode_Flag_Bits
Mode_Flag_Bits :: enum c.int {
X_OK = log2(X_OK),
W_OK = log2(W_OK),
R_OK = log2(R_OK),
}SourceMode_Flags
Mode_Flags :: bit_set[Mode_Flag_Bits; c.int]SourceMsg_Flag_Bits
Msg_Flag_Bits :: enum c.int {
// Control data truncated.
CTRUNC = log2(MSG_CTRUNC),
// Send without using routing table.
DONTROUTE = log2(MSG_DONTROUTE),
// Terminates a record (if supported by protocol).
EOR = log2(MSG_EOR),
// Out-of-band data.
OOB = log2(MSG_OOB),
// No SIGPIPE is generated when an attempt to send is made on a stream-oriented socket that is
// no longer connected.
NOSIGNAL = log2(MSG_NOSIGNAL),
// Leave received data in queue.
PEEK = log2(MSG_PEEK),
// Normal data truncated.
TRUNC = log2(MSG_TRUNC),
// Attempt to fill the read buffer.
WAITALL = log2(MSG_WAITALL),
}SourceMsg_Flags
Msg_Flags :: bit_set[Msg_Flag_Bits; c.int]SourceNameinfo_Flag_Bits
Nameinfo_Flag_Bits :: enum c.int {
// Only the nodename portion of the FQDN is returned for local hosts.
NOFQDN = log2(NI_NOFQDN),
// The numeric form of the node's address is returned instead of its name.
NUMERICHOST = log2(NI_NUMERICHOST),
// Return an error if the node's name cannot be located in the database.
NAMEREQD = log2(NI_NAMEREQD),
// The numeric form of the service address is returned instead of its name.
NUMERICSERV = log2(NI_NUMERICSERV),
// For IPv6 addresses, the numeric form of the scope identifier is returned instead of its name.
NUMERICSCOPE = log2(NI_NUMERICSCOPE),
// Indicates that the service is a datagram service (SOCK_DGRAM).
DGRAM = log2(NI_DGRAM),
}SourceNameinfo_Flags
Nameinfo_Flags :: bit_set[Nameinfo_Flag_Bits; c.int]SourceO_Flag_Bits
O_Flag_Bits :: enum c.int {
// Sets FD_CLOEXEC on the file descriptor.
CLOEXEC = log2(O_CLOEXEC),
// If not exists, combined with DIRECTORY will cause creation of a directory, otherwise a regular file.
CREAT = log2(O_CREAT),
// Fails if the opened descriptor would not be a directory.
DIRECTORY = log2(O_DIRECTORY),
// If combined with CREAT, causes a failure if the file already exists.
EXCL = log2(O_EXCL),
// If terminal device, do not make it the controlling terminal for the process.
NOCTTY = log2(O_NOCTTY),
// Don't follow symbolic links, fail with errno ELOOP.
NOFOLLOW = log2(O_NOFOLLOW),
// If exists and regular, truncate the length to 0.
TRUNC = log2(O_TRUNC),
// NOTE: use with `posix.O_TTY_INIT + { .OTHER_FLAG, .OTHER_FLAG }`, unfortunately can't be in
// this bit set enum because it is 0 on some platforms and a value on others.
// TTY_INIT = O_TTY_INIT,
// Set file offset to end of file prior to each write.
APPEND = log2(O_APPEND),
// Write I/O shall complete as defined by synchronized I/O data integrity completion.
DSYNC = log2(O_DSYNC),
// Causes nonblocking behaviour in various situations.
NONBLOCK = log2(O_NONBLOCK),
// Write I/O shall complete as defined by synchronized I/O file integrity completion.
SYNC = log2(O_SYNC),
// NOTE: use with `posix.O_RSYNC + { .OTHER_FLAG, .OTHER_FLAG }`, unfortunately can't be in
// this bit set enum because it is 0 on some platforms and a value on others.
// RSYNC = O_RSYNC,
// Execute only.
EXEC = log2(O_EXEC),
// Reading and writing.
RDWR = log2(O_RDWR),
// Writing only.
WRONLY = log2(O_WRONLY),
}SourceO_Flags
O_Flags :: bit_set[O_Flag_Bits; c.int]SourcePC
PC :: enum c.int {
_2_SYMLINKS = _PC_2_SYMLINKS,
_ALLOC_SIZE_MIN = _PC_ALLOC_SIZE_MIN,
_ASYNC_IO = _PC_ASYNC_IO,
_CHOWN_RESTRICTED = _PC_CHOWN_RESTRICTED,
_FILESIZEBITS = _PC_FILESIZEBITS,
_LINK_MAX = _PC_LINK_MAX,
_MAX_CANON = _PC_MAX_CANON,
_MAX_INPUT = _PC_MAX_INPUT,
_NAME_MAX = _PC_NAME_MAX,
_NO_TRUNC = _PC_NO_TRUNC,
_PATH_MAX = _PC_PATH_MAX,
_PIPE_BUF = _PC_PIPE_BUF,
_PRIO_IO = _PC_PRIO_IO,
_REC_INCR_XFER_SIZE = _PC_REC_INCR_XFER_SIZE,
_REC_MAX_XFER_SIZE = _PC_REC_MAX_XFER_SIZE,
_REC_MIN_XFER_SIZE = _PC_REC_MIN_XFER_SIZE,
_REC_XFER_ALIGN = _PC_REC_XFER_ALIGN,
_SYMLINK_MAX = _PC_SYMLINK_MAX,
_SYNC_IO = _PC_SYNC_IO,
_VDISABLE = _PC_VDISABLE,
}SourcePOLL_Code
POLL_Code :: enum c.int {
// Data input is available.
IN = POLL_IN,
// Output buffers available.
OUT = POLL_OUT,
// Input message available.
MSG = POLL_MSG,
// I/O error.
ERR = POLL_ERR,
// High priority input available.
PRI = POLL_PRI,
// Device disconnected.
HUP = POLL_HUP,
}SourcePoll_Event
Poll_Event :: bit_set[Poll_Event_Bits; c.short]SourcePoll_Event_Bits
Poll_Event_Bits :: enum c.short {
// Data other than high-priority data may be read without blocking.
IN = log2(POLLIN),
// Normal data may be read without blocking.
RDNORM = log2(POLLRDNORM),
// Priority data may be read without blocking.
RDBAND = log2(POLLRDBAND),
// High priority data may be read without blocking.
PRI = log2(POLLPRI),
// Normal data may be written without blocking.
OUT = log2(POLLOUT),
// Equivalent to POLLOUT.
WRNORM = log2(POLLWRNORM),
// Priority data may be written.
WRBAND = log2(POLLWRBAND),
// An error has occurred (revents only).
ERR = log2(POLLERR),
// Device hsa been disconnected (revents only).
HUP = log2(POLLHUP),
// Invalid fd member (revents only).
NVAL = log2(POLLNVAL),
}SourceProt_Flag_Bits
Prot_Flag_Bits :: enum c.int {
// Data can be executed.
EXEC = log2(PROT_EXEC),
// Data can be read.
READ = log2(PROT_READ),
// Data can be written.
WRITE = log2(PROT_WRITE),
}SourceProt_Flags
Prot_Flags :: bit_set[Prot_Flag_Bits; c.int]SourceProtocol
Protocol :: enum c.int {
IP = IPPROTO_IP,
ICMP = IPPROTO_ICMP,
IPV6 = IPPROTO_IPV6,
RAW = IPPROTO_RAW,
TCP = IPPROTO_TCP,
UDP = IPPROTO_UDP,
}SourceRTLD_Flag_Bits
RTLD_Flag_Bits :: enum c.int {
LAZY = log2(RTLD_LAZY),
NOW = log2(RTLD_NOW),
GLOBAL = log2(RTLD_GLOBAL),
// NOTE: use with `posix.RTLD_LOCAL + { .OTHER_FLAG, .OTHER_FLAG }`, unfortunately can't be in
// this bit set enum because it is 0 on some platforms and a value on others.
// LOCAL = RTLD_LOCAL
_MAX = 31,
}SourceRTLD_Flags
RTLD_Flags :: bit_set[RTLD_Flag_Bits; c.int]SourceResource
Resource :: enum c.int {
// Maximum byte size of a core file that may be created by a process.
CORE = RLIMIT_CORE,
// Maximum amount of CPU time, in seconds, used by a process.
CPU = RLIMIT_CPU,
// Maximum size of data segment of the process, in bytes.
DATA = RLIMIT_DATA,
// Maximum size of a file, in bytes, that may be created by a process.
FSIZE = RLIMIT_FSIZE,
// A number one greater than the maximum value that the system may assign to a newly-created descriptor.
NOFILE = RLIMIT_NOFILE,
// The maximum size of the initial thread's stack, in bytes.
STACK = RLIMIT_STACK,
// Maximum size of total available memory of the process, in bytes.
AS = RLIMIT_AS,
}SourceSA_Flags
SA_Flags :: bit_set[SA_Flags_Bits; c.int]SourceSA_Flags_Bits
SA_Flags_Bits :: enum c.int {
// Do not generate SIGCHLD when children stop or stopped children continue.
NOCLDSTOP = log2(SA_NOCLDSTOP),
// Cause signal delivery to occur on an alternate stack.
ONSTACK = log2(SA_ONSTACK),
// Cause signal disposition to be set to SIG_DFL on entry to signal handlers.
RESETHAND = log2(SA_RESETHAND),
// Cause certain functions to become restartable.
RESTART = log2(SA_RESTART),
// Cause extra information to be passed to signal handlers at the time of receipt of a signal.
SIGINFO = log2(SA_SIGINFO),
// Cause implementation not to create zombie processes or status information on child termination.
NOCLDWAIT = log2(SA_NOCLDWAIT),
// Cause signal not to be automatically blocked on entry to signal handler.
SA_NODEFER = log2(SA_NODEFER),
}SourceSC
SC :: enum c.int {
_2_C_BIND = _SC_2_C_BIND,
_2_C_DEV = _SC_2_C_DEV,
_2_CHAR_TERM = _SC_2_CHAR_TERM,
_2_FORT_DEV = _SC_2_FORT_DEV,
_2_FORT_RUN = _SC_2_FORT_RUN,
_2_LOCALEDEF = _SC_2_LOCALEDEF,
_2_PBS = _SC_2_PBS,
_2_PBS_ACCOUNTING = _SC_2_PBS_ACCOUNTING,
_2_PBS_CHECKPOINT = _SC_2_PBS_CHECKPOINT,
_2_PBS_LOCATE = _SC_2_PBS_LOCATE,
_2_PBS_MESSAGE = _SC_2_PBS_MESSAGE,
_2_PBS_TRACK = _SC_2_PBS_TRACK,
_2_SW_DEV = _SC_2_SW_DEV,
_2_UPE = _SC_2_UPE,
_2_VERSION = _SC_2_VERSION,
_ADVISORY_INFO = _SC_ADVISORY_INFO,
_AIO_LISTIO_MAX = _SC_AIO_LISTIO_MAX,
_AIO_MAX = _SC_AIO_MAX,
_AIO_PRIO_DELTA_MAX = _SC_AIO_PRIO_DELTA_MAX,
_ARG_MAX = _SC_ARG_MAX,
_ASYNCHRONOUS_IO = _SC_ASYNCHRONOUS_IO,
_ATEXIT_MAX = _SC_ATEXIT_MAX,
_BARRIERS = _SC_BARRIERS,
_BC_BASE_MAX = _SC_BC_BASE_MAX,
_BC_DIM_MAX = _SC_BC_DIM_MAX,
_BC_SCALE_MAX = _SC_BC_SCALE_MAX,
_BC_STRING_MAX = _SC_BC_STRING_MAX,
_CHILD_MAX = _SC_CHILD_MAX,
_CLK_TCK = _SC_CLK_TCK,
_CLOCK_SELECTION = _SC_CLOCK_SELECTION,
_COLL_WEIGHTS_MAX = _SC_COLL_WEIGHTS_MAX,
_CPUTIME = _SC_CPUTIME,
_DELAYTIMER_MAX = _SC_DELAYTIMER_MAX,
_EXPR_NEST_MAX = _SC_EXPR_NEST_MAX,
_FSYNC = _SC_FSYNC,
_GETGR_R_SIZE_MAX = _SC_GETGR_R_SIZE_MAX,
_GETPW_R_SIZE_MAX = _SC_GETPW_R_SIZE_MAX,
_HOST_NAME_MAX = _SC_HOST_NAME_MAX,
_IOV_MAX = _SC_IOV_MAX,
_IPV6 = _SC_IPV6,
_JOB_CONTROL = _SC_JOB_CONTROL,
_LINE_MAX = _SC_LINE_MAX,
_LOGIN_NAME_MAX = _SC_LOGIN_NAME_MAX,
_MAPPED_FILES = _SC_MAPPED_FILES,
_MEMLOCK = _SC_MEMLOCK,
_MEMLOCK_RANGE = _SC_MEMLOCK_RANGE,
_MEMORY_PROTECTION = _SC_MEMORY_PROTECTION,
_MESSAGE_PASSING = _SC_MESSAGE_PASSING,
_MONOTONIC_CLOCK = _SC_MONOTONIC_CLOCK,
_MQ_OPEN_MAX = _SC_MQ_OPEN_MAX,
_MQ_PRIO_MAX = _SC_MQ_PRIO_MAX,
_NGROUPS_MAX = _SC_NGROUPS_MAX,
_OPEN_MAX = _SC_OPEN_MAX,
_PAGE_SIZE = _SC_PAGE_SIZE,
_PAGESIZE = _SC_PAGESIZE,
_PRIORITIZED_IO = _SC_PRIORITIZED_IO,
_PRIORITY_SCHEDULING = _SC_PRIORITY_SCHEDULING,
_RAW_SOCKETS = _SC_RAW_SOCKETS,
_RE_DUP_MAX = _SC_RE_DUP_MAX,
_READER_WRITER_LOCKS = _SC_READER_WRITER_LOCKS,
_REALTIME_SIGNALS = _SC_REALTIME_SIGNALS,
_REGEXP = _SC_REGEXP,
_RTSIG_MAX = _SC_RTSIG_MAX,
_SAVED_IDS = _SC_SAVED_IDS,
_SEM_NSEMS_MAX = _SC_SEM_NSEMS_MAX,
_SEM_VALUE_MAX = _SC_SEM_VALUE_MAX,
_SEMAPHORES = _SC_SEMAPHORES,
_SHARED_MEMORY_OBJECTS = _SC_SHARED_MEMORY_OBJECTS,
_SHELL = _SC_SHELL,
_SIGQUEUE_MAX = _SC_SIGQUEUE_MAX,
_SPAWN = _SC_SPAWN,
_SPIN_LOCKS = _SC_SPIN_LOCKS,
_SPORADIC_SERVER = _SC_SPORADIC_SERVER,
_SS_REPL_MAX = _SC_SS_REPL_MAX,
_STREAM_MAX = _SC_STREAM_MAX,
_SYMLOOP_MAX = _SC_SYMLOOP_MAX,
_SYNCHRONIZED_IO = _SC_SYNCHRONIZED_IO,
_THREAD_ATTR_STACKADDR = _SC_THREAD_ATTR_STACKADDR,
_THREAD_ATTR_STACKSIZE = _SC_THREAD_ATTR_STACKSIZE,
_THREAD_CPUTIME = _SC_THREAD_CPUTIME,
_THREAD_DESTRUCTOR_ITERATIONS = _SC_THREAD_DESTRUCTOR_ITERATIONS,
_THREAD_KEYS_MAX = _SC_THREAD_KEYS_MAX,
_THREAD_PRIO_INHERIT = _SC_THREAD_PRIO_INHERIT,
_THREAD_PRIO_PROTECT = _SC_THREAD_PRIO_PROTECT,
_THREAD_PRIORITY_SCHEDULING = _SC_THREAD_PRIORITY_SCHEDULING,
_THREAD_PROCESS_SHARED = _SC_THREAD_PROCESS_SHARED,
_THREAD_SAFE_FUNCTIONS = _SC_THREAD_SAFE_FUNCTIONS,
_THREAD_SPORADIC_SERVER = _SC_THREAD_SPORADIC_SERVER,
_THREAD_STACK_MIN = _SC_THREAD_STACK_MIN,
_THREAD_THREADS_MAX = _SC_THREAD_THREADS_MAX,
_THREADS = _SC_THREADS,
_TIMEOUTS = _SC_TIMEOUTS,
_TIMER_MAX = _SC_TIMER_MAX,
_TIMERS = _SC_TIMERS,
_TRACE = _SC_TRACE,
_TRACE_EVENT_FILTER = _SC_TRACE_EVENT_FILTER,
_TRACE_EVENT_NAME_MAX = _SC_TRACE_EVENT_NAME_MAX,
_TRACE_INHERIT = _SC_TRACE_INHERIT,
_TRACE_LOG = _SC_TRACE_LOG,
_TRACE_NAME_MAX = _SC_TRACE_NAME_MAX,
_TRACE_SYS_MAX = _SC_TRACE_SYS_MAX,
_TRACE_USER_EVENT_MAX = _SC_TRACE_USER_EVENT_MAX,
_TTY_NAME_MAX = _SC_TTY_NAME_MAX,
_TYPED_MEMORY_OBJECTS = _SC_TYPED_MEMORY_OBJECTS,
_TZNAME_MAX = _SC_TZNAME_MAX,
_V6_ILP32_OFF32 = _SC_V6_ILP32_OFF32,
_V6_ILP32_OFFBIG = _SC_V6_ILP32_OFFBIG,
_V6_LP64_OFF64 = _SC_V6_LP64_OFF64,
_V6_LPBIG_OFFBIG = _SC_V6_LPBIG_OFFBIG,
_VERSION = _SC_VERSION,
_XOPEN_CRYPT = _SC_XOPEN_CRYPT,
_XOPEN_ENH_I18N = _SC_XOPEN_ENH_I18N,
_XOPEN_REALTIME = _SC_XOPEN_REALTIME,
_XOPEN_REALTIME_THREADS = _SC_XOPEN_REALTIME_THREADS,
_XOPEN_SHM = _SC_XOPEN_SHM,
_XOPEN_STREAMS = _SC_XOPEN_STREAMS,
_XOPEN_UNIX = _SC_XOPEN_UNIX,
_XOPEN_VERSION = _SC_XOPEN_VERSION,
}SourceSEGV_Code
SEGV_Code :: enum c.int {
// Address not mapped to object.
MAPERR = SEGV_MAPERR,
// Invalid permissions for mapped object.
ACCERR = SEGV_ACCERR,
}SourceSHM_Flag_Bits
SHM_Flag_Bits :: enum c.int {
RDONLY = log2(SHM_RDONLY),
RND = log2(SHM_RND),
}SourceSHM_Flags
SHM_Flags :: bit_set[SHM_Flag_Bits; c.int]SourceSS_Flag_Bits
SS_Flag_Bits :: enum c.int {
// Process is executing on an alternate signal stack.
ONSTACK = log2(SS_ONSTACK),
// Alternate signal stack is disabled.
DISABLE = log2(SS_DISABLE),
}SourceSS_Flags
SS_Flags :: bit_set[SS_Flag_Bits; c.int]SourceSched_Policy
Sched_Policy :: enum c.int {
// Error condition of sched_getscheduler.
ERROR = -1,
// First in-first out (FIFO) scheduling policy.
FIFO = SCHED_FIFO,
// Round robin scheduling policy.
RR = SCHED_RR,
// Another scheduling policy.
OTHER = SCHED_OTHER,
}SourceSem_Cmd
Sem_Cmd :: enum c.int {
RMID = IPC_RMID,
SET = IPC_SET,
STAT = IPC_STAT,
// Returns the value of semncnt.
GETNCNT = GETNCNT,
// Returns the value of sempid.
GETPID = GETPID,
// Return the value of semval.
GETVAL = GETVAL,
// Returns the value of semval for each semaphore in the semaphore set.
GETALL = GETALL,
// Returns the value of semzcnt.
GETZCNT = GETZCNT,
// Sets the value of semval to arg.val.
SETVAL = SETVAL,
// Sets the value of semval for each semaphore in the set.
SETALL = SETALL,
}SourceShut
Shut :: enum c.int {
// Disables further receive operations.
RD = SHUT_RD,
// Disables further send and receive operations.
RDWR = SHUT_RDWR,
// Disables further send operations.
WR = SHUT_WR,
}SourceSig
Sig :: enum c.int {
// Resulting set is the union of the current set and the signal set and the complement of
// the signal set pointed to by the argument.
BLOCK = SIG_BLOCK,
// Resulting set is the intersection of the current set and the complement of the signal set
// pointed to by the argument.
UNBLOCK = SIG_UNBLOCK,
// Resulting set is the signal set pointed to by the argument.
SETMASK = SIG_SETMASK,
}SourceSignal
Signal :: enum c.int {
NONE = 0,
// LIBC:
// Process abort signal.
SIGABRT = SIGABRT,
// Erronous arithemtic operation.
SIGFPE = SIGFPE,
// Illegal instruction.
SIGILL = SIGILL,
// Terminal interrupt signal.
SIGINT = SIGINT,
// Invalid memory reference.
SIGSEGV = SIGSEGV,
// Termination signal.
SIGTERM = SIGTERM,
// POSIX:
// Process abort signal.
SIGALRM = SIGALRM,
// Access to an undefined portion of a memory object.
SIGBUS = SIGBUS,
// Child process terminated, stopped, or continued.
SIGCHLD = SIGCHLD,
// Continue execution, if stopped.
SIGCONT = SIGCONT,
// Hangup.
SIGHUP = SIGHUP,
// Kill (cannot be caught or ignored).
SIGKILL = SIGKILL,
// Write on a pipe with no one to read it.
SIGPIPE = SIGPIPE,
// Terminal quit signal.
SIGQUIT = SIGQUIT,
// Stop executing (cannot be caught or ignored).
SIGSTOP = SIGSTOP,
// Terminal stop process.
SIGTSTP = SIGTSTP,
// Background process attempting read.
SIGTTIN = SIGTTIN,
// Background process attempting write.
SIGTTOU = SIGTTOU,
// User-defined signal 1.
SIGUSR1 = SIGUSR1,
// User-defined signal 2.
SIGUSR2 = SIGUSR2,
// Pollable event.
SIGPOLL = SIGPOLL,
// Profiling timer expired.
SIGPROF = SIGPROF,
// Bad system call.
SIGSYS = SIGSYS,
// Trace/breakpoint trap.
SIGTRAP = SIGTRAP,
// High bandwidth data is available at a socket.
SIGURG = SIGURG,
// Virtual timer expired.
SIGVTALRM = SIGVTALRM,
// CPU time limit exceeded.
SIGXCPU = SIGXCPU,
// File size limit exceeded.
SIGXFSZ = SIGXFSZ,
}SourceSock
Sock :: enum c.int {
// Datagram socket.
DGRAM = SOCK_DGRAM,
// Raw Protocol Interface.
RAW = SOCK_RAW,
// Sequenced-packet socket.
SEQPACKET = SOCK_SEQPACKET,
// Byte-stream socket.
STREAM = SOCK_STREAM,
}SourceSock_Option
Sock_Option :: enum c.int {
// Transmission of broadcast message is supported.
BROADCAST = SO_BROADCAST,
// Debugging information is being recorded.
DEBUG = SO_DEBUG,
// Bypass normal routing.
DONTROUTE = SO_DONTROUTE,
// Socket error status.
ERROR = SO_ERROR,
// Connections are kept alive with periodic messages.
KEEPALIVE = SO_KEEPALIVE,
// Socket lingers on close.
LINGER = SO_LINGER,
// Out-of-band data is transmitted in line.
OOBINLINE = SO_OOBINLINE,
// Receive buffer size.
RCVBUF = SO_RCVBUF,
// Receive low water mark.
RCVLOWAT = SO_RCVLOWAT,
// Receive timeout.
RCVTIMEO = SO_RCVTIMEO,
// Reuse of local addresses is supported.
REUSEADDR = SO_REUSEADDR,
// Send buffer size.
SNDBUF = SO_SNDBUF,
// Send low water mark.
SNDLOWAT = SO_SNDLOWAT,
// Send timeout.
SNDTIMEO = SO_SNDTIMEO,
// Socket type.
TYPE = SO_TYPE,
}SourceSymbol_Table
Symbol_Table :: rawptrSourceSync_Flags
Sync_Flags :: bit_set[Sync_Flags_Bits; c.int]SourceSync_Flags_Bits
Sync_Flags_Bits :: enum c.int {
// Perform asynchronous writes.
ASYNC = log2(MS_ASYNC),
// Invalidate cached data.
INVALIDATE = log2(MS_INVALIDATE),
// Perform synchronous writes.
// NOTE: use with `posix.MS_SYNC + { .OTHER_FLAG, .OTHER_FLAG }`, unfortunately can't be in
// this bit set enum because it is 0 on some platforms and a value on others.
// LOCAL = RTLD_LOCAL
// SYNC = MS_SYNC,
_MAX = 31,
}SourceTC_Action
TC_Action :: enum c.int {
TCIOFF = TCIOFF,
TCION = TCION,
TCOOFF = TCOOFF,
TCOON = TCOON,
}SourceTC_Optional_Action
TC_Optional_Action :: enum c.int {
TCSANOW = 0,
TCSADRAIN = 1,
TCSAFLUSH = 2,
}SourceTC_Queue
TC_Queue :: enum c.int {
TCIFLUSH = TCIFLUSH,
TCOFLUSH = TCOFLUSH,
TCIOFLUSH = TCIOFLUSH,
}SourceTRAP_Code
TRAP_Code :: enum c.int {
// Process breakpoint.
BRKPT = TRAP_BRKPT,
// Process trace trap.
TRACE = TRAP_TRACE,
}SourceThread_Scope
Thread_Scope :: enum c.int {
// System scheduling contention scope.
SYSTEM = PTHREAD_SCOPE_SYSTEM,
// Process scheduling contention scope.
PROCESS = PTHREAD_SCOPE_PROCESS,
}SourceUlimit_Cmd
Ulimit_Cmd :: enum c.int {
// Returns the file size limit of the process in units of 512-byte blocks inherited by children.
GETFSIZE = UL_GETFSIZE,
// Set the file size limit for output operations, taken as a long, multiplied by 512.
SETFSIZE = UL_SETFSIZE,
}SourceVFS_Flag_Bits
VFS_Flag_Bits :: enum c.ulong {
// Read-only file system.
RDONLY = log2(ST_RDONLY),
// Does not support the semantics of the ST_ISUID and ST_ISGID file mode bits.
NOSUID = log2(ST_NOSUID),
}SourceVFS_Flags
VFS_Flags :: bit_set[VFS_Flag_Bits; c.ulong]SourceWRDE_Errno
WRDE_Errno :: enum c.int {
OK = 0,
// One of the unquoted characters- <newline>, '|', '&', ';', '<', '>', '(', ')', '{', '}' -
// appears in words in an inappropriate context.
BADCHAR = WRDE_BADCHAR,
// Reference to undefined shell variable when WRDE_UNDEF is set in flags.
BADVAL = WRDE_BADVAL,
// Command substitution requested when WRDE_NOCMD was set in flags.
CMDSUB = WRDE_CMDSUB,
// Attempt to allocate memory failed.
NOSPACE = WRDE_NOSPACE,
// Shell syntax error, such as unbalanced parentheses or an unterminated string.
SYNTAX = WRDE_SYNTAX,
}SourceWRDE_Flag_Bits
WRDE_Flag_Bits :: enum c.int {
// Appends words to those previously generated.
APPEND = log2(WRDE_APPEND),
// Number of null pointers to prepend to we_wordv.
DOOFFS = log2(WRDE_DOOFFS),
// Fail if command substitution is requested.
NOCMD = log2(WRDE_NOCMD),
// The pwordexp argument was passed to a previous successful call to wordexp(),
// and has not been passed to wordfree().
REUSE = log2(WRDE_REUSE),
// Do not redirect stderr to /dev/null.
SHOWERR = log2(WRDE_SHOWERR),
// Report error on attempt to expand an undefined shell variable.
UNDEF = log2(WRDE_UNDEF),
}SourceWRDE_Flags
WRDE_Flags :: bit_set[WRDE_Flag_Bits; c.int]SourceWait_Flag_Bits
Wait_Flag_Bits :: enum c.int {
// Report the status of any continued child process specified by pid whose status has not been
// reported since it continued from a job control stop.
CONTINUED = log2(WCONTINUED),
// Don't suspend execution of the calling thread if status is not immediately available for one
// of the child processes specified by pid.
NOHANG = log2(WNOHANG),
// The status of any child process specified by pid that are stopped, and whose status has not
// yet been reported since they stopped, shall also be reported to the requesting process.
UNTRACED = log2(WUNTRACED),
// Following are only available on `waitid`, not `waitpid`.
// Wait for processes that have exited.
EXITED = log2(WEXITED),
// Keep the process whose status is returned in a waitable state, so it may be waited on again.
NOWAIT = log2(WNOWAIT),
// Children that have stopped upon receipt of a signal, and whose status either hasn't been reported
// or has been reported but that report was called with NOWAIT.
STOPPED = log2(WSTOPPED),
}SourceWait_Flags
Wait_Flags :: bit_set[Wait_Flag_Bits; c.int]SourceWhence
Whence :: WhenceSourceWhich_Prio
Which_Prio :: enum c.int {
PROCESS = PRIO_PROCESS,
PGRP = PRIO_PGRP,
USER = PRIO_USER,
}SourceWhich_Usage
Which_Usage :: enum c.int {
SELF = RUSAGE_SELF,
CHILDREN = RUSAGE_CHILDREN,
}Sourcedir_loc
dir_loc :: longSourcediv_t
div_t :: div_tSourceiconv_t
iconv_t :: rawptrSourceiconv.h - codeset conversion facility
idtype_t
idtype_t :: enum c.int {
// Wait for any children and `id` is ignored.
P_ALL = _P_ALL,
// Wait for any child wiith a process group ID equal to `id`.
P_PID = _P_PID,
// Wait for any child with a process group ID equal to `id`.
P_PGID = _P_PGID,
}Sourcein_addr_t
in_addr_t :: u32beSourcein_port_t
in_port_t :: u16beSourcejmp_buf
jmp_buf :: jmp_bufSourcesetjmp.h - stack environment declarations
lconv
lconv :: lconvSourceldiv_t
ldiv_t :: ldiv_tSourcelldiv_t
lldiv_t :: lldiv_tSourcemode_t
mode_t :: bit_set[Mode_Bits; _mode_t]Sourcenfds_t
nfds_t :: uintSourcenl_item
nl_item :: enum nl_item_t {
CODESET = CODESET,
D_T_FMT = D_T_FMT,
D_FMT = D_FMT,
T_FMT = T_FMT,
T_FMT_AMPM = T_FMT_AMPM,
AM_STR = AM_STR,
PM_STR = PM_STR,
DAY_1 = DAY_1,
DAY_2 = DAY_2,
DAY_3 = DAY_3,
DAY_4 = DAY_4,
DAY_5 = DAY_5,
DAY_6 = DAY_6,
DAY_7 = DAY_7,
ABDAY_1 = ABDAY_1,
ABDAY_2 = ABDAY_2,
ABDAY_3 = ABDAY_3,
ABDAY_4 = ABDAY_4,
ABDAY_5 = ABDAY_5,
ABDAY_6 = ABDAY_6,
ABDAY_7 = ABDAY_7,
MON_1 = MON_1,
MON_2 = MON_2,
MON_3 = MON_3,
MON_4 = MON_4,
MON_5 = MON_5,
MON_6 = MON_6,
MON_7 = MON_7,
MON_8 = MON_8,
MON_9 = MON_9,
MON_10 = MON_10,
MON_11 = MON_11,
MON_12 = MON_12,
ABMON_1 = ABMON_1,
ABMON_2 = ABMON_2,
ABMON_3 = ABMON_3,
ABMON_4 = ABMON_4,
ABMON_5 = ABMON_5,
ABMON_6 = ABMON_6,
ABMON_7 = ABMON_7,
ABMON_8 = ABMON_8,
ABMON_9 = ABMON_9,
ABMON_10 = ABMON_10,
ABMON_11 = ABMON_11,
ABMON_12 = ABMON_12,
ERA = ERA,
ERA_D_FMT = ERA_D_FMT,
ERA_D_T_FMT = ERA_D_T_FMT,
ERA_T_FMT = ERA_T_FMT,
ALT_DIGITS = ALT_DIGITS,
RADIXCHAR = RADIXCHAR,
THOUSEP = THOUSEP,
YESEXPR = YESEXPR,
NOEXPR = NOEXPR,
CRNCYSTR = CRNCYSTR,
}Sourcepton_result
pton_result :: enum c.int {
AFNOSUPPORT = -1,
INVALID = 0,
SUCCESS = 1,
}Sourceresult
result :: enum c.int {
// Use `errno` and `strerror` for more information.
FAIL = -1,
// Operation succeeded.
OK = 0,
}Sourcesa_family_t
sa_family_t :: enum _sa_family_t {
// Unspecified.
UNSPEC = AF_UNSPEC,
// Internet domain sockets for use with IPv4 addresses.
INET = AF_INET,
// Internet domain sockets for use with IPv6 addresses.
INET6 = AF_INET6,
// UNIX domain sockets.
UNIX = AF_UNIX,
}Sourcesemun
semun :: struct #raw_union {
val: c.int,
buf: ^semid_ds,
array: [^]c.ushort,
}Sourcesigjmp_buf
sigjmp_buf :: jmp_bufSourcesigval
sigval :: struct #raw_union {
sigval_int: c.int,
sigval_ptr: rawptr,
}Sourcespeed_t
speed_t :: enum _speed_t {
B0 = B0,
B50 = B50,
B75 = B75,
B110 = B110,
B134 = B134,
B150 = B150,
B200 = B200,
B300 = B300,
B600 = B600,
B1200 = B1200,
B1800 = B1800,
B2400 = B2400,
B4800 = B4800,
B9600 = B9600,
B19200 = B19200,
B38400 = B38400,
}SourceConstants
225AF_UNSPEC
AF_UNSPEC :: 0SourceBSDLY
BSDLY :: _ = transmute(COutput_Flags)tcflag_t(_BSDLY)Source\b delay mask
BUFSIZ
BUFSIZ :: libc.BUFSIZSourceCLOCKS_PER_SEC
CLOCKS_PER_SEC :: libc.CLOCKS_PER_SECSourceCRDLY
CRDLY :: _ = transmute(COutput_Flags)tcflag_t(_CRDLY)Source\r delay mask
CSIZE
CSIZE :: _ = transmute(CControl_Flags)tcflag_t(_CSIZE)Sourcecharacter size mask
EDOM
EDOM :: libc.EDOMSourceerrno.h - system error numbers
EILSEQ
EILSEQ :: libc.EILSEQSourceEOF
EOF :: libc.EOFSourceERANGE
ERANGE :: libc.ERANGESourceEXIT_FAILURE
EXIT_FAILURE :: EXIT_FAILURESourceEXIT_SUCCESS
EXIT_SUCCESS :: EXIT_SUCCESSSourceFFDLY
FFDLY :: _ = transmute(COutput_Flags)tcflag_t(_FFDLY)Sourceform feed delay mask
FILENAME_MAX
FILENAME_MAX :: libc.FILENAME_MAXSourceFOPEN_MAX
FOPEN_MAX :: libc.FOPEN_MAXSourceF_OK
F_OK :: Mode_Flags = Mode_Flags{}SourceINET6_ADDRSTRLEN
INET6_ADDRSTRLEN :: 46SourceINET_ADDRSTRLEN
INET_ADDRSTRLEN :: 16SourceIS_SUPPORTED
IS_SUPPORTED :: _IS_SUPPORTEDSourceLPSELECT
LPSELECT :: "pselect"SourceLSELECT
LSELECT :: "select"SourceMB_CUR_MAX
MB_CUR_MAX :: libc.MB_CUR_MAXSourceNLDLY
NLDLY :: _ = transmute(COutput_Flags)tcflag_t(_NLDLY)Source\n delay mask
O_ACCMODE
O_ACCMODE :: O_Flags = O_Flags{ .EXEC, .RDWR, .WRONLY }SourcePROT_NONE
PROT_NONE :: Prot_Flags = Prot_Flags{}SourceRAND_MAX
RAND_MAX :: libc.RAND_MAXSourceSEEK_CUR
SEEK_CUR :: libc.SEEK_CURSourceSEEK_END
SEEK_END :: libc.SEEK_ENDSourceSEEK_SET
SEEK_SET :: libc.SEEK_SETSourceSIGABRT
SIGABRT :: libc.SIGABRTSourceSIGFPE
SIGFPE :: libc.SIGFPESourceSIGILL
SIGILL :: libc.SIGILLSourceSIGINT
SIGINT :: libc.SIGINTSourceSIGSEGV
SIGSEGV :: libc.SIGSEGVSourceSIGTERM
SIGTERM :: libc.SIGTERMSourceSIG_DFL
SIG_DFL :: libc.SIG_DFLSourceRequest for default signal handling.
SIG_ERR
SIG_ERR :: libc.SIG_ERRSourceReturn value from signal() in case of error.
SIG_IGN
SIG_IGN :: libc.SIG_IGNSourceRequest that signal be ignored.
STDERR_FILENO
STDERR_FILENO :: 2SourceSTDIN_FILENO
STDIN_FILENO :: 0SourceSTDOUT_FILENO
STDOUT_FILENO :: 1SourceS_IFBLK
S_IFBLK :: mode_t = mode_t{ .IFDIR, .IFCHR }SourceS_IFCHR
S_IFCHR :: mode_t = mode_t{ .IFCHR }SourceS_IFDIR
S_IFDIR :: mode_t = mode_t{ .IFDIR }SourceS_IFIFO
S_IFIFO :: mode_t = mode_t{ .IFIFO }SourceS_IFLNK
S_IFLNK :: mode_t = mode_t{ .IFREG, .IFCHR }SourceS_IFMT
S_IFMT :: mode_t = mode_t{ .IFCHR, .IFREG, .IFDIR, .IFIFO }SourceS_IFREG
S_IFREG :: mode_t = mode_t{ .IFREG }SourceS_IFSOCK
S_IFSOCK :: mode_t = mode_t{ .IFREG, .IFDIR }SourceS_IRWXG
S_IRWXG :: mode_t = mode_t{ .IRGRP, .IWGRP, .IXGRP }SourceRead, write, execute group.
S_IRWXO
S_IRWXO :: mode_t = mode_t{ .IROTH, .IWOTH, .IXOTH }SourceRead, write, execute other.
S_IRWXU
S_IRWXU :: mode_t = mode_t{ .IRUSR, .IWUSR, .IXUSR }SourceRead, write, execute user.
TABDLY
TABDLY :: _ = transmute(COutput_Flags)tcflag_t(_TABDLY)Sourcehorizontal tab delay mask
TMP_MAX
TMP_MAX :: libc.TMP_MAXSourceVTDLY
VTDLY :: _ = transmute(COutput_Flags)tcflag_t(_VTDLY)Sourcevertical tab delay mask
_Exit
_Exit :: libc._ExitSource_IOFBF
_IOFBF :: libc._IOFBFSource_IOLBF
_IOLBF :: libc._IOLBFSource_IONBF
_IONBF :: libc._IONBFSource_IS_SUPPORTED
_IS_SUPPORTED :: trueSource_POSIX2_BC_BASE_MAX
_POSIX2_BC_BASE_MAX :: 99Source_POSIX2_BC_DIM_MAX
_POSIX2_BC_DIM_MAX :: 2048Source_POSIX2_BC_SCALE_MAX
_POSIX2_BC_SCALE_MAX :: 99Source_POSIX2_CHARCLASS_NAME_MAX
_POSIX2_CHARCLASS_NAME_MAX :: 14Source_POSIX2_COLL_WEIGHTS_MAX
_POSIX2_COLL_WEIGHTS_MAX :: 2Source_POSIX2_EXPR_NEST_MAX
_POSIX2_EXPR_NEST_MAX :: 32Source_POSIX2_LINE_MAX
_POSIX2_LINE_MAX :: 2048Source_POSIX2_RE_DUP_MAX
_POSIX2_RE_DUP_MAX :: 255Source_POSIX_AIO_LISTIO_MAX
_POSIX_AIO_LISTIO_MAX :: 2SourceThe <limits.h> header shall define the following symbolic constants with the values shown. These are the most restrictive values for certain features on an implementation conforming to this volume of POSIX.1-2017. Related symbolic constants are defined elsewhere in this volume of POSIX.1-2017 which reflect the actual implementation and which need not be as restrictive. For each of these limits, a conforming implementation shall provide a value at least this large or shall have no limit. A strictly conforming application must not require a larger value for correct operation.
_POSIX_AIO_MAX
_POSIX_AIO_MAX :: 1Source_POSIX_ARG_MAX
_POSIX_ARG_MAX :: 4096Source_POSIX_CHILD_MAX
_POSIX_CHILD_MAX :: 25Source_POSIX_CLOCKRES_MIN
_POSIX_CLOCKRES_MIN :: 20000000Sourcelimits.h - implementation-defined constants NOTE: numerical limits are left out because Odin provides min(T) and max(T). The <limits.h> header shall define the following symbolic constants with the values shown. These are the most restrictive values for certain features on an implementation. A conforming implementation shall provide values no larger than these values. A conforming application must not require a smaller value for correct operation.
_POSIX_DELAYTIMER_MAX
_POSIX_DELAYTIMER_MAX :: 32Source_POSIX_HOST_NAME_MAX
_POSIX_HOST_NAME_MAX :: 255Source_POSIX_LINK_MAX
_POSIX_LINK_MAX :: 8Source_POSIX_MAX_CANON
_POSIX_MAX_CANON :: 255Source_POSIX_MAX_INPUT
_POSIX_MAX_INPUT :: 255Source_POSIX_MQ_OPEN_MAX
_POSIX_MQ_OPEN_MAX :: 8Source_POSIX_MQ_PRIO_MAX
_POSIX_MQ_PRIO_MAX :: 32Source_POSIX_NAME_MAX
_POSIX_NAME_MAX :: 14Source_POSIX_NGROUPS_MAX
_POSIX_NGROUPS_MAX :: 8Source_POSIX_OPEN_MAX
_POSIX_OPEN_MAX :: 20Source_POSIX_PATH_MAX
_POSIX_PATH_MAX :: 256Source_POSIX_PIPE_BUF
_POSIX_PIPE_BUF :: 512Source_POSIX_RE_DUP_MAX
_POSIX_RE_DUP_MAX :: 255Source_POSIX_RTSIG_MAX
_POSIX_RTSIG_MAX :: 8Source_POSIX_SEM_NSEMS_MAX
_POSIX_SEM_NSEMS_MAX :: 256Source_POSIX_SEM_VALUE_MAX
_POSIX_SEM_VALUE_MAX :: 32767Source_POSIX_SS_REPL_MAX
_POSIX_SS_REPL_MAX :: 4Source_POSIX_STREAM_MAX
_POSIX_STREAM_MAX :: 8Source_POSIX_SYMLINK_MAX
_POSIX_SYMLINK_MAX :: 255Source_POSIX_SYMLOOP_MAX
_POSIX_SYMLOOP_MAX :: 8Source_POSIX_THREADS_THREADS_MAX
_POSIX_THREADS_THREADS_MAX :: 64Source_POSIX_THREAD_DESTRUCTION_ITERATIONS
_POSIX_THREAD_DESTRUCTION_ITERATIONS :: 4Source_POSIX_THREAD_KEYS_MAX
_POSIX_THREAD_KEYS_MAX :: 128Source_POSIX_TIMER_MAX
_POSIX_TIMER_MAX :: 32Source_POSIX_TRACE_NAME_MAX
_POSIX_TRACE_NAME_MAX :: 8Source_POSIX_TRACE_SYS_MAX
_POSIX_TRACE_SYS_MAX :: 8Source_POSIX_TRACE_USER_EVENT_MAX
_POSIX_TRACE_USER_EVENT_MAX :: 32Source_POSIX_TRAXE_EVENT_NAME_MAX
_POSIX_TRAXE_EVENT_NAME_MAX :: 30Source_POSIX_TTY_NAME_MAX
_POSIX_TTY_NAME_MAX :: 9Source_POSIX_TZNAME_MAX
_POSIX_TZNAME_MAX :: 6Source_S_IFBLK
_S_IFBLK :: 0o060000Source_S_IFCHR
_S_IFCHR :: 0o020000Source_S_IFDIR
_S_IFDIR :: 0o040000Source_S_IFIFO
_S_IFIFO :: 0o010000Source_S_IFLNK
_S_IFLNK :: 0o120000Source_S_IFMT
_S_IFMT :: 0o170000Source_S_IFREG
_S_IFREG :: 0o100000Source_S_IFSOCK
_S_IFSOCK :: 0o140000Source_S_IRGRP
_S_IRGRP :: 0o000040Source_S_IROTH
_S_IROTH :: 0o000004Source_S_IRUSR
_S_IRUSR :: 0o000400Source_S_IRWXG
_S_IRWXG :: 0o000070Source_S_IRWXO
_S_IRWXO :: 0o000007Source_S_IRWXU
_S_IRWXU :: 0o000700Source_S_ISGID
_S_ISGID :: 0o002000Source_S_ISUID
_S_ISUID :: 0o004000Source_S_ISVTX
_S_ISVTX :: 0o001000Source_S_IWGRP
_S_IWGRP :: 0o000020Source_S_IWOTH
_S_IWOTH :: 0o000002Source_S_IWUSR
_S_IWUSR :: 0o000200Source_S_IXGRP
_S_IXGRP :: 0o000010Source_S_IXOTH
_S_IXOTH :: 0o000001Source_S_IXUSR
_S_IXUSR :: 0o000100Source_XOPEN_IOV_MAX
_XOPEN_IOV_MAX :: 16Source_XOPEN_NAME_MAX
_XOPEN_NAME_MAX :: 255Source_XOPEN_PATH_MAX
_XOPEN_PATH_MAX :: 1024Sourceabort
abort :: libc.abortSourceabs
abs :: libc.absSourceasctime
asctime :: libc.asctimeSourceat_quick_exit
at_quick_exit :: libc.at_quick_exitSourceatexit
atexit :: libc.atexitSourceatof
atof :: libc.atofSourcestdlib.h - standard library definitions
atoi
atoi :: libc.atoiSourceatol
atol :: libc.atolSourceatoll
atoll :: libc.atollSourcebsearch
bsearch :: libc.bsearchSourcecalloc
calloc :: libc.callocSourceclearerr
clearerr :: libc.clearerrSourceclock
clock :: libc.clockSourceclock_t
clock_t :: libc.clock_tSourcectime
ctime :: libc.ctimeSourcedifftime
difftime :: libc.difftimeSourcediv
div :: libc.divSourceexit
exit :: libc.exitSourcefclose
fclose :: libc.fcloseSourcefeof
feof :: libc.feofSourceferror
ferror :: libc.ferrorSourcefflush
fflush :: libc.fflushSourcefgetc
fgetc :: libc.fgetcSourcefgetpos
fgetpos :: libc.fgetposSourcefgets
fgets :: libc.fgetsSourcefopen
fopen :: libc.fopenSourcefpos_t
fpos_t :: libc.fpos_tSourcefprintf
fprintf :: libc.fprintfSourcefputc
fputc :: libc.fputcSourcefread
fread :: libc.freadSourcefreopen
freopen :: libc.freopenSourcefscanf
fscanf :: libc.fscanfSourcefseek
fseek :: libc.fseekSourcefsetpos
fsetpos :: libc.fsetposSourceftell
ftell :: libc.ftellSourcefwrite
fwrite :: libc.fwriteSourcegetc
getc :: libc.getcSourcegetchar
getchar :: libc.getcharSourcegetenv
getenv :: libc.getenvSourcegmtime
gmtime :: libc.gmtimeSourcelabs
labs :: libc.labsSourceldiv
ldiv :: libc.ldivSourcellabs
llabs :: libc.llabsSourcelldiv
lldiv :: libc.lldivSourcelocaleconv
localeconv :: libc.localeconvSourcelocaltime
localtime :: libc.localtimeSourcelongjmp
longjmp :: libc.longjmpSourcemalloc
malloc :: libc.mallocSourcemblen
mblen :: libc.mblenSourcembstowcs
mbstowcs :: libc.mbstowcsSourcembtowc
mbtowc :: libc.mbtowcSourcemktime
mktime :: libc.mktimeSourceperror
perror :: libc.perrorSourceprintf
printf :: libc.printfSourceputc
putc :: libc.putsSourceputchar
putchar :: libc.putcharSourceputs
puts :: libc.putsSourceqsort
qsort :: libc.qsortSourcequick_exit
quick_exit :: libc.quick_exitSourcerand
rand :: libc.randSourcerealloc
realloc :: libc.reallocSourceremove
remove :: libc.removeSourcerename
rename :: libc.renameSourcerewind
rewind :: libc.rewindSourcescanf
scanf :: libc.scanfSourcesetbuf
setbuf :: libc.setbufSourcesetjmp
setjmp :: libc.setjmpSourcesetlocale
setlocale :: libc.setlocaleSourcesetvbuf
setvbuf :: libc.setvbufSourcesnprintf
snprintf :: libc.snprintfSourcesrand
srand :: libc.srandSourcesscanf
sscanf :: libc.sscanfSourcestrftime
strftime :: libc.strftimeSourcestrtod
strtod :: libc.strtodSourcestrtof
strtof :: libc.strtofSourcestrtol
strtol :: libc.strtolSourcestrtoll
strtoll :: libc.strtollSourcestrtoul
strtoul :: libc.strtoulSourcestrtoull
strtoull :: libc.strtoullSourcesystem
system :: libc.systemSourcetime
time :: libc.timeSourcetime_t
time_t :: libc.time_tSourcetimespec
timespec :: libc.timespecSourcetm
tm :: libc.tmSourcetmpfile
tmpfile :: libc.tmpfileSourcetmpnam
tmpnam :: libc.tmpnamSourceungetc
ungetc :: libc.ungetcSourcevfprintf
vfprintf :: libc.vfprintfSourcevfscanf
vfscanf :: libc.vfscanfSourcevprintf
vprintf :: libc.vprintfSourcevscanf
vscanf :: libc.vscanfSourcevsnprintf
vsnprintf :: libc.vsnprintfSourcevsprintf
vsprintf :: libc.vsprintfSourcevsscanf
vsscanf :: libc.vsscanfSourcewcstombs
wcstombs :: libc.wcstombsSourcewctomb
wctomb :: libc.wctombSourceVariables
3Procedures
19S_ISBLK
S_ISBLK :: proc(m: mode_t) -> (bool)SourceTest for a block special file.
S_ISCHR
S_ISCHR :: proc(m: mode_t) -> (bool)SourceTest for a character special file.
S_ISDIR
S_ISDIR :: proc(m: mode_t) -> (bool)SourceTest for a directory.
S_ISFIFO
S_ISFIFO :: proc(m: mode_t) -> (bool)SourceTest for a pipe or FIFO special file.
S_ISLNK
S_ISLNK :: proc(m: mode_t) -> (bool)SourceTest for a symbolic link.
S_ISREG
S_ISREG :: proc(m: mode_t) -> (bool)SourceTest for a regular file.
S_ISSOCK
S_ISSOCK :: proc(m: mode_t) -> (bool)SourceTest for a socket.
WEXITSTATUS
WEXITSTATUS :: proc(x: c.int) -> (c.int)SourceIf WIFEXITED is true, returns the exit status.
WIFCONTINUED
WIFCONTINUED :: proc(x: c.int) -> (bool)SourceIf status was returned for a child process that has continued from a job control stop.
WIFEXITED
WIFEXITED :: proc(x: c.int) -> (bool)SourceIf terminated normally.
WIFSIGNALED
WIFSIGNALED :: proc(x: c.int) -> (bool)SourceIf terminated due to an uncaught signal.
WIFSTOPPED
WIFSTOPPED :: proc(x: c.int) -> (bool)SourceIf status was returned for a child process that is currently stopped.
WSTOPSIG
WSTOPSIG :: proc(x: c.int) -> (Signal)SourceIf WIFSTOPPED, the signal that caused the child process to stop.
WTERMSIG
WTERMSIG :: proc(x: c.int) -> (Signal)SourceIf WIFSIGNALED is true, returns the signal.
free
free :: proc(ptr: T)Sourceget_errno
get_errno :: proc() -> (Errno)Sourceset_errno
set_errno :: proc(err: Errno)Sourcestrerror
strerror :: proc(errnum: Maybe(Errno)) -> (cstring)Sourceto_stream
to_stream :: proc(file: ^FILE) -> (io.Stream)Source