| ... | @@ -0,0 +1,6301 @@ |
| 1 | const std = @import("std"); |
| 2 | const linux = std.os.linux; |
| 3 | const builtin = @import("builtin"); |
| 4 | const arch = builtin.target.cpu.arch; |
| 5 | |
| 6 | comptime { |
| 7 | std.debug.assert(builtin.target.os.tag == .linux); |
| 8 | std.debug.assert(@bitSizeOf(usize) == 64); |
| 9 | } |
| 10 | |
| 11 | pub const errno = struct { |
| 12 | pub const Error = error{ |
| 13 | Unexpected, |
| 14 | EPERM, |
| 15 | ENOENT, |
| 16 | ESRCH, |
| 17 | EINTR, |
| 18 | EIO, |
| 19 | ENXIO, |
| 20 | E2BIG, |
| 21 | ENOEXEC, |
| 22 | EBADF, |
| 23 | ECHILD, |
| 24 | EAGAIN, |
| 25 | ENOMEM, |
| 26 | EACCES, |
| 27 | EFAULT, |
| 28 | ENOTBLK, |
| 29 | EBUSY, |
| 30 | EEXIST, |
| 31 | EXDEV, |
| 32 | ENODEV, |
| 33 | ENOTDIR, |
| 34 | EISDIR, |
| 35 | EINVAL, |
| 36 | ENFILE, |
| 37 | EMFILE, |
| 38 | ENOTTY, |
| 39 | ETXTBSY, |
| 40 | EFBIG, |
| 41 | ENOSPC, |
| 42 | ESPIPE, |
| 43 | EROFS, |
| 44 | EMLINK, |
| 45 | EPIPE, |
| 46 | EDOM, |
| 47 | ERANGE, |
| 48 | EDEADLK, |
| 49 | ENAMETOOLONG, |
| 50 | ENOLCK, |
| 51 | ENOSYS, |
| 52 | ENOTEMPTY, |
| 53 | ELOOP, |
| 54 | ENOMSG, |
| 55 | EIDRM, |
| 56 | ECHRNG, |
| 57 | EL2NSYNC, |
| 58 | EL3HLT, |
| 59 | EL3RST, |
| 60 | ELNRNG, |
| 61 | EUNATCH, |
| 62 | ENOCSI, |
| 63 | EL2HLT, |
| 64 | EBADE, |
| 65 | EBADR, |
| 66 | EXFULL, |
| 67 | ENOANO, |
| 68 | EBADRQC, |
| 69 | EBADSLT, |
| 70 | EDEADLOCK, |
| 71 | EBFONT, |
| 72 | ENOSTR, |
| 73 | ENODATA, |
| 74 | ETIME, |
| 75 | ENOSR, |
| 76 | ENONET, |
| 77 | ENOPKG, |
| 78 | EREMOTE, |
| 79 | ENOLINK, |
| 80 | EADV, |
| 81 | ESRMNT, |
| 82 | ECOMM, |
| 83 | EPROTO, |
| 84 | EMULTIHOP, |
| 85 | EDOTDOT, |
| 86 | EBADMSG, |
| 87 | EOVERFLOW, |
| 88 | ENOTUNIQ, |
| 89 | EBADFD, |
| 90 | EREMCHG, |
| 91 | ELIBACC, |
| 92 | ELIBBAD, |
| 93 | ELIBSCN, |
| 94 | ELIBMAX, |
| 95 | ELIBEXEC, |
| 96 | EILSEQ, |
| 97 | ERESTART, |
| 98 | ESTRPIPE, |
| 99 | EUSERS, |
| 100 | ENOTSOCK, |
| 101 | EDESTADDRREQ, |
| 102 | EMSGSIZE, |
| 103 | EPROTOTYPE, |
| 104 | ENOPROTOOPT, |
| 105 | EPROTONOSUPPORT, |
| 106 | ESOCKTNOSUPPORT, |
| 107 | EOPNOTSUPP, |
| 108 | EPFNOSUPPORT, |
| 109 | EAFNOSUPPORT, |
| 110 | EADDRINUSE, |
| 111 | EADDRNOTAVAIL, |
| 112 | ENETDOWN, |
| 113 | ENETUNREACH, |
| 114 | ENETRESET, |
| 115 | ECONNABORTED, |
| 116 | ECONNRESET, |
| 117 | ENOBUFS, |
| 118 | EISCONN, |
| 119 | ENOTCONN, |
| 120 | ESHUTDOWN, |
| 121 | ETOOMANYREFS, |
| 122 | ETIMEDOUT, |
| 123 | ECONNREFUSED, |
| 124 | EHOSTDOWN, |
| 125 | EHOSTUNREACH, |
| 126 | EALREADY, |
| 127 | EINPROGRESS, |
| 128 | ESTALE, |
| 129 | EUCLEAN, |
| 130 | ENOTNAM, |
| 131 | ENAVAIL, |
| 132 | EISNAM, |
| 133 | EREMOTEIO, |
| 134 | EDQUOT, |
| 135 | ENOMEDIUM, |
| 136 | EMEDIUMTYPE, |
| 137 | ECANCELED, |
| 138 | ENOKEY, |
| 139 | EKEYEXPIRED, |
| 140 | EKEYREVOKED, |
| 141 | EKEYREJECTED, |
| 142 | EOWNERDEAD, |
| 143 | ENOTRECOVERABLE, |
| 144 | ERFKILL, |
| 145 | EHWPOISON, |
| 146 | }; |
| 147 | |
| 148 | pub const Enum = switch (builtin.target.cpu.arch) { |
| 149 | .arc, |
| 150 | .arceb, |
| 151 | .arm, |
| 152 | .armeb, |
| 153 | .aarch64, |
| 154 | .aarch64_be, |
| 155 | .csky, |
| 156 | .hexagon, |
| 157 | .loongarch32, |
| 158 | .loongarch64, |
| 159 | .m68k, |
| 160 | .riscv32, |
| 161 | .riscv32be, |
| 162 | .riscv64, |
| 163 | .riscv64be, |
| 164 | .s390x, |
| 165 | .sparc, |
| 166 | .sparc64, |
| 167 | .x86_16, |
| 168 | .x86, |
| 169 | .x86_64, |
| 170 | .xtensa, |
| 171 | .xtensaeb, |
| 172 | => enum(c_ushort) { |
| 173 | EPERM = 1, |
| 174 | ENOENT = 2, |
| 175 | ESRCH = 3, |
| 176 | EINTR = 4, |
| 177 | EIO = 5, |
| 178 | ENXIO = 6, |
| 179 | E2BIG = 7, |
| 180 | ENOEXEC = 8, |
| 181 | EBADF = 9, |
| 182 | ECHILD = 10, |
| 183 | EAGAIN = 11, |
| 184 | ENOMEM = 12, |
| 185 | EACCES = 13, |
| 186 | EFAULT = 14, |
| 187 | ENOTBLK = 15, |
| 188 | EBUSY = 16, |
| 189 | EEXIST = 17, |
| 190 | EXDEV = 18, |
| 191 | ENODEV = 19, |
| 192 | ENOTDIR = 20, |
| 193 | EISDIR = 21, |
| 194 | EINVAL = 22, |
| 195 | ENFILE = 23, |
| 196 | EMFILE = 24, |
| 197 | ENOTTY = 25, |
| 198 | ETXTBSY = 26, |
| 199 | EFBIG = 27, |
| 200 | ENOSPC = 28, |
| 201 | ESPIPE = 29, |
| 202 | EROFS = 30, |
| 203 | EMLINK = 31, |
| 204 | EPIPE = 32, |
| 205 | EDOM = 33, |
| 206 | ERANGE = 34, |
| 207 | EDEADLK = 35, |
| 208 | ENAMETOOLONG = 36, |
| 209 | ENOLCK = 37, |
| 210 | ENOSYS = 38, |
| 211 | ENOTEMPTY = 39, |
| 212 | ELOOP = 40, |
| 213 | // |
| 214 | ENOMSG = 42, |
| 215 | EIDRM = 43, |
| 216 | ECHRNG = 44, |
| 217 | EL2NSYNC = 45, |
| 218 | EL3HLT = 46, |
| 219 | EL3RST = 47, |
| 220 | ELNRNG = 48, |
| 221 | EUNATCH = 49, |
| 222 | ENOCSI = 50, |
| 223 | EL2HLT = 51, |
| 224 | EBADE = 52, |
| 225 | EBADR = 53, |
| 226 | EXFULL = 54, |
| 227 | ENOANO = 55, |
| 228 | EBADRQC = 56, |
| 229 | EBADSLT = 57, |
| 230 | // |
| 231 | EBFONT = 59, |
| 232 | ENOSTR = 60, |
| 233 | ENODATA = 61, |
| 234 | ETIME = 62, |
| 235 | ENOSR = 63, |
| 236 | ENONET = 64, |
| 237 | ENOPKG = 65, |
| 238 | EREMOTE = 66, |
| 239 | ENOLINK = 67, |
| 240 | EADV = 68, |
| 241 | ESRMNT = 69, |
| 242 | ECOMM = 70, |
| 243 | EPROTO = 71, |
| 244 | EMULTIHOP = 72, |
| 245 | EDOTDOT = 73, |
| 246 | EBADMSG = 74, |
| 247 | EOVERFLOW = 75, |
| 248 | ENOTUNIQ = 76, |
| 249 | EBADFD = 77, |
| 250 | EREMCHG = 78, |
| 251 | ELIBACC = 79, |
| 252 | ELIBBAD = 80, |
| 253 | ELIBSCN = 81, |
| 254 | ELIBMAX = 82, |
| 255 | ELIBEXEC = 83, |
| 256 | EILSEQ = 84, |
| 257 | ERESTART = 85, |
| 258 | ESTRPIPE = 86, |
| 259 | EUSERS = 87, |
| 260 | ENOTSOCK = 88, |
| 261 | EDESTADDRREQ = 89, |
| 262 | EMSGSIZE = 90, |
| 263 | EPROTOTYPE = 91, |
| 264 | ENOPROTOOPT = 92, |
| 265 | EPROTONOSUPPORT = 93, |
| 266 | ESOCKTNOSUPPORT = 94, |
| 267 | EOPNOTSUPP = 95, |
| 268 | EPFNOSUPPORT = 96, |
| 269 | EAFNOSUPPORT = 97, |
| 270 | EADDRINUSE = 98, |
| 271 | EADDRNOTAVAIL = 99, |
| 272 | ENETDOWN = 100, |
| 273 | ENETUNREACH = 101, |
| 274 | ENETRESET = 102, |
| 275 | ECONNABORTED = 103, |
| 276 | ECONNRESET = 104, |
| 277 | ENOBUFS = 105, |
| 278 | EISCONN = 106, |
| 279 | ENOTCONN = 107, |
| 280 | ESHUTDOWN = 108, |
| 281 | ETOOMANYREFS = 109, |
| 282 | ETIMEDOUT = 110, |
| 283 | ECONNREFUSED = 111, |
| 284 | EHOSTDOWN = 112, |
| 285 | EHOSTUNREACH = 113, |
| 286 | EALREADY = 114, |
| 287 | EINPROGRESS = 115, |
| 288 | ESTALE = 116, |
| 289 | EUCLEAN = 117, |
| 290 | ENOTNAM = 118, |
| 291 | ENAVAIL = 119, |
| 292 | EISNAM = 120, |
| 293 | EREMOTEIO = 121, |
| 294 | EDQUOT = 122, |
| 295 | ENOMEDIUM = 123, |
| 296 | EMEDIUMTYPE = 124, |
| 297 | ECANCELED = 125, |
| 298 | ENOKEY = 126, |
| 299 | EKEYEXPIRED = 127, |
| 300 | EKEYREVOKED = 128, |
| 301 | EKEYREJECTED = 129, |
| 302 | EOWNERDEAD = 130, |
| 303 | ENOTRECOVERABLE = 131, |
| 304 | ERFKILL = 132, |
| 305 | EHWPOISON = 133, |
| 306 | _, |
| 307 | pub const EWOULDBLOCK: Enum = .EAGAIN; |
| 308 | pub const EDEADLOCK: Enum = .EDEADLK; |
| 309 | pub const ENOTSUP: Enum = .EOPNOTSUPP; |
| 310 | }, |
| 311 | .mips, |
| 312 | .mipsel, |
| 313 | => enum(c_ushort) { |
| 314 | EPERM = 1, |
| 315 | ENOENT = 2, |
| 316 | ESRCH = 3, |
| 317 | EINTR = 4, |
| 318 | EIO = 5, |
| 319 | ENXIO = 6, |
| 320 | E2BIG = 7, |
| 321 | ENOEXEC = 8, |
| 322 | EBADF = 9, |
| 323 | ECHILD = 10, |
| 324 | EAGAIN = 11, |
| 325 | ENOMEM = 12, |
| 326 | EACCES = 13, |
| 327 | EFAULT = 14, |
| 328 | ENOTBLK = 15, |
| 329 | EBUSY = 16, |
| 330 | EEXIST = 17, |
| 331 | EXDEV = 18, |
| 332 | ENODEV = 19, |
| 333 | ENOTDIR = 20, |
| 334 | EISDIR = 21, |
| 335 | EINVAL = 22, |
| 336 | ENFILE = 23, |
| 337 | EMFILE = 24, |
| 338 | ENOTTY = 25, |
| 339 | ETXTBSY = 26, |
| 340 | EFBIG = 27, |
| 341 | ENOSPC = 28, |
| 342 | ESPIPE = 29, |
| 343 | EROFS = 30, |
| 344 | EMLINK = 31, |
| 345 | EPIPE = 32, |
| 346 | EDOM = 33, |
| 347 | ERANGE = 34, |
| 348 | ENOMSG = 35, |
| 349 | EIDRM = 36, |
| 350 | ECHRNG = 37, |
| 351 | EL2NSYNC = 38, |
| 352 | EL3HLT = 39, |
| 353 | EL3RST = 40, |
| 354 | ELNRNG = 41, |
| 355 | EUNATCH = 42, |
| 356 | ENOCSI = 43, |
| 357 | EL2HLT = 44, |
| 358 | EDEADLK = 45, |
| 359 | ENOLCK = 46, |
| 360 | EBADE = 50, |
| 361 | EBADR = 51, |
| 362 | EXFULL = 52, |
| 363 | ENOANO = 53, |
| 364 | EBADRQC = 54, |
| 365 | EBADSLT = 55, |
| 366 | EDEADLOCK = 56, |
| 367 | EBFONT = 59, |
| 368 | ENOSTR = 60, |
| 369 | ENODATA = 61, |
| 370 | ETIME = 62, |
| 371 | ENOSR = 63, |
| 372 | ENONET = 64, |
| 373 | ENOPKG = 65, |
| 374 | EREMOTE = 66, |
| 375 | ENOLINK = 67, |
| 376 | EADV = 68, |
| 377 | ESRMNT = 69, |
| 378 | ECOMM = 70, |
| 379 | EPROTO = 71, |
| 380 | EDOTDOT = 73, |
| 381 | EMULTIHOP = 74, |
| 382 | EBADMSG = 77, |
| 383 | ENAMETOOLONG = 78, |
| 384 | EOVERFLOW = 79, |
| 385 | ENOTUNIQ = 80, |
| 386 | EBADFD = 81, |
| 387 | EREMCHG = 82, |
| 388 | ELIBACC = 83, |
| 389 | ELIBBAD = 84, |
| 390 | ELIBSCN = 85, |
| 391 | ELIBMAX = 86, |
| 392 | ELIBEXEC = 87, |
| 393 | EILSEQ = 88, |
| 394 | ENOSYS = 89, |
| 395 | ELOOP = 90, |
| 396 | ERESTART = 91, |
| 397 | ESTRPIPE = 92, |
| 398 | ENOTEMPTY = 93, |
| 399 | EUSERS = 94, |
| 400 | ENOTSOCK = 95, |
| 401 | EDESTADDRREQ = 96, |
| 402 | EMSGSIZE = 97, |
| 403 | EPROTOTYPE = 98, |
| 404 | ENOPROTOOPT = 99, |
| 405 | EPROTONOSUPPORT = 120, |
| 406 | ESOCKTNOSUPPORT = 121, |
| 407 | EOPNOTSUPP = 122, |
| 408 | EPFNOSUPPORT = 123, |
| 409 | EAFNOSUPPORT = 124, |
| 410 | EADDRINUSE = 125, |
| 411 | EADDRNOTAVAIL = 126, |
| 412 | ENETDOWN = 127, |
| 413 | ENETUNREACH = 128, |
| 414 | ENETRESET = 129, |
| 415 | ECONNABORTED = 130, |
| 416 | ECONNRESET = 131, |
| 417 | ENOBUFS = 132, |
| 418 | EISCONN = 133, |
| 419 | ENOTCONN = 134, |
| 420 | EUCLEAN = 135, |
| 421 | ENOTNAM = 137, |
| 422 | ENAVAIL = 138, |
| 423 | EISNAM = 139, |
| 424 | EREMOTEIO = 140, |
| 425 | ESHUTDOWN = 143, |
| 426 | ETOOMANYREFS = 144, |
| 427 | ETIMEDOUT = 145, |
| 428 | ECONNREFUSED = 146, |
| 429 | EHOSTDOWN = 147, |
| 430 | EHOSTUNREACH = 148, |
| 431 | EALREADY = 149, |
| 432 | EINPROGRESS = 150, |
| 433 | ESTALE = 151, |
| 434 | ECANCELED = 158, |
| 435 | ENOMEDIUM = 159, |
| 436 | EMEDIUMTYPE = 160, |
| 437 | ENOKEY = 161, |
| 438 | EKEYEXPIRED = 162, |
| 439 | EKEYREVOKED = 163, |
| 440 | EKEYREJECTED = 164, |
| 441 | EOWNERDEAD = 165, |
| 442 | ENOTRECOVERABLE = 166, |
| 443 | ERFKILL = 167, |
| 444 | EHWPOISON = 168, |
| 445 | EDQUOT = 1133, |
| 446 | _, |
| 447 | pub const ENOTSUP: Enum = .EOPNOTSUPP; |
| 448 | pub const EWOULDBLOCK: Enum = .EAGAIN; |
| 449 | }, |
| 450 | .mips64, |
| 451 | .mips64el, |
| 452 | => enum(c_ushort) { |
| 453 | EPERM = 1, |
| 454 | ENOENT = 2, |
| 455 | ESRCH = 3, |
| 456 | EINTR = 4, |
| 457 | EIO = 5, |
| 458 | ENXIO = 6, |
| 459 | E2BIG = 7, |
| 460 | ENOEXEC = 8, |
| 461 | EBADF = 9, |
| 462 | ECHILD = 10, |
| 463 | EAGAIN = 11, |
| 464 | ENOMEM = 12, |
| 465 | EACCES = 13, |
| 466 | EFAULT = 14, |
| 467 | ENOTBLK = 15, |
| 468 | EBUSY = 16, |
| 469 | EEXIST = 17, |
| 470 | EXDEV = 18, |
| 471 | ENODEV = 19, |
| 472 | ENOTDIR = 20, |
| 473 | EISDIR = 21, |
| 474 | EINVAL = 22, |
| 475 | ENFILE = 23, |
| 476 | EMFILE = 24, |
| 477 | ENOTTY = 25, |
| 478 | ETXTBSY = 26, |
| 479 | EFBIG = 27, |
| 480 | ENOSPC = 28, |
| 481 | ESPIPE = 29, |
| 482 | EROFS = 30, |
| 483 | EMLINK = 31, |
| 484 | EPIPE = 32, |
| 485 | EDOM = 33, |
| 486 | ERANGE = 34, |
| 487 | ENOMSG = 35, |
| 488 | EIDRM = 36, |
| 489 | ECHRNG = 37, |
| 490 | EL2NSYNC = 38, |
| 491 | EL3HLT = 39, |
| 492 | EL3RST = 40, |
| 493 | ELNRNG = 41, |
| 494 | EUNATCH = 42, |
| 495 | ENOCSI = 43, |
| 496 | EL2HLT = 44, |
| 497 | EDEADLK = 45, |
| 498 | ENOLCK = 46, |
| 499 | EBADE = 50, |
| 500 | EBADR = 51, |
| 501 | EXFULL = 52, |
| 502 | ENOANO = 53, |
| 503 | EBADRQC = 54, |
| 504 | EBADSLT = 55, |
| 505 | EDEADLOCK = 56, |
| 506 | EBFONT = 59, |
| 507 | ENOSTR = 60, |
| 508 | ENODATA = 61, |
| 509 | ETIME = 62, |
| 510 | ENOSR = 63, |
| 511 | ENONET = 64, |
| 512 | ENOPKG = 65, |
| 513 | EREMOTE = 66, |
| 514 | ENOLINK = 67, |
| 515 | EADV = 68, |
| 516 | ESRMNT = 69, |
| 517 | ECOMM = 70, |
| 518 | EPROTO = 71, |
| 519 | EDOTDOT = 73, |
| 520 | EMULTIHOP = 74, |
| 521 | EBADMSG = 77, |
| 522 | ENAMETOOLONG = 78, |
| 523 | EOVERFLOW = 79, |
| 524 | ENOTUNIQ = 80, |
| 525 | EBADFD = 81, |
| 526 | EREMCHG = 82, |
| 527 | ELIBACC = 83, |
| 528 | ELIBBAD = 84, |
| 529 | ELIBSCN = 85, |
| 530 | ELIBMAX = 86, |
| 531 | ELIBEXEC = 87, |
| 532 | EILSEQ = 88, |
| 533 | ENOSYS = 89, |
| 534 | ELOOP = 90, |
| 535 | ERESTART = 91, |
| 536 | ESTRPIPE = 92, |
| 537 | ENOTEMPTY = 93, |
| 538 | EUSERS = 94, |
| 539 | ENOTSOCK = 95, |
| 540 | EDESTADDRREQ = 96, |
| 541 | EMSGSIZE = 97, |
| 542 | EPROTOTYPE = 98, |
| 543 | ENOPROTOOPT = 99, |
| 544 | EPROTONOSUPPORT = 120, |
| 545 | ESOCKTNOSUPPORT = 121, |
| 546 | EOPNOTSUPP = 122, |
| 547 | EPFNOSUPPORT = 123, |
| 548 | EAFNOSUPPORT = 124, |
| 549 | EADDRINUSE = 125, |
| 550 | EADDRNOTAVAIL = 126, |
| 551 | ENETDOWN = 127, |
| 552 | ENETUNREACH = 128, |
| 553 | ENETRESET = 129, |
| 554 | ECONNABORTED = 130, |
| 555 | ECONNRESET = 131, |
| 556 | ENOBUFS = 132, |
| 557 | EISCONN = 133, |
| 558 | ENOTCONN = 134, |
| 559 | EUCLEAN = 135, |
| 560 | ENOTNAM = 137, |
| 561 | ENAVAIL = 138, |
| 562 | EISNAM = 139, |
| 563 | EREMOTEIO = 140, |
| 564 | ESHUTDOWN = 143, |
| 565 | ETOOMANYREFS = 144, |
| 566 | ETIMEDOUT = 145, |
| 567 | ECONNREFUSED = 146, |
| 568 | EHOSTDOWN = 147, |
| 569 | EHOSTUNREACH = 148, |
| 570 | EALREADY = 149, |
| 571 | EINPROGRESS = 150, |
| 572 | ESTALE = 151, |
| 573 | ECANCELED = 158, |
| 574 | ENOMEDIUM = 159, |
| 575 | EMEDIUMTYPE = 160, |
| 576 | ENOKEY = 161, |
| 577 | EKEYEXPIRED = 162, |
| 578 | EKEYREVOKED = 163, |
| 579 | EKEYREJECTED = 164, |
| 580 | EOWNERDEAD = 165, |
| 581 | ENOTRECOVERABLE = 166, |
| 582 | ERFKILL = 167, |
| 583 | EHWPOISON = 168, |
| 584 | EDQUOT = 1133, |
| 585 | _, |
| 586 | pub const ENOTSUP: Enum = .EOPNOTSUPP; |
| 587 | pub const EWOULDBLOCK: Enum = .EAGAIN; |
| 588 | }, |
| 589 | .powerpc, |
| 590 | .powerpcle, |
| 591 | => enum(c_ushort) { |
| 592 | EPERM = 1, |
| 593 | ENOENT = 2, |
| 594 | ESRCH = 3, |
| 595 | EINTR = 4, |
| 596 | EIO = 5, |
| 597 | ENXIO = 6, |
| 598 | E2BIG = 7, |
| 599 | ENOEXEC = 8, |
| 600 | EBADF = 9, |
| 601 | ECHILD = 10, |
| 602 | EAGAIN = 11, |
| 603 | ENOMEM = 12, |
| 604 | EACCES = 13, |
| 605 | EFAULT = 14, |
| 606 | ENOTBLK = 15, |
| 607 | EBUSY = 16, |
| 608 | EEXIST = 17, |
| 609 | EXDEV = 18, |
| 610 | ENODEV = 19, |
| 611 | ENOTDIR = 20, |
| 612 | EISDIR = 21, |
| 613 | EINVAL = 22, |
| 614 | ENFILE = 23, |
| 615 | EMFILE = 24, |
| 616 | ENOTTY = 25, |
| 617 | ETXTBSY = 26, |
| 618 | EFBIG = 27, |
| 619 | ENOSPC = 28, |
| 620 | ESPIPE = 29, |
| 621 | EROFS = 30, |
| 622 | EMLINK = 31, |
| 623 | EPIPE = 32, |
| 624 | EDOM = 33, |
| 625 | ERANGE = 34, |
| 626 | EDEADLK = 35, |
| 627 | ENAMETOOLONG = 36, |
| 628 | ENOLCK = 37, |
| 629 | ENOSYS = 38, |
| 630 | ENOTEMPTY = 39, |
| 631 | ELOOP = 40, |
| 632 | ENOMSG = 42, |
| 633 | EIDRM = 43, |
| 634 | ECHRNG = 44, |
| 635 | EL2NSYNC = 45, |
| 636 | EL3HLT = 46, |
| 637 | EL3RST = 47, |
| 638 | ELNRNG = 48, |
| 639 | EUNATCH = 49, |
| 640 | ENOCSI = 50, |
| 641 | EL2HLT = 51, |
| 642 | EBADE = 52, |
| 643 | EBADR = 53, |
| 644 | EXFULL = 54, |
| 645 | ENOANO = 55, |
| 646 | EBADRQC = 56, |
| 647 | EBADSLT = 57, |
| 648 | EDEADLOCK = 58, |
| 649 | EBFONT = 59, |
| 650 | ENOSTR = 60, |
| 651 | ENODATA = 61, |
| 652 | ETIME = 62, |
| 653 | ENOSR = 63, |
| 654 | ENONET = 64, |
| 655 | ENOPKG = 65, |
| 656 | EREMOTE = 66, |
| 657 | ENOLINK = 67, |
| 658 | EADV = 68, |
| 659 | ESRMNT = 69, |
| 660 | ECOMM = 70, |
| 661 | EPROTO = 71, |
| 662 | EMULTIHOP = 72, |
| 663 | EDOTDOT = 73, |
| 664 | EBADMSG = 74, |
| 665 | EOVERFLOW = 75, |
| 666 | ENOTUNIQ = 76, |
| 667 | EBADFD = 77, |
| 668 | EREMCHG = 78, |
| 669 | ELIBACC = 79, |
| 670 | ELIBBAD = 80, |
| 671 | ELIBSCN = 81, |
| 672 | ELIBMAX = 82, |
| 673 | ELIBEXEC = 83, |
| 674 | EILSEQ = 84, |
| 675 | ERESTART = 85, |
| 676 | ESTRPIPE = 86, |
| 677 | EUSERS = 87, |
| 678 | ENOTSOCK = 88, |
| 679 | EDESTADDRREQ = 89, |
| 680 | EMSGSIZE = 90, |
| 681 | EPROTOTYPE = 91, |
| 682 | ENOPROTOOPT = 92, |
| 683 | EPROTONOSUPPORT = 93, |
| 684 | ESOCKTNOSUPPORT = 94, |
| 685 | EOPNOTSUPP = 95, |
| 686 | EPFNOSUPPORT = 96, |
| 687 | EAFNOSUPPORT = 97, |
| 688 | EADDRINUSE = 98, |
| 689 | EADDRNOTAVAIL = 99, |
| 690 | ENETDOWN = 100, |
| 691 | ENETUNREACH = 101, |
| 692 | ENETRESET = 102, |
| 693 | ECONNABORTED = 103, |
| 694 | ECONNRESET = 104, |
| 695 | ENOBUFS = 105, |
| 696 | EISCONN = 106, |
| 697 | ENOTCONN = 107, |
| 698 | ESHUTDOWN = 108, |
| 699 | ETOOMANYREFS = 109, |
| 700 | ETIMEDOUT = 110, |
| 701 | ECONNREFUSED = 111, |
| 702 | EHOSTDOWN = 112, |
| 703 | EHOSTUNREACH = 113, |
| 704 | EALREADY = 114, |
| 705 | EINPROGRESS = 115, |
| 706 | ESTALE = 116, |
| 707 | EUCLEAN = 117, |
| 708 | ENOTNAM = 118, |
| 709 | ENAVAIL = 119, |
| 710 | EISNAM = 120, |
| 711 | EREMOTEIO = 121, |
| 712 | EDQUOT = 122, |
| 713 | ENOMEDIUM = 123, |
| 714 | EMEDIUMTYPE = 124, |
| 715 | ECANCELED = 125, |
| 716 | ENOKEY = 126, |
| 717 | EKEYEXPIRED = 127, |
| 718 | EKEYREVOKED = 128, |
| 719 | EKEYREJECTED = 129, |
| 720 | EOWNERDEAD = 130, |
| 721 | ENOTRECOVERABLE = 131, |
| 722 | ERFKILL = 132, |
| 723 | EHWPOISON = 133, |
| 724 | _, |
| 725 | pub const EWOULDBLOCK: Enum = .EAGAIN; |
| 726 | pub const ENOTSUP: Enum = .EOPNOTSUPP; |
| 727 | }, |
| 728 | .powerpc64, |
| 729 | .powerpc64le, |
| 730 | => enum(c_ushort) { |
| 731 | EPERM = 1, |
| 732 | ENOENT = 2, |
| 733 | ESRCH = 3, |
| 734 | EINTR = 4, |
| 735 | EIO = 5, |
| 736 | ENXIO = 6, |
| 737 | E2BIG = 7, |
| 738 | ENOEXEC = 8, |
| 739 | EBADF = 9, |
| 740 | ECHILD = 10, |
| 741 | EAGAIN = 11, |
| 742 | ENOMEM = 12, |
| 743 | EACCES = 13, |
| 744 | EFAULT = 14, |
| 745 | ENOTBLK = 15, |
| 746 | EBUSY = 16, |
| 747 | EEXIST = 17, |
| 748 | EXDEV = 18, |
| 749 | ENODEV = 19, |
| 750 | ENOTDIR = 20, |
| 751 | EISDIR = 21, |
| 752 | EINVAL = 22, |
| 753 | ENFILE = 23, |
| 754 | EMFILE = 24, |
| 755 | ENOTTY = 25, |
| 756 | ETXTBSY = 26, |
| 757 | EFBIG = 27, |
| 758 | ENOSPC = 28, |
| 759 | ESPIPE = 29, |
| 760 | EROFS = 30, |
| 761 | EMLINK = 31, |
| 762 | EPIPE = 32, |
| 763 | EDOM = 33, |
| 764 | ERANGE = 34, |
| 765 | EDEADLK = 35, |
| 766 | ENAMETOOLONG = 36, |
| 767 | ENOLCK = 37, |
| 768 | ENOSYS = 38, |
| 769 | ENOTEMPTY = 39, |
| 770 | ELOOP = 40, |
| 771 | ENOMSG = 42, |
| 772 | EIDRM = 43, |
| 773 | ECHRNG = 44, |
| 774 | EL2NSYNC = 45, |
| 775 | EL3HLT = 46, |
| 776 | EL3RST = 47, |
| 777 | ELNRNG = 48, |
| 778 | EUNATCH = 49, |
| 779 | ENOCSI = 50, |
| 780 | EL2HLT = 51, |
| 781 | EBADE = 52, |
| 782 | EBADR = 53, |
| 783 | EXFULL = 54, |
| 784 | ENOANO = 55, |
| 785 | EBADRQC = 56, |
| 786 | EBADSLT = 57, |
| 787 | EDEADLOCK = 58, |
| 788 | EBFONT = 59, |
| 789 | ENOSTR = 60, |
| 790 | ENODATA = 61, |
| 791 | ETIME = 62, |
| 792 | ENOSR = 63, |
| 793 | ENONET = 64, |
| 794 | ENOPKG = 65, |
| 795 | EREMOTE = 66, |
| 796 | ENOLINK = 67, |
| 797 | EADV = 68, |
| 798 | ESRMNT = 69, |
| 799 | ECOMM = 70, |
| 800 | EPROTO = 71, |
| 801 | EMULTIHOP = 72, |
| 802 | EDOTDOT = 73, |
| 803 | EBADMSG = 74, |
| 804 | EOVERFLOW = 75, |
| 805 | ENOTUNIQ = 76, |
| 806 | EBADFD = 77, |
| 807 | EREMCHG = 78, |
| 808 | ELIBACC = 79, |
| 809 | ELIBBAD = 80, |
| 810 | ELIBSCN = 81, |
| 811 | ELIBMAX = 82, |
| 812 | ELIBEXEC = 83, |
| 813 | EILSEQ = 84, |
| 814 | ERESTART = 85, |
| 815 | ESTRPIPE = 86, |
| 816 | EUSERS = 87, |
| 817 | ENOTSOCK = 88, |
| 818 | EDESTADDRREQ = 89, |
| 819 | EMSGSIZE = 90, |
| 820 | EPROTOTYPE = 91, |
| 821 | ENOPROTOOPT = 92, |
| 822 | EPROTONOSUPPORT = 93, |
| 823 | ESOCKTNOSUPPORT = 94, |
| 824 | EOPNOTSUPP = 95, |
| 825 | EPFNOSUPPORT = 96, |
| 826 | EAFNOSUPPORT = 97, |
| 827 | EADDRINUSE = 98, |
| 828 | EADDRNOTAVAIL = 99, |
| 829 | ENETDOWN = 100, |
| 830 | ENETUNREACH = 101, |
| 831 | ENETRESET = 102, |
| 832 | ECONNABORTED = 103, |
| 833 | ECONNRESET = 104, |
| 834 | ENOBUFS = 105, |
| 835 | EISCONN = 106, |
| 836 | ENOTCONN = 107, |
| 837 | ESHUTDOWN = 108, |
| 838 | ETOOMANYREFS = 109, |
| 839 | ETIMEDOUT = 110, |
| 840 | ECONNREFUSED = 111, |
| 841 | EHOSTDOWN = 112, |
| 842 | EHOSTUNREACH = 113, |
| 843 | EALREADY = 114, |
| 844 | EINPROGRESS = 115, |
| 845 | ESTALE = 116, |
| 846 | EUCLEAN = 117, |
| 847 | ENOTNAM = 118, |
| 848 | ENAVAIL = 119, |
| 849 | EISNAM = 120, |
| 850 | EREMOTEIO = 121, |
| 851 | EDQUOT = 122, |
| 852 | ENOMEDIUM = 123, |
| 853 | EMEDIUMTYPE = 124, |
| 854 | ECANCELED = 125, |
| 855 | ENOKEY = 126, |
| 856 | EKEYEXPIRED = 127, |
| 857 | EKEYREVOKED = 128, |
| 858 | EKEYREJECTED = 129, |
| 859 | EOWNERDEAD = 130, |
| 860 | ENOTRECOVERABLE = 131, |
| 861 | ERFKILL = 132, |
| 862 | EHWPOISON = 133, |
| 863 | _, |
| 864 | pub const EWOULDBLOCK: Enum = .EAGAIN; |
| 865 | pub const ENOTSUP: Enum = .EOPNOTSUPP; |
| 866 | }, |
| 867 | .alpha => unreachable, |
| 868 | .microblaze, .microblazeel => unreachable, |
| 869 | .sh, .sheb => unreachable, |
| 870 | // nios2 |
| 871 | // openrisc |
| 872 | // parisc |
| 873 | // um |
| 874 | // @compileError("TODO: " ++ @tagName(v)), |
| 875 | .avr, |
| 876 | .bpfel, |
| 877 | .bpfeb, |
| 878 | .msp430, |
| 879 | .amdgcn, |
| 880 | .thumb, |
| 881 | .thumbeb, |
| 882 | .propeller, |
| 883 | .xcore, |
| 884 | .nvptx, |
| 885 | .nvptx64, |
| 886 | .spirv32, |
| 887 | .spirv64, |
| 888 | .kalimba, |
| 889 | .lanai, |
| 890 | .wasm32, |
| 891 | .wasm64, |
| 892 | .ve, |
| 893 | .or1k, |
| 894 | .hppa, |
| 895 | .hppa64, |
| 896 | .kvx, |
| 897 | => unreachable, |
| 898 | }; |
| 899 | |
| 900 | pub fn byName(name: []const u8) ?Error { |
| 901 | inline for (comptime std.meta.fieldNames(Error)) |field_name| { |
| 902 | if (std.mem.eql(u8, name, field_name)) { |
| 903 | return @field(Error, field_name); |
| 904 | } |
| 905 | } |
| 906 | return null; |
| 907 | } |
| 908 | |
| 909 | comptime { |
| 910 | // assert Enum is sequential |
| 911 | var value: c_ushort = 0; // SUCCESS |
| 912 | for (std.enums.values(Enum)) |val| { |
| 913 | std.debug.assert(@intFromEnum(val) > value); |
| 914 | value = @intFromEnum(val); |
| 915 | } |
| 916 | } |
| 917 | comptime { |
| 918 | // sanity test |
| 919 | std.debug.assert(@intFromEnum(Enum.EPERM) == 1); |
| 920 | } |
| 921 | const list = blk: { |
| 922 | const values = std.enums.values(Enum); |
| 923 | const len = @intFromEnum(values[values.len - 1]) + 1; |
| 924 | var errors: [len]Error = @splat(error.Unexpected); |
| 925 | for (values) |f| errors[@intFromEnum(f)] = @field(Error, @tagName(f)); |
| 926 | const final = errors; |
| 927 | break :blk final; |
| 928 | }; |
| 929 | |
| 930 | pub fn fromInt(code: c_int) Error { |
| 931 | @setRuntimeSafety(false); |
| 932 | if (code >= list.len) return error.Unexpected; |
| 933 | if (code <= 0) return error.Unexpected; |
| 934 | return list[@intCast(code)]; |
| 935 | } |
| 936 | |
| 937 | pub fn fromLibC() c_int { |
| 938 | return libc.__errno_location().*; |
| 939 | } |
| 940 | }; |
| 941 | |
| 942 | pub const eai = struct { |
| 943 | pub const Error = error{ |
| 944 | EAI_BADFLAGS, |
| 945 | EAI_NONAME, |
| 946 | EAI_AGAIN, |
| 947 | EAI_FAIL, |
| 948 | EAI_NODATA, |
| 949 | EAI_FAMILY, |
| 950 | EAI_SOCKTYPE, |
| 951 | EAI_SERVICE, |
| 952 | EAI_MEMORY, |
| 953 | EAI_SYSTEM, |
| 954 | EAI_OVERFLOW, |
| 955 | }; |
| 956 | |
| 957 | pub const Enum = enum(c_int) { |
| 958 | EAI_BADFLAGS = -1, |
| 959 | EAI_NONAME = -2, |
| 960 | EAI_AGAIN = -3, |
| 961 | EAI_FAIL = -4, |
| 962 | EAI_NODATA = -5, |
| 963 | EAI_FAMILY = -6, |
| 964 | EAI_SOCKTYPE = -7, |
| 965 | EAI_SERVICE = -8, |
| 966 | EAI_MEMORY = -10, |
| 967 | EAI_SYSTEM = -11, |
| 968 | EAI_OVERFLOW = -12, |
| 969 | }; |
| 970 | |
| 971 | pub fn fromInt(code: c_int) Error { |
| 972 | return switch (@as(Enum, @enumFromInt(code))) { |
| 973 | .EAI_BADFLAGS => error.EAI_BADFLAGS, |
| 974 | .EAI_NONAME => error.EAI_NONAME, |
| 975 | .EAI_AGAIN => error.EAI_AGAIN, |
| 976 | .EAI_FAIL => error.EAI_FAIL, |
| 977 | .EAI_NODATA => error.EAI_NODATA, |
| 978 | .EAI_FAMILY => error.EAI_FAMILY, |
| 979 | .EAI_SOCKTYPE => error.EAI_SOCKTYPE, |
| 980 | .EAI_SERVICE => error.EAI_SERVICE, |
| 981 | .EAI_MEMORY => error.EAI_MEMORY, |
| 982 | .EAI_SYSTEM => error.EAI_SYSTEM, |
| 983 | .EAI_OVERFLOW => error.EAI_OVERFLOW, |
| 984 | }; |
| 985 | } |
| 986 | }; |
| 987 | |
| 988 | pub const libc = struct { |
| 989 | /// void _Exit(int status); |
| 990 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/_Exit.html |
| 991 | pub extern fn _Exit(status: c_int) noreturn; |
| 992 | |
| 993 | /// void _exit(int status); |
| 994 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/_exit.html |
| 995 | pub extern fn _exit(status: c_int) noreturn; |
| 996 | |
| 997 | /// long a64l(const char *s); |
| 998 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/a64l.html |
| 999 | pub extern fn a64l(s: [*]const u8) c_long; |
| 1000 | |
| 1001 | /// void abort(void); |
| 1002 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/abort.html |
| 1003 | pub extern fn abort() void; |
| 1004 | |
| 1005 | /// int abs(int i); |
| 1006 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/abs.html |
| 1007 | pub extern fn abs(i: c_int) c_int; |
| 1008 | |
| 1009 | /// int accept(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len); |
| 1010 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/accept.html |
| 1011 | pub extern fn accept(socket: c_int, noalias address: ?*struct_sockaddr, noalias address_len: *socklen_t) c_int; |
| 1012 | |
| 1013 | /// int access(const char *path, int amode); |
| 1014 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/access.html |
| 1015 | pub extern fn access(path: [*:0]const u8, amode: c_int) c_int; |
| 1016 | |
| 1017 | /// double acos(double x); |
| 1018 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/acos.html |
| 1019 | pub extern fn acos(x: f64) f64; |
| 1020 | |
| 1021 | /// float acosf(float x); |
| 1022 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/acosf.html |
| 1023 | pub extern fn acosf(x: f32) f32; |
| 1024 | |
| 1025 | /// double acosh(double x); |
| 1026 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/acosh.html |
| 1027 | pub extern fn acosh(x: f64) f64; |
| 1028 | |
| 1029 | /// float acoshf(float x); |
| 1030 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/acoshf.html |
| 1031 | pub extern fn acoshf(x: f32) f32; |
| 1032 | |
| 1033 | /// long double acoshl(long double x); |
| 1034 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/acoshl.html |
| 1035 | pub extern fn acoshl(x: c_longdouble) c_longdouble; |
| 1036 | |
| 1037 | /// long double acosl(long double x); |
| 1038 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/acosl.html |
| 1039 | pub extern fn acosl(x: c_longdouble) c_longdouble; |
| 1040 | |
| 1041 | /// int aio_cancel(int fildes, struct aiocb *aiocbp); |
| 1042 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/aio_cancel.html |
| 1043 | // pub extern fn aio_cancel(__fildes: c_int, __aiocbp: [*c]struct_aiocb) c_int; |
| 1044 | |
| 1045 | /// int aio_error(const struct aiocb *aiocbp); |
| 1046 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/aio_error.html |
| 1047 | // pub extern fn aio_error(__aiocbp: [*c]const struct_aiocb) c_int; |
| 1048 | |
| 1049 | /// int aio_fsync(int op, struct aiocb *aiocbp); |
| 1050 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/aio_fsync.html |
| 1051 | // pub extern fn aio_fsync(__operation: c_int, __aiocbp: [*c]struct_aiocb) c_int; |
| 1052 | |
| 1053 | /// int aio_read(struct aiocb *aiocbp); |
| 1054 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/aio_read.html |
| 1055 | // pub extern fn aio_read(__aiocbp: [*c]struct_aiocb) c_int; |
| 1056 | |
| 1057 | /// ssize_t aio_return(struct aiocb *aiocbp); |
| 1058 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/aio_return.html |
| 1059 | // pub extern fn aio_return(__aiocbp: [*c]struct_aiocb) isize; |
| 1060 | |
| 1061 | /// int aio_suspend(const struct aiocb *const list[], int nent, const struct timespec *timeout); |
| 1062 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/aio_suspend.html |
| 1063 | // pub extern fn aio_suspend(__list: [*c]const [*c]const struct_aiocb, __nent: c_int, noalias __timeout: [*c]const struct_timespec) c_int; |
| 1064 | |
| 1065 | /// int aio_write(struct aiocb *aiocbp); |
| 1066 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/aio_write.html |
| 1067 | // pub extern fn aio_write(__aiocbp: [*c]struct_aiocb) c_int; |
| 1068 | |
| 1069 | /// unsigned alarm(unsigned seconds); |
| 1070 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/alarm.html |
| 1071 | pub extern fn alarm(seconds: c_uint) c_uint; |
| 1072 | |
| 1073 | /// int alphasort(const struct dirent **d1, const struct dirent **d2); |
| 1074 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/alphasort.html |
| 1075 | // pub extern fn alphasort(__e1: [*c][*c]const struct_dirent, __e2: [*c][*c]const struct_dirent) c_int; |
| 1076 | |
| 1077 | /// char *asctime(const struct tm *timeptr); |
| 1078 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/asctime.html |
| 1079 | // pub extern fn asctime(timeptr: *struct_tm) ?[*:0]u8; |
| 1080 | |
| 1081 | /// char *asctime_r(const struct tm *restrict tm, char *restrict buf); |
| 1082 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/asctime_r.html |
| 1083 | // pub extern fn asctime_r(noalias tm: *const struct_tm, buf: *[26]u8) ?[25:0]u8; |
| 1084 | |
| 1085 | /// double asin(double x); |
| 1086 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/asin.html |
| 1087 | pub extern fn asin(x: f64) f64; |
| 1088 | |
| 1089 | /// float asinf(float x); |
| 1090 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/asinf.html |
| 1091 | pub extern fn asinf(x: f32) f32; |
| 1092 | |
| 1093 | /// double asinh(double x); |
| 1094 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/asinh.html |
| 1095 | pub extern fn asinh(x: f64) f64; |
| 1096 | |
| 1097 | /// float asinhf(float x); |
| 1098 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/asinhf.html |
| 1099 | pub extern fn asinhf(x: f32) f32; |
| 1100 | |
| 1101 | /// long double asinhl(long double x); |
| 1102 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/asinhl.html |
| 1103 | pub extern fn asinhl(x: c_longdouble) c_longdouble; |
| 1104 | |
| 1105 | /// long double asinl(long double x); |
| 1106 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/asinl.html |
| 1107 | pub extern fn asinl(x: c_longdouble) c_longdouble; |
| 1108 | |
| 1109 | /// double atan(double x); |
| 1110 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/atan.html |
| 1111 | pub extern fn atan(x: f64) f64; |
| 1112 | |
| 1113 | /// double atan2(double y, double x); |
| 1114 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/atan2.html |
| 1115 | pub extern fn atan2(y: f64, x: f64) f64; |
| 1116 | |
| 1117 | /// float atan2f(float y, float x); |
| 1118 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/atan2f.html |
| 1119 | pub extern fn atan2f(y: f32, x: f32) f32; |
| 1120 | |
| 1121 | /// long double atan2l(long double y, long double x); |
| 1122 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/atan2l.html |
| 1123 | pub extern fn atan2l(y: c_longdouble, x: c_longdouble) c_longdouble; |
| 1124 | |
| 1125 | /// float atanf(float x); |
| 1126 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/atanf.html |
| 1127 | pub extern fn atanf(x: f32) f32; |
| 1128 | |
| 1129 | /// double atanh(double x); |
| 1130 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/atanh.html |
| 1131 | pub extern fn atanh(x: f64) f64; |
| 1132 | |
| 1133 | /// float atanhf(float x); |
| 1134 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/atanhf.html |
| 1135 | pub extern fn atanhf(x: f32) f32; |
| 1136 | |
| 1137 | /// long double atanhl(long double x); |
| 1138 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/atanhl.html |
| 1139 | pub extern fn atanhl(x: c_longdouble) c_longdouble; |
| 1140 | |
| 1141 | /// long double atanl(long double x); |
| 1142 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/atanl.html |
| 1143 | pub extern fn atanl(x: c_longdouble) c_longdouble; |
| 1144 | |
| 1145 | /// int atexit(void (*func)(void)); |
| 1146 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/atexit.html |
| 1147 | pub extern fn atexit(func: *const fn () callconv(.C) void) c_int; |
| 1148 | |
| 1149 | /// double atof(const char *str); |
| 1150 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/atof.html |
| 1151 | pub extern fn atof(str: [*:0]const u8) f64; |
| 1152 | |
| 1153 | /// int atoi(const char *str); |
| 1154 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/atoi.html |
| 1155 | pub extern fn atoi(str: [*:0]const u8) c_int; |
| 1156 | |
| 1157 | /// long atol(const char *str); |
| 1158 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/atol.html |
| 1159 | pub extern fn atol(str: [*:0]const u8) c_long; |
| 1160 | |
| 1161 | /// long long atoll(const char *nptr); |
| 1162 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/atoll.html |
| 1163 | pub extern fn atoll(nptr: [*:0]const u8) c_longlong; |
| 1164 | |
| 1165 | /// char *basename(char *path); |
| 1166 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/basename.html |
| 1167 | pub extern fn basename(path: [*:0]u8) [*:0]u8; |
| 1168 | |
| 1169 | /// int bind(int socket, const struct sockaddr *address, socklen_t address_len); |
| 1170 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/bind.html |
| 1171 | pub extern fn bind(socket: c_int, address: *const struct_sockaddr, address_len: socklen_t) c_int; |
| 1172 | |
| 1173 | /// void *bsearch(const void *key, const void *base, size_t nel, size_t width, int (*compar)(const void *, const void *)); |
| 1174 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/bsearch.html |
| 1175 | pub extern fn bsearch(key: *const anyopaque, base: *const anyopaque, nel: usize, width: usize, compar: *const fn (*const anyopaque, *const anyopaque) callconv(.C) c_int) ?*anyopaque; |
| 1176 | |
| 1177 | /// wint_t btowc(int c); |
| 1178 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/btowc.html |
| 1179 | pub extern fn btowc(c: c_int) c_int; |
| 1180 | |
| 1181 | /// double cabs(double complex z); |
| 1182 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cabs.html |
| 1183 | pub const cabs = @compileError("TODO cabs"); |
| 1184 | |
| 1185 | /// float cabsf(float complex z); |
| 1186 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cabsf.html |
| 1187 | pub const cabsf = @compileError("TODO cabsf"); |
| 1188 | |
| 1189 | /// long double cabsl(long double complex z); |
| 1190 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cabsl.html |
| 1191 | pub const cabsl = @compileError("TODO cabsl"); |
| 1192 | |
| 1193 | /// double complex cacos(double complex z); |
| 1194 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cacos.html |
| 1195 | pub const cacos = @compileError("TODO cacos"); |
| 1196 | |
| 1197 | /// float complex cacosf(float complex z); |
| 1198 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cacosf.html |
| 1199 | pub const cacosf = @compileError("TODO cacosf"); |
| 1200 | |
| 1201 | /// double complex cacosh(double complex z); |
| 1202 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cacosh.html |
| 1203 | pub const cacosh = @compileError("TODO cacosh"); |
| 1204 | |
| 1205 | /// float complex cacoshf(float complex z); |
| 1206 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cacoshf.html |
| 1207 | pub const cacoshf = @compileError("TODO cacoshf"); |
| 1208 | |
| 1209 | /// long double complex cacoshl(long double complex z); |
| 1210 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cacoshl.html |
| 1211 | pub const cacoshl = @compileError("TODO cacoshl"); |
| 1212 | |
| 1213 | /// long double complex cacosl(long double complex z); |
| 1214 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cacosl.html |
| 1215 | pub const cacosl = @compileError("TODO cacosl"); |
| 1216 | |
| 1217 | /// void *calloc(size_t nelem, size_t elsize); |
| 1218 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/calloc.html |
| 1219 | pub extern fn calloc(nelem: usize, elsize: usize) ?*anyopaque; |
| 1220 | |
| 1221 | /// double carg(double complex z); |
| 1222 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/carg.html |
| 1223 | pub const carg = @compileError("TODO carg"); |
| 1224 | |
| 1225 | /// float cargf(float complex z); |
| 1226 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cargf.html |
| 1227 | pub const cargf = @compileError("TODO cargf"); |
| 1228 | |
| 1229 | /// long double cargl(long double complex z); |
| 1230 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cargl.html |
| 1231 | pub const cargl = @compileError("TODO cargl"); |
| 1232 | |
| 1233 | /// double complex casin(double complex z); |
| 1234 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/casin.html |
| 1235 | pub const casin = @compileError("TODO casin"); |
| 1236 | |
| 1237 | /// float complex casinf(float complex z); |
| 1238 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/casinf.html |
| 1239 | pub const casinf = @compileError("TODO casinf"); |
| 1240 | |
| 1241 | /// double complex casinh(double complex z); |
| 1242 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/casinh.html |
| 1243 | pub const casinh = @compileError("TODO casinh"); |
| 1244 | |
| 1245 | /// float complex casinhf(float complex z); |
| 1246 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/casinhf.html |
| 1247 | pub const casinhf = @compileError("TODO casinhf"); |
| 1248 | |
| 1249 | /// long double complex casinhl(long double complex z); |
| 1250 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/casinhl.html |
| 1251 | pub const casinhl = @compileError("TODO casinhl"); |
| 1252 | |
| 1253 | /// long double complex casinl(long double complex z); |
| 1254 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/casinl.html |
| 1255 | pub const casinl = @compileError("TODO casinl"); |
| 1256 | |
| 1257 | /// double complex catan(double complex z); |
| 1258 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/catan.html |
| 1259 | pub const catan = @compileError("TODO catan"); |
| 1260 | |
| 1261 | /// float complex catanf(float complex z); |
| 1262 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/catanf.html |
| 1263 | pub const catanf = @compileError("TODO catanf"); |
| 1264 | |
| 1265 | /// double complex catanh(double complex z); |
| 1266 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/catanh.html |
| 1267 | pub const catanh = @compileError("TODO catanh"); |
| 1268 | |
| 1269 | /// float complex catanhf(float complex z); |
| 1270 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/catanhf.html |
| 1271 | pub const catanhf = @compileError("TODO catanhf"); |
| 1272 | |
| 1273 | /// long double complex catanhl(long double complex z); |
| 1274 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/catanhl.html |
| 1275 | pub const catanhl = @compileError("TODO catanhl"); |
| 1276 | |
| 1277 | /// long double complex catanl(long double complex z); |
| 1278 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/catanl.html |
| 1279 | pub const catanl = @compileError("TODO catanl"); |
| 1280 | |
| 1281 | /// int catclose(nl_catd catd); |
| 1282 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/catclose.html |
| 1283 | pub extern fn catclose(catd: nl_catd) c_int; |
| 1284 | |
| 1285 | /// char *catgets(nl_catd catd, int set_id, int msg_id, const char *s); |
| 1286 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/catgets.html |
| 1287 | pub extern fn catgets(catd: nl_catd, set_id: c_int, msg_id: c_int, s: [*:0]const u8) [*:0]u8; |
| 1288 | |
| 1289 | /// nl_catd catopen(const char *name, int oflag); |
| 1290 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/catopen.html |
| 1291 | pub extern fn catopen(name: [*:0]const u8, oflag: c_int) nl_catd; |
| 1292 | |
| 1293 | /// double cbrt(double x); |
| 1294 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cbrt.html |
| 1295 | pub extern fn cbrt(x: f64) f64; |
| 1296 | |
| 1297 | /// float cbrtf(float x); |
| 1298 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cbrtf.html |
| 1299 | pub extern fn cbrtf(x: f32) f32; |
| 1300 | |
| 1301 | /// long double cbrtl(long double x); |
| 1302 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cbrtl.html |
| 1303 | pub extern fn cbrtl(x: c_longdouble) c_longdouble; |
| 1304 | |
| 1305 | /// double complex ccos(double complex z); |
| 1306 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ccos.html |
| 1307 | pub const ccos = @compileError("TODO ccos"); |
| 1308 | |
| 1309 | /// float complex ccosf(float complex z); |
| 1310 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ccosf.html |
| 1311 | pub const ccosf = @compileError("TODO ccosf"); |
| 1312 | |
| 1313 | /// double complex ccosh(double complex z); |
| 1314 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ccosh.html |
| 1315 | pub const ccosh = @compileError("TODO ccosh"); |
| 1316 | |
| 1317 | /// float complex ccoshf(float complex z); |
| 1318 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ccoshf.html |
| 1319 | pub const ccoshf = @compileError("TODO ccoshf"); |
| 1320 | |
| 1321 | /// long double complex ccoshl(long double complex z); |
| 1322 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ccoshl.html |
| 1323 | pub const ccoshl = @compileError("TODO ccoshl"); |
| 1324 | |
| 1325 | /// long double complex ccosl(long double complex z); |
| 1326 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ccosl.html |
| 1327 | pub const ccosl = @compileError("TODO ccosl"); |
| 1328 | |
| 1329 | /// double ceil(double x); |
| 1330 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ceil.html |
| 1331 | pub extern fn ceil(x: f64) f64; |
| 1332 | |
| 1333 | /// float ceilf(float x); |
| 1334 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ceilf.html |
| 1335 | pub extern fn ceilf(x: f32) f32; |
| 1336 | |
| 1337 | /// long double ceill(long double x); |
| 1338 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ceill.html |
| 1339 | pub extern fn ceill(x: c_longdouble) c_longdouble; |
| 1340 | |
| 1341 | /// double complex cexp(double complex z); |
| 1342 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cexp.html |
| 1343 | pub const cexp = @compileError("TODO cexp"); |
| 1344 | |
| 1345 | /// float complex cexpf(float complex z); |
| 1346 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cexpf.html |
| 1347 | pub const cexpf = @compileError("TODO cexpf"); |
| 1348 | |
| 1349 | /// long double complex cexpl(long double complex z); |
| 1350 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cexpl.html |
| 1351 | pub const cexpl = @compileError("TODO cexpl"); |
| 1352 | |
| 1353 | /// speed_t cfgetispeed(const struct termios *termios_p); |
| 1354 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cfgetispeed.html |
| 1355 | // pub extern fn cfgetispeed(__termios_p: [*c]const struct_termios) speed_t; |
| 1356 | |
| 1357 | /// speed_t cfgetospeed(const struct termios *termios_p); |
| 1358 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cfgetospeed.html |
| 1359 | // pub extern fn cfgetospeed(__termios_p: [*c]const struct_termios) speed_t; |
| 1360 | |
| 1361 | /// int cfsetispeed(struct termios *termios_p, speed_t speed); |
| 1362 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cfsetispeed.html |
| 1363 | // pub extern fn cfsetispeed(__termios_p: [*c]struct_termios, __speed: speed_t) c_int; |
| 1364 | |
| 1365 | /// int cfsetospeed(struct termios *termios_p, speed_t speed); |
| 1366 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cfsetospeed.html |
| 1367 | // pub extern fn cfsetospeed(__termios_p: [*c]struct_termios, __speed: speed_t) c_int; |
| 1368 | |
| 1369 | /// int chdir(const char *path); |
| 1370 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/chdir.html |
| 1371 | pub extern fn chdir(path: [*:0]const u8) c_int; |
| 1372 | |
| 1373 | /// int chmod(const char *path, mode_t mode); |
| 1374 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/chmod.html |
| 1375 | pub extern fn chmod(path: [*:0]const u8, mode: mode_t) c_int; |
| 1376 | |
| 1377 | /// int chown(const char *path, uid_t owner, gid_t group); |
| 1378 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/chown.html |
| 1379 | pub extern fn chown(path: [*:0]const u8, owner: uid_t, group: gid_t) c_int; |
| 1380 | |
| 1381 | /// double cimag(double complex z); |
| 1382 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cimag.html |
| 1383 | pub const cimag = @compileError("TODO cimag"); |
| 1384 | |
| 1385 | /// float cimagf(float complex z); |
| 1386 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cimagf.html |
| 1387 | pub const cimagf = @compileError("TODO cimagf"); |
| 1388 | |
| 1389 | /// long double cimagl(long double complex z); |
| 1390 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cimagl.html |
| 1391 | pub const cimagl = @compileError("TODO cimagl"); |
| 1392 | |
| 1393 | /// void clearerr(FILE *stream); |
| 1394 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/clearerr.html |
| 1395 | pub extern fn clearerr(stream: *FILE) void; |
| 1396 | |
| 1397 | /// clock_t clock(void); |
| 1398 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/clock.html |
| 1399 | pub extern fn clock() clock_t; |
| 1400 | |
| 1401 | /// int clock_getcpuclockid(pid_t pid, clockid_t *clock_id); |
| 1402 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/clock_getcpuclockid.html |
| 1403 | pub extern fn clock_getcpuclockid(pid: pid_t, clock_id: *clockid_t) c_int; |
| 1404 | |
| 1405 | /// int clock_getres(clockid_t clock_id, struct timespec *res); |
| 1406 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/clock_getres.html |
| 1407 | pub extern fn clock_getres(clock_id: clockid_t, res: ?*struct_timespec) c_int; |
| 1408 | |
| 1409 | /// int clock_gettime(clockid_t clock_id, struct timespec *tp); |
| 1410 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/clock_gettime.html |
| 1411 | pub extern fn clock_gettime(clock_id: clockid_t, tp: *struct_timespec) c_int; |
| 1412 | |
| 1413 | /// int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); |
| 1414 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/clock_nanosleep.html |
| 1415 | pub extern fn clock_nanosleep(clock_id: clockid_t, flags: c_int, rqtp: *const struct_timespec, rmtp: ?*struct_timespec) c_int; |
| 1416 | |
| 1417 | /// int clock_settime(clockid_t clock_id, const struct timespec *tp); |
| 1418 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/clock_settime.html |
| 1419 | pub extern fn clock_settime(clock_id: clockid_t, tp: *const struct_timespec) c_int; |
| 1420 | |
| 1421 | /// double complex clog(double complex z); |
| 1422 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/clog.html |
| 1423 | pub const clog = @compileError("TODO clog"); |
| 1424 | |
| 1425 | /// float complex clogf(float complex z); |
| 1426 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/clogf.html |
| 1427 | pub const clogf = @compileError("TODO clogf"); |
| 1428 | |
| 1429 | /// long double complex clogl(long double complex z); |
| 1430 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/clogl.html |
| 1431 | pub const clogl = @compileError("TODO clogl"); |
| 1432 | |
| 1433 | /// int close(int fildes); |
| 1434 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/close.html |
| 1435 | pub extern fn close(fildes: c_int) c_int; |
| 1436 | |
| 1437 | /// int closedir(DIR *dirp); |
| 1438 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/closedir.html |
| 1439 | pub extern fn closedir(dirp: *DIR) c_int; |
| 1440 | |
| 1441 | /// void closelog(void); |
| 1442 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/closelog.html |
| 1443 | pub extern fn closelog() void; |
| 1444 | |
| 1445 | /// size_t confstr(int name, char *buf, size_t len); |
| 1446 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/confstr.html |
| 1447 | pub extern fn confstr(name: c_int, buf: ?[*:0]u8, len: usize) usize; |
| 1448 | |
| 1449 | /// double complex conj(double complex z); |
| 1450 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/conj.html |
| 1451 | pub const conj = @compileError("TODO conj"); |
| 1452 | |
| 1453 | /// float complex conjf(float complex z); |
| 1454 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/conjf.html |
| 1455 | pub const conjf = @compileError("TODO conjf"); |
| 1456 | |
| 1457 | /// long double complex conjl(long double complex z); |
| 1458 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/conjl.html |
| 1459 | pub const conjl = @compileError("TODO conjl"); |
| 1460 | |
| 1461 | /// int connect(int socket, const struct sockaddr *address, socklen_t address_len); |
| 1462 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/connect.html |
| 1463 | pub extern fn connect(socket: c_int, address: *const struct_sockaddr, address_len: socklen_t) c_int; |
| 1464 | |
| 1465 | /// double copysign(double x, double y); |
| 1466 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/copysign.html |
| 1467 | pub extern fn copysign(x: f64, y: f64) f64; |
| 1468 | |
| 1469 | /// float copysignf(float x, float y); |
| 1470 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/copysignf.html |
| 1471 | pub extern fn copysignf(x: f32, y: f32) f32; |
| 1472 | |
| 1473 | /// long double copysignl(long double x, long double y); |
| 1474 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/copysignl.html |
| 1475 | pub extern fn copysignl(x: c_longdouble, y: c_longdouble) c_longdouble; |
| 1476 | |
| 1477 | /// double cos(double x); |
| 1478 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cos.html |
| 1479 | pub extern fn cos(x: f64) f64; |
| 1480 | |
| 1481 | /// float cosf(float x); |
| 1482 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cosf.html |
| 1483 | pub extern fn cosf(x: f32) f32; |
| 1484 | |
| 1485 | /// double cosh(double x); |
| 1486 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cosh.html |
| 1487 | pub extern fn cosh(x: f64) f64; |
| 1488 | |
| 1489 | /// float coshf(float x); |
| 1490 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/coshf.html |
| 1491 | pub extern fn coshf(x: f32) f32; |
| 1492 | |
| 1493 | /// long double coshl(long double x); |
| 1494 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/coshl.html |
| 1495 | pub extern fn coshl(x: c_longdouble) c_longdouble; |
| 1496 | |
| 1497 | /// long double cosl(long double x); |
| 1498 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cosl.html |
| 1499 | pub extern fn cosl(x: c_longdouble) c_longdouble; |
| 1500 | |
| 1501 | /// double complex cpow(double complex x, double complex y); |
| 1502 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cpow.html |
| 1503 | pub const cpow = @compileError("TODO cpow"); |
| 1504 | |
| 1505 | /// float complex cpowf(float complex x, float complex y); |
| 1506 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cpowf.html |
| 1507 | pub const cpowf = @compileError("TODO cpowf"); |
| 1508 | |
| 1509 | /// long double complex cpowl(long double complex x, long double complex y); |
| 1510 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cpowl.html |
| 1511 | pub const cpowl = @compileError("TODO cpowl"); |
| 1512 | |
| 1513 | /// double complex cproj(double complex z); |
| 1514 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cproj.html |
| 1515 | pub const cproj = @compileError("TODO cproj"); |
| 1516 | |
| 1517 | /// float complex cprojf(float complex z); |
| 1518 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cprojf.html |
| 1519 | pub const cprojf = @compileError("TODO cprojf"); |
| 1520 | |
| 1521 | /// long double complex cprojl(long double complex z); |
| 1522 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/cprojl.html |
| 1523 | pub const cprojl = @compileError("TODO cprojl"); |
| 1524 | |
| 1525 | /// double creal(double complex z); |
| 1526 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/creal.html |
| 1527 | pub const creal = @compileError("TODO creal"); |
| 1528 | |
| 1529 | /// float crealf(float complex z); |
| 1530 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/crealf.html |
| 1531 | pub const crealf = @compileError("TODO crealf"); |
| 1532 | |
| 1533 | /// long double creall(long double complex z); |
| 1534 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/creall.html |
| 1535 | pub const creall = @compileError("TODO creall"); |
| 1536 | |
| 1537 | /// int creat(const char *path, mode_t mode); |
| 1538 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/creat.html |
| 1539 | pub extern fn creat(path: [*:0]const u8, mode: mode_t) c_int; |
| 1540 | |
| 1541 | /// char *crypt(const char *key, const char *salt); |
| 1542 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/crypt.html |
| 1543 | pub extern fn crypt(key: [*:0]const u8, salt: [*]const u8) ?[*:0]u8; |
| 1544 | |
| 1545 | /// double complex csin(double complex z); |
| 1546 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/csin.html |
| 1547 | pub const csin = @compileError("TODO csin"); |
| 1548 | |
| 1549 | /// float complex csinf(float complex z); |
| 1550 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/csinf.html |
| 1551 | pub const csinf = @compileError("TODO csinf"); |
| 1552 | |
| 1553 | /// double complex csinh(double complex z); |
| 1554 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/csinh.html |
| 1555 | pub const csinh = @compileError("TODO csinh"); |
| 1556 | |
| 1557 | /// float complex csinhf(float complex z); |
| 1558 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/csinhf.html |
| 1559 | pub const csinhf = @compileError("TODO csinhf"); |
| 1560 | |
| 1561 | /// long double complex csinhl(long double complex z); |
| 1562 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/csinhl.html |
| 1563 | pub const csinhl = @compileError("TODO csinhl"); |
| 1564 | |
| 1565 | /// long double complex csinl(long double complex z); |
| 1566 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/csinl.html |
| 1567 | pub const csinl = @compileError("TODO csinl"); |
| 1568 | |
| 1569 | /// double complex csqrt(double complex z); |
| 1570 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/csqrt.html |
| 1571 | pub const csqrt = @compileError("TODO csqrt"); |
| 1572 | |
| 1573 | /// float complex csqrtf(float complex z); |
| 1574 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/csqrtf.html |
| 1575 | pub const csqrtf = @compileError("TODO csqrtf"); |
| 1576 | |
| 1577 | /// long double complex csqrtl(long double complex z); |
| 1578 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/csqrtl.html |
| 1579 | pub const csqrtl = @compileError("TODO csqrtl"); |
| 1580 | |
| 1581 | /// double complex ctan(double complex z); |
| 1582 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ctan.html |
| 1583 | pub const ctan = @compileError("TODO ctan"); |
| 1584 | |
| 1585 | /// float complex ctanf(float complex z); |
| 1586 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ctanf.html |
| 1587 | pub const ctanf = @compileError("TODO ctanf"); |
| 1588 | |
| 1589 | /// double complex ctanh(double complex z); |
| 1590 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ctanh.html |
| 1591 | pub const ctanh = @compileError("TODO ctanh"); |
| 1592 | |
| 1593 | /// float complex ctanhf(float complex z); |
| 1594 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ctanhf.html |
| 1595 | pub const ctanhf = @compileError("TODO ctanhf"); |
| 1596 | |
| 1597 | /// long double complex ctanhl(long double complex z); |
| 1598 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ctanhl.html |
| 1599 | pub const ctanhl = @compileError("TODO ctanhl"); |
| 1600 | |
| 1601 | /// long double complex ctanl(long double complex z); |
| 1602 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ctanl.html |
| 1603 | pub const ctanl = @compileError("TODO ctanl"); |
| 1604 | |
| 1605 | /// char *ctermid(char *s); |
| 1606 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ctermid.html |
| 1607 | pub extern fn ctermid(s: ?[*:0]u8) [*:0]u8; |
| 1608 | |
| 1609 | /// char *ctime(const time_t *clock); |
| 1610 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ctime.html |
| 1611 | pub extern fn ctime(clock: *const time_t) ?[*:0]u8; |
| 1612 | |
| 1613 | /// char *ctime_r(const time_t *clock, char *buf); |
| 1614 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ctime_r.html |
| 1615 | pub extern fn ctime_r(noalias clock: [*c]const time_t, noalias buf: [*]u8) ?[*:0]u8; |
| 1616 | |
| 1617 | /// int dbm_clearerr(DBM *db); |
| 1618 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dbm_clearerr.html |
| 1619 | pub const dbm_clearerr = @compileError("TODO dbm_clearerr"); |
| 1620 | |
| 1621 | /// void dbm_close(DBM *db); |
| 1622 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dbm_close.html |
| 1623 | pub const dbm_close = @compileError("TODO dbm_close"); |
| 1624 | |
| 1625 | /// int dbm_delete(DBM *db, datum key); |
| 1626 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dbm_delete.html |
| 1627 | pub const dbm_delete = @compileError("TODO dbm_delete"); |
| 1628 | |
| 1629 | /// int dbm_error(DBM *db); |
| 1630 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dbm_error.html |
| 1631 | pub const dbm_error = @compileError("TODO dbm_error"); |
| 1632 | |
| 1633 | /// datum dbm_fetch(DBM *db, datum key); |
| 1634 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dbm_fetch.html |
| 1635 | pub const dbm_fetch = @compileError("TODO dbm_fetch"); |
| 1636 | |
| 1637 | /// datum dbm_firstkey(DBM *db); |
| 1638 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dbm_firstkey.html |
| 1639 | pub const dbm_firstkey = @compileError("TODO dbm_firstkey"); |
| 1640 | |
| 1641 | /// datum dbm_nextkey(DBM *db); |
| 1642 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dbm_nextkey.html |
| 1643 | pub const dbm_nextkey = @compileError("TODO dbm_nextkey"); |
| 1644 | |
| 1645 | /// DBM *dbm_open(const char *file, int open_flags, mode_t file_mode); |
| 1646 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dbm_open.html |
| 1647 | pub const dbm_open = @compileError("TODO dbm_open"); |
| 1648 | |
| 1649 | /// int dbm_store(DBM *db, datum key, datum content, int store_mode); |
| 1650 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dbm_store.html |
| 1651 | pub const dbm_store = @compileError("TODO dbm_store"); |
| 1652 | |
| 1653 | /// double difftime(time_t time1, time_t time0); |
| 1654 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/difftime.html |
| 1655 | pub extern fn difftime(time1: time_t, time0: time_t) f64; |
| 1656 | |
| 1657 | /// int dirfd(DIR *dirp); |
| 1658 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dirfd.html |
| 1659 | pub extern fn dirfd(dirp: *DIR) c_int; |
| 1660 | |
| 1661 | /// char *dirname(char *path); |
| 1662 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dirname.html |
| 1663 | pub extern fn dirname(path: ?[*:0]u8) [*:0]u8; |
| 1664 | |
| 1665 | /// div_t div(int numer, int denom); |
| 1666 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/div.html |
| 1667 | pub extern fn div(numer: c_int, denom: c_int) div_t; |
| 1668 | |
| 1669 | /// int dlclose(void *handle); |
| 1670 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dlclose.html |
| 1671 | pub extern fn dlclose(handle: *anyopaque) c_int; |
| 1672 | |
| 1673 | /// char *dlerror(void); |
| 1674 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dlerror.html |
| 1675 | pub extern fn dlerror() ?[*:0]u8; |
| 1676 | |
| 1677 | /// void *dlopen(const char *file, int mode); |
| 1678 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dlopen.html |
| 1679 | pub extern fn dlopen(file: [*:0]const u8, mode: c_int) ?*anyopaque; |
| 1680 | |
| 1681 | /// void *dlsym(void *restrict handle, const char *restrict name); |
| 1682 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dlsym.html |
| 1683 | pub extern fn dlsym(noalias handle: *anyopaque, noalias name: [*:0]const u8) ?*anyopaque; |
| 1684 | |
| 1685 | /// int dprintf(int fildes, const char *restrict format, ...); |
| 1686 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dprintf.html |
| 1687 | pub extern fn dprintf(__fd: c_int, noalias __fmt: [*c]const u8, ...) c_int; |
| 1688 | |
| 1689 | /// double drand48(void); |
| 1690 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/drand48.html |
| 1691 | pub extern fn drand48() f64; |
| 1692 | |
| 1693 | /// int dup(int fildes); |
| 1694 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dup.html |
| 1695 | pub extern fn dup(fildes: c_int) c_int; |
| 1696 | |
| 1697 | /// int dup2(int fildes, int fildes2); |
| 1698 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/dup2.html |
| 1699 | pub extern fn dup2(fildes: c_int, fildes2: c_int) c_int; |
| 1700 | |
| 1701 | /// locale_t duplocale(locale_t locobj); |
| 1702 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/duplocale.html |
| 1703 | pub extern fn duplocale(locobj: locale_t) ?locale_t; |
| 1704 | |
| 1705 | /// void encrypt(char block[64], int edflag); |
| 1706 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/encrypt.html |
| 1707 | pub const encrypt = @compileError("TODO encrypt"); |
| 1708 | |
| 1709 | /// void endgrent(void); |
| 1710 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/endgrent.html |
| 1711 | pub extern fn endgrent() void; |
| 1712 | |
| 1713 | /// void endhostent(void); |
| 1714 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/endhostent.html |
| 1715 | pub extern fn endhostent() void; |
| 1716 | |
| 1717 | /// void endnetent(void); |
| 1718 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/endnetent.html |
| 1719 | pub extern fn endnetent() void; |
| 1720 | |
| 1721 | /// void endprotoent(void); |
| 1722 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/endprotoent.html |
| 1723 | pub extern fn endprotoent() void; |
| 1724 | |
| 1725 | /// void endpwent(void); |
| 1726 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/endpwent.html |
| 1727 | pub extern fn endpwent() void; |
| 1728 | |
| 1729 | /// void endservent(void); |
| 1730 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/endservent.html |
| 1731 | pub extern fn endservent() void; |
| 1732 | |
| 1733 | /// void endutxent(void); |
| 1734 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/endutxent.html |
| 1735 | pub extern fn endutxent() void; |
| 1736 | |
| 1737 | /// double erand48(unsigned short xsubi[3]); |
| 1738 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/erand48.html |
| 1739 | pub extern fn erand48(xsubi: *[3]c_ushort) f64; |
| 1740 | |
| 1741 | /// double erf(double x); |
| 1742 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/erf.html |
| 1743 | pub extern fn erf(x: f64) f64; |
| 1744 | |
| 1745 | /// double erfc(double x); |
| 1746 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/erfc.html |
| 1747 | pub extern fn erfc(x: f64) f64; |
| 1748 | |
| 1749 | /// float erfcf(float x); |
| 1750 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/erfcf.html |
| 1751 | pub extern fn erfcf(x: f32) f32; |
| 1752 | |
| 1753 | /// long double erfcl(long double x); |
| 1754 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/erfcl.html |
| 1755 | pub extern fn erfcl(x: c_longdouble) c_longdouble; |
| 1756 | |
| 1757 | /// float erff(float x); |
| 1758 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/erff.html |
| 1759 | pub extern fn erff(x: f32) f32; |
| 1760 | |
| 1761 | /// long double erfl(long double x); |
| 1762 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/erfl.html |
| 1763 | pub extern fn erfl(x: c_longdouble) c_longdouble; |
| 1764 | |
| 1765 | /// int execl(const char *path, const char *arg0, ... /*, (char *)0 */); |
| 1766 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/execl.html |
| 1767 | pub extern fn execl(__path: [*c]const u8, __arg: [*c]const u8, ...) c_int; |
| 1768 | |
| 1769 | /// int execle(const char *path, const char *arg0, ... /*, (char *)0, char *const envp[]*/); |
| 1770 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/execle.html |
| 1771 | pub extern fn execle(__path: [*c]const u8, __arg: [*c]const u8, ...) c_int; |
| 1772 | |
| 1773 | /// int execlp(const char *file, const char *arg0, ... /*, (char *)0 */); |
| 1774 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/execlp.html |
| 1775 | pub extern fn execlp(__file: [*c]const u8, __arg: [*c]const u8, ...) c_int; |
| 1776 | |
| 1777 | /// int execv(const char *path, char *const argv[]); |
| 1778 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/execv.html |
| 1779 | pub extern fn execv(__path: [*c]const u8, __argv: [*c]const [*c]u8) c_int; |
| 1780 | |
| 1781 | /// int execve(const char *path, char *const argv[], char *const envp[]); |
| 1782 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/execve.html |
| 1783 | pub extern fn execve(__path: [*c]const u8, __argv: [*c]const [*c]u8, __envp: [*c]const [*c]u8) c_int; |
| 1784 | |
| 1785 | /// int execvp(const char *file, char *const argv[]); |
| 1786 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/execvp.html |
| 1787 | pub extern fn execvp(file: [*:0]const u8, argv: [*:null]const ?[*:0]const u8) c_int; |
| 1788 | |
| 1789 | /// void exit(int status); |
| 1790 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/exit.html |
| 1791 | pub extern fn exit(status: c_int) noreturn; |
| 1792 | |
| 1793 | /// double exp(double x); |
| 1794 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/exp.html |
| 1795 | pub extern fn exp(x: f64) f64; |
| 1796 | |
| 1797 | /// double exp2(double x); |
| 1798 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/exp2.html |
| 1799 | pub extern fn exp2(x: f64) f64; |
| 1800 | |
| 1801 | /// float exp2f(float x); |
| 1802 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/exp2f.html |
| 1803 | pub extern fn exp2f(x: f32) f32; |
| 1804 | |
| 1805 | /// long double exp2l(long double x); |
| 1806 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/exp2l.html |
| 1807 | pub extern fn exp2l(x: c_longdouble) c_longdouble; |
| 1808 | |
| 1809 | /// float expf(float x); |
| 1810 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/expf.html |
| 1811 | pub extern fn expf(x: f32) f32; |
| 1812 | |
| 1813 | /// long double expl(long double x); |
| 1814 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/expl.html |
| 1815 | pub extern fn expl(x: c_longdouble) c_longdouble; |
| 1816 | |
| 1817 | /// double expm1(double x); |
| 1818 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/expm1.html |
| 1819 | pub extern fn expm1(x: f64) f64; |
| 1820 | |
| 1821 | /// float expm1f(float x); |
| 1822 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/expm1f.html |
| 1823 | pub extern fn expm1f(x: f32) f32; |
| 1824 | |
| 1825 | /// long double expm1l(long double x); |
| 1826 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/expm1l.html |
| 1827 | pub extern fn expm1l(x: c_longdouble) c_longdouble; |
| 1828 | |
| 1829 | /// double fabs(double x); |
| 1830 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fabs.html |
| 1831 | pub extern fn fabs(x: f64) f64; |
| 1832 | |
| 1833 | /// float fabsf(float x); |
| 1834 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fabsf.html |
| 1835 | pub extern fn fabsf(x: f32) f32; |
| 1836 | |
| 1837 | /// long double fabsl(long double x); |
| 1838 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fabsl.html |
| 1839 | pub extern fn fabsl(x: c_longdouble) c_longdouble; |
| 1840 | |
| 1841 | /// int faccessat(int fd, const char *path, int amode, int flag); |
| 1842 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/faccessat.html |
| 1843 | pub extern fn faccessat(fd: c_int, path: [*:0]const u8, amode: c_int, flag: c_int) c_int; |
| 1844 | |
| 1845 | /// int fattach(int fildes, const char *path); |
| 1846 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fattach.html |
| 1847 | pub const fattach = @compileError("TODO fattach"); |
| 1848 | |
| 1849 | /// int fchdir(int fildes); |
| 1850 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fchdir.html |
| 1851 | pub extern fn fchdir(fildes: c_int) c_int; |
| 1852 | |
| 1853 | /// int fchmod(int fildes, mode_t mode); |
| 1854 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fchmod.html |
| 1855 | pub extern fn fchmod(fildes: c_int, mode: mode_t) c_int; |
| 1856 | |
| 1857 | /// int fchmodat(int fd, const char *path, mode_t mode, int flag); |
| 1858 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fchmodat.html |
| 1859 | pub extern fn fchmodat(fd: c_int, path: [*:0]const u8, mode: mode_t, flag: c_int) c_int; |
| 1860 | |
| 1861 | /// int fchown(int fildes, uid_t owner, gid_t group); |
| 1862 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fchown.html |
| 1863 | pub extern fn fchown(fildes: c_int, owner: uid_t, group: gid_t) c_int; |
| 1864 | |
| 1865 | /// int fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); |
| 1866 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fchownat.html |
| 1867 | pub extern fn fchownat(fd: c_int, path: [*:0]const u8, owner: uid_t, group: gid_t, flag: c_int) c_int; |
| 1868 | |
| 1869 | /// int fclose(FILE *stream); |
| 1870 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fclose.html |
| 1871 | pub extern fn fclose(stream: *FILE) c_int; |
| 1872 | |
| 1873 | /// int fcntl(int fildes, int cmd, ...); |
| 1874 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fcntl.html |
| 1875 | pub extern fn fcntl(__fd: c_int, __cmd: c_int, ...) c_int; |
| 1876 | |
| 1877 | /// int fdatasync(int fildes); |
| 1878 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fdatasync.html |
| 1879 | pub extern fn fdatasync(fildes: c_int) c_int; |
| 1880 | |
| 1881 | /// int fdetach(const char *path); |
| 1882 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fdetach.html |
| 1883 | pub const fdetach = @compileError("TODO fdetach"); |
| 1884 | |
| 1885 | /// double fdim(double x, double y); |
| 1886 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fdim.html |
| 1887 | pub extern fn fdim(x: f64, y: f64) f64; |
| 1888 | |
| 1889 | /// float fdimf(float x, float y); |
| 1890 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fdimf.html |
| 1891 | pub extern fn fdimf(x: f32, y: f32) f32; |
| 1892 | |
| 1893 | /// long double fdiml(long double x, long double y); |
| 1894 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fdiml.html |
| 1895 | pub extern fn fdiml(x: c_longdouble, y: c_longdouble) c_longdouble; |
| 1896 | |
| 1897 | /// FILE *fdopen(int fildes, const char *mode); |
| 1898 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fdopen.html |
| 1899 | pub extern fn fdopen(__fd: c_int, __modes: [*c]const u8) [*c]FILE; |
| 1900 | |
| 1901 | /// DIR *fdopendir(int fd); |
| 1902 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fdopendir.html |
| 1903 | pub extern fn fdopendir(__fd: c_int) ?*DIR; |
| 1904 | |
| 1905 | /// int feclearexcept(int excepts); |
| 1906 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/feclearexcept.html |
| 1907 | pub extern fn feclearexcept(excepts: c_int) c_int; |
| 1908 | |
| 1909 | /// int fegetenv(fenv_t *envp); |
| 1910 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fegetenv.html |
| 1911 | // pub extern fn fegetenv(__envp: ?*fenv_t) c_int; |
| 1912 | |
| 1913 | /// int fegetexceptflag(fexcept_t *flagp, int excepts); |
| 1914 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fegetexceptflag.html |
| 1915 | // pub extern fn fegetexceptflag(__flagp: [*c]fexcept_t, __excepts: c_int) c_int; |
| 1916 | |
| 1917 | /// int fegetround(void); |
| 1918 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fegetround.html |
| 1919 | pub extern fn fegetround() c_int; |
| 1920 | |
| 1921 | /// int feholdexcept(fenv_t *envp); |
| 1922 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/feholdexcept.html |
| 1923 | // pub extern fn feholdexcept(__envp: ?*fenv_t) c_int; |
| 1924 | |
| 1925 | /// int feof(FILE *stream); |
| 1926 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/feof.html |
| 1927 | pub extern fn feof(__stream: [*c]FILE) c_int; |
| 1928 | |
| 1929 | /// int feraiseexcept(int excepts); |
| 1930 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/feraiseexcept.html |
| 1931 | pub extern fn feraiseexcept(excepts: c_int) c_int; |
| 1932 | |
| 1933 | /// int ferror(FILE *stream); |
| 1934 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ferror.html |
| 1935 | pub extern fn ferror(__stream: [*c]FILE) c_int; |
| 1936 | |
| 1937 | /// int fesetenv(const fenv_t *envp); |
| 1938 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fesetenv.html |
| 1939 | // pub extern fn fesetenv(__envp: ?*const fenv_t) c_int; |
| 1940 | |
| 1941 | /// int fesetexceptflag(const fexcept_t *flagp, int excepts); |
| 1942 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fesetexceptflag.html |
| 1943 | // pub extern fn fesetexceptflag(__flagp: [*c]const fexcept_t, __excepts: c_int) c_int; |
| 1944 | |
| 1945 | /// int fesetround(int round); |
| 1946 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fesetround.html |
| 1947 | pub extern fn fesetround(round: c_int) c_int; |
| 1948 | |
| 1949 | /// int fetestexcept(int excepts); |
| 1950 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fetestexcept.html |
| 1951 | pub extern fn fetestexcept(excepts: c_int) c_int; |
| 1952 | |
| 1953 | /// int feupdateenv(const fenv_t *envp); |
| 1954 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/feupdateenv.html |
| 1955 | // pub extern fn feupdateenv(__envp: ?*const fenv_t) c_int; |
| 1956 | |
| 1957 | /// int fexecve(int fd, char *const argv[], char *const envp[]); |
| 1958 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fexecve.html |
| 1959 | pub extern fn fexecve(__fd: c_int, __argv: [*c]const [*c]u8, __envp: [*c]const [*c]u8) c_int; |
| 1960 | |
| 1961 | /// int fflush(FILE *stream); |
| 1962 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fflush.html |
| 1963 | pub extern fn fflush(__stream: [*c]FILE) c_int; |
| 1964 | |
| 1965 | /// int ffs(int i); |
| 1966 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ffs.html |
| 1967 | pub extern fn ffs(i: c_int) c_int; |
| 1968 | |
| 1969 | /// int fgetc(FILE *stream); |
| 1970 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fgetc.html |
| 1971 | pub extern fn fgetc(__stream: [*c]FILE) c_int; |
| 1972 | |
| 1973 | /// int fgetpos(FILE *restrict stream, fpos_t *restrict pos); |
| 1974 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fgetpos.html |
| 1975 | // pub extern fn fgetpos(noalias __stream: [*c]FILE, noalias __pos: [*c]fpos_t) c_int; |
| 1976 | |
| 1977 | /// char *fgets(char *restrict s, int n, FILE *restrict stream); |
| 1978 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fgets.html |
| 1979 | pub extern fn fgets(noalias __s: [*c]u8, __n: c_int, noalias __stream: [*c]FILE) [*c]u8; |
| 1980 | |
| 1981 | /// wint_t fgetwc(FILE *stream); |
| 1982 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fgetwc.html |
| 1983 | // pub extern fn fgetwc(__stream: [*c]__FILE) wint_t; |
| 1984 | |
| 1985 | /// wchar_t *fgetws(wchar_t *restrict ws, int n, FILE *restrict stream); |
| 1986 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fgetws.html |
| 1987 | // pub extern fn fgetws(noalias __ws: [*c]wchar_t, __n: c_int, noalias __stream: [*c]__FILE) [*c]wchar_t; |
| 1988 | |
| 1989 | /// int fileno(FILE *stream); |
| 1990 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fileno.html |
| 1991 | pub extern fn fileno(__stream: [*c]FILE) c_int; |
| 1992 | |
| 1993 | /// void flockfile(FILE *file); |
| 1994 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/flockfile.html |
| 1995 | pub extern fn flockfile(__stream: [*c]FILE) void; |
| 1996 | |
| 1997 | /// double floor(double x); |
| 1998 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/floor.html |
| 1999 | pub extern fn floor(x: f64) f64; |
| 2000 | |
| 2001 | /// float floorf(float x); |
| 2002 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/floorf.html |
| 2003 | pub extern fn floorf(x: f32) f32; |
| 2004 | |
| 2005 | /// long double floorl(long double x); |
| 2006 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/floorl.html |
| 2007 | pub extern fn floorl(x: c_longdouble) c_longdouble; |
| 2008 | |
| 2009 | /// double fma(double x, double y, double z); |
| 2010 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fma.html |
| 2011 | pub extern fn fma(x: f64, y: f64, z: f64) f64; |
| 2012 | |
| 2013 | /// float fmaf(float x, float y, float z); |
| 2014 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fmaf.html |
| 2015 | pub extern fn fmaf(x: f32, y: f32, z: f32) f32; |
| 2016 | |
| 2017 | /// long double fmal(long double x, long double y, long double z); |
| 2018 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fmal.html |
| 2019 | pub extern fn fmal(x: c_longdouble, y: c_longdouble, z: c_longdouble) c_longdouble; |
| 2020 | |
| 2021 | /// double fmax(double x, double y); |
| 2022 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fmax.html |
| 2023 | pub extern fn fmax(x: f64, y: f64) f64; |
| 2024 | |
| 2025 | /// float fmaxf(float x, float y); |
| 2026 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fmaxf.html |
| 2027 | pub extern fn fmaxf(x: f32, y: f32) f32; |
| 2028 | |
| 2029 | /// long double fmaxl(long double x, long double y); |
| 2030 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fmaxl.html |
| 2031 | pub extern fn fmaxl(x: c_longdouble, y: c_longdouble) c_longdouble; |
| 2032 | |
| 2033 | /// FILE *fmemopen(void *restrict buf, size_t size, const char *restrict mode); |
| 2034 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fmemopen.html |
| 2035 | pub extern fn fmemopen(__s: ?*anyopaque, __len: usize, __modes: [*c]const u8) [*c]FILE; |
| 2036 | |
| 2037 | /// double fmin(double x, double y); |
| 2038 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fmin.html |
| 2039 | pub extern fn fmin(x: f64, y: f64) f64; |
| 2040 | |
| 2041 | /// float fminf(float x, float y); |
| 2042 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fminf.html |
| 2043 | pub extern fn fminf(x: f32, y: f32) f32; |
| 2044 | |
| 2045 | /// long double fminl(long double x, long double y); |
| 2046 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fminl.html |
| 2047 | pub extern fn fminl(x: c_longdouble, y: c_longdouble) c_longdouble; |
| 2048 | |
| 2049 | /// double fmod(double x, double y); |
| 2050 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fmod.html |
| 2051 | pub extern fn fmod(x: f64, y: f64) f64; |
| 2052 | |
| 2053 | /// float fmodf(float x, float y); |
| 2054 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fmodf.html |
| 2055 | pub extern fn fmodf(x: f32, y: f32) f32; |
| 2056 | |
| 2057 | /// long double fmodl(long double x, long double y); |
| 2058 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fmodl.html |
| 2059 | pub extern fn fmodl(x: c_longdouble, y: c_longdouble) c_longdouble; |
| 2060 | |
| 2061 | /// int fmtmsg(long classification, const char *label, int severity, const char *text, const char *action, const char *tag); |
| 2062 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fmtmsg.html |
| 2063 | pub extern fn fmtmsg(__classification: c_long, __label: [*c]const u8, __severity: c_int, __text: [*c]const u8, __action: [*c]const u8, __tag: [*c]const u8) c_int; |
| 2064 | |
| 2065 | /// int fnmatch(const char *pattern, const char *string, int flags); |
| 2066 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fnmatch.html |
| 2067 | pub extern fn fnmatch(__pattern: [*c]const u8, __name: [*c]const u8, __flags: c_int) c_int; |
| 2068 | |
| 2069 | /// FILE *fopen(const char *restrict filename, const char *restrict mode); |
| 2070 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fopen.html |
| 2071 | pub extern fn fopen(__filename: [*c]const u8, __modes: [*c]const u8) [*c]FILE; |
| 2072 | |
| 2073 | /// pid_t fork(void); |
| 2074 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fork.html |
| 2075 | pub extern fn fork() pid_t; |
| 2076 | |
| 2077 | /// long fpathconf(int fildes, int name); |
| 2078 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fpathconf.html |
| 2079 | pub extern fn fpathconf(fildes: c_int, name: c_int) c_long; |
| 2080 | |
| 2081 | /// int fprintf(FILE *restrict stream, const char *restrict format, ...); |
| 2082 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fprintf.html |
| 2083 | pub extern fn fprintf(__stream: [*c]FILE, __format: [*c]const u8, ...) c_int; |
| 2084 | |
| 2085 | /// int fputc(int c, FILE *stream); |
| 2086 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fputc.html |
| 2087 | pub extern fn fputc(__c: c_int, __stream: [*c]FILE) c_int; |
| 2088 | |
| 2089 | /// int fputs(const char *restrict s, FILE *restrict stream); |
| 2090 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fputs.html |
| 2091 | pub extern fn fputs(noalias __s: [*c]const u8, noalias __stream: [*c]FILE) c_int; |
| 2092 | |
| 2093 | /// wint_t fputwc(wchar_t wc, FILE *stream); |
| 2094 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fputwc.html |
| 2095 | // pub extern fn fputwc(__wc: wchar_t, __stream: [*c]__FILE) wint_t; |
| 2096 | |
| 2097 | /// int fputws(const wchar_t *restrict ws, FILE *restrict stream); |
| 2098 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fputws.html |
| 2099 | // pub extern fn fputws(noalias __ws: [*c]const wchar_t, noalias __stream: [*c]__FILE) c_int; |
| 2100 | |
| 2101 | /// size_t fread(void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream); |
| 2102 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fread.html |
| 2103 | pub extern fn fread(__ptr: ?*anyopaque, __size: c_ulong, __n: c_ulong, __stream: [*c]FILE) c_ulong; |
| 2104 | |
| 2105 | /// void free(void *ptr); |
| 2106 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/free.html |
| 2107 | pub extern fn free(ptr: ?*anyopaque) void; |
| 2108 | |
| 2109 | /// void freeaddrinfo(struct addrinfo *ai); |
| 2110 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/freeaddrinfo.html |
| 2111 | pub extern fn freeaddrinfo(ai: *const struct_addrinfo) void; |
| 2112 | |
| 2113 | /// void freelocale(locale_t locobj); |
| 2114 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/freelocale.html |
| 2115 | pub extern fn freelocale(locobj: locale_t) void; |
| 2116 | |
| 2117 | /// FILE *freopen(const char *restrict filename, const char *restrict mode, FILE *restrict stream); |
| 2118 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/freopen.html |
| 2119 | pub extern fn freopen(noalias __filename: [*c]const u8, noalias __modes: [*c]const u8, noalias __stream: [*c]FILE) [*c]FILE; |
| 2120 | |
| 2121 | /// double frexp(double num, int *exp); |
| 2122 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/frexp.html |
| 2123 | pub extern fn frexp(x: f64, exp: *c_int) f64; |
| 2124 | |
| 2125 | /// float frexpf(float num, int *exp); |
| 2126 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/frexpf.html |
| 2127 | pub extern fn frexpf(x: f32, exp: *c_int) f32; |
| 2128 | |
| 2129 | /// long double frexpl(long double num, int *exp); |
| 2130 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/frexpl.html |
| 2131 | pub extern fn frexpl(x: c_longdouble, exp: *c_int) c_longdouble; |
| 2132 | |
| 2133 | /// int fscanf(FILE *restrict stream, const char *restrict format, ...); |
| 2134 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fscanf.html |
| 2135 | pub extern fn fscanf(noalias __stream: [*c]FILE, noalias __format: [*c]const u8, ...) c_int; |
| 2136 | |
| 2137 | /// int fseek(FILE *stream, long offset, int whence); |
| 2138 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fseek.html |
| 2139 | pub extern fn fseek(__stream: [*c]FILE, __off: c_long, __whence: c_int) c_int; |
| 2140 | |
| 2141 | /// int fseeko(FILE *stream, off_t offset, int whence); |
| 2142 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fseeko.html |
| 2143 | // pub extern fn fseeko(__stream: [*c]FILE, __off: off_t, __whence: c_int) c_int; |
| 2144 | |
| 2145 | /// int fsetpos(FILE *stream, const fpos_t *pos); |
| 2146 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fsetpos.html |
| 2147 | // pub extern fn fsetpos(__stream: [*c]FILE, __pos: [*c]const fpos_t) c_int; |
| 2148 | |
| 2149 | /// int fstat(int fildes, struct stat *buf); |
| 2150 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fstat.html |
| 2151 | pub extern fn fstat(fd: c_int, buf: *struct_stat) c_int; |
| 2152 | |
| 2153 | /// int fstatat(int fd, const char *restrict path, struct stat *restrict buf, int flag); |
| 2154 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fstatat.html |
| 2155 | pub extern fn fstatat(fd: c_int, noalias path: [*:0]const u8, noalias buf: *struct_stat, flag: c_int) c_int; |
| 2156 | |
| 2157 | /// int fstatvfs(int fildes, struct statvfs *buf); |
| 2158 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fstatvfs.html |
| 2159 | // pub extern fn fstatvfs(__fildes: c_int, __buf: [*c]struct_statvfs) c_int; |
| 2160 | |
| 2161 | /// int fsync(int fildes); |
| 2162 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fsync.html |
| 2163 | pub extern fn fsync(fd: c_int) c_int; |
| 2164 | |
| 2165 | /// long ftell(FILE *stream); |
| 2166 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ftell.html |
| 2167 | pub extern fn ftell(__stream: [*c]FILE) c_long; |
| 2168 | |
| 2169 | /// off_t ftello(FILE *stream); |
| 2170 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ftello.html |
| 2171 | // pub extern fn ftello(__stream: [*c]FILE) off_t; |
| 2172 | |
| 2173 | /// key_t ftok(const char *path, int id); |
| 2174 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ftok.html |
| 2175 | // pub extern fn ftok(__pathname: [*c]const u8, __proj_id: c_int) key_t; |
| 2176 | |
| 2177 | /// int ftruncate(int fildes, off_t length); |
| 2178 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ftruncate.html |
| 2179 | // pub extern fn ftruncate(__fd: c_int, __length: off_t) c_int; |
| 2180 | |
| 2181 | /// int ftrylockfile(FILE *file); |
| 2182 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ftrylockfile.html |
| 2183 | pub extern fn ftrylockfile(__stream: [*c]FILE) c_int; |
| 2184 | |
| 2185 | /// int ftw(const char *path, int (*fn)(const char *, const struct stat *ptr, int flag), int ndirs); |
| 2186 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ftw.html |
| 2187 | // pub extern fn ftw(__dir: [*c]const u8, __func: __ftw_func_t, __descriptors: c_int) c_int; |
| 2188 | |
| 2189 | /// void funlockfile(FILE *file); |
| 2190 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/funlockfile.html |
| 2191 | pub extern fn funlockfile(__stream: [*c]FILE) void; |
| 2192 | |
| 2193 | /// int futimens(int fd, const struct timespec times[2]); |
| 2194 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/futimens.html |
| 2195 | pub extern fn futimens(fd: c_int, times: *const [2]struct_timespec) c_int; |
| 2196 | |
| 2197 | /// int fwide(FILE *stream, int mode); |
| 2198 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fwide.html |
| 2199 | // pub extern fn fwide(__fp: [*c]__FILE, __mode: c_int) c_int; |
| 2200 | |
| 2201 | /// int fwprintf(FILE *restrict stream, const wchar_t *restrict format, ...); |
| 2202 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fwprintf.html |
| 2203 | // pub extern fn fwprintf(noalias __stream: [*c]__FILE, noalias __format: [*c]const wchar_t, ...) c_int; |
| 2204 | |
| 2205 | /// size_t fwrite(const void *restrict ptr, size_t size, size_t nitems, FILE *restrict stream); |
| 2206 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fwrite.html |
| 2207 | pub extern fn fwrite(__ptr: ?*const anyopaque, __size: c_ulong, __n: c_ulong, __s: [*c]FILE) c_ulong; |
| 2208 | |
| 2209 | /// int fwscanf(FILE *restrict stream, const wchar_t *restrict format, ...); |
| 2210 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/fwscanf.html |
| 2211 | // pub extern fn fwscanf(noalias __stream: [*c]__FILE, noalias __format: [*c]const wchar_t, ...) c_int; |
| 2212 | |
| 2213 | /// const char *gai_strerror(int ecode); |
| 2214 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/gai_strerror.html |
| 2215 | pub extern fn gai_strerror(__ecode: c_int) [*c]const u8; |
| 2216 | |
| 2217 | /// int getaddrinfo(const char *restrict nodename, const char *restrict servname, const struct addrinfo *restrict hints, struct addrinfo **restrict res); |
| 2218 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getaddrinfo.html |
| 2219 | pub extern fn getaddrinfo(noalias nodename: ?[*:0]const u8, noalias servname: ?[*:0]const u8, noalias req: ?*const struct_addrinfo, noalias pai: **const struct_addrinfo) c_int; |
| 2220 | |
| 2221 | /// int getc(FILE *stream); |
| 2222 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getc.html |
| 2223 | pub extern fn getc(__stream: [*c]FILE) c_int; |
| 2224 | |
| 2225 | /// int getc_unlocked(FILE *stream); |
| 2226 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getc_unlocked.html |
| 2227 | pub extern fn getc_unlocked(__stream: [*c]FILE) c_int; |
| 2228 | |
| 2229 | /// int getchar(void); |
| 2230 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getchar.html |
| 2231 | pub extern fn getchar() c_int; |
| 2232 | |
| 2233 | /// int getchar_unlocked(void); |
| 2234 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getchar_unlocked.html |
| 2235 | pub extern fn getchar_unlocked() c_int; |
| 2236 | |
| 2237 | /// char *getcwd(char *buf, size_t size); |
| 2238 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getcwd.html |
| 2239 | pub extern fn getcwd(buf: [*]u8, size: usize) ?[*:0]u8; |
| 2240 | |
| 2241 | /// struct tm *getdate(const char *string); |
| 2242 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getdate.html |
| 2243 | pub const getdate = @compileError("TODO getdate"); |
| 2244 | |
| 2245 | /// ssize_t getdelim(char **restrict lineptr, size_t *restrict n, int delimiter, FILE *restrict stream); |
| 2246 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getdelim.html |
| 2247 | pub extern fn getdelim(noalias __lineptr: [*c][*c]u8, noalias __n: [*c]usize, __delimiter: c_int, noalias __stream: [*c]FILE) isize; |
| 2248 | |
| 2249 | /// gid_t getegid(void); |
| 2250 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getegid.html |
| 2251 | pub extern fn getegid() gid_t; |
| 2252 | |
| 2253 | /// char *getenv(const char *name); |
| 2254 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getenv.html |
| 2255 | pub extern fn getenv(name: [*:0]const u8) ?[*:0]u8; |
| 2256 | |
| 2257 | /// uid_t geteuid(void); |
| 2258 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/geteuid.html |
| 2259 | pub extern fn geteuid() uid_t; |
| 2260 | |
| 2261 | /// gid_t getgid(void); |
| 2262 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getgid.html |
| 2263 | pub extern fn getgid() gid_t; |
| 2264 | |
| 2265 | /// struct group *getgrent(void); |
| 2266 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getgrent.html |
| 2267 | pub extern fn getgrent() ?*struct_group; |
| 2268 | |
| 2269 | /// struct group *getgrgid(gid_t gid); |
| 2270 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getgrgid.html |
| 2271 | pub extern fn getgrgid(gid: gid_t) ?*struct_group; |
| 2272 | |
| 2273 | /// int getgrgid_r(gid_t gid, struct group *grp, char *buffer, size_t bufsize, struct group **result); |
| 2274 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getgrgid_r.html |
| 2275 | pub extern fn getgrgid_r(__gid: gid_t, noalias __resultbuf: [*c]struct_group, noalias __buffer: [*c]u8, __buflen: usize, noalias __result: [*c][*c]struct_group) c_int; |
| 2276 | |
| 2277 | /// struct group *getgrnam(const char *name); |
| 2278 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getgrnam.html |
| 2279 | pub extern fn getgrnam(name: [*:0]const u8) ?*struct_group; |
| 2280 | |
| 2281 | /// int getgrnam_r(const char *name, struct group *grp, char *buffer, size_t bufsize, struct group **result); |
| 2282 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getgrnam_r.html |
| 2283 | pub extern fn getgrnam_r(noalias __name: [*c]const u8, noalias __resultbuf: [*c]struct_group, noalias __buffer: [*c]u8, __buflen: usize, noalias __result: [*c][*c]struct_group) c_int; |
| 2284 | |
| 2285 | /// int getgroups(int gidsetsize, gid_t grouplist[]); |
| 2286 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getgroups.html |
| 2287 | pub extern fn getgroups(__size: c_int, __list: [*c]gid_t) c_int; |
| 2288 | |
| 2289 | /// struct hostent *gethostent(void); |
| 2290 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/gethostent.html |
| 2291 | pub extern fn gethostent() ?*struct_hostent; |
| 2292 | |
| 2293 | /// long gethostid(void); |
| 2294 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/gethostid.html |
| 2295 | pub extern fn gethostid() c_long; |
| 2296 | |
| 2297 | /// int gethostname(char *name, size_t namelen); |
| 2298 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/gethostname.html |
| 2299 | pub extern fn gethostname(name: [*:0]u8, len: usize) c_int; |
| 2300 | |
| 2301 | /// int getitimer(int which, struct itimerval *value); |
| 2302 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getitimer.html |
| 2303 | // pub extern fn getitimer(__which: __itimer_which_t, __value: [*c]struct_itimerval) c_int; |
| 2304 | |
| 2305 | /// ssize_t getline(char **restrict lineptr, size_t *restrict n, FILE *restrict stream); |
| 2306 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getline.html |
| 2307 | pub extern fn getline(noalias __lineptr: [*c][*c]u8, noalias __n: [*c]usize, noalias __stream: [*c]FILE) isize; |
| 2308 | |
| 2309 | /// char *getlogin(void); |
| 2310 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getlogin.html |
| 2311 | pub extern fn getlogin() ?[*:0]u8; |
| 2312 | |
| 2313 | /// int getlogin_r(char *name, size_t namesize); |
| 2314 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getlogin_r.html |
| 2315 | pub extern fn getlogin_r(__name: [*c]u8, __name_len: usize) c_int; |
| 2316 | |
| 2317 | /// int getmsg(int fildes, struct strbuf *restrict ctlptr, struct strbuf *restrict dataptr, int *restrict flagsp); |
| 2318 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getmsg.html |
| 2319 | pub const getmsg = @compileError("TODO getmsg"); |
| 2320 | |
| 2321 | /// int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen, char *restrict node, socklen_t nodelen, char *restrict service, socklen_t servicelen, int flags); |
| 2322 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getnameinfo.html |
| 2323 | pub extern fn getnameinfo(noalias __sa: [*c]const struct_sockaddr, __salen: socklen_t, noalias __host: [*c]u8, __hostlen: socklen_t, noalias __serv: [*c]u8, __servlen: socklen_t, __flags: c_int) c_int; |
| 2324 | |
| 2325 | /// struct netent *getnetbyaddr(uint32_t net, int type); |
| 2326 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getnetbyaddr.html |
| 2327 | pub extern fn getnetbyaddr(net: u32, type: c_int) ?*struct_netent; |
| 2328 | |
| 2329 | /// struct netent *getnetbyname(const char *name); |
| 2330 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getnetbyname.html |
| 2331 | pub extern fn getnetbyname(name: [*:0]const u8) ?*struct_netent; |
| 2332 | |
| 2333 | /// struct netent *getnetent(void); |
| 2334 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getnetent.html |
| 2335 | pub extern fn getnetent() ?*struct_netent; |
| 2336 | |
| 2337 | /// int getopt(int argc, char * const argv[], const char *optstring); |
| 2338 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getopt.html |
| 2339 | pub extern fn getopt(___argc: c_int, ___argv: [*c]const [*c]u8, __shortopts: [*c]const u8) c_int; |
| 2340 | |
| 2341 | /// int getpeername(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len); |
| 2342 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getpeername.html |
| 2343 | pub extern fn getpeername(__fd: c_int, noalias __addr: [*c]struct_sockaddr, noalias __len: [*c]socklen_t) c_int; |
| 2344 | |
| 2345 | /// pid_t getpgid(pid_t pid); |
| 2346 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getpgid.html |
| 2347 | pub extern fn getpgid(pid: pid_t) pid_t; |
| 2348 | |
| 2349 | /// pid_t getpgrp(void); |
| 2350 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getpgrp.html |
| 2351 | pub extern fn getpgrp() pid_t; |
| 2352 | |
| 2353 | /// pid_t getpid(void); |
| 2354 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getpid.html |
| 2355 | pub extern fn getpid() pid_t; |
| 2356 | |
| 2357 | /// int getpmsg(int fildes, struct strbuf *restrict ctlptr, struct strbuf *restrict dataptr, int *restrict bandp, int *restrict flagsp); |
| 2358 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getpmsg.html |
| 2359 | pub const getpmsg = @compileError("TODO getpmsg"); |
| 2360 | |
| 2361 | /// pid_t getppid(void); |
| 2362 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getppid.html |
| 2363 | pub extern fn getppid() pid_t; |
| 2364 | |
| 2365 | /// int getpriority(int which, id_t who); |
| 2366 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getpriority.html |
| 2367 | // pub extern fn getpriority(__which: __priority_which_t, __who: id_t) c_int; |
| 2368 | |
| 2369 | /// struct protoent *getprotobyname(const char *name); |
| 2370 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getprotobyname.html |
| 2371 | pub extern fn getprotobyname(name: [*:0]const u8) ?*struct_protoent; |
| 2372 | |
| 2373 | /// struct protoent *getprotobynumber(int proto); |
| 2374 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getprotobynumber.html |
| 2375 | pub extern fn getprotobynumber(proto: c_int) ?*struct_protoent; |
| 2376 | |
| 2377 | /// struct protoent *getprotoent(void); |
| 2378 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getprotoent.html |
| 2379 | pub extern fn getprotoent() ?*struct_protoent; |
| 2380 | |
| 2381 | /// struct passwd *getpwent(void); |
| 2382 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getpwent.html |
| 2383 | pub extern fn getpwent() ?*struct_passwd; |
| 2384 | |
| 2385 | /// struct passwd *getpwnam(const char *name); |
| 2386 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getpwnam.html |
| 2387 | pub extern fn getpwnam(name: [*:0]const u8) ?*struct_passwd; |
| 2388 | |
| 2389 | /// int getpwnam_r(const char *name, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result); |
| 2390 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getpwnam_r.html |
| 2391 | pub extern fn getpwnam_r(noalias __name: [*c]const u8, noalias __resultbuf: [*c]struct_passwd, noalias __buffer: [*c]u8, __buflen: usize, noalias __result: [*c][*c]struct_passwd) c_int; |
| 2392 | |
| 2393 | /// struct passwd *getpwuid(uid_t uid); |
| 2394 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getpwuid.html |
| 2395 | pub extern fn getpwuid(uid: uid_t) ?*struct_passwd; |
| 2396 | |
| 2397 | /// int getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result); |
| 2398 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getpwuid_r.html |
| 2399 | pub extern fn getpwuid_r(__uid: uid_t, noalias __resultbuf: [*c]struct_passwd, noalias __buffer: [*c]u8, __buflen: usize, noalias __result: [*c][*c]struct_passwd) c_int; |
| 2400 | |
| 2401 | /// int getrlimit(int resource, struct rlimit *rlp); |
| 2402 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getrlimit.html |
| 2403 | // pub extern fn getrlimit(__resource: __rlimit_resource_t, __rlimits: [*c]struct_rlimit) c_int; |
| 2404 | |
| 2405 | /// int getrusage(int who, struct rusage *r_usage); |
| 2406 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getrusage.html |
| 2407 | // pub extern fn getrusage(__who: __rusage_who_t, __usage: [*c]struct_rusage) c_int; |
| 2408 | |
| 2409 | /// char *gets(char *s); |
| 2410 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/gets.html |
| 2411 | pub extern fn gets(s: [*]u8) [*:0]u8; |
| 2412 | |
| 2413 | /// struct servent *getservbyname(const char *name, const char *proto); |
| 2414 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getservbyname.html |
| 2415 | pub extern fn getservbyname(__name: [*c]const u8, __proto: [*c]const u8) [*c]struct_servent; |
| 2416 | |
| 2417 | /// struct servent *getservbyport(int port, const char *proto); |
| 2418 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getservbyport.html |
| 2419 | pub extern fn getservbyport(__port: c_int, __proto: [*c]const u8) [*c]struct_servent; |
| 2420 | |
| 2421 | /// struct servent *getservent(void); |
| 2422 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getservent.html |
| 2423 | pub extern fn getservent() ?*struct_servent; |
| 2424 | |
| 2425 | /// pid_t getsid(pid_t pid); |
| 2426 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getsid.html |
| 2427 | pub extern fn getsid(pid: pid_t) pid_t; |
| 2428 | |
| 2429 | /// int getsockname(int socket, struct sockaddr *restrict address, socklen_t *restrict address_len); |
| 2430 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getsockname.html |
| 2431 | pub extern fn getsockname(fd: c_int, noalias addr: *struct_sockaddr, noalias len: *socklen_t) c_int; |
| 2432 | |
| 2433 | /// int getsockopt(int socket, int level, int option_name, void *restrict option_value, socklen_t *restrict option_len); |
| 2434 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getsockopt.html |
| 2435 | pub extern fn getsockopt(__fd: c_int, __level: c_int, __optname: c_int, noalias __optval: ?*anyopaque, noalias __optlen: [*c]socklen_t) c_int; |
| 2436 | |
| 2437 | /// int getsubopt(char **optionp, char * const *keylistp, char **valuep); |
| 2438 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getsubopt.html |
| 2439 | pub extern fn getsubopt(noalias __optionp: [*c][*c]u8, noalias __tokens: [*c]const [*c]u8, noalias __valuep: [*c][*c]u8) c_int; |
| 2440 | |
| 2441 | /// int gettimeofday(struct timeval *restrict tp, void *restrict tzp); |
| 2442 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/gettimeofday.html |
| 2443 | // pub extern fn gettimeofday(noalias __tv: [*c]struct_timeval, noalias __tz: ?*anyopaque) c_int; |
| 2444 | |
| 2445 | /// uid_t getuid(void); |
| 2446 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getuid.html |
| 2447 | pub extern fn getuid() uid_t; |
| 2448 | |
| 2449 | /// struct utmpx *getutxent(void); |
| 2450 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getutxent.html |
| 2451 | pub extern fn getutxent() ?*struct_utmpx; |
| 2452 | |
| 2453 | /// struct utmpx *getutxid(const struct utmpx *id); |
| 2454 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getutxid.html |
| 2455 | pub extern fn getutxid(__id: [*c]const struct_utmpx) [*c]struct_utmpx; |
| 2456 | |
| 2457 | /// struct utmpx *getutxline(const struct utmpx *line); |
| 2458 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getutxline.html |
| 2459 | pub extern fn getutxline(__line: [*c]const struct_utmpx) [*c]struct_utmpx; |
| 2460 | |
| 2461 | /// wint_t getwc(FILE *stream); |
| 2462 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getwc.html |
| 2463 | // pub extern fn getwc(__stream: [*c]__FILE) wint_t; |
| 2464 | |
| 2465 | /// wint_t getwchar(void); |
| 2466 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/getwchar.html |
| 2467 | pub extern fn getwchar() wint_t; |
| 2468 | |
| 2469 | /// int glob(const char *restrict pattern, int flags, int(*errfunc)(const char *epath, int eerrno), glob_t *restrict pglob); |
| 2470 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/glob.html |
| 2471 | // pub extern fn glob(noalias __pattern: [*c]const u8, __flags: c_int, __errfunc: ?*const fn ([*c]const u8, c_int) callconv(.C) c_int, noalias __pglob: [*c]glob_t) c_int; |
| 2472 | |
| 2473 | /// void globfree(glob_t *pglob); |
| 2474 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/globfree.html |
| 2475 | // pub extern fn globfree(__pglob: [*c]glob_t) void; |
| 2476 | |
| 2477 | /// struct tm *gmtime(const time_t *timer); |
| 2478 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/gmtime.html |
| 2479 | // pub extern fn gmtime(__timer: [*c]const time_t) [*c]struct_tm; |
| 2480 | |
| 2481 | /// struct tm *gmtime_r(const time_t *restrict timer, struct tm *restrict result); |
| 2482 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/gmtime_r.html |
| 2483 | // pub extern fn gmtime_r(noalias __timer: [*c]const time_t, noalias __tp: [*c]struct_tm) [*c]struct_tm; |
| 2484 | |
| 2485 | /// int grantpt(int fildes); |
| 2486 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/grantpt.html |
| 2487 | pub extern fn grantpt(fd: c_int) c_int; |
| 2488 | |
| 2489 | /// int hcreate(size_t nel); |
| 2490 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/hcreate.html |
| 2491 | pub extern fn hcreate(nel: usize) c_int; |
| 2492 | |
| 2493 | /// void hdestroy(void); |
| 2494 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/hdestroy.html |
| 2495 | pub extern fn hdestroy() void; |
| 2496 | |
| 2497 | /// ENTRY *hsearch(ENTRY item, ACTION action); |
| 2498 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/hsearch.html |
| 2499 | // pub extern fn hsearch(__item: ENTRY, __action: ACTION) [*c]ENTRY; |
| 2500 | |
| 2501 | /// uint32_t htonl(uint32_t hostlong); |
| 2502 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/htonl.html |
| 2503 | pub extern fn htonl(hostlong: u32) u32; |
| 2504 | |
| 2505 | /// uint16_t htons(uint16_t hostshort); |
| 2506 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/htons.html |
| 2507 | pub extern fn htons(hostshort: u16) u16; |
| 2508 | |
| 2509 | /// double hypot(double x, double y); |
| 2510 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/hypot.html |
| 2511 | pub extern fn hypot(x: f64, y: f64) f64; |
| 2512 | |
| 2513 | /// float hypotf(float x, float y); |
| 2514 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/hypotf.html |
| 2515 | pub extern fn hypotf(x: f32, y: f32) f32; |
| 2516 | |
| 2517 | /// long double hypotl(long double x, long double y); |
| 2518 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/hypotl.html |
| 2519 | pub extern fn hypotl(x: c_longdouble, y: c_longdouble) c_longdouble; |
| 2520 | |
| 2521 | /// size_t iconv(iconv_t cd, char **restrict inbuf, size_t *restrict inbytesleft, char **restrict outbuf, size_t *restrict outbytesleft); |
| 2522 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iconv.html |
| 2523 | // pub extern fn iconv(__cd: iconv_t, noalias __inbuf: [*c][*c]u8, noalias __inbytesleft: [*c]usize, noalias __outbuf: [*c][*c]u8, noalias __outbytesleft: [*c]usize) usize; |
| 2524 | |
| 2525 | /// int iconv_close(iconv_t cd); |
| 2526 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iconv_close.html |
| 2527 | // pub extern fn iconv_close(__cd: iconv_t) c_int; |
| 2528 | |
| 2529 | /// iconv_t iconv_open(const char *tocode, const char *fromcode); |
| 2530 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iconv_open.html |
| 2531 | // pub extern fn iconv_open(__tocode: [*c]const u8, __fromcode: [*c]const u8) iconv_t; |
| 2532 | |
| 2533 | /// void if_freenameindex(struct if_nameindex *ptr); |
| 2534 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/if_freenameindex.html |
| 2535 | pub extern fn if_freenameindex(ptr: *struct_if_nameindex) void; |
| 2536 | |
| 2537 | /// char *if_indextoname(unsigned ifindex, char *ifname); |
| 2538 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/if_indextoname.html |
| 2539 | pub extern fn if_indextoname(__ifindex: c_uint, __ifname: [*c]u8) [*c]u8; |
| 2540 | |
| 2541 | /// struct if_nameindex *if_nameindex(void); |
| 2542 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/if_nameindex.html |
| 2543 | pub extern fn if_nameindex() ?*struct_if_nameindex; |
| 2544 | |
| 2545 | /// unsigned if_nametoindex(const char *ifname); |
| 2546 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/if_nametoindex.html |
| 2547 | pub extern fn if_nametoindex(ifname: [*:0]const u8) c_uint; |
| 2548 | |
| 2549 | /// int ilogb(double x); |
| 2550 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ilogb.html |
| 2551 | pub extern fn ilogb(x: f64) c_int; |
| 2552 | |
| 2553 | /// int ilogbf(float x); |
| 2554 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ilogbf.html |
| 2555 | pub extern fn ilogbf(x: f32) c_int; |
| 2556 | |
| 2557 | /// int ilogbl(long double x); |
| 2558 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ilogbl.html |
| 2559 | pub extern fn ilogbl(x: c_longdouble) c_int; |
| 2560 | |
| 2561 | /// intmax_t imaxabs(intmax_t j); |
| 2562 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/imaxabs.html |
| 2563 | pub extern fn imaxabs(j: intmax_t) intmax_t; |
| 2564 | |
| 2565 | /// imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom); |
| 2566 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/imaxdiv.html |
| 2567 | // pub extern fn imaxdiv(__numer: intmax_t, __denom: intmax_t) imaxdiv_t; |
| 2568 | |
| 2569 | /// in_addr_t inet_addr(const char *cp); |
| 2570 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/inet_addr.html |
| 2571 | // pub extern fn inet_addr(__cp: [*c]const u8) in_addr_t; |
| 2572 | |
| 2573 | /// char *inet_ntoa(struct in_addr in); |
| 2574 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/inet_ntoa.html |
| 2575 | // pub extern fn inet_ntoa(__in: struct_in_addr) [*c]u8; |
| 2576 | |
| 2577 | /// const char *inet_ntop(int af, const void *restrict src, char *restrict dst, socklen_t size); |
| 2578 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/inet_ntop.html |
| 2579 | pub extern fn inet_ntop(__af: c_int, noalias __cp: ?*const anyopaque, noalias __buf: [*c]u8, __len: socklen_t) [*c]const u8; |
| 2580 | |
| 2581 | /// int inet_pton(int af, const char *restrict src, void *restrict dst); |
| 2582 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/inet_pton.html |
| 2583 | pub extern fn inet_pton(__af: c_int, noalias __cp: [*c]const u8, noalias __buf: ?*anyopaque) c_int; |
| 2584 | |
| 2585 | /// char *initstate(unsigned seed, char *state, size_t size); |
| 2586 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/initstate.html |
| 2587 | pub extern fn initstate(__seed: c_uint, __statebuf: [*c]u8, __statelen: usize) [*c]u8; |
| 2588 | |
| 2589 | /// void insque(void *element, void *pred); |
| 2590 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/insque.html |
| 2591 | pub extern fn insque(elem: *anyopaque, prev: ?*anyopaque) void; |
| 2592 | |
| 2593 | /// int ioctl(int fildes, int request, ... /* arg */); |
| 2594 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ioctl.html |
| 2595 | pub const ioctl = @compileError("TODO ioctl"); |
| 2596 | |
| 2597 | /// int isalnum(int c); |
| 2598 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isalnum.html |
| 2599 | pub extern fn isalnum(c: c_int) c_int; |
| 2600 | |
| 2601 | /// int isalnum_l(int c, locale_t locale); |
| 2602 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isalnum_l.html |
| 2603 | pub extern fn isalnum_l(c: c_int, locale: locale_t) c_int; |
| 2604 | |
| 2605 | /// int isalpha(int c); |
| 2606 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isalpha.html |
| 2607 | pub extern fn isalpha(c: c_int) c_int; |
| 2608 | |
| 2609 | /// int isalpha_l(int c, locale_t locale); |
| 2610 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isalpha_l.html |
| 2611 | pub extern fn isalpha_l(c: c_int, locale: locale_t) c_int; |
| 2612 | |
| 2613 | /// int isascii(int c); |
| 2614 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isascii.html |
| 2615 | pub extern fn isascii(c: c_int) c_int; |
| 2616 | |
| 2617 | /// int isastream(int fildes); |
| 2618 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isastream.html |
| 2619 | pub extern fn isastream(fd: c_int) c_int; |
| 2620 | |
| 2621 | /// int isatty(int fildes); |
| 2622 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isatty.html |
| 2623 | pub extern fn isatty(fd: c_int) c_int; |
| 2624 | |
| 2625 | /// int isblank(int c); |
| 2626 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isblank.html |
| 2627 | pub extern fn isblank(c: c_int) c_int; |
| 2628 | |
| 2629 | /// int isblank_l(int c, locale_t locale); |
| 2630 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isblank_l.html |
| 2631 | pub extern fn isblank_l(c: c_int, locale: locale_t) c_int; |
| 2632 | |
| 2633 | /// int iscntrl(int c); |
| 2634 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iscntrl.html |
| 2635 | pub extern fn iscntrl(c: c_int) c_int; |
| 2636 | |
| 2637 | /// int iscntrl_l(int c, locale_t locale); |
| 2638 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iscntrl_l.html |
| 2639 | pub extern fn iscntrl_l(c: c_int, locale: locale_t) c_int; |
| 2640 | |
| 2641 | /// int isdigit(int c); |
| 2642 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isdigit.html |
| 2643 | pub extern fn isdigit(c: c_int) c_int; |
| 2644 | |
| 2645 | /// int isdigit_l(int c, locale_t locale); |
| 2646 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isdigit_l.html |
| 2647 | pub extern fn isdigit_l(c: c_int, locale: locale_t) c_int; |
| 2648 | |
| 2649 | /// int isgraph(int c); |
| 2650 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isgraph.html |
| 2651 | pub extern fn isgraph(c: c_int) c_int; |
| 2652 | |
| 2653 | /// int isgraph_l(int c, locale_t locale); |
| 2654 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isgraph_l.html |
| 2655 | pub extern fn isgraph_l(c: c_int, locale: locale_t) c_int; |
| 2656 | |
| 2657 | /// int islower(int c); |
| 2658 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/islower.html |
| 2659 | pub extern fn islower(c: c_int) c_int; |
| 2660 | |
| 2661 | /// int islower_l(int c, locale_t locale); |
| 2662 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/islower_l.html |
| 2663 | pub extern fn islower_l(c: c_int, locale: locale_t) c_int; |
| 2664 | |
| 2665 | /// int isprint(int c); |
| 2666 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isprint.html |
| 2667 | pub extern fn isprint(c: c_int) c_int; |
| 2668 | |
| 2669 | /// int isprint_l(int c, locale_t locale); |
| 2670 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isprint_l.html |
| 2671 | pub extern fn isprint_l(c: c_int, locale: locale_t) c_int; |
| 2672 | |
| 2673 | /// int ispunct(int c); |
| 2674 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ispunct.html |
| 2675 | pub extern fn ispunct(c: c_int) c_int; |
| 2676 | |
| 2677 | /// int ispunct_l(int c, locale_t locale); |
| 2678 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ispunct_l.html |
| 2679 | pub extern fn ispunct_l(c: c_int, locale: locale_t) c_int; |
| 2680 | |
| 2681 | /// int isspace(int c); |
| 2682 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isspace.html |
| 2683 | pub extern fn isspace(c: c_int) c_int; |
| 2684 | |
| 2685 | /// int isspace_l(int c, locale_t locale); |
| 2686 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isspace_l.html |
| 2687 | pub extern fn isspace_l(c: c_int, locale: locale_t) c_int; |
| 2688 | |
| 2689 | /// int isupper(int c); |
| 2690 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isupper.html |
| 2691 | pub extern fn isupper(c: c_int) c_int; |
| 2692 | |
| 2693 | /// int isupper_l(int c, locale_t locale); |
| 2694 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isupper_l.html |
| 2695 | pub extern fn isupper_l(c: c_int, locale: locale_t) c_int; |
| 2696 | |
| 2697 | /// int iswalnum(wint_t wc); |
| 2698 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswalnum.html |
| 2699 | pub extern fn iswalnum(wc: wint_t) c_int; |
| 2700 | |
| 2701 | /// int iswalnum_l(wint_t wc, locale_t locale); |
| 2702 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswalnum_l.html |
| 2703 | pub extern fn iswalnum_l(wc: wint_t, locale: locale_t) c_int; |
| 2704 | |
| 2705 | /// int iswalpha(wint_t wc); |
| 2706 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswalpha.html |
| 2707 | pub extern fn iswalpha(wc: wint_t) c_int; |
| 2708 | |
| 2709 | /// int iswalpha_l(wint_t wc, locale_t locale); |
| 2710 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswalpha_l.html |
| 2711 | pub extern fn iswalpha_l(wc: wint_t, locale: locale_t) c_int; |
| 2712 | |
| 2713 | /// int iswblank(wint_t wc); |
| 2714 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswblank.html |
| 2715 | pub extern fn iswblank(wc: wint_t) c_int; |
| 2716 | |
| 2717 | /// int iswblank_l(wint_t wc, locale_t locale); |
| 2718 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswblank_l.html |
| 2719 | pub extern fn iswblank_l(wc: wint_t, locale: locale_t) c_int; |
| 2720 | |
| 2721 | /// int iswcntrl(wint_t wc); |
| 2722 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswcntrl.html |
| 2723 | pub extern fn iswcntrl(wc: wint_t) c_int; |
| 2724 | |
| 2725 | /// int iswcntrl_l(wint_t wc, locale_t locale); |
| 2726 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswcntrl_l.html |
| 2727 | pub extern fn iswcntrl_l(wc: wint_t, locale: locale_t) c_int; |
| 2728 | |
| 2729 | /// int iswctype(wint_t wc, wctype_t charclass); |
| 2730 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswctype.html |
| 2731 | // pub extern fn iswctype(__wc: wint_t, __desc: wctype_t) c_int; |
| 2732 | |
| 2733 | /// int iswctype_l(wint_t wc, wctype_t charclass, locale_t locale); |
| 2734 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswctype_l.html |
| 2735 | // pub extern fn iswctype_l(__wc: wint_t, __desc: wctype_t, __locale: locale_t) c_int; |
| 2736 | |
| 2737 | /// int iswdigit(wint_t wc); |
| 2738 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswdigit.html |
| 2739 | pub extern fn iswdigit(wc: wint_t) c_int; |
| 2740 | |
| 2741 | /// int iswdigit_l(wint_t wc, locale_t locale); |
| 2742 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswdigit_l.html |
| 2743 | pub extern fn iswdigit_l(wc: wint_t, locale: locale_t) c_int; |
| 2744 | |
| 2745 | /// int iswgraph(wint_t wc); |
| 2746 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswgraph.html |
| 2747 | pub extern fn iswgraph(wc: wint_t) c_int; |
| 2748 | |
| 2749 | /// int iswgraph_l(wint_t wc, locale_t locale); |
| 2750 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswgraph_l.html |
| 2751 | pub extern fn iswgraph_l(wc: wint_t, locale: locale_t) c_int; |
| 2752 | |
| 2753 | /// int iswlower(wint_t wc); |
| 2754 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswlower.html |
| 2755 | pub extern fn iswlower(wc: wint_t) c_int; |
| 2756 | |
| 2757 | /// int iswlower_l(wint_t wc, locale_t locale); |
| 2758 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswlower_l.html |
| 2759 | pub extern fn iswlower_l(wc: wint_t, locale: locale_t) c_int; |
| 2760 | |
| 2761 | /// int iswprint(wint_t wc); |
| 2762 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswprint.html |
| 2763 | pub extern fn iswprint(wc: wint_t) c_int; |
| 2764 | |
| 2765 | /// int iswprint_l(wint_t wc, locale_t locale); |
| 2766 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswprint_l.html |
| 2767 | pub extern fn iswprint_l(wc: wint_t, locale: locale_t) c_int; |
| 2768 | |
| 2769 | /// int iswpunct(wint_t wc); |
| 2770 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswpunct.html |
| 2771 | pub extern fn iswpunct(wc: wint_t) c_int; |
| 2772 | |
| 2773 | /// int iswpunct_l(wint_t wc, locale_t locale); |
| 2774 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswpunct_l.html |
| 2775 | pub extern fn iswpunct_l(wc: wint_t, locale: locale_t) c_int; |
| 2776 | |
| 2777 | /// int iswspace(wint_t wc); |
| 2778 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswspace.html |
| 2779 | pub extern fn iswspace(wc: wint_t) c_int; |
| 2780 | |
| 2781 | /// int iswspace_l(wint_t wc, locale_t locale); |
| 2782 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswspace_l.html |
| 2783 | pub extern fn iswspace_l(wc: wint_t, locale: locale_t) c_int; |
| 2784 | |
| 2785 | /// int iswupper(wint_t wc); |
| 2786 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswupper.html |
| 2787 | pub extern fn iswupper(wc: wint_t) c_int; |
| 2788 | |
| 2789 | /// int iswupper_l(wint_t wc, locale_t locale); |
| 2790 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswupper_l.html |
| 2791 | pub extern fn iswupper_l(wc: wint_t, locale: locale_t) c_int; |
| 2792 | |
| 2793 | /// int iswxdigit(wint_t wc); |
| 2794 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswxdigit.html |
| 2795 | pub extern fn iswxdigit(wc: wint_t) c_int; |
| 2796 | |
| 2797 | /// int iswxdigit_l(wint_t wc, locale_t locale); |
| 2798 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/iswxdigit_l.html |
| 2799 | pub extern fn iswxdigit_l(wc: wint_t, locale: locale_t) c_int; |
| 2800 | |
| 2801 | /// int isxdigit(int c); |
| 2802 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isxdigit.html |
| 2803 | pub extern fn isxdigit(c: c_int) c_int; |
| 2804 | |
| 2805 | /// int isxdigit_l(int c, locale_t locale); |
| 2806 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/isxdigit_l.html |
| 2807 | pub extern fn isxdigit_l(c: c_int, locale: locale_t) c_int; |
| 2808 | |
| 2809 | /// double j0(double x); |
| 2810 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/j0.html |
| 2811 | pub extern fn j0(x: f64) f64; |
| 2812 | |
| 2813 | /// double j1(double x); |
| 2814 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/j1.html |
| 2815 | pub extern fn j1(x: f64) f64; |
| 2816 | |
| 2817 | /// double jn(int n, double x); |
| 2818 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/jn.html |
| 2819 | pub extern fn jn(n: c_int, x: f64) f64; |
| 2820 | |
| 2821 | /// long jrand48(unsigned short xsubi[3]); |
| 2822 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/jrand48.html |
| 2823 | pub extern fn jrand48(__xsubi: [*c]c_ushort) c_long; |
| 2824 | |
| 2825 | /// int kill(pid_t pid, int sig); |
| 2826 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/kill.html |
| 2827 | pub extern fn kill(pid: pid_t, sig: c_int) c_int; |
| 2828 | |
| 2829 | /// int killpg(pid_t pgrp, int sig); |
| 2830 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/killpg.html |
| 2831 | // pub extern fn killpg(__pgrp: __pid_t, __sig: c_int) c_int; |
| 2832 | |
| 2833 | /// char *l64a(long value); |
| 2834 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/l64a.html |
| 2835 | pub extern fn l64a(__n: c_long) [*c]u8; |
| 2836 | |
| 2837 | /// long labs(long i); |
| 2838 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/labs.html |
| 2839 | pub extern fn labs(i: c_long) c_long; |
| 2840 | |
| 2841 | /// int lchown(const char *path, uid_t owner, gid_t group); |
| 2842 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lchown.html |
| 2843 | pub extern fn lchown(__file: [*c]const u8, __owner: uid_t, __group: gid_t) c_int; |
| 2844 | |
| 2845 | /// void lcong48(unsigned short param[7]); |
| 2846 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lcong48.html |
| 2847 | pub extern fn lcong48(__param: [*c]c_ushort) void; |
| 2848 | |
| 2849 | /// double ldexp(double x, int exp); |
| 2850 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ldexp.html |
| 2851 | pub extern fn ldexp(x: f64, exp: c_int) f64; |
| 2852 | |
| 2853 | /// float ldexpf(float x, int exp); |
| 2854 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ldexpf.html |
| 2855 | pub extern fn ldexpf(x: f32, exp: c_int) f32; |
| 2856 | |
| 2857 | /// long double ldexpl(long double x, int exp); |
| 2858 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ldexpl.html |
| 2859 | pub extern fn ldexpl(__x: c_longdouble, __exponent: c_int) c_longdouble; |
| 2860 | |
| 2861 | /// ldiv_t ldiv(long numer, long denom); |
| 2862 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ldiv.html |
| 2863 | // pub extern fn ldiv(__numer: c_long, __denom: c_long) ldiv_t; |
| 2864 | |
| 2865 | /// void *lfind(const void *key, const void *base, size_t *nelp, size_t width, int (*compar)(const void *, const void *)); |
| 2866 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lfind.html |
| 2867 | // pub extern fn lfind(__key: ?*const anyopaque, __base: ?*const anyopaque, __nmemb: [*c]usize, __size: usize, __compar: __compar_fn_t) ?*anyopaque; |
| 2868 | |
| 2869 | /// double lgamma(double x); |
| 2870 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lgamma.html |
| 2871 | pub extern fn lgamma(x: f64) f64; |
| 2872 | |
| 2873 | /// float lgammaf(float x); |
| 2874 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lgammaf.html |
| 2875 | pub extern fn lgammaf(x: f32) f32; |
| 2876 | |
| 2877 | /// long double lgammal(long double x); |
| 2878 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lgammal.html |
| 2879 | pub extern fn lgammal(x: c_longdouble) c_longdouble; |
| 2880 | |
| 2881 | /// int link(const char *path1, const char *path2); |
| 2882 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/link.html |
| 2883 | pub extern fn link(__from: [*c]const u8, __to: [*c]const u8) c_int; |
| 2884 | |
| 2885 | /// int linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); |
| 2886 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/linkat.html |
| 2887 | pub extern fn linkat(__fromfd: c_int, __from: [*c]const u8, __tofd: c_int, __to: [*c]const u8, __flags: c_int) c_int; |
| 2888 | |
| 2889 | /// int lio_listio(int mode, struct aiocb *restrict const list[restrict], int nent, struct sigevent *restrict sig); |
| 2890 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lio_listio.html |
| 2891 | // pub extern fn lio_listio(__mode: c_int, noalias __list: [*c]const [*c]struct_aiocb, __nent: c_int, noalias __sig: [*c]struct_sigevent) c_int; |
| 2892 | |
| 2893 | /// int listen(int socket, int backlog); |
| 2894 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/listen.html |
| 2895 | pub extern fn listen(socket: c_int, backlog: c_int) c_int; |
| 2896 | |
| 2897 | /// long long llabs(long long i); |
| 2898 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/llabs.html |
| 2899 | pub extern fn llabs(x: c_longlong) c_longlong; |
| 2900 | |
| 2901 | /// lldiv_t lldiv(long long numer, long long denom); |
| 2902 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lldiv.html |
| 2903 | // pub extern fn lldiv(__numer: c_longlong, __denom: c_longlong) lldiv_t; |
| 2904 | |
| 2905 | /// long long llrint(double x); |
| 2906 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/llrint.html |
| 2907 | pub extern fn llrint(x: f64) c_longlong; |
| 2908 | |
| 2909 | /// long long llrintf(float x); |
| 2910 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/llrintf.html |
| 2911 | pub extern fn llrintf(x: f32) c_longlong; |
| 2912 | |
| 2913 | /// long long llrintl(long double x); |
| 2914 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/llrintl.html |
| 2915 | pub extern fn llrintl(x: c_longdouble) c_longlong; |
| 2916 | |
| 2917 | /// long long llround(double x); |
| 2918 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/llround.html |
| 2919 | pub extern fn llround(x: f64) c_longlong; |
| 2920 | |
| 2921 | /// long long llroundf(float x); |
| 2922 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/llroundf.html |
| 2923 | pub extern fn llroundf(x: f32) c_longlong; |
| 2924 | |
| 2925 | /// long long llroundl(long double x); |
| 2926 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/llroundl.html |
| 2927 | pub extern fn llroundl(x: c_longdouble) c_longlong; |
| 2928 | |
| 2929 | /// struct lconv *localeconv(void); |
| 2930 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/localeconv.html |
| 2931 | pub extern fn localeconv() *struct_lconv; |
| 2932 | |
| 2933 | /// struct tm *localtime(const time_t *timer); |
| 2934 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/localtime.html |
| 2935 | // pub extern fn localtime(__timer: [*c]const time_t) [*c]struct_tm; |
| 2936 | |
| 2937 | /// struct tm *localtime_r(const time_t *restrict timer, struct tm *restrict result); |
| 2938 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/localtime_r.html |
| 2939 | // pub extern fn localtime_r(noalias __timer: [*c]const time_t, noalias __tp: [*c]struct_tm) [*c]struct_tm; |
| 2940 | |
| 2941 | /// int lockf(int fildes, int function, off_t size); |
| 2942 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lockf.html |
| 2943 | // pub extern fn lockf(__fd: c_int, __cmd: c_int, __len: off_t) c_int; |
| 2944 | |
| 2945 | /// double log(double x); |
| 2946 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/log.html |
| 2947 | pub extern fn log(x: f64) f64; |
| 2948 | |
| 2949 | /// double log1p(double x); |
| 2950 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/log1p.html |
| 2951 | pub extern fn log1p(x: f64) f64; |
| 2952 | |
| 2953 | /// float log1pf(float x); |
| 2954 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/log1pf.html |
| 2955 | pub extern fn log1pf(x: f32) f32; |
| 2956 | |
| 2957 | /// long double log1pl(long double x); |
| 2958 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/log1pl.html |
| 2959 | pub extern fn log1pl(x: c_longdouble) c_longdouble; |
| 2960 | |
| 2961 | /// double log2(double x); |
| 2962 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/log2.html |
| 2963 | pub extern fn log2(x: f64) f64; |
| 2964 | |
| 2965 | /// float log2f(float x); |
| 2966 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/log2f.html |
| 2967 | pub extern fn log2f(x: f32) f32; |
| 2968 | |
| 2969 | /// long double log2l(long double x); |
| 2970 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/log2l.html |
| 2971 | pub extern fn log2l(x: c_longdouble) c_longdouble; |
| 2972 | |
| 2973 | /// double log10(double x); |
| 2974 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/log10.html |
| 2975 | pub extern fn log10(x: f64) f64; |
| 2976 | |
| 2977 | /// float log10f(float x); |
| 2978 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/log10f.html |
| 2979 | pub extern fn log10f(x: f32) f32; |
| 2980 | |
| 2981 | /// long double log10l(long double x); |
| 2982 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/log10l.html |
| 2983 | pub extern fn log10l(x: c_longdouble) c_longdouble; |
| 2984 | |
| 2985 | /// double logb(double x); |
| 2986 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/logb.html |
| 2987 | pub extern fn logb(x: f64) f64; |
| 2988 | |
| 2989 | /// float logbf(float x); |
| 2990 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/logbf.html |
| 2991 | pub extern fn logbf(x: f32) f32; |
| 2992 | |
| 2993 | /// long double logbl(long double x); |
| 2994 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/logbl.html |
| 2995 | pub extern fn logbl(x: c_longdouble) c_longdouble; |
| 2996 | |
| 2997 | /// float logf(float x); |
| 2998 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/logf.html |
| 2999 | pub extern fn logf(x: f32) f32; |
| 3000 | |
| 3001 | /// long double logl(long double x); |
| 3002 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/logl.html |
| 3003 | pub extern fn logl(x: c_longdouble) c_longdouble; |
| 3004 | |
| 3005 | /// long lrand48(void); |
| 3006 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lrand48.html |
| 3007 | pub extern fn lrand48() c_long; |
| 3008 | |
| 3009 | /// long lrint(double x); |
| 3010 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lrint.html |
| 3011 | pub extern fn lrint(x: f64) c_long; |
| 3012 | |
| 3013 | /// long lrintf(float x); |
| 3014 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lrintf.html |
| 3015 | pub extern fn lrintf(x: f32) c_long; |
| 3016 | |
| 3017 | /// long lrintl(long double x); |
| 3018 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lrintl.html |
| 3019 | pub extern fn lrintl(x: c_longdouble) c_long; |
| 3020 | |
| 3021 | /// long lround(double x); |
| 3022 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lround.html |
| 3023 | pub extern fn lround(x: f64) c_long; |
| 3024 | |
| 3025 | /// long lroundf(float x); |
| 3026 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lroundf.html |
| 3027 | pub extern fn lroundf(x: f32) c_long; |
| 3028 | |
| 3029 | /// long lroundl(long double x); |
| 3030 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lroundl.html |
| 3031 | pub extern fn lroundl(x: c_longdouble) c_long; |
| 3032 | |
| 3033 | /// void *lsearch(const void *key, void *base, size_t *nelp, size_t width, int (*compar)(const void *, const void *)); |
| 3034 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lsearch.html |
| 3035 | // pub extern fn lsearch(__key: ?*const anyopaque, __base: ?*anyopaque, __nmemb: [*c]usize, __size: usize, __compar: __compar_fn_t) ?*anyopaque; |
| 3036 | |
| 3037 | /// off_t lseek(int fildes, off_t offset, int whence); |
| 3038 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lseek.html |
| 3039 | pub extern fn lseek(fd: c_int, offset: off_t, whence: c_int) off_t; |
| 3040 | |
| 3041 | /// int lstat(const char *restrict path, struct stat *restrict buf); |
| 3042 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/lstat.html |
| 3043 | // pub extern fn lstat(noalias __file: [*c]const u8, noalias __buf: [*c]struct_stat) c_int; |
| 3044 | |
| 3045 | /// void *malloc(size_t size); |
| 3046 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/malloc.html |
| 3047 | pub extern fn malloc(size: usize) ?*anyopaque; |
| 3048 | |
| 3049 | /// int mblen(const char *s, size_t n); |
| 3050 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mblen.html |
| 3051 | pub extern fn mblen(__s: [*c]const u8, __n: usize) c_int; |
| 3052 | |
| 3053 | /// size_t mbrlen(const char *restrict s, size_t n, mbstate_t *restrict ps); |
| 3054 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mbrlen.html |
| 3055 | // pub extern fn mbrlen(noalias __s: [*c]const u8, __n: usize, noalias __ps: [*c]mbstate_t) usize; |
| 3056 | |
| 3057 | /// size_t mbrtowc(wchar_t *restrict pwc, const char *restrict s, size_t n, mbstate_t *restrict ps); |
| 3058 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mbrtowc.html |
| 3059 | // pub extern fn mbrtowc(noalias __pwc: [*c]wchar_t, noalias __s: [*c]const u8, __n: usize, noalias __p: [*c]mbstate_t) usize; |
| 3060 | |
| 3061 | /// int mbsinit(const mbstate_t *ps); |
| 3062 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mbsinit.html |
| 3063 | // pub extern fn mbsinit(__ps: [*c]const mbstate_t) c_int; |
| 3064 | |
| 3065 | /// size_t mbsnrtowcs(wchar_t *restrict dst, const char **restrict src, size_t nmc, size_t len, mbstate_t *restrict ps); |
| 3066 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mbsnrtowcs.html |
| 3067 | // pub extern fn mbsnrtowcs(noalias __dst: [*c]wchar_t, noalias __src: [*c][*c]const u8, __nmc: usize, __len: usize, noalias __ps: [*c]mbstate_t) usize; |
| 3068 | |
| 3069 | /// size_t mbsrtowcs(wchar_t *restrict dst, const char **restrict src, size_t len, mbstate_t *restrict ps); |
| 3070 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mbsrtowcs.html |
| 3071 | // pub extern fn mbsrtowcs(noalias __dst: [*c]wchar_t, noalias __src: [*c][*c]const u8, __len: usize, noalias __ps: [*c]mbstate_t) usize; |
| 3072 | |
| 3073 | /// size_t mbstowcs(wchar_t *restrict pwcs, const char *restrict s, size_t n); |
| 3074 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mbstowcs.html |
| 3075 | pub extern fn mbstowcs(noalias __pwcs: [*c]wchar_t, noalias __s: [*c]const u8, __n: usize) usize; |
| 3076 | |
| 3077 | /// int mbtowc(wchar_t *restrict pwc, const char *restrict s, size_t n); |
| 3078 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mbtowc.html |
| 3079 | pub extern fn mbtowc(noalias __pwc: [*c]wchar_t, noalias __s: [*c]const u8, __n: usize) c_int; |
| 3080 | |
| 3081 | /// void *memccpy(void *restrict s1, const void *restrict s2, int c, size_t n); |
| 3082 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/memccpy.html |
| 3083 | pub extern fn memccpy(__dest: ?*anyopaque, __src: ?*const anyopaque, __c: c_int, __n: c_ulong) ?*anyopaque; |
| 3084 | |
| 3085 | /// void *memchr(const void *s, int c, size_t n); |
| 3086 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/memchr.html |
| 3087 | pub extern fn memchr(__s: ?*const anyopaque, __c: c_int, __n: c_ulong) ?*anyopaque; |
| 3088 | |
| 3089 | /// int memcmp(const void *s1, const void *s2, size_t n); |
| 3090 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/memcmp.html |
| 3091 | pub extern fn memcmp(__s1: ?*const anyopaque, __s2: ?*const anyopaque, __n: c_ulong) c_int; |
| 3092 | |
| 3093 | /// void *memcpy(void *restrict s1, const void *restrict s2, size_t n); |
| 3094 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/memcpy.html |
| 3095 | pub extern fn memcpy(__dest: ?*anyopaque, __src: ?*const anyopaque, __n: c_ulong) ?*anyopaque; |
| 3096 | |
| 3097 | /// void *memmove(void *s1, const void *s2, size_t n); |
| 3098 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/memmove.html |
| 3099 | pub extern fn memmove(__dest: ?*anyopaque, __src: ?*const anyopaque, __n: c_ulong) ?*anyopaque; |
| 3100 | |
| 3101 | /// void *memset(void *s, int c, size_t n); |
| 3102 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/memset.html |
| 3103 | pub extern fn memset(__s: ?*anyopaque, __c: c_int, __n: c_ulong) ?*anyopaque; |
| 3104 | |
| 3105 | /// int mkdir(const char *path, mode_t mode); |
| 3106 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mkdir.html |
| 3107 | pub extern fn mkdir(path: [*:0]const u8, __mode: mode_t) c_int; |
| 3108 | |
| 3109 | /// int mkdirat(int fd, const char *path, mode_t mode); |
| 3110 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mkdirat.html |
| 3111 | pub extern fn mkdirat(fd: c_int, path: [*:0]const u8, mode: mode_t) c_int; |
| 3112 | |
| 3113 | /// char *mkdtemp(char *template); |
| 3114 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mkdtemp.html |
| 3115 | pub extern fn mkdtemp(template: [*:0]u8) ?[*:0]u8; |
| 3116 | |
| 3117 | /// int mkfifo(const char *path, mode_t mode); |
| 3118 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mkfifo.html |
| 3119 | pub extern fn mkfifo(path: [*:0]const u8, mode: mode_t) c_int; |
| 3120 | |
| 3121 | /// int mkfifoat(int fd, const char *path, mode_t mode); |
| 3122 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mkfifoat.html |
| 3123 | pub extern fn mkfifoat(fd: c_int, path: [*:0]const u8, mode: mode_t) c_int; |
| 3124 | |
| 3125 | /// int mknod(const char *path, mode_t mode, dev_t dev); |
| 3126 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mknod.html |
| 3127 | // pub extern fn mknod(__path: [*c]const u8, __mode: mode_t, __dev: __dev_t) c_int; |
| 3128 | |
| 3129 | /// int mknodat(int fd, const char *path, mode_t mode, dev_t dev); |
| 3130 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mknodat.html |
| 3131 | // pub extern fn mknodat(__fd: c_int, __path: [*c]const u8, __mode: mode_t, __dev: __dev_t) c_int; |
| 3132 | |
| 3133 | /// int mkstemp(char *template); |
| 3134 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mkstemp.html |
| 3135 | pub extern fn mkstemp(template: [*:0]u8) c_int; |
| 3136 | |
| 3137 | /// time_t mktime(struct tm *timeptr); |
| 3138 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mktime.html |
| 3139 | // pub extern fn mktime(__tp: [*c]struct_tm) time_t; |
| 3140 | |
| 3141 | /// int mlock(const void *addr, size_t len); |
| 3142 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mlock.html |
| 3143 | pub extern fn mlock(__addr: ?*const anyopaque, __len: usize) c_int; |
| 3144 | |
| 3145 | /// int mlockall(int flags); |
| 3146 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mlockall.html |
| 3147 | pub extern fn mlockall(flags: c_int) c_int; |
| 3148 | |
| 3149 | /// void *mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off); |
| 3150 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mmap.html |
| 3151 | pub extern fn mmap(addr: ?*anyopaque, len: usize, prot: c_int, flags: c_int, fd: c_int, offset: off_t) *allowzero anyopaque; |
| 3152 | |
| 3153 | /// double modf(double x, double *iptr); |
| 3154 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/modf.html |
| 3155 | pub extern fn modf(__x: f64, __iptr: [*c]f64) f64; |
| 3156 | |
| 3157 | /// float modff(float value, float *iptr); |
| 3158 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/modff.html |
| 3159 | pub extern fn modff(__x: f32, __iptr: [*c]f32) f32; |
| 3160 | |
| 3161 | /// long double modfl(long double value, long double *iptr); |
| 3162 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/modfl.html |
| 3163 | pub extern fn modfl(__x: c_longdouble, __iptr: [*c]c_longdouble) c_longdouble; |
| 3164 | |
| 3165 | /// int mprotect(void *addr, size_t len, int prot); |
| 3166 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mprotect.html |
| 3167 | pub extern fn mprotect(__addr: ?*anyopaque, __len: usize, __prot: c_int) c_int; |
| 3168 | |
| 3169 | /// int mq_close(mqd_t mqdes); |
| 3170 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mq_close.html |
| 3171 | // pub extern fn mq_close(__mqdes: mqd_t) c_int; |
| 3172 | |
| 3173 | /// int mq_getattr(mqd_t mqdes, struct mq_attr *mqstat); |
| 3174 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mq_getattr.html |
| 3175 | // pub extern fn mq_getattr(__mqdes: mqd_t, __mqstat: [*c]struct_mq_attr) c_int; |
| 3176 | |
| 3177 | /// int mq_notify(mqd_t mqdes, const struct sigevent *notification); |
| 3178 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mq_notify.html |
| 3179 | // pub extern fn mq_notify(__mqdes: mqd_t, __notification: [*c]const struct_sigevent) c_int; |
| 3180 | |
| 3181 | /// mqd_t mq_open(const char *name, int oflag, ...); |
| 3182 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mq_open.html |
| 3183 | // pub extern fn mq_open(__name: [*c]const u8, __oflag: c_int, ...) mqd_t; |
| 3184 | |
| 3185 | /// ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio); |
| 3186 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mq_receive.html |
| 3187 | // pub extern fn mq_receive(__mqdes: mqd_t, __msg_ptr: [*c]u8, __msg_len: usize, __msg_prio: [*c]c_uint) isize; |
| 3188 | |
| 3189 | /// int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio); |
| 3190 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mq_send.html |
| 3191 | // pub extern fn mq_send(__mqdes: mqd_t, __msg_ptr: [*c]const u8, __msg_len: usize, __msg_prio: c_uint) c_int; |
| 3192 | |
| 3193 | /// int mq_setattr(mqd_t mqdes, const struct mq_attr *restrict mqstat, struct mq_attr *restrict omqstat); |
| 3194 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mq_setattr.html |
| 3195 | // pub extern fn mq_setattr(__mqdes: mqd_t, noalias __mqstat: [*c]const struct_mq_attr, noalias __omqstat: [*c]struct_mq_attr) c_int; |
| 3196 | |
| 3197 | /// ssize_t mq_timedreceive(mqd_t mqdes, char *restrict msg_ptr, size_t msg_len, unsigned *restrict msg_prio, const struct timespec *restrict abstime); |
| 3198 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mq_timedreceive.html |
| 3199 | // pub extern fn mq_timedreceive(__mqdes: mqd_t, noalias __msg_ptr: [*c]u8, __msg_len: usize, noalias __msg_prio: [*c]c_uint, noalias __abs_timeout: [*c]const struct_timespec) isize; |
| 3200 | |
| 3201 | /// int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abstime); |
| 3202 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mq_timedsend.html |
| 3203 | // pub extern fn mq_timedsend(__mqdes: mqd_t, __msg_ptr: [*c]const u8, __msg_len: usize, __msg_prio: c_uint, __abs_timeout: [*c]const struct_timespec) c_int; |
| 3204 | |
| 3205 | /// int mq_unlink(const char *name); |
| 3206 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mq_unlink.html |
| 3207 | pub extern fn mq_unlink(name: [*:0]const u8) c_int; |
| 3208 | |
| 3209 | /// long mrand48(void); |
| 3210 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/mrand48.html |
| 3211 | pub extern fn mrand48() c_long; |
| 3212 | |
| 3213 | /// int msgctl(int msqid, int cmd, struct msqid_ds *buf); |
| 3214 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/msgctl.html |
| 3215 | // pub extern fn msgctl(__msqid: c_int, __cmd: c_int, __buf: [*c]struct_msqid_ds) c_int; |
| 3216 | |
| 3217 | /// int msgget(key_t key, int msgflg); |
| 3218 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/msgget.html |
| 3219 | // pub extern fn msgget(__key: key_t, __msgflg: c_int) c_int; |
| 3220 | |
| 3221 | /// ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); |
| 3222 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/msgrcv.html |
| 3223 | pub extern fn msgrcv(__msqid: c_int, __msgp: ?*anyopaque, __msgsz: usize, __msgtyp: c_long, __msgflg: c_int) isize; |
| 3224 | |
| 3225 | /// int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); |
| 3226 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/msgsnd.html |
| 3227 | pub extern fn msgsnd(__msqid: c_int, __msgp: ?*const anyopaque, __msgsz: usize, __msgflg: c_int) c_int; |
| 3228 | |
| 3229 | /// int msync(void *addr, size_t len, int flags); |
| 3230 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/msync.html |
| 3231 | pub extern fn msync(__addr: ?*anyopaque, __len: usize, __flags: c_int) c_int; |
| 3232 | |
| 3233 | /// int munlock(const void *addr, size_t len); |
| 3234 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/munlock.html |
| 3235 | pub extern fn munlock(__addr: ?*const anyopaque, __len: usize) c_int; |
| 3236 | |
| 3237 | /// int munlockall(void); |
| 3238 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/munlockall.html |
| 3239 | pub extern fn munlockall() void; |
| 3240 | |
| 3241 | /// int munmap(void *addr, size_t len); |
| 3242 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/munmap.html |
| 3243 | pub extern fn munmap(addr: *const anyopaque, len: usize) c_int; |
| 3244 | |
| 3245 | /// double nan(const char *tagp); |
| 3246 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nan.html |
| 3247 | pub extern fn nan(__tagb: [*c]const u8) f64; |
| 3248 | |
| 3249 | /// float nanf(const char *tagp); |
| 3250 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nanf.html |
| 3251 | pub extern fn nanf(__tagb: [*c]const u8) f32; |
| 3252 | |
| 3253 | /// long double nanl(const char *tagp); |
| 3254 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nanl.html |
| 3255 | pub extern fn nanl(__tagb: [*c]const u8) c_longdouble; |
| 3256 | |
| 3257 | /// int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); |
| 3258 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nanosleep.html |
| 3259 | pub extern fn nanosleep(__requested_time: [*c]const struct_timespec, __remaining: [*c]struct_timespec) c_int; |
| 3260 | |
| 3261 | /// double nearbyint(double x); |
| 3262 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nearbyint.html |
| 3263 | pub extern fn nearbyint(x: f64) f64; |
| 3264 | |
| 3265 | /// float nearbyintf(float x); |
| 3266 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nearbyintf.html |
| 3267 | pub extern fn nearbyintf(x: f32) f32; |
| 3268 | |
| 3269 | /// long double nearbyintl(long double x); |
| 3270 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nearbyintl.html |
| 3271 | pub extern fn nearbyintl(x: c_longdouble) c_longdouble; |
| 3272 | |
| 3273 | /// locale_t newlocale(int category_mask, const char *locale, locale_t base); |
| 3274 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/newlocale.html |
| 3275 | pub extern fn newlocale(__category_mask: c_int, __locale: [*c]const u8, __base: locale_t) locale_t; |
| 3276 | |
| 3277 | /// double nextafter(double x, double y); |
| 3278 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nextafter.html |
| 3279 | pub extern fn nextafter(x: f64, y: f64) f64; |
| 3280 | |
| 3281 | /// float nextafterf(float x, float y); |
| 3282 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nextafterf.html |
| 3283 | pub extern fn nextafterf(x: f32, y: f32) f32; |
| 3284 | |
| 3285 | /// long double nextafterl(long double x, long double y); |
| 3286 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nextafterl.html |
| 3287 | pub extern fn nextafterl(x: c_longdouble, y: c_longdouble) c_longdouble; |
| 3288 | |
| 3289 | /// double nexttoward(double x, long double y); |
| 3290 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nexttoward.html |
| 3291 | pub extern fn nexttoward(x: f64, y: c_longdouble) f64; |
| 3292 | |
| 3293 | /// float nexttowardf(float x, long double y); |
| 3294 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nexttowardf.html |
| 3295 | pub extern fn nexttowardf(x: f32, y: c_longdouble) f32; |
| 3296 | |
| 3297 | /// long double nexttowardl(long double x, long double y); |
| 3298 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nexttowardl.html |
| 3299 | pub extern fn nexttowardl(x: c_longdouble, y: c_longdouble) c_longdouble; |
| 3300 | |
| 3301 | /// int nftw(const char *path, int (*fn)(const char *, const struct stat *, int, struct FTW *), int fd_limit, int flags); |
| 3302 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nftw.html |
| 3303 | pub const nftw = @compileError("TODO nftw"); |
| 3304 | |
| 3305 | /// int nice(int incr); |
| 3306 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nice.html |
| 3307 | pub extern fn nice(incr: c_int) c_int; |
| 3308 | |
| 3309 | /// char *nl_langinfo(nl_item item); |
| 3310 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nl_langinfo.html |
| 3311 | // pub extern fn nl_langinfo(__item: nl_item) [*c]u8; |
| 3312 | |
| 3313 | /// char *nl_langinfo_l(nl_item item, locale_t locale); |
| 3314 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nl_langinfo_l.html |
| 3315 | // pub extern fn nl_langinfo_l(__item: nl_item, __l: locale_t) [*c]u8; |
| 3316 | |
| 3317 | /// long nrand48(unsigned short xsubi[3]); |
| 3318 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/nrand48.html |
| 3319 | pub extern fn nrand48(__xsubi: [*c]c_ushort) c_long; |
| 3320 | |
| 3321 | /// uint32_t ntohl(uint32_t netlong); |
| 3322 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ntohl.html |
| 3323 | pub extern fn ntohl(netlong: u32) u32; |
| 3324 | |
| 3325 | /// uint16_t ntohs(uint16_t netshort); |
| 3326 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ntohs.html |
| 3327 | pub extern fn ntohs(netshort: u16) u16; |
| 3328 | |
| 3329 | /// int open(const char *path, int oflag, ...); |
| 3330 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/open.html |
| 3331 | pub extern fn open(__file: [*c]const u8, __oflag: c_int, ...) c_int; |
| 3332 | |
| 3333 | /// FILE *open_memstream(char **bufp, size_t *sizep); |
| 3334 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/open_memstream.html |
| 3335 | pub extern fn open_memstream(__bufloc: [*c][*c]u8, __sizeloc: [*c]usize) [*c]FILE; |
| 3336 | |
| 3337 | /// FILE *open_wmemstream(wchar_t **bufp, size_t *sizep); |
| 3338 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/open_wmemstream.html |
| 3339 | // pub extern fn open_wmemstream(__bufloc: [*c][*c]wchar_t, __sizeloc: [*c]usize) [*c]__FILE; |
| 3340 | |
| 3341 | /// int openat(int fd, const char *path, int oflag, ...); |
| 3342 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/openat.html |
| 3343 | pub extern fn openat(fd: c_int, file: [*:0]const u8, oflag: c_int, ...) c_int; |
| 3344 | |
| 3345 | /// DIR *opendir(const char *dirname); |
| 3346 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/opendir.html |
| 3347 | pub extern fn opendir(__name: [*c]const u8) ?*DIR; |
| 3348 | |
| 3349 | /// void openlog(const char *ident, int logopt, int facility); |
| 3350 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/openlog.html |
| 3351 | pub extern fn openlog(__ident: [*c]const u8, __option: c_int, __facility: c_int) void; |
| 3352 | |
| 3353 | /// long pathconf(const char *path, int name); |
| 3354 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pathconf.html |
| 3355 | pub extern fn pathconf(__path: [*c]const u8, __name: c_int) c_long; |
| 3356 | |
| 3357 | /// int pause(void); |
| 3358 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pause.html |
| 3359 | pub extern fn pause() c_int; |
| 3360 | |
| 3361 | /// int pclose(FILE *stream); |
| 3362 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pclose.html |
| 3363 | pub extern fn pclose(__stream: [*c]FILE) c_int; |
| 3364 | |
| 3365 | /// void perror(const char *s); |
| 3366 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/perror.html |
| 3367 | pub extern fn perror(__s: [*c]const u8) void; |
| 3368 | |
| 3369 | /// int pipe(int fildes[2]); |
| 3370 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pipe.html |
| 3371 | pub extern fn pipe(pipefd: *[2]c_int) c_int; |
| 3372 | |
| 3373 | /// int pipe2(int fildes[2], int flag); |
| 3374 | /// https://pubs.opengroup.org/onlinepubs/9799919799/functions/pipe.html |
| 3375 | pub extern fn pipe2(pipefd: *[2]c_int, flag: c_int) c_int; |
| 3376 | |
| 3377 | /// int poll(struct pollfd fds[], nfds_t nfds, int timeout); |
| 3378 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/poll.html |
| 3379 | pub extern fn poll(fds: [*]struct_pollfd, nfds: nfds_t, timeout: c_int) c_int; |
| 3380 | |
| 3381 | /// FILE *popen(const char *command, const char *mode); |
| 3382 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/popen.html |
| 3383 | pub extern fn popen(__command: [*c]const u8, __modes: [*c]const u8) [*c]FILE; |
| 3384 | |
| 3385 | /// int posix_fadvise(int fd, off_t offset, off_t len, int advice); |
| 3386 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_fadvise.html |
| 3387 | pub extern fn posix_fadvise(__fd: c_int, __offset: off_t, __len: off_t, __advise: c_int) c_int; |
| 3388 | |
| 3389 | /// int posix_fallocate(int fd, off_t offset, off_t len); |
| 3390 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_fallocate.html |
| 3391 | pub extern fn posix_fallocate(__fd: c_int, __offset: off_t, __len: off_t) c_int; |
| 3392 | |
| 3393 | /// int posix_madvise(void *addr, size_t len, int advice); |
| 3394 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_madvise.html |
| 3395 | pub extern fn posix_madvise(__addr: ?*anyopaque, __len: usize, __advice: c_int) c_int; |
| 3396 | |
| 3397 | /// int posix_mem_offset(const void *restrict addr, size_t len, off_t *restrict off, size_t *restrict contig_len, int *restrict fildes); |
| 3398 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_mem_offset.html |
| 3399 | pub const posix_mem_offset = @compileError("TODO posix_mem_offset"); |
| 3400 | |
| 3401 | /// int posix_memalign(void **memptr, size_t alignment, size_t size); |
| 3402 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_memalign.html |
| 3403 | pub extern fn posix_memalign(__memptr: [*c]?*anyopaque, __alignment: usize, __size: usize) c_int; |
| 3404 | |
| 3405 | /// int posix_openpt(int oflag); |
| 3406 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_openpt.html |
| 3407 | pub const posix_openpt = @compileError("TODO posix_openpt"); |
| 3408 | |
| 3409 | /// int posix_spawn(pid_t *restrict pid, const char *restrict path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t *restrict attrp, char *const argv[restrict], char *const envp[restrict]); |
| 3410 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawn.html |
| 3411 | // pub extern fn posix_spawn(noalias __pid: [*c]pid_t, noalias __path: [*c]const u8, noalias __file_actions: [*c]const posix_spawn_file_actions_t, noalias __attrp: [*c]const posix_spawnattr_t, noalias __argv: [*c]const [*c]u8, noalias __envp: [*c]const [*c]u8) c_int; |
| 3412 | |
| 3413 | /// int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *file_actions, int fildes); |
| 3414 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawn_file_actions_addclose.html |
| 3415 | // pub extern fn posix_spawn_file_actions_addclose(__file_actions: [*c]posix_spawn_file_actions_t, __fd: c_int) c_int; |
| 3416 | |
| 3417 | /// int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *file_actions, int fildes, int newfildes); |
| 3418 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawn_file_actions_adddup2.html |
| 3419 | // pub extern fn posix_spawn_file_actions_adddup2(__file_actions: [*c]posix_spawn_file_actions_t, __fd: c_int, __newfd: c_int) c_int; |
| 3420 | |
| 3421 | /// int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *restrict file_actions, int fildes, const char *restrict path, int oflag, mode_t mode); |
| 3422 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawn_file_actions_addopen.html |
| 3423 | // pub extern fn posix_spawn_file_actions_addopen(noalias __file_actions: [*c]posix_spawn_file_actions_t, __fd: c_int, noalias __path: [*c]const u8, __oflag: c_int, __mode: mode_t) c_int; |
| 3424 | |
| 3425 | /// int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *file_actions); |
| 3426 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawn_file_actions_destroy.html |
| 3427 | // pub extern fn posix_spawn_file_actions_destroy(__file_actions: [*c]posix_spawn_file_actions_t) c_int; |
| 3428 | |
| 3429 | /// int posix_spawn_file_actions_init(posix_spawn_file_actions_t *file_actions); |
| 3430 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawn_file_actions_init.html |
| 3431 | // pub extern fn posix_spawn_file_actions_init(__file_actions: [*c]posix_spawn_file_actions_t) c_int; |
| 3432 | |
| 3433 | /// int posix_spawnattr_destroy(posix_spawnattr_t *attr); |
| 3434 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawnattr_destroy.html |
| 3435 | // pub extern fn posix_spawnattr_destroy(__attr: [*c]posix_spawnattr_t) c_int; |
| 3436 | |
| 3437 | /// int posix_spawnattr_getflags(const posix_spawnattr_t *restrict attr, short *restrict flags); |
| 3438 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawnattr_getflags.html |
| 3439 | // pub extern fn posix_spawnattr_getflags(noalias __attr: [*c]const posix_spawnattr_t, noalias __flags: [*c]c_short) c_int; |
| 3440 | |
| 3441 | /// int posix_spawnattr_getpgroup(const posix_spawnattr_t *restrict attr, pid_t *restrict pgroup); |
| 3442 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawnattr_getpgroup.html |
| 3443 | // pub extern fn posix_spawnattr_getpgroup(noalias __attr: [*c]const posix_spawnattr_t, noalias __pgroup: [*c]pid_t) c_int; |
| 3444 | |
| 3445 | /// int posix_spawnattr_getschedparam(const posix_spawnattr_t *restrict attr, struct sched_param *restrict schedparam); |
| 3446 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawnattr_getschedparam.html |
| 3447 | // pub extern fn posix_spawnattr_getschedparam(noalias __attr: [*c]const posix_spawnattr_t, noalias __schedparam: [*c]struct_sched_param) c_int; |
| 3448 | |
| 3449 | /// int posix_spawnattr_getschedpolicy(const posix_spawnattr_t *restrict attr, int *restrict schedpolicy); |
| 3450 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawnattr_getschedpolicy.html |
| 3451 | // pub extern fn posix_spawnattr_getschedpolicy(noalias __attr: [*c]const posix_spawnattr_t, noalias __schedpolicy: [*c]c_int) c_int; |
| 3452 | |
| 3453 | /// int posix_spawnattr_getsigdefault(const posix_spawnattr_t *restrict attr, sigset_t *restrict sigdefault); |
| 3454 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawnattr_getsigdefault.html |
| 3455 | // pub extern fn posix_spawnattr_getsigdefault(noalias __attr: [*c]const posix_spawnattr_t, noalias __sigdefault: [*c]sigset_t) c_int; |
| 3456 | |
| 3457 | /// int posix_spawnattr_getsigmask(const posix_spawnattr_t *restrict attr, sigset_t *restrict sigmask); |
| 3458 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawnattr_getsigmask.html |
| 3459 | // pub extern fn posix_spawnattr_getsigmask(noalias __attr: [*c]const posix_spawnattr_t, noalias __sigmask: [*c]sigset_t) c_int; |
| 3460 | |
| 3461 | /// int posix_spawnattr_init(posix_spawnattr_t *attr); |
| 3462 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawnattr_init.html |
| 3463 | // pub extern fn posix_spawnattr_init(__attr: [*c]posix_spawnattr_t) c_int; |
| 3464 | |
| 3465 | /// int posix_spawnattr_setflags(posix_spawnattr_t *attr, short flags); |
| 3466 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawnattr_setflags.html |
| 3467 | // pub extern fn posix_spawnattr_setflags(_attr: [*c]posix_spawnattr_t, __flags: c_short) c_int; |
| 3468 | |
| 3469 | /// int posix_spawnattr_setpgroup(posix_spawnattr_t *attr, pid_t pgroup); |
| 3470 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawnattr_setpgroup.html |
| 3471 | // pub extern fn posix_spawnattr_setpgroup(__attr: [*c]posix_spawnattr_t, __pgroup: pid_t) c_int; |
| 3472 | |
| 3473 | /// int posix_spawnattr_setschedparam(posix_spawnattr_t *restrict attr, const struct sched_param *restrict schedparam); |
| 3474 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawnattr_setschedparam.html |
| 3475 | // pub extern fn posix_spawnattr_setschedparam(noalias __attr: [*c]posix_spawnattr_t, noalias __schedparam: [*c]const struct_sched_param) c_int; |
| 3476 | |
| 3477 | /// int posix_spawnattr_setschedpolicy(posix_spawnattr_t *attr, int schedpolicy); |
| 3478 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawnattr_setschedpolicy.html |
| 3479 | // pub extern fn posix_spawnattr_setschedpolicy(__attr: [*c]posix_spawnattr_t, __schedpolicy: c_int) c_int; |
| 3480 | |
| 3481 | /// int posix_spawnattr_setsigdefault(posix_spawnattr_t *restrict attr, const sigset_t *restrict sigdefault); |
| 3482 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawnattr_setsigdefault.html |
| 3483 | // pub extern fn posix_spawnattr_setsigdefault(noalias __attr: [*c]posix_spawnattr_t, noalias __sigdefault: [*c]const sigset_t) c_int; |
| 3484 | |
| 3485 | /// int posix_spawnattr_setsigmask(posix_spawnattr_t *restrict attr, const sigset_t *restrict sigmask); |
| 3486 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawnattr_setsigmask.html |
| 3487 | // pub extern fn posix_spawnattr_setsigmask(noalias __attr: [*c]posix_spawnattr_t, noalias __sigmask: [*c]const sigset_t) c_int; |
| 3488 | |
| 3489 | /// int posix_spawnp(pid_t *restrict pid, const char *restrict file, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t *restrict attrp, char *const argv[restrict], char *const envp[restrict]); |
| 3490 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_spawnp.html |
| 3491 | // pub extern fn posix_spawnp(__pid: [*c]pid_t, __file: [*c]const u8, __file_actions: [*c]const posix_spawn_file_actions_t, __attrp: [*c]const posix_spawnattr_t, __argv: [*c]const [*c]u8, __envp: [*c]const [*c]u8) c_int; |
| 3492 | |
| 3493 | /// int posix_typed_mem_get_info(int fildes, struct posix_typed_mem_info *info); |
| 3494 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_typed_mem_get_info.html |
| 3495 | pub const posix_typed_mem_get_info = @compileError("TODO posix_typed_mem_get_info"); |
| 3496 | |
| 3497 | /// int posix_typed_mem_open(const char *name, int oflag, int tflag); |
| 3498 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/posix_typed_mem_open.html |
| 3499 | pub const posix_typed_mem_open = @compileError("TODO posix_typed_mem_open"); |
| 3500 | |
| 3501 | /// double pow(double x, double y); |
| 3502 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pow.html |
| 3503 | pub extern fn pow(x: f64, y: f64) f64; |
| 3504 | |
| 3505 | /// float powf(float x, float y); |
| 3506 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/powf.html |
| 3507 | pub extern fn powf(x: f32, y: f32) f32; |
| 3508 | |
| 3509 | /// long double powl(long double x, long double y); |
| 3510 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/powl.html |
| 3511 | pub extern fn powl(x: c_longdouble, y: c_longdouble) c_longdouble; |
| 3512 | |
| 3513 | /// ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset); |
| 3514 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pread.html |
| 3515 | pub extern fn pread(__fd: c_int, __buf: ?*anyopaque, __nbytes: usize, __offset: off_t) isize; |
| 3516 | |
| 3517 | /// int printf(const char *restrict format, ...); |
| 3518 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/printf.html |
| 3519 | pub extern fn printf(__format: [*c]const u8, ...) c_int; |
| 3520 | |
| 3521 | /// int pselect(int nfds, fd_set *restrict readfds, fd_set *restrict writefds, fd_set *restrict errorfds, const struct timespec *restrict timeout, const sigset_t *restrict sigmask); |
| 3522 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pselect.html |
| 3523 | // pub extern fn pselect(__nfds: c_int, noalias __readfds: [*c]fd_set, noalias __writefds: [*c]fd_set, noalias __exceptfds: [*c]fd_set, noalias __timeout: [*c]const struct_timespec, noalias __sigmask: [*c]const __sigset_t) c_int; |
| 3524 | |
| 3525 | /// void psiginfo(const siginfo_t *pinfo, const char *message); |
| 3526 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/psiginfo.html |
| 3527 | // pub extern fn psiginfo(__pinfo: [*c]const siginfo_t, __s: [*c]const u8) void; |
| 3528 | |
| 3529 | /// void psignal(int signum, const char *message); |
| 3530 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/psignal.html |
| 3531 | pub extern fn psignal(__sig: c_int, __s: [*c]const u8) void; |
| 3532 | |
| 3533 | /// int pthread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void)); |
| 3534 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_atfork.html |
| 3535 | pub extern fn pthread_atfork(__prepare: ?*const fn () callconv(.C) void, __parent: ?*const fn () callconv(.C) void, __child: ?*const fn () callconv(.C) void) c_int; |
| 3536 | |
| 3537 | /// int pthread_attr_destroy(pthread_attr_t *attr); |
| 3538 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_destroy.html |
| 3539 | pub extern fn pthread_attr_destroy(attr: *pthread_attr_t) c_int; |
| 3540 | |
| 3541 | /// int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate); |
| 3542 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_getdetachstate.html |
| 3543 | // pub extern fn pthread_attr_getdetachstate(__attr: [*c]const pthread_attr_t, __detachstate: [*c]c_int) c_int; |
| 3544 | |
| 3545 | /// int pthread_attr_getguardsize(const pthread_attr_t *restrict attr, size_t *restrict guardsize); |
| 3546 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_getguardsize.html |
| 3547 | // pub extern fn pthread_attr_getguardsize(__attr: [*c]const pthread_attr_t, __guardsize: [*c]usize) c_int; |
| 3548 | |
| 3549 | /// int pthread_attr_getinheritsched(const pthread_attr_t *restrict attr, int *restrict inheritsched); |
| 3550 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_getinheritsched.html |
| 3551 | // pub extern fn pthread_attr_getinheritsched(noalias __attr: [*c]const pthread_attr_t, noalias __inherit: [*c]c_int) c_int; |
| 3552 | |
| 3553 | /// int pthread_attr_getschedparam(const pthread_attr_t *restrict attr, struct sched_param *restrict param); |
| 3554 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_getschedparam.html |
| 3555 | // pub extern fn pthread_attr_getschedparam(noalias __attr: [*c]const pthread_attr_t, noalias __param: [*c]struct_sched_param) c_int; |
| 3556 | |
| 3557 | /// int pthread_attr_getschedpolicy(const pthread_attr_t *restrict attr, int *restrict policy); |
| 3558 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_getschedpolicy.html |
| 3559 | // pub extern fn pthread_attr_getschedpolicy(noalias __attr: [*c]const pthread_attr_t, noalias __policy: [*c]c_int) c_int; |
| 3560 | |
| 3561 | /// int pthread_attr_getscope(const pthread_attr_t *restrict attr, int *restrict contentionscope); |
| 3562 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_getscope.html |
| 3563 | // pub extern fn pthread_attr_getscope(noalias __attr: [*c]const pthread_attr_t, noalias __scope: [*c]c_int) c_int; |
| 3564 | |
| 3565 | /// int pthread_attr_getstack(const pthread_attr_t *restrict attr, void **restrict stackaddr, size_t *restrict stacksize); |
| 3566 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_getstack.html |
| 3567 | // pub extern fn pthread_attr_getstack(noalias __attr: [*c]const pthread_attr_t, noalias __stackaddr: [*c]?*anyopaque, noalias __stacksize: [*c]usize) c_int; |
| 3568 | |
| 3569 | /// int pthread_attr_getstacksize(const pthread_attr_t *restrict attr, size_t *restrict stacksize); |
| 3570 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_getstacksize.html |
| 3571 | // pub extern fn pthread_attr_getstacksize(noalias __attr: [*c]const pthread_attr_t, noalias __stacksize: [*c]usize) c_int; |
| 3572 | |
| 3573 | /// int pthread_attr_init(pthread_attr_t *attr); |
| 3574 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_init.html |
| 3575 | pub extern fn pthread_attr_init(attr: *pthread_attr_t) c_int; |
| 3576 | |
| 3577 | /// int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate); |
| 3578 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_setdetachstate.html |
| 3579 | // pub extern fn pthread_attr_setdetachstate(__attr: [*c]pthread_attr_t, __detachstate: c_int) c_int; |
| 3580 | |
| 3581 | /// int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize); |
| 3582 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_setguardsize.html |
| 3583 | pub extern fn pthread_attr_setguardsize(attr: *pthread_attr_t, guardsize: usize) c_int; |
| 3584 | |
| 3585 | /// int pthread_attr_setinheritsched(pthread_attr_t *attr, int inheritsched); |
| 3586 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_setinheritsched.html |
| 3587 | // pub extern fn pthread_attr_setinheritsched(__attr: [*c]pthread_attr_t, __inherit: c_int) c_int; |
| 3588 | |
| 3589 | /// int pthread_attr_setschedparam(pthread_attr_t *restrict attr, const struct sched_param *restrict param); |
| 3590 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_setschedparam.html |
| 3591 | // pub extern fn pthread_attr_setschedparam(noalias __attr: [*c]pthread_attr_t, noalias __param: [*c]const struct_sched_param) c_int; |
| 3592 | |
| 3593 | /// int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy); |
| 3594 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_setschedpolicy.html |
| 3595 | // pub extern fn pthread_attr_setschedpolicy(__attr: [*c]pthread_attr_t, __policy: c_int) c_int; |
| 3596 | |
| 3597 | /// int pthread_attr_setscope(pthread_attr_t *attr, int contentionscope); |
| 3598 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_setscope.html |
| 3599 | // pub extern fn pthread_attr_setscope(__attr: [*c]pthread_attr_t, __scope: c_int) c_int; |
| 3600 | |
| 3601 | /// int pthread_attr_setstack(pthread_attr_t *attr, void *stackaddr, size_t stacksize); |
| 3602 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_setstack.html |
| 3603 | // pub extern fn pthread_attr_setstack(__attr: [*c]pthread_attr_t, __stackaddr: ?*anyopaque, __stacksize: usize) c_int; |
| 3604 | |
| 3605 | /// int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize); |
| 3606 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_attr_setstacksize.html |
| 3607 | pub extern fn pthread_attr_setstacksize(attr: *pthread_attr_t, stacksize: usize) c_int; |
| 3608 | |
| 3609 | /// int pthread_barrier_destroy(pthread_barrier_t *barrier); |
| 3610 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_barrier_destroy.html |
| 3611 | // pub extern fn pthread_barrier_destroy(__barrier: [*c]pthread_barrier_t) c_int; |
| 3612 | |
| 3613 | /// int pthread_barrier_init(pthread_barrier_t *restrict barrier, const pthread_barrierattr_t *restrict attr, unsigned count); |
| 3614 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_barrier_init.html |
| 3615 | // pub extern fn pthread_barrier_init(noalias __barrier: [*c]pthread_barrier_t, noalias __attr: [*c]const pthread_barrierattr_t, __count: c_uint) c_int; |
| 3616 | |
| 3617 | /// int pthread_barrier_wait(pthread_barrier_t *barrier); |
| 3618 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_barrier_wait.html |
| 3619 | // pub extern fn pthread_barrier_wait(__barrier: [*c]pthread_barrier_t) c_int; |
| 3620 | |
| 3621 | /// int pthread_barrierattr_destroy(pthread_barrierattr_t *attr); |
| 3622 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_barrierattr_destroy.html |
| 3623 | // pub extern fn pthread_barrierattr_destroy(__attr: [*c]pthread_barrierattr_t) c_int; |
| 3624 | |
| 3625 | /// int pthread_barrierattr_getpshared(const pthread_barrierattr_t *restrict attr, int *restrict pshared); |
| 3626 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_barrierattr_getpshared.html |
| 3627 | // pub extern fn pthread_barrierattr_getpshared(noalias __attr: [*c]const pthread_barrierattr_t, noalias __pshared: [*c]c_int) c_int; |
| 3628 | |
| 3629 | /// int pthread_barrierattr_init(pthread_barrierattr_t *attr); |
| 3630 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_barrierattr_init.html |
| 3631 | // pub extern fn pthread_barrierattr_init(__attr: [*c]pthread_barrierattr_t) c_int; |
| 3632 | |
| 3633 | /// int pthread_barrierattr_setpshared(pthread_barrierattr_t *attr, int pshared); |
| 3634 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_barrierattr_setpshared.html |
| 3635 | // pub extern fn pthread_barrierattr_setpshared(__attr: [*c]pthread_barrierattr_t, __pshared: c_int) c_int; |
| 3636 | |
| 3637 | /// int pthread_cancel(pthread_t thread); |
| 3638 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_cancel.html |
| 3639 | pub extern fn pthread_cancel(thread: pthread_t) c_int; |
| 3640 | |
| 3641 | /// void pthread_cleanup_pop(int execute); |
| 3642 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_cleanup_pop.html |
| 3643 | pub const pthread_cleanup_pop = @compileError("TODO pthread_cleanup_pop"); |
| 3644 | |
| 3645 | /// void pthread_cleanup_push(void (*routine)(void*), void *arg); |
| 3646 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_cleanup_push.html |
| 3647 | pub const pthread_cleanup_push = @compileError("TODO pthread_cleanup_push"); |
| 3648 | |
| 3649 | /// int pthread_cond_broadcast(pthread_cond_t *cond); |
| 3650 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_cond_broadcast.html |
| 3651 | pub extern fn pthread_cond_broadcast(cond: *pthread_cond_t) c_int; |
| 3652 | |
| 3653 | /// int pthread_cond_destroy(pthread_cond_t *cond); |
| 3654 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_cond_destroy.html |
| 3655 | pub extern fn pthread_cond_destroy(cond: *pthread_cond_t) c_int; |
| 3656 | |
| 3657 | /// int pthread_cond_init(pthread_cond_t *restrict cond, const pthread_condattr_t *restrict attr); |
| 3658 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_cond_init.html |
| 3659 | pub extern fn pthread_cond_init(noalias cond: *pthread_cond_t, noalias attr: ?*const pthread_condattr_t) c_int; |
| 3660 | |
| 3661 | /// int pthread_cond_signal(pthread_cond_t *cond); |
| 3662 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_cond_signal.html |
| 3663 | pub extern fn pthread_cond_signal(cond: *pthread_cond_t) c_int; |
| 3664 | |
| 3665 | /// int pthread_cond_timedwait(pthread_cond_t *restrict cond, pthread_mutex_t *restrict mutex, const struct timespec *restrict abstime); |
| 3666 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_cond_timedwait.html |
| 3667 | pub extern fn pthread_cond_timedwait(noalias cond: *pthread_cond_t, noalias mutex: *pthread_mutex_t, noalias abstime: *const struct_timespec) c_int; |
| 3668 | |
| 3669 | /// int pthread_cond_wait(pthread_cond_t *restrict cond, pthread_mutex_t *restrict mutex); |
| 3670 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_cond_wait.html |
| 3671 | pub extern fn pthread_cond_wait(noalias cond: *pthread_cond_t, noalias mutex: *pthread_mutex_t) c_int; |
| 3672 | |
| 3673 | /// int pthread_condattr_destroy(pthread_condattr_t *attr); |
| 3674 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_condattr_destroy.html |
| 3675 | pub extern fn pthread_condattr_destroy(attr: *pthread_condattr_t) c_int; |
| 3676 | |
| 3677 | /// int pthread_condattr_getclock(const pthread_condattr_t *restrict attr, clockid_t *restrict clock_id); |
| 3678 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_condattr_getclock.html |
| 3679 | // pub extern fn pthread_condattr_getclock(noalias __attr: [*c]const pthread_condattr_t, noalias __clock_id: [*c]__clockid_t) c_int; |
| 3680 | |
| 3681 | /// int pthread_condattr_getpshared(const pthread_condattr_t *restrict attr, int *restrict pshared); |
| 3682 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_condattr_getpshared.html |
| 3683 | // pub extern fn pthread_condattr_getpshared(noalias __attr: [*c]const pthread_condattr_t, noalias __pshared: [*c]c_int) c_int; |
| 3684 | |
| 3685 | /// int pthread_condattr_init(pthread_condattr_t *attr); |
| 3686 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_condattr_init.html |
| 3687 | pub extern fn pthread_condattr_init(attr: *pthread_condattr_t) c_int; |
| 3688 | |
| 3689 | /// int pthread_condattr_setclock(pthread_condattr_t *attr, clockid_t clock_id); |
| 3690 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_condattr_setclock.html |
| 3691 | // pub extern fn pthread_condattr_setclock(__attr: [*c]pthread_condattr_t, __clock_id: __clockid_t) c_int; |
| 3692 | |
| 3693 | /// int pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared); |
| 3694 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_condattr_setpshared.html |
| 3695 | // pub extern fn pthread_condattr_setpshared(__attr: [*c]pthread_condattr_t, __pshared: c_int) c_int; |
| 3696 | |
| 3697 | /// int pthread_create(pthread_t *restrict thread, const pthread_attr_t *restrict attr, void *(*start_routine)(void*), void *restrict arg); |
| 3698 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_create.html |
| 3699 | pub extern fn pthread_create(noalias newthread: *pthread_t, noalias attr: *const pthread_attr_t, start_routine: *const fn (*anyopaque) callconv(.c) ?*anyopaque, noalias arg: *anyopaque) c_int; |
| 3700 | |
| 3701 | /// int pthread_detach(pthread_t thread); |
| 3702 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_detach.html |
| 3703 | pub extern fn pthread_detach(thread: pthread_t) c_int; |
| 3704 | |
| 3705 | /// int pthread_equal(pthread_t t1, pthread_t t2); |
| 3706 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_equal.html |
| 3707 | pub extern fn pthread_equal(thread1: pthread_t, thread2: pthread_t) c_int; |
| 3708 | |
| 3709 | /// void pthread_exit(void *value_ptr); |
| 3710 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_exit.html |
| 3711 | pub extern fn pthread_exit(__retval: ?*anyopaque) noreturn; |
| 3712 | |
| 3713 | /// int pthread_getconcurrency(void); |
| 3714 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_getconcurrency.html |
| 3715 | pub extern fn pthread_getconcurrency() c_int; |
| 3716 | |
| 3717 | /// int pthread_getcpuclockid(pthread_t thread_id, clockid_t *clock_id); |
| 3718 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_getcpuclockid.html |
| 3719 | // pub extern fn pthread_getcpuclockid(__thread_id: pthread_t, __clock_id: [*c]__clockid_t) c_int; |
| 3720 | |
| 3721 | /// int pthread_getschedparam(pthread_t thread, int *restrict policy, struct sched_param *restrict param); |
| 3722 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_getschedparam.html |
| 3723 | // pub extern fn pthread_getschedparam(__target_thread: pthread_t, noalias __policy: [*c]c_int, noalias __param: [*c]struct_sched_param) c_int; |
| 3724 | |
| 3725 | /// void *pthread_getspecific(pthread_key_t key); |
| 3726 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_getspecific.html |
| 3727 | // pub extern fn pthread_getspecific(__key: pthread_key_t) ?*anyopaque; |
| 3728 | |
| 3729 | /// int pthread_join(pthread_t thread, void **value_ptr); |
| 3730 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_join.html |
| 3731 | pub extern fn pthread_join(thread: pthread_t, retval: ?*?*anyopaque) c_int; |
| 3732 | |
| 3733 | /// int pthread_key_create(pthread_key_t *key, void (*destructor)(void*)); |
| 3734 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_key_create.html |
| 3735 | // pub extern fn pthread_key_create(__key: [*c]pthread_key_t, __destr_function: ?*const fn (?*anyopaque) callconv(.C) void) c_int; |
| 3736 | |
| 3737 | /// int pthread_key_delete(pthread_key_t key); |
| 3738 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_key_delete.html |
| 3739 | // pub extern fn pthread_key_delete(__key: pthread_key_t) c_int; |
| 3740 | |
| 3741 | /// int pthread_kill(pthread_t thread, int sig); |
| 3742 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_kill.html |
| 3743 | pub extern fn pthread_kill(thread: pthread_t, sig: c_int) c_int; |
| 3744 | |
| 3745 | /// int pthread_mutex_consistent(pthread_mutex_t *mutex); |
| 3746 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutex_consistent.html |
| 3747 | // pub extern fn pthread_mutex_consistent(__mutex: [*c]pthread_mutex_t) c_int; |
| 3748 | |
| 3749 | /// int pthread_mutex_destroy(pthread_mutex_t *mutex); |
| 3750 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutex_destroy.html |
| 3751 | pub extern fn pthread_mutex_destroy(mutex: *pthread_mutex_t) c_int; |
| 3752 | |
| 3753 | /// int pthread_mutex_getprioceiling(const pthread_mutex_t *restrict mutex, int *restrict prioceiling); |
| 3754 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutex_getprioceiling.html |
| 3755 | // pub extern fn pthread_mutex_getprioceiling(noalias __mutex: [*c]const pthread_mutex_t, noalias __prioceiling: [*c]c_int) c_int; |
| 3756 | |
| 3757 | /// int pthread_mutex_init(pthread_mutex_t *restrict mutex, const pthread_mutexattr_t *restrict attr); |
| 3758 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutex_init.html |
| 3759 | pub extern fn pthread_mutex_init(mutex: *pthread_mutex_t, attr: ?*const pthread_mutexattr_t) c_int; |
| 3760 | |
| 3761 | /// int pthread_mutex_lock(pthread_mutex_t *mutex); |
| 3762 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutex_lock.html |
| 3763 | pub extern fn pthread_mutex_lock(mutex: *pthread_mutex_t) c_int; |
| 3764 | |
| 3765 | /// int pthread_mutex_setprioceiling(pthread_mutex_t *restrict mutex, int prioceiling, int *restrict old_ceiling); |
| 3766 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutex_setprioceiling.html |
| 3767 | // pub extern fn pthread_mutex_setprioceiling(noalias __mutex: [*c]pthread_mutex_t, __prioceiling: c_int, noalias __old_ceiling: [*c]c_int) c_int; |
| 3768 | |
| 3769 | /// int pthread_mutex_timedlock(pthread_mutex_t *restrict mutex, const struct timespec *restrict abstime); |
| 3770 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutex_timedlock.html |
| 3771 | // pub extern fn pthread_mutex_timedlock(noalias __mutex: [*c]pthread_mutex_t, noalias __abstime: [*c]const struct_timespec) c_int; |
| 3772 | |
| 3773 | /// int pthread_mutex_trylock(pthread_mutex_t *mutex); |
| 3774 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutex_trylock.html |
| 3775 | pub extern fn pthread_mutex_trylock(mutex: *pthread_mutex_t) c_int; |
| 3776 | |
| 3777 | /// int pthread_mutex_unlock(pthread_mutex_t *mutex); |
| 3778 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutex_unlock.html |
| 3779 | pub extern fn pthread_mutex_unlock(mutex: *pthread_mutex_t) c_int; |
| 3780 | |
| 3781 | /// int pthread_mutexattr_destroy(pthread_mutexattr_t *attr); |
| 3782 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutexattr_destroy.html |
| 3783 | pub extern fn pthread_mutexattr_destroy(attr: *pthread_mutexattr_t) c_int; |
| 3784 | |
| 3785 | /// int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *restrict attr, int *restrict prioceiling); |
| 3786 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutexattr_getprioceiling.html |
| 3787 | // pub extern fn pthread_mutexattr_getprioceiling(noalias __attr: [*c]const pthread_mutexattr_t, noalias __prioceiling: [*c]c_int) c_int; |
| 3788 | |
| 3789 | /// int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *restrict attr, int *restrict protocol); |
| 3790 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutexattr_getprotocol.html |
| 3791 | // pub extern fn pthread_mutexattr_getprotocol(noalias __attr: [*c]const pthread_mutexattr_t, noalias __protocol: [*c]c_int) c_int; |
| 3792 | |
| 3793 | /// int pthread_mutexattr_getpshared(const pthread_mutexattr_t *restrict attr, int *restrict pshared); |
| 3794 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutexattr_getpshared.html |
| 3795 | // pub extern fn pthread_mutexattr_getpshared(noalias __attr: [*c]const pthread_mutexattr_t, noalias __pshared: [*c]c_int) c_int; |
| 3796 | |
| 3797 | /// int pthread_mutexattr_getrobust(const pthread_mutexattr_t *restrict attr, int *restrict robust); |
| 3798 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutexattr_getrobust.html |
| 3799 | // pub extern fn pthread_mutexattr_getrobust(__attr: [*c]const pthread_mutexattr_t, __robustness: [*c]c_int) c_int; |
| 3800 | |
| 3801 | /// int pthread_mutexattr_gettype(const pthread_mutexattr_t *restrict attr, int *restrict type); |
| 3802 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutexattr_gettype.html |
| 3803 | // pub extern fn pthread_mutexattr_gettype(noalias __attr: [*c]const pthread_mutexattr_t, noalias __kind: [*c]c_int) c_int; |
| 3804 | |
| 3805 | /// int pthread_mutexattr_init(pthread_mutexattr_t *attr); |
| 3806 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutexattr_init.html |
| 3807 | pub extern fn pthread_mutexattr_init(attr: *pthread_mutexattr_t) c_int; |
| 3808 | |
| 3809 | /// int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr, int prioceiling); |
| 3810 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutexattr_setprioceiling.html |
| 3811 | // pub extern fn pthread_mutexattr_setprioceiling(__attr: [*c]pthread_mutexattr_t, __prioceiling: c_int) c_int; |
| 3812 | |
| 3813 | /// int pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, int protocol); |
| 3814 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutexattr_setprotocol.html |
| 3815 | // pub extern fn pthread_mutexattr_setprotocol(__attr: [*c]pthread_mutexattr_t, __protocol: c_int) c_int; |
| 3816 | |
| 3817 | /// int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared); |
| 3818 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutexattr_setpshared.html |
| 3819 | // pub extern fn pthread_mutexattr_setpshared(__attr: [*c]pthread_mutexattr_t, __pshared: c_int) c_int; |
| 3820 | |
| 3821 | /// int pthread_mutexattr_setrobust(pthread_mutexattr_t *attr, int robust); |
| 3822 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutexattr_setrobust.html |
| 3823 | // pub extern fn pthread_mutexattr_setrobust(__attr: [*c]pthread_mutexattr_t, __robustness: c_int) c_int; |
| 3824 | |
| 3825 | /// int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type); |
| 3826 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_mutexattr_settype.html |
| 3827 | // pub extern fn pthread_mutexattr_settype(__attr: [*c]pthread_mutexattr_t, __kind: c_int) c_int; |
| 3828 | |
| 3829 | /// int pthread_once(pthread_once_t *once_control, void (*init_routine)(void)); |
| 3830 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_once.html |
| 3831 | // // pub extern fn pthread_once(__once_control: [*c]pthread_once_t, __init_routine: ?*const fn () callconv(.C) void) c_int; |
| 3832 | |
| 3833 | /// int pthread_rwlock_destroy(pthread_rwlock_t *rwlock); |
| 3834 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_rwlock_destroy.html |
| 3835 | pub extern fn pthread_rwlock_destroy(rwlock: *pthread_rwlock_t) c_int; |
| 3836 | |
| 3837 | /// int pthread_rwlock_init(pthread_rwlock_t *restrict rwlock, const pthread_rwlockattr_t *restrict attr); |
| 3838 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_rwlock_init.html |
| 3839 | pub extern fn pthread_rwlock_init(noalias rwlock: *pthread_rwlock_t, noalias attr: ?*const pthread_rwlockattr_t) c_int; |
| 3840 | |
| 3841 | /// int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock); |
| 3842 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_rwlock_rdlock.html |
| 3843 | pub extern fn pthread_rwlock_rdlock(rwlock: *pthread_rwlock_t) c_int; |
| 3844 | |
| 3845 | /// int pthread_rwlock_timedrdlock(pthread_rwlock_t *restrict rwlock, const struct timespec *restrict abstime); |
| 3846 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_rwlock_timedrdlock.html |
| 3847 | pub extern fn pthread_rwlock_timedrdlock(noalias rwlock: *pthread_rwlock_t, noalias abstime: *const struct_timespec) c_int; |
| 3848 | |
| 3849 | /// int pthread_rwlock_timedwrlock(pthread_rwlock_t *restrict rwlock, const struct timespec *restrict abstime); |
| 3850 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_rwlock_timedwrlock.html |
| 3851 | pub extern fn pthread_rwlock_timedwrlock(noalias rwlock: *pthread_rwlock_t, noalias abstime: *const struct_timespec) c_int; |
| 3852 | |
| 3853 | /// int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock); |
| 3854 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_rwlock_tryrdlock.html |
| 3855 | pub extern fn pthread_rwlock_tryrdlock(rwlock: *pthread_rwlock_t) c_int; |
| 3856 | |
| 3857 | /// int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock); |
| 3858 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_rwlock_trywrlock.html |
| 3859 | pub extern fn pthread_rwlock_trywrlock(rwlock: *pthread_rwlock_t) c_int; |
| 3860 | |
| 3861 | /// int pthread_rwlock_unlock(pthread_rwlock_t *rwlock); |
| 3862 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_rwlock_unlock.html |
| 3863 | pub extern fn pthread_rwlock_unlock(rwlock: *pthread_rwlock_t) c_int; |
| 3864 | |
| 3865 | /// int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock); |
| 3866 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_rwlock_wrlock.html |
| 3867 | pub extern fn pthread_rwlock_wrlock(rwlock: *pthread_rwlock_t) c_int; |
| 3868 | |
| 3869 | /// int pthread_rwlockattr_destroy(pthread_rwlockattr_t *attr); |
| 3870 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_rwlockattr_destroy.html |
| 3871 | // pub extern fn pthread_rwlockattr_destroy(__attr: [*c]pthread_rwlockattr_t) c_int; |
| 3872 | |
| 3873 | /// int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *restrict attr, int *restrict pshared); |
| 3874 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_rwlockattr_getpshared.html |
| 3875 | // pub extern fn pthread_rwlockattr_getpshared(noalias __attr: [*c]const pthread_rwlockattr_t, noalias __pshared: [*c]c_int) c_int; |
| 3876 | |
| 3877 | /// int pthread_rwlockattr_init(pthread_rwlockattr_t *attr); |
| 3878 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_rwlockattr_init.html |
| 3879 | // pub extern fn pthread_rwlockattr_init(__attr: [*c]pthread_rwlockattr_t) c_int; |
| 3880 | |
| 3881 | /// int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr, int pshared); |
| 3882 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_rwlockattr_setpshared.html |
| 3883 | // pub extern fn pthread_rwlockattr_setpshared(__attr: [*c]pthread_rwlockattr_t, __pshared: c_int) c_int; |
| 3884 | |
| 3885 | /// pthread_t pthread_self(void); |
| 3886 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_self.html |
| 3887 | pub extern fn pthread_self() pthread_t; |
| 3888 | |
| 3889 | /// int pthread_setcancelstate(int state, int *oldstate); |
| 3890 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_setcancelstate.html |
| 3891 | pub extern fn pthread_setcancelstate(__state: c_int, __oldstate: [*c]c_int) c_int; |
| 3892 | |
| 3893 | /// int pthread_setcanceltype(int type, int *oldtype); |
| 3894 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_setcanceltype.html |
| 3895 | pub extern fn pthread_setcanceltype(__type: c_int, __oldtype: [*c]c_int) c_int; |
| 3896 | |
| 3897 | /// int pthread_setconcurrency(int new_level); |
| 3898 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_setconcurrency.html |
| 3899 | pub const pthread_setconcurrency = @compileError("TODO pthread_setconcurrency"); |
| 3900 | |
| 3901 | /// int pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *param); |
| 3902 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_setschedparam.html |
| 3903 | // pub extern fn pthread_setschedparam(__target_thread: pthread_t, __policy: c_int, __param: [*c]const struct_sched_param) c_int; |
| 3904 | |
| 3905 | /// int pthread_setschedprio(pthread_t thread, int prio); |
| 3906 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_setschedprio.html |
| 3907 | pub extern fn pthread_setschedprio(__target_thread: pthread_t, __prio: c_int) c_int; |
| 3908 | |
| 3909 | /// int pthread_setspecific(pthread_key_t key, const void *value); |
| 3910 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_setspecific.html |
| 3911 | // pub extern fn pthread_setspecific(__key: pthread_key_t, __pointer: ?*const anyopaque) c_int; |
| 3912 | |
| 3913 | /// int pthread_sigmask(int how, const sigset_t *restrict set, sigset_t *restrict oset); |
| 3914 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_sigmask.html |
| 3915 | // pub extern fn pthread_sigmask(__how: c_int, noalias __newmask: [*c]const __sigset_t, noalias __oldmask: [*c]__sigset_t) c_int; |
| 3916 | |
| 3917 | /// int pthread_spin_destroy(pthread_spinlock_t *lock); |
| 3918 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_spin_destroy.html |
| 3919 | // pub extern fn pthread_spin_destroy(__lock: [*c]volatile pthread_spinlock_t) c_int; |
| 3920 | |
| 3921 | /// int pthread_spin_init(pthread_spinlock_t *lock, int pshared); |
| 3922 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_spin_init.html |
| 3923 | // pub extern fn pthread_spin_init(__lock: [*c]volatile pthread_spinlock_t, __pshared: c_int) c_int; |
| 3924 | |
| 3925 | /// int pthread_spin_lock(pthread_spinlock_t *lock); |
| 3926 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_spin_lock.html |
| 3927 | // pub extern fn pthread_spin_lock(__lock: [*c]volatile pthread_spinlock_t) c_int; |
| 3928 | |
| 3929 | /// int pthread_spin_trylock(pthread_spinlock_t *lock); |
| 3930 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_spin_trylock.html |
| 3931 | // pub extern fn pthread_spin_trylock(__lock: [*c]volatile pthread_spinlock_t) c_int; |
| 3932 | |
| 3933 | /// int pthread_spin_unlock(pthread_spinlock_t *lock); |
| 3934 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_spin_unlock.html |
| 3935 | // pub extern fn pthread_spin_unlock(__lock: [*c]volatile pthread_spinlock_t) c_int; |
| 3936 | |
| 3937 | /// void pthread_testcancel(void); |
| 3938 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pthread_testcancel.html |
| 3939 | pub extern fn pthread_testcancel() void; |
| 3940 | |
| 3941 | /// char *ptsname(int fildes); |
| 3942 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ptsname.html |
| 3943 | pub const ptsname = @compileError("TODO ptsname"); |
| 3944 | |
| 3945 | /// int putc(int c, FILE *stream); |
| 3946 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/putc.html |
| 3947 | pub extern fn putc(__c: c_int, __stream: [*c]FILE) c_int; |
| 3948 | |
| 3949 | /// int putc_unlocked(int c, FILE *stream); |
| 3950 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/putc_unlocked.html |
| 3951 | pub extern fn putc_unlocked(__c: c_int, __stream: [*c]FILE) c_int; |
| 3952 | |
| 3953 | /// int putchar(int c); |
| 3954 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/putchar.html |
| 3955 | pub extern fn putchar(c: c_int) c_int; |
| 3956 | |
| 3957 | /// int putchar_unlocked(int c); |
| 3958 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/putchar_unlocked.html |
| 3959 | pub extern fn putchar_unlocked(c: c_int) c_int; |
| 3960 | |
| 3961 | /// int putenv(char *string); |
| 3962 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/putenv.html |
| 3963 | pub extern fn putenv(__string: [*c]u8) c_int; |
| 3964 | |
| 3965 | /// int putmsg(int fildes, const struct strbuf *ctlptr, const struct strbuf *dataptr, int flags); |
| 3966 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/putmsg.html |
| 3967 | pub const putmsg = @compileError("TODO putmsg"); |
| 3968 | |
| 3969 | /// int putpmsg(int fildes, const struct strbuf *ctlptr, const struct strbuf *dataptr, int band, int flags); |
| 3970 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/putpmsg.html |
| 3971 | pub const putpmsg = @compileError("TODO putpmsg"); |
| 3972 | |
| 3973 | /// int puts(const char *s); |
| 3974 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/puts.html |
| 3975 | pub extern fn puts(__s: [*c]const u8) c_int; |
| 3976 | |
| 3977 | /// struct utmpx *pututxline(const struct utmpx *utmpx); |
| 3978 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pututxline.html |
| 3979 | pub extern fn pututxline(__utmpx: [*c]const struct_utmpx) [*c]struct_utmpx; |
| 3980 | |
| 3981 | /// wint_t putwc(wchar_t wc, FILE *stream); |
| 3982 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/putwc.html |
| 3983 | // pub extern fn putwc(__wc: wchar_t, __stream: [*c]__FILE) wint_t; |
| 3984 | |
| 3985 | /// wint_t putwchar(wchar_t wc); |
| 3986 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/putwchar.html |
| 3987 | pub extern fn putwchar(wc: wchar_t) wint_t; |
| 3988 | |
| 3989 | /// ssize_t pwrite(int fildes, const void *buf, size_t nbyte, off_t offset); |
| 3990 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/pwrite.html |
| 3991 | pub extern fn pwrite(__fd: c_int, __buf: ?*const anyopaque, __n: usize, __offset: off_t) isize; |
| 3992 | |
| 3993 | /// void qsort(void *base, size_t nel, size_t width, int (*compar)(const void *, const void *)); |
| 3994 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/qsort.html |
| 3995 | // pub extern fn qsort(__base: ?*anyopaque, __nmemb: usize, __size: usize, __compar: __compar_fn_t) void; |
| 3996 | |
| 3997 | /// int raise(int sig); |
| 3998 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/raise.html |
| 3999 | pub extern fn raise(sig: c_int) c_int; |
| 4000 | |
| 4001 | /// int rand(void); |
| 4002 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/rand.html |
| 4003 | pub extern fn rand() c_int; |
| 4004 | |
| 4005 | /// int rand_r(unsigned *seed); |
| 4006 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/rand_r.html |
| 4007 | pub extern fn rand_r(__seed: [*c]c_uint) c_int; |
| 4008 | |
| 4009 | /// long random(void); |
| 4010 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/random.html |
| 4011 | pub extern fn random() c_long; |
| 4012 | |
| 4013 | /// ssize_t read(int fildes, void *buf, size_t nbyte); |
| 4014 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/read.html |
| 4015 | pub extern fn read(fd: c_int, buf: [*]u8, count: usize) isize; |
| 4016 | |
| 4017 | /// struct dirent *readdir(DIR *dirp); |
| 4018 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/readdir.html |
| 4019 | // pub extern fn readdir(__dirp: ?*DIR) [*c]struct_dirent; |
| 4020 | |
| 4021 | /// int readdir_r(DIR *restrict dirp, struct dirent *restrict entry, struct dirent **restrict result); |
| 4022 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/readdir_r.html |
| 4023 | // pub extern fn readdir_r(noalias __dirp: ?*DIR, noalias __entry: [*c]struct_dirent, noalias __result: [*c][*c]struct_dirent) c_int; |
| 4024 | |
| 4025 | /// ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize); |
| 4026 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/readlink.html |
| 4027 | pub extern fn readlink(noalias path: [*:0]const u8, noalias buf: [*]u8, len: usize) isize; |
| 4028 | |
| 4029 | /// ssize_t readlinkat(int fd, const char *restrict path, char *restrict buf, size_t bufsize); |
| 4030 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/readlinkat.html |
| 4031 | pub extern fn readlinkat(fd: c_int, noalias path: [*:0]const u8, noalias buf: [*]u8, len: usize) isize; |
| 4032 | |
| 4033 | /// ssize_t readv(int fildes, const struct iovec *iov, int iovcnt); |
| 4034 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/readv.html |
| 4035 | pub extern fn readv(fd: c_int, iovec: [*]const struct_iovec, count: c_int) isize; |
| 4036 | |
| 4037 | /// void *realloc(void *ptr, size_t size); |
| 4038 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/realloc.html |
| 4039 | pub extern fn realloc(__ptr: ?*anyopaque, __size: c_ulong) ?*anyopaque; |
| 4040 | |
| 4041 | /// char *realpath(const char *restrict file_name, char *restrict resolved_name); |
| 4042 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/realpath.html |
| 4043 | pub extern fn realpath(noalias __name: [*c]const u8, noalias __resolved: [*c]u8) [*c]u8; |
| 4044 | |
| 4045 | /// ssize_t recv(int socket, void *buffer, size_t length, int flags); |
| 4046 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/recv.html |
| 4047 | pub extern fn recv(fd: c_int, buffer: [*]u8, length: usize, flags: c_int) isize; |
| 4048 | |
| 4049 | /// ssize_t recvfrom(int socket, void *restrict buffer, size_t length, int flags, struct sockaddr *restrict address, socklen_t *restrict address_len); |
| 4050 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/recvfrom.html |
| 4051 | pub extern fn recvfrom(__fd: c_int, noalias __buf: ?*anyopaque, __n: usize, __flags: c_int, noalias __addr: [*c]struct_sockaddr, noalias __addr_len: [*c]socklen_t) isize; |
| 4052 | |
| 4053 | /// ssize_t recvmsg(int socket, struct msghdr *message, int flags); |
| 4054 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/recvmsg.html |
| 4055 | // pub extern fn recvmsg(__fd: c_int, __message: [*c]struct_msghdr, __flags: c_int) isize; |
| 4056 | |
| 4057 | /// int regcomp(regex_t *restrict preg, const char *restrict pattern, int cflags); |
| 4058 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/regcomp.html |
| 4059 | // pub extern fn regcomp(noalias __preg: ?*regex_t, noalias __pattern: [*c]const u8, __cflags: c_int) c_int; |
| 4060 | |
| 4061 | /// size_t regerror(int errcode, const regex_t *restrict preg, char *restrict errbuf, size_t errbuf_size); |
| 4062 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/regerror.html |
| 4063 | // pub extern fn regerror(__errcode: c_int, noalias __preg: ?*const regex_t, noalias __errbuf: [*c]u8, __errbuf_size: usize) usize; |
| 4064 | |
| 4065 | /// int regexec(const regex_t *restrict preg, const char *restrict string, size_t nmatch, regmatch_t pmatch[restrict], int eflags); |
| 4066 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/regexec.html |
| 4067 | // pub extern fn regexec(noalias __preg: ?*const regex_t, noalias __String: [*c]const u8, __nmatch: usize, noalias __pmatch: [*c]regmatch_t, __eflags: c_int) c_int; |
| 4068 | |
| 4069 | /// void regfree(regex_t *preg); |
| 4070 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/regfree.html |
| 4071 | // pub extern fn regfree(__preg: ?*regex_t) void; |
| 4072 | |
| 4073 | /// double remainder(double x, double y); |
| 4074 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/remainder.html |
| 4075 | pub extern fn remainder(x: f64, y: f64) f64; |
| 4076 | |
| 4077 | /// float remainderf(float x, float y); |
| 4078 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/remainderf.html |
| 4079 | pub extern fn remainderf(x: f32, y: f32) f32; |
| 4080 | |
| 4081 | /// long double remainderl(long double x, long double y); |
| 4082 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/remainderl.html |
| 4083 | pub extern fn remainderl(x: c_longdouble, y: c_longdouble) c_longdouble; |
| 4084 | |
| 4085 | /// int remove(const char *path); |
| 4086 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/remove.html |
| 4087 | pub extern fn remove(__filename: [*c]const u8) c_int; |
| 4088 | |
| 4089 | /// void remque(void *element); |
| 4090 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/remque.html |
| 4091 | pub extern fn remque(__elem: ?*anyopaque) void; |
| 4092 | |
| 4093 | /// double remquo(double x, double y, int *quo); |
| 4094 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/remquo.html |
| 4095 | pub extern fn remquo(__x: f64, __y: f64, __quo: [*c]c_int) f64; |
| 4096 | |
| 4097 | /// float remquof(float x, float y, int *quo); |
| 4098 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/remquof.html |
| 4099 | pub extern fn remquof(__x: f32, __y: f32, __quo: [*c]c_int) f32; |
| 4100 | |
| 4101 | /// long double remquol(long double x, long double y, int *quo); |
| 4102 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/remquol.html |
| 4103 | pub extern fn remquol(__x: c_longdouble, __y: c_longdouble, __quo: [*c]c_int) c_longdouble; |
| 4104 | |
| 4105 | /// int rename(const char *old, const char *new); |
| 4106 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/rename.html |
| 4107 | pub extern fn rename(__old: [*c]const u8, __new: [*c]const u8) c_int; |
| 4108 | |
| 4109 | /// int renameat(int oldfd, const char *old, int newfd, const char *new); |
| 4110 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/renameat.html |
| 4111 | pub extern fn renameat(oldfd: c_int, old: [*:0]const u8, newfd: c_int, new: [*:0]const u8) c_int; |
| 4112 | |
| 4113 | /// void rewind(FILE *stream); |
| 4114 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/rewind.html |
| 4115 | pub extern fn rewind(__stream: [*c]FILE) void; |
| 4116 | |
| 4117 | /// void rewinddir(DIR *dirp); |
| 4118 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/rewinddir.html |
| 4119 | pub extern fn rewinddir(__dirp: ?*DIR) void; |
| 4120 | |
| 4121 | /// double rint(double x); |
| 4122 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/rint.html |
| 4123 | pub extern fn rint(x: f64) f64; |
| 4124 | |
| 4125 | /// float rintf(float x); |
| 4126 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/rintf.html |
| 4127 | pub extern fn rintf(x: f32) f32; |
| 4128 | |
| 4129 | /// long double rintl(long double x); |
| 4130 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/rintl.html |
| 4131 | pub extern fn rintl(x: c_longdouble) c_longdouble; |
| 4132 | |
| 4133 | /// int rmdir(const char *path); |
| 4134 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/rmdir.html |
| 4135 | pub extern fn rmdir(path: [*:0]const u8) c_int; |
| 4136 | |
| 4137 | /// double round(double x); |
| 4138 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/round.html |
| 4139 | pub extern fn round(x: f64) f64; |
| 4140 | |
| 4141 | /// float roundf(float x); |
| 4142 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/roundf.html |
| 4143 | pub extern fn roundf(x: f32) f32; |
| 4144 | |
| 4145 | /// long double roundl(long double x); |
| 4146 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/roundl.html |
| 4147 | pub extern fn roundl(x: c_longdouble) c_longdouble; |
| 4148 | |
| 4149 | /// double scalbln(double x, long n); |
| 4150 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/scalbln.html |
| 4151 | pub extern fn scalbln(x: f64, n: c_long) f64; |
| 4152 | |
| 4153 | /// float scalblnf(float x, long n); |
| 4154 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/scalblnf.html |
| 4155 | pub extern fn scalblnf(x: f32, n: c_long) f32; |
| 4156 | |
| 4157 | /// long double scalblnl(long double x, long n); |
| 4158 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/scalblnl.html |
| 4159 | pub extern fn scalblnl(x: c_longdouble, n: c_long) c_longdouble; |
| 4160 | |
| 4161 | /// double scalbn(double x, int n); |
| 4162 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/scalbn.html |
| 4163 | pub extern fn scalbn(x: f64, n: c_int) f64; |
| 4164 | |
| 4165 | /// float scalbnf(float x, int n); |
| 4166 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/scalbnf.html |
| 4167 | pub extern fn scalbnf(x: f32, n: c_int) f32; |
| 4168 | |
| 4169 | /// long double scalbnl(long double x, int n); |
| 4170 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/scalbnl.html |
| 4171 | pub extern fn scalbnl(x: c_longdouble, n: c_int) c_longdouble; |
| 4172 | |
| 4173 | /// int scandir(const char *dir, struct dirent ***namelist, int (*sel)(const struct dirent *), int (*compar)(const struct dirent **, const struct dirent **)); |
| 4174 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/scandir.html |
| 4175 | // pub extern fn scandir(noalias __dir: [*c]const u8, noalias __namelist: [*c][*c][*c]struct_dirent, __selector: ?*const fn ([*c]const struct_dirent) callconv(.C) c_int, __cmp: ?*const fn ([*c][*c]const struct_dirent, [*c][*c]const struct_dirent) callconv(.C) c_int) c_int; |
| 4176 | |
| 4177 | /// int scanf(const char *restrict format, ...); |
| 4178 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/scanf.html |
| 4179 | pub extern fn scanf(noalias __format: [*c]const u8, ...) c_int; |
| 4180 | |
| 4181 | /// int sched_get_priority_max(int policy); |
| 4182 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sched_get_priority_max.html |
| 4183 | pub extern fn sched_get_priority_max(policy: c_int) c_int; |
| 4184 | |
| 4185 | /// int sched_get_priority_min(int policy); |
| 4186 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sched_get_priority_min.html |
| 4187 | pub extern fn sched_get_priority_min(policy: c_int) c_int; |
| 4188 | |
| 4189 | /// int sched_getparam(pid_t pid, struct sched_param *param); |
| 4190 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sched_getparam.html |
| 4191 | // pub extern fn sched_getparam(__pid: __pid_t, __param: [*c]struct_sched_param) c_int; |
| 4192 | |
| 4193 | /// int sched_getscheduler(pid_t pid); |
| 4194 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sched_getscheduler.html |
| 4195 | pub extern fn sched_getscheduler(pid: pid_t) c_int; |
| 4196 | |
| 4197 | /// int sched_rr_get_interval(pid_t pid, struct timespec *interval); |
| 4198 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sched_rr_get_interval.html |
| 4199 | // pub extern fn sched_rr_get_interval(__pid: __pid_t, __t: [*c]struct_timespec) c_int; |
| 4200 | |
| 4201 | /// int sched_setparam(pid_t pid, const struct sched_param *param); |
| 4202 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sched_setparam.html |
| 4203 | // pub extern fn sched_setparam(__pid: __pid_t, __param: [*c]const struct_sched_param) c_int; |
| 4204 | |
| 4205 | /// int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param); |
| 4206 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sched_setscheduler.html |
| 4207 | // pub extern fn sched_setscheduler(__pid: __pid_t, __policy: c_int, __param: [*c]const struct_sched_param) c_int; |
| 4208 | |
| 4209 | /// int sched_yield(void); |
| 4210 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sched_yield.html |
| 4211 | pub extern fn sched_yield() c_int; |
| 4212 | |
| 4213 | /// unsigned short *seed48(unsigned short seed16v[3]); |
| 4214 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/seed48.html |
| 4215 | pub extern fn seed48(__seed16v: [*c]c_ushort) [*c]c_ushort; |
| 4216 | |
| 4217 | /// void seekdir(DIR *dirp, long loc); |
| 4218 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/seekdir.html |
| 4219 | pub extern fn seekdir(__dirp: ?*DIR, __pos: c_long) void; |
| 4220 | |
| 4221 | /// int select(int nfds, fd_set *restrict readfds, fd_set *restrict writefds, fd_set *restrict errorfds, struct timeval *restrict timeout); |
| 4222 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/select.html |
| 4223 | // pub extern fn select(__nfds: c_int, noalias __readfds: [*c]fd_set, noalias __writefds: [*c]fd_set, noalias __exceptfds: [*c]fd_set, noalias __timeout: [*c]struct_timeval) c_int; |
| 4224 | |
| 4225 | /// int sem_close(sem_t *sem); |
| 4226 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sem_close.html |
| 4227 | // pub extern fn sem_close(__sem: [*c]sem_t) c_int; |
| 4228 | |
| 4229 | /// int sem_destroy(sem_t *sem); |
| 4230 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sem_destroy.html |
| 4231 | // pub extern fn sem_destroy(__sem: [*c]sem_t) c_int; |
| 4232 | |
| 4233 | /// int sem_getvalue(sem_t *restrict sem, int *restrict sval); |
| 4234 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sem_getvalue.html |
| 4235 | // pub extern fn sem_getvalue(noalias __sem: [*c]sem_t, noalias __sval: [*c]c_int) c_int; |
| 4236 | |
| 4237 | /// int sem_init(sem_t *sem, int pshared, unsigned value); |
| 4238 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sem_init.html |
| 4239 | // pub extern fn sem_init(__sem: [*c]sem_t, __pshared: c_int, __value: c_uint) c_int; |
| 4240 | |
| 4241 | /// sem_t *sem_open(const char *name, int oflag, ...); |
| 4242 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sem_open.html |
| 4243 | // pub extern fn sem_open(__name: [*c]const u8, __oflag: c_int, ...) [*c]sem_t; |
| 4244 | |
| 4245 | /// int sem_post(sem_t *sem); |
| 4246 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sem_post.html |
| 4247 | // pub extern fn sem_post(__sem: [*c]sem_t) c_int; |
| 4248 | |
| 4249 | /// int sem_timedwait(sem_t *restrict sem, const struct timespec *restrict abstime); |
| 4250 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sem_timedwait.html |
| 4251 | // pub extern fn sem_timedwait(noalias __sem: [*c]sem_t, noalias __abstime: [*c]const struct_timespec) c_int; |
| 4252 | |
| 4253 | /// int sem_trywait(sem_t *sem); |
| 4254 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sem_trywait.html |
| 4255 | // pub extern fn sem_trywait(__sem: [*c]sem_t) c_int; |
| 4256 | |
| 4257 | /// int sem_unlink(const char *name); |
| 4258 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sem_unlink.html |
| 4259 | pub extern fn sem_unlink(name: [*:0]const u8) c_int; |
| 4260 | |
| 4261 | /// int sem_wait(sem_t *sem); |
| 4262 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sem_wait.html |
| 4263 | // pub extern fn sem_wait(__sem: [*c]sem_t) c_int; |
| 4264 | |
| 4265 | /// int semctl(int semid, int semnum, int cmd, ...); |
| 4266 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/semctl.html |
| 4267 | pub extern fn semctl(semid: c_int, semnum: c_int, cmd: c_int, ...) c_int; |
| 4268 | |
| 4269 | /// int semget(key_t key, int nsems, int semflg); |
| 4270 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/semget.html |
| 4271 | // pub extern fn semget(__key: key_t, __nsems: c_int, __semflg: c_int) c_int; |
| 4272 | |
| 4273 | /// int semop(int semid, struct sembuf *sops, size_t nsops); |
| 4274 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/semop.html |
| 4275 | // pub extern fn semop(__semid: c_int, __sops: [*c]struct_sembuf, __nsops: usize) c_int; |
| 4276 | |
| 4277 | /// ssize_t send(int socket, const void *buffer, size_t length, int flags); |
| 4278 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/send.html |
| 4279 | pub extern fn send(fd: c_int, buffer: [*]const u8, length: usize, flags: c_int) isize; |
| 4280 | |
| 4281 | /// ssize_t sendmsg(int socket, const struct msghdr *message, int flags); |
| 4282 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sendmsg.html |
| 4283 | // pub extern fn sendmsg(__fd: c_int, __message: [*c]const struct_msghdr, __flags: c_int) isize; |
| 4284 | |
| 4285 | /// ssize_t sendto(int socket, const void *message, size_t length, int flags, const struct sockaddr *dest_addr, socklen_t dest_len); |
| 4286 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sendto.html |
| 4287 | pub extern fn sendto(__fd: c_int, __buf: ?*const anyopaque, __n: usize, __flags: c_int, __addr: [*c]const struct_sockaddr, __addr_len: socklen_t) isize; |
| 4288 | |
| 4289 | /// void setbuf(FILE *restrict stream, char *restrict buf); |
| 4290 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setbuf.html |
| 4291 | pub extern fn setbuf(noalias __stream: [*c]FILE, noalias __buf: [*c]u8) void; |
| 4292 | |
| 4293 | /// int setegid(gid_t gid); |
| 4294 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setegid.html |
| 4295 | pub extern fn setegid(gid: gid_t) c_int; |
| 4296 | |
| 4297 | /// int setenv(const char *envname, const char *envval, int overwrite); |
| 4298 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setenv.html |
| 4299 | pub extern fn setenv(__name: [*c]const u8, __value: [*c]const u8, __replace: c_int) c_int; |
| 4300 | |
| 4301 | /// int seteuid(uid_t uid); |
| 4302 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/seteuid.html |
| 4303 | pub extern fn seteuid(uid: uid_t) c_int; |
| 4304 | |
| 4305 | /// int setgid(gid_t gid); |
| 4306 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setgid.html |
| 4307 | pub extern fn setgid(gid: gid_t) c_int; |
| 4308 | |
| 4309 | /// void setgrent(void); |
| 4310 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setgrent.html |
| 4311 | pub extern fn setgrent() void; |
| 4312 | |
| 4313 | /// void sethostent(int stayopen); |
| 4314 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sethostent.html |
| 4315 | pub extern fn sethostent(stayopen: c_int) void; |
| 4316 | |
| 4317 | /// int setitimer(int which, const struct itimerval *restrict value, struct itimerval *restrict ovalue); |
| 4318 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setitimer.html |
| 4319 | // pub extern fn setitimer(__which: __itimer_which_t, noalias __new: [*c]const struct_itimerval, noalias __old: [*c]struct_itimerval) c_int; |
| 4320 | |
| 4321 | /// void setkey(const char *key); |
| 4322 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setkey.html |
| 4323 | pub const setkey = @compileError("TODO setkey"); |
| 4324 | |
| 4325 | /// char *setlocale(int category, const char *locale); |
| 4326 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setlocale.html |
| 4327 | pub extern fn setlocale(category: c_int, locale: [*:0]const u8) [*c]u8; |
| 4328 | |
| 4329 | /// int setlogmask(int maskpri); |
| 4330 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setlogmask.html |
| 4331 | pub extern fn setlogmask(maskpri: c_int) c_int; |
| 4332 | |
| 4333 | /// void setnetent(int stayopen); |
| 4334 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setnetent.html |
| 4335 | pub extern fn setnetent(stayopen: c_int) void; |
| 4336 | |
| 4337 | /// int setpgid(pid_t pid, pid_t pgid); |
| 4338 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setpgid.html |
| 4339 | // pub extern fn setpgid(__pid: __pid_t, __pgid: __pid_t) c_int; |
| 4340 | |
| 4341 | /// pid_t setpgrp(void); |
| 4342 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setpgrp.html |
| 4343 | pub extern fn setpgrp() pid_t; |
| 4344 | |
| 4345 | /// int setpriority(int which, id_t who, int value); |
| 4346 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setpriority.html |
| 4347 | // pub extern fn setpriority(__which: __priority_which_t, __who: id_t, __prio: c_int) c_int; |
| 4348 | |
| 4349 | /// void setprotoent(int stayopen); |
| 4350 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setprotoent.html |
| 4351 | pub extern fn setprotoent(stayopen: c_int) void; |
| 4352 | |
| 4353 | /// void setpwent(void); |
| 4354 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setpwent.html |
| 4355 | pub extern fn setpwent() void; |
| 4356 | |
| 4357 | /// int setregid(gid_t rgid, gid_t egid); |
| 4358 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setregid.html |
| 4359 | pub extern fn setregid(rgid: gid_t, egid: gid_t) c_int; |
| 4360 | |
| 4361 | /// int setreuid(uid_t ruid, uid_t euid); |
| 4362 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setreuid.html |
| 4363 | pub extern fn setreuid(ruid: uid_t, euid: uid_t) c_int; |
| 4364 | |
| 4365 | /// int setrlimit(int resource, const struct rlimit *rlp); |
| 4366 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setrlimit.html |
| 4367 | // pub extern fn setrlimit(__resource: __rlimit_resource_t, __rlimits: [*c]const struct_rlimit) c_int; |
| 4368 | |
| 4369 | /// void setservent(int stayopen); |
| 4370 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setservent.html |
| 4371 | pub extern fn setservent(stayopen: c_int) void; |
| 4372 | |
| 4373 | /// pid_t setsid(void); |
| 4374 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setsid.html |
| 4375 | pub extern fn setsid() pid_t; |
| 4376 | |
| 4377 | /// int setsockopt(int socket, int level, int option_name, const void *option_value, socklen_t option_len); |
| 4378 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setsockopt.html |
| 4379 | pub extern fn setsockopt(fd: c_int, level: c_int, optname: c_int, optval: *const anyopaque, optlen: socklen_t) c_int; |
| 4380 | |
| 4381 | /// char *setstate(char *state); |
| 4382 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setstate.html |
| 4383 | pub extern fn setstate(__statebuf: [*c]u8) [*c]u8; |
| 4384 | |
| 4385 | /// int setuid(uid_t uid); |
| 4386 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setuid.html |
| 4387 | pub extern fn setuid(uid: uid_t) c_int; |
| 4388 | |
| 4389 | /// void setutxent(void); |
| 4390 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setutxent.html |
| 4391 | pub extern fn setutxent() void; |
| 4392 | |
| 4393 | /// int setvbuf(FILE *restrict stream, char *restrict buf, int type, size_t size); |
| 4394 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/setvbuf.html |
| 4395 | pub extern fn setvbuf(noalias __stream: [*c]FILE, noalias __buf: [*c]u8, __modes: c_int, __n: usize) c_int; |
| 4396 | |
| 4397 | /// int shm_open(const char *name, int oflag, mode_t mode); |
| 4398 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/shm_open.html |
| 4399 | pub extern fn shm_open(__name: [*c]const u8, __oflag: c_int, __mode: mode_t) c_int; |
| 4400 | |
| 4401 | /// int shm_unlink(const char *name); |
| 4402 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/shm_unlink.html |
| 4403 | pub extern fn shm_unlink(name: [*:0]const u8) c_int; |
| 4404 | |
| 4405 | /// void *shmat(int shmid, const void *shmaddr, int shmflg); |
| 4406 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/shmat.html |
| 4407 | pub extern fn shmat(__shmid: c_int, __shmaddr: ?*const anyopaque, __shmflg: c_int) ?*anyopaque; |
| 4408 | |
| 4409 | /// int shmctl(int shmid, int cmd, struct shmid_ds *buf); |
| 4410 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/shmctl.html |
| 4411 | // pub extern fn shmctl(__shmid: c_int, __cmd: c_int, __buf: [*c]struct_shmid_ds) c_int; |
| 4412 | |
| 4413 | /// int shmdt(const void *shmaddr); |
| 4414 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/shmdt.html |
| 4415 | pub extern fn shmdt(__shmaddr: ?*const anyopaque) c_int; |
| 4416 | |
| 4417 | /// int shmget(key_t key, size_t size, int shmflg); |
| 4418 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/shmget.html |
| 4419 | // pub extern fn shmget(__key: key_t, __size: usize, __shmflg: c_int) c_int; |
| 4420 | |
| 4421 | /// int shutdown(int socket, int how); |
| 4422 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/shutdown.html |
| 4423 | pub extern fn shutdown(socket: c_int, how: c_int) c_int; |
| 4424 | |
| 4425 | /// int sigaction(int sig, const struct sigaction *restrict act, struct sigaction *restrict oact); |
| 4426 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigaction.html |
| 4427 | // pub extern fn sigaction(__sig: c_int, noalias __act: [*c]const struct_sigaction, noalias __oact: [*c]struct_sigaction) c_int; |
| 4428 | |
| 4429 | /// int sigaddset(sigset_t *set, int signo); |
| 4430 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigaddset.html |
| 4431 | // pub extern fn sigaddset(__set: [*c]sigset_t, __signo: c_int) c_int; |
| 4432 | |
| 4433 | /// int sigaltstack(const stack_t *restrict ss, stack_t *restrict oss); |
| 4434 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigaltstack.html |
| 4435 | // pub extern fn sigaltstack(noalias __ss: [*c]const stack_t, noalias __oss: [*c]stack_t) c_int; |
| 4436 | |
| 4437 | /// int sigdelset(sigset_t *set, int signo); |
| 4438 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigdelset.html |
| 4439 | // pub extern fn sigdelset(__set: [*c]sigset_t, __signo: c_int) c_int; |
| 4440 | |
| 4441 | /// int sigemptyset(sigset_t *set); |
| 4442 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigemptyset.html |
| 4443 | // pub extern fn sigemptyset(__set: [*c]sigset_t) c_int; |
| 4444 | |
| 4445 | /// int sigfillset(sigset_t *set); |
| 4446 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigfillset.html |
| 4447 | // pub extern fn sigfillset(__set: [*c]sigset_t) c_int; |
| 4448 | |
| 4449 | /// int sighold(int sig); |
| 4450 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sighold.html |
| 4451 | pub extern fn sighold(sig: c_int) c_int; |
| 4452 | |
| 4453 | /// int sigignore(int sig); |
| 4454 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigignore.html |
| 4455 | pub extern fn sigignore(sig: c_int) c_int; |
| 4456 | |
| 4457 | /// int siginterrupt(int sig, int flag); |
| 4458 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/siginterrupt.html |
| 4459 | pub extern fn siginterrupt(sig: c_int, flag: c_int) c_int; |
| 4460 | |
| 4461 | /// int sigismember(const sigset_t *set, int signo); |
| 4462 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigismember.html |
| 4463 | // pub extern fn sigismember(__set: [*c]const sigset_t, __signo: c_int) c_int; |
| 4464 | |
| 4465 | /// void (*signal(int sig, void (*func)(int)))(int); |
| 4466 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/signal.html |
| 4467 | // pub extern fn signal(__sig: c_int, __handler: __sighandler_t) __sighandler_t; |
| 4468 | |
| 4469 | /// int sigpause(int sig); |
| 4470 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigpause.html |
| 4471 | pub extern fn sigpause(sig: c_int) c_int; |
| 4472 | |
| 4473 | /// int sigpending(sigset_t *set); |
| 4474 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigpending.html |
| 4475 | // pub extern fn sigpending(__set: [*c]sigset_t) c_int; |
| 4476 | |
| 4477 | /// int sigprocmask(int how, const sigset_t *restrict set, sigset_t *restrict oset); |
| 4478 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigprocmask.html |
| 4479 | // pub extern fn sigprocmask(__how: c_int, noalias __set: [*c]const sigset_t, noalias __oset: [*c]sigset_t) c_int; |
| 4480 | |
| 4481 | /// int sigqueue(pid_t pid, int signo, const union sigval value); |
| 4482 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigqueue.html |
| 4483 | // pub extern fn sigqueue(__pid: __pid_t, __sig: c_int, __val: union_sigval) c_int; |
| 4484 | |
| 4485 | /// int sigrelse(int sig); |
| 4486 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigrelse.html |
| 4487 | pub extern fn sigrelse(sig: c_int) c_int; |
| 4488 | |
| 4489 | /// void (*sigset(int sig, void (*disp)(int)))(int); |
| 4490 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigset.html |
| 4491 | pub const sigset = @compileError("TODO sigset"); |
| 4492 | |
| 4493 | /// int sigsuspend(const sigset_t *sigmask); |
| 4494 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigsuspend.html |
| 4495 | // pub extern fn sigsuspend(__set: [*c]const sigset_t) c_int; |
| 4496 | |
| 4497 | /// int sigtimedwait(const sigset_t *restrict set, siginfo_t *restrict info, const struct timespec *restrict timeout); |
| 4498 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigtimedwait.html |
| 4499 | // pub extern fn sigtimedwait(noalias __set: [*c]const sigset_t, noalias __info: [*c]siginfo_t, noalias __timeout: [*c]const struct_timespec) c_int; |
| 4500 | |
| 4501 | /// int sigwait(const sigset_t *restrict set, int *restrict sig); |
| 4502 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigwait.html |
| 4503 | // pub extern fn sigwait(noalias __set: [*c]const sigset_t, noalias __sig: [*c]c_int) c_int; |
| 4504 | |
| 4505 | /// int sigwaitinfo(const sigset_t *restrict set, siginfo_t *restrict info); |
| 4506 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sigwaitinfo.html |
| 4507 | // pub extern fn sigwaitinfo(noalias __set: [*c]const sigset_t, noalias __info: [*c]siginfo_t) c_int; |
| 4508 | |
| 4509 | /// double sin(double x); |
| 4510 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sin.html |
| 4511 | pub extern fn sin(x: f64) f64; |
| 4512 | |
| 4513 | /// float sinf(float x); |
| 4514 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sinf.html |
| 4515 | pub extern fn sinf(x: f32) f32; |
| 4516 | |
| 4517 | /// double sinh(double x); |
| 4518 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sinh.html |
| 4519 | pub extern fn sinh(x: f64) f64; |
| 4520 | |
| 4521 | /// float sinhf(float x); |
| 4522 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sinhf.html |
| 4523 | pub extern fn sinhf(x: f32) f32; |
| 4524 | |
| 4525 | /// long double sinhl(long double x); |
| 4526 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sinhl.html |
| 4527 | pub extern fn sinhl(x: c_longdouble) c_longdouble; |
| 4528 | |
| 4529 | /// long double sinl(long double x); |
| 4530 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sinl.html |
| 4531 | pub extern fn sinl(x: c_longdouble) c_longdouble; |
| 4532 | |
| 4533 | /// unsigned sleep(unsigned seconds); |
| 4534 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sleep.html |
| 4535 | pub extern fn sleep(seconds: c_uint) c_uint; |
| 4536 | |
| 4537 | /// int snprintf(char *restrict s, size_t n, const char *restrict format, ...); |
| 4538 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/snprintf.html |
| 4539 | pub extern fn snprintf(__s: [*c]u8, __maxlen: c_ulong, __format: [*c]const u8, ...) c_int; |
| 4540 | |
| 4541 | /// int sockatmark(int s); |
| 4542 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sockatmark.html |
| 4543 | pub extern fn sockatmark(s: c_int) c_int; |
| 4544 | |
| 4545 | /// int socket(int domain, int type, int protocol); |
| 4546 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/socket.html |
| 4547 | pub extern fn socket(domain: c_int, type: c_int, protocol: c_int) c_int; |
| 4548 | |
| 4549 | /// int socketpair(int domain, int type, int protocol, int socket_vector[2]); |
| 4550 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/socketpair.html |
| 4551 | pub extern fn socketpair(domain: c_int, type: c_int, protocol: c_int, fds: *[2]c_int) c_int; |
| 4552 | |
| 4553 | /// int sprintf(char *restrict s, const char *restrict format, ...); |
| 4554 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sprintf.html |
| 4555 | pub extern fn sprintf(__s: [*c]u8, __format: [*c]const u8, ...) c_int; |
| 4556 | |
| 4557 | /// double sqrt(double x); |
| 4558 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sqrt.html |
| 4559 | pub extern fn sqrt(x: f64) f64; |
| 4560 | |
| 4561 | /// float sqrtf(float x); |
| 4562 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sqrtf.html |
| 4563 | pub extern fn sqrtf(x: f32) f32; |
| 4564 | |
| 4565 | /// long double sqrtl(long double x); |
| 4566 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sqrtl.html |
| 4567 | pub extern fn sqrtl(x: c_longdouble) c_longdouble; |
| 4568 | |
| 4569 | /// void srand(unsigned seed); |
| 4570 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/srand.html |
| 4571 | pub extern fn srand(seed: c_uint) void; |
| 4572 | |
| 4573 | /// void srand48(long seedval); |
| 4574 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/srand48.html |
| 4575 | pub extern fn srand48(seedval: c_long) void; |
| 4576 | |
| 4577 | /// void srandom(unsigned seed); |
| 4578 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/srandom.html |
| 4579 | pub extern fn srandom(seed: c_uint) void; |
| 4580 | |
| 4581 | /// int sscanf(const char *restrict s, const char *restrict format, ...); |
| 4582 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sscanf.html |
| 4583 | pub extern fn sscanf(noalias __s: [*c]const u8, noalias __format: [*c]const u8, ...) c_int; |
| 4584 | |
| 4585 | /// int stat(const char *restrict path, struct stat *restrict buf); |
| 4586 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/stat.html |
| 4587 | // pub extern fn stat(noalias __file: [*c]const u8, noalias __buf: [*c]struct_stat) c_int; |
| 4588 | |
| 4589 | /// int statvfs(const char *restrict path, struct statvfs *restrict buf); |
| 4590 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/statvfs.html |
| 4591 | // pub extern fn statvfs(noalias __file: [*c]const u8, noalias __buf: [*c]struct_statvfs) c_int; |
| 4592 | |
| 4593 | /// char *stpcpy(char *restrict s1, const char *restrict s2); |
| 4594 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/stpcpy.html |
| 4595 | pub extern fn stpcpy(__dest: [*c]u8, __src: [*c]const u8) [*c]u8; |
| 4596 | |
| 4597 | /// char *stpncpy(char *restrict s1, const char *restrict s2, size_t n); |
| 4598 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/stpncpy.html |
| 4599 | pub extern fn stpncpy(__dest: [*c]u8, __src: [*c]const u8, __n: c_ulong) [*c]u8; |
| 4600 | |
| 4601 | /// int strcasecmp(const char *s1, const char *s2); |
| 4602 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strcasecmp.html |
| 4603 | pub extern fn strcasecmp(__s1: [*c]const u8, __s2: [*c]const u8) c_int; |
| 4604 | |
| 4605 | /// int strcasecmp_l(const char *s1, const char *s2, locale_t locale); |
| 4606 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strcasecmp_l.html |
| 4607 | pub extern fn strcasecmp_l(__s1: [*c]const u8, __s2: [*c]const u8, __loc: locale_t) c_int; |
| 4608 | |
| 4609 | /// char *strcat(char *restrict s1, const char *restrict s2); |
| 4610 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strcat.html |
| 4611 | pub extern fn strcat(__dest: [*c]u8, __src: [*c]const u8) [*c]u8; |
| 4612 | |
| 4613 | /// char *strchr(const char *s, int c); |
| 4614 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strchr.html |
| 4615 | pub extern fn strchr(__s: [*c]const u8, __c: c_int) [*c]u8; |
| 4616 | |
| 4617 | /// int strcmp(const char *s1, const char *s2); |
| 4618 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strcmp.html |
| 4619 | pub extern fn strcmp(__s1: [*c]const u8, __s2: [*c]const u8) c_int; |
| 4620 | |
| 4621 | /// int strcoll(const char *s1, const char *s2); |
| 4622 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strcoll.html |
| 4623 | pub extern fn strcoll(__s1: [*c]const u8, __s2: [*c]const u8) c_int; |
| 4624 | |
| 4625 | /// int strcoll_l(const char *s1, const char *s2, locale_t locale); |
| 4626 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strcoll_l.html |
| 4627 | pub extern fn strcoll_l(__s1: [*c]const u8, __s2: [*c]const u8, __l: locale_t) c_int; |
| 4628 | |
| 4629 | /// char *strcpy(char *restrict s1, const char *restrict s2); |
| 4630 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strcpy.html |
| 4631 | pub extern fn strcpy(__dest: [*c]u8, __src: [*c]const u8) [*c]u8; |
| 4632 | |
| 4633 | /// size_t strcspn(const char *s1, const char *s2); |
| 4634 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strcspn.html |
| 4635 | pub extern fn strcspn(__s: [*c]const u8, __reject: [*c]const u8) c_ulong; |
| 4636 | |
| 4637 | /// char *strdup(const char *s); |
| 4638 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strdup.html |
| 4639 | pub extern fn strdup(__s: [*c]const u8) [*c]u8; |
| 4640 | |
| 4641 | /// char *strerror(int errnum); |
| 4642 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strerror.html |
| 4643 | pub extern fn strerror(__errnum: c_int) [*c]u8; |
| 4644 | |
| 4645 | /// char *strerror_l(int errnum, locale_t locale); |
| 4646 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strerror_l.html |
| 4647 | pub extern fn strerror_l(__errnum: c_int, __l: locale_t) [*c]u8; |
| 4648 | |
| 4649 | /// int strerror_r(int errnum, char *strerrbuf, size_t buflen); |
| 4650 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strerror_r.html |
| 4651 | pub extern fn strerror_r(__errnum: c_int, __buf: [*c]u8, __buflen: usize) c_int; |
| 4652 | |
| 4653 | /// ssize_t strfmon(char *restrict s, size_t maxsize, const char *restrict format, ...); |
| 4654 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strfmon.html |
| 4655 | pub extern fn strfmon(noalias __s: [*c]u8, __maxsize: usize, noalias __format: [*c]const u8, ...) isize; |
| 4656 | |
| 4657 | /// ssize_t strfmon_l(char *restrict s, size_t maxsize, locale_t locale, const char *restrict format, ...); |
| 4658 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strfmon_l.html |
| 4659 | pub extern fn strfmon_l(noalias __s: [*c]u8, __maxsize: usize, __loc: locale_t, noalias __format: [*c]const u8, ...) isize; |
| 4660 | |
| 4661 | /// size_t strftime(char *restrict s, size_t maxsize, const char *restrict format, const struct tm *restrict timeptr); |
| 4662 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strftime.html |
| 4663 | // pub extern fn strftime(noalias __s: [*c]u8, __maxsize: usize, noalias __format: [*c]const u8, noalias __tp: [*c]const struct_tm) usize; |
| 4664 | |
| 4665 | /// size_t strftime_l(char *restrict s, size_t maxsize, const char *restrict format, const struct tm *restrict timeptr, locale_t locale); |
| 4666 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strftime_l.html |
| 4667 | // pub extern fn strftime_l(noalias __s: [*c]u8, __maxsize: usize, noalias __format: [*c]const u8, noalias __tp: [*c]const struct_tm, __loc: locale_t) usize; |
| 4668 | |
| 4669 | /// size_t strlen(const char *s); |
| 4670 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strlen.html |
| 4671 | pub extern fn strlen(s: [*:0]const u8) c_ulong; |
| 4672 | |
| 4673 | /// int strncasecmp(const char *s1, const char *s2, size_t n); |
| 4674 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strncasecmp.html |
| 4675 | pub extern fn strncasecmp(__s1: [*c]const u8, __s2: [*c]const u8, __n: c_ulong) c_int; |
| 4676 | |
| 4677 | /// int strncasecmp_l(const char *s1, const char *s2, size_t n, locale_t locale); |
| 4678 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strncasecmp_l.html |
| 4679 | pub extern fn strncasecmp_l(__s1: [*c]const u8, __s2: [*c]const u8, __n: usize, __loc: locale_t) c_int; |
| 4680 | |
| 4681 | /// char *strncat(char *restrict s1, const char *restrict s2, size_t n); |
| 4682 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strncat.html |
| 4683 | pub extern fn strncat(__dest: [*c]u8, __src: [*c]const u8, __n: c_ulong) [*c]u8; |
| 4684 | |
| 4685 | /// int strncmp(const char *s1, const char *s2, size_t n); |
| 4686 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strncmp.html |
| 4687 | pub extern fn strncmp(__s1: [*c]const u8, __s2: [*c]const u8, __n: c_ulong) c_int; |
| 4688 | |
| 4689 | /// char *strncpy(char *restrict s1, const char *restrict s2, size_t n); |
| 4690 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strncpy.html |
| 4691 | pub extern fn strncpy(__dest: [*c]u8, __src: [*c]const u8, __n: c_ulong) [*c]u8; |
| 4692 | |
| 4693 | /// char *strndup(const char *s, size_t size); |
| 4694 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strndup.html |
| 4695 | pub extern fn strndup(__string: [*c]const u8, __n: c_ulong) [*c]u8; |
| 4696 | |
| 4697 | /// size_t strnlen(const char *s, size_t maxlen); |
| 4698 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strnlen.html |
| 4699 | pub extern fn strnlen(__string: [*c]const u8, __maxlen: usize) usize; |
| 4700 | |
| 4701 | /// char *strpbrk(const char *s1, const char *s2); |
| 4702 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strpbrk.html |
| 4703 | pub extern fn strpbrk(__s: [*c]const u8, __accept: [*c]const u8) [*c]u8; |
| 4704 | |
| 4705 | /// char *strptime(const char *restrict buf, const char *restrict format, struct tm *restrict tm); |
| 4706 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strptime.html |
| 4707 | pub const strptime = @compileError("TODO strptime"); |
| 4708 | |
| 4709 | /// char *strrchr(const char *s, int c); |
| 4710 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strrchr.html |
| 4711 | pub extern fn strrchr(__s: [*c]const u8, __c: c_int) [*c]u8; |
| 4712 | |
| 4713 | /// char *strsignal(int signum); |
| 4714 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strsignal.html |
| 4715 | pub extern fn strsignal(__sig: c_int) [*c]u8; |
| 4716 | |
| 4717 | /// size_t strspn(const char *s1, const char *s2); |
| 4718 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strspn.html |
| 4719 | pub extern fn strspn(__s: [*c]const u8, __accept: [*c]const u8) c_ulong; |
| 4720 | |
| 4721 | /// char *strstr(const char *s1, const char *s2); |
| 4722 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strstr.html |
| 4723 | pub extern fn strstr(__haystack: [*c]const u8, __needle: [*c]const u8) [*c]u8; |
| 4724 | |
| 4725 | /// double strtod(const char *restrict nptr, char **restrict endptr); |
| 4726 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strtod.html |
| 4727 | pub extern fn strtod(__nptr: [*c]const u8, __endptr: [*c][*c]u8) f64; |
| 4728 | |
| 4729 | /// float strtof(const char *restrict nptr, char **restrict endptr); |
| 4730 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strtof.html |
| 4731 | pub extern fn strtof(__nptr: [*c]const u8, __endptr: [*c][*c]u8) f32; |
| 4732 | |
| 4733 | /// intmax_t strtoimax(const char *restrict nptr, char **restrict endptr, int base); |
| 4734 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strtoimax.html |
| 4735 | pub extern fn strtoimax(noalias __nptr: [*c]const u8, noalias __endptr: [*c][*c]u8, __base: c_int) intmax_t; |
| 4736 | |
| 4737 | /// char *strtok(char *restrict s1, const char *restrict s2); |
| 4738 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strtok.html |
| 4739 | pub extern fn strtok(__s: [*c]u8, __delim: [*c]const u8) [*c]u8; |
| 4740 | |
| 4741 | /// char *strtok_r(char *restrict s, const char *restrict sep, char **restrict lasts); |
| 4742 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strtok_r.html |
| 4743 | pub extern fn strtok_r(noalias __s: [*c]u8, noalias __delim: [*c]const u8, noalias __save_ptr: [*c][*c]u8) [*c]u8; |
| 4744 | |
| 4745 | /// long strtol(const char *restrict str, char **restrict endptr, int base); |
| 4746 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strtol.html |
| 4747 | pub extern fn strtol(__nptr: [*c]const u8, __endptr: [*c][*c]u8, __base: c_int) c_long; |
| 4748 | |
| 4749 | /// long double strtold(const char *restrict nptr, char **restrict endptr); |
| 4750 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strtold.html |
| 4751 | pub extern fn strtold(__nptr: [*c]const u8, __endptr: [*c][*c]u8) c_longdouble; |
| 4752 | |
| 4753 | /// long long strtoll(const char *restrict str, char **restrict endptr, int base) |
| 4754 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strtoll.html |
| 4755 | pub extern fn strtoll(__nptr: [*c]const u8, __endptr: [*c][*c]u8, __base: c_int) c_longlong; |
| 4756 | |
| 4757 | /// unsigned long strtoul(const char *restrict str, char **restrict endptr, int base); |
| 4758 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strtoul.html |
| 4759 | pub extern fn strtoul(__nptr: [*c]const u8, __endptr: [*c][*c]u8, __base: c_int) c_ulong; |
| 4760 | |
| 4761 | /// unsigned long long strtoull(const char *restrict str, char **restrict endptr, int base); |
| 4762 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strtoull.html |
| 4763 | pub extern fn strtoull(__nptr: [*c]const u8, __endptr: [*c][*c]u8, __base: c_int) c_ulonglong; |
| 4764 | |
| 4765 | /// uintmax_t strtoumax(const char *restrict nptr, char **restrict endptr, int base); |
| 4766 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strtoumax.html |
| 4767 | // pub extern fn strtoumax(noalias __nptr: [*c]const u8, noalias __endptr: [*c][*c]u8, __base: c_int) uintmax_t; |
| 4768 | |
| 4769 | /// size_t strxfrm(char *restrict s1, const char *restrict s2, size_t n); |
| 4770 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strxfrm.html |
| 4771 | pub extern fn strxfrm(__dest: [*c]u8, __src: [*c]const u8, __n: c_ulong) c_ulong; |
| 4772 | |
| 4773 | /// size_t strxfrm_l(char *restrict s1, const char *restrict s2, size_t n, locale_t locale); |
| 4774 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/strxfrm_l.html |
| 4775 | pub extern fn strxfrm_l(__dest: [*c]u8, __src: [*c]const u8, __n: usize, __l: locale_t) usize; |
| 4776 | |
| 4777 | /// void swab(const void *restrict src, void *restrict dest, ssize_t nbytes); |
| 4778 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/swab.html |
| 4779 | pub const swab = @compileError("TODO swab"); |
| 4780 | |
| 4781 | /// int swprintf(wchar_t *restrict ws, size_t n, const wchar_t *restrict format, ...); |
| 4782 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/swprintf.html |
| 4783 | pub extern fn swprintf(noalias __s: [*c]wchar_t, __n: usize, noalias __format: [*c]const wchar_t, ...) c_int; |
| 4784 | |
| 4785 | /// int swscanf(const wchar_t *restrict ws, const wchar_t *restrict format, ...); |
| 4786 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/swscanf.html |
| 4787 | pub extern fn swscanf(noalias __s: [*c]const wchar_t, noalias __format: [*c]const wchar_t, ...) c_int; |
| 4788 | |
| 4789 | /// int symlink(const char *path1, const char *path2); |
| 4790 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/symlink.html |
| 4791 | pub extern fn symlink(__from: [*c]const u8, __to: [*c]const u8) c_int; |
| 4792 | |
| 4793 | /// int symlinkat(const char *path1, int fd, const char *path2); |
| 4794 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/symlinkat.html |
| 4795 | pub extern fn symlinkat(__from: [*c]const u8, __tofd: c_int, __to: [*c]const u8) c_int; |
| 4796 | |
| 4797 | /// void sync(void); |
| 4798 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sync.html |
| 4799 | pub extern fn sync() void; |
| 4800 | |
| 4801 | /// long sysconf(int name); |
| 4802 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/sysconf.html |
| 4803 | pub extern fn sysconf(name: c_int) c_long; |
| 4804 | |
| 4805 | /// void syslog(int priority, const char *message, ... /* arguments */); |
| 4806 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/syslog.html |
| 4807 | pub extern fn syslog(__pri: c_int, __fmt: [*c]const u8, ...) void; |
| 4808 | |
| 4809 | /// int system(const char *command); |
| 4810 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/system.html |
| 4811 | pub extern fn system(__command: [*c]const u8) c_int; |
| 4812 | |
| 4813 | /// double tan(double x); |
| 4814 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tan.html |
| 4815 | pub extern fn tan(x: f64) f64; |
| 4816 | |
| 4817 | /// float tanf(float x); |
| 4818 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tanf.html |
| 4819 | pub extern fn tanf(x: f32) f32; |
| 4820 | |
| 4821 | /// double tanh(double x); |
| 4822 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tanh.html |
| 4823 | pub extern fn tanh(x: f64) f64; |
| 4824 | |
| 4825 | /// float tanhf(float x); |
| 4826 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tanhf.html |
| 4827 | pub extern fn tanhf(x: f32) f32; |
| 4828 | |
| 4829 | /// long double tanhl(long double x); |
| 4830 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tanhl.html |
| 4831 | pub extern fn tanhl(x: c_longdouble) c_longdouble; |
| 4832 | |
| 4833 | /// long double tanl(long double x); |
| 4834 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tanl.html |
| 4835 | pub extern fn tanl(x: c_longdouble) c_longdouble; |
| 4836 | |
| 4837 | /// int tcdrain(int fildes); |
| 4838 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tcdrain.html |
| 4839 | pub extern fn tcdrain(fd: c_int) c_int; |
| 4840 | |
| 4841 | /// int tcflow(int fildes, int action); |
| 4842 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tcflow.html |
| 4843 | pub extern fn tcflow(fd: c_int, action: c_int) c_int; |
| 4844 | |
| 4845 | /// int tcflush(int fildes, int queue_selector); |
| 4846 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tcflush.html |
| 4847 | pub extern fn tcflush(fd: c_int, queue_selector: c_int) c_int; |
| 4848 | |
| 4849 | /// int tcgetattr(int fildes, struct termios *termios_p); |
| 4850 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tcgetattr.html |
| 4851 | pub extern fn tcgetattr(fd: c_int, termios_p: *struct_termios) c_int; |
| 4852 | |
| 4853 | /// pid_t tcgetpgrp(int fildes); |
| 4854 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tcgetpgrp.html |
| 4855 | pub extern fn tcgetpgrp(fd: c_int) pid_t; |
| 4856 | |
| 4857 | /// pid_t tcgetsid(int fildes); |
| 4858 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tcgetsid.html |
| 4859 | pub extern fn tcgetsid(fd: c_int) pid_t; |
| 4860 | |
| 4861 | /// int tcsendbreak(int fildes, int duration); |
| 4862 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tcsendbreak.html |
| 4863 | pub extern fn tcsendbreak(fd: c_int, duration: c_int) c_int; |
| 4864 | |
| 4865 | /// int tcsetattr(int fildes, int optional_actions, const struct termios *termios_p); |
| 4866 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tcsetattr.html |
| 4867 | pub extern fn tcsetattr(fd: c_int, optional_actions: c_int, termios_p: *const struct_termios) c_int; |
| 4868 | |
| 4869 | /// int tcsetpgrp(int fildes, pid_t pgid_id); |
| 4870 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tcsetpgrp.html |
| 4871 | // pub extern fn tcsetpgrp(__fd: c_int, __pgrp_id: __pid_t) c_int; |
| 4872 | |
| 4873 | /// void *tdelete(const void *restrict key, void **restrict rootp, int(*compar)(const void *, const void *)); |
| 4874 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tdelete.html |
| 4875 | // pub extern fn tdelete(noalias __key: ?*const anyopaque, noalias __rootp: [*c]?*anyopaque, __compar: __compar_fn_t) ?*anyopaque; |
| 4876 | |
| 4877 | /// long telldir(DIR *dirp); |
| 4878 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/telldir.html |
| 4879 | pub extern fn telldir(__dirp: ?*DIR) c_long; |
| 4880 | |
| 4881 | /// char *tempnam(const char *dir, const char *pfx); |
| 4882 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tempnam.html |
| 4883 | pub extern fn tempnam(__dir: [*c]const u8, __pfx: [*c]const u8) [*c]u8; |
| 4884 | |
| 4885 | /// void *tfind(const void *key, void *const *rootp, int(*compar)(const void *, const void *)); |
| 4886 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tfind.html |
| 4887 | // pub extern fn tfind(__key: ?*const anyopaque, __rootp: [*c]const ?*anyopaque, __compar: __compar_fn_t) ?*anyopaque; |
| 4888 | |
| 4889 | /// double tgamma(double x); |
| 4890 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tgamma.html |
| 4891 | pub extern fn tgamma(x: f64) f64; |
| 4892 | |
| 4893 | /// float tgammaf(float x); |
| 4894 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tgammaf.html |
| 4895 | pub extern fn tgammaf(x: f32) f32; |
| 4896 | |
| 4897 | /// long double tgammal(long double x); |
| 4898 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tgammal.html |
| 4899 | pub extern fn tgammal(x: c_longdouble) c_longdouble; |
| 4900 | |
| 4901 | /// time_t time(time_t *tloc); |
| 4902 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/time.html |
| 4903 | pub extern fn time(__timer: [*c]time_t) time_t; |
| 4904 | |
| 4905 | /// int timer_create(clockid_t clockid, struct sigevent *restrict evp, timer_t *restrict timerid); |
| 4906 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/timer_create.html |
| 4907 | // pub extern fn timer_create(__clock_id: clockid_t, noalias __evp: [*c]struct_sigevent, noalias __timerid: [*c]timer_t) c_int; |
| 4908 | |
| 4909 | /// int timer_delete(timer_t timerid); |
| 4910 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/timer_delete.html |
| 4911 | // pub extern fn timer_delete(__timerid: timer_t) c_int; |
| 4912 | |
| 4913 | /// int timer_getoverrun(timer_t timerid); |
| 4914 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/timer_getoverrun.html |
| 4915 | // pub extern fn timer_getoverrun(__timerid: timer_t) c_int; |
| 4916 | |
| 4917 | /// int timer_gettime(timer_t timerid, struct itimerspec *value); |
| 4918 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/timer_gettime.html |
| 4919 | // pub extern fn timer_gettime(__timerid: timer_t, __value: [*c]struct_itimerspec) c_int; |
| 4920 | |
| 4921 | /// int timer_settime(timer_t timerid, int flags, const struct itimerspec *restrict value, struct itimerspec *restrict ovalue); |
| 4922 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/timer_settime.html |
| 4923 | // pub extern fn timer_settime(__timerid: timer_t, __flags: c_int, noalias __value: [*c]const struct_itimerspec, noalias __ovalue: [*c]struct_itimerspec) c_int; |
| 4924 | |
| 4925 | /// clock_t times(struct tms *buffer); |
| 4926 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/times.html |
| 4927 | // pub extern fn times(__buffer: [*c]struct_tms) clock_t; |
| 4928 | |
| 4929 | /// FILE *tmpfile(void); |
| 4930 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tmpfile.html |
| 4931 | pub extern fn tmpfile() ?*FILE; |
| 4932 | |
| 4933 | /// char *tmpnam(char *s); |
| 4934 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tmpnam.html |
| 4935 | pub extern fn tmpnam(s: [*c]u8) [*c]u8; |
| 4936 | |
| 4937 | /// int toascii(int c); |
| 4938 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/toascii.html |
| 4939 | pub extern fn toascii(c: c_int) c_int; |
| 4940 | |
| 4941 | /// int tolower(int c); |
| 4942 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tolower.html |
| 4943 | pub extern fn tolower(c: c_int) c_int; |
| 4944 | |
| 4945 | /// int tolower_l(int c, locale_t locale); |
| 4946 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tolower_l.html |
| 4947 | pub extern fn tolower_l(c: c_int, locale: locale_t) c_int; |
| 4948 | |
| 4949 | /// int toupper(int c); |
| 4950 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/toupper.html |
| 4951 | pub extern fn toupper(c: c_int) c_int; |
| 4952 | |
| 4953 | /// int toupper_l(int c, locale_t locale); |
| 4954 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/toupper_l.html |
| 4955 | pub extern fn toupper_l(c: c_int, locale: locale_t) c_int; |
| 4956 | |
| 4957 | /// wint_t towctrans(wint_t wc, wctrans_t desc); |
| 4958 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/towctrans.html |
| 4959 | // pub extern fn towctrans(__wc: wint_t, __desc: wctrans_t) wint_t; |
| 4960 | |
| 4961 | /// wint_t towctrans_l(wint_t wc, wctrans_t desc, locale_t locale); |
| 4962 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/towctrans_l.html |
| 4963 | // pub extern fn towctrans_l(__wc: wint_t, __desc: wctrans_t, __locale: locale_t) wint_t; |
| 4964 | |
| 4965 | /// wint_t towlower(wint_t wc); |
| 4966 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/towlower.html |
| 4967 | pub extern fn towlower(wc: wint_t) wint_t; |
| 4968 | |
| 4969 | /// wint_t towlower_l(wint_t wc, locale_t locale); |
| 4970 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/towlower_l.html |
| 4971 | pub extern fn towlower_l(wc: wint_t, locale: locale_t) wint_t; |
| 4972 | |
| 4973 | /// wint_t towupper(wint_t wc); |
| 4974 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/towupper.html |
| 4975 | pub extern fn towupper(wc: wint_t) wint_t; |
| 4976 | |
| 4977 | /// wint_t towupper_l(wint_t wc, locale_t locale); |
| 4978 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/towupper_l.html |
| 4979 | pub extern fn towupper_l(wc: wint_t, locale: locale_t) wint_t; |
| 4980 | |
| 4981 | /// double trunc(double x); |
| 4982 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/trunc.html |
| 4983 | pub extern fn trunc(x: f64) f64; |
| 4984 | |
| 4985 | /// int truncate(const char *path, off_t length); |
| 4986 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/truncate.html |
| 4987 | pub extern fn truncate(__file: [*c]const u8, __length: off_t) c_int; |
| 4988 | |
| 4989 | /// float truncf(float x); |
| 4990 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/truncf.html |
| 4991 | pub extern fn truncf(x: f32) f32; |
| 4992 | |
| 4993 | /// long double truncl(long double x); |
| 4994 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/truncl.html |
| 4995 | pub extern fn truncl(x: c_longdouble) c_longdouble; |
| 4996 | |
| 4997 | /// void *tsearch(const void *key, void **rootp, int (*compar)(const void *, const void *)); |
| 4998 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tsearch.html |
| 4999 | // pub extern fn tsearch(__key: ?*const anyopaque, __rootp: [*c]?*anyopaque, __compar: __compar_fn_t) ?*anyopaque; |
| 5000 | |
| 5001 | /// char *ttyname(int fildes); |
| 5002 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ttyname.html |
| 5003 | pub extern fn ttyname(__fd: c_int) [*c]u8; |
| 5004 | |
| 5005 | /// int ttyname_r(int fildes, char *name, size_t namesize); |
| 5006 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ttyname_r.html |
| 5007 | pub extern fn ttyname_r(__fd: c_int, __buf: [*c]u8, __buflen: usize) c_int; |
| 5008 | |
| 5009 | /// void twalk(const void *root, void (*action)(const void *, VISIT, int)); |
| 5010 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/twalk.html |
| 5011 | // pub extern fn twalk(__root: ?*const anyopaque, __action: __action_fn_t) void; |
| 5012 | |
| 5013 | /// void tzset(void); |
| 5014 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/tzset.html |
| 5015 | pub extern fn tzset() void; |
| 5016 | |
| 5017 | /// long ulimit(int cmd, ...); |
| 5018 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ulimit.html |
| 5019 | pub extern fn ulimit(cmd: c_int, ...) c_long; |
| 5020 | |
| 5021 | /// mode_t umask(mode_t cmask); |
| 5022 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/umask.html |
| 5023 | pub extern fn umask(cmask: mode_t) mode_t; |
| 5024 | |
| 5025 | /// int uname(struct utsname *name); |
| 5026 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/uname.html |
| 5027 | // pub extern fn uname(__name: [*c]struct_utsname) c_int; |
| 5028 | |
| 5029 | /// int ungetc(int c, FILE *stream); |
| 5030 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ungetc.html |
| 5031 | pub extern fn ungetc(__c: c_int, __stream: [*c]FILE) c_int; |
| 5032 | |
| 5033 | /// wint_t ungetwc(wint_t wc, FILE *stream); |
| 5034 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/ungetwc.html |
| 5035 | // pub extern fn ungetwc(__wc: wint_t, __stream: [*c]__FILE) wint_t; |
| 5036 | |
| 5037 | /// int unlink(const char *path); |
| 5038 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/unlink.html |
| 5039 | pub extern fn unlink(__name: [*c]const u8) c_int; |
| 5040 | |
| 5041 | /// int unlinkat(int fd, const char *path, int flag); |
| 5042 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/unlinkat.html |
| 5043 | pub extern fn unlinkat(fd: c_int, name: [*:0]const u8, flag: c_int) c_int; |
| 5044 | |
| 5045 | /// int unlockpt(int fildes); |
| 5046 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/unlockpt.html |
| 5047 | pub extern fn unlockpt(fd: c_int) c_int; |
| 5048 | |
| 5049 | /// int unsetenv(const char *name); |
| 5050 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/unsetenv.html |
| 5051 | pub extern fn unsetenv(__name: [*c]const u8) c_int; |
| 5052 | |
| 5053 | /// locale_t uselocale(locale_t newloc); |
| 5054 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/uselocale.html |
| 5055 | pub extern fn uselocale(newloc: locale_t) locale_t; |
| 5056 | |
| 5057 | /// int utime(const char *path, const struct utimbuf *times); |
| 5058 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/utime.html |
| 5059 | // pub extern fn utime(__file: [*c]const u8, __file_times: [*c]const struct_utimbuf) c_int; |
| 5060 | |
| 5061 | /// int utimensat(int fd, const char *path, const struct timespec times[2], int flag); |
| 5062 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/utimensat.html |
| 5063 | pub extern fn utimensat(__fd: c_int, __path: [*c]const u8, __times: [*c]const struct_timespec, __flags: c_int) c_int; |
| 5064 | |
| 5065 | /// int utimes(const char *path, const struct timeval times[2]); |
| 5066 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/utimes.html |
| 5067 | // pub extern fn utimes(__file: [*c]const u8, __tvp: [*c]const struct_timeval) c_int; |
| 5068 | |
| 5069 | /// type va_arg(va_list ap, type); |
| 5070 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/va_arg.html |
| 5071 | pub const va_arg = @compileError("TODO va_arg"); |
| 5072 | |
| 5073 | /// void va_copy(va_list dest, va_list src); |
| 5074 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/va_copy.html |
| 5075 | pub const va_copy = @compileError("TODO va_copy"); |
| 5076 | |
| 5077 | /// void va_end(va_list ap); |
| 5078 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/va_end.html |
| 5079 | pub const va_end = @compileError("TODO va_end"); |
| 5080 | |
| 5081 | /// void va_start(va_list ap, argN); |
| 5082 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/va_start.html |
| 5083 | pub const va_start = @compileError("TODO va_start"); |
| 5084 | |
| 5085 | /// int vdprintf(int fildes, const char *restrict format, va_list ap); |
| 5086 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/vdprintf.html |
| 5087 | // pub extern fn vdprintf(__fd: c_int, noalias __fmt: [*c]const u8, __arg: [*c]struct___va_list_tag_37) c_int; |
| 5088 | |
| 5089 | /// int vfprintf(FILE *restrict stream, const char *restrict format, va_list ap); |
| 5090 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/vfprintf.html |
| 5091 | // pub extern fn vfprintf(__s: [*c]FILE, __format: [*c]const u8, __arg: [*c]struct___va_list_tag_37) c_int; |
| 5092 | |
| 5093 | /// int vfscanf(FILE *restrict stream, const char *restrict format, va_list arg); |
| 5094 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/vfscanf.html |
| 5095 | // pub extern fn vfscanf(noalias __s: [*c]FILE, noalias __format: [*c]const u8, __arg: [*c]struct___va_list_tag_37) c_int; |
| 5096 | |
| 5097 | /// int vfwprintf(FILE *restrict stream, const wchar_t *restrict format, va_list arg); |
| 5098 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/vfwprintf.html |
| 5099 | // pub extern fn vfwprintf(noalias __s: [*c]__FILE, noalias __format: [*c]const wchar_t, __arg: [*c]struct___va_list_tag_37) c_int; |
| 5100 | |
| 5101 | /// int vfwscanf(FILE *restrict stream, const wchar_t *restrict format, va_list arg); |
| 5102 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/vfwscanf.html |
| 5103 | // pub extern fn vfwscanf(noalias __s: [*c]__FILE, noalias __format: [*c]const wchar_t, __arg: [*c]struct___va_list_tag_37) c_int; |
| 5104 | |
| 5105 | /// int vprintf(const char *restrict format, va_list ap); |
| 5106 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/vprintf.html |
| 5107 | // pub extern fn vprintf(__format: [*c]const u8, __arg: [*c]struct___va_list_tag_37) c_int; |
| 5108 | |
| 5109 | /// int vscanf(const char *restrict format, va_list arg); |
| 5110 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/vscanf.html |
| 5111 | // pub extern fn vscanf(noalias __format: [*c]const u8, __arg: [*c]struct___va_list_tag_37) c_int; |
| 5112 | |
| 5113 | /// int vsnprintf(char *restrict s, size_t n, const char *restrict format, va_list ap); |
| 5114 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/vsnprintf.html |
| 5115 | // pub extern fn vsnprintf(__s: [*c]u8, __maxlen: c_ulong, __format: [*c]const u8, __arg: [*c]struct___va_list_tag_37) c_int; |
| 5116 | |
| 5117 | /// int vsprintf(char *restrict s, const char *restrict format, va_list ap); |
| 5118 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/vsprintf.html |
| 5119 | // pub extern fn vsprintf(__s: [*c]u8, __format: [*c]const u8, __arg: [*c]struct___va_list_tag_37) c_int; |
| 5120 | |
| 5121 | /// int vsscanf(const char *restrict s, const char *restrict format, va_list arg); |
| 5122 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/vsscanf.html |
| 5123 | // pub extern fn vsscanf(noalias __s: [*c]const u8, noalias __format: [*c]const u8, __arg: [*c]struct___va_list_tag_37) c_int; |
| 5124 | |
| 5125 | /// int vswprintf(wchar_t *restrict ws, size_t n, const wchar_t *restrict format, va_list arg); |
| 5126 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/vswprintf.html |
| 5127 | // pub extern fn vswprintf(noalias __s: [*c]wchar_t, __n: usize, noalias __format: [*c]const wchar_t, __arg: [*c]struct___va_list_tag_37) c_int; |
| 5128 | |
| 5129 | /// int vswscanf(const wchar_t *restrict ws, const wchar_t *restrict format, va_list arg); |
| 5130 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/vswscanf.html |
| 5131 | // pub extern fn vswscanf(noalias __s: [*c]const wchar_t, noalias __format: [*c]const wchar_t, __arg: [*c]struct___va_list_tag_37) c_int; |
| 5132 | |
| 5133 | /// int vwprintf(const wchar_t *restrict format, va_list arg); |
| 5134 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/vwprintf.html |
| 5135 | // pub extern fn vwprintf(noalias __format: [*c]const wchar_t, __arg: [*c]struct___va_list_tag_37) c_int; |
| 5136 | |
| 5137 | /// int vwscanf(const wchar_t *restrict format, va_list arg); |
| 5138 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/vwscanf.html |
| 5139 | // pub extern fn vwscanf(noalias __format: [*c]const wchar_t, __arg: [*c]struct___va_list_tag_37) c_int; |
| 5140 | |
| 5141 | /// pid_t wait(int *stat_loc); |
| 5142 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wait.html |
| 5143 | // pub extern fn wait(__stat_loc: [*c]c_int) __pid_t; |
| 5144 | |
| 5145 | /// int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options); |
| 5146 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/waitid.html |
| 5147 | // pub extern fn waitid(__idtype: idtype_t, __id: __id_t, __infop: [*c]siginfo_t, __options: c_int) c_int; |
| 5148 | |
| 5149 | /// pid_t waitpid(pid_t pid, int *stat_loc, int options); |
| 5150 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/waitpid.html |
| 5151 | pub extern fn waitpid(pid: pid_t, stat_loc: ?*c_int, options: c_int) pid_t; |
| 5152 | |
| 5153 | /// wchar_t *wcpcpy(wchar_t *restrict ws1, const wchar_t *restrict ws2); |
| 5154 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcpcpy.html |
| 5155 | pub extern fn wcpcpy(noalias __dest: [*c]wchar_t, noalias __src: [*c]const wchar_t) [*c]wchar_t; |
| 5156 | |
| 5157 | /// wchar_t *wcpncpy(wchar_t restrict *ws1, const wchar_t *restrict ws2, size_t n); |
| 5158 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcpncpy.html |
| 5159 | pub extern fn wcpncpy(noalias __dest: [*c]wchar_t, noalias __src: [*c]const wchar_t, __n: usize) [*c]wchar_t; |
| 5160 | |
| 5161 | /// size_t wcrtomb(char *restrict s, wchar_t wc, mbstate_t *restrict ps); |
| 5162 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcrtomb.html |
| 5163 | // pub extern fn wcrtomb(noalias __s: [*c]u8, __wc: wchar_t, noalias __ps: [*c]mbstate_t) usize; |
| 5164 | |
| 5165 | /// int wcscasecmp(const wchar_t *ws1, const wchar_t *ws2); |
| 5166 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcscasecmp.html |
| 5167 | pub extern fn wcscasecmp(__s1: [*c]const wchar_t, __s2: [*c]const wchar_t) c_int; |
| 5168 | |
| 5169 | /// int wcscasecmp_l(const wchar_t *ws1, const wchar_t *ws2, locale_t locale); |
| 5170 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcscasecmp_l.html |
| 5171 | pub extern fn wcscasecmp_l(__s1: [*c]const wchar_t, __s2: [*c]const wchar_t, __loc: locale_t) c_int; |
| 5172 | |
| 5173 | /// wchar_t *wcscat(wchar_t *restrict ws1, const wchar_t *restrict ws2); |
| 5174 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcscat.html |
| 5175 | pub extern fn wcscat(noalias __dest: [*c]wchar_t, noalias __src: [*c]const wchar_t) [*c]wchar_t; |
| 5176 | |
| 5177 | /// wchar_t *wcschr(const wchar_t *ws, wchar_t wc); |
| 5178 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcschr.html |
| 5179 | pub extern fn wcschr(__wcs: [*c]const c_int, __wc: c_int) [*c]c_int; |
| 5180 | |
| 5181 | /// int wcscmp(const wchar_t *ws1, const wchar_t *ws2); |
| 5182 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcscmp.html |
| 5183 | pub extern fn wcscmp(__s1: [*c]const c_int, __s2: [*c]const c_int) c_int; |
| 5184 | |
| 5185 | /// int wcscoll(const wchar_t *ws1, const wchar_t *ws2); |
| 5186 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcscoll.html |
| 5187 | pub extern fn wcscoll(__s1: [*c]const wchar_t, __s2: [*c]const wchar_t) c_int; |
| 5188 | |
| 5189 | /// int wcscoll_l(const wchar_t *ws1, const wchar_t *ws2, locale_t locale); |
| 5190 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcscoll_l.html |
| 5191 | pub extern fn wcscoll_l(__s1: [*c]const wchar_t, __s2: [*c]const wchar_t, __loc: locale_t) c_int; |
| 5192 | |
| 5193 | /// wchar_t *wcscpy(wchar_t *restrict ws1, const wchar_t *restrict ws2); |
| 5194 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcscpy.html |
| 5195 | pub extern fn wcscpy(noalias __dest: [*c]wchar_t, noalias __src: [*c]const wchar_t) [*c]wchar_t; |
| 5196 | |
| 5197 | /// size_t wcscspn(const wchar_t *ws1, const wchar_t *ws2); |
| 5198 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcscspn.html |
| 5199 | pub extern fn wcscspn(__wcs: [*c]const wchar_t, __reject: [*c]const wchar_t) usize; |
| 5200 | |
| 5201 | /// wchar_t *wcsdup(const wchar_t *string); |
| 5202 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcsdup.html |
| 5203 | pub extern fn wcsdup(__s: [*c]const wchar_t) [*c]wchar_t; |
| 5204 | |
| 5205 | /// size_t wcsftime(wchar_t *restrict wcs, size_t maxsize, const wchar_t *restrict format, const struct tm *restrict timeptr); |
| 5206 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcsftime.html |
| 5207 | // pub extern fn wcsftime(noalias __s: [*c]wchar_t, __maxsize: usize, noalias __format: [*c]const wchar_t, noalias __tp: [*c]const struct_tm) usize; |
| 5208 | |
| 5209 | /// size_t wcslen(const wchar_t *ws); |
| 5210 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcslen.html |
| 5211 | pub extern fn wcslen(__s: [*c]const c_int) c_ulong; |
| 5212 | |
| 5213 | /// int wcsncasecmp(const wchar_t *ws1, const wchar_t *ws2, size_t n); |
| 5214 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcsncasecmp.html |
| 5215 | pub extern fn wcsncasecmp(__s1: [*c]const wchar_t, __s2: [*c]const wchar_t, __n: usize) c_int; |
| 5216 | |
| 5217 | /// int wcsncasecmp_l(const wchar_t *ws1, const wchar_t *ws2, size_t n, locale_t locale); |
| 5218 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcsncasecmp_l.html |
| 5219 | pub extern fn wcsncasecmp_l(__s1: [*c]const wchar_t, __s2: [*c]const wchar_t, __n: usize, __loc: locale_t) c_int; |
| 5220 | |
| 5221 | /// wchar_t *wcsncat(wchar_t *restrict ws1, const wchar_t *restrict ws2, size_t n); |
| 5222 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcsncat.html |
| 5223 | pub extern fn wcsncat(noalias __dest: [*c]wchar_t, noalias __src: [*c]const wchar_t, __n: usize) [*c]wchar_t; |
| 5224 | |
| 5225 | /// int wcsncmp(const wchar_t *ws1, const wchar_t *ws2, size_t n); |
| 5226 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcsncmp.html |
| 5227 | pub extern fn wcsncmp(__s1: [*c]const c_int, __s2: [*c]const c_int, __n: c_ulong) c_int; |
| 5228 | |
| 5229 | /// wchar_t *wcsncpy(wchar_t *restrict ws1, const wchar_t *restrict ws2, size_t n); |
| 5230 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcsncpy.html |
| 5231 | pub extern fn wcsncpy(noalias __dest: [*c]wchar_t, noalias __src: [*c]const wchar_t, __n: usize) [*c]wchar_t; |
| 5232 | |
| 5233 | /// size_t wcsnlen(const wchar_t *ws, size_t maxlen); |
| 5234 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcsnlen.html |
| 5235 | pub extern fn wcsnlen(__s: [*c]const wchar_t, __maxlen: usize) usize; |
| 5236 | |
| 5237 | /// size_t wcsnrtombs(char *restrict dst, const wchar_t **restrict src, size_t nwc, size_t len, mbstate_t *restrict ps); |
| 5238 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcsnrtombs.html |
| 5239 | // pub extern fn wcsnrtombs(noalias __dst: [*c]u8, noalias __src: [*c][*c]const wchar_t, __nwc: usize, __len: usize, noalias __ps: [*c]mbstate_t) usize; |
| 5240 | |
| 5241 | /// wchar_t *wcspbrk(const wchar_t *ws1, const wchar_t *ws2); |
| 5242 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcspbrk.html |
| 5243 | pub extern fn wcspbrk(__wcs: [*c]const wchar_t, __accept: [*c]const wchar_t) [*c]wchar_t; |
| 5244 | |
| 5245 | /// wchar_t *wcsrchr(const wchar_t *ws, wchar_t wc); |
| 5246 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcsrchr.html |
| 5247 | pub extern fn wcsrchr(__wcs: [*c]const wchar_t, __wc: wchar_t) [*c]wchar_t; |
| 5248 | |
| 5249 | /// size_t wcsrtombs(char *restrict dst, const wchar_t **restrict src, size_t len, mbstate_t *restrict ps); |
| 5250 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcsrtombs.html |
| 5251 | // pub extern fn wcsrtombs(noalias __dst: [*c]u8, noalias __src: [*c][*c]const wchar_t, __len: usize, noalias __ps: [*c]mbstate_t) usize; |
| 5252 | |
| 5253 | /// size_t wcsspn(const wchar_t *ws1, const wchar_t *ws2); |
| 5254 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcsspn.html |
| 5255 | pub extern fn wcsspn(__wcs: [*c]const wchar_t, __accept: [*c]const wchar_t) usize; |
| 5256 | |
| 5257 | /// wchar_t *wcsstr(const wchar_t *restrict ws1, const wchar_t *restrict ws2); |
| 5258 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcsstr.html |
| 5259 | pub extern fn wcsstr(__haystack: [*c]const wchar_t, __needle: [*c]const wchar_t) [*c]wchar_t; |
| 5260 | |
| 5261 | /// double wcstod(const wchar_t *restrict nptr, wchar_t **restrict endptr); |
| 5262 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcstod.html |
| 5263 | pub extern fn wcstod(noalias __nptr: [*c]const wchar_t, noalias __endptr: [*c][*c]wchar_t) f64; |
| 5264 | |
| 5265 | /// float wcstof(const wchar_t *restrict nptr, wchar_t **restrict endptr); |
| 5266 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcstof.html |
| 5267 | pub extern fn wcstof(noalias __nptr: [*c]const wchar_t, noalias __endptr: [*c][*c]wchar_t) f32; |
| 5268 | |
| 5269 | /// intmax_t wcstoimax(const wchar_t *restrict nptr, wchar_t **restrict endptr, int base); |
| 5270 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcstoimax.html |
| 5271 | // pub extern fn wcstoimax(noalias __nptr: [*c]const __gwchar_t, noalias __endptr: [*c][*c]__gwchar_t, __base: c_int) intmax_t; |
| 5272 | |
| 5273 | /// wchar_t *wcstok(wchar_t *restrict ws1, const wchar_t *restrict ws2, wchar_t **restrict ptr); |
| 5274 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcstok.html |
| 5275 | pub extern fn wcstok(noalias __s: [*c]wchar_t, noalias __delim: [*c]const wchar_t, noalias __ptr: [*c][*c]wchar_t) [*c]wchar_t; |
| 5276 | |
| 5277 | /// long wcstol(const wchar_t *restrict nptr, wchar_t **restrict endptr, int base); |
| 5278 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcstol.html |
| 5279 | pub extern fn wcstol(noalias __nptr: [*c]const wchar_t, noalias __endptr: [*c][*c]wchar_t, __base: c_int) c_long; |
| 5280 | |
| 5281 | /// long double wcstold(const wchar_t *restrict nptr, wchar_t **restrict endptr); |
| 5282 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcstold.html |
| 5283 | pub extern fn wcstold(noalias __nptr: [*c]const wchar_t, noalias __endptr: [*c][*c]wchar_t) c_longdouble; |
| 5284 | |
| 5285 | /// long long wcstoll(const wchar_t *restrict nptr, wchar_t **restrict endptr, int base); |
| 5286 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcstoll.html |
| 5287 | pub extern fn wcstoll(noalias __nptr: [*c]const wchar_t, noalias __endptr: [*c][*c]wchar_t, __base: c_int) c_longlong; |
| 5288 | |
| 5289 | /// size_t wcstombs(char *restrict s, const wchar_t *restrict pwcs, size_t n); |
| 5290 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcstombs.html |
| 5291 | pub extern fn wcstombs(noalias __s: [*c]u8, noalias __pwcs: [*c]const wchar_t, __n: usize) usize; |
| 5292 | |
| 5293 | /// unsigned long wcstoul(const wchar_t *restrict nptr, wchar_t **restrict endptr, int base); |
| 5294 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcstoul.html |
| 5295 | pub extern fn wcstoul(noalias __nptr: [*c]const wchar_t, noalias __endptr: [*c][*c]wchar_t, __base: c_int) c_ulong; |
| 5296 | |
| 5297 | /// unsigned long long wcstoull(const wchar_t *restrict nptr, wchar_t **restrict endptr, int base); |
| 5298 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcstoull.html |
| 5299 | pub extern fn wcstoull(noalias __nptr: [*c]const wchar_t, noalias __endptr: [*c][*c]wchar_t, __base: c_int) c_ulonglong; |
| 5300 | |
| 5301 | /// uintmax_t wcstoumax(const wchar_t *restrict nptr, wchar_t **restrict endptr, int base); |
| 5302 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcstoumax.html |
| 5303 | // pub extern fn wcstoumax(noalias __nptr: [*c]const __gwchar_t, noalias __endptr: [*c][*c]__gwchar_t, __base: c_int) uintmax_t; |
| 5304 | |
| 5305 | /// int wcswidth(const wchar_t *pwcs, size_t n); |
| 5306 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcswidth.html |
| 5307 | pub const wcswidth = @compileError("TODO wcswidth"); |
| 5308 | |
| 5309 | /// size_t wcsxfrm(wchar_t *restrict ws1, const wchar_t *restrict ws2, size_t n); |
| 5310 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcsxfrm.html |
| 5311 | pub extern fn wcsxfrm(noalias __s1: [*c]wchar_t, noalias __s2: [*c]const wchar_t, __n: usize) usize; |
| 5312 | |
| 5313 | /// size_t wcsxfrm_l(wchar_t *restrict ws1, const wchar_t *restrict ws2, size_t n, locale_t locale); |
| 5314 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcsxfrm_l.html |
| 5315 | pub extern fn wcsxfrm_l(__s1: [*c]wchar_t, __s2: [*c]const wchar_t, __n: usize, __loc: locale_t) usize; |
| 5316 | |
| 5317 | /// int wctob(wint_t c); |
| 5318 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wctob.html |
| 5319 | pub extern fn wctob(c: wint_t) c_int; |
| 5320 | |
| 5321 | /// int wctomb(char *s, wchar_t wchar); |
| 5322 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wctomb.html |
| 5323 | pub extern fn wctomb(__s: [*c]u8, __wchar: wchar_t) c_int; |
| 5324 | |
| 5325 | /// wctrans_t wctrans(const char *charclass); |
| 5326 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wctrans.html |
| 5327 | // pub extern fn wctrans(__property: [*c]const u8) wctrans_t; |
| 5328 | |
| 5329 | /// wctrans_t wctrans_l(const char *charclass, locale_t locale); |
| 5330 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wctrans_l.html |
| 5331 | // pub extern fn wctrans_l(__property: [*c]const u8, __locale: locale_t) wctrans_t; |
| 5332 | |
| 5333 | /// wctype_t wctype(const char *property); |
| 5334 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wctype.html |
| 5335 | // pub extern fn wctype(__property: [*c]const u8) wctype_t; |
| 5336 | |
| 5337 | /// wctype_t wctype_l(const char *property, locale_t locale); |
| 5338 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wctype_l.html |
| 5339 | // pub extern fn wctype_l(__property: [*c]const u8, __locale: locale_t) wctype_t; |
| 5340 | |
| 5341 | /// int wcwidth(wchar_t wc); |
| 5342 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wcwidth.html |
| 5343 | pub extern fn wcwidth(wc: wchar_t) c_int; |
| 5344 | |
| 5345 | /// wchar_t *wmemchr(const wchar_t *ws, wchar_t wc, size_t n); |
| 5346 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wmemchr.html |
| 5347 | pub extern fn wmemchr(__s: [*c]const c_int, __c: c_int, __n: c_ulong) [*c]c_int; |
| 5348 | |
| 5349 | /// int wmemcmp(const wchar_t *ws1, const wchar_t *ws2, size_t n); |
| 5350 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wmemcmp.html |
| 5351 | pub extern fn wmemcmp(__s1: [*c]const c_int, __s2: [*c]const c_int, __n: c_ulong) c_int; |
| 5352 | |
| 5353 | /// wchar_t *wmemcpy(wchar_t *restrict ws1, const wchar_t *restrict ws2, size_t n); |
| 5354 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wmemcpy.html |
| 5355 | pub extern fn wmemcpy(__s1: [*c]c_int, __s2: [*c]const c_int, __n: c_ulong) [*c]c_int; |
| 5356 | |
| 5357 | /// wchar_t *wmemmove(wchar_t *ws1, const wchar_t *ws2, size_t n); |
| 5358 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wmemmove.html |
| 5359 | pub extern fn wmemmove(__s1: [*c]c_int, __s2: [*c]const c_int, __n: c_ulong) [*c]c_int; |
| 5360 | |
| 5361 | /// wchar_t *wmemset(wchar_t *ws, wchar_t wc, size_t n); |
| 5362 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wmemset.html |
| 5363 | pub extern fn wmemset(__s: [*c]wchar_t, __c: wchar_t, __n: usize) [*c]wchar_t; |
| 5364 | |
| 5365 | /// int wordexp(const char *restrict words, wordexp_t *restrict pwordexp, int flags); |
| 5366 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wordexp.html |
| 5367 | // pub extern fn wordexp(noalias __words: [*c]const u8, noalias __pwordexp: [*c]wordexp_t, __flags: c_int) c_int; |
| 5368 | |
| 5369 | /// void wordfree(wordexp_t *pwordexp); |
| 5370 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wordfree.html |
| 5371 | // pub extern fn wordfree(__wordexp: [*c]wordexp_t) void; |
| 5372 | |
| 5373 | /// int wprintf(const wchar_t *restrict format, ...); |
| 5374 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wprintf.html |
| 5375 | pub extern fn wprintf(noalias __format: [*c]const wchar_t, ...) c_int; |
| 5376 | |
| 5377 | /// ssize_t write(int fildes, const void *buf, size_t nbyte); |
| 5378 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/write.html |
| 5379 | pub extern fn write(fd: c_int, buf: *const anyopaque, n: usize) isize; |
| 5380 | |
| 5381 | /// ssize_t writev(int fildes, const struct iovec *iov, int iovcnt); |
| 5382 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/writev.html |
| 5383 | pub extern fn writev(fd: c_int, iovec: [*]const struct_iovec, count: c_int) isize; |
| 5384 | |
| 5385 | /// int wscanf(const wchar_t *restrict format, ...); |
| 5386 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/wscanf.html |
| 5387 | pub extern fn wscanf(noalias __format: [*c]const wchar_t, ...) c_int; |
| 5388 | |
| 5389 | /// double y0(double x); |
| 5390 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/y0.html |
| 5391 | pub extern fn y0(x: f64) f64; |
| 5392 | |
| 5393 | /// double y1(double x); |
| 5394 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/y1.html |
| 5395 | pub extern fn y1(x: f64) f64; |
| 5396 | |
| 5397 | /// double yn(int n, double x); |
| 5398 | /// https://pubs.opengroup.org/onlinepubs/9699919799.orig/functions/yn.html |
| 5399 | pub extern fn yn(n: c_int, x: f64) f64; |
| 5400 | |
| 5401 | // |
| 5402 | // |
| 5403 | |
| 5404 | pub extern fn __errno_location() *c_int; |
| 5405 | pub extern fn gettid() pid_t; |
| 5406 | pub extern fn accept4(socket: c_int, noalias address: ?*struct_sockaddr, noalias address_len: *socklen_t, flags: c_int) c_int; |
| 5407 | pub extern fn memfd_create(name: [*:0]const u8, flags: c_uint) c_int; |
| 5408 | pub extern fn sendfile(out_fd: c_int, in_fd: c_int, offset: ?*const off_t, count: usize) isize; |
| 5409 | pub extern fn getdents(dirfd: c_int, buf: [*]u8, nbytes: usize) c_int; |
| 5410 | pub extern fn sched_getaffinity(pid: pid_t, cpusetsize: usize, mask: *cpu_set_t) c_int; |
| 5411 | pub extern fn getrandom(buf: [*]u8, size: usize, flags: c_uint) isize; |
| 5412 | pub extern fn flock(fd: c_int, op: c_int) c_int; |
| 5413 | pub extern fn copy_file_range(fd_int: c_int, off_in: ?*off_t, fd_out: c_int, off_out: ?*off_t, size: usize, flags: c_uint) isize; |
| 5414 | pub extern fn arc4random_buf(buf: [*]u8, n: usize) void; |
| 5415 | }; |
| 5416 | |
| 5417 | comptime { |
| 5418 | const C = struct { |
| 5419 | fn getdents(dirfd: c_int, buf: [*]u8, nbytes: usize) callconv(.c) c_int { |
| 5420 | const rc = std.os.linux.syscall3(.getdents64, @intCast(dirfd), @intFromPtr(buf), nbytes); |
| 5421 | const signed_r: isize = @bitCast(rc); |
| 5422 | if (signed_r < 0 and signed_r > -4096) { |
| 5423 | libc.__errno_location().* = @intCast(-signed_r); |
| 5424 | return -1; |
| 5425 | } |
| 5426 | return @intCast(rc); |
| 5427 | } |
| 5428 | }; |
| 5429 | if (builtin.abi.isGnu()) @export(&C.getdents, .{ .name = "getdents", .linkage = .weak }); // glibc chooses to only expose this as getdents64 |
| 5430 | } |
| 5431 | |
| 5432 | pub const clock_t = c_long; |
| 5433 | pub const pid_t = c_int; |
| 5434 | pub const gid_t = c_uint; |
| 5435 | pub const uid_t = c_uint; |
| 5436 | pub const struct_group = opaque {}; |
| 5437 | pub const struct_hostent = opaque {}; |
| 5438 | pub const struct_netent = opaque {}; |
| 5439 | pub const struct_protoent = opaque {}; |
| 5440 | pub const struct_passwd = opaque {}; |
| 5441 | pub const struct_servent = opaque {}; |
| 5442 | pub const struct_utmpx = opaque {}; |
| 5443 | pub const wint_t = c_uint; |
| 5444 | pub const struct_if_nameindex = opaque {}; |
| 5445 | pub const struct_lconv = opaque {}; |
| 5446 | pub const FILE = opaque {}; |
| 5447 | pub const locale_t = *const opaque {}; |
| 5448 | pub const nl_catd = *const opaque {}; |
| 5449 | pub const intmax_t = i64; |
| 5450 | pub const wchar_t = c_int; |
| 5451 | pub const mode_t = c_uint; |
| 5452 | pub const socklen_t = c_uint; |
| 5453 | pub const clockid_t = c_int; |
| 5454 | pub const struct_timespec = extern struct { sec: isize, nsec: isize }; |
| 5455 | pub const struct_timeval = linux.timeval; |
| 5456 | pub const DIR = opaque {}; |
| 5457 | pub const time_t = i64; |
| 5458 | pub const div_t = extern struct { quot: c_int, rem: c_int }; |
| 5459 | pub const off_t = i64; |
| 5460 | pub const ino_t = u64; |
| 5461 | pub const dev_t = u64; |
| 5462 | pub const nlink_t = c_ulong; |
| 5463 | pub const blksize_t = c_long; |
| 5464 | pub const blkcnt_t = i64; |
| 5465 | pub const struct_stat = switch (arch) { |
| 5466 | .mips64, .mips64el => extern struct { dev: dev_t, __pad1: [3]c_int, ino: ino_t, mode: mode_t, nlink: nlink_t, uid: uid_t, gid: gid_t, rdev: dev_t, __pad2: [2]c_uint, size: off_t, __pad3: c_int, atim: struct_timespec, mtim: struct_timespec, ctim: struct_timespec, blksize: blksize_t, __pad4: c_uint, blocks: blkcnt_t, __pad5: [14]c_int }, |
| 5467 | .powerpc64, .powerpc64le => extern struct { dev: dev_t, ino: ino_t, nlink: nlink_t, mode: mode_t, uid: uid_t, gid: gid_t, rdev: dev_t, size: off_t, blksize: blksize_t, blocks: blkcnt_t, atim: struct_timespec, mtim: struct_timespec, ctim: struct_timespec, __unused: [3]c_ulong }, |
| 5468 | .s390x => extern struct { dev: dev_t, ino: ino_t, nlink: nlink_t, mode: mode_t, uid: uid_t, gid: gid_t, rdev: dev_t, size: off_t, atim: struct_timespec, mtim: struct_timespec, ctim: struct_timespec, blksize: blksize_t, blocks: blkcnt_t, __unused: [3]c_ulong }, |
| 5469 | .x86_64 => extern struct { dev: dev_t, ino: ino_t, nlink: nlink_t, mode: mode_t, uid: uid_t, gid: gid_t, __pad0: c_uint, rdev: dev_t, size: off_t, blksize: blksize_t, blocks: blkcnt_t, atim: struct_timespec, mtim: struct_timespec, ctim: struct_timespec, __unused: [3]c_long }, |
| 5470 | // generic |
| 5471 | .aarch64, |
| 5472 | .riscv64, |
| 5473 | => extern struct { dev: dev_t, ino: ino_t, mode: mode_t, nlink: nlink_t, uid: uid_t, gid: gid_t, rdev: dev_t, __pad: c_ulonglong, size: off_t, blksize: blksize_t, __pad2: c_int, blocks: blkcnt_t, atim: struct_timespec, mtim: struct_timespec, ctim: struct_timespec, __unused: [2]c_uint }, |
| 5474 | else => unreachable, |
| 5475 | }; |
| 5476 | pub const struct_iovec = extern struct { base: [*]u8, len: usize }; |
| 5477 | pub const in_addr_t = u32; |
| 5478 | pub const in_port_t = u16; |
| 5479 | pub const sa_family_t = c_ushort; |
| 5480 | pub const struct_in_addr = extern struct { addr: in_addr_t }; |
| 5481 | pub const struct_in6_addr = extern struct { addr: [16]u8 }; |
| 5482 | pub const struct_sockaddr = extern struct { family: AF, data: [14]u8 }; |
| 5483 | pub const struct_sockaddr_in = extern struct { family: AF = .INET, port: in_port_t, addr: struct_in_addr, zero: [8]u8 = @splat(0) }; |
| 5484 | pub const struct_sockaddr_in6 = extern struct { family: AF = .INET6, port: in_port_t, flowinfo: u32, addr: struct_in6_addr, scope_id: u32 }; |
| 5485 | pub const struct_sockaddr_un = extern struct { family: AF = .UNIX, path: [108]u8 }; |
| 5486 | pub const struct_addrinfo = extern struct { flags: c_int, family: c_int, socktype: c_int, protocol: c_int, addrlen: socklen_t, addr: ?*struct_sockaddr, canonname: ?[*:0]u8, next: ?*struct_addrinfo }; |
| 5487 | pub const struct_dirent = extern struct { ino: ino_t, off: off_t, reclen: c_ushort, type: DT, name: [NAME_MAX + 1]u8 }; |
| 5488 | pub const cpu_set_t = [1024 / 8 / @sizeOf(c_ulong)]c_ulong; |
| 5489 | pub const nfds_t = c_ulong; |
| 5490 | pub const struct_pollfd = extern struct { fd: c_int, events: c_short, revents: c_short }; |
| 5491 | pub const struct_tm = extern struct { sec: c_int, min: c_int, hour: c_int, mday: c_int, mon: c_int, year: c_int, wday: c_int, yday: c_int, isdst: c_int, gmtoff: c_long, zone: [*:0]const u8 }; |
| 5492 | |
| 5493 | const impdef = @cImport({ |
| 5494 | @cInclude("pthread.h"); |
| 5495 | @cInclude("termios.h"); |
| 5496 | }); |
| 5497 | pub const pthread_t = impdef.pthread_t; |
| 5498 | pub const pthread_attr_t = impdef.pthread_attr_t; |
| 5499 | pub const pthread_mutexattr_t = impdef.pthread_mutexattr_t; |
| 5500 | pub const pthread_mutex_t = impdef.pthread_mutex_t; |
| 5501 | pub const pthread_condattr_t = impdef.pthread_condattr_t; |
| 5502 | pub const pthread_cond_t = impdef.pthread_cond_t; |
| 5503 | pub const pthread_rwlockattr_t = impdef.pthread_rwlockattr_t; |
| 5504 | pub const pthread_rwlock_t = impdef.pthread_rwlock_t; |
| 5505 | pub const struct_termios = impdef.struct_termios; |
| 5506 | |
| 5507 | pub const AT = struct { |
| 5508 | pub const FDCWD = -100; |
| 5509 | pub const SYMLINK_NOFOLLOW = 0x100; |
| 5510 | pub const REMOVEDIR = 0x200; |
| 5511 | pub const SYMLINK_FOLLOW = 0x400; |
| 5512 | pub const EACCESS = 0x200; |
| 5513 | }; |
| 5514 | |
| 5515 | pub const O = struct { |
| 5516 | pub const CREAT = if (arch != .mips64el) 0o100 else 0o400; |
| 5517 | pub const EXCL = if (arch != .mips64el) 0o200 else 0o2000; |
| 5518 | pub const NOCTTY = if (arch != .mips64el) 0o400 else 0o4000; |
| 5519 | pub const TRUNC = 0o1000; |
| 5520 | pub const APPEND = if (arch != .mips64el) 0o2000 else 0o010; |
| 5521 | pub const NONBLOCK = if (arch != .mips64el) 0o4000 else 0o200; |
| 5522 | pub const DSYNC = if (arch != .mips64el) 0o10000 else 0o020; |
| 5523 | pub const SYNC = if (arch != .mips64el) 0o4010000 else 0o40020; |
| 5524 | pub const RSYNC = if (arch != .mips64el) 0o4010000 else 0o40020; |
| 5525 | pub const DIRECTORY = if (arch == .aarch64 or arch == .powerpc64le) 0o40000 else 0o200000; |
| 5526 | pub const NOFOLLOW = if (arch == .aarch64 or arch == .powerpc64le) 0o100000 else 0o400000; |
| 5527 | pub const CLOEXEC = 0o2000000; |
| 5528 | pub const ASYNC = if (arch != .mips64el) 0o20000 else 0o10000; |
| 5529 | pub const DIRECT = switch (arch) { |
| 5530 | .x86_64, .riscv64 => 0o40000, // generic |
| 5531 | .aarch64 => 0o200000, |
| 5532 | .powerpc64le => 0o400000, |
| 5533 | .mips64el => 0o100000, |
| 5534 | else => @compileError("TODO"), |
| 5535 | }; |
| 5536 | pub const LARGEFILE = switch (arch) { |
| 5537 | .x86_64, .riscv64 => 0o100000, // generic |
| 5538 | .aarch64 => 0o400000, |
| 5539 | .powerpc64le => 0o200000, |
| 5540 | .mips64el => 0o20000, |
| 5541 | else => @compileError("TODO"), |
| 5542 | }; |
| 5543 | pub const NOATIME = 0o1000000; |
| 5544 | pub const PATH = 0o10000000; |
| 5545 | pub const TMPFILE = if (arch == .aarch64 or arch == .powerpc64le) 0o20040000 else 0o20200000; |
| 5546 | pub const NDELAY = O.NONBLOCK; |
| 5547 | pub const SEARCH = O.PATH; |
| 5548 | pub const EXEC = O.PATH; |
| 5549 | pub const TTY_INIT = 0; |
| 5550 | pub const ACCMODE = (3 | O.SEARCH); |
| 5551 | pub const RDONLY = 0; |
| 5552 | pub const WRONLY = 1; |
| 5553 | pub const RDWR = 2; |
| 5554 | }; |
| 5555 | |
| 5556 | pub const S = struct { |
| 5557 | pub const IFMT = 0o170000; |
| 5558 | pub const IFDIR = 0o040000; |
| 5559 | pub const IFCHR = 0o020000; |
| 5560 | pub const IFBLK = 0o060000; |
| 5561 | pub const IFREG = 0o100000; |
| 5562 | pub const IFIFO = 0o010000; |
| 5563 | pub const IFLNK = 0o120000; |
| 5564 | pub const IFSOCK = 0o140000; |
| 5565 | pub const IFWHT = 0o160000; //unused |
| 5566 | |
| 5567 | pub const ISUID = 0o4000; |
| 5568 | pub const ISGID = 0o2000; |
| 5569 | pub const ISVTX = 0o1000; |
| 5570 | pub const IRUSR = 0o400; |
| 5571 | pub const IWUSR = 0o200; |
| 5572 | pub const IXUSR = 0o100; |
| 5573 | pub const IRWXU = 0o700; |
| 5574 | pub const IRGRP = 0o040; |
| 5575 | pub const IWGRP = 0o020; |
| 5576 | pub const IXGRP = 0o010; |
| 5577 | pub const IRWXG = 0o070; |
| 5578 | pub const IROTH = 0o004; |
| 5579 | pub const IWOTH = 0o002; |
| 5580 | pub const IXOTH = 0o001; |
| 5581 | pub const IRWXO = 0o007; |
| 5582 | }; |
| 5583 | |
| 5584 | pub const CLOCK = struct { |
| 5585 | pub const REALTIME = 0; |
| 5586 | pub const MONOTONIC = 1; |
| 5587 | pub const PROCESS_CPUTIME_ID = 2; |
| 5588 | pub const THREAD_CPUTIME_ID = 3; |
| 5589 | pub const MONOTONIC_RAW = 4; |
| 5590 | pub const REALTIME_COARSE = 5; |
| 5591 | pub const MONOTONIC_COARSE = 6; |
| 5592 | pub const BOOTTIME = 7; |
| 5593 | pub const REALTIME_ALARM = 8; |
| 5594 | pub const BOOTTIME_ALARM = 9; |
| 5595 | pub const SGI_CYCLE = 10; |
| 5596 | pub const TAI = 11; |
| 5597 | }; |
| 5598 | |
| 5599 | pub const MAP = struct { |
| 5600 | pub const FAILED = -1; |
| 5601 | |
| 5602 | pub const SHARED = 0x01; |
| 5603 | pub const PRIVATE = 0x02; |
| 5604 | pub const SHARED_VALIDATE = 0x03; |
| 5605 | pub const TYPE = 0x0f; |
| 5606 | pub const FIXED = 0x10; |
| 5607 | pub const ANON = 0x20; |
| 5608 | pub const ANONYMOUS = ANON; |
| 5609 | pub const NORESERVE = 0x4000; |
| 5610 | pub const GROWSDOWN = 0x0100; |
| 5611 | pub const DENYWRITE = 0x0800; |
| 5612 | pub const EXECUTABLE = 0x1000; |
| 5613 | pub const LOCKED = 0x2000; |
| 5614 | pub const POPULATE = 0x8000; |
| 5615 | pub const NONBLOCK = 0x10000; |
| 5616 | pub const STACK = 0x20000; |
| 5617 | pub const HUGETLB = 0x40000; |
| 5618 | pub const SYNC = 0x80000; |
| 5619 | pub const FIXED_NOREPLACE = 0x100000; |
| 5620 | pub const FILE = 0; |
| 5621 | |
| 5622 | pub const MAP_HUGE_SHIFT = 26; |
| 5623 | pub const MAP_HUGE_MASK = 0x3f; |
| 5624 | pub const MAP_HUGE_16KB = 14 << 26; |
| 5625 | pub const MAP_HUGE_64KB = 16 << 26; |
| 5626 | pub const MAP_HUGE_512KB = 19 << 26; |
| 5627 | pub const MAP_HUGE_1MB = 20 << 26; |
| 5628 | pub const MAP_HUGE_2MB = 21 << 26; |
| 5629 | pub const MAP_HUGE_8MB = 23 << 26; |
| 5630 | pub const MAP_HUGE_16MB = 24 << 26; |
| 5631 | pub const MAP_HUGE_32MB = 25 << 26; |
| 5632 | pub const MAP_HUGE_256MB = 28 << 26; |
| 5633 | pub const MAP_HUGE_512MB = 29 << 26; |
| 5634 | pub const MAP_HUGE_1GB = 30 << 26; |
| 5635 | pub const MAP_HUGE_2GB = 31 << 26; |
| 5636 | pub const MAP_HUGE_16GB = 34 << 26; |
| 5637 | }; |
| 5638 | |
| 5639 | pub const PROT = struct { |
| 5640 | pub const NONE = 0; |
| 5641 | pub const READ = 1; |
| 5642 | pub const WRITE = 2; |
| 5643 | pub const EXEC = 4; |
| 5644 | pub const GROWSDOWN = 0x01000000; |
| 5645 | pub const GROWSUP = 0x02000000; |
| 5646 | }; |
| 5647 | |
| 5648 | pub const NAME_MAX = 255; |
| 5649 | pub const PATH_MAX = 4096; |
| 5650 | pub const NGROUPS_MAX = 32; |
| 5651 | pub const ARG_MAX = 131072; |
| 5652 | pub const IOV_MAX = 1024; |
| 5653 | pub const SYMLOOP_MAX = 40; |
| 5654 | pub const TZNAME_MAX = 6; |
| 5655 | pub const TTY_NAME_MAX = 32; |
| 5656 | pub const HOST_NAME_MAX = 255; |
| 5657 | |
| 5658 | pub const AF = enum(sa_family_t) { |
| 5659 | UNSPEC = 0, |
| 5660 | LOCAL = 1, |
| 5661 | INET = 2, |
| 5662 | AX25 = 3, |
| 5663 | IPX = 4, |
| 5664 | APPLETALK = 5, |
| 5665 | NETROM = 6, |
| 5666 | BRIDGE = 7, |
| 5667 | ATMPVC = 8, |
| 5668 | X25 = 9, |
| 5669 | INET6 = 10, |
| 5670 | ROSE = 11, |
| 5671 | DECnet = 12, |
| 5672 | NETBEUI = 13, |
| 5673 | SECURITY = 14, |
| 5674 | KEY = 15, |
| 5675 | NETLINK = 16, |
| 5676 | PACKET = 17, |
| 5677 | ASH = 18, |
| 5678 | ECONET = 19, |
| 5679 | ATMSVC = 20, |
| 5680 | RDS = 21, |
| 5681 | SNA = 22, |
| 5682 | IRDA = 23, |
| 5683 | PPPOX = 24, |
| 5684 | WANPIPE = 25, |
| 5685 | LLC = 26, |
| 5686 | IB = 27, |
| 5687 | MPLS = 28, |
| 5688 | CAN = 29, |
| 5689 | TIPC = 30, |
| 5690 | BLUETOOTH = 31, |
| 5691 | IUCV = 32, |
| 5692 | RXRPC = 33, |
| 5693 | ISDN = 34, |
| 5694 | PHONET = 35, |
| 5695 | IEEE802154 = 36, |
| 5696 | CAIF = 37, |
| 5697 | ALG = 38, |
| 5698 | NFC = 39, |
| 5699 | VSOCK = 40, |
| 5700 | KCM = 41, |
| 5701 | QIPCRTR = 42, |
| 5702 | SMC = 43, |
| 5703 | XDP = 44, |
| 5704 | |
| 5705 | pub const UNIX: AF = .LOCAL; |
| 5706 | pub const FILE: AF = .LOCAL; |
| 5707 | pub const ROUTE: AF = .NETLINK; |
| 5708 | }; |
| 5709 | |
| 5710 | pub const SOCK = struct { |
| 5711 | pub const STREAM = 1; |
| 5712 | pub const DGRAM = 2; |
| 5713 | pub const RAW = 3; |
| 5714 | pub const RDM = 4; |
| 5715 | pub const SEQPACKET = 5; |
| 5716 | pub const DCCP = 6; |
| 5717 | pub const PACKET = 10; |
| 5718 | pub const CLOEXEC = 0o2000000; |
| 5719 | pub const NONBLOCK = 0o4000; |
| 5720 | }; |
| 5721 | |
| 5722 | pub const SHUT = enum(c_int) { |
| 5723 | RD = 0, |
| 5724 | WR = 1, |
| 5725 | RDWR = 2, |
| 5726 | }; |
| 5727 | |
| 5728 | pub const IPPROTO = struct { |
| 5729 | pub const IP = 0; |
| 5730 | pub const HOPOPTS = 0; |
| 5731 | pub const ICMP = 1; |
| 5732 | pub const IGMP = 2; |
| 5733 | pub const IPIP = 4; |
| 5734 | pub const TCP = 6; |
| 5735 | pub const EGP = 8; |
| 5736 | pub const PUP = 12; |
| 5737 | pub const UDP = 17; |
| 5738 | pub const IDP = 22; |
| 5739 | pub const TP = 29; |
| 5740 | pub const DCCP = 33; |
| 5741 | pub const IPV6 = 41; |
| 5742 | pub const ROUTING = 43; |
| 5743 | pub const FRAGMENT = 44; |
| 5744 | pub const RSVP = 46; |
| 5745 | pub const GRE = 47; |
| 5746 | pub const ESP = 50; |
| 5747 | pub const AH = 51; |
| 5748 | pub const ICMPV6 = 58; |
| 5749 | pub const NONE = 59; |
| 5750 | pub const DSTOPTS = 60; |
| 5751 | pub const MTP = 92; |
| 5752 | pub const BEETPH = 94; |
| 5753 | pub const ENCAP = 98; |
| 5754 | pub const PIM = 103; |
| 5755 | pub const COMP = 108; |
| 5756 | pub const SCTP = 132; |
| 5757 | pub const MH = 135; |
| 5758 | pub const UDPLITE = 136; |
| 5759 | pub const MPLS = 137; |
| 5760 | pub const ETHERNET = 143; |
| 5761 | pub const RAW = 255; |
| 5762 | pub const MPTCP = 262; |
| 5763 | }; |
| 5764 | |
| 5765 | pub const SOL = struct { |
| 5766 | pub const SOCKET = 1; |
| 5767 | pub const IP = 0; |
| 5768 | pub const IPV6 = 41; |
| 5769 | pub const ICMPV6 = 58; |
| 5770 | pub const RAW = 255; |
| 5771 | pub const DECNET = 261; |
| 5772 | pub const X25 = 262; |
| 5773 | pub const PACKET = 263; |
| 5774 | pub const ATM = 264; |
| 5775 | pub const AAL = 265; |
| 5776 | pub const IRDA = 266; |
| 5777 | pub const NETBEUI = 267; |
| 5778 | pub const LLC = 268; |
| 5779 | pub const DCCP = 269; |
| 5780 | pub const NETLINK = 270; |
| 5781 | pub const TIPC = 271; |
| 5782 | pub const RXRPC = 272; |
| 5783 | pub const PPPOL2TP = 273; |
| 5784 | pub const BLUETOOTH = 274; |
| 5785 | pub const PNPIPE = 275; |
| 5786 | pub const RDS = 276; |
| 5787 | pub const IUCV = 277; |
| 5788 | pub const CAIF = 278; |
| 5789 | pub const ALG = 279; |
| 5790 | pub const NFC = 280; |
| 5791 | pub const KCM = 281; |
| 5792 | pub const TLS = 282; |
| 5793 | pub const XDP = 283; |
| 5794 | }; |
| 5795 | |
| 5796 | pub const SO = struct { |
| 5797 | pub const DEBUG = 1; |
| 5798 | pub const REUSEADDR = 2; |
| 5799 | pub const TYPE = 3; |
| 5800 | pub const ERROR = 4; |
| 5801 | pub const DONTROUTE = 5; |
| 5802 | pub const BROADCAST = 6; |
| 5803 | pub const SNDBUF = 7; |
| 5804 | pub const RCVBUF = 8; |
| 5805 | pub const KEEPALIVE = 9; |
| 5806 | pub const OOBINLINE = 10; |
| 5807 | pub const NO_CHECK = 11; |
| 5808 | pub const PRIORITY = 12; |
| 5809 | pub const LINGER = 13; |
| 5810 | pub const BSDCOMPAT = 14; |
| 5811 | pub const REUSEPORT = 15; |
| 5812 | pub const PASSCRED = 16; |
| 5813 | pub const PEERCRED = 17; |
| 5814 | pub const RCVLOWAT = 18; |
| 5815 | pub const SNDLOWAT = 19; |
| 5816 | |
| 5817 | pub const RCVTIMEO = 20; |
| 5818 | pub const SNDTIMEO = 21; |
| 5819 | |
| 5820 | pub const ACCEPTCONN = 30; |
| 5821 | pub const PEERSEC = 31; |
| 5822 | pub const SNDBUFFORCE = 32; |
| 5823 | pub const RCVBUFFORCE = 33; |
| 5824 | pub const PROTOCOL = 38; |
| 5825 | pub const DOMAIN = 39; |
| 5826 | }; |
| 5827 | |
| 5828 | pub const DT = enum(u8) { |
| 5829 | UNKNOWN = 0, |
| 5830 | FIFO = 1, |
| 5831 | CHR = 2, |
| 5832 | DIR = 4, |
| 5833 | BLK = 6, |
| 5834 | REG = 8, |
| 5835 | LNK = 10, |
| 5836 | SOCK = 12, |
| 5837 | WHT = 14, |
| 5838 | }; |
| 5839 | |
| 5840 | pub const GRND = struct { |
| 5841 | pub const NONBLOCK = 0x0001; |
| 5842 | pub const RANDOM = 0x0002; |
| 5843 | pub const INSECURE = 0x0004; |
| 5844 | }; |
| 5845 | |
| 5846 | pub const LOCK = struct { |
| 5847 | pub const SH = 1; |
| 5848 | pub const EX = 2; |
| 5849 | pub const NB = 4; |
| 5850 | pub const UN = 8; |
| 5851 | }; |
| 5852 | |
| 5853 | pub const SIG = struct { |
| 5854 | pub const HUP = 1; |
| 5855 | pub const INT = 2; |
| 5856 | pub const QUIT = 3; |
| 5857 | pub const ILL = 4; |
| 5858 | pub const TRAP = 5; |
| 5859 | pub const ABRT = 6; |
| 5860 | pub const IOT = ABRT; |
| 5861 | pub const BUS = 7; |
| 5862 | pub const FPE = 8; |
| 5863 | pub const KILL = 9; |
| 5864 | pub const USR1 = 10; |
| 5865 | pub const SEGV = 11; |
| 5866 | pub const USR2 = 12; |
| 5867 | pub const PIPE = 13; |
| 5868 | pub const ALRM = 14; |
| 5869 | pub const TERM = 15; |
| 5870 | pub const STKFLT = 16; |
| 5871 | pub const CHLD = 17; |
| 5872 | pub const CONT = 18; |
| 5873 | pub const STOP = 19; |
| 5874 | pub const TSTP = 20; |
| 5875 | pub const TTIN = 21; |
| 5876 | pub const TTOU = 22; |
| 5877 | pub const URG = 23; |
| 5878 | pub const XCPU = 24; |
| 5879 | pub const XFSZ = 25; |
| 5880 | pub const VTALRM = 26; |
| 5881 | pub const PROF = 27; |
| 5882 | pub const WINCH = 28; |
| 5883 | pub const IO = 29; |
| 5884 | pub const POLL = 29; |
| 5885 | pub const PWR = 30; |
| 5886 | pub const SYS = 31; |
| 5887 | pub const UNUSED = SYS; |
| 5888 | }; |
| 5889 | |
| 5890 | pub const POLL = struct { |
| 5891 | pub const IN = 0x001; |
| 5892 | pub const PRI = 0x002; |
| 5893 | pub const OUT = 0x004; |
| 5894 | pub const ERR = 0x008; |
| 5895 | pub const HUP = 0x010; |
| 5896 | pub const NVAL = 0x020; |
| 5897 | pub const RDNORM = 0x040; |
| 5898 | pub const RDBAND = 0x080; |
| 5899 | pub const WRNORM = if (arch.isMIPS()) OUT else 0x100; |
| 5900 | pub const WRBAND = if (arch.isMIPS()) 0x100 else 0x200; |
| 5901 | pub const MSG = 0x400; |
| 5902 | pub const RDHUP = 0x2000; |
| 5903 | }; |
| 5904 | |
| 5905 | pub const W = struct { |
| 5906 | pub const NOHANG = 1; |
| 5907 | pub const UNTRACED = 2; |
| 5908 | pub const STOPPED = 2; |
| 5909 | pub const EXITED = 4; |
| 5910 | pub const CONTINUED = 8; |
| 5911 | pub const NOWAIT = 0x1000000; |
| 5912 | |
| 5913 | pub fn EXITSTATUS(s: c_int) u8 { |
| 5914 | return @intCast((s & 0xff00) >> 8); |
| 5915 | } |
| 5916 | pub fn TERMSIG(s: c_int) u8 { |
| 5917 | return @intCast(s & 0x7f); |
| 5918 | } |
| 5919 | pub fn STOPSIG(s: c_int) u8 { |
| 5920 | return EXITSTATUS(s); |
| 5921 | } |
| 5922 | pub fn COREDUMP(s: c_int) c_uint { |
| 5923 | return s & 0x80; |
| 5924 | } |
| 5925 | pub fn IFEXITED(s: c_int) bool { |
| 5926 | return TERMSIG(s) == 0; |
| 5927 | } |
| 5928 | pub fn IFSTOPPED(s: c_int) bool { |
| 5929 | return ((s & 0xffff) *% 0x10001) >> 8 > 0x7f00; |
| 5930 | } |
| 5931 | pub fn IFSIGNALED(s: c_int) bool { |
| 5932 | return s & 0xffff -% 1 < 0xff; |
| 5933 | } |
| 5934 | pub fn IFCONTINUED(s: c_int) bool { |
| 5935 | return s == 0xffff; |
| 5936 | } |
| 5937 | }; |
| 5938 | |
| 5939 | pub const SEEK = struct { |
| 5940 | pub const SET = 0; |
| 5941 | pub const CUR = 1; |
| 5942 | pub const END = 2; |
| 5943 | pub const DATA = 3; |
| 5944 | pub const HOLE = 4; |
| 5945 | }; |
| 5946 | |
| 5947 | pub const IPV6 = struct { |
| 5948 | pub const ADDRFORM = 1; |
| 5949 | pub const @"2292PKTINFO" = 2; |
| 5950 | pub const @"2292HOPOPTS" = 3; |
| 5951 | pub const @"2292DSTOPTS" = 4; |
| 5952 | pub const @"2292RTHDR" = 5; |
| 5953 | pub const @"2292PKTOPTIONS" = 6; |
| 5954 | pub const CHECKSUM = 7; |
| 5955 | pub const @"2292HOPLIMIT" = 8; |
| 5956 | pub const NEXTHOP = 9; |
| 5957 | pub const AUTHHDR = 10; |
| 5958 | pub const UNICAST_HOPS = 16; |
| 5959 | pub const MULTICAST_IF = 17; |
| 5960 | pub const MULTICAST_HOPS = 18; |
| 5961 | pub const MULTICAST_LOOP = 19; |
| 5962 | pub const JOIN_GROUP = 20; |
| 5963 | pub const LEAVE_GROUP = 21; |
| 5964 | pub const ROUTER_ALERT = 22; |
| 5965 | pub const MTU_DISCOVER = 23; |
| 5966 | pub const MTU = 24; |
| 5967 | pub const RECVERR = 25; |
| 5968 | pub const V6ONLY = 26; |
| 5969 | pub const JOIN_ANYCAST = 27; |
| 5970 | pub const LEAVE_ANYCAST = 28; |
| 5971 | pub const MULTICAST_ALL = 29; |
| 5972 | pub const ROUTER_ALERT_ISOLATE = 30; |
| 5973 | pub const IPSEC_POLICY = 34; |
| 5974 | pub const XFRM_POLICY = 35; |
| 5975 | pub const HDRINCL = 36; |
| 5976 | pub const RECVPKTINFO = 49; |
| 5977 | pub const PKTINFO = 50; |
| 5978 | pub const RECVHOPLIMIT = 51; |
| 5979 | pub const HOPLIMIT = 52; |
| 5980 | pub const RECVHOPOPTS = 53; |
| 5981 | pub const HOPOPTS = 54; |
| 5982 | pub const RTHDRDSTOPTS = 55; |
| 5983 | pub const RECVRTHDR = 56; |
| 5984 | pub const RTHDR = 57; |
| 5985 | pub const RECVDSTOPTS = 58; |
| 5986 | pub const DSTOPTS = 59; |
| 5987 | pub const RECVPATHMTU = 60; |
| 5988 | pub const PATHMTU = 61; |
| 5989 | pub const DONTFRAG = 62; |
| 5990 | pub const RECVTCLASS = 66; |
| 5991 | pub const TCLASS = 67; |
| 5992 | pub const AUTOFLOWLABEL = 70; |
| 5993 | pub const ADDR_PREFERENCES = 72; |
| 5994 | pub const MINHOPCOUNT = 73; |
| 5995 | pub const ORIGDSTADDR = 74; |
| 5996 | pub const RECVORIGDSTADDR = ORIGDSTADDR; |
| 5997 | pub const TRANSPARENT = 75; |
| 5998 | pub const UNICAST_IF = 76; |
| 5999 | pub const RECVFRAGSIZE = 77; |
| 6000 | pub const FREEBIND = 78; |
| 6001 | }; |
| 6002 | |
| 6003 | pub fn getpid() pid_t { |
| 6004 | return libc.getpid(); |
| 6005 | } |
| 6006 | pub fn exit(status: c_int) noreturn { |
| 6007 | return libc.exit(status); |
| 6008 | } |
| 6009 | pub fn getenv(name: [:0]const u8) ?[:0]u8 { |
| 6010 | return std.mem.sliceTo(libc.getenv(name.ptr) orelse return null, 0); |
| 6011 | } |
| 6012 | pub fn openat(fd: c_int, file: [*:0]const u8, oflag: c_int) errno.Error!c_int { |
| 6013 | const rc = libc.openat(fd, file, oflag); |
| 6014 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6015 | return rc; |
| 6016 | } |
| 6017 | pub fn openat4(fd: c_int, file: [*:0]const u8, oflag: c_int, mode: mode_t) errno.Error!c_int { |
| 6018 | const rc = libc.openat(fd, file, oflag, mode); |
| 6019 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6020 | return rc; |
| 6021 | } |
| 6022 | pub fn close(fd: c_int) errno.Error!void { |
| 6023 | const rc = libc.close(fd); |
| 6024 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6025 | std.debug.assert(rc == 0); |
| 6026 | } |
| 6027 | pub fn read(fd: c_int, buf: []u8) errno.Error!usize { |
| 6028 | const rc = libc.read(fd, buf.ptr, buf.len); |
| 6029 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6030 | std.debug.assert(rc >= 0); |
| 6031 | return @intCast(rc); |
| 6032 | } |
| 6033 | pub fn fstat(fd: c_int) errno.Error!struct_stat { |
| 6034 | var buf: struct_stat = undefined; |
| 6035 | const rc = libc.fstat(fd, &buf); |
| 6036 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6037 | std.debug.assert(rc == 0); |
| 6038 | return buf; |
| 6039 | } |
| 6040 | pub fn readv(fd: c_int, bufs: []const struct_iovec) errno.Error!usize { |
| 6041 | std.debug.assert(bufs.len > 0); |
| 6042 | std.debug.assert(bufs.len <= IOV_MAX); |
| 6043 | const rc = libc.readv(fd, bufs.ptr, @intCast(bufs.len)); |
| 6044 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6045 | std.debug.assert(rc >= 0); |
| 6046 | return @intCast(rc); |
| 6047 | } |
| 6048 | pub fn mkdirat(fd: c_int, path: [*:0]const u8, mode: mode_t) errno.Error!void { |
| 6049 | const rc = libc.mkdirat(fd, path, mode); |
| 6050 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6051 | std.debug.assert(rc == 0); |
| 6052 | } |
| 6053 | pub fn pthread_self() pthread_t { |
| 6054 | return libc.pthread_self(); |
| 6055 | } |
| 6056 | pub fn gettid() pid_t { |
| 6057 | return libc.gettid(); |
| 6058 | } |
| 6059 | pub fn fstatat(fd: c_int, path: [*:0]const u8, flag: c_int) errno.Error!struct_stat { |
| 6060 | var buf: struct_stat = undefined; |
| 6061 | const rc = libc.fstatat(fd, path, &buf, flag); |
| 6062 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6063 | std.debug.assert(rc == 0); |
| 6064 | return buf; |
| 6065 | } |
| 6066 | pub fn socket(domain: AF, ty: c_int, protocol: c_int) errno.Error!c_uint { |
| 6067 | const rc = libc.socket(@intFromEnum(domain), ty, protocol); |
| 6068 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6069 | std.debug.assert(rc > 0); |
| 6070 | return @intCast(rc); |
| 6071 | } |
| 6072 | pub fn listen(socketfd: c_uint, backlog: c_int) errno.Error!void { |
| 6073 | const rc = libc.listen(@intCast(socketfd), backlog); |
| 6074 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6075 | std.debug.assert(rc == 0); |
| 6076 | } |
| 6077 | pub fn bind(socketfd: c_uint, address: *const struct_sockaddr, address_len: socklen_t) errno.Error!void { |
| 6078 | const rc = libc.bind(@intCast(socketfd), address, address_len); |
| 6079 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6080 | std.debug.assert(rc == 0); |
| 6081 | } |
| 6082 | pub fn connect(socketfd: c_uint, address: *const struct_sockaddr, address_len: socklen_t) errno.Error!void { |
| 6083 | const rc = libc.connect(@intCast(socketfd), address, address_len); |
| 6084 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6085 | std.debug.assert(rc == 0); |
| 6086 | } |
| 6087 | pub fn shutdown(socketfd: c_uint, how: SHUT) errno.Error!void { |
| 6088 | const rc = libc.shutdown(@intCast(socketfd), @intFromEnum(how)); |
| 6089 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6090 | std.debug.assert(rc == 0); |
| 6091 | } |
| 6092 | pub fn setsockopt(socketfd: c_uint, level: c_int, optname: c_int, opaque_opt: []const u8) errno.Error!void { |
| 6093 | const rc = libc.setsockopt(@intCast(socketfd), level, optname, opaque_opt.ptr, @intCast(opaque_opt.len)); |
| 6094 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6095 | std.debug.assert(rc == 0); |
| 6096 | } |
| 6097 | pub fn accept4(socketfd: c_uint, noalias address: ?*struct_sockaddr, noalias address_len: *socklen_t, flags: c_int) errno.Error!c_uint { |
| 6098 | const rc = libc.accept4(@intCast(socketfd), address, address_len, flags); |
| 6099 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6100 | std.debug.assert(rc > 0); |
| 6101 | return @intCast(rc); |
| 6102 | } |
| 6103 | pub fn send(socketfd: c_uint, buffer: []const u8, flags: c_int) errno.Error!usize { |
| 6104 | const rc = libc.send(@intCast(socketfd), buffer.ptr, buffer.len, flags); |
| 6105 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6106 | std.debug.assert(rc >= 0); |
| 6107 | return @intCast(rc); |
| 6108 | } |
| 6109 | pub fn recv(socketfd: c_uint, buffer: []u8, flags: c_int) errno.Error!usize { |
| 6110 | const rc = libc.recv(@intCast(socketfd), buffer.ptr, buffer.len, flags); |
| 6111 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6112 | std.debug.assert(rc >= 0); |
| 6113 | return @intCast(rc); |
| 6114 | } |
| 6115 | pub fn getaddrinfo(noalias nodename: ?[*:0]const u8, noalias servname: ?[*:0]const u8, noalias req: ?*const struct_addrinfo) eai.Error!*const struct_addrinfo { |
| 6116 | var pai: *const struct_addrinfo = undefined; |
| 6117 | var hints = std.mem.zeroes(struct_addrinfo); |
| 6118 | const rc = libc.getaddrinfo(nodename, servname, req orelse &hints, &pai); |
| 6119 | if (rc < 0) return eai.fromInt(rc); |
| 6120 | std.debug.assert(rc == 0); |
| 6121 | return pai; |
| 6122 | } |
| 6123 | pub fn freeaddrinfo(ai: *const struct_addrinfo) void { |
| 6124 | return libc.freeaddrinfo(ai); |
| 6125 | } |
| 6126 | pub fn clock_gettime(clock_id: clockid_t) !struct_timespec { |
| 6127 | var tp: struct_timespec = undefined; |
| 6128 | const rc = libc.clock_gettime(clock_id, &tp); |
| 6129 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6130 | std.debug.assert(rc == 0); |
| 6131 | return tp; |
| 6132 | } |
| 6133 | pub fn memfd_create(name: [*:0]const u8, flags: c_uint) !c_int { |
| 6134 | const rc = libc.memfd_create(name, flags); |
| 6135 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6136 | std.debug.assert(rc >= 0); |
| 6137 | return rc; |
| 6138 | } |
| 6139 | pub fn readlinkat(dirfd: c_int, noalias path: [*:0]const u8, noalias buf: []u8) ![:0]u8 { |
| 6140 | const rc = libc.readlinkat(dirfd, path, buf.ptr, buf.len); |
| 6141 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6142 | std.debug.assert(rc >= 0); |
| 6143 | buf[@intCast(rc)] = 0; |
| 6144 | return buf[0..@intCast(rc) :0]; |
| 6145 | } |
| 6146 | pub fn write(fd: c_int, buf: []const u8) !usize { |
| 6147 | const rc = libc.write(fd, buf.ptr, buf.len); |
| 6148 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6149 | std.debug.assert(rc >= 0); |
| 6150 | return @intCast(rc); |
| 6151 | } |
| 6152 | pub fn writev(fd: c_int, iovec: []const struct_iovec) !usize { |
| 6153 | const rc = libc.writev(fd, iovec.ptr, @intCast(iovec.len)); |
| 6154 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6155 | std.debug.assert(rc >= 0); |
| 6156 | return @intCast(rc); |
| 6157 | } |
| 6158 | pub fn getsockname(socketfd: c_uint, noalias address: *struct_sockaddr, noalias address_len: *socklen_t) errno.Error!void { |
| 6159 | const rc = libc.getsockname(@intCast(socketfd), address, address_len); |
| 6160 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6161 | std.debug.assert(rc == 0); |
| 6162 | } |
| 6163 | pub fn sendfile(out_fd: c_int, in_fd: c_int, offset: ?*const off_t, count: usize) errno.Error!usize { |
| 6164 | const rc = libc.sendfile(out_fd, in_fd, offset, count); |
| 6165 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6166 | std.debug.assert(rc >= 0); |
| 6167 | return @intCast(rc); |
| 6168 | } |
| 6169 | pub fn getdents(dirfd: c_int, buf: []u8) errno.Error!usize { |
| 6170 | const rc = libc.getdents(dirfd, buf.ptr, buf.len); |
| 6171 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6172 | std.debug.assert(rc >= 0); |
| 6173 | return @intCast(rc); |
| 6174 | } |
| 6175 | pub fn renameat(oldfd: c_int, old: [*:0]const u8, newfd: c_int, new: [*:0]const u8) !void { |
| 6176 | const rc = libc.renameat(oldfd, old, newfd, new); |
| 6177 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6178 | std.debug.assert(rc == 0); |
| 6179 | } |
| 6180 | pub fn mmap(addr: ?*anyopaque, len: usize, prot: c_int, flags: c_int, fd: c_int, offset: off_t) errno.Error![]u8 { |
| 6181 | const rc = libc.mmap(addr, len, prot, flags, fd, offset); |
| 6182 | if (@intFromPtr(rc) == MAP.FAILED) return errno.fromInt(errno.fromLibC()); |
| 6183 | const ptr: [*]u8 = @ptrCast(rc); |
| 6184 | return ptr[0..len]; |
| 6185 | } |
| 6186 | pub fn munmap(addr: *const anyopaque, len: usize) errno.Error!void { |
| 6187 | const rc = libc.munmap(addr, len); |
| 6188 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6189 | std.debug.assert(rc == 0); |
| 6190 | } |
| 6191 | pub fn sched_getaffinity(pid: pid_t) !cpu_set_t { |
| 6192 | var cpuset: cpu_set_t = undefined; |
| 6193 | const rc = libc.sched_getaffinity(pid, @sizeOf(cpu_set_t), &cpuset); |
| 6194 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6195 | std.debug.assert(rc == 0); |
| 6196 | return cpuset; |
| 6197 | } |
| 6198 | pub fn mkdtemp(template: [*:0]u8) ![*:0]u8 { |
| 6199 | const rc = libc.mkdtemp(template); |
| 6200 | if (rc == null) return errno.fromInt(errno.fromLibC()); |
| 6201 | return rc.?; |
| 6202 | } |
| 6203 | pub fn getrandom(buf: []u8, flags: c_uint) ![]u8 { |
| 6204 | const rc = libc.getrandom(buf.ptr, buf.len, flags); |
| 6205 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6206 | std.debug.assert(rc >= 0); |
| 6207 | return buf[0..@intCast(rc)]; |
| 6208 | } |
| 6209 | pub fn flock(fd: c_int, op: c_int) !void { |
| 6210 | const rc = libc.flock(fd, op); |
| 6211 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6212 | std.debug.assert(rc == 0); |
| 6213 | } |
| 6214 | pub fn futimens(fd: c_int, times: [2]struct_timespec) !void { |
| 6215 | const rc = libc.futimens(fd, &times); |
| 6216 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6217 | std.debug.assert(rc == 0); |
| 6218 | } |
| 6219 | pub fn faccessat(fd: c_int, path: [*:0]const u8, amode: c_int, flag: c_int) !void { |
| 6220 | const rc = libc.faccessat(fd, path, amode, flag); |
| 6221 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6222 | std.debug.assert(rc == 0); |
| 6223 | } |
| 6224 | pub fn pipe2(flag: c_int) ![2]c_int { |
| 6225 | var fildes: [2]c_int = @splat(-1); |
| 6226 | const rc = libc.pipe2(&fildes, flag); |
| 6227 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6228 | std.debug.assert(rc == 0); |
| 6229 | return fildes; |
| 6230 | } |
| 6231 | pub fn kill(pid: pid_t, sig: c_int) !void { |
| 6232 | const rc = libc.kill(pid, sig); |
| 6233 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6234 | std.debug.assert(rc == 0); |
| 6235 | } |
| 6236 | pub fn fork() !pid_t { |
| 6237 | const rc = libc.fork(); |
| 6238 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6239 | std.debug.assert(rc >= 0); |
| 6240 | return rc; |
| 6241 | } |
| 6242 | pub fn fchdir(fildes: c_int) !void { |
| 6243 | const rc = libc.fchdir(fildes); |
| 6244 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6245 | std.debug.assert(rc == 0); |
| 6246 | } |
| 6247 | pub fn execvp(file: [*:0]const u8, argv: [*:null]const ?[*:0]const u8) !noreturn { |
| 6248 | const rc = libc.execvp(file, argv); |
| 6249 | std.debug.assert(rc == -1); |
| 6250 | return errno.fromInt(errno.fromLibC()); |
| 6251 | } |
| 6252 | pub fn dup2(fildes: c_int, fildes2: c_int) !void { |
| 6253 | const rc = libc.dup2(fildes, fildes2); |
| 6254 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6255 | std.debug.assert(rc >= 0); |
| 6256 | } |
| 6257 | pub fn poll(fds: []struct_pollfd, timeout_ms: c_int) !c_int { |
| 6258 | const rc = libc.poll(fds.ptr, fds.len, timeout_ms); |
| 6259 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6260 | std.debug.assert(rc >= 0); |
| 6261 | return rc; |
| 6262 | } |
| 6263 | pub fn waitpid(pid: pid_t, options: c_int) !struct { pid_t, c_int } { |
| 6264 | var status: c_int = 0; |
| 6265 | const rc = libc.waitpid(pid, &status, options); |
| 6266 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6267 | std.debug.assert(rc >= 0); |
| 6268 | return .{ rc, status }; |
| 6269 | } |
| 6270 | pub fn unlinkat(fd: c_int, name: [*:0]const u8, flag: c_int) !void { |
| 6271 | const rc = libc.unlinkat(fd, name, flag); |
| 6272 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6273 | std.debug.assert(rc == 0); |
| 6274 | } |
| 6275 | pub fn lseek(fd: c_int, offset: off_t, whence: c_int) !void { |
| 6276 | const rc = libc.lseek(fd, offset, whence); |
| 6277 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6278 | std.debug.assert(rc >= 0); |
| 6279 | } |
| 6280 | pub fn getcwd(buf: []u8) ![*:0]u8 { |
| 6281 | const rc = libc.getcwd(buf.ptr, buf.len); |
| 6282 | if (rc == null) return errno.fromInt(errno.fromLibC()); |
| 6283 | return rc.?; |
| 6284 | } |
| 6285 | pub fn fchmod(fd: c_int, mode: mode_t) !void { |
| 6286 | const rc = libc.fchmod(fd, mode); |
| 6287 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6288 | std.debug.assert(rc == 0); |
| 6289 | } |
| 6290 | pub fn copy_file_range(fd_int: c_int, off_in: ?*off_t, fd_out: c_int, off_out: ?*off_t, size: usize, flags: c_uint) errno.Error!usize { |
| 6291 | const rc = libc.copy_file_range(fd_int, off_in, fd_out, off_out, size, flags); |
| 6292 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6293 | std.debug.assert(rc >= 0); |
| 6294 | return @intCast(rc); |
| 6295 | } |
| 6296 | pub fn dup(fildes: c_int) !c_int { |
| 6297 | const rc = libc.dup(fildes); |
| 6298 | if (rc == -1) return errno.fromInt(errno.fromLibC()); |
| 6299 | std.debug.assert(rc >= 0); |
| 6300 | return rc; |
| 6301 | } |