posix_freertos_consts.nim 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. # Generated by detect.nim
  2. # <errno.h>
  3. var E2BIG* {.importc: "E2BIG", header: "<errno.h>".}: cint
  4. var EACCES* {.importc: "EACCES", header: "<errno.h>".}: cint
  5. var EADDRINUSE* {.importc: "EADDRINUSE", header: "<errno.h>".}: cint
  6. var EADDRNOTAVAIL* {.importc: "EADDRNOTAVAIL", header: "<errno.h>".}: cint
  7. var EAFNOSUPPORT* {.importc: "EAFNOSUPPORT", header: "<errno.h>".}: cint
  8. var EAGAIN* {.importc: "EAGAIN", header: "<errno.h>".}: cint
  9. var EALREADY* {.importc: "EALREADY", header: "<errno.h>".}: cint
  10. var EBADF* {.importc: "EBADF", header: "<errno.h>".}: cint
  11. var EBADMSG* {.importc: "EBADMSG", header: "<errno.h>".}: cint
  12. var EBUSY* {.importc: "EBUSY", header: "<errno.h>".}: cint
  13. var ECANCELED* {.importc: "ECANCELED", header: "<errno.h>".}: cint
  14. var ECHILD* {.importc: "ECHILD", header: "<errno.h>".}: cint
  15. var ECONNABORTED* {.importc: "ECONNABORTED", header: "<errno.h>".}: cint
  16. var ECONNREFUSED* {.importc: "ECONNREFUSED", header: "<errno.h>".}: cint
  17. var ECONNRESET* {.importc: "ECONNRESET", header: "<errno.h>".}: cint
  18. var EDEADLK* {.importc: "EDEADLK", header: "<errno.h>".}: cint
  19. var EDESTADDRREQ* {.importc: "EDESTADDRREQ", header: "<errno.h>".}: cint
  20. var EDOM* {.importc: "EDOM", header: "<errno.h>".}: cint
  21. var EDQUOT* {.importc: "EDQUOT", header: "<errno.h>".}: cint
  22. var EEXIST* {.importc: "EEXIST", header: "<errno.h>".}: cint
  23. var EFAULT* {.importc: "EFAULT", header: "<errno.h>".}: cint
  24. var EFBIG* {.importc: "EFBIG", header: "<errno.h>".}: cint
  25. var EHOSTUNREACH* {.importc: "EHOSTUNREACH", header: "<errno.h>".}: cint
  26. var EIDRM* {.importc: "EIDRM", header: "<errno.h>".}: cint
  27. var EILSEQ* {.importc: "EILSEQ", header: "<errno.h>".}: cint
  28. var EINPROGRESS* {.importc: "EINPROGRESS", header: "<errno.h>".}: cint
  29. var EINTR* {.importc: "EINTR", header: "<errno.h>".}: cint
  30. var EINVAL* {.importc: "EINVAL", header: "<errno.h>".}: cint
  31. var EIO* {.importc: "EIO", header: "<errno.h>".}: cint
  32. var EISCONN* {.importc: "EISCONN", header: "<errno.h>".}: cint
  33. var EISDIR* {.importc: "EISDIR", header: "<errno.h>".}: cint
  34. var ELOOP* {.importc: "ELOOP", header: "<errno.h>".}: cint
  35. var EMFILE* {.importc: "EMFILE", header: "<errno.h>".}: cint
  36. var EMLINK* {.importc: "EMLINK", header: "<errno.h>".}: cint
  37. var EMSGSIZE* {.importc: "EMSGSIZE", header: "<errno.h>".}: cint
  38. var EMULTIHOP* {.importc: "EMULTIHOP", header: "<errno.h>".}: cint
  39. var ENAMETOOLONG* {.importc: "ENAMETOOLONG", header: "<errno.h>".}: cint
  40. var ENETDOWN* {.importc: "ENETDOWN", header: "<errno.h>".}: cint
  41. var ENETRESET* {.importc: "ENETRESET", header: "<errno.h>".}: cint
  42. var ENETUNREACH* {.importc: "ENETUNREACH", header: "<errno.h>".}: cint
  43. var ENFILE* {.importc: "ENFILE", header: "<errno.h>".}: cint
  44. var ENOBUFS* {.importc: "ENOBUFS", header: "<errno.h>".}: cint
  45. var ENODATA* {.importc: "ENODATA", header: "<errno.h>".}: cint
  46. var ENODEV* {.importc: "ENODEV", header: "<errno.h>".}: cint
  47. var ENOENT* {.importc: "ENOENT", header: "<errno.h>".}: cint
  48. var ENOEXEC* {.importc: "ENOEXEC", header: "<errno.h>".}: cint
  49. var ENOLCK* {.importc: "ENOLCK", header: "<errno.h>".}: cint
  50. var ENOLINK* {.importc: "ENOLINK", header: "<errno.h>".}: cint
  51. var ENOMEM* {.importc: "ENOMEM", header: "<errno.h>".}: cint
  52. var ENOMSG* {.importc: "ENOMSG", header: "<errno.h>".}: cint
  53. var ENOPROTOOPT* {.importc: "ENOPROTOOPT", header: "<errno.h>".}: cint
  54. var ENOSPC* {.importc: "ENOSPC", header: "<errno.h>".}: cint
  55. var ENOSR* {.importc: "ENOSR", header: "<errno.h>".}: cint
  56. var ENOSTR* {.importc: "ENOSTR", header: "<errno.h>".}: cint
  57. var ENOSYS* {.importc: "ENOSYS", header: "<errno.h>".}: cint
  58. var ENOTCONN* {.importc: "ENOTCONN", header: "<errno.h>".}: cint
  59. var ENOTDIR* {.importc: "ENOTDIR", header: "<errno.h>".}: cint
  60. var ENOTEMPTY* {.importc: "ENOTEMPTY", header: "<errno.h>".}: cint
  61. var ENOTSOCK* {.importc: "ENOTSOCK", header: "<errno.h>".}: cint
  62. var ENOTSUP* {.importc: "ENOTSUP", header: "<errno.h>".}: cint
  63. var ENOTTY* {.importc: "ENOTTY", header: "<errno.h>".}: cint
  64. var ENXIO* {.importc: "ENXIO", header: "<errno.h>".}: cint
  65. var EOPNOTSUPP* {.importc: "EOPNOTSUPP", header: "<errno.h>".}: cint
  66. var EOVERFLOW* {.importc: "EOVERFLOW", header: "<errno.h>".}: cint
  67. var EPERM* {.importc: "EPERM", header: "<errno.h>".}: cint
  68. var EPIPE* {.importc: "EPIPE", header: "<errno.h>".}: cint
  69. var EPROTO* {.importc: "EPROTO", header: "<errno.h>".}: cint
  70. var EPROTONOSUPPORT* {.importc: "EPROTONOSUPPORT", header: "<errno.h>".}: cint
  71. var EPROTOTYPE* {.importc: "EPROTOTYPE", header: "<errno.h>".}: cint
  72. var ERANGE* {.importc: "ERANGE", header: "<errno.h>".}: cint
  73. var EROFS* {.importc: "EROFS", header: "<errno.h>".}: cint
  74. var ESPIPE* {.importc: "ESPIPE", header: "<errno.h>".}: cint
  75. var ESRCH* {.importc: "ESRCH", header: "<errno.h>".}: cint
  76. var ESTALE* {.importc: "ESTALE", header: "<errno.h>".}: cint
  77. var ETIME* {.importc: "ETIME", header: "<errno.h>".}: cint
  78. var ETIMEDOUT* {.importc: "ETIMEDOUT", header: "<errno.h>".}: cint
  79. var ETXTBSY* {.importc: "ETXTBSY", header: "<errno.h>".}: cint
  80. var EWOULDBLOCK* {.importc: "EWOULDBLOCK", header: "<errno.h>".}: cint
  81. var EXDEV* {.importc: "EXDEV", header: "<errno.h>".}: cint
  82. # <sys/fcntl.h>
  83. var F_GETFD* {.importc: "F_GETFD", header: "<sys/fcntl.h>".}: cint
  84. # var F_SETFD* {.importc: "F_SETFD", header: "<sys/fcntl.h>".}: cint
  85. var F_GETFL* {.importc: "F_GETFL", header: "<sys/fcntl.h>".}: cint
  86. var F_SETFL* {.importc: "F_SETFL", header: "<sys/fcntl.h>".}: cint
  87. # var F_GETLK* {.importc: "F_GETLK", header: "<sys/fcntl.h>".}: cint
  88. # var F_SETLK* {.importc: "F_SETLK", header: "<sys/fcntl.h>".}: cint
  89. # var F_SETLKW* {.importc: "F_SETLKW", header: "<sys/fcntl.h>".}: cint
  90. # var F_GETOWN* {.importc: "F_GETOWN", header: "<sys/fcntl.h>".}: cint
  91. # var F_SETOWN* {.importc: "F_SETOWN", header: "<sys/fcntl.h>".}: cint
  92. # var FD_CLOEXEC* {.importc: "FD_CLOEXEC", header: "<sys/fcntl.h>".}: cint
  93. # var F_RDLCK* {.importc: "F_RDLCK", header: "<sys/fcntl.h>".}: cint
  94. # var F_UNLCK* {.importc: "F_UNLCK", header: "<sys/fcntl.h>".}: cint
  95. # var F_WRLCK* {.importc: "F_WRLCK", header: "<sys/fcntl.h>".}: cint
  96. var O_CREAT* {.importc: "O_CREAT", header: "<sys/fcntl.h>".}: cint
  97. var O_EXCL* {.importc: "O_EXCL", header: "<sys/fcntl.h>".}: cint
  98. # var O_NOCTTY* {.importc: "O_NOCTTY", header: "<sys/fcntl.h>".}: cint
  99. var O_TRUNC* {.importc: "O_TRUNC", header: "<sys/fcntl.h>".}: cint
  100. var O_APPEND* {.importc: "O_APPEND", header: "<sys/fcntl.h>".}: cint
  101. # var O_DSYNC* {.importc: "O_DSYNC", header: "<sys/fcntl.h>".}: cint
  102. var O_NONBLOCK* {.importc: "O_NONBLOCK", header: "<sys/fcntl.h>".}: cint
  103. # var O_RSYNC* {.importc: "O_RSYNC", header: "<sys/fcntl.h>".}: cint
  104. # var O_SYNC* {.importc: "O_SYNC", header: "<sys/fcntl.h>".}: cint
  105. # var O_ACCMODE* {.importc: "O_ACCMODE", header: "<sys/fcntl.h>".}: cint
  106. var O_RDONLY* {.importc: "O_RDONLY", header: "<sys/fcntl.h>".}: cint
  107. var O_RDWR* {.importc: "O_RDWR", header: "<sys/fcntl.h>".}: cint
  108. var O_WRONLY* {.importc: "O_WRONLY", header: "<sys/fcntl.h>".}: cint
  109. # var O_CLOEXEC* {.importc: "O_CLOEXEC", header: "<sys/fcntl.h>".}: cint
  110. # # <locale.h>
  111. # var LC_ALL* {.importc: "LC_ALL", header: "<locale.h>".}: cint
  112. # var LC_COLLATE* {.importc: "LC_COLLATE", header: "<locale.h>".}: cint
  113. # var LC_CTYPE* {.importc: "LC_CTYPE", header: "<locale.h>".}: cint
  114. # var LC_MESSAGES* {.importc: "LC_MESSAGES", header: "<locale.h>".}: cint
  115. # var LC_MONETARY* {.importc: "LC_MONETARY", header: "<locale.h>".}: cint
  116. # var LC_NUMERIC* {.importc: "LC_NUMERIC", header: "<locale.h>".}: cint
  117. # var LC_TIME* {.importc: "LC_TIME", header: "<locale.h>".}: cint
  118. # <netdb.h>
  119. var HOST_NOT_FOUND* {.importc: "HOST_NOT_FOUND", header: "<netdb.h>".}: cint
  120. var NO_DATA* {.importc: "NO_DATA", header: "<netdb.h>".}: cint
  121. var NO_RECOVERY* {.importc: "NO_RECOVERY", header: "<netdb.h>".}: cint
  122. var TRY_AGAIN* {.importc: "TRY_AGAIN", header: "<netdb.h>".}: cint
  123. var AI_PASSIVE* {.importc: "AI_PASSIVE", header: "<netdb.h>".}: cint
  124. var AI_CANONNAME* {.importc: "AI_CANONNAME", header: "<netdb.h>".}: cint
  125. var AI_NUMERICHOST* {.importc: "AI_NUMERICHOST", header: "<netdb.h>".}: cint
  126. var AI_NUMERICSERV* {.importc: "AI_NUMERICSERV", header: "<netdb.h>".}: cint
  127. var AI_V4MAPPED* {.importc: "AI_V4MAPPED", header: "<netdb.h>".}: cint
  128. var AI_ALL* {.importc: "AI_ALL", header: "<netdb.h>".}: cint
  129. var AI_ADDRCONFIG* {.importc: "AI_ADDRCONFIG", header: "<netdb.h>".}: cint
  130. var NI_NOFQDN* {.importc: "NI_NOFQDN", header: "<netdb.h>".}: cint
  131. var NI_NUMERICHOST* {.importc: "NI_NUMERICHOST", header: "<netdb.h>".}: cint
  132. var NI_NAMEREQD* {.importc: "NI_NAMEREQD", header: "<netdb.h>".}: cint
  133. var NI_NUMERICSERV* {.importc: "NI_NUMERICSERV", header: "<netdb.h>".}: cint
  134. var NI_DGRAM* {.importc: "NI_DGRAM", header: "<netdb.h>".}: cint
  135. var EAI_AGAIN* {.importc: "EAI_AGAIN", header: "<netdb.h>".}: cint
  136. var EAI_BADFLAGS* {.importc: "EAI_BADFLAGS", header: "<netdb.h>".}: cint
  137. var EAI_FAIL* {.importc: "EAI_FAIL", header: "<netdb.h>".}: cint
  138. var EAI_FAMILY* {.importc: "EAI_FAMILY", header: "<netdb.h>".}: cint
  139. var EAI_MEMORY* {.importc: "EAI_MEMORY", header: "<netdb.h>".}: cint
  140. var EAI_NONAME* {.importc: "EAI_NONAME", header: "<netdb.h>".}: cint
  141. var EAI_SERVICE* {.importc: "EAI_SERVICE", header: "<netdb.h>".}: cint
  142. var EAI_SOCKTYPE* {.importc: "EAI_SOCKTYPE", header: "<netdb.h>".}: cint
  143. var LWIP_DNS_API_DECLARE_H_ERRNO* {.importc: "LWIP_DNS_API_DECLARE_H_ERRNO", header: "<netdb.h>".}: cint
  144. var LWIP_DNS_API_DEFINE_ERRORS* {.importc: "LWIP_DNS_API_DEFINE_ERRORS", header: "<netdb.h>".}: cint
  145. var LWIP_DNS_API_DEFINE_FLAGS* {.importc: "LWIP_DNS_API_DEFINE_FLAGS", header: "<netdb.h>".}: cint
  146. var LWIP_DNS_API_DECLARE_STRUCTS* {.importc: "LWIP_DNS_API_DECLARE_STRUCTS", header: "<netdb.h>".}: cint
  147. var NETDB_ELEM_SIZE* {.importc: "NETDB_ELEM_SIZE", header: "<netdb.h>".}: cint
  148. # <netif.h>
  149. var ENABLE_LOOPBACK* {.importc: "ENABLE_LOOPBACK", header: "<netif.h>".}: cint
  150. var NETIF_MAX_HWADDR_LEN* {.importc: "NETIF_MAX_HWADDR_LEN", header: "<netif.h>".}: cint
  151. var NETIF_NAMESIZE* {.importc: "NETIF_NAMESIZE", header: "<netif.h>".}: cint
  152. var NETIF_FLAG_UP* {.importc: "NETIF_FLAG_UP", header: "<netif.h>".}: cint
  153. var NETIF_FLAG_BROADCAST* {.importc: "NETIF_FLAG_BROADCAST", header: "<netif.h>".}: cint
  154. var NETIF_FLAG_LINK_UP* {.importc: "NETIF_FLAG_LINK_UP", header: "<netif.h>".}: cint
  155. var NETIF_FLAG_ETHARP* {.importc: "NETIF_FLAG_ETHARP", header: "<netif.h>".}: cint
  156. var NETIF_FLAG_ETHERNET* {.importc: "NETIF_FLAG_ETHERNET", header: "<netif.h>".}: cint
  157. var NETIF_FLAG_IGMP* {.importc: "NETIF_FLAG_IGMP", header: "<netif.h>".}: cint
  158. var NETIF_FLAG_MLD6* {.importc: "NETIF_FLAG_MLD6", header: "<netif.h>".}: cint
  159. var NETIF_FLAG_GARP* {.importc: "NETIF_FLAG_GARP", header: "<netif.h>".}: cint
  160. var NETIF_CHECKSUM_GEN_IP* {.importc: "NETIF_CHECKSUM_GEN_IP", header: "<netif.h>".}: cint
  161. var NETIF_CHECKSUM_GEN_UDP* {.importc: "NETIF_CHECKSUM_GEN_UDP", header: "<netif.h>".}: cint
  162. var NETIF_CHECKSUM_GEN_TCP* {.importc: "NETIF_CHECKSUM_GEN_TCP", header: "<netif.h>".}: cint
  163. var NETIF_CHECKSUM_GEN_ICMP* {.importc: "NETIF_CHECKSUM_GEN_ICMP", header: "<netif.h>".}: cint
  164. var NETIF_CHECKSUM_GEN_ICMP6* {.importc: "NETIF_CHECKSUM_GEN_ICMP6", header: "<netif.h>".}: cint
  165. var NETIF_CHECKSUM_CHECK_IP* {.importc: "NETIF_CHECKSUM_CHECK_IP", header: "<netif.h>".}: cint
  166. var NETIF_CHECKSUM_CHECK_UDP* {.importc: "NETIF_CHECKSUM_CHECK_UDP", header: "<netif.h>".}: cint
  167. var NETIF_CHECKSUM_CHECK_TCP* {.importc: "NETIF_CHECKSUM_CHECK_TCP", header: "<netif.h>".}: cint
  168. var NETIF_CHECKSUM_CHECK_ICMP* {.importc: "NETIF_CHECKSUM_CHECK_ICMP", header: "<netif.h>".}: cint
  169. var NETIF_CHECKSUM_CHECK_ICMP6* {.importc: "NETIF_CHECKSUM_CHECK_ICMP6", header: "<netif.h>".}: cint
  170. var NETIF_CHECKSUM_ENABLE_ALL* {.importc: "NETIF_CHECKSUM_ENABLE_ALL", header: "<netif.h>".}: cint
  171. var NETIF_CHECKSUM_DISABLE_ALL* {.importc: "NETIF_CHECKSUM_DISABLE_ALL", header: "<netif.h>".}: cint
  172. var NETIF_ADDR_IDX_MAX* {.importc: "NETIF_ADDR_IDX_MAX", header: "<netif.h>".}: cint
  173. var LWIP_NETIF_USE_HINTS* {.importc: "LWIP_NETIF_USE_HINTS", header: "<netif.h>".}: cint
  174. var NETIF_NO_INDEX* {.importc: "NETIF_NO_INDEX", header: "<netif.h>".}: cint
  175. var LWIP_NSC_NONE* {.importc: "LWIP_NSC_NONE", header: "<netif.h>".}: cint
  176. var LWIP_NSC_NETIF_ADDED* {.importc: "LWIP_NSC_NETIF_ADDED", header: "<netif.h>".}: cint
  177. var LWIP_NSC_NETIF_REMOVED* {.importc: "LWIP_NSC_NETIF_REMOVED", header: "<netif.h>".}: cint
  178. var LWIP_NSC_LINK_CHANGED* {.importc: "LWIP_NSC_LINK_CHANGED", header: "<netif.h>".}: cint
  179. var LWIP_NSC_STATUS_CHANGED* {.importc: "LWIP_NSC_STATUS_CHANGED", header: "<netif.h>".}: cint
  180. var LWIP_NSC_IPV4_ADDRESS_CHANGED* {.importc: "LWIP_NSC_IPV4_ADDRESS_CHANGED", header: "<netif.h>".}: cint
  181. var LWIP_NSC_IPV4_GATEWAY_CHANGED* {.importc: "LWIP_NSC_IPV4_GATEWAY_CHANGED", header: "<netif.h>".}: cint
  182. var LWIP_NSC_IPV4_NETMASK_CHANGED* {.importc: "LWIP_NSC_IPV4_NETMASK_CHANGED", header: "<netif.h>".}: cint
  183. var LWIP_NSC_IPV4_SETTINGS_CHANGED* {.importc: "LWIP_NSC_IPV4_SETTINGS_CHANGED", header: "<netif.h>".}: cint
  184. var LWIP_NSC_IPV6_SET* {.importc: "LWIP_NSC_IPV6_SET", header: "<netif.h>".}: cint
  185. var LWIP_NSC_IPV6_ADDR_STATE_CHANGED* {.importc: "LWIP_NSC_IPV6_ADDR_STATE_CHANGED", header: "<netif.h>".}: cint
  186. #define NETIF_DECLARE_EXT_CALLBACK(name)
  187. # <net/if.h>
  188. var IF_NAMESIZE* {.importc: "IF_NAMESIZE", header: "<net/if.h>".}: cint
  189. # <sys/socket.h>
  190. var IPPROTO_IP* {.importc: "IPPROTO_IP", header: "<sys/socket.h>".}: cint
  191. var IPPROTO_IPV6* {.importc: "IPPROTO_IPV6", header: "<sys/socket.h>".}: cint
  192. var IPPROTO_ICMP* {.importc: "IPPROTO_ICMP", header: "<sys/socket.h>".}: cint
  193. var IPPROTO_ICMPV6* {.importc: "IPPROTO_ICMPV6", header: "<sys/socket.h>".}: cint
  194. var IPPROTO_RAW* {.importc: "IPPROTO_RAW", header: "<sys/socket.h>".}: cint
  195. var IPPROTO_TCP* {.importc: "IPPROTO_TCP", header: "<sys/socket.h>".}: cint
  196. var IPPROTO_UDP* {.importc: "IPPROTO_UDP", header: "<sys/socket.h>".}: cint
  197. var INADDR_ANY* {.importc: "INADDR_ANY", header: "<sys/socket.h>".}: InAddrScalar
  198. var INADDR_LOOPBACK* {.importc: "INADDR_LOOPBACK", header: "<sys/socket.h>".}: InAddrScalar
  199. var INADDR_BROADCAST* {.importc: "INADDR_BROADCAST", header: "<sys/socket.h>".}: InAddrScalar
  200. var INET_ADDRSTRLEN* {.importc: "INET_ADDRSTRLEN", header: "<sys/socket.h>".}: cint
  201. var INET6_ADDRSTRLEN* {.importc: "INET6_ADDRSTRLEN", header: "<sys/socket.h>".}: cint
  202. var IPV6_JOIN_GROUP* {.importc: "IPV6_JOIN_GROUP", header: "<sys/socket.h>".}: cint
  203. var IPV6_LEAVE_GROUP* {.importc: "IPV6_LEAVE_GROUP", header: "<sys/socket.h>".}: cint
  204. var IPV6_MULTICAST_HOPS* {.importc: "IPV6_MULTICAST_HOPS", header: "<sys/socket.h>".}: cint
  205. var IPV6_MULTICAST_IF* {.importc: "IPV6_MULTICAST_IF", header: "<sys/socket.h>".}: cint
  206. var IPV6_MULTICAST_LOOP* {.importc: "IPV6_MULTICAST_LOOP", header: "<sys/socket.h>".}: cint
  207. var IPV6_UNICAST_HOPS* {.importc: "IPV6_UNICAST_HOPS", header: "<sys/socket.h>".}: cint
  208. var IPV6_V6ONLY* {.importc: "IPV6_V6ONLY", header: "<sys/socket.h>".}: cint
  209. # <netinet/tcp.h>
  210. const TCP_NODELAY* = 0x01 # don't delay send to coalesce packets
  211. const TCP_KEEPALIVE* = 0x02 # send KEEPALIVE probes when idle for pcb->keep_idle milliseconds
  212. const TCP_KEEPIDLE* = 0x03 # set pcb->keep_idle - Same as TCP_KEEPALIVE, but use seconds for get/setsockopt
  213. const TCP_KEEPINTVL* = 0x04 # set pcb->keep_intvl - Use seconds for get/setsockopt
  214. const TCP_KEEPCNT* = 0x05 # set pcb->keep_cnt - Use number of probes sent for get/setsockopt
  215. # <nl_types.h>
  216. # var NL_SETD* {.importc: "NL_SETD", header: "<nl_types.h>".}: cint
  217. # var NL_CAT_LOCALE* {.importc: "NL_CAT_LOCALE", header: "<nl_types.h>".}: cint
  218. # <sys/poll.h>
  219. # var POLLIN* {.importc: "POLLIN", header: "<sys/poll.h>".}: cshort
  220. # var POLLRDNORM* {.importc: "POLLRDNORM", header: "<sys/poll.h>".}: cshort
  221. # var POLLRDBAND* {.importc: "POLLRDBAND", header: "<sys/poll.h>".}: cshort
  222. # var POLLPRI* {.importc: "POLLPRI", header: "<sys/poll.h>".}: cshort
  223. # var POLLOUT* {.importc: "POLLOUT", header: "<sys/poll.h>".}: cshort
  224. # var POLLWRNORM* {.importc: "POLLWRNORM", header: "<sys/poll.h>".}: cshort
  225. # var POLLWRBAND* {.importc: "POLLWRBAND", header: "<sys/poll.h>".}: cshort
  226. # var POLLERR* {.importc: "POLLERR", header: "<sys/poll.h>".}: cshort
  227. # var POLLHUP* {.importc: "POLLHUP", header: "<sys/poll.h>".}: cshort
  228. # var POLLNVAL* {.importc: "POLLNVAL", header: "<sys/poll.h>".}: cshort
  229. # <pthread.h>
  230. var PTHREAD_STACK_MIN* {.importc: "PTHREAD_STACK_MIN", header: "<pthread.h>".}: cint
  231. # var PTHREAD_BARRIER_SERIAL_THREAD* {.importc: "PTHREAD_BARRIER_SERIAL_THREAD", header: "<pthread.h>".}: cint
  232. # var PTHREAD_CANCEL_ASYNCHRONOUS* {.importc: "PTHREAD_CANCEL_ASYNCHRONOUS", header: "<pthread.h>".}: cint
  233. # var PTHREAD_CANCEL_ENABLE* {.importc: "PTHREAD_CANCEL_ENABLE", header: "<pthread.h>".}: cint
  234. # var PTHREAD_CANCEL_DEFERRED* {.importc: "PTHREAD_CANCEL_DEFERRED", header: "<pthread.h>".}: cint
  235. # var PTHREAD_CANCEL_DISABLE* {.importc: "PTHREAD_CANCEL_DISABLE", header: "<pthread.h>".}: cint
  236. # var PTHREAD_CREATE_DETACHED* {.importc: "PTHREAD_CREATE_DETACHED", header: "<pthread.h>".}: cint
  237. # var PTHREAD_CREATE_JOINABLE* {.importc: "PTHREAD_CREATE_JOINABLE", header: "<pthread.h>".}: cint
  238. # var PTHREAD_EXPLICIT_SCHED* {.importc: "PTHREAD_EXPLICIT_SCHED", header: "<pthread.h>".}: cint
  239. # var PTHREAD_INHERIT_SCHED* {.importc: "PTHREAD_INHERIT_SCHED", header: "<pthread.h>".}: cint
  240. # var PTHREAD_MUTEX_DEFAULT* {.importc: "PTHREAD_MUTEX_DEFAULT", header: "<pthread.h>".}: cint
  241. # var PTHREAD_MUTEX_ERRORCHECK* {.importc: "PTHREAD_MUTEX_ERRORCHECK", header: "<pthread.h>".}: cint
  242. # var PTHREAD_MUTEX_NORMAL* {.importc: "PTHREAD_MUTEX_NORMAL", header: "<pthread.h>".}: cint
  243. # var PTHREAD_MUTEX_RECURSIVE* {.importc: "PTHREAD_MUTEX_RECURSIVE", header: "<pthread.h>".}: cint
  244. # var PTHREAD_PRIO_INHERIT* {.importc: "PTHREAD_PRIO_INHERIT", header: "<pthread.h>".}: cint
  245. # var PTHREAD_PRIO_NONE* {.importc: "PTHREAD_PRIO_NONE", header: "<pthread.h>".}: cint
  246. # var PTHREAD_PRIO_PROTECT* {.importc: "PTHREAD_PRIO_PROTECT", header: "<pthread.h>".}: cint
  247. # var PTHREAD_PROCESS_SHARED* {.importc: "PTHREAD_PROCESS_SHARED", header: "<pthread.h>".}: cint
  248. # var PTHREAD_PROCESS_PRIVATE* {.importc: "PTHREAD_PROCESS_PRIVATE", header: "<pthread.h>".}: cint
  249. # var PTHREAD_SCOPE_PROCESS* {.importc: "PTHREAD_SCOPE_PROCESS", header: "<pthread.h>".}: cint
  250. # var PTHREAD_SCOPE_SYSTEM* {.importc: "PTHREAD_SCOPE_SYSTEM", header: "<pthread.h>".}: cint
  251. # # <sched.h>
  252. # var SCHED_FIFO* {.importc: "SCHED_FIFO", header: "<sched.h>".}: cint
  253. # var SCHED_RR* {.importc: "SCHED_RR", header: "<sched.h>".}: cint
  254. # var SCHED_SPORADIC* {.importc: "SCHED_SPORADIC", header: "<sched.h>".}: cint
  255. # var SCHED_OTHER* {.importc: "SCHED_OTHER", header: "<sched.h>".}: cint
  256. # <semaphore.h>
  257. var SEM_FAILED* {.importc: "SEM_FAILED", header: "<semaphore.h>".}: pointer
  258. # # <signal.h>
  259. # var SIGEV_NONE* {.importc: "SIGEV_NONE", header: "<signal.h>".}: cint
  260. # var SIGEV_SIGNAL* {.importc: "SIGEV_SIGNAL", header: "<signal.h>".}: cint
  261. # var SIGEV_THREAD* {.importc: "SIGEV_THREAD", header: "<signal.h>".}: cint
  262. # var SIGABRT* {.importc: "SIGABRT", header: "<signal.h>".}: cint
  263. # var SIGALRM* {.importc: "SIGALRM", header: "<signal.h>".}: cint
  264. # var SIGBUS* {.importc: "SIGBUS", header: "<signal.h>".}: cint
  265. # var SIGCHLD* {.importc: "SIGCHLD", header: "<signal.h>".}: cint
  266. # var SIGCONT* {.importc: "SIGCONT", header: "<signal.h>".}: cint
  267. # var SIGFPE* {.importc: "SIGFPE", header: "<signal.h>".}: cint
  268. # var SIGHUP* {.importc: "SIGHUP", header: "<signal.h>".}: cint
  269. # var SIGILL* {.importc: "SIGILL", header: "<signal.h>".}: cint
  270. # var SIGINT* {.importc: "SIGINT", header: "<signal.h>".}: cint
  271. # var SIGKILL* {.importc: "SIGKILL", header: "<signal.h>".}: cint
  272. # var SIGPIPE* {.importc: "SIGPIPE", header: "<signal.h>".}: cint
  273. # var SIGQUIT* {.importc: "SIGQUIT", header: "<signal.h>".}: cint
  274. # var SIGSEGV* {.importc: "SIGSEGV", header: "<signal.h>".}: cint
  275. # var SIGSTOP* {.importc: "SIGSTOP", header: "<signal.h>".}: cint
  276. # var SIGTERM* {.importc: "SIGTERM", header: "<signal.h>".}: cint
  277. # var SIGTSTP* {.importc: "SIGTSTP", header: "<signal.h>".}: cint
  278. # var SIGTTIN* {.importc: "SIGTTIN", header: "<signal.h>".}: cint
  279. # var SIGTTOU* {.importc: "SIGTTOU", header: "<signal.h>".}: cint
  280. # var SIGUSR1* {.importc: "SIGUSR1", header: "<signal.h>".}: cint
  281. # var SIGUSR2* {.importc: "SIGUSR2", header: "<signal.h>".}: cint
  282. # var SIGPOLL* {.importc: "SIGPOLL", header: "<signal.h>".}: cint
  283. # var SIGPROF* {.importc: "SIGPROF", header: "<signal.h>".}: cint
  284. # var SIGSYS* {.importc: "SIGSYS", header: "<signal.h>".}: cint
  285. # var SIGTRAP* {.importc: "SIGTRAP", header: "<signal.h>".}: cint
  286. # var SIGURG* {.importc: "SIGURG", header: "<signal.h>".}: cint
  287. # var SIGVTALRM* {.importc: "SIGVTALRM", header: "<signal.h>".}: cint
  288. # var SIGXCPU* {.importc: "SIGXCPU", header: "<signal.h>".}: cint
  289. # var SIGXFSZ* {.importc: "SIGXFSZ", header: "<signal.h>".}: cint
  290. # var SA_NOCLDSTOP* {.importc: "SA_NOCLDSTOP", header: "<signal.h>".}: cint
  291. # var SIG_BLOCK* {.importc: "SIG_BLOCK", header: "<signal.h>".}: cint
  292. # var SIG_UNBLOCK* {.importc: "SIG_UNBLOCK", header: "<signal.h>".}: cint
  293. # var SIG_SETMASK* {.importc: "SIG_SETMASK", header: "<signal.h>".}: cint
  294. # var SA_ONSTACK* {.importc: "SA_ONSTACK", header: "<signal.h>".}: cint
  295. # var SA_RESETHAND* {.importc: "SA_RESETHAND", header: "<signal.h>".}: cint
  296. # var SA_RESTART* {.importc: "SA_RESTART", header: "<signal.h>".}: cint
  297. # var SA_SIGINFO* {.importc: "SA_SIGINFO", header: "<signal.h>".}: cint
  298. # var SA_NOCLDWAIT* {.importc: "SA_NOCLDWAIT", header: "<signal.h>".}: cint
  299. # var SA_NODEFER* {.importc: "SA_NODEFER", header: "<signal.h>".}: cint
  300. # var SS_ONSTACK* {.importc: "SS_ONSTACK", header: "<signal.h>".}: cint
  301. # var SS_DISABLE* {.importc: "SS_DISABLE", header: "<signal.h>".}: cint
  302. # var MINSIGSTKSZ* {.importc: "MINSIGSTKSZ", header: "<signal.h>".}: cint
  303. # var SIGSTKSZ* {.importc: "SIGSTKSZ", header: "<signal.h>".}: cint
  304. # var SIG_HOLD* {.importc: "SIG_HOLD", header: "<signal.h>".}: Sighandler
  305. # var SIG_DFL* {.importc: "SIG_DFL", header: "<signal.h>".}: Sighandler
  306. # var SIG_ERR* {.importc: "SIG_ERR", header: "<signal.h>".}: Sighandler
  307. # var SIG_IGN* {.importc: "SIG_IGN", header: "<signal.h>".}: Sighandler
  308. # # <sys/ipc.h>
  309. # var IPC_CREAT* {.importc: "IPC_CREAT", header: "<sys/ipc.h>".}: cint
  310. # var IPC_EXCL* {.importc: "IPC_EXCL", header: "<sys/ipc.h>".}: cint
  311. # var IPC_NOWAIT* {.importc: "IPC_NOWAIT", header: "<sys/ipc.h>".}: cint
  312. # var IPC_PRIVATE* {.importc: "IPC_PRIVATE", header: "<sys/ipc.h>".}: cint
  313. # var IPC_RMID* {.importc: "IPC_RMID", header: "<sys/ipc.h>".}: cint
  314. # var IPC_SET* {.importc: "IPC_SET", header: "<sys/ipc.h>".}: cint
  315. # var IPC_STAT* {.importc: "IPC_STAT", header: "<sys/ipc.h>".}: cint
  316. # # <sys/mman.h>
  317. # var PROT_READ* {.importc: "PROT_READ", header: "<sys/mman.h>".}: cint
  318. # var PROT_WRITE* {.importc: "PROT_WRITE", header: "<sys/mman.h>".}: cint
  319. # var PROT_EXEC* {.importc: "PROT_EXEC", header: "<sys/mman.h>".}: cint
  320. # var PROT_NONE* {.importc: "PROT_NONE", header: "<sys/mman.h>".}: cint
  321. # var MAP_ANONYMOUS* {.importc: "MAP_ANONYMOUS", header: "<sys/mman.h>".}: cint
  322. # var MAP_FIXED_NOREPLACE* {.importc: "MAP_FIXED_NOREPLACE", header: "<sys/mman.h>".}: cint
  323. # var MAP_NORESERVE* {.importc: "MAP_NORESERVE", header: "<sys/mman.h>".}: cint
  324. # var MAP_SHARED* {.importc: "MAP_SHARED", header: "<sys/mman.h>".}: cint
  325. # var MAP_PRIVATE* {.importc: "MAP_PRIVATE", header: "<sys/mman.h>".}: cint
  326. # var MAP_FIXED* {.importc: "MAP_FIXED", header: "<sys/mman.h>".}: cint
  327. # var MS_ASYNC* {.importc: "MS_ASYNC", header: "<sys/mman.h>".}: cint
  328. # var MS_SYNC* {.importc: "MS_SYNC", header: "<sys/mman.h>".}: cint
  329. # var MS_INVALIDATE* {.importc: "MS_INVALIDATE", header: "<sys/mman.h>".}: cint
  330. # var MCL_CURRENT* {.importc: "MCL_CURRENT", header: "<sys/mman.h>".}: cint
  331. # var MCL_FUTURE* {.importc: "MCL_FUTURE", header: "<sys/mman.h>".}: cint
  332. # var MAP_FAILED* {.importc: "MAP_FAILED", header: "<sys/mman.h>".}: pointer
  333. # var POSIX_MADV_NORMAL* {.importc: "POSIX_MADV_NORMAL", header: "<sys/mman.h>".}: cint
  334. # var POSIX_MADV_SEQUENTIAL* {.importc: "POSIX_MADV_SEQUENTIAL", header: "<sys/mman.h>".}: cint
  335. # var POSIX_MADV_RANDOM* {.importc: "POSIX_MADV_RANDOM", header: "<sys/mman.h>".}: cint
  336. # var POSIX_MADV_WILLNEED* {.importc: "POSIX_MADV_WILLNEED", header: "<sys/mman.h>".}: cint
  337. # var POSIX_MADV_DONTNEED* {.importc: "POSIX_MADV_DONTNEED", header: "<sys/mman.h>".}: cint
  338. # var POSIX_TYPED_MEM_ALLOCATE* {.importc: "POSIX_TYPED_MEM_ALLOCATE", header: "<sys/mman.h>".}: cint
  339. # var POSIX_TYPED_MEM_ALLOCATE_CONTIG* {.importc: "POSIX_TYPED_MEM_ALLOCATE_CONTIG", header: "<sys/mman.h>".}: cint
  340. # var POSIX_TYPED_MEM_MAP_ALLOCATABLE* {.importc: "POSIX_TYPED_MEM_MAP_ALLOCATABLE", header: "<sys/mman.h>".}: cint
  341. # <sys/resource.h>
  342. # var RLIMIT_NOFILE* {.importc: "RLIMIT_NOFILE", header: "<sys/resource.h>".}: cint
  343. var FD_MAX* {.importc: "CONFIG_LWIP_MAX_SOCKETS", header: "<lwipopts.h>".}: cint
  344. # <sys/select.h>
  345. var FD_SETSIZE* {.importc: "FD_SETSIZE", header: "<sys/select.h>".}: cint
  346. # <sys/socket.h>
  347. # struct msghdr->msg_flags bit field values
  348. const MSG_TRUNC* = 0x04
  349. const MSG_CTRUNC* = 0x08
  350. # Flags we can use with send and recv.
  351. const MSG_PEEK* = 0x01 # Peeks at an incoming message
  352. const MSG_WAITALL* = 0x02 # Unimplemented: Requests that the function block until the full amount of data requested can be returned
  353. const MSG_OOB* = 0x04 # Unimplemented: Requests out-of-band data. The significance and semantics of out-of-band data are protocol-specific
  354. const MSG_DONTWAIT* = 0x08 # Nonblocking i/o for this operation only
  355. const MSG_MORE* = 0x10 # Sender will send more
  356. # const MSG_NOSIGNAL* = 0x20 # Uninmplemented: Requests not to send the SIGPIPE signal if an attempt to send is made on a stream-oriented socket that is no longer connected.
  357. # Alternately, they can defined like this, but the above seems better when they're known/stable values:
  358. # var MSG_TRUNC* {.importc: "MSG_TRUNC", header: "<sys/socket.h>".}: cint
  359. # var MSG_CTRUNC* {.importc: "MSG_CTRUNC", header: "<sys/socket.h>".}: cint
  360. # var MSG_DONTROUTE* {.importc: "MSG_DONTROUTE", header: "<sys/socket.h>".}: cint # not defined in lwip
  361. # var MSG_EOR* {.importc: "MSG_EOR", header: "<sys/socket.h>".}: cint # not defined in lwip
  362. # var MSG_OOB* {.importc: "MSG_OOB", header: "<sys/socket.h>".}: cint
  363. # var SCM_RIGHTS* {.importc: "SCM_RIGHTS", header: "<sys/socket.h>".}: cint
  364. var SO_ACCEPTCONN* {.importc: "SO_ACCEPTCONN", header: "<sys/socket.h>".}: cint
  365. var SO_BROADCAST* {.importc: "SO_BROADCAST", header: "<sys/socket.h>".}: cint
  366. var SO_DEBUG* {.importc: "SO_DEBUG", header: "<sys/socket.h>".}: cint
  367. var SO_DONTROUTE* {.importc: "SO_DONTROUTE", header: "<sys/socket.h>".}: cint
  368. var SO_ERROR* {.importc: "SO_ERROR", header: "<sys/socket.h>".}: cint
  369. var SO_KEEPALIVE* {.importc: "SO_KEEPALIVE", header: "<sys/socket.h>".}: cint
  370. var SO_LINGER* {.importc: "SO_LINGER", header: "<sys/socket.h>".}: cint
  371. var SO_OOBINLINE* {.importc: "SO_OOBINLINE", header: "<sys/socket.h>".}: cint
  372. var SO_RCVBUF* {.importc: "SO_RCVBUF", header: "<sys/socket.h>".}: cint
  373. var SO_RCVLOWAT* {.importc: "SO_RCVLOWAT", header: "<sys/socket.h>".}: cint
  374. var SO_RCVTIMEO* {.importc: "SO_RCVTIMEO", header: "<sys/socket.h>".}: cint
  375. var SO_REUSEADDR* {.importc: "SO_REUSEADDR", header: "<sys/socket.h>".}: cint
  376. var SO_SNDBUF* {.importc: "SO_SNDBUF", header: "<sys/socket.h>".}: cint
  377. var SO_SNDLOWAT* {.importc: "SO_SNDLOWAT", header: "<sys/socket.h>".}: cint
  378. var SO_SNDTIMEO* {.importc: "SO_SNDTIMEO", header: "<sys/socket.h>".}: cint
  379. var SO_TYPE* {.importc: "SO_TYPE", header: "<sys/socket.h>".}: cint
  380. var SOCK_DGRAM* {.importc: "SOCK_DGRAM", header: "<sys/socket.h>".}: cint
  381. var SOCK_RAW* {.importc: "SOCK_RAW", header: "<sys/socket.h>".}: cint
  382. # var SOCK_SEQPACKET* {.importc: "SOCK_SEQPACKET", header: "<sys/socket.h>".}: cint
  383. const SOCK_SEQPACKET* = cint(5)
  384. var SOCK_STREAM* {.importc: "SOCK_STREAM", header: "<sys/socket.h>".}: cint
  385. var SOL_SOCKET* {.importc: "SOL_SOCKET", header: "<sys/socket.h>".}: cint
  386. const SocketMaxConnections {.intdefine.}: int = 32
  387. var SOMAXCONN*: cint = SocketMaxConnections.cint
  388. var AF_INET* {.importc: "AF_INET", header: "<sys/socket.h>".}: cint
  389. var AF_INET6* {.importc: "AF_INET6", header: "<sys/socket.h>".}: cint
  390. # var AF_UNIX* {.importc: "AF_UNIX", header: "<sys/socket.h>".}: cint
  391. const AF_UNIX*: cint = 1 # for compat with Nim libraries, doesn't exist on freertos
  392. var AF_UNSPEC* {.importc: "AF_UNSPEC", header: "<sys/socket.h>".}: cint
  393. var SHUT_RD* {.importc: "SHUT_RD", header: "<sys/socket.h>".}: cint
  394. var SHUT_RDWR* {.importc: "SHUT_RDWR", header: "<sys/socket.h>".}: cint
  395. var SHUT_WR* {.importc: "SHUT_WR", header: "<sys/socket.h>".}: cint
  396. # # <sys/stat.h>
  397. # <sys/stat.h>
  398. # var S_IFBLK* {.importc: "S_IFBLK", header: "<sys/stat.h>".}: cint
  399. # var S_IFCHR* {.importc: "S_IFCHR", header: "<sys/stat.h>".}: cint
  400. # var S_IFDIR* {.importc: "S_IFDIR", header: "<sys/stat.h>".}: cint
  401. # var S_IFIFO* {.importc: "S_IFIFO", header: "<sys/stat.h>".}: cint
  402. # var S_IFLNK* {.importc: "S_IFLNK", header: "<sys/stat.h>".}: cint
  403. # var S_IFMT* {.importc: "S_IFMT", header: "<sys/stat.h>".}: cint
  404. # var S_IFREG* {.importc: "S_IFREG", header: "<sys/stat.h>".}: cint
  405. # var S_IFSOCK* {.importc: "S_IFSOCK", header: "<sys/stat.h>".}: cint
  406. var S_IRGRP* {.importc: "S_IRGRP", header: "<sys/stat.h>".}: cint
  407. var S_IROTH* {.importc: "S_IROTH", header: "<sys/stat.h>".}: cint
  408. var S_IRUSR* {.importc: "S_IRUSR", header: "<sys/stat.h>".}: cint
  409. # var S_IRWXG* {.importc: "S_IRWXG", header: "<sys/stat.h>".}: cint
  410. # var S_IRWXO* {.importc: "S_IRWXO", header: "<sys/stat.h>".}: cint
  411. # var S_IRWXU* {.importc: "S_IRWXU", header: "<sys/stat.h>".}: cint
  412. # var S_ISGID* {.importc: "S_ISGID", header: "<sys/stat.h>".}: cint
  413. # var S_ISUID* {.importc: "S_ISUID", header: "<sys/stat.h>".}: cint
  414. # var S_ISVTX* {.importc: "S_ISVTX", header: "<sys/stat.h>".}: cint
  415. var S_IWGRP* {.importc: "S_IWGRP", header: "<sys/stat.h>".}: cint
  416. var S_IWOTH* {.importc: "S_IWOTH", header: "<sys/stat.h>".}: cint
  417. var S_IWUSR* {.importc: "S_IWUSR", header: "<sys/stat.h>".}: cint
  418. var S_IXGRP* {.importc: "S_IXGRP", header: "<sys/stat.h>".}: cint
  419. var S_IXOTH* {.importc: "S_IXOTH", header: "<sys/stat.h>".}: cint
  420. var S_IXUSR* {.importc: "S_IXUSR", header: "<sys/stat.h>".}: cint
  421. # # <sys/statvfs.h>
  422. # var ST_RDONLY* {.importc: "ST_RDONLY", header: "<sys/statvfs.h>".}: cint
  423. # var ST_NOSUID* {.importc: "ST_NOSUID", header: "<sys/statvfs.h>".}: cint
  424. # # <sys/wait.h>
  425. # var WNOHANG* {.importc: "WNOHANG", header: "<sys/wait.h>".}: cint
  426. # var WUNTRACED* {.importc: "WUNTRACED", header: "<sys/wait.h>".}: cint
  427. # var WEXITED* {.importc: "WEXITED", header: "<sys/wait.h>".}: cint
  428. # var WSTOPPED* {.importc: "WSTOPPED", header: "<sys/wait.h>".}: cint
  429. # var WCONTINUED* {.importc: "WCONTINUED", header: "<sys/wait.h>".}: cint
  430. # var WNOWAIT* {.importc: "WNOWAIT", header: "<sys/wait.h>".}: cint
  431. # var P_ALL* {.importc: "P_ALL", header: "<sys/wait.h>".}: cint
  432. # var P_PID* {.importc: "P_PID", header: "<sys/wait.h>".}: cint
  433. # var P_PGID* {.importc: "P_PGID", header: "<sys/wait.h>".}: cint
  434. # # <spawn.h>
  435. # var POSIX_SPAWN_RESETIDS* {.importc: "POSIX_SPAWN_RESETIDS", header: "<spawn.h>".}: cint
  436. # var POSIX_SPAWN_SETPGROUP* {.importc: "POSIX_SPAWN_SETPGROUP", header: "<spawn.h>".}: cint
  437. # var POSIX_SPAWN_SETSCHEDPARAM* {.importc: "POSIX_SPAWN_SETSCHEDPARAM", header: "<spawn.h>".}: cint
  438. # var POSIX_SPAWN_SETSCHEDULER* {.importc: "POSIX_SPAWN_SETSCHEDULER", header: "<spawn.h>".}: cint
  439. # var POSIX_SPAWN_SETSIGDEF* {.importc: "POSIX_SPAWN_SETSIGDEF", header: "<spawn.h>".}: cint
  440. # var POSIX_SPAWN_SETSIGMASK* {.importc: "POSIX_SPAWN_SETSIGMASK", header: "<spawn.h>".}: cint
  441. ## <stdio.h>
  442. # var IOFBF* {.importc: "_IOFBF", header: "<stdio.h>".}: cint
  443. # var IONBF* {.importc: "_IONBF", header: "<stdio.h>".}: cint
  444. # <time.h>
  445. var CLOCKS_PER_SEC* {.importc: "CLOCKS_PER_SEC", header: "<time.h>".}: clong
  446. var CLOCK_PROCESS_CPUTIME_ID* {.importc: "CLOCK_PROCESS_CPUTIME_ID", header: "<time.h>".}: cint
  447. var CLOCK_THREAD_CPUTIME_ID* {.importc: "CLOCK_THREAD_CPUTIME_ID", header: "<time.h>".}: cint
  448. var CLOCK_REALTIME* {.importc: "CLOCK_REALTIME", header: "<time.h>".}: cint
  449. var TIMER_ABSTIME* {.importc: "TIMER_ABSTIME", header: "<time.h>".}: cint
  450. var CLOCK_MONOTONIC* {.importc: "CLOCK_MONOTONIC", header: "<time.h>".}: cint
  451. # <unistd.h>
  452. const F_OK* = cint(0)
  453. const R_OK* = cint(4)
  454. const W_OK* = cint(2)
  455. const X_OK* = cint(1)
  456. const F_LOCK* = cint(1)
  457. const F_TEST* = cint(3)
  458. const F_TLOCK* = cint(2)
  459. const F_ULOCK* = cint(0)
  460. # <stdio.h>
  461. const SEEK_SET* = cint(0)
  462. const SEEK_CUR* = cint(1)
  463. const SEEK_END* = cint(2)