# # # Nimrod's Runtime Library # (c) Copyright 2009 Andreas Rumpf # # See the file "copying.txt", included in this # distribution, for details about the copyright. # # Until std_arg!! # done: ipc, pwd, stat, semaphore, sys/types, sys/utsname, pthread, unistd, # statvfs, mman, time, wait, signal, nl_types, sched, spawn, select, ucontext, # net/if, sys/socket, sys/uio, netinet/in, netinet/tcp, netdb ## This is a raw POSIX interface module. It does not not provide any ## convenience: cstrings are used instead of proper Nimrod strings and ## return codes indicate errors. If you want exceptions ## and a proper Nimrod-like interface, use the OS module or write a wrapper. ## Coding conventions: ## ALL types are named the same as in the POSIX standard except that they start ## with 'T' or 'P' (if they are pointers) and without the '_t' prefix to be ## consistent with Nimrod conventions. If an identifier is a Nimrod keyword ## the \`identifier\` notation is used. ## ## This library relies on the header files of your C compiler. Thus the ## resulting C code will just include and *not* define the ## symbols declared here. const hasSpawnH = defined(linux) hasAioH = defined(linux) const C_IRUSR* = 0c000400 ## Read by owner. C_IWUSR* = 0c000200 ## Write by owner. C_IXUSR* = 0c000100 ## Execute by owner. C_IRGRP* = 0c000040 ## Read by group. C_IWGRP* = 0c000020 ## Write by group. C_IXGRP* = 0c000010 ## Execute by group. C_IROTH* = 0c000004 ## Read by others. C_IWOTH* = 0c000002 ## Write by others. C_IXOTH* = 0c000001 ## Execute by others. C_ISUID* = 0c004000 ## Set user ID. C_ISGID* = 0c002000 ## Set group ID. C_ISVTX* = 0c001000 ## On directories, restricted deletion flag. C_ISDIR* = 0c040000 ## Directory. C_ISFIFO* = 0c010000 ##FIFO. C_ISREG* = 0c100000 ## Regular file. C_ISBLK* = 0c060000 ## Block special. C_ISCHR* = 0c020000 ## Character special. C_ISCTG* = 0c110000 ## Reserved. C_ISLNK* = 0c120000 ## Symbolic link.

C_ISSOCK* = 0c140000 ## Socket. MM_NULLLBL* = nil MM_NULLSEV* = 0 MM_NULLMC* = 0 MM_NULLTXT* = nil MM_NULLACT* = nil MM_NULLTAG* = nil STDERR_FILENO* = 2 ## File number of stderr; STDIN_FILENO* = 0 ## File number of stdin; STDOUT_FILENO* = 1 ## File number of stdout; type TDIR* {.importc: "DIR", header: "", final, pure.} = object ## A type representing a directory stream. Tdirent* {.importc: "struct dirent", header: "", final, pure.} = object ## dirent_t struct d_ino*: TIno ## File serial number. d_name*: array [0..255, char] ## Name of entry. Tflock* {.importc: "flock", final, pure, header: "".} = object ## flock type l_type*: cshort ## Type of lock; F_RDLCK, F_WRLCK, F_UNLCK. l_whence*: cshort ## Flag for starting offset. l_start*: Toff ## Relative offset in bytes. l_len*: Toff ## Size; if 0 then until EOF. l_pid*: TPid ## Process ID of the process holding the lock; ## returned with F_GETLK. Tfenv* {.importc: "fenv_t", header: "", final, pure.} = object ## Represents the entire floating-point environment. The ## floating-point environment refers collectively to any ## floating-point status flags and control modes supported ## by the implementation. Tfexcept* {.importc: "fexcept_t", header: "", final, pure.} = object ## Represents the floating-point status flags collectively, ## including any status the implementation associates with the ## flags. A floating-point status flag is a system variable ## whose value is set (but never cleared) when a floating-point ## exception is raised, which occurs as a side effect of ## exceptional floating-point arithmetic to provide auxiliary ## information. A floating-point control mode is a system variable ## whose value may be set by the user to affect the subsequent ## behavior of floating-point arithmetic. TFTW* {.importc: "struct FTW", header: "", final, pure.} = object base*: cint level*: cint TGlob* {.importc: "glob_t", header: "", final, pure.} = object ## glob_t gl_pathc*: int ## Count of paths matched by pattern. gl_pathv*: ptr cstring ## Pointer to a list of matched pathnames. gl_offs*: int ## Slots to reserve at the beginning of gl_pathv. TGroup* {.importc: "struct group", header: "", final, pure.} = object ## struct group gr_name*: cstring ## The name of the group. gr_gid*: TGid ## Numerical group ID. gr_mem*: cstringArray ## Pointer to a null-terminated array of character ## pointers to member names. Ticonv* {.importc: "iconv_t", header: "", final, pure.} = object ## Identifies the conversion from one codeset to another. Tlconv* {.importc: "struct lconv", header: "", final, pure.} = object currency_symbol*: cstring decimal_point*: cstring frac_digits*: char grouping*: cstring int_curr_symbol*: cstring int_frac_digits*: char int_n_cs_precedes*: char int_n_sep_by_space*: char int_n_sign_posn*: char int_p_cs_precedes*: char int_p_sep_by_space*: char int_p_sign_posn*: char mon_decimal_point*: cstring mon_grouping*: cstring mon_thousands_sep*: cstring negative_sign*: cstring n_cs_precedes*: char n_sep_by_space*: char n_sign_posn*: char positive_sign*: cstring p_cs_precedes*: char p_sep_by_space*: char p_sign_posn*: char thousands_sep*: cstring TMqd* {.importc: "mqd_t", header: "", final, pure.} = object TMqAttr* {.importc: "struct mq_attr", header: "", final, pure.} = object ## message queue attribute mq_flags*: int ## Message queue flags. mq_maxmsg*: int ## Maximum number of messages. mq_msgsize*: int ## Maximum message size. mq_curmsgs*: int ## Number of messages currently queued. TPasswd* {.importc: "struct passwd", header: "", final, pure.} = object ## struct passwd pw_name*: cstring ## User's login name. pw_uid*: TUid ## Numerical user ID. pw_gid*: TGid ## Numerical group ID. pw_dir*: cstring ## Initial working directory. pw_shell*: cstring ## Program to use as shell. Tblkcnt* {.importc: "blkcnt_t", header: "".} = int ## used for file block counts Tblksize* {.importc: "blksize_t", header: "".} = int ## used for block sizes TClock* {.importc: "clock_t", header: "".} = int TClockId* {.importc: "clockid_t", header: "".} = int TDev* {.importc: "dev_t", header: "".} = int Tfsblkcnt* {.importc: "fsblkcnt_t", header: "".} = int Tfsfilcnt* {.importc: "fsfilcnt_t", header: "".} = int TGid* {.importc: "gid_t", header: "".} = int Tid* {.importc: "id_t", header: "".} = int Tino* {.importc: "ino_t", header: "".} = int TKey* {.importc: "key_t", header: "".} = int TMode* {.importc: "mode_t", header: "".} = int TNlink* {.importc: "nlink_t", header: "".} = int TOff* {.importc: "off_t", header: "".} = int64 TPid* {.importc: "pid_t", header: "".} = int Tpthread_attr* {.importc: "pthread_attr_t", header: "".} = int Tpthread_barrier* {.importc: "pthread_barrier_t", header: "".} = int Tpthread_barrierattr* {.importc: "pthread_barrierattr_t", header: "".} = int Tpthread_cond* {.importc: "pthread_cond_t", header: "".} = int Tpthread_condattr* {.importc: "pthread_condattr_t", header: "".} = int Tpthread_key* {.importc: "pthread_key_t", header: "".} = int Tpthread_mutex* {.importc: "pthread_mutex_t", header: "".} = int Tpthread_mutexattr* {.importc: "pthread_mutexattr_t", header: "".} = int Tpthread_once* {.importc: "pthread_once_t", header: "".} = int Tpthread_rwlock* {.importc: "pthread_rwlock_t", header: "".} = int Tpthread_rwlockattr* {.importc: "pthread_rwlockattr_t", header: "".} = int Tpthread_spinlock* {.importc: "pthread_spinlock_t", header: "".} = int Tpthread* {.importc: "pthread_t", header: "".} = int Tsuseconds* {.importc: "suseconds_t", header: "".} = int Ttime* {.importc: "time_t", header: "".} = int Ttimer* {.importc: "timer_t", header: "".} = int Ttrace_attr* {.importc: "trace_attr_t", header: "".} = int Ttrace_event_id* {.importc: "trace_event_id_t", header: "".} = int Ttrace_event_set* {.importc: "trace_event_set_t", header: "".} = int Ttrace_id* {.importc: "trace_id_t", header: "".} = int Tuid* {.importc: "uid_t", header: "".} = int Tuseconds* {.importc: "useconds_t", header: "".} = int Tutsname* {.importc: "struct utsname", header: "", final, pure.} = object ## struct utsname sysname*, ## Name of this implementation of the operating system. nodename*, ## Name of this node within the communications ## network to which this node is attached, if any. release*, ## Current release level of this implementation. version*, ## Current version level of this release. machine*: array [0..255, char] ## Name of the hardware type on which the ## system is running. TSem* {.importc: "sem_t", header: "", final, pure.} = object Tipc_perm* {.importc: "struct ipc_perm", header: "", final, pure.} = object ## struct ipc_perm uid*: tuid ## Owner's user ID. gid*: tgid ## Owner's group ID. cuid*: Tuid ## Creator's user ID. cgid*: Tgid ## Creator's group ID. mode*: TMode ## Read/write permission. TStat* {.importc: "struct stat", header: "", final, pure.} = object ## struct stat st_dev*: TDev ## Device ID of device containing file. st_ino*: TIno ## File serial number. st_mode*: TMode ## Mode of file (see below). st_nlink*: tnlink ## Number of hard links to the file. st_uid*: tuid ## User ID of file. st_gid*: Tgid ## Group ID of file. st_rdev*: TDev ## Device ID (if file is character or block special). st_size*: TOff ## For regular files, the file size in bytes. ## For symbolic links, the length in bytes of the ## pathname contained in the symbolic link. ## For a shared memory object, the length in bytes. ## For a typed memory object, the length in bytes. ## For other file types, the use of this field is ## unspecified. st_atime*: ttime ## Time of last access. st_mtime*: ttime ## Time of last data modification. st_ctime*: ttime ## Time of last status change. st_blksize*: Tblksize ## A file system-specific preferred I/O block size ## for this object. In some file system types, this ## may vary from file to file. st_blocks*: Tblkcnt ## Number of blocks allocated for this object. TStatvfs* {.importc: "struct statvfs", header: "", final, pure.} = object ## struct statvfs f_bsize*: int ## File system block size. f_frsize*: int ## Fundamental file system block size. f_blocks*: Tfsblkcnt ## Total number of blocks on file system ## in units of f_frsize. f_bfree*: Tfsblkcnt ## Total number of free blocks. f_bavail*: Tfsblkcnt ## Number of free blocks available to ## non-privileged process. f_files*: Tfsfilcnt ## Total number of file serial numbers. f_ffree*: Tfsfilcnt ## Total number of free file serial numbers. f_favail*: Tfsfilcnt ## Number of file serial numbers available to ## non-privileged process. f_fsid*: int ## File system ID. f_flag*: int ## Bit mask of f_flag values. f_namemax*: int ## Maximum filename length. Tposix_typed_mem_info* {.importc: "struct posix_typed_mem_info", header: "", final, pure.} = object posix_tmi_length*: int Ttm* {.importc: "struct tm", header: "", final, pure.} = object ## struct tm tm_sec*: cint ## Seconds [0,60]. tm_min*: cint ## Minutes [0,59]. tm_hour*: cint ## Hour [0,23]. tm_mday*: cint ## Day of month [1,31]. tm_mon*: cint ## Month of year [0,11]. tm_year*: cint ## Years since 1900. tm_wday*: cint ## Day of week [0,6] (Sunday =0). tm_yday*: cint ## Day of year [0,365]. tm_isdst*: cint ## Daylight Savings flag. Ttimespec* {.importc: "struct timespec", header: "", final, pure.} = object ## struct timespec tv_sec*: Ttime ## Seconds. tv_nsec*: int ## Nanoseconds. titimerspec* {.importc: "struct itimerspec", header: "", final, pure.} = object ## struct itimerspec it_interval*: ttimespec ## Timer period. it_value*: ttimespec ## Timer expiration. Tsig_atomic* {.importc: "sig_atomic_t", header: "".} = cint ## Possibly volatile-qualified integer type of an object that can be ## accessed as an atomic entity, even in the presence of asynchronous ## interrupts. Tsigset* {.importc: "sigset_t", header: "", final, pure.} = object TsigEvent* {.importc: "struct sigevent", header: "", final, pure.} = object ## struct sigevent sigev_notify*: cint ## Notification type. sigev_signo*: cint ## Signal number. sigev_value*: Tsigval ## Signal value. sigev_notify_function*: proc (x: TSigval) {.noconv.} ## Notification function. sigev_notify_attributes*: ptr Tpthreadattr ## Notification attributes. TsigVal* {.importc: "union sigval", header: "", final, pure.} = object ## struct sigval sival_ptr*: pointer ## pointer signal value; ## integer signal value not defined! TSigaction* {.importc: "struct sigaction", header: "", final, pure.} = object ## struct sigaction sa_handler*: proc (x: cint) {.noconv.} ## Pointer to a signal-catching ## function or one of the macros ## SIG_IGN or SIG_DFL. sa_mask*: TsigSet ## Set of signals to be blocked during execution of ## the signal handling function. sa_flags*: cint ## Special flags. sa_sigaction*: proc (x: cint, y: var TSigInfo, z: pointer) {.noconv.} TStack* {.importc: "stack_t", header: "", final, pure.} = object ## stack_t ss_sp*: pointer ## Stack base or pointer. ss_size*: int ## Stack size. ss_flags*: cint ## Flags. TSigStack* {.importc: "struct sigstack", header: "", final, pure.} = object ## struct sigstack ss_onstack*: cint ## Non-zero when signal stack is in use. ss_sp*: pointer ## Signal stack pointer. TsigInfo* {.importc: "siginfo_t", header: "", final, pure.} = object ## siginfo_t si_signo*: cint ## Signal number. si_code*: cint ## Signal code. si_errno*: cint ## If non-zero, an errno value associated with ## this signal, as defined in . si_pid*: tpid ## Sending process ID. si_uid*: tuid ## Real user ID of sending process. si_addr*: pointer ## Address of faulting instruction. si_status*: cint ## Exit value or signal. si_band*: int ## Band event for SIGPOLL. si_value*: TSigval ## Signal value. Tnl_item* {.importc: "nl_item", header: "".} = cint Tnl_catd* {.importc: "nl_catd", header: "".} = cint Tsched_param* {.importc: "struct sched_param", header: "", final, pure.} = object ## struct sched_param sched_priority*: cint sched_ss_low_priority*: cint ## Low scheduling priority for ## sporadic server. sched_ss_repl_period*: ttimespec ## Replenishment period for ## sporadic server. sched_ss_init_budget*: ttimespec ## Initial budget for sporadic server. sched_ss_max_repl*: cint ## Maximum pending replenishments for ## sporadic server. Ttimeval* {.importc: "struct timeval", header: "", final, pure.} = object ## struct timeval tv_sec*: ttime ## Seconds. tv_usec*: tsuseconds ## Microseconds. Tfd_set* {.importc: "struct fd_set", header: "", final, pure.} = object Tmcontext* {.importc: "mcontext_t", header: "", final, pure.} = object Tucontext* {.importc: "ucontext_t", header: "", final, pure.} = object ## ucontext_t uc_link*: ptr Tucontext ## Pointer to the context that is resumed ## when this context returns. uc_sigmask*: Tsigset ## The set of signals that are blocked when this ## context is active. uc_stack*: TStack ## The stack used by this context. uc_mcontext*: Tmcontext ## A machine-specific representation of the saved ## context. when hasAioH: type Taiocb* {.importc: "struct aiocb", header: "", final, pure.} = object ## struct aiocb aio_fildes*: cint ## File descriptor. aio_offset*: TOff ## File offset. aio_buf*: pointer ## Location of buffer. aio_nbytes*: int ## Length of transfer. aio_reqprio*: cint ## Request priority offset. aio_sigevent*: TSigEvent ## Signal number and value. aio_lio_opcode: cint ## Operation to be performed. when hasSpawnH: type Tposix_spawnattr* {.importc: "posix_spawnattr_t", header: "".} = cint Tposix_spawn_file_actions* {.importc: "posix_spawn_file_actions_t", header: "".} = cint type Tif_nameindex* {.importc: "struct if_nameindex", final, pure, header: "".} = object ## struct if_nameindex if_index*: cint ## Numeric index of the interface. if_name*: cstring ## Null-terminated name of the interface. TSocklen* {.importc: "socklen_t", header: "".} = cint TSa_Family* {.importc: "sa_family_t", header: "".} = cint TSockAddr* {.importc: "struct sockaddr", header: "", pure, final.} = object ## struct sockaddr sa_family*: Tsa_family ## Address family. sa_data*: array [0..255, char] ## Socket address (variable-length data). Tsockaddr_storage* {.importc: "struct sockaddr_storage", header: "", pure, final.} = object ## struct sockaddr_storage ss_family*: Tsa_family ## Address family. TIOVec* {.importc: "struct iovec", pure, final, header: "".} = object ## struct iovec iov_base*: pointer ## Base address of a memory region for input or output. iov_len*: int ## The size of the memory pointed to by iov_base. Tmsghdr* {.importc: "struct msghdr", pure, final, header: "".} = object ## struct msghdr msg_name*: pointer ## Optional address. msg_namelen*: TSockLen ## Size of address. msg_iov*: ptr TIOVec ## Scatter/gather array. msg_iovlen*: cint ## Members in msg_iov. msg_control*: pointer ## Ancillary data; see below. msg_controllen*: TSockLen ## Ancillary data buffer len. msg_flags*: cint ## Flags on received message. Tcmsghdr* {.importc: "struct cmsghdr", pure, final, header: "".} = object ## struct cmsghdr cmsg_len*: TSockLen ## Data byte count, including the cmsghdr. cmsg_level*: cint ## Originating protocol. cmsg_type*: cint ## Protocol-specific type. TLinger* {.importc: "struct linger", pure, final, header: "".} = object ## struct linger l_onoff*: cint ## Indicates whether linger option is enabled. l_linger*: cint ## Linger time, in seconds. TInPort* = int16 ## unsigned! TInAddrScalar* = int32 ## unsigned! TInAddr* {.importc: "struct in_addr", pure, final, header: "".} = object ## struct in_addr s_addr*: TInAddrScalar Tsockaddr_in* {.importc: "struct sockaddr_in", pure, final, header: "".} = object ## struct sockaddr_in sin_family*: TSa_family ## AF_INET. sin_port*: TInPort ## Port number. sin_addr*: TInAddr ## IP address. TIn6Addr* {.importc: "struct in6_addr", pure, final, header: "".} = object ## struct in6_addr s6_addr*: array [0..15, char] Tsockaddr_in6* {.importc: "struct sockaddr_in6", pure, final, header: "".} = object ## struct sockaddr_in6 sin6_family*: TSa_family ## AF_INET6. sin6_port*: TInPort ## Port number. sin6_flowinfo*: int32 ## IPv6 traffic class and flow information. sin6_addr*: Tin6Addr ## IPv6 address. sin6_scope_id*: int32 ## Set of interfaces for a scope. Tipv6_mreq* {.importc: "struct ipv6_mreq", pure, final, header: "".} = object ## struct ipv6_mreq ipv6mr_multiaddr*: TIn6Addr ## IPv6 multicast address. ipv6mr_interface*: cint ## Interface index. Thostent* {.importc: "struct hostent", pure, final, header: "".} = object ## struct hostent h_name*: cstring ## Official name of the host. h_aliases*: cstringArray ## A pointer to an array of pointers to ## alternative host names, terminated by a ## null pointer. h_addrtype*: cint ## Address type. h_length*: cint ## The length, in bytes, of the address. h_addr_list*: cstringArray ## A pointer to an array of pointers to network ## addresses (in network byte order) for the ## host, terminated by a null pointer. Tnetent* {.importc: "struct netent", pure, final, header: "".} = object ## struct netent n_name*: cstring ## Official, fully-qualified (including the ## domain) name of the host. n_aliases*: cstringArray ## A pointer to an array of pointers to ## alternative network names, terminated by a ## null pointer. n_addrtype*: cint ## The address type of the network. n_net*: int32 ## The network number, in host byte order. TProtoent* {.importc: "struct protoent", pure, final, header: "".} = object ## struct protoent p_name*: cstring ## Official name of the protocol. p_aliases*: cstringArray ## A pointer to an array of pointers to ## alternative protocol names, terminated by ## a null pointer. p_proto*: cint ## The protocol number. TServent* {.importc: "struct servent", pure, final, header: "".} = object ## struct servent s_name*: cstring ## Official name of the service. s_aliases*: cstringArray ## A pointer to an array of pointers to ## alternative service names, terminated by ## a null pointer. s_port*: cint ## The port number at which the service ## resides, in network byte order. s_proto*: cstring ## The name of the protocol to use when ## contacting the service. Taddrinfo* {.importc: "struct addrinfo", pure, final, header: "".} = object ## struct addrinfo ai_flags*: cint ## Input flags. ai_family*: cint ## Address family of socket. ai_socktype*: cint ## Socket type. ai_protocol*: cint ## Protocol of socket. ai_addrlen*: TSockLen ## Length of socket address. ai_addr*: ptr TSockAddr ## Socket address of socket. ai_canonname*: cstring ## Canonical name of service location. ai_next*: ptr TAddrInfo ## Pointer to next in list. TPollfd* {.importc: "struct pollfd", pure, final, header: "".} = object ## struct pollfd fd*: cint ## The following descriptor being polled. events*: cshort ## The input event flags (see below). revents*: cshort ## The output event flags (see below). Tnfds* {.importc: "nfds_t", header: "".} = cint var errno* {.importc, header: "".}: cint ## error variable daylight* {.importc, header: "".}: cint timezone* {.importc, header: "".}: int # Constants as variables: when hasAioH: var AIO_ALLDONE* {.importc, header: "".}: cint ## A return value indicating that none of the requested operations ## could be canceled since they are already complete. AIO_CANCELED* {.importc, header: "".}: cint ## A return value indicating that all requested operations have ## been canceled. AIO_NOTCANCELED* {.importc, header: "".}: cint ## A return value indicating that some of the requested operations could ## not be canceled since they are in progress. LIO_NOP* {.importc, header: "".}: cint ## A lio_listio() element operation option indicating that no transfer is ## requested. LIO_NOWAIT* {.importc, header: "".}: cint ## A lio_listio() synchronization operation indicating that the calling ## thread is to continue execution while the lio_listio() operation is ## being performed, and no notification is given when the operation is ## complete. LIO_READ* {.importc, header: "".}: cint ## A lio_listio() element operation option requesting a read. LIO_WAIT* {.importc, header: "".}: cint ## A lio_listio() synchronization operation indicating that the calling ## thread is to suspend until the lio_listio() operation is complete. LIO_WRITE* {.importc, header: "".}: cint ## A lio_listio() element operation option requesting a write. var RTLD_LAZY* {.importc, header: "".}: cint ## Relocations are performed at an implementation-defined time. RTLD_NOW* {.importc, header: "".}: cint ## Relocations are performed when the object is loaded. RTLD_GLOBAL* {.importc, header: "".}: cint ## All symbols are available for relocation processing of other modules. RTLD_LOCAL* {.importc, header: "".}: cint ## All symbols are not made available for relocation processing by ## other modules. E2BIG* {.importc, header: "".}: cint ## Argument list too long. EACCES* {.importc, header: "".}: cint ## Permission denied. EADDRINUSE* {.importc, header: "".}: cint ## Address in use. EADDRNOTAVAIL* {.importc, header: "".}: cint ## Address not available. EAFNOSUPPORT* {.importc, header: "".}: cint ## Address family not supported. EAGAIN* {.importc, header: "".}: cint ## Resource unavailable, try again (may be the same value as [EWOULDBLOCK]). EALREADY* {.importc, header: "".}: cint ## Connection already in progress. EBADF* {.importc, header: "".}: cint ## Bad file descriptor. EBADMSG* {.importc, header: "".}: cint ## Bad message. EBUSY* {.importc, header: "".}: cint ## Device or resource busy. ECANCELED* {.importc, header: "".}: cint ## Operation canceled. ECHILD* {.importc, header: "".}: cint ## No child processes. ECONNABORTED* {.importc, header: "".}: cint ## Connection aborted. ECONNREFUSED* {.importc, header: "".}: cint ## Connection refused. ECONNRESET* {.importc, header: "".}: cint ## Connection reset. EDEADLK* {.importc, header: "".}: cint ## Resource deadlock would occur. EDESTADDRREQ* {.importc, header: "".}: cint ## Destination address required. EDOM* {.importc, header: "".}: cint ## Mathematics argument out of domain of function. EDQUOT* {.importc, header: "".}: cint ## Reserved. EEXIST* {.importc, header: "".}: cint ## File exists. EFAULT* {.importc, header: "".}: cint ## Bad address. EFBIG* {.importc, header: "".}: cint ## File too large. EHOSTUNREACH* {.importc, header: "".}: cint ## Host is unreachable. EIDRM* {.importc, header: "".}: cint ## Identifier removed. EILSEQ* {.importc, header: "".}: cint ## Illegal byte sequence. EINPROGRESS* {.importc, header: "".}: cint ## Operation in progress. EINTR* {.importc, header: "".}: cint ## Interrupted function. EINVAL* {.importc, header: "".}: cint ## Invalid argument. EIO* {.importc, header: "".}: cint ## I/O error. EISCONN* {.importc, header: "".}: cint ## Socket is connected. EISDIR* {.importc, header: "".}: cint ## Is a directory. ELOOP* {.importc, header: "".}: cint ## Too many levels of symbolic links. EMFILE* {.importc, header: "".}: cint ## Too many open files. EMLINK* {.importc, header: "".}: cint ## Too many links. EMSGSIZE* {.importc, header: "".}: cint ## Message too large. EMULTIHOP* {.importc, header: "".}: cint ## Reserved. ENAMETOOLONG* {.importc, header: "".}: cint ## Filename too long. ENETDOWN* {.importc, header: "".}: cint ## Network is down. ENETRESET* {.importc, header: "".}: cint ## Connection aborted by network. ENETUNREACH* {.importc, header: "".}: cint ## Network unreachable. ENFILE* {.importc, header: "".}: cint ## Too many files open in system. ENOBUFS* {.importc, header: "".}: cint ## No buffer space available. ENODATA* {.importc, header: "".}: cint ## No message is available on the STREAM head read queue. ENODEV* {.importc, header: "".}: cint ## No such device. ENOENT* {.importc, header: "".}: cint ## No such file or directory. ENOEXEC* {.importc, header: "".}: cint ## Executable file format error. ENOLCK* {.importc, header: "".}: cint ## No locks available. ENOLINK* {.importc, header: "".}: cint ## Reserved. ENOMEM* {.importc, header: "".}: cint ## Not enough space. ENOMSG* {.importc, header: "".}: cint ## No message of the desired type. ENOPROTOOPT* {.importc, header: "".}: cint ## Protocol not available. ENOSPC* {.importc, header: "".}: cint ## No space left on device. ENOSR* {.importc, header: "".}: cint ## No STREAM resources. ENOSTR* {.importc, header: "".}: cint ## Not a STREAM. ENOSYS* {.importc, header: "".}: cint ## Function not supported. ENOTCONN* {.importc, header: "".}: cint ## The socket is not connected. ENOTDIR* {.importc, header: "".}: cint ## Not a directory. ENOTEMPTY* {.importc, header: "".}: cint ## Directory not empty. ENOTSOCK* {.importc, header: "".}: cint ## Not a socket. ENOTSUP* {.importc, header: "".}: cint ## Not supported. ENOTTY* {.importc, header: "".}: cint ## Inappropriate I/O control operation. ENXIO* {.importc, header: "".}: cint ## No such device or address. EOPNOTSUPP* {.importc, header: "".}: cint ## Operation not supported on socket. EOVERFLOW* {.importc, header: "".}: cint ## Value too large to be stored in data type. EPERM* {.importc, header: "".}: cint ## Operation not permitted. EPIPE* {.importc, header: "".}: cint ## Broken pipe. EPROTO* {.importc, header: "".}: cint ## Protocol error. EPROTONOSUPPORT* {.importc, header: "".}: cint ## Protocol not supported. EPROTOTYPE* {.importc, header: "".}: cint ## Protocol wrong type for socket. ERANGE* {.importc, header: "".}: cint ## Result too large. EROFS* {.importc, header: "".}: cint ## Read-only file system. ESPIPE* {.importc, header: "".}: cint ## Invalid seek. ESRCH* {.importc, header: "".}: cint ## No such process. ESTALE* {.importc, header: "".}: cint ## Reserved. ETIME* {.importc, header: "".}: cint ## Stream ioctl() timeout. ETIMEDOUT* {.importc, header: "".}: cint ## Connection timed out. ETXTBSY* {.importc, header: "".}: cint ## Text file busy. EWOULDBLOCK* {.importc, header: "".}: cint ## Operation would block (may be the same value as [EAGAIN]). EXDEV* {.importc, header: "".}: cint ## Cross-device link. F_DUPFD* {.importc, header: "".}: cint ## Duplicate file descriptor. F_GETFD* {.importc, header: "".}: cint ## Get file descriptor flags. F_SETFD* {.importc, header: "".}: cint ## Set file descriptor flags. F_GETFL* {.importc, header: "".}: cint ## Get file status flags and file access modes. F_SETFL* {.importc, header: "".}: cint ## Set file status flags. F_GETLK* {.importc, header: "".}: cint ## Get record locking information. F_SETLK* {.importc, header: "".}: cint ## Set record locking information. F_SETLKW* {.importc, header: "".}: cint ## Set record locking information; wait if blocked. F_GETOWN* {.importc, header: "".}: cint ## Get process or process group ID to receive SIGURG signals. F_SETOWN* {.importc, header: "".}: cint ## Set process or process group ID to receive SIGURG signals. FD_CLOEXEC* {.importc, header: "".}: cint ## Close the file descriptor upon execution of an exec family function. F_RDLCK* {.importc, header: "".}: cint ## Shared or read lock. F_UNLCK* {.importc, header: "".}: cint ## Unlock. F_WRLCK* {.importc, header: "".}: cint ## Exclusive or write lock. O_CREAT* {.importc, header: "".}: cint ## Create file if it does not exist. O_EXCL* {.importc, header: "".}: cint ## Exclusive use flag. O_NOCTTY* {.importc, header: "".}: cint ## Do not assign controlling terminal. O_TRUNC* {.importc, header: "".}: cint ## Truncate flag. O_APPEND* {.importc, header: "".}: cint ## Set append mode. O_DSYNC* {.importc, header: "".}: cint ## Write according to synchronized I/O data integrity completion. O_NONBLOCK* {.importc, header: "".}: cint ## Non-blocking mode. O_RSYNC* {.importc, header: "".}: cint ## Synchronized read I/O operations. O_SYNC* {.importc, header: "".}: cint ## Write according to synchronized I/O file integrity completion. O_ACCMODE* {.importc, header: "".}: cint ## Mask for file access modes. O_RDONLY* {.importc, header: "".}: cint ## Open for reading only. O_RDWR* {.importc, header: "".}: cint ## Open for reading and writing. O_WRONLY* {.importc, header: "".}: cint ## Open for writing only. POSIX_FADV_NORMAL* {.importc, header: "".}: cint ## The application has no advice to give on its behavior with ## respect to the specified data. It is the default characteristic ## if no advice is given for an open file. POSIX_FADV_SEQUENTIAL* {.importc, header: "".}: cint ## The application expects to access the specified data # sequentially from lower offsets to higher offsets. POSIX_FADV_RANDOM* {.importc, header: "".}: cint ## The application expects to access the specified data in a random order. POSIX_FADV_WILLNEED* {.importc, header: "".}: cint ## The application expects to access the specified data in the near future. POSIX_FADV_DONTNEED* {.importc, header: "".}: cint ## The application expects that it will not access the specified data ## in the near future. POSIX_FADV_NOREUSE* {.importc, header: "".}: cint ## The application expects to access the specified data once and ## then not reuse it thereafter. FE_DIVBYZERO* {.importc, header: "".}: cint FE_INEXACT* {.importc, header: "".}: cint FE_INVALID* {.importc, header: "".}: cint FE_OVERFLOW* {.importc, header: "".}: cint FE_UNDERFLOW* {.importc, header: "".}: cint FE_ALL_EXCEPT* {.importc, header: "".}: cint FE_DOWNWARD* {.importc, header: "".}: cint FE_TONEAREST* {.importc, header: "".}: cint FE_TOWARDZERO* {.importc, header: "".}: cint FE_UPWARD* {.importc, header: "".}: cint FE_DFL_ENV* {.importc, header: "".}: cint MM_HARD* {.importc, header: "".}: cint ## Source of the condition is hardware. MM_SOFT* {.importc, header: "".}: cint ## Source of the condition is software. MM_FIRM* {.importc, header: "".}: cint ## Source of the condition is firmware. MM_APPL* {.importc, header: "".}: cint ## Condition detected by application. MM_UTIL* {.importc, header: "".}: cint ## Condition detected by utility. MM_OPSYS* {.importc, header: "".}: cint ## Condition detected by operating system. MM_RECOVER* {.importc, header: "".}: cint ## Recoverable error. MM_NRECOV* {.importc, header: "".}: cint ## Non-recoverable error. MM_HALT* {.importc, header: "".}: cint ## Error causing application to halt. MM_ERROR* {.importc, header: "".}: cint ## Application has encountered a non-fatal fault. MM_WARNING* {.importc, header: "".}: cint ## Application has detected unusual non-error condition. MM_INFO* {.importc, header: "".}: cint ## Informative message. MM_NOSEV* {.importc, header: "".}: cint ## No severity level provided for the message. MM_PRINT* {.importc, header: "".}: cint ## Display message on standard error. MM_CONSOLE* {.importc, header: "".}: cint ## Display message on system console. MM_OK* {.importc, header: "".}: cint ## The function succeeded. MM_NOTOK* {.importc, header: "".}: cint ## The function failed completely. MM_NOMSG* {.importc, header: "".}: cint ## The function was unable to generate a message on standard error, ## but otherwise succeeded. MM_NOCON* {.importc, header: "".}: cint ## The function was unable to generate a console message, but ## otherwise succeeded. FNM_NOMATCH* {.importc, header: "".}: cint ## The string does not match the specified pattern. FNM_PATHNAME* {.importc, header: "".}: cint ## Slash in string only matches slash in pattern. FNM_PERIOD* {.importc, header: "".}: cint ## Leading period in string must be exactly matched by period in pattern. FNM_NOESCAPE* {.importc, header: "".}: cint ## Disable backslash escaping. FNM_NOSYS* {.importc, header: "".}: cint ## Reserved. FTW_F* {.importc, header: "".}: cint ## File. FTW_D* {.importc, header: "".}: cint ## Directory. FTW_DNR* {.importc, header: "".}: cint ## Directory without read permission. FTW_DP* {.importc, header: "".}: cint ## Directory with subdirectories visited. FTW_NS* {.importc, header: "".}: cint ## Unknown type; stat() failed. FTW_SL* {.importc, header: "".}: cint ## Symbolic link. FTW_SLN* {.importc, header: "".}: cint ## Symbolic link that names a nonexistent file. FTW_PHYS* {.importc, header: "".}: cint ## Physical walk, does not follow symbolic links. Otherwise, nftw() ## follows links but does not walk down any path that crosses itself. FTW_MOUNT* {.importc, header: "".}: cint ## The walk does not cross a mount point. FTW_DEPTH* {.importc, header: "".}: cint ## All subdirectories are visited before the directory itself. FTW_CHDIR* {.importc, header: "".}: cint ## The walk changes to each directory before reading it. GLOB_APPEND* {.importc, header: "".}: cint ## Append generated pathnames to those previously obtained. GLOB_DOOFFS* {.importc, header: "".}: cint ## Specify how many null pointers to add to the beginning of gl_pathv. GLOB_ERR* {.importc, header: "".}: cint ## Cause glob() to return on error. GLOB_MARK* {.importc, header: "".}: cint ## Each pathname that is a directory that matches pattern has a ## slash appended. GLOB_NOCHECK* {.importc, header: "".}: cint ## If pattern does not match any pathname, then return a list ## consisting of only pattern. GLOB_NOESCAPE* {.importc, header: "".}: cint ## Disable backslash escaping. GLOB_NOSORT* {.importc, header: "".}: cint ## Do not sort the pathnames returned. GLOB_ABORTED* {.importc, header: "".}: cint ## The scan was stopped because GLOB_ERR was set or errfunc() ## returned non-zero. GLOB_NOMATCH* {.importc, header: "".}: cint ## The pattern does not match any existing pathname, and GLOB_NOCHECK ## was not set in flags. GLOB_NOSPACE* {.importc, header: "".}: cint ## An attempt to allocate memory failed. GLOB_NOSYS* {.importc, header: "".}: cint ## Reserved CODESET* {.importc, header: "".}: cint ## Codeset name. D_T_FMT* {.importc, header: "".}: cint ## String for formatting date and time. D_FMT * {.importc, header: "".}: cint ## Date format string. T_FMT* {.importc, header: "".}: cint ## Time format string. T_FMT_AMPM* {.importc, header: "".}: cint ## a.m. or p.m. time format string. AM_STR* {.importc, header: "".}: cint ## Ante-meridiem affix. PM_STR* {.importc, header: "".}: cint ## Post-meridiem affix. DAY_1* {.importc, header: "".}: cint ## Name of the first day of the week (for example, Sunday). DAY_2* {.importc, header: "".}: cint ## Name of the second day of the week (for example, Monday). DAY_3* {.importc, header: "".}: cint ## Name of the third day of the week (for example, Tuesday). DAY_4* {.importc, header: "".}: cint ## Name of the fourth day of the week (for example, Wednesday). DAY_5* {.importc, header: "".}: cint ## Name of the fifth day of the week (for example, Thursday). DAY_6* {.importc, header: "".}: cint ## Name of the sixth day of the week (for example, Friday). DAY_7* {.importc, header: "".}: cint ## Name of the seventh day of the week (for example, Saturday). ABDAY_1* {.importc, header: "".}: cint ## Abbreviated name of the first day of the week. ABDAY_2* {.importc, header: "".}: cint ABDAY_3* {.importc, header: "".}: cint ABDAY_4* {.importc, header: "".}: cint ABDAY_5* {.importc, header: "".}: cint ABDAY_6* {.importc, header: "".}: cint ABDAY_7* {.importc, header: "".}: cint MON_1* {.importc, header: "".}: cint ## Name of the first month of the year. MON_2* {.importc, header: "".}: cint MON_3* {.importc, header: "".}: cint MON_4* {.importc, header: "".}: cint MON_5* {.importc, header: "".}: cint MON_6* {.importc, header: "".}: cint MON_7* {.importc, header: "".}: cint MON_8* {.importc, header: "".}: cint MON_9* {.importc, header: "".}: cint MON_10* {.importc, header: "".}: cint MON_11* {.importc, header: "".}: cint MON_12* {.importc, header: "".}: cint ABMON_1* {.importc, header: "".}: cint ## Abbreviated name of the first month. ABMON_2* {.importc, header: "".}: cint ABMON_3* {.importc, header: "".}: cint ABMON_4* {.importc, header: "".}: cint ABMON_5* {.importc, header: "".}: cint ABMON_6* {.importc, header: "".}: cint ABMON_7* {.importc, header: "".}: cint ABMON_8* {.importc, header: "".}: cint ABMON_9* {.importc, header: "".}: cint ABMON_10* {.importc, header: "".}: cint ABMON_11* {.importc, header: "".}: cint ABMON_12* {.importc, header: "".}: cint ERA* {.importc, header: "".}: cint ## Era description segments. ERA_D_FMT* {.importc, header: "".}: cint ## Era date format string. ERA_D_T_FMT* {.importc, header: "".}: cint ## Era date and time format string. ERA_T_FMT* {.importc, header: "".}: cint ## Era time format string. ALT_DIGITS* {.importc, header: "".}: cint ## Alternative symbols for digits. RADIXCHAR* {.importc, header: "".}: cint ## Radix character. THOUSEP* {.importc, header: "".}: cint ## Separator for thousands. YESEXPR* {.importc, header: "".}: cint ## Affirmative response expression. NOEXPR* {.importc, header: "".}: cint ## Negative response expression. CRNCYSTR* {.importc, header: "".}: cint ## Local currency symbol, preceded by '-' if the symbol ## should appear before the value, '+' if the symbol should appear ## after the value, or '.' if the symbol should replace the radix ## character. If the local currency symbol is the empty string, ## implementations may return the empty string ( "" ). LC_ALL* {.importc, header: "".}: cint LC_COLLATE* {.importc, header: "".}: cint LC_CTYPE* {.importc, header: "".}: cint LC_MESSAGES* {.importc, header: "".}: cint LC_MONETARY* {.importc, header: "".}: cint LC_NUMERIC* {.importc, header: "".}: cint LC_TIME* {.importc, header: "".}: cint PTHREAD_BARRIER_SERIAL_THREAD* {.importc, header: "".}: cint PTHREAD_CANCEL_ASYNCHRONOUS* {.importc, header: "".}: cint PTHREAD_CANCEL_ENABLE* {.importc, header: "".}: cint PTHREAD_CANCEL_DEFERRED* {.importc, header: "".}: cint PTHREAD_CANCEL_DISABLE* {.importc, header: "".}: cint PTHREAD_CANCELED* {.importc, header: "".}: cint PTHREAD_COND_INITIALIZER* {.importc, header: "".}: cint PTHREAD_CREATE_DETACHED* {.importc, header: "".}: cint PTHREAD_CREATE_JOINABLE* {.importc, header: "".}: cint PTHREAD_EXPLICIT_SCHED* {.importc, header: "".}: cint PTHREAD_INHERIT_SCHED* {.importc, header: "".}: cint PTHREAD_MUTEX_DEFAULT* {.importc, header: "".}: cint PTHREAD_MUTEX_ERRORCHECK* {.importc, header: "".}: cint PTHREAD_MUTEX_INITIALIZER* {.importc, header: "".}: cint PTHREAD_MUTEX_NORMAL* {.importc, header: "".}: cint PTHREAD_MUTEX_RECURSIVE* {.importc, header: "".}: cint PTHREAD_ONCE_INIT* {.importc, header: "".}: cint PTHREAD_PRIO_INHERIT* {.importc, header: "".}: cint PTHREAD_PRIO_NONE* {.importc, header: "".}: cint PTHREAD_PRIO_PROTECT* {.importc, header: "".}: cint PTHREAD_PROCESS_SHARED* {.importc, header: "".}: cint PTHREAD_PROCESS_PRIVATE* {.importc, header: "".}: cint PTHREAD_SCOPE_PROCESS* {.importc, header: "".}: cint PTHREAD_SCOPE_SYSTEM* {.importc, header: "".}: cint POSIX_ASYNC_IO* {.importc: "_POSIX_ASYNC_IO", header: "".}: cint POSIX_PRIO_IO* {.importc: "_POSIX_PRIO_IO", header: "".}: cint POSIX_SYNC_IO* {.importc: "_POSIX_SYNC_IO", header: "".}: cint F_OK* {.importc: "F_OK", header: "".}: cint R_OK* {.importc: "R_OK", header: "".}: cint W_OK* {.importc: "W_OK", header: "".}: cint X_OK* {.importc: "X_OK", header: "".}: cint CS_PATH* {.importc: "_CS_PATH", header: "".}: cint CS_POSIX_V6_ILP32_OFF32_CFLAGS* {.importc: "_CS_POSIX_V6_ILP32_OFF32_CFLAGS", header: "".}: cint CS_POSIX_V6_ILP32_OFF32_LDFLAGS* {.importc: "_CS_POSIX_V6_ILP32_OFF32_LDFLAGS", header: "".}: cint CS_POSIX_V6_ILP32_OFF32_LIBS* {.importc: "_CS_POSIX_V6_ILP32_OFF32_LIBS", header: "".}: cint CS_POSIX_V6_ILP32_OFFBIG_CFLAGS* {.importc: "_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS", header: "".}: cint CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS* {.importc: "_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS", header: "".}: cint CS_POSIX_V6_ILP32_OFFBIG_LIBS* {.importc: "_CS_POSIX_V6_ILP32_OFFBIG_LIBS", header: "".}: cint CS_POSIX_V6_LP64_OFF64_CFLAGS* {.importc: "_CS_POSIX_V6_LP64_OFF64_CFLAGS", header: "".}: cint CS_POSIX_V6_LP64_OFF64_LDFLAGS* {.importc: "_CS_POSIX_V6_LP64_OFF64_LDFLAGS", header: "".}: cint CS_POSIX_V6_LP64_OFF64_LIBS* {.importc: "_CS_POSIX_V6_LP64_OFF64_LIBS", header: "".}: cint CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS* {.importc: "_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS", header: "".}: cint CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS* {.importc: "_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS", header: "".}: cint CS_POSIX_V6_LPBIG_OFFBIG_LIBS* {.importc: "_CS_POSIX_V6_LPBIG_OFFBIG_LIBS", header: "".}: cint CS_POSIX_V6_WIDTH_RESTRICTED_ENVS* {.importc: "_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS", header: "".}: cint F_LOCK* {.importc: "F_LOCK", header: "".}: cint F_TEST* {.importc: "F_TEST", header: "".}: cint F_TLOCK* {.importc: "F_TLOCK", header: "".}: cint F_ULOCK* {.importc: "F_ULOCK", header: "".}: cint PC_2_SYMLINKS* {.importc: "_PC_2_SYMLINKS", header: "".}: cint PC_ALLOC_SIZE_MIN* {.importc: "_PC_ALLOC_SIZE_MIN", header: "".}: cint PC_ASYNC_IO* {.importc: "_PC_ASYNC_IO", header: "".}: cint PC_CHOWN_RESTRICTED* {.importc: "_PC_CHOWN_RESTRICTED", header: "".}: cint PC_FILESIZEBITS* {.importc: "_PC_FILESIZEBITS", header: "".}: cint PC_LINK_MAX* {.importc: "_PC_LINK_MAX", header: "".}: cint PC_MAX_CANON* {.importc: "_PC_MAX_CANON", header: "".}: cint PC_MAX_INPUT*{.importc: "_PC_MAX_INPUT", header: "".}: cint PC_NAME_MAX*{.importc: "_PC_NAME_MAX", header: "".}: cint PC_NO_TRUNC*{.importc: "_PC_NO_TRUNC", header: "".}: cint PC_PATH_MAX*{.importc: "_PC_PATH_MAX", header: "".}: cint PC_PIPE_BUF*{.importc: "_PC_PIPE_BUF", header: "".}: cint PC_PRIO_IO*{.importc: "_PC_PRIO_IO", header: "".}: cint PC_REC_INCR_XFER_SIZE*{.importc: "_PC_REC_INCR_XFER_SIZE", header: "".}: cint PC_REC_MIN_XFER_SIZE*{.importc: "_PC_REC_MIN_XFER_SIZE", header: "".}: cint PC_REC_XFER_ALIGN*{.importc: "_PC_REC_XFER_ALIGN", header: "".}: cint PC_SYMLINK_MAX*{.importc: "_PC_SYMLINK_MAX", header: "".}: cint PC_SYNC_IO*{.importc: "_PC_SYNC_IO", header: "".}: cint PC_VDISABLE*{.importc: "_PC_VDISABLE", header: "".}: cint SC_2_C_BIND*{.importc: "_SC_2_C_BIND", header: "".}: cint SC_2_C_DEV*{.importc: "_SC_2_C_DEV", header: "".}: cint SC_2_CHAR_TERM*{.importc: "_SC_2_CHAR_TERM", header: "".}: cint SC_2_FORT_DEV*{.importc: "_SC_2_FORT_DEV", header: "".}: cint SC_2_FORT_RUN*{.importc: "_SC_2_FORT_RUN", header: "".}: cint SC_2_LOCALEDEF*{.importc: "_SC_2_LOCALEDEF", header: "".}: cint SC_2_PBS*{.importc: "_SC_2_PBS", header: "".}: cint SC_2_PBS_ACCOUNTING*{.importc: "_SC_2_PBS_ACCOUNTING", header: "".}: cint SC_2_PBS_CHECKPOINT*{.importc: "_SC_2_PBS_CHECKPOINT", header: "".}: cint SC_2_PBS_LOCATE*{.importc: "_SC_2_PBS_LOCATE", header: "".}: cint SC_2_PBS_MESSAGE*{.importc: "_SC_2_PBS_MESSAGE", header: "".}: cint SC_2_PBS_TRACK*{.importc: "_SC_2_PBS_TRACK", header: "".}: cint SC_2_SW_DEV*{.importc: "_SC_2_SW_DEV", header: "".}: cint SC_2_UPE*{.importc: "_SC_2_UPE", header: "".}: cint SC_2_VERSION*{.importc: "_SC_2_VERSION", header: "".}: cint SC_ADVISORY_INFO*{.importc: "_SC_ADVISORY_INFO", header: "".}: cint SC_AIO_LISTIO_MAX*{.importc: "_SC_AIO_LISTIO_MAX", header: "".}: cint SC_AIO_MAX*{.importc: "_SC_AIO_MAX", header: "".}: cint SC_AIO_PRIO_DELTA_MAX*{.importc: "_SC_AIO_PRIO_DELTA_MAX", header: "".}: cint SC_ARG_MAX*{.importc: "_SC_ARG_MAX", header: "".}: cint SC_ASYNCHRONOUS_IO*{.importc: "_SC_ASYNCHRONOUS_IO", header: "".}: cint SC_ATEXIT_MAX*{.importc: "_SC_ATEXIT_MAX", header: "".}: cint SC_BARRIERS*{.importc: "_SC_BARRIERS", header: "".}: cint SC_BC_BASE_MAX*{.importc: "_SC_BC_BASE_MAX", header: "".}: cint SC_BC_DIM_MAX*{.importc: "_SC_BC_DIM_MAX", header: "".}: cint SC_BC_SCALE_MAX*{.importc: "_SC_BC_SCALE_MAX", header: "".}: cint SC_BC_STRING_MAX*{.importc: "_SC_BC_STRING_MAX", header: "".}: cint SC_CHILD_MAX*{.importc: "_SC_CHILD_MAX", header: "".}: cint SC_CLK_TCK*{.importc: "_SC_CLK_TCK", header: "".}: cint SC_CLOCK_SELECTION*{.importc: "_SC_CLOCK_SELECTION", header: "".}: cint SC_COLL_WEIGHTS_MAX*{.importc: "_SC_COLL_WEIGHTS_MAX", header: "".}: cint SC_CPUTIME*{.importc: "_SC_CPUTIME", header: "".}: cint SC_DELAYTIMER_MAX*{.importc: "_SC_DELAYTIMER_MAX", header: "".}: cint SC_EXPR_NEST_MAX*{.importc: "_SC_EXPR_NEST_MAX", header: "".}: cint SC_FSYNC*{.importc: "_SC_FSYNC", header: "".}: cint SC_GETGR_R_SIZE_MAX*{.importc: "_SC_GETGR_R_SIZE_MAX", header: "".}: cint SC_GETPW_R_SIZE_MAX*{.importc: "_SC_GETPW_R_SIZE_MAX", header: "".}: cint SC_HOST_NAME_MAX*{.importc: "_SC_HOST_NAME_MAX", header: "".}: cint SC_IOV_MAX*{.importc: "_SC_IOV_MAX", header: "".}: cint SC_IPV6*{.importc: "_SC_IPV6", header: "".}: cint SC_JOB_CONTROL*{.importc: "_SC_JOB_CONTROL", header: "".}: cint SC_LINE_MAX*{.importc: "_SC_LINE_MAX", header: "".}: cint SC_LOGIN_NAME_MAX*{.importc: "_SC_LOGIN_NAME_MAX", header: "".}: cint SC_MAPPED_FILES*{.importc: "_SC_MAPPED_FILES", header: "".}: cint SC_MEMLOCK*{.importc: "_SC_MEMLOCK", header: "".}: cint SC_MEMLOCK_RANGE*{.importc: "_SC_MEMLOCK_RANGE", header: "".}: cint SC_MEMORY_PROTECTION*{.importc: "_SC_MEMORY_PROTECTION", header: "".}: cint SC_MESSAGE_PASSING*{.importc: "_SC_MESSAGE_PASSING", header: "".}: cint SC_MONOTONIC_CLOCK*{.importc: "_SC_MONOTONIC_CLOCK", header: "".}: cint SC_MQ_OPEN_MAX*{.importc: "_SC_MQ_OPEN_MAX", header: "".}: cint SC_MQ_PRIO_MAX*{.importc: "_SC_MQ_PRIO_MAX", header: "".}: cint SC_NGROUPS_MAX*{.importc: "_SC_NGROUPS_MAX", header: "".}: cint SC_OPEN_MAX*{.importc: "_SC_OPEN_MAX", header: "".}: cint SC_PAGE_SIZE*{.importc: "_SC_PAGE_SIZE", header: "".}: cint SC_PRIORITIZED_IO*{.importc: "_SC_PRIORITIZED_IO", header: "".}: cint SC_PRIORITY_SCHEDULING*{.importc: "_SC_PRIORITY_SCHEDULING", header: "".}: cint SC_RAW_SOCKETS*{.importc: "_SC_RAW_SOCKETS", header: "".}: cint SC_RE_DUP_MAX*{.importc: "_SC_RE_DUP_MAX", header: "".}: cint SC_READER_WRITER_LOCKS*{.importc: "_SC_READER_WRITER_LOCKS", header: "".}: cint SC_REALTIME_SIGNALS*{.importc: "_SC_REALTIME_SIGNALS", header: "".}: cint SC_REGEXP*{.importc: "_SC_REGEXP", header: "".}: cint SC_RTSIG_MAX*{.importc: "_SC_RTSIG_MAX", header: "".}: cint SC_SAVED_IDS*{.importc: "_SC_SAVED_IDS", header: "".}: cint SC_SEM_NSEMS_MAX*{.importc: "_SC_SEM_NSEMS_MAX", header: "".}: cint SC_SEM_VALUE_MAX*{.importc: "_SC_SEM_VALUE_MAX", header: "".}: cint SC_SEMAPHORES*{.importc: "_SC_SEMAPHORES", header: "".}: cint SC_SHARED_MEMORY_OBJECTS*{.importc: "_SC_SHARED_MEMORY_OBJECTS", header: "".}: cint SC_SHELL*{.importc: "_SC_SHELL", header: "".}: cint SC_SIGQUEUE_MAX*{.importc: "_SC_SIGQUEUE_MAX", header: "".}: cint SC_SPAWN*{.importc: "_SC_SPAWN", header: "".}: cint SC_SPIN_LOCKS*{.importc: "_SC_SPIN_LOCKS", header: "".}: cint SC_SPORADIC_SERVER*{.importc: "_SC_SPORADIC_SERVER", header: "".}: cint SC_SS_REPL_MAX*{.importc: "_SC_SS_REPL_MAX", header: "".}: cint SC_STREAM_MAX*{.importc: "_SC_STREAM_MAX", header: "".}: cint SC_SYMLOOP_MAX*{.importc: "_SC_SYMLOOP_MAX", header: "".}: cint SC_SYNCHRONIZED_IO*{.importc: "_SC_SYNCHRONIZED_IO", header: "".}: cint SC_THREAD_ATTR_STACKADDR*{.importc: "_SC_THREAD_ATTR_STACKADDR", header: "".}: cint SC_THREAD_ATTR_STACKSIZE*{.importc: "_SC_THREAD_ATTR_STACKSIZE", header: "".}: cint SC_THREAD_CPUTIME*{.importc: "_SC_THREAD_CPUTIME", header: "".}: cint SC_THREAD_DESTRUCTOR_ITERATIONS*{.importc: "_SC_THREAD_DESTRUCTOR_ITERATIONS", header: "".}: cint SC_THREAD_KEYS_MAX*{.importc: "_SC_THREAD_KEYS_MAX", header: "".}: cint SC_THREAD_PRIO_INHERIT*{.importc: "_SC_THREAD_PRIO_INHERIT", header: "".}: cint SC_THREAD_PRIO_PROTECT*{.importc: "_SC_THREAD_PRIO_PROTECT", header: "".}: cint SC_THREAD_PRIORITY_SCHEDULING*{.importc: "_SC_THREAD_PRIORITY_SCHEDULING", header: "".}: cint SC_THREAD_PROCESS_SHARED*{.importc: "_SC_THREAD_PROCESS_SHARED", header: "".}: cint SC_THREAD_SAFE_FUNCTIONS*{.importc: "_SC_THREAD_SAFE_FUNCTIONS", header: "".}: cint SC_THREAD_SPORADIC_SERVER*{.importc: "_SC_THREAD_SPORADIC_SERVER", header: "".}: cint SC_THREAD_STACK_MIN*{.importc: "_SC_THREAD_STACK_MIN", header: "".}: cint SC_THREAD_THREADS_MAX*{.importc: "_SC_THREAD_THREADS_MAX", header: "".}: cint SC_THREADS*{.importc: "_SC_THREADS", header: "".}: cint SC_TIMEOUTS*{.importc: "_SC_TIMEOUTS", header: "".}: cint SC_TIMER_MAX*{.importc: "_SC_TIMER_MAX", header: "".}: cint SC_TIMERS*{.importc: "_SC_TIMERS", header: "".}: cint SC_TRACE*{.importc: "_SC_TRACE", header: "".}: cint SC_TRACE_EVENT_FILTER*{.importc: "_SC_TRACE_EVENT_FILTER", header: "".}: cint SC_TRACE_EVENT_NAME_MAX*{.importc: "_SC_TRACE_EVENT_NAME_MAX", header: "".}: cint SC_TRACE_INHERIT*{.importc: "_SC_TRACE_INHERIT", header: "".}: cint SC_TRACE_LOG*{.importc: "_SC_TRACE_LOG", header: "".}: cint SC_TRACE_NAME_MAX*{.importc: "_SC_TRACE_NAME_MAX", header: "".}: cint SC_TRACE_SYS_MAX*{.importc: "_SC_TRACE_SYS_MAX", header: "".}: cint SC_TRACE_USER_EVENT_MAX*{.importc: "_SC_TRACE_USER_EVENT_MAX", header: "".}: cint SC_TTY_NAME_MAX*{.importc: "_SC_TTY_NAME_MAX", header: "".}: cint SC_TYPED_MEMORY_OBJECTS*{.importc: "_SC_TYPED_MEMORY_OBJECTS", header: "".}: cint SC_TZNAME_MAX*{.importc: "_SC_TZNAME_MAX", header: "".}: cint SC_V6_ILP32_OFF32*{.importc: "_SC_V6_ILP32_OFF32", header: "".}: cint SC_V6_ILP32_OFFBIG*{.importc: "_SC_V6_ILP32_OFFBIG", header: "".}: cint SC_V6_LP64_OFF64*{.importc: "_SC_V6_LP64_OFF64", header: "".}: cint SC_V6_LPBIG_OFFBIG*{.importc: "_SC_V6_LPBIG_OFFBIG", header: "".}: cint SC_VERSION*{.importc: "_SC_VERSION", header: "".}: cint SC_XBS5_ILP32_OFF32*{.importc: "_SC_XBS5_ILP32_OFF32", header: "".}: cint SC_XBS5_ILP32_OFFBIG*{.importc: "_SC_XBS5_ILP32_OFFBIG", header: "".}: cint SC_XBS5_LP64_OFF64*{.importc: "_SC_XBS5_LP64_OFF64", header: "".}: cint SC_XBS5_LPBIG_OFFBIG*{.importc: "_SC_XBS5_LPBIG_OFFBIG", header: "".}: cint SC_XOPEN_CRYPT*{.importc: "_SC_XOPEN_CRYPT", header: "".}: cint SC_XOPEN_ENH_I18N*{.importc: "_SC_XOPEN_ENH_I18N", header: "".}: cint SC_XOPEN_LEGACY*{.importc: "_SC_XOPEN_LEGACY", header: "".}: cint SC_XOPEN_REALTIME*{.importc: "_SC_XOPEN_REALTIME", header: "".}: cint SC_XOPEN_REALTIME_THREADS*{.importc: "_SC_XOPEN_REALTIME_THREADS", header: "".}: cint SC_XOPEN_SHM*{.importc: "_SC_XOPEN_SHM", header: "".}: cint SC_XOPEN_STREAMS*{.importc: "_SC_XOPEN_STREAMS", header: "".}: cint SC_XOPEN_UNIX*{.importc: "_SC_XOPEN_UNIX", header: "".}: cint SC_XOPEN_VERSION*{.importc: "_SC_XOPEN_VERSION", header: "".}: cint SEM_FAILED* {.importc, header: "".}: pointer IPC_CREAT* {.importc, header: "".}: cint ## Create entry if key does not exist. IPC_EXCL* {.importc, header: "".}: cint ## Fail if key exists. IPC_NOWAIT* {.importc, header: "".}: cint ## Error if request must wait. IPC_PRIVATE* {.importc, header: "".}: cint ## Private key. IPC_RMID* {.importc, header: "".}: cint ## Remove identifier. IPC_SET* {.importc, header: "".}: cint ## Set options. IPC_STAT* {.importc, header: "".}: cint ## Get options. S_IFMT* {.importc, header: "".}: cint ## Type of file. S_IFBLK* {.importc, header: "".}: cint ## Block special. S_IFCHR* {.importc, header: "".}: cint ## Character special. S_IFIFO* {.importc, header: "".}: cint ## FIFO special. S_IFREG* {.importc, header: "".}: cint ## Regular. S_IFDIR* {.importc, header: "".}: cint ## Directory. S_IFLNK* {.importc, header: "".}: cint ## Symbolic link. S_IFSOCK* {.importc, header: "".}: cint ## Socket. S_IRWXU* {.importc, header: "".}: cint ## Read, write, execute/search by owner. S_IRUSR* {.importc, header: "".}: cint ## Read permission, owner. S_IWUSR* {.importc, header: "".}: cint ## Write permission, owner. S_IXUSR* {.importc, header: "".}: cint ## Execute/search permission, owner. S_IRWXG* {.importc, header: "".}: cint ## Read, write, execute/search by group. S_IRGRP* {.importc, header: "".}: cint ## Read permission, group. S_IWGRP* {.importc, header: "".}: cint ## Write permission, group. S_IXGRP* {.importc, header: "".}: cint ## Execute/search permission, group. S_IRWXO* {.importc, header: "".}: cint ## Read, write, execute/search by others. S_IROTH* {.importc, header: "".}: cint ## Read permission, others. S_IWOTH* {.importc, header: "".}: cint ## Write permission, others. S_IXOTH* {.importc, header: "".}: cint ## Execute/search permission, others. S_ISUID* {.importc, header: "".}: cint ## Set-user-ID on execution. S_ISGID* {.importc, header: "".}: cint ## Set-group-ID on execution. S_ISVTX* {.importc, header: "".}: cint ## On directories, restricted deletion flag. ST_RDONLY* {.importc, header: "".}: cint ## Read-only file system. ST_NOSUID* {.importc, header: "".}: cint ## Does not support the semantics of the ST_ISUID and ST_ISGID file mode bits. PROT_READ* {.importc, header: "".}: cint ## Page can be read. PROT_WRITE* {.importc, header: "".}: cint ## Page can be written. PROT_EXEC* {.importc, header: "".}: cint ## Page can be executed. PROT_NONE* {.importc, header: "".}: cint ## Page cannot be accessed. MAP_SHARED* {.importc, header: "".}: cint ## Share changes. MAP_PRIVATE* {.importc, header: "".}: cint ## Changes are private. MAP_FIXED* {.importc, header: "".}: cint ## Interpret addr exactly. MS_ASYNC* {.importc, header: "".}: cint ## Perform asynchronous writes. MS_SYNC* {.importc, header: "".}: cint ## Perform synchronous writes. MS_INVALIDATE* {.importc, header: "".}: cint ## Invalidate mappings. MCL_CURRENT* {.importc, header: "".}: cint ## Lock currently mapped pages. MCL_FUTURE* {.importc, header: "".}: cint ## Lock pages that become mapped. MAP_FAILED* {.importc, header: "".}: cint POSIX_MADV_NORMAL* {.importc, header: "".}: cint ## The application has no advice to give on its behavior with ## respect to the specified range. It is the default characteristic ## if no advice is given for a range of memory. POSIX_MADV_SEQUENTIAL* {.importc, header: "".}: cint ## The application expects to access the specified range sequentially ## from lower addresses to higher addresses. POSIX_MADV_RANDOM* {.importc, header: "".}: cint ## The application expects to access the specified range in a random order. POSIX_MADV_WILLNEED* {.importc, header: "".}: cint ## The application expects to access the specified range in the near future. POSIX_MADV_DONTNEED* {.importc, header: "".}: cint POSIX_TYPED_MEM_ALLOCATE* {.importc, header: "".}: cint POSIX_TYPED_MEM_ALLOCATE_CONTIG* {.importc, header: "".}: cint POSIX_TYPED_MEM_MAP_ALLOCATABLE* {.importc, header: "".}: cint CLOCKS_PER_SEC* {.importc, header: "".}: int ## A number used to convert the value returned by the clock() function ## into seconds. CLOCK_PROCESS_CPUTIME_ID* {.importc, header: "".}: cint ## The identifier of the CPU-time clock associated with the process ## making a clock() or timer*() function call. CLOCK_THREAD_CPUTIME_ID* {.importc, header: "".}: cint CLOCK_REALTIME* {.importc, header: "".}: cint ## The identifier of the system-wide realtime clock. TIMER_ABSTIME* {.importc, header: "".}: cint ## Flag indicating time is absolute. For functions taking timer ## objects, this refers to the clock associated with the timer. CLOCK_MONOTONIC* {.importc, header: "".}: cint WNOHANG* {.importc, header: "".}: cint ## Do not hang if no status is available; return immediately. WUNTRACED* {.importc, header: "".}: cint ## Report status of stopped child process. WEXITSTATUS* {.importc, header: "".}: cint ## Return exit status. WIFCONTINUED* {.importc, header: "".}: cint ## True if child has been continued. WIFEXITED* {.importc, header: "".}: cint ## True if child exited normally. WIFSIGNALED* {.importc, header: "".}: cint ## True if child exited due to uncaught signal. WIFSTOPPED* {.importc, header: "".}: cint ## True if child is currently stopped. WSTOPSIG* {.importc, header: "".}: cint ## Return signal number that caused process to stop. WTERMSIG* {.importc, header: "".}: cint ## Return signal number that caused process to terminate. WEXITED* {.importc, header: "".}: cint ## Wait for processes that have exited. WSTOPPED* {.importc, header: "".}: cint ## Status is returned for any child that has stopped upon receipt of a signal. WCONTINUED* {.importc, header: "".}: cint ## Status is returned for any child that was stopped and has been continued. WNOWAIT* {.importc, header: "".}: cint ## Keep the process whose status is returned in infop in a waitable state. P_ALL* {.importc, header: "".}: cint P_PID* {.importc, header: "".}: cint P_PGID* {.importc, header: "".}: cint SIG_DFL* {.importc, header: "".}: proc (x: cint) {.noconv.} ## Request for default signal handling. SIG_ERR* {.importc, header: "".}: proc (x: cint) {.noconv.} ## Return value from signal() in case of error. cSIG_HOLD* {.importc: "SIG_HOLD", header: "".}: proc (x: cint) {.noconv.} ## Request that signal be held. SIG_IGN* {.importc, header: "".}: proc (x: cint) {.noconv.} ## Request that signal be ignored. SIGEV_NONE* {.importc, header: "".}: cint SIGEV_SIGNAL* {.importc, header: "".}: cint SIGEV_THREAD* {.importc, header: "".}: cint SIGABRT* {.importc, header: "".}: cint SIGALRM* {.importc, header: "".}: cint SIGBUS* {.importc, header: "".}: cint SIGCHLD* {.importc, header: "".}: cint SIGCONT* {.importc, header: "".}: cint SIGFPE* {.importc, header: "".}: cint SIGHUP* {.importc, header: "".}: cint SIGILL* {.importc, header: "".}: cint SIGINT* {.importc, header: "".}: cint SIGKILL* {.importc, header: "".}: cint SIGPIPE* {.importc, header: "".}: cint SIGQUIT* {.importc, header: "".}: cint SIGSEGV* {.importc, header: "".}: cint SIGSTOP* {.importc, header: "".}: cint SIGTERM* {.importc, header: "".}: cint SIGTSTP* {.importc, header: "".}: cint SIGTTIN* {.importc, header: "".}: cint SIGTTOU* {.importc, header: "".}: cint SIGUSR1* {.importc, header: "".}: cint SIGUSR2* {.importc, header: "".}: cint SIGPOLL* {.importc, header: "".}: cint SIGPROF* {.importc, header: "".}: cint SIGSYS* {.importc, header: "".}: cint SIGTRAP* {.importc, header: "".}: cint SIGURG* {.importc, header: "".}: cint SIGVTALRM* {.importc, header: "".}: cint SIGXCPU* {.importc, header: "".}: cint SIGXFSZ* {.importc, header: "".}: cint SA_NOCLDSTOP* {.importc, header: "".}: cint SIG_BLOCK* {.importc, header: "".}: cint SIG_UNBLOCK* {.importc, header: "".}: cint SIG_SETMASK* {.importc, header: "".}: cint SA_ONSTACK* {.importc, header: "".}: cint SA_RESETHAND* {.importc, header: "".}: cint SA_RESTART* {.importc, header: "".}: cint SA_SIGINFO* {.importc, header: "".}: cint SA_NOCLDWAIT* {.importc, header: "".}: cint SA_NODEFER* {.importc, header: "".}: cint SS_ONSTACK* {.importc, header: "".}: cint SS_DISABLE* {.importc, header: "".}: cint MINSIGSTKSZ* {.importc, header: "".}: cint SIGSTKSZ* {.importc, header: "".}: cint NL_SETD* {.importc, header: "".}: cint NL_CAT_LOCALE* {.importc, header: "".}: cint SCHED_FIFO* {.importc, header: "".}: cint SCHED_RR* {.importc, header: "".}: cint SCHED_SPORADIC* {.importc, header: "".}: cint SCHED_OTHER* {.importc, header: "".}: cint FD_SETSIZE* {.importc, header: "".}: cint SEEK_SET* {.importc, header: "".}: cint SEEK_CUR* {.importc, header: "".}: cint SEEK_END* {.importc, header: "".}: cint IF_NAMESIZE* {.importc, header: "".}: cint SCM_RIGHTS* {.importc, header: "".}: cint ## Indicates that the data array contains the access rights ## to be sent or received. SOCK_DGRAM* {.importc, header: "".}: cint ## Datagram socket. SOCK_RAW* {.importc, header: "".}: cint ## Raw Protocol Interface. SOCK_SEQPACKET* {.importc, header: "".}: cint ## Sequenced-packet socket. SOCK_STREAM* {.importc, header: "".}: cint ## Byte-stream socket. SOL_SOCKET* {.importc, header: "".}: cint ## Options to be accessed at socket level, not protocol level. SO_ACCEPTCONN* {.importc, header: "".}: cint ## Socket is accepting connections. SO_BROADCAST* {.importc, header: "".}: cint ## Transmission of broadcast messages is supported. SO_DEBUG* {.importc, header: "".}: cint ## Debugging information is being recorded. SO_DONTROUTE* {.importc, header: "".}: cint ## Bypass normal routing. SO_ERROR* {.importc, header: "".}: cint ## Socket error status. SO_KEEPALIVE* {.importc, header: "".}: cint ## Connections are kept alive with periodic messages. SO_LINGER* {.importc, header: "".}: cint ## Socket lingers on close. SO_OOBINLINE* {.importc, header: "".}: cint ## Out-of-band data is transmitted in line. SO_RCVBUF* {.importc, header: "".}: cint ## Receive buffer size. SO_RCVLOWAT* {.importc, header: "".}: cint ## Receive *low water mark*. SO_RCVTIMEO* {.importc, header: "".}: cint ## Receive timeout. SO_REUSEADDR* {.importc, header: "".}: cint ## Reuse of local addresses is supported. SO_SNDBUF* {.importc, header: "".}: cint ## Send buffer size. SO_SNDLOWAT* {.importc, header: "".}: cint ## Send *low water mark*. SO_SNDTIMEO* {.importc, header: "".}: cint ## Send timeout. SO_TYPE* {.importc, header: "".}: cint ## Socket type. SOMAXCONN* {.importc, header: "".}: cint ## The maximum backlog queue length. MSG_CTRUNC* {.importc, header: "".}: cint ## Control data truncated. MSG_DONTROUTE* {.importc, header: "".}: cint ## Send without using routing tables. MSG_EOR* {.importc, header: "".}: cint ## Terminates a record (if supported by the protocol). MSG_OOB* {.importc, header: "".}: cint ## Out-of-band data. MSG_PEEK* {.importc, header: "".}: cint ## Leave received data in queue. MSG_TRUNC* {.importc, header: "".}: cint ## Normal data truncated. MSG_WAITALL* {.importc, header: "".}: cint ## Attempt to fill the read buffer. AF_INET* {.importc, header: "".}: cint ## Internet domain sockets for use with IPv4 addresses. AF_INET6* {.importc, header: "".}: cint ## Internet domain sockets for use with IPv6 addresses. AF_UNIX* {.importc, header: "".}: cint ## UNIX domain sockets. AF_UNSPEC* {.importc, header: "".}: cint ## Unspecified. SHUT_RD* {.importc, header: "".}: cint ## Disables further receive operations. SHUT_RDWR* {.importc, header: "".}: cint ## Disables further send and receive operations. SHUT_WR* {.importc, header: "".}: cint ## Disables further send operations. IPPROTO_IP* {.importc, header: "".}: cint ## Internet protocol. IPPROTO_IPV6* {.importc, header: "".}: cint ## Internet Protocol Version 6. IPPROTO_ICMP* {.importc, header: "".}: cint ## Control message protocol. IPPROTO_RAW* {.importc, header: "".}: cint ## Raw IP Packets Protocol. IPPROTO_TCP* {.importc, header: "".}: cint ## Transmission control protocol. IPPROTO_UDP* {.importc, header: "".}: cint ## User datagram protocol. INADDR_ANY* {.importc, header: "".}: TinAddrScalar ## IPv4 local host address. INADDR_BROADCAST* {.importc, header: "".}: TinAddrScalar ## IPv4 broadcast address. INET_ADDRSTRLEN* {.importc, header: "".}: cint ## 16. Length of the string form for IP. IPV6_JOIN_GROUP* {.importc, header: "".}: cint ## Join a multicast group. IPV6_LEAVE_GROUP* {.importc, header: "".}: cint ## Quit a multicast group. IPV6_MULTICAST_HOPS* {.importc, header: "".}: cint ## Multicast hop limit. IPV6_MULTICAST_IF* {.importc, header: "".}: cint ## Interface to use for outgoing multicast packets. IPV6_MULTICAST_LOOP* {.importc, header: "".}: cint ## Multicast packets are delivered back to the local application. IPV6_UNICAST_HOPS* {.importc, header: "".}: cint ## Unicast hop limit. IPV6_V6ONLY* {.importc, header: "".}: cint ## Restrict AF_INET6 socket to IPv6 communications only. TCP_NODELAY* {.importc, header: "".}: cint ## Avoid coalescing of small segments. IPPORT_RESERVED* {.importc, header: "".}: cint HOST_NOT_FOUND* {.importc, header: "".}: cint NO_DATA* {.importc, header: "".}: cint NO_RECOVERY* {.importc, header: "".}: cint TRY_AGAIN* {.importc, header: "".}: cint AI_PASSIVE* {.importc, header: "".}: cint ## Socket address is intended for bind(). AI_CANONNAME* {.importc, header: "".}: cint ## Request for canonical name. AI_NUMERICHOST* {.importc, header: "".}: cint ## Return numeric host address as name. AI_NUMERICSERV* {.importc, header: "".}: cint ## Inhibit service name resolution. AI_V4MAPPED* {.importc, header: "".}: cint ## If no IPv6 addresses are found, query for IPv4 addresses and ## return them to the caller as IPv4-mapped IPv6 addresses. AI_ALL* {.importc, header: "".}: cint ## Query for both IPv4 and IPv6 addresses. AI_ADDRCONFIG* {.importc, header: "".}: cint ## Query for IPv4 addresses only when an IPv4 address is configured; ## query for IPv6 addresses only when an IPv6 address is configured. NI_NOFQDN* {.importc, header: "".}: cint ## Only the nodename portion of the FQDN is returned for local hosts. NI_NUMERICHOST* {.importc, header: "".}: cint ## The numeric form of the node's address is returned instead of its name. NI_NAMEREQD* {.importc, header: "".}: cint ## Return an error if the node's name cannot be located in the database. NI_NUMERICSERV* {.importc, header: "".}: cint ## The numeric form of the service address is returned instead of its name. NI_NUMERICSCOPE* {.importc, header: "".}: cint ## For IPv6 addresses, the numeric form of the scope identifier is ## returned instead of its name. NI_DGRAM* {.importc, header: "".}: cint ## Indicates that the service is a datagram service (SOCK_DGRAM). EAI_AGAIN* {.importc, header: "".}: cint ## The name could not be resolved at this time. Future attempts may succeed. EAI_BADFLAGS* {.importc, header: "".}: cint ## The flags had an invalid value. EAI_FAIL* {.importc, header: "".}: cint ## A non-recoverable error occurred. EAI_FAMILY* {.importc, header: "".}: cint ## The address family was not recognized or the address length ## was invalid for the specified family. EAI_MEMORY* {.importc, header: "".}: cint ## There was a memory allocation failure. EAI_NONAME* {.importc, header: "".}: cint ## The name does not resolve for the supplied parameters. ## NI_NAMEREQD is set and the host's name cannot be located, ## or both nodename and servname were null. EAI_SERVICE* {.importc, header: "".}: cint ## The service passed was not recognized for the specified socket type. EAI_SOCKTYPE* {.importc, header: "".}: cint ## The intended socket type was not recognized. EAI_SYSTEM* {.importc, header: "".}: cint ## A system error occurred. The error code can be found in errno. EAI_OVERFLOW* {.importc, header: "".}: cint ## An argument buffer overflowed. POLLIN* {.importc, header: "".}: cshort ## Data other than high-priority data may be read without blocking. POLLRDNORM* {.importc, header: "".}: cshort ## Normal data may be read without blocking. POLLRDBAND* {.importc, header: "".}: cshort ## Priority data may be read without blocking. POLLPRI* {.importc, header: "".}: cshort ## High priority data may be read without blocking. POLLOUT* {.importc, header: "".}: cshort ## Normal data may be written without blocking. POLLWRNORM* {.importc, header: "".}: cshort ## Equivalent to POLLOUT. POLLWRBAND* {.importc, header: "".}: cshort ## Priority data may be written. POLLERR* {.importc, header: "".}: cshort ## An error has occurred (revents only). POLLHUP* {.importc, header: "".}: cshort ## Device has been disconnected (revents only). POLLNVAL* {.importc, header: "".}: cshort ## Invalid fd member (revents only). when hasSpawnh: var POSIX_SPAWN_RESETIDS* {.importc, header: "".}: cint POSIX_SPAWN_SETPGROUP* {.importc, header: "".}: cint POSIX_SPAWN_SETSCHEDPARAM* {.importc, header: "".}: cint POSIX_SPAWN_SETSCHEDULER* {.importc, header: "".}: cint POSIX_SPAWN_SETSIGDEF* {.importc, header: "".}: cint POSIX_SPAWN_SETSIGMASK* {.importc, header: "".}: cint when hasAioH: proc aio_cancel*(a1: cint, a2: ptr Taiocb): cint {.importc, header: "".} proc aio_error*(a1: ptr Taiocb): cint {.importc, header: "".} proc aio_fsync*(a1: cint, a2: ptr Taiocb): cint {.importc, header: "".} proc aio_read*(a1: ptr Taiocb): cint {.importc, header: "".} proc aio_return*(a1: ptr Taiocb): int {.importc, header: "".} proc aio_suspend*(a1: ptr ptr Taiocb, a2: cint, a3: ptr ttimespec): cint {. importc, header: "".} proc aio_write*(a1: ptr Taiocb): cint {.importc, header: "".} proc lio_listio*(a1: cint, a2: ptr ptr Taiocb, a3: cint, a4: ptr Tsigevent): cint {.importc, header: "".} # arpa/inet.h proc htonl*(a1: int32): int32 {.importc, header: "".} proc htons*(a1: int16): int16 {.importc, header: "".} proc ntohl*(a1: int32): int32 {.importc, header: "".} proc ntohs*(a1: int16): int16 {.importc, header: "".} proc inet_addr*(a1: cstring): int32 {.importc, header: "".} proc inet_ntoa*(a1: int32): cstring {.importc, header: "".} proc inet_ntop*(a1: cint, a2: pointer, a3: cstring, a4: int32): cstring {.importc, header: "".} proc inet_pton*(a1: cint, a2: cstring, a3: pointer): cint {.importc, header: "".} var in6addr_any* {.importc, header: "".}: TIn6Addr in6addr_loopback* {.importc, header: "".}: TIn6Addr proc IN6ADDR_ANY_INIT* (): TIn6Addr {.importc, header: "".} proc IN6ADDR_LOOPBACK_INIT* (): TIn6Addr {.importc, header: "".} # dirent.h proc closedir*(a1: ptr TDIR): cint {.importc, header: "".} proc opendir*(a1: cstring): ptr TDir {.importc, header: "".} proc readdir*(a1: ptr TDIR): ptr TDirent {.importc, header: "".} proc readdir_r*(a1: ptr TDIR, a2: ptr Tdirent, a3: ptr ptr TDirent): cint {. importc, header: "".} proc rewinddir*(a1: ptr TDIR) {.importc, header: "".} proc seekdir*(a1: ptr TDIR, a2: int) {.importc, header: "".} proc telldir*(a1: ptr TDIR): int {.importc, header: "".} # dlfcn.h proc dlclose*(a1: pointer): cint {.importc, header: "".} proc dlerror*(): cstring {.importc, header: "".} proc dlopen*(a1: cstring, a2: cint): pointer {.importc, header: "".} proc dlsym*(a1: pointer, a2: cstring): pointer {.importc, header: "".} proc creat*(a1: cstring, a2: Tmode): cint {.importc, header: "".} proc fcntl*(a1: cint, a2: cint): cint {.varargs, importc, header: "".} proc open*(a1: cstring, a2: cint): cint {.varargs, importc, header: "".} proc posix_fadvise*(a1: cint, a2, a3: Toff, a4: cint): cint {.importc, header: "".} proc posix_fallocate*(a1: cint, a2, a3: Toff): cint {.importc, header: "".} proc feclearexcept*(a1: cint): cint {.importc, header: "".} proc fegetexceptflag*(a1: ptr Tfexcept, a2: cint): cint {.importc, header: "".} proc feraiseexcept*(a1: cint): cint {.importc, header: "".} proc fesetexceptflag*(a1: ptr Tfexcept, a2: cint): cint {.importc, header: "".} proc fetestexcept*(a1: cint): cint {.importc, header: "".} proc fegetround*(): cint {.importc, header: "".} proc fesetround*(a1: cint): cint {.importc, header: "".} proc fegetenv*(a1: ptr Tfenv): cint {.importc, header: "".} proc feholdexcept*(a1: ptr Tfenv): cint {.importc, header: "".} proc fesetenv*(a1: ptr Tfenv): cint {.importc, header: "".} proc feupdateenv*(a1: ptr TFenv): cint {.importc, header: "".} proc fmtmsg*(a1: int, a2: cstring, a3: cint, a4, a5, a6: cstring): cint {.importc, header: "".} proc fnmatch*(a1, a2: cstring, a3: cint): cint {.importc, header: "".} proc ftw*(a1: cstring, a2: proc (x1: cstring, x2: ptr TStat, x3: cint): cint {.noconv.}, a3: cint): cint {.importc, header: "".} proc nftw*(a1: cstring, a2: proc (x1: cstring, x2: ptr TStat, x3: cint, x4: ptr TFTW): cint {.noconv.}, a3: cint, a4: cint): cint {.importc, header: "".} proc glob*(a1: cstring, a2: cint, a3: proc (x1: cstring, x2: cint): cint {.noconv.}, a4: ptr Tglob): cint {.importc, header: "".} proc globfree*(a1: ptr TGlob) {.importc, header: "".} proc getgrgid*(a1: TGid): ptr TGroup {.importc, header: "".} proc getgrnam*(a1: cstring): ptr TGroup {.importc, header: "".} proc getgrgid_r*(a1: Tgid, a2: ptr TGroup, a3: cstring, a4: int, a5: ptr ptr TGroup): cint {.importc, header: "".} proc getgrnam_r*(a1: cstring, a2: ptr TGroup, a3: cstring, a4: int, a5: ptr ptr TGroup): cint {.importc, header: "".} proc getgrent*(): ptr TGroup {.importc, header: "".} proc endgrent*() {.importc, header: "".} proc setgrent*() {.importc, header: "".} proc iconv_open*(a1, a2: cstring): TIconv {.importc, header: "".} proc iconv*(a1: Ticonv, a2: var cstring, a3: var int, a4: var cstring, a5: var int): int {.importc, header: "".} proc iconv_close*(a1: Ticonv): cint {.importc, header: "".} proc nl_langinfo*(a1: Tnl_item): cstring {.importc, header: "".} proc basename*(a1: cstring): cstring {.importc, header: "".} proc dirname*(a1: cstring): cstring {.importc, header: "".} proc localeconv*(): ptr Tlconv {.importc, header: "".} proc setlocale*(a1: cint, a2: cstring): cstring {. importc, header: "".} proc strfmon*(a1: cstring, a2: int, a3: cstring): int {.varargs, importc, header: "".} proc mq_close*(a1: Tmqd): cint {.importc, header: "".} proc mq_getattr*(a1: Tmqd, a2: ptr Tmq_attr): cint {.importc, header: "".} proc mq_notify*(a1: Tmqd, a2: ptr Tsigevent): cint {.importc, header: "".} proc mq_open*(a1: cstring, a2: cint): TMqd {.varargs, importc, header: "".} proc mq_receive*(a1: Tmqd, a2: cstring, a3: int, a4: var int): int {.importc, header: "".} proc mq_send*(a1: Tmqd, a2: cstring, a3: int, a4: int): cint {.importc, header: "".} proc mq_setattr*(a1: Tmqd, a2, a3: ptr Tmq_attr): cint {.importc, header: "".} proc mq_timedreceive*(a1: Tmqd, a2: cstring, a3: int, a4: int, a5: ptr TTimespec): int {.importc, header: "".} proc mq_timedsend*(a1: Tmqd, a2: cstring, a3: int, a4: int, a5: ptr TTimeSpec): cint {.importc, header: "".} proc mq_unlink*(a1: cstring): cint {.importc, header: "".} proc getpwnam*(a1: cstring): ptr TPasswd {.importc, header: "".} proc getpwuid*(a1: Tuid): ptr TPasswd {.importc, header: "".} proc getpwnam_r*(a1: cstring, a2: ptr Tpasswd, a3: cstring, a4: int, a5: ptr ptr Tpasswd): cint {.importc, header: "".} proc getpwuid_r*(a1: Tuid, a2: ptr Tpasswd, a3: cstring, a4: int, a5: ptr ptr Tpasswd): cint {.importc, header: "".} proc endpwent*() {.importc, header: "".} proc getpwent*(): ptr TPasswd {.importc, header: "".} proc setpwent*() {.importc, header: "".} proc uname*(a1: var Tutsname): cint {.importc, header: "".} proc pthread_atfork*(a1, a2, a3: proc {.noconv.}): cint {.importc, header: "".} proc pthread_attr_destroy*(a1: ptr Tpthread_attr): cint {.importc, header: "".} proc pthread_attr_getdetachstate*(a1: ptr Tpthread_attr, a2: cint): cint {.importc, header: "".} proc pthread_attr_getguardsize*(a1: ptr Tpthread_attr, a2: var cint): cint {.importc, header: "".} proc pthread_attr_getinheritsched*(a1: ptr Tpthread_attr, a2: var cint): cint {.importc, header: "".} proc pthread_attr_getschedparam*(a1: ptr Tpthread_attr, a2: ptr Tsched_param): cint {.importc, header: "".} proc pthread_attr_getschedpolicy*(a1: ptr Tpthread_attr, a2: var cint): cint {.importc, header: "".} proc pthread_attr_getscope*(a1: ptr Tpthread_attr, a2: var cint): cint {.importc, header: "".} proc pthread_attr_getstack*(a1: ptr Tpthread_attr, a2: var pointer, a3: var int): cint {.importc, header: "".} proc pthread_attr_getstackaddr*(a1: ptr Tpthread_attr, a2: var pointer): cint {.importc, header: "".} proc pthread_attr_getstacksize*(a1: ptr Tpthread_attr, a2: var int): cint {.importc, header: "".} proc pthread_attr_init*(a1: ptr Tpthread_attr): cint {.importc, header: "".} proc pthread_attr_setdetachstate*(a1: ptr Tpthread_attr, a2: cint): cint {.importc, header: "".} proc pthread_attr_setguardsize*(a1: ptr Tpthread_attr, a2: int): cint {.importc, header: "".} proc pthread_attr_setinheritsched*(a1: ptr Tpthread_attr, a2: cint): cint {.importc, header: "".} proc pthread_attr_setschedparam*(a1: ptr Tpthread_attr, a2: ptr Tsched_param): cint {.importc, header: "".} proc pthread_attr_setschedpolicy*(a1: ptr Tpthread_attr, a2: cint): cint {.importc, header: "".} proc pthread_attr_setscope*(a1: ptr Tpthread_attr, a2: cint): cint {.importc, header: "".} proc pthread_attr_setstack*(a1: ptr Tpthread_attr, a2: pointer, a3: int): cint {.importc, header: "".} proc pthread_attr_setstackaddr*(a1: ptr TPthread_attr, a2: pointer): cint {.importc, header: "".} proc pthread_attr_setstacksize*(a1: ptr TPthread_attr, a2: int): cint {.importc, header: "".} proc pthread_barrier_destroy*(a1: ptr Tpthread_barrier): cint {.importc, header: "".} proc pthread_barrier_init*(a1: ptr Tpthread_barrier, a2: ptr Tpthread_barrierattr, a3: cint): cint {.importc, header: "".} proc pthread_barrier_wait*(a1: ptr Tpthread_barrier): cint {.importc, header: "".} proc pthread_barrierattr_destroy*(a1: ptr Tpthread_barrierattr): cint {.importc, header: "".} proc pthread_barrierattr_getpshared*( a1: ptr Tpthread_barrierattr, a2: var cint): cint {.importc, header: "".} proc pthread_barrierattr_init*(a1: ptr TPthread_barrierattr): cint {.importc, header: "".} proc pthread_barrierattr_setpshared*(a1: ptr TPthread_barrierattr, a2: cint): cint {.importc, header: "".} proc pthread_cancel*(a1: Tpthread): cint {.importc, header: "".} proc pthread_cleanup_push*(a1: proc (x: pointer) {.noconv.}, a2: pointer) {.importc, header: "".} proc pthread_cleanup_pop*(a1: cint) {.importc, header: "".} proc pthread_cond_broadcast*(a1: ptr Tpthread_cond): cint {.importc, header: "".} proc pthread_cond_destroy*(a1: ptr Tpthread_cond): cint {.importc, header: "".} proc pthread_cond_init*(a1: ptr Tpthread_cond, a2: ptr Tpthread_condattr): cint {.importc, header: "".} proc pthread_cond_signal*(a1: ptr Tpthread_cond): cint {.importc, header: "".} proc pthread_cond_timedwait*(a1: ptr Tpthread_cond, a2: ptr Tpthread_mutex, a3: ptr Ttimespec): cint {.importc, header: "".} proc pthread_cond_wait*(a1: ptr Tpthread_cond, a2: ptr Tpthread_mutex): cint {.importc, header: "".} proc pthread_condattr_destroy*(a1: ptr Tpthread_condattr): cint {.importc, header: "".} proc pthread_condattr_getclock*(a1: ptr Tpthread_condattr, a2: var Tclockid): cint {.importc, header: "".} proc pthread_condattr_getpshared*(a1: ptr Tpthread_condattr, a2: var cint): cint {.importc, header: "".} proc pthread_condattr_init*(a1: ptr TPthread_condattr): cint {.importc, header: "".} proc pthread_condattr_setclock*(a1: ptr TPthread_condattr,a2: Tclockid): cint {.importc, header: "".} proc pthread_condattr_setpshared*(a1: ptr TPthread_condattr, a2: cint): cint {.importc, header: "".} proc pthread_create*(a1: ptr Tpthread, a2: ptr Tpthread_attr, a3: proc (x: pointer): pointer {.noconv.}, a4: pointer): cint {.importc, header: "".} proc pthread_detach*(a1: Tpthread): cint {.importc, header: "".} proc pthread_equal*(a1, a2: Tpthread): cint {.importc, header: "".} proc pthread_exit*(a1: pointer) {.importc, header: "".} proc pthread_getconcurrency*(): cint {.importc, header: "".} proc pthread_getcpuclockid*(a1: Tpthread, a2: var Tclockid): cint {.importc, header: "".} proc pthread_getschedparam*(a1: Tpthread, a2: var cint, a3: ptr Tsched_param): cint {.importc, header: "".} proc pthread_getspecific*(a1: Tpthread_key): pointer {.importc, header: "".} proc pthread_join*(a1: Tpthread, a2: ptr pointer): cint {.importc, header: "".} proc pthread_key_create*(a1: ptr Tpthread_key, a2: proc (x: pointer) {.noconv.}): cint {.importc, header: "".} proc pthread_key_delete*(a1: Tpthread_key): cint {.importc, header: "".} proc pthread_mutex_destroy*(a1: ptr Tpthread_mutex): cint {.importc, header: "".} proc pthread_mutex_getprioceiling*(a1: ptr Tpthread_mutex, a2: var cint): cint {.importc, header: "".} proc pthread_mutex_init*(a1: ptr Tpthread_mutex, a2: ptr Tpthread_mutexattr): cint {.importc, header: "".} proc pthread_mutex_lock*(a1: ptr Tpthread_mutex): cint {.importc, header: "".} proc pthread_mutex_setprioceiling*(a1: ptr Tpthread_mutex,a2: cint, a3: var cint): cint {.importc, header: "".} proc pthread_mutex_timedlock*(a1: ptr Tpthread_mutex, a2: ptr Ttimespec): cint {.importc, header: "".} proc pthread_mutex_trylock*(a1: ptr Tpthread_mutex): cint {.importc, header: "".} proc pthread_mutex_unlock*(a1: ptr Tpthread_mutex): cint {.importc, header: "".} proc pthread_mutexattr_destroy*(a1: ptr Tpthread_mutexattr): cint {.importc, header: "".} proc pthread_mutexattr_getprioceiling*( a1: ptr Tpthread_mutexattr, a2: var cint): cint {.importc, header: "".} proc pthread_mutexattr_getprotocol*(a1: ptr Tpthread_mutexattr, a2: var cint): cint {.importc, header: "".} proc pthread_mutexattr_getpshared*(a1: ptr Tpthread_mutexattr, a2: var cint): cint {.importc, header: "".} proc pthread_mutexattr_gettype*(a1: ptr Tpthread_mutexattr, a2: var cint): cint {.importc, header: "".} proc pthread_mutexattr_init*(a1: ptr Tpthread_mutexattr): cint {.importc, header: "".} proc pthread_mutexattr_setprioceiling*(a1: ptr tpthread_mutexattr, a2: cint): cint {.importc, header: "".} proc pthread_mutexattr_setprotocol*(a1: ptr Tpthread_mutexattr, a2: cint): cint {.importc, header: "".} proc pthread_mutexattr_setpshared*(a1: ptr Tpthread_mutexattr, a2: cint): cint {.importc, header: "".} proc pthread_mutexattr_settype*(a1: ptr Tpthread_mutexattr, a2: cint): cint {.importc, header: "".} proc pthread_once*(a1: ptr Tpthread_once, a2: proc {.noconv.}): cint {.importc, header: "".} proc pthread_rwlock_destroy*(a1: ptr Tpthread_rwlock): cint {.importc, header: "".} proc pthread_rwlock_init*(a1: ptr Tpthread_rwlock, a2: ptr Tpthread_rwlockattr): cint {.importc, header: "".} proc pthread_rwlock_rdlock*(a1: ptr Tpthread_rwlock): cint {.importc, header: "".} proc pthread_rwlock_timedrdlock*(a1: ptr Tpthread_rwlock, a2: ptr Ttimespec): cint {.importc, header: "".} proc pthread_rwlock_timedwrlock*(a1: ptr Tpthread_rwlock, a2: ptr Ttimespec): cint {.importc, header: "".} proc pthread_rwlock_tryrdlock*(a1: ptr Tpthread_rwlock): cint {.importc, header: "".} proc pthread_rwlock_trywrlock*(a1: ptr Tpthread_rwlock): cint {.importc, header: "".} proc pthread_rwlock_unlock*(a1: ptr Tpthread_rwlock): cint {.importc, header: "".} proc pthread_rwlock_wrlock*(a1: ptr Tpthread_rwlock): cint {.importc, header: "".} proc pthread_rwlockattr_destroy*(a1: ptr Tpthread_rwlockattr): cint {.importc, header: "".} proc pthread_rwlockattr_getpshared*( a1: ptr Tpthread_rwlockattr, a2: var cint): cint {.importc, header: "".} proc pthread_rwlockattr_init*(a1: ptr Tpthread_rwlockattr): cint {.importc, header: "".} proc pthread_rwlockattr_setpshared*(a1: ptr Tpthread_rwlockattr, a2: cint): cint {.importc, header: "".} proc pthread_self*(): Tpthread {.importc, header: "".} proc pthread_setcancelstate*(a1: cint, a2: var cint): cint {.importc, header: "".} proc pthread_setcanceltype*(a1: cint, a2: var cint): cint {.importc, header: "".} proc pthread_setconcurrency*(a1: cint): cint {.importc, header: "".} proc pthread_setschedparam*(a1: Tpthread, a2: cint, a3: ptr Tsched_param): cint {.importc, header: "".} proc pthread_setschedprio*(a1: Tpthread, a2: cint): cint {. importc, header: "".} proc pthread_setspecific*(a1: Tpthread_key, a2: pointer): cint {. importc, header: "".} proc pthread_spin_destroy*(a1: ptr Tpthread_spinlock): cint {. importc, header: "".} proc pthread_spin_init*(a1: ptr Tpthread_spinlock, a2: cint): cint {. importc, header: "".} proc pthread_spin_lock*(a1: ptr Tpthread_spinlock): cint {. importc, header: "".} proc pthread_spin_trylock*(a1: ptr Tpthread_spinlock): cint{. importc, header: "".} proc pthread_spin_unlock*(a1: ptr Tpthread_spinlock): cint {. importc, header: "".} proc pthread_testcancel*() {.importc, header: "".} proc access*(a1: cstring, a2: cint): cint {.importc, header: "".} proc alarm*(a1: cint): cint {.importc, header: "".} proc chdir*(a1: cstring): cint {.importc, header: "".} proc chown*(a1: cstring, a2: Tuid, a3: Tgid): cint {.importc, header: "".} proc close*(a1: cint): cint {.importc, header: "".} proc confstr*(a1: cint, a2: cstring, a3: int): int {.importc, header: "".} proc crypt*(a1, a2: cstring): cstring {.importc, header: "".} proc ctermid*(a1: cstring): cstring {.importc, header: "".} proc dup*(a1: cint): cint {.importc, header: "".} proc dup2*(a1, a2: cint): cint {.importc, header: "".} proc encrypt*(a1: array[0..63, char], a2: cint) {.importc, header: "".} proc execl*(a1, a2: cstring): cint {.varargs, importc, header: "".} proc execle*(a1, a2: cstring): cint {.varargs, importc, header: "".} proc execlp*(a1, a2: cstring): cint {.varargs, importc, header: "".} proc execv*(a1: cstring, a2: cstringArray): cint {.importc, header: "".} proc execve*(a1: cstring, a2, a3: cstringArray): cint {. importc, header: "".} proc execvp*(a1: cstring, a2: cstringArray): cint {.importc, header: "".} proc fchown*(a1: cint, a2: Tuid, a3: Tgid): cint {.importc, header: "".} proc fchdir*(a1: cint): cint {.importc, header: "".} proc fdatasync*(a1: cint): cint {.importc, header: "".} proc fork*(): Tpid {.importc, header: "".} proc fpathconf*(a1, a2: cint): int {.importc, header: "".} proc fsync*(a1: cint): cint {.importc, header: "".} proc ftruncate*(a1: cint, a2: Toff): cint {.importc, header: "".} proc getcwd*(a1: cstring, a2: int): cstring {.importc, header: "".} proc getegid*(): TGid {.importc, header: "".} proc geteuid*(): TUid {.importc, header: "".} proc getgid*(): TGid {.importc, header: "".} proc getgroups*(a1: cint, a2: ptr array[0..255, Tgid]): cint {. importc, header: "".} proc gethostid*(): int {.importc, header: "".} proc gethostname*(a1: cstring, a2: int): cint {.importc, header: "".} proc getlogin*(): cstring {.importc, header: "".} proc getlogin_r*(a1: cstring, a2: int): cint {.importc, header: "".} proc getopt*(a1: cint, a2: cstringArray, a3: cstring): cint {. importc, header: "".} proc getpgid*(a1: Tpid): Tpid {.importc, header: "".} proc getpgrp*(): Tpid {.importc, header: "".} proc getpid*(): Tpid {.importc, header: "".} proc getppid*(): Tpid {.importc, header: "".} proc getsid*(a1: Tpid): Tpid {.importc, header: "".} proc getuid*(): Tuid {.importc, header: "".} proc getwd*(a1: cstring): cstring {.importc, header: "".} proc isatty*(a1: cint): cint {.importc, header: "".} proc lchown*(a1: cstring, a2: Tuid, a3: Tgid): cint {.importc, header: "".} proc link*(a1, a2: cstring): cint {.importc, header: "".} proc lockf*(a1, a2: cint, a3: Toff): cint {.importc, header: "".} proc lseek*(a1: cint, a2: Toff, a3: cint): Toff {.importc, header: "".} proc nice*(a1: cint): cint {.importc, header: "".} proc pathconf*(a1: cstring, a2: cint): int {.importc, header: "".} proc pause*(): cint {.importc, header: "".} proc pipe*(a: array[0..1, cint]): cint {.importc, header: "".} proc pread*(a1: cint, a2: pointer, a3: int, a4: Toff): int {. importc, header: "".} proc pwrite*(a1: cint, a2: pointer, a3: int, a4: Toff): int {. importc, header: "".} proc read*(a1: cint, a2: pointer, a3: int): int {.importc, header: "".} proc readlink*(a1, a2: cstring, a3: int): int {.importc, header: "".} proc rmdir*(a1: cstring): cint {.importc, header: "".} proc setegid*(a1: Tgid): cint {.importc, header: "".} proc seteuid*(a1: Tuid): cint {.importc, header: "".} proc setgid*(a1: Tgid): cint {.importc, header: "".} proc setpgid*(a1, a2: Tpid): cint {.importc, header: "".} proc setpgrp*(): Tpid {.importc, header: "".} proc setregid*(a1, a2: Tgid): cint {.importc, header: "".} proc setreuid*(a1, a2: Tuid): cint {.importc, header: "".} proc setsid*(): Tpid {.importc, header: "".} proc setuid*(a1: Tuid): cint {.importc, header: "".} proc sleep*(a1: cint): cint {.importc, header: "".} proc swab*(a1, a2: pointer, a3: int) {.importc, header: "".} proc symlink*(a1, a2: cstring): cint {.importc, header: "".} proc sync*() {.importc, header: "".} proc sysconf*(a1: cint): int {.importc, header: "".} proc tcgetpgrp*(a1: cint): tpid {.importc, header: "".} proc tcsetpgrp*(a1: cint, a2: Tpid): cint {.importc, header: "".} proc truncate*(a1: cstring, a2: Toff): cint {.importc, header: "".} proc ttyname*(a1: cint): cstring {.importc, header: "".} proc ttyname_r*(a1: cint, a2: cstring, a3: int): cint {. importc, header: "".} proc ualarm*(a1, a2: Tuseconds): Tuseconds {.importc, header: "".} proc unlink*(a1: cstring): cint {.importc, header: "".} proc usleep*(a1: Tuseconds): cint {.importc, header: "".} proc vfork*(): tpid {.importc, header: "".} proc write*(a1: cint, a2: pointer, a3: int): int {.importc, header: "".} proc sem_close*(a1: ptr Tsem): cint {.importc, header: "".} proc sem_destroy*(a1: ptr Tsem): cint {.importc, header: "".} proc sem_getvalue*(a1: ptr Tsem, a2: var cint): cint {. importc, header: "".} proc sem_init*(a1: ptr Tsem, a2: cint, a3: cint): cint {. importc, header: "".} proc sem_open*(a1: cstring, a2: cint): ptr TSem {. varargs, importc, header: "".} proc sem_post*(a1: ptr Tsem): cint {.importc, header: "".} proc sem_timedwait*(a1: ptr Tsem, a2: ptr Ttimespec): cint {. importc, header: "".} proc sem_trywait*(a1: ptr Tsem): cint {.importc, header: "".} proc sem_unlink*(a1: cstring): cint {.importc, header: "".} proc sem_wait*(a1: ptr Tsem): cint {.importc, header: "".} proc ftok*(a1: cstring, a2: cint): Tkey {.importc, header: "".} proc statvfs*(a1: cstring, a2: var Tstatvfs): cint {. importc, header: "".} proc fstatvfs*(a1: cint, a2: var Tstatvfs): cint {. importc, header: "".} proc chmod*(a1: cstring, a2: TMode): cint {.importc, header: "".} proc fchmod*(a1: cint, a2: TMode): cint {.importc, header: "".} proc fstat*(a1: cint, a2: var Tstat): cint {.importc, header: "".} proc lstat*(a1: cstring, a2: var Tstat): cint {.importc, header: "".} proc mkdir*(a1: cstring, a2: TMode): cint {.importc, header: "".} proc mkfifo*(a1: cstring, a2: TMode): cint {.importc, header: "".} proc mknod*(a1: cstring, a2: TMode, a3: Tdev): cint {. importc, header: "".} proc stat*(a1: cstring, a2: var Tstat): cint {.importc, header: "".} proc umask*(a1: Tmode): TMode {.importc, header: "".} proc S_ISBLK*(m: Tmode): bool {.importc, header: "".} ## Test for a block special file. proc S_ISCHR*(m: Tmode): bool {.importc, header: "".} ## Test for a character special file. proc S_ISDIR*(m: Tmode): bool {.importc, header: "".} ## Test for a directory. proc S_ISFIFO*(m: Tmode): bool {.importc, header: "".} ## Test for a pipe or FIFO special file. proc S_ISREG*(m: Tmode): bool {.importc, header: "".} ## Test for a regular file. proc S_ISLNK*(m: Tmode): bool {.importc, header: "".} ## Test for a symbolic link. proc S_ISSOCK*(m: Tmode): bool {.importc, header: "".} ## Test for a socket. proc S_TYPEISMQ*(buf: var TStat): bool {.importc, header: "".} ## Test for a message queue. proc S_TYPEISSEM*(buf: var TStat): bool {.importc, header: "".} ## Test for a semaphore. proc S_TYPEISSHM*(buf: var TStat): bool {.importc, header: "".} ## Test for a shared memory object. proc S_TYPEISTMO*(buf: var TStat): bool {.importc, header: "".} ## Test macro for a typed memory object. proc mlock*(a1: pointer, a2: int): cint {.importc, header: "".} proc mlockall*(a1: cint): cint {.importc, header: "".} proc mmap*(a1: pointer, a2: int, a3, a4, a5: cint, a6: Toff): pointer {. importc, header: "".} proc mprotect*(a1: pointer, a2: int, a3: cint): cint {. importc, header: "".} proc msync*(a1: pointer, a2: int, a3: cint): cint {.importc, header: "".} proc munlock*(a1: pointer, a2: int): cint {.importc, header: "".} proc munlockall*(): cint {.importc, header: "".} proc munmap*(a1: pointer, a2: int): cint {.importc, header: "".} proc posix_madvise*(a1: pointer, a2: int, a3: cint): cint {. importc, header: "".} proc posix_mem_offset*(a1: pointer, a2: int, a3: var Toff, a4: var int, a5: var cint): cint {.importc, header: "".} proc posix_typed_mem_get_info*(a1: cint, a2: var Tposix_typed_mem_info): cint {.importc, header: "".} proc posix_typed_mem_open*(a1: cstring, a2, a3: cint): cint {. importc, header: "".} proc shm_open*(a1: cstring, a2: cint, a3: Tmode): cint {. importc, header: "".} proc shm_unlink*(a1: cstring): cint {.importc, header: "".} proc asctime*(a1: var ttm): cstring{.importc, header: "".} proc asctime_r*(a1: var ttm, a2: cstring): cstring {.importc, header: "".} proc clock*(): Tclock {.importc, header: "".} proc clock_getcpuclockid*(a1: tpid, a2: var Tclockid): cint {. importc, header: "".} proc clock_getres*(a1: Tclockid, a2: var Ttimespec): cint {. importc, header: "".} proc clock_gettime*(a1: Tclockid, a2: var Ttimespec): cint {. importc, header: "".} proc clock_nanosleep*(a1: Tclockid, a2: cint, a3: var Ttimespec, a4: var Ttimespec): cint {.importc, header: "".} proc clock_settime*(a1: Tclockid, a2: var Ttimespec): cint {. importc, header: "".} proc ctime*(a1: var Ttime): cstring {.importc, header: "".} proc ctime_r*(a1: var Ttime, a2: cstring): cstring {.importc, header: "".} proc difftime*(a1, a2: Ttime): cdouble {.importc, header: "".} proc getdate*(a1: cstring): ptr ttm {.importc, header: "".} proc gmtime*(a1: var ttime): ptr ttm {.importc, header: "".} proc gmtime_r*(a1: var ttime, a2: var ttm): ptr ttm {.importc, header: "".} proc localtime*(a1: var ttime): ptr ttm {.importc, header: "".} proc localtime_r*(a1: var ttime, a2: var ttm): ptr ttm {.importc, header: "".} proc mktime*(a1: var ttm): ttime {.importc, header: "".} proc nanosleep*(a1, a2: var Ttimespec): cint {.importc, header: "".} proc strftime*(a1: cstring, a2: int, a3: cstring, a4: var ttm): int {.importc, header: "".} proc strptime*(a1, a2: cstring, a3: var ttm): cstring {.importc, header: "".} proc time*(a1: var Ttime): ttime {.importc, header: "".} proc timer_create*(a1: var Tclockid, a2: var Tsigevent, a3: var Ttimer): cint {.importc, header: "".} proc timer_delete*(a1: var Ttimer): cint {.importc, header: "".} proc timer_gettime*(a1: Ttimer, a2: var Titimerspec): cint {. importc, header: "".} proc timer_getoverrun*(a1: Ttimer): cint {.importc, header: "".} proc timer_settime*(a1: Ttimer, a2: cint, a3: var Titimerspec, a4: var titimerspec): cint {.importc, header: "".} proc tzset*() {.importc, header: "".} proc wait*(a1: var cint): tpid {.importc, header: "".} proc waitid*(a1: cint, a2: tid, a3: var Tsiginfo, a4: cint): cint {. importc, header: "".} proc waitpid*(a1: tpid, a2: var cint, a3: cint): tpid {. importc, header: "".} proc bsd_signal*(a1: cint, a2: proc (x: pointer) {.noconv.}) {. importc, header: "".} proc kill*(a1: Tpid, a2: cint): cint {.importc, header: "".} proc killpg*(a1: Tpid, a2: cint): cint {.importc, header: "".} proc pthread_kill*(a1: tpthread, a2: cint): cint {.importc, header: "".} proc pthread_sigmask*(a1: cint, a2, a3: var Tsigset): cint {. importc, header: "".} proc `raise`*(a1: cint): cint {.importc, header: "".} proc sigaction*(a1: cint, a2, a3: var Tsigaction): cint {. importc, header: "".} proc sigaddset*(a1: var Tsigset, a2: cint): cint {.importc, header: "".} proc sigaltstack*(a1, a2: var Tstack): cint {.importc, header: "".} proc sigdelset*(a1: var Tsigset, a2: cint): cint {.importc, header: "".} proc sigemptyset*(a1: var Tsigset): cint {.importc, header: "".} proc sigfillset*(a1: var Tsigset): cint {.importc, header: "".} proc sighold*(a1: cint): cint {.importc, header: "".} proc sigignore*(a1: cint): cint {.importc, header: "".} proc siginterrupt*(a1, a2: cint): cint {.importc, header: "".} proc sigismember*(a1: var Tsigset, a2: cint): cint {.importc, header: "".} proc signal*(a1: cint, a2: proc (x: cint) {.noconv.}) {. importc, header: "".} proc sigpause*(a1: cint): cint {.importc, header: "".} proc sigpending*(a1: var tsigset): cint {.importc, header: "".} proc sigprocmask*(a1: cint, a2, a3: var tsigset): cint {. importc, header: "".} proc sigqueue*(a1: tpid, a2: cint, a3: Tsigval): cint {. importc, header: "".} proc sigrelse*(a1: cint): cint {.importc, header: "".} proc sigset*(a1: int, a2: proc (x: cint) {.noconv.}) {.importc, header: "".} proc sigsuspend*(a1: var Tsigset): cint {.importc, header: "".} proc sigtimedwait*(a1: var Tsigset, a2: var tsiginfo, a3: var ttimespec): cint {.importc, header: "".} proc sigwait*(a1: var Tsigset, a2: var cint): cint {.importc, header: "".} proc sigwaitinfo*(a1: var Tsigset, a2: var tsiginfo): cint {. importc, header: "".} proc catclose*(a1: Tnl_catd): cint {.importc, header: "".} proc catgets*(a1: Tnl_catd, a2, a3: cint, a4: cstring): cstring {. importc, header: "".} proc catopen*(a1: cstring, a2: cint): Tnl_catd {.importc, header: "".} proc sched_get_priority_max*(a1: cint): cint {.importc, header: "".} proc sched_get_priority_min*(a1: cint): cint {.importc, header: "".} proc sched_getparam*(a1: tpid, a2: var Tsched_param): cint {. importc, header: "".} proc sched_getscheduler*(a1: tpid): cint {.importc, header: "".} proc sched_rr_get_interval*(a1: tpid, a2: var Ttimespec): cint {. importc, header: "".} proc sched_setparam*(a1: tpid, a2: var Tsched_param): cint {. importc, header: "".} proc sched_setscheduler*(a1: tpid, a2: cint, a3: var tsched_param): cint {. importc, header: "".} proc sched_yield*(): cint {.importc, header: "".} proc strerror*(errnum: cint): cstring {.importc, header: "".} proc FD_CLR*(a1: cint, a2: var Tfd_set) {.importc, header: "".} proc FD_ISSET*(a1: cint, a2: var Tfd_set): cint {. importc, header: "".} proc FD_SET*(a1: cint, a2: var Tfd_set) {.importc, header: "".} proc FD_ZERO*(a1: var Tfd_set) {.importc, header: "".} proc pselect*(a1: cint, a2, a3, a4: var Tfd_set, a5: var ttimespec, a6: var Tsigset): cint {.importc, header: "".} proc select*(a1: cint, a2, a3, a4: var Tfd_set, a5: var ttimeval): cint {. importc, header: "".} when hasSpawnH: proc posix_spawn*(a1: var tpid, a2: cstring, a3: var Tposix_spawn_file_actions, a4: var Tposix_spawnattr, a5, a6: cstringArray): cint {.importc, header: "".} proc posix_spawn_file_actions_addclose*(a1: var tposix_spawn_file_actions, a2: cint): cint {.importc, header: "".} proc posix_spawn_file_actions_adddup2*(a1: var tposix_spawn_file_actions, a2, a3: cint): cint {.importc, header: "".} proc posix_spawn_file_actions_addopen*(a1: var tposix_spawn_file_actions, a2: cint, a3: cstring, a4: cint, a5: tmode): cint {. importc, header: "".} proc posix_spawn_file_actions_destroy*( a1: var tposix_spawn_file_actions): cint {.importc, header: "".} proc posix_spawn_file_actions_init*( a1: var tposix_spawn_file_actions): cint {.importc, header: "".} proc posix_spawnattr_destroy*(a1: var tposix_spawnattr): cint {. importc, header: "".} proc posix_spawnattr_getsigdefault*(a1: var tposix_spawnattr, a2: var Tsigset): cint {.importc, header: "".} proc posix_spawnattr_getflags*(a1: var tposix_spawnattr, a2: var cshort): cint {.importc, header: "".} proc posix_spawnattr_getpgroup*(a1: var tposix_spawnattr, a2: var tpid): cint {.importc, header: "".} proc posix_spawnattr_getschedparam*(a1: var tposix_spawnattr, a2: var tsched_param): cint {.importc, header: "".} proc posix_spawnattr_getschedpolicy*(a1: var tposix_spawnattr, a2: var cint): cint {.importc, header: "".} proc posix_spawnattr_getsigmask*(a1: var tposix_spawnattr, a2: var tsigset): cint {.importc, header: "".} proc posix_spawnattr_init*(a1: var tposix_spawnattr): cint {. importc, header: "".} proc posix_spawnattr_setsigdefault*(a1: var tposix_spawnattr, a2: var tsigset): cint {.importc, header: "".} proc posix_spawnattr_setflags*(a1: var tposix_spawnattr, a2: cshort): cint {. importc, header: "".} proc posix_spawnattr_setpgroup*(a1: var tposix_spawnattr, a2: tpid): cint {. importc, header: "".} proc posix_spawnattr_setschedparam*(a1: var tposix_spawnattr, a2: var tsched_param): cint {.importc, header: "".} proc posix_spawnattr_setschedpolicy*(a1: var tposix_spawnattr, a2: cint): cint {. importc, header: "".} proc posix_spawnattr_setsigmask*(a1: var tposix_spawnattr, a2: var tsigset): cint {.importc, header: "".} proc posix_spawnp*(a1: var tpid, a2: cstring, a3: var tposix_spawn_file_actions, a4: var tposix_spawnattr, a5, a6: cstringArray): cint {.importc, header: "".} proc getcontext*(a1: var Tucontext): cint {.importc, header: "".} proc makecontext*(a1: var Tucontext, a4: proc (){.noconv.}, a3: cint) {. varargs, importc, header: "".} proc setcontext*(a1: var Tucontext): cint {.importc, header: "".} proc swapcontext*(a1, a2: var Tucontext): cint {.importc, header: "".} proc if_nametoindex*(a1: cstring): cint {.importc, header: "".} proc if_indextoname*(a1: cint, a2: cstring): cstring {. importc, header: "".} proc if_nameindex*(): ptr Tif_nameindex {.importc, header: "".} proc if_freenameindex*(a1: ptr Tif_nameindex) {.importc, header: "".} proc readv*(a1: cint, a2: ptr TIOVec, a3: cint): int {. importc, header: "".} proc writev*(a1: cint, a2: ptr TIOVec, a3: cint): int {. importc, header: "".} proc CMSG_DATA*(cmsg: ptr Tcmsghdr): cstring {. importc, header: "".} proc CMSG_NXTHDR*(mhdr: ptr TMsgHdr, cmsg: ptr TCMsgHdr): ptr TCmsgHdr {. importc, header: "".} proc CMSG_FIRSTHDR*(mhdr: ptr TMsgHdr): ptr TCMsgHdr {. importc, header: "".} proc accept*(a1: cint, a2: ptr Tsockaddr, a3: ptr Tsocklen): cint {. importc, header: "".} proc bind*(a1: cint, a2: ptr Tsockaddr, a3: Tsocklen): cint {. importc, header: "".} proc connect*(a1: cint, a2: ptr Tsockaddr, a3: Tsocklen): cint {. importc, header: "".} proc getpeername*(a1: cint, a2: ptr Tsockaddr, a3: ptr Tsocklen): cint {. importc, header: "".} proc getsockname*(a1: cint, a2: ptr Tsockaddr, a3: ptr Tsocklen): cint {. importc, header: "".} proc getsockopt*(a1, a2, a3: cint, a4: pointer, a5: ptr Tsocklen): cint {. importc, header: "".} proc listen*(a1, a2: cint): cint {. importc, header: "".} proc recv*(a1: cint, a2: pointer, a3: int, a4: cint): int {. importc, header: "".} proc recvfrom*(a1: cint, a2: pointer, a3: int, a4: cint, a5: ptr Tsockaddr, a6: ptr Tsocklen): int {. importc, header: "".} proc recvmsg*(a1: cint, a2: ptr Tmsghdr, a3: cint): int {. importc, header: "".} proc send*(a1: cint, a2: pointer, a3: int, a4: cint): int {. importc, header: "".} proc sendmsg*(a1: cint, a2: ptr Tmsghdr, a3: cint): int {. importc, header: "".} proc sendto*(a1: cint, a2: pointer, a3: int, a4: cint, a5: ptr Tsockaddr, a6: Tsocklen): int {. importc, header: "".} proc setsockopt*(a1, a2, a3: cint, a4: pointer, a5: Tsocklen): cint {. importc, header: "".} proc shutdown*(a1, a2: cint): cint {. importc, header: "".} proc socket*(a1, a2, a3: cint): cint {. importc, header: "".} proc sockatmark*(a1: cint): cint {. importc, header: "".} proc socketpair*(a1, a2, a3: cint, a4: var array[0..1, cint]): cint {. importc, header: "".} proc IN6_IS_ADDR_UNSPECIFIED* (a1: ptr TIn6Addr): cint {. importc, header: "".} ## Unspecified address. proc IN6_IS_ADDR_LOOPBACK* (a1: ptr TIn6Addr): cint {. importc, header: "".} ## Loopback address. proc IN6_IS_ADDR_MULTICAST* (a1: ptr TIn6Addr): cint {. importc, header: "".} ## Multicast address. proc IN6_IS_ADDR_LINKLOCAL* (a1: ptr TIn6Addr): cint {. importc, header: "".} ## Unicast link-local address. proc IN6_IS_ADDR_SITELOCAL* (a1: ptr TIn6Addr): cint {. importc, header: "".} ## Unicast site-local address. proc IN6_IS_ADDR_V4MAPPED* (a1: ptr TIn6Addr): cint {. importc, header: "".} ## IPv4 mapped address. proc IN6_IS_ADDR_V4COMPAT* (a1: ptr TIn6Addr): cint {. importc, header: "".} ## IPv4-compatible address. proc IN6_IS_ADDR_MC_NODELOCAL* (a1: ptr TIn6Addr): cint {. importc, header: "".} ## Multicast node-local address. proc IN6_IS_ADDR_MC_LINKLOCAL* (a1: ptr TIn6Addr): cint {. importc, header: "".} ## Multicast link-local address. proc IN6_IS_ADDR_MC_SITELOCAL* (a1: ptr TIn6Addr): cint {. importc, header: "".} ## Multicast site-local address. proc IN6_IS_ADDR_MC_ORGLOCAL* (a1: ptr TIn6Addr): cint {. importc, header: "".} ## Multicast organization-local address. proc IN6_IS_ADDR_MC_GLOBAL* (a1: ptr TIn6Addr): cint {. importc, header: "".} ## Multicast global address. proc endhostent*() {.importc, header: "".} proc endnetent*() {.importc, header: "".} proc endprotoent*() {.importc, header: "".} proc endservent*() {.importc, header: "".} proc freeaddrinfo*(a1: ptr Taddrinfo) {.importc, header: "".} proc gai_strerror*(a1: cint): cstring {.importc, header: "".} proc getaddrinfo*(a1, a2: cstring, a3: ptr TAddrInfo, a4: var ptr TAddrInfo): cint {.importc, header: "".} proc gethostbyaddr*(a1: pointer, a2: Tsocklen, a3: cint): ptr THostent {. importc, header: "".} proc gethostbyname*(a1: cstring): ptr THostent {.importc, header: "".} proc gethostent*(): ptr THostent {.importc, header: "".} proc getnameinfo*(a1: ptr Tsockaddr, a2: Tsocklen, a3: cstring, a4: Tsocklen, a5: cstring, a6: Tsocklen, a7: cint): cint {.importc, header: "".} proc getnetbyaddr*(a1: int32, a2: cint): ptr TNetent {.importc, header: "".} proc getnetbyname*(a1: cstring): ptr TNetent {.importc, header: "".} proc getnetent*(): ptr TNetent {.importc, header: "".} proc getprotobyname*(a1: cstring): ptr TProtoent {.importc, header: "".} proc getprotobynumber*(a1: cint): ptr TProtoent {.importc, header: "".} proc getprotoent*(): ptr TProtoent {.importc, header: "".} proc getservbyname*(a1, a2: cstring): ptr TServent {.importc, header: "".} proc getservbyport*(a1: cint, a2: cstring): ptr TServent {. importc, header: "".} proc getservent*(): ptr TServent {.importc, header: "".} proc sethostent*(a1: cint) {.importc, header: "".} proc setnetent*(a1: cint) {.importc, header: "".} proc setprotoent*(a1: cint) {.importc, header: "".} proc setservent*(a1: cint) {.importc, header: "".} proc poll*(a1: ptr Tpollfd, a2: Tnfds, a3: int): cint {. importc, header: "".}