1 /** 2 * D header file for POSIX. 3 * 4 * Copyright: Copyright Sean Kelly 2005 - 2009. 5 * License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). 6 * Authors: Sean Kelly 7 * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition 8 */ 9 10 /* Copyright Sean Kelly 2005 - 2009. 11 * Distributed under the Boost Software License, Version 1.0. 12 * (See accompanying file LICENSE or copy at 13 * http://www.boost.org/LICENSE_1_0.txt) 14 */ 15 module core.sys.posix.unistd; 16 17 import core.sys.posix.config; 18 import core.stdc.stddef; 19 public import core.sys.posix.inttypes; // for intptr_t 20 public import core.sys.posix.sys.types; // for ssize_t, uid_t, gid_t, off_t, pid_t, useconds_t 21 22 version (OSX) 23 version = Darwin; 24 else version (iOS) 25 version = Darwin; 26 else version (TVOS) 27 version = Darwin; 28 else version (WatchOS) 29 version = Darwin; 30 31 version (Posix): 32 extern (C): 33 nothrow: 34 @nogc: 35 36 enum STDIN_FILENO = 0; 37 enum STDOUT_FILENO = 1; 38 enum STDERR_FILENO = 2; 39 40 extern __gshared char* optarg; 41 extern __gshared int optind; 42 extern __gshared int opterr; 43 extern __gshared int optopt; 44 45 int access(const scope char*, int); 46 uint alarm(uint) @trusted; 47 int chdir(const scope char*); 48 int chown(const scope char*, uid_t, gid_t); 49 int close(int) @trusted; 50 size_t confstr(int, char*, size_t); 51 int dup(int) @trusted; 52 int dup2(int, int) @trusted; 53 int execl(const scope char*, const scope char*, ...); 54 int execle(const scope char*, const scope char*, ...); 55 int execlp(const scope char*, const scope char*, ...); 56 int execv(const scope char*, const scope char**); 57 int execve(const scope char*, const scope char**, const scope char**); 58 int execvp(const scope char*, const scope char**); 59 void _exit(int) @trusted; 60 int fchown(int, uid_t, gid_t) @trusted; 61 pid_t fork() @trusted; 62 c_long fpathconf(int, int) @trusted; 63 //int ftruncate(int, off_t); 64 char* getcwd(char*, size_t); 65 gid_t getegid() @trusted; 66 uid_t geteuid() @trusted; 67 gid_t getgid() @trusted; 68 int getgroups(int, gid_t *); 69 int gethostname(char*, size_t); 70 char* getlogin() @trusted; 71 int getlogin_r(char*, size_t); 72 int getopt(int, const scope char**, const scope char*); 73 pid_t getpgrp() @trusted; 74 pid_t getpid() @trusted; 75 pid_t getppid() @trusted; 76 uid_t getuid() @trusted; 77 int isatty(int) @trusted; 78 int link(const scope char*, const scope char*); 79 //off_t lseek(int, off_t, int); 80 c_long pathconf(const scope char*, int); 81 int pause() @trusted; 82 int pipe(ref int[2]) @trusted; 83 ssize_t read(int, void*, size_t); 84 ssize_t readlink(const scope char*, char*, size_t); 85 int rmdir(const scope char*); 86 int setegid(gid_t) @trusted; 87 int seteuid(uid_t) @trusted; 88 int setgid(gid_t) @trusted; 89 int setgroups(size_t, const scope gid_t*) @trusted; 90 int setpgid(pid_t, pid_t) @trusted; 91 pid_t setsid() @trusted; 92 int setuid(uid_t) @trusted; 93 uint sleep(uint) @trusted; 94 int symlink(const scope char*, const scope char*); 95 c_long sysconf(int) @trusted; 96 pid_t tcgetpgrp(int) @trusted; 97 int tcsetpgrp(int, pid_t) @trusted; 98 char* ttyname(int) @trusted; 99 int ttyname_r(int, char*, size_t); 100 int unlink(const scope char*); 101 ssize_t write(int, const scope void*, size_t); 102 103 version (CRuntime_Glibc) 104 { 105 static if ( __USE_FILE_OFFSET64 ) 106 { 107 off_t lseek64(int, off_t, int) @trusted; 108 alias lseek64 lseek; 109 } 110 else 111 { 112 off_t lseek(int, off_t, int) @trusted; 113 } 114 static if ( __USE_LARGEFILE64 ) 115 { 116 int ftruncate64(int, off_t) @trusted; 117 alias ftruncate64 ftruncate; 118 } 119 else 120 { 121 int ftruncate(int, off_t) @trusted; 122 } 123 } 124 else version (FreeBSD) 125 { 126 off_t lseek(int, off_t, int) @trusted; 127 int ftruncate(int, off_t) @trusted; 128 } 129 else version (NetBSD) 130 { 131 off_t lseek(int, off_t, int) @trusted; 132 int ftruncate(int, off_t) @trusted; 133 } 134 else version (OpenBSD) 135 { 136 off_t lseek(int, off_t, int) @trusted; 137 int ftruncate(int, off_t) @trusted; 138 } 139 else version (DragonFlyBSD) 140 { 141 off_t lseek(int, off_t, int) @trusted; 142 int ftruncate(int, off_t) @trusted; 143 } 144 else version (Solaris) 145 { 146 version (D_LP64) 147 { 148 off_t lseek(int, off_t, int) @trusted; 149 alias lseek lseek64; 150 151 int ftruncate(int, off_t) @trusted; 152 alias ftruncate ftruncate64; 153 } 154 else 155 { 156 static if ( __USE_LARGEFILE64 ) 157 { 158 off64_t lseek64(int, off64_t, int) @trusted; 159 alias lseek64 lseek; 160 161 int ftruncate64(int, off64_t) @trusted; 162 alias ftruncate64 ftruncate; 163 } 164 else 165 { 166 off_t lseek(int, off_t, int) @trusted; 167 int ftruncate(int, off_t) @trusted; 168 } 169 } 170 } 171 else version (Darwin) 172 { 173 off_t lseek(int, off_t, int) @trusted; 174 int ftruncate(int, off_t) @trusted; 175 } 176 else version (CRuntime_Bionic) 177 { 178 off_t lseek(int, off_t, int) @trusted; 179 int ftruncate(int, off_t) @trusted; 180 } 181 else version (CRuntime_Musl) 182 { 183 int ftruncate(int, off_t) @trusted; 184 off_t lseek(int, off_t, int) @trusted; 185 alias ftruncate ftruncate64; 186 alias lseek lseek64; 187 } 188 else version (CRuntime_UClibc) 189 { 190 static if ( __USE_FILE_OFFSET64 ) 191 { 192 off_t lseek64(int, off_t, int) @trusted; 193 alias lseek64 lseek; 194 } 195 else 196 { 197 off_t lseek(int, off_t, int) @trusted; 198 } 199 static if ( __USE_LARGEFILE64 ) 200 { 201 int ftruncate64(int, off_t) @trusted; 202 alias ftruncate64 ftruncate; 203 } 204 else 205 { 206 int ftruncate(int, off_t) @trusted; 207 } 208 } 209 210 version (CRuntime_Glibc) 211 { 212 enum F_OK = 0; 213 enum R_OK = 4; 214 enum W_OK = 2; 215 enum X_OK = 1; 216 217 enum F_ULOCK = 0; 218 enum F_LOCK = 1; 219 enum F_TLOCK = 2; 220 enum F_TEST = 3; 221 222 enum 223 { 224 _CS_PATH, 225 226 _CS_V6_WIDTH_RESTRICTED_ENVS, 227 228 _CS_GNU_LIBC_VERSION, 229 _CS_GNU_LIBPTHREAD_VERSION, 230 231 _CS_LFS_CFLAGS = 1000, 232 _CS_LFS_LDFLAGS, 233 _CS_LFS_LIBS, 234 _CS_LFS_LINTFLAGS, 235 _CS_LFS64_CFLAGS, 236 _CS_LFS64_LDFLAGS, 237 _CS_LFS64_LIBS, 238 _CS_LFS64_LINTFLAGS, 239 240 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, 241 _CS_XBS5_ILP32_OFF32_LDFLAGS, 242 _CS_XBS5_ILP32_OFF32_LIBS, 243 _CS_XBS5_ILP32_OFF32_LINTFLAGS, 244 _CS_XBS5_ILP32_OFFBIG_CFLAGS, 245 _CS_XBS5_ILP32_OFFBIG_LDFLAGS, 246 _CS_XBS5_ILP32_OFFBIG_LIBS, 247 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, 248 _CS_XBS5_LP64_OFF64_CFLAGS, 249 _CS_XBS5_LP64_OFF64_LDFLAGS, 250 _CS_XBS5_LP64_OFF64_LIBS, 251 _CS_XBS5_LP64_OFF64_LINTFLAGS, 252 _CS_XBS5_LPBIG_OFFBIG_CFLAGS, 253 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, 254 _CS_XBS5_LPBIG_OFFBIG_LIBS, 255 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, 256 257 _CS_POSIX_V6_ILP32_OFF32_CFLAGS, 258 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, 259 _CS_POSIX_V6_ILP32_OFF32_LIBS, 260 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, 261 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, 262 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, 263 _CS_POSIX_V6_ILP32_OFFBIG_LIBS, 264 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, 265 _CS_POSIX_V6_LP64_OFF64_CFLAGS, 266 _CS_POSIX_V6_LP64_OFF64_LDFLAGS, 267 _CS_POSIX_V6_LP64_OFF64_LIBS, 268 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, 269 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, 270 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, 271 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, 272 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS 273 } 274 275 enum 276 { 277 _PC_LINK_MAX, 278 _PC_MAX_CANON, 279 _PC_MAX_INPUT, 280 _PC_NAME_MAX, 281 _PC_PATH_MAX, 282 _PC_PIPE_BUF, 283 _PC_CHOWN_RESTRICTED, 284 _PC_NO_TRUNC, 285 _PC_VDISABLE, 286 _PC_SYNC_IO, 287 _PC_ASYNC_IO, 288 _PC_PRIO_IO, 289 _PC_SOCK_MAXBUF, 290 _PC_FILESIZEBITS, 291 _PC_REC_INCR_XFER_SIZE, 292 _PC_REC_MAX_XFER_SIZE, 293 _PC_REC_MIN_XFER_SIZE, 294 _PC_REC_XFER_ALIGN, 295 _PC_ALLOC_SIZE_MIN, 296 _PC_SYMLINK_MAX, 297 _PC_2_SYMLINKS 298 } 299 300 enum 301 { 302 _SC_ARG_MAX, 303 _SC_CHILD_MAX, 304 _SC_CLK_TCK, 305 _SC_NGROUPS_MAX, 306 _SC_OPEN_MAX, 307 _SC_STREAM_MAX, 308 _SC_TZNAME_MAX, 309 _SC_JOB_CONTROL, 310 _SC_SAVED_IDS, 311 _SC_REALTIME_SIGNALS, 312 _SC_PRIORITY_SCHEDULING, 313 _SC_TIMERS, 314 _SC_ASYNCHRONOUS_IO, 315 _SC_PRIORITIZED_IO, 316 _SC_SYNCHRONIZED_IO, 317 _SC_FSYNC, 318 _SC_MAPPED_FILES, 319 _SC_MEMLOCK, 320 _SC_MEMLOCK_RANGE, 321 _SC_MEMORY_PROTECTION, 322 _SC_MESSAGE_PASSING, 323 _SC_SEMAPHORES, 324 _SC_SHARED_MEMORY_OBJECTS, 325 _SC_AIO_LISTIO_MAX, 326 _SC_AIO_MAX, 327 _SC_AIO_PRIO_DELTA_MAX, 328 _SC_DELAYTIMER_MAX, 329 _SC_MQ_OPEN_MAX, 330 _SC_MQ_PRIO_MAX, 331 _SC_VERSION, 332 _SC_PAGESIZE, 333 _SC_PAGE_SIZE = _SC_PAGESIZE, 334 _SC_RTSIG_MAX, 335 _SC_SEM_NSEMS_MAX, 336 _SC_SEM_VALUE_MAX, 337 _SC_SIGQUEUE_MAX, 338 _SC_TIMER_MAX, 339 340 _SC_BC_BASE_MAX, 341 _SC_BC_DIM_MAX, 342 _SC_BC_SCALE_MAX, 343 _SC_BC_STRING_MAX, 344 _SC_COLL_WEIGHTS_MAX, 345 _SC_EQUIV_CLASS_MAX, 346 _SC_EXPR_NEST_MAX, 347 _SC_LINE_MAX, 348 _SC_RE_DUP_MAX, 349 _SC_CHARCLASS_NAME_MAX, 350 351 _SC_2_VERSION, 352 _SC_2_C_BIND, 353 _SC_2_C_DEV, 354 _SC_2_FORT_DEV, 355 _SC_2_FORT_RUN, 356 _SC_2_SW_DEV, 357 _SC_2_LOCALEDEF, 358 359 _SC_PII, 360 _SC_PII_XTI, 361 _SC_PII_SOCKET, 362 _SC_PII_INTERNET, 363 _SC_PII_OSI, 364 _SC_POLL, 365 _SC_SELECT, 366 _SC_UIO_MAXIOV, 367 _SC_IOV_MAX = _SC_UIO_MAXIOV, 368 _SC_PII_INTERNET_STREAM, 369 _SC_PII_INTERNET_DGRAM, 370 _SC_PII_OSI_COTS, 371 _SC_PII_OSI_CLTS, 372 _SC_PII_OSI_M, 373 _SC_T_IOV_MAX, 374 375 _SC_THREADS, 376 _SC_THREAD_SAFE_FUNCTIONS, 377 _SC_GETGR_R_SIZE_MAX, 378 _SC_GETPW_R_SIZE_MAX, 379 _SC_LOGIN_NAME_MAX, 380 _SC_TTY_NAME_MAX, 381 _SC_THREAD_DESTRUCTOR_ITERATIONS, 382 _SC_THREAD_KEYS_MAX, 383 _SC_THREAD_STACK_MIN, 384 _SC_THREAD_THREADS_MAX, 385 _SC_THREAD_ATTR_STACKADDR, 386 _SC_THREAD_ATTR_STACKSIZE, 387 _SC_THREAD_PRIORITY_SCHEDULING, 388 _SC_THREAD_PRIO_INHERIT, 389 _SC_THREAD_PRIO_PROTECT, 390 _SC_THREAD_PROCESS_SHARED, 391 392 _SC_NPROCESSORS_CONF, 393 _SC_NPROCESSORS_ONLN, 394 _SC_PHYS_PAGES, 395 _SC_AVPHYS_PAGES, 396 _SC_ATEXIT_MAX, 397 _SC_PASS_MAX, 398 399 _SC_XOPEN_VERSION, 400 _SC_XOPEN_XCU_VERSION, 401 _SC_XOPEN_UNIX, 402 _SC_XOPEN_CRYPT, 403 _SC_XOPEN_ENH_I18N, 404 _SC_XOPEN_SHM, 405 406 _SC_2_CHAR_TERM, 407 _SC_2_C_VERSION, 408 _SC_2_UPE, 409 410 _SC_XOPEN_XPG2, 411 _SC_XOPEN_XPG3, 412 _SC_XOPEN_XPG4, 413 414 _SC_CHAR_BIT, 415 _SC_CHAR_MAX, 416 _SC_CHAR_MIN, 417 _SC_INT_MAX, 418 _SC_INT_MIN, 419 _SC_LONG_BIT, 420 _SC_WORD_BIT, 421 _SC_MB_LEN_MAX, 422 _SC_NZERO, 423 _SC_SSIZE_MAX, 424 _SC_SCHAR_MAX, 425 _SC_SCHAR_MIN, 426 _SC_SHRT_MAX, 427 _SC_SHRT_MIN, 428 _SC_UCHAR_MAX, 429 _SC_UINT_MAX, 430 _SC_ULONG_MAX, 431 _SC_USHRT_MAX, 432 433 _SC_NL_ARGMAX, 434 _SC_NL_LANGMAX, 435 _SC_NL_MSGMAX, 436 _SC_NL_NMAX, 437 _SC_NL_SETMAX, 438 _SC_NL_TEXTMAX, 439 440 _SC_XBS5_ILP32_OFF32, 441 _SC_XBS5_ILP32_OFFBIG, 442 _SC_XBS5_LP64_OFF64, 443 _SC_XBS5_LPBIG_OFFBIG, 444 445 _SC_XOPEN_LEGACY, 446 _SC_XOPEN_REALTIME, 447 _SC_XOPEN_REALTIME_THREADS, 448 449 _SC_ADVISORY_INFO, 450 _SC_BARRIERS, 451 _SC_BASE, 452 _SC_C_LANG_SUPPORT, 453 _SC_C_LANG_SUPPORT_R, 454 _SC_CLOCK_SELECTION, 455 _SC_CPUTIME, 456 _SC_THREAD_CPUTIME, 457 _SC_DEVICE_IO, 458 _SC_DEVICE_SPECIFIC, 459 _SC_DEVICE_SPECIFIC_R, 460 _SC_FD_MGMT, 461 _SC_FIFO, 462 _SC_PIPE, 463 _SC_FILE_ATTRIBUTES, 464 _SC_FILE_LOCKING, 465 _SC_FILE_SYSTEM, 466 _SC_MONOTONIC_CLOCK, 467 _SC_MULTI_PROCESS, 468 _SC_SINGLE_PROCESS, 469 _SC_NETWORKING, 470 _SC_READER_WRITER_LOCKS, 471 _SC_SPIN_LOCKS, 472 _SC_REGEXP, 473 _SC_REGEX_VERSION, 474 _SC_SHELL, 475 _SC_SIGNALS, 476 _SC_SPAWN, 477 _SC_SPORADIC_SERVER, 478 _SC_THREAD_SPORADIC_SERVER, 479 _SC_SYSTEM_DATABASE, 480 _SC_SYSTEM_DATABASE_R, 481 _SC_TIMEOUTS, 482 _SC_TYPED_MEMORY_OBJECTS, 483 _SC_USER_GROUPS, 484 _SC_USER_GROUPS_R, 485 _SC_2_PBS, 486 _SC_2_PBS_ACCOUNTING, 487 _SC_2_PBS_LOCATE, 488 _SC_2_PBS_MESSAGE, 489 _SC_2_PBS_TRACK, 490 _SC_SYMLOOP_MAX, 491 _SC_STREAMS, 492 _SC_2_PBS_CHECKPOINT, 493 494 _SC_V6_ILP32_OFF32, 495 _SC_V6_ILP32_OFFBIG, 496 _SC_V6_LP64_OFF64, 497 _SC_V6_LPBIG_OFFBIG, 498 499 _SC_HOST_NAME_MAX, 500 _SC_TRACE, 501 _SC_TRACE_EVENT_FILTER, 502 _SC_TRACE_INHERIT, 503 _SC_TRACE_LOG, 504 505 _SC_LEVEL1_ICACHE_SIZE, 506 _SC_LEVEL1_ICACHE_ASSOC, 507 _SC_LEVEL1_ICACHE_LINESIZE, 508 _SC_LEVEL1_DCACHE_SIZE, 509 _SC_LEVEL1_DCACHE_ASSOC, 510 _SC_LEVEL1_DCACHE_LINESIZE, 511 _SC_LEVEL2_CACHE_SIZE, 512 _SC_LEVEL2_CACHE_ASSOC, 513 _SC_LEVEL2_CACHE_LINESIZE, 514 _SC_LEVEL3_CACHE_SIZE, 515 _SC_LEVEL3_CACHE_ASSOC, 516 _SC_LEVEL3_CACHE_LINESIZE, 517 _SC_LEVEL4_CACHE_SIZE, 518 _SC_LEVEL4_CACHE_ASSOC, 519 _SC_LEVEL4_CACHE_LINESIZE, 520 521 _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, 522 _SC_RAW_SOCKETS 523 } 524 } 525 else version (Darwin) 526 { 527 enum F_OK = 0; 528 enum R_OK = 4; 529 enum W_OK = 2; 530 enum X_OK = 1; 531 532 enum F_ULOCK = 0; 533 enum F_LOCK = 1; 534 enum F_TLOCK = 2; 535 enum F_TEST = 3; 536 537 enum 538 { 539 _SC_ARG_MAX = 1, 540 _SC_CHILD_MAX = 2, 541 _SC_CLK_TCK = 3, 542 _SC_NGROUPS_MAX = 4, 543 _SC_OPEN_MAX = 5, 544 _SC_JOB_CONTROL = 6, 545 _SC_SAVED_IDS = 7, 546 _SC_VERSION = 8, 547 _SC_BC_BASE_MAX = 9, 548 _SC_BC_DIM_MAX = 10, 549 _SC_BC_SCALE_MAX = 11, 550 _SC_BC_STRING_MAX = 12, 551 _SC_COLL_WEIGHTS_MAX = 13, 552 _SC_EXPR_NEST_MAX = 14, 553 _SC_LINE_MAX = 15, 554 _SC_RE_DUP_MAX = 16, 555 _SC_2_VERSION = 17, 556 _SC_2_C_BIND = 18, 557 _SC_2_C_DEV = 19, 558 _SC_2_CHAR_TERM = 20, 559 _SC_2_FORT_DEV = 21, 560 _SC_2_FORT_RUN = 22, 561 _SC_2_LOCALEDEF = 23, 562 _SC_2_SW_DEV = 24, 563 _SC_2_UPE = 25, 564 _SC_STREAM_MAX = 26, 565 _SC_TZNAME_MAX = 27, 566 _SC_ASYNCHRONOUS_IO = 28, 567 _SC_PAGESIZE = 29, 568 _SC_MEMLOCK = 30, 569 _SC_MEMLOCK_RANGE = 31, 570 _SC_MEMORY_PROTECTION = 32, 571 _SC_MESSAGE_PASSING = 33, 572 _SC_PRIORITIZED_IO = 34, 573 _SC_PRIORITY_SCHEDULING = 35, 574 _SC_REALTIME_SIGNALS = 36, 575 _SC_SEMAPHORES = 37, 576 _SC_FSYNC = 38, 577 _SC_SHARED_MEMORY_OBJECTS = 39, 578 _SC_SYNCHRONIZED_IO = 40, 579 _SC_TIMERS = 41, 580 _SC_AIO_LISTIO_MAX = 42, 581 _SC_AIO_MAX = 43, 582 _SC_AIO_PRIO_DELTA_MAX = 44, 583 _SC_DELAYTIMER_MAX = 45, 584 _SC_MQ_OPEN_MAX = 46, 585 _SC_MAPPED_FILES = 47, 586 _SC_RTSIG_MAX = 48, 587 _SC_SEM_NSEMS_MAX = 49, 588 _SC_SEM_VALUE_MAX = 50, 589 _SC_SIGQUEUE_MAX = 51, 590 _SC_TIMER_MAX = 52, 591 _SC_IOV_MAX = 56, 592 _SC_NPROCESSORS_CONF = 57, 593 _SC_NPROCESSORS_ONLN = 58, 594 _SC_2_PBS = 59, 595 _SC_2_PBS_ACCOUNTING = 60, 596 _SC_2_PBS_CHECKPOINT = 61, 597 _SC_2_PBS_LOCATE = 62, 598 _SC_2_PBS_MESSAGE = 63, 599 _SC_2_PBS_TRACK = 64, 600 _SC_ADVISORY_INFO = 65, 601 _SC_BARRIERS = 66, 602 _SC_CLOCK_SELECTION = 67, 603 _SC_CPUTIME = 68, 604 _SC_FILE_LOCKING = 69, 605 _SC_GETGR_R_SIZE_MAX = 70, 606 _SC_GETPW_R_SIZE_MAX = 71, 607 _SC_HOST_NAME_MAX = 72, 608 _SC_LOGIN_NAME_MAX = 73, 609 _SC_MONOTONIC_CLOCK = 74, 610 _SC_MQ_PRIO_MAX = 75, 611 _SC_READER_WRITER_LOCKS = 76, 612 _SC_REGEXP = 77, 613 _SC_SHELL = 78, 614 _SC_SPAWN = 79, 615 _SC_SPIN_LOCKS = 80, 616 _SC_SPORADIC_SERVER = 81, 617 _SC_THREAD_ATTR_STACKADDR = 82, 618 _SC_THREAD_ATTR_STACKSIZE = 83, 619 _SC_THREAD_CPUTIME = 84, 620 _SC_THREAD_DESTRUCTOR_ITERATIONS = 85, 621 _SC_THREAD_KEYS_MAX = 86, 622 _SC_THREAD_PRIO_INHERIT = 87, 623 _SC_THREAD_PRIO_PROTECT = 88, 624 _SC_THREAD_PRIORITY_SCHEDULING = 89, 625 _SC_THREAD_PROCESS_SHARED = 90, 626 _SC_THREAD_SAFE_FUNCTIONS = 91, 627 _SC_THREAD_SPORADIC_SERVER = 92, 628 _SC_THREAD_STACK_MIN = 93, 629 _SC_THREAD_THREADS_MAX = 94, 630 _SC_TIMEOUTS = 95, 631 _SC_THREADS = 96, 632 _SC_TRACE = 97, 633 _SC_TRACE_EVENT_FILTER = 98, 634 _SC_TRACE_INHERIT = 99, 635 _SC_TRACE_LOG = 100, 636 _SC_TTY_NAME_MAX = 101, 637 _SC_TYPED_MEMORY_OBJECTS = 102, 638 _SC_V6_ILP32_OFF32 = 103, 639 _SC_V6_ILP32_OFFBIG = 104, 640 _SC_V6_LP64_OFF64 = 105, 641 _SC_V6_LPBIG_OFFBIG = 106, 642 _SC_ATEXIT_MAX = 107, 643 _SC_XOPEN_CRYPT = 108, 644 _SC_XOPEN_ENH_I18N = 109, 645 _SC_XOPEN_LEGACY = 110, 646 _SC_XOPEN_REALTIME = 111, 647 _SC_XOPEN_REALTIME_THREADS = 112, 648 _SC_XOPEN_SHM = 113, 649 _SC_XOPEN_STREAMS = 114, 650 _SC_XOPEN_UNIX = 115, 651 _SC_XOPEN_VERSION = 116, 652 _SC_IPV6 = 118, 653 _SC_RAW_SOCKETS = 119, 654 _SC_SYMLOOP_MAX = 120, 655 _SC_XOPEN_XCU_VERSION = 121, 656 _SC_XBS5_ILP32_OFF32 = 122, 657 _SC_XBS5_ILP32_OFFBIG = 123, 658 _SC_XBS5_LP64_OFF64 = 124, 659 _SC_XBS5_LPBIG_OFFBIG = 125, 660 _SC_SS_REPL_MAX = 126, 661 _SC_TRACE_EVENT_NAME_MAX = 127, 662 _SC_TRACE_NAME_MAX = 128, 663 _SC_TRACE_SYS_MAX = 129, 664 _SC_TRACE_USER_EVENT_MAX = 130, 665 _SC_PASS_MAX = 131, 666 } 667 668 enum _SC_PAGE_SIZE = _SC_PAGESIZE; 669 670 enum 671 { 672 _CS_PATH = 1, 673 _CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2, 674 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3, 675 _CS_POSIX_V6_ILP32_OFF32_LIBS = 4, 676 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5, 677 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6, 678 _CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7, 679 _CS_POSIX_V6_LP64_OFF64_CFLAGS = 8, 680 _CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9, 681 _CS_POSIX_V6_LP64_OFF64_LIBS = 10, 682 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11, 683 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12, 684 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13, 685 _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14, 686 687 _CS_XBS5_ILP32_OFF32_CFLAGS = 20, 688 _CS_XBS5_ILP32_OFF32_LDFLAGS = 21, 689 _CS_XBS5_ILP32_OFF32_LIBS = 22, 690 _CS_XBS5_ILP32_OFF32_LINTFLAGS = 23, 691 _CS_XBS5_ILP32_OFFBIG_CFLAGS = 24, 692 _CS_XBS5_ILP32_OFFBIG_LDFLAGS = 25, 693 _CS_XBS5_ILP32_OFFBIG_LIBS = 26, 694 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 27, 695 _CS_XBS5_LP64_OFF64_CFLAGS = 28, 696 _CS_XBS5_LP64_OFF64_LDFLAGS = 29, 697 _CS_XBS5_LP64_OFF64_LIBS = 30, 698 _CS_XBS5_LP64_OFF64_LINTFLAGS = 31, 699 _CS_XBS5_LPBIG_OFFBIG_CFLAGS = 32, 700 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 33, 701 _CS_XBS5_LPBIG_OFFBIG_LIBS = 34, 702 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 35, 703 704 _CS_DARWIN_USER_DIR = 65536, 705 _CS_DARWIN_USER_TEMP_DIR = 65537, 706 _CS_DARWIN_USER_CACHE_DIR = 65538, 707 } 708 } 709 else version (FreeBSD) 710 { 711 enum F_OK = 0; 712 enum R_OK = 0x04; 713 enum W_OK = 0x02; 714 enum X_OK = 0x01; 715 716 enum F_ULOCK = 0; 717 enum F_LOCK = 1; 718 enum F_TLOCK = 2; 719 enum F_TEST = 3; 720 721 enum 722 { 723 _SC_ARG_MAX = 1, 724 _SC_CHILD_MAX = 2, 725 _SC_CLK_TCK = 3, 726 _SC_NGROUPS_MAX = 4, 727 _SC_OPEN_MAX = 5, 728 _SC_JOB_CONTROL = 6, 729 _SC_SAVED_IDS = 7, 730 _SC_VERSION = 8, 731 _SC_BC_BASE_MAX = 9, 732 _SC_BC_DIM_MAX = 10, 733 _SC_BC_SCALE_MAX = 11, 734 _SC_BC_STRING_MAX = 12, 735 _SC_COLL_WEIGHTS_MAX = 13, 736 _SC_EXPR_NEST_MAX = 14, 737 _SC_LINE_MAX = 15, 738 _SC_RE_DUP_MAX = 16, 739 _SC_2_VERSION = 17, 740 _SC_2_C_BIND = 18, 741 _SC_2_C_DEV = 19, 742 _SC_2_CHAR_TERM = 20, 743 _SC_2_FORT_DEV = 21, 744 _SC_2_FORT_RUN = 22, 745 _SC_2_LOCALEDEF = 23, 746 _SC_2_SW_DEV = 24, 747 _SC_2_UPE = 25, 748 _SC_STREAM_MAX = 26, 749 _SC_TZNAME_MAX = 27, 750 _SC_ASYNCHRONOUS_IO = 28, 751 _SC_MAPPED_FILES = 29, 752 _SC_MEMLOCK = 30, 753 _SC_MEMLOCK_RANGE = 31, 754 _SC_MEMORY_PROTECTION = 32, 755 _SC_MESSAGE_PASSING = 33, 756 _SC_PRIORITIZED_IO = 34, 757 _SC_PRIORITY_SCHEDULING = 35, 758 _SC_REALTIME_SIGNALS = 36, 759 _SC_SEMAPHORES = 37, 760 _SC_FSYNC = 38, 761 _SC_SHARED_MEMORY_OBJECTS = 39, 762 _SC_SYNCHRONIZED_IO = 40, 763 _SC_TIMERS = 41, 764 _SC_AIO_LISTIO_MAX = 42, 765 _SC_AIO_MAX = 43, 766 _SC_AIO_PRIO_DELTA_MAX = 44, 767 _SC_DELAYTIMER_MAX = 45, 768 _SC_MQ_OPEN_MAX = 46, 769 _SC_PAGESIZE = 47, 770 _SC_RTSIG_MAX = 48, 771 _SC_SEM_NSEMS_MAX = 49, 772 _SC_SEM_VALUE_MAX = 50, 773 _SC_SIGQUEUE_MAX = 51, 774 _SC_TIMER_MAX = 52, 775 _SC_IOV_MAX = 56, 776 _SC_NPROCESSORS_CONF = 57, 777 _SC_NPROCESSORS_ONLN = 58, 778 _SC_2_PBS = 59, 779 _SC_2_PBS_ACCOUNTING = 60, 780 _SC_2_PBS_CHECKPOINT = 61, 781 _SC_2_PBS_LOCATE = 62, 782 _SC_2_PBS_MESSAGE = 63, 783 _SC_2_PBS_TRACK = 64, 784 _SC_ADVISORY_INFO = 65, 785 _SC_BARRIERS = 66, 786 _SC_CLOCK_SELECTION = 67, 787 _SC_CPUTIME = 68, 788 _SC_FILE_LOCKING = 69, 789 _SC_GETGR_R_SIZE_MAX = 70, 790 _SC_GETPW_R_SIZE_MAX = 71, 791 _SC_HOST_NAME_MAX = 72, 792 _SC_LOGIN_NAME_MAX = 73, 793 _SC_MONOTONIC_CLOCK = 74, 794 _SC_MQ_PRIO_MAX = 75, 795 _SC_READER_WRITER_LOCKS = 76, 796 _SC_REGEXP = 77, 797 _SC_SHELL = 78, 798 _SC_SPAWN = 79, 799 _SC_SPIN_LOCKS = 80, 800 _SC_SPORADIC_SERVER = 81, 801 _SC_THREAD_ATTR_STACKADDR = 82, 802 _SC_THREAD_ATTR_STACKSIZE = 83, 803 _SC_THREAD_CPUTIME = 84, 804 _SC_THREAD_DESTRUCTOR_ITERATIONS = 85, 805 _SC_THREAD_KEYS_MAX = 86, 806 _SC_THREAD_PRIO_INHERIT = 87, 807 _SC_THREAD_PRIO_PROTECT = 88, 808 _SC_THREAD_PRIORITY_SCHEDULING = 89, 809 _SC_THREAD_PROCESS_SHARED = 90, 810 _SC_THREAD_SAFE_FUNCTIONS = 91, 811 _SC_THREAD_SPORADIC_SERVER = 92, 812 _SC_THREAD_STACK_MIN = 93, 813 _SC_THREAD_THREADS_MAX = 94, 814 _SC_TIMEOUTS = 95, 815 _SC_THREADS = 96, 816 _SC_TRACE = 97, 817 _SC_TRACE_EVENT_FILTER = 98, 818 _SC_TRACE_INHERIT = 99, 819 _SC_TRACE_LOG = 100, 820 _SC_TTY_NAME_MAX = 101, 821 _SC_TYPED_MEMORY_OBJECTS = 102, 822 _SC_V6_ILP32_OFF32 = 103, 823 _SC_V6_ILP32_OFFBIG = 104, 824 _SC_V6_LP64_OFF64 = 105, 825 _SC_V6_LPBIG_OFFBIG = 106, 826 _SC_IPV6 = 118, 827 _SC_RAW_SOCKETS = 119, 828 _SC_SYMLOOP_MAX = 120, 829 _SC_ATEXIT_MAX = 107, 830 _SC_XOPEN_CRYPT = 108, 831 _SC_XOPEN_ENH_I18N = 109, 832 _SC_XOPEN_LEGACY = 110, 833 _SC_XOPEN_REALTIME = 111, 834 _SC_XOPEN_REALTIME_THREADS = 112, 835 _SC_XOPEN_SHM = 113, 836 _SC_XOPEN_STREAMS = 114, 837 _SC_XOPEN_UNIX = 115, 838 _SC_XOPEN_VERSION = 116, 839 _SC_XOPEN_XCU_VERSION = 117, 840 _SC_CPUSET_SIZE = 122, 841 _SC_PHYS_PAGES = 121, 842 } 843 844 enum _SC_PAGE_SIZE = _SC_PAGESIZE; 845 846 enum 847 { 848 _CS_PATH = 1, 849 _CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2, 850 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3, 851 _CS_POSIX_V6_ILP32_OFF32_LIBS = 4, 852 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5, 853 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6, 854 _CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7, 855 _CS_POSIX_V6_LP64_OFF64_CFLAGS = 8, 856 _CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9, 857 _CS_POSIX_V6_LP64_OFF64_LIBS = 10, 858 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11, 859 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12, 860 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13, 861 _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14, 862 } 863 } 864 else version (NetBSD) 865 { 866 enum F_OK = 0; 867 enum R_OK = 0x04; 868 enum W_OK = 0x02; 869 enum X_OK = 0x01; 870 871 enum F_ULOCK = 0; 872 enum F_LOCK = 1; 873 enum F_TLOCK = 2; 874 enum F_TEST = 3; 875 876 enum 877 { 878 _SC_ARG_MAX = 1, 879 _SC_CHILD_MAX = 2, 880 _O_SC_CLK_TCK = 3, 881 _SC_NGROUPS_MAX = 4, 882 _SC_OPEN_MAX = 5, 883 _SC_JOB_CONTROL = 6, 884 _SC_SAVED_IDS = 7, 885 _SC_VERSION = 8, 886 _SC_BC_BASE_MAX = 9, 887 _SC_BC_DIM_MAX = 10, 888 _SC_BC_SCALE_MAX = 11, 889 _SC_BC_STRING_MAX = 12, 890 _SC_COLL_WEIGHTS_MAX = 13, 891 _SC_EXPR_NEST_MAX = 14, 892 _SC_LINE_MAX = 15, 893 _SC_RE_DUP_MAX = 16, 894 _SC_2_VERSION = 17, 895 _SC_2_C_BIND = 18, 896 _SC_2_C_DEV = 19, 897 _SC_2_CHAR_TERM = 20, 898 _SC_2_FORT_DEV = 21, 899 _SC_2_FORT_RUN = 22, 900 _SC_2_LOCALEDEF = 23, 901 _SC_2_SW_DEV = 24, 902 _SC_2_UPE = 25, 903 _SC_STREAM_MAX = 26, 904 _SC_TZNAME_MAX = 27, 905 _SC_PAGESIZE = 28, 906 _SC_FSYNC = 29, 907 _SC_XOPEN_SHM = 30, 908 _SC_SYNCHRONIZED_IO = 31, 909 _SC_IOV_MAX = 32, 910 _SC_MAPPED_FILES = 33, 911 _SC_MEMLOCK = 34, 912 _SC_MEMLOCK_RANGE = 35, 913 _SC_MEMORY_PROTECTION = 36, 914 _SC_LOGIN_NAME_MAX = 37, 915 _SC_MONOTONIC_CLOCK = 38, 916 _SC_CLK_TCK = 39, 917 _SC_ATEXIT_MAX = 40, 918 _SC_THREADS = 41, 919 _SC_SEMAPHORES = 42, 920 _SC_BARRIERS = 43, 921 _SC_TIMERS = 44, 922 _SC_SPIN_LOCKS = 45, 923 _SC_READER_WRITER_LOCKS = 46, 924 _SC_GETGR_R_SIZE_MAX = 47, 925 _SC_GETPW_R_SIZE_MAX = 48, 926 _SC_CLOCK_SELECTION = 49, 927 _SC_ASYNCHRONOUS_IO = 50, 928 _SC_AIO_LISTIO_MAX = 51, 929 _SC_AIO_MAX = 52, 930 _SC_MESSAGE_PASSING = 53, 931 _SC_MQ_OPEN_MAX = 54, 932 _SC_MQ_PRIO_MAX = 55, 933 _SC_PRIORITY_SCHEDULING = 56, 934 _SC_THREAD_DESTRUCTOR_ITERATIONS = 57, 935 _SC_THREAD_KEYS_MAX = 58, 936 _SC_THREAD_STACK_MIN = 59, 937 _SC_THREAD_THREADS_MAX = 60, 938 _SC_THREAD_ATTR_STACKADDR = 61, 939 _SC_THREAD_ATTR_STACKSIZE = 62, 940 _SC_THREAD_PRIORITY_SCHEDULING = 63, 941 _SC_THREAD_PRIO_INHERIT = 64, 942 _SC_THREAD_PRIO_PROTECT = 65, 943 _SC_THREAD_PROCESS_SHARED = 66, 944 _SC_THREAD_SAFE_FUNCTIONS = 67, 945 _SC_TTY_NAME_MAX = 68, 946 _SC_HOST_NAME_MAX = 69, 947 _SC_PASS_MAX = 70, 948 _SC_REGEXP = 71, 949 _SC_SHELL = 72, 950 _SC_SYMLOOP_MAX = 73, 951 952 /* Actually, they are not supported or implemented yet */ 953 _SC_V6_ILP32_OFF32 = 74, 954 _SC_V6_ILP32_OFFBIG = 75, 955 _SC_V6_LP64_OFF64 = 76, 956 _SC_V6_LPBIG_OFFBIG = 77, 957 _SC_2_PBS = 80, 958 _SC_2_PBS_ACCOUNTING = 81, 959 _SC_2_PBS_CHECKPOINT = 82, 960 _SC_2_PBS_LOCATE = 83, 961 _SC_2_PBS_MESSAGE = 84, 962 _SC_2_PBS_TRACK = 85, 963 964 /* These are implemented */ 965 _SC_SPAWN = 86, 966 _SC_SHARED_MEMORY_OBJECTS = 87, 967 968 /* Extensions found in Solaris and Linux. */ 969 _SC_PHYS_PAGES = 121, 970 971 /* Commonly provided sysconf() extensions */ 972 _SC_NPROCESSORS_CONF = 1001, 973 _SC_NPROCESSORS_ONLN = 1002, 974 /* Native variables */ 975 _SC_SCHED_RT_TS = 2001, 976 _SC_SCHED_PRI_MIN = 2002, 977 _SC_SCHED_PRI_MAX = 2003 978 979 } 980 981 enum _SC_PAGE_SIZE = _SC_PAGESIZE; 982 983 enum 984 { 985 _CS_PATH = 1, 986 _CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2, 987 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3, 988 _CS_POSIX_V6_ILP32_OFF32_LIBS = 4, 989 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5, 990 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6, 991 _CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7, 992 _CS_POSIX_V6_LP64_OFF64_CFLAGS = 8, 993 _CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9, 994 _CS_POSIX_V6_LP64_OFF64_LIBS = 10, 995 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11, 996 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12, 997 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13, 998 _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14, 999 } 1000 } 1001 else version (OpenBSD) 1002 { 1003 enum F_OK = 0; 1004 enum R_OK = 0x04; 1005 enum W_OK = 0x02; 1006 enum X_OK = 0x01; 1007 1008 enum F_ULOCK = 0; 1009 enum F_LOCK = 1; 1010 enum F_TLOCK = 2; 1011 enum F_TEST = 3; 1012 1013 enum 1014 { 1015 _SC_ARG_MAX = 1, 1016 _SC_CHILD_MAX = 2, 1017 _O_SC_CLK_TCK = 3, 1018 _SC_NGROUPS_MAX = 4, 1019 _SC_OPEN_MAX = 5, 1020 _SC_JOB_CONTROL = 6, 1021 _SC_SAVED_IDS = 7, 1022 _SC_VERSION = 8, 1023 _SC_BC_BASE_MAX = 9, 1024 _SC_BC_DIM_MAX = 10, 1025 _SC_BC_SCALE_MAX = 11, 1026 _SC_BC_STRING_MAX = 12, 1027 _SC_COLL_WEIGHTS_MAX = 13, 1028 _SC_EXPR_NEST_MAX = 14, 1029 _SC_LINE_MAX = 15, 1030 _SC_RE_DUP_MAX = 16, 1031 _SC_2_VERSION = 17, 1032 _SC_2_C_BIND = 18, 1033 _SC_2_C_DEV = 19, 1034 _SC_2_CHAR_TERM = 20, 1035 _SC_2_FORT_DEV = 21, 1036 _SC_2_FORT_RUN = 22, 1037 _SC_2_LOCALEDEF = 23, 1038 _SC_2_SW_DEV = 24, 1039 _SC_2_UPE = 25, 1040 _SC_STREAM_MAX = 26, 1041 _SC_TZNAME_MAX = 27, 1042 _SC_PAGESIZE = 28, 1043 _SC_FSYNC = 29, 1044 _SC_XOPEN_SHM = 30, 1045 _SC_SEM_NSEMS_MAX = 31, 1046 _SC_SEM_VALUE_MAX = 32, 1047 _SC_HOST_NAME_MAX = 33, 1048 _SC_MONOTONIC_CLOCK = 34, 1049 _SC_2_PBS = 35, 1050 _SC_2_PBS_ACCOUNTING = 36, 1051 _SC_2_PBS_CHECKPOINT = 37, 1052 _SC_2_PBS_LOCATE = 38, 1053 _SC_2_PBS_MESSAGE = 39, 1054 _SC_2_PBS_TRACK = 40, 1055 _SC_ADVISORY_INFO = 41, 1056 _SC_AIO_LISTIO_MAX = 42, 1057 _SC_AIO_MAX = 43, 1058 _SC_AIO_PRIO_DELTA_MAX = 44, 1059 _SC_ASYNCHRONOUS_IO = 45, 1060 _SC_ATEXIT_MAX = 46, 1061 _SC_BARRIERS = 47, 1062 _SC_CLOCK_SELECTION = 48, 1063 _SC_CPUTIME = 49, 1064 _SC_DELAYTIMER_MAX = 50, 1065 _SC_IOV_MAX = 51, 1066 _SC_IPV6 = 52, 1067 _SC_MAPPED_FILES = 53, 1068 _SC_MEMLOCK = 54, 1069 _SC_MEMLOCK_RANGE = 55, 1070 _SC_MEMORY_PROTECTION = 56, 1071 _SC_MESSAGE_PASSING = 57, 1072 _SC_MQ_OPEN_MAX = 58, 1073 _SC_MQ_PRIO_MAX = 59, 1074 _SC_PRIORITIZED_IO = 60, 1075 _SC_PRIORITY_SCHEDULING = 61, 1076 _SC_RAW_SOCKETS = 62, 1077 _SC_READER_WRITER_LOCKS = 63, 1078 _SC_REALTIME_SIGNALS = 64, 1079 _SC_REGEXP = 65, 1080 _SC_RTSIG_MAX = 66, 1081 _SC_SEMAPHORES = 67, 1082 _SC_SHARED_MEMORY_OBJECTS = 68, 1083 _SC_SHELL = 69, 1084 _SC_SIGQUEUE_MAX = 70, 1085 _SC_SPAWN = 71, 1086 _SC_SPIN_LOCKS = 72, 1087 _SC_SPORADIC_SERVER = 73, 1088 _SC_SS_REPL_MAX = 74, 1089 _SC_SYNCHRONIZED_IO = 75, 1090 _SC_SYMLOOP_MAX = 76, 1091 _SC_THREAD_ATTR_STACKADDR = 77, 1092 _SC_THREAD_ATTR_STACKSIZE = 78, 1093 _SC_THREAD_CPUTIME = 79, 1094 _SC_THREAD_DESTRUCTOR_ITERATIONS = 80, 1095 _SC_THREAD_KEYS_MAX = 81, 1096 _SC_THREAD_PRIO_INHERIT = 82, 1097 _SC_THREAD_PRIO_PROTECT = 83, 1098 _SC_THREAD_PRIORITY_SCHEDULING = 84, 1099 _SC_THREAD_PROCESS_SHARED = 85, 1100 _SC_THREAD_ROBUST_PRIO_INHERIT = 86, 1101 _SC_THREAD_ROBUST_PRIO_PROTECT = 87, 1102 _SC_THREAD_SPORADIC_SERVER = 88, 1103 _SC_THREAD_STACK_MIN = 89, 1104 _SC_THREAD_THREADS_MAX = 90, 1105 _SC_THREADS = 91, 1106 _SC_TIMEOUTS = 92, 1107 _SC_TIMER_MAX = 93, 1108 _SC_TIMERS = 94, 1109 _SC_TRACE = 95, 1110 _SC_TRACE_EVENT_FILTER = 96, 1111 _SC_TRACE_EVENT_NAME_MAX = 97, 1112 _SC_TRACE_INHERIT = 98, 1113 _SC_TRACE_LOG = 99, 1114 _SC_GETGR_R_SIZE_MAX = 100, 1115 _SC_GETPW_R_SIZE_MAX = 101, 1116 _SC_LOGIN_NAME_MAX = 102, 1117 _SC_THREAD_SAFE_FUNCTIONS = 103, 1118 _SC_TRACE_NAME_MAX = 104, 1119 _SC_TRACE_SYS_MAX = 105, 1120 _SC_TRACE_USER_EVENT_MAX = 106, 1121 _SC_TTY_NAME_MAX = 107, 1122 _SC_TYPED_MEMORY_OBJECTS = 108, 1123 _SC_V6_ILP32_OFF32 = 109, 1124 _SC_V6_ILP32_OFFBIG = 110, 1125 _SC_V6_LP64_OFF64 = 111, 1126 _SC_V6_LPBIG_OFFBIG = 112, 1127 _SC_V7_ILP32_OFF32 = 113, 1128 _SC_V7_ILP32_OFFBIG = 114, 1129 _SC_V7_LP64_OFF64 = 115, 1130 _SC_V7_LPBIG_OFFBIG = 116, 1131 _SC_XOPEN_CRYPT = 117, 1132 _SC_XOPEN_ENH_I18N = 118, 1133 _SC_XOPEN_LEGACY = 119, 1134 _SC_XOPEN_REALTIME = 120, 1135 _SC_XOPEN_REALTIME_THREADS = 121, 1136 _SC_XOPEN_STREAMS = 122, 1137 _SC_XOPEN_UNIX = 123, 1138 _SC_XOPEN_UUCP = 124, 1139 _SC_XOPEN_VERSION = 125, 1140 _SC_PHYS_PAGES = 500, 1141 _SC_AVPHYS_PAGES = 501, 1142 _SC_NPROCESSORS_CONF = 502, 1143 _SC_NPROCESSORS_ONLN = 503, 1144 } 1145 1146 enum _SC_PAGE_SIZE = _SC_PAGESIZE; 1147 1148 enum 1149 { 1150 _CS_PATH = 1, 1151 _CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2, 1152 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3, 1153 _CS_POSIX_V6_ILP32_OFF32_LIBS = 4, 1154 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5, 1155 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6, 1156 _CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7, 1157 _CS_POSIX_V6_LP64_OFF64_CFLAGS = 8, 1158 _CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9, 1159 _CS_POSIX_V6_LP64_OFF64_LIBS = 10, 1160 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11, 1161 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12, 1162 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13, 1163 _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14, 1164 _CS_V6_ENV = 15, 1165 _CS_POSIX_V7_ILP32_OFF32_CFLAGS = 16, 1166 _CS_POSIX_V7_ILP32_OFF32_LDFLAGS = 17, 1167 _CS_POSIX_V7_ILP32_OFF32_LIBS = 18, 1168 _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS = 19, 1169 _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS = 20, 1170 _CS_POSIX_V7_ILP32_OFFBIG_LIBS = 21, 1171 _CS_POSIX_V7_LP64_OFF64_CFLAGS = 22, 1172 _CS_POSIX_V7_LP64_OFF64_LDFLAGS = 23, 1173 _CS_POSIX_V7_LP64_OFF64_LIBS = 24, 1174 _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS = 25, 1175 _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS = 26, 1176 _CS_POSIX_V7_LPBIG_OFFBIG_LIBS = 27, 1177 _CS_POSIX_V7_THREADS_CFLAGS = 28, 1178 _CS_POSIX_V7_THREADS_LDFLAGS = 29, 1179 _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS = 30, 1180 _CS_V7_ENV = 31, 1181 } 1182 } 1183 else version (DragonFlyBSD) 1184 { 1185 enum F_OK = 0; 1186 enum R_OK = 0x04; 1187 enum W_OK = 0x02; 1188 enum X_OK = 0x01; 1189 1190 enum F_ULOCK = 0; 1191 enum F_LOCK = 1; 1192 enum F_TLOCK = 2; 1193 enum F_TEST = 3; 1194 1195 enum 1196 { 1197 _SC_ARG_MAX = 1, 1198 _SC_CHILD_MAX = 2, 1199 _SC_CLK_TCK = 3, 1200 _SC_NGROUPS_MAX = 4, 1201 _SC_OPEN_MAX = 5, 1202 _SC_JOB_CONTROL = 6, 1203 _SC_SAVED_IDS = 7, 1204 _SC_VERSION = 8, 1205 _SC_BC_BASE_MAX = 9, 1206 _SC_BC_DIM_MAX = 10, 1207 _SC_BC_SCALE_MAX = 11, 1208 _SC_BC_STRING_MAX = 12, 1209 _SC_COLL_WEIGHTS_MAX = 13, 1210 _SC_EXPR_NEST_MAX = 14, 1211 _SC_LINE_MAX = 15, 1212 _SC_RE_DUP_MAX = 16, 1213 _SC_2_VERSION = 17, 1214 _SC_2_C_BIND = 18, 1215 _SC_2_C_DEV = 19, 1216 _SC_2_CHAR_TERM = 20, 1217 _SC_2_FORT_DEV = 21, 1218 _SC_2_FORT_RUN = 22, 1219 _SC_2_LOCALEDEF = 23, 1220 _SC_2_SW_DEV = 24, 1221 _SC_2_UPE = 25, 1222 _SC_STREAM_MAX = 26, 1223 _SC_TZNAME_MAX = 27, 1224 _SC_ASYNCHRONOUS_IO = 28, 1225 _SC_MAPPED_FILES = 29, 1226 _SC_MEMLOCK = 30, 1227 _SC_MEMLOCK_RANGE = 31, 1228 _SC_MEMORY_PROTECTION = 32, 1229 _SC_MESSAGE_PASSING = 33, 1230 _SC_PRIORITIZED_IO = 34, 1231 _SC_PRIORITY_SCHEDULING = 35, 1232 _SC_REALTIME_SIGNALS = 36, 1233 _SC_SEMAPHORES = 37, 1234 _SC_FSYNC = 38, 1235 _SC_SHARED_MEMORY_OBJECTS = 39, 1236 _SC_SYNCHRONIZED_IO = 40, 1237 _SC_TIMERS = 41, 1238 _SC_AIO_LISTIO_MAX = 42, 1239 _SC_AIO_MAX = 43, 1240 _SC_AIO_PRIO_DELTA_MAX = 44, 1241 _SC_DELAYTIMER_MAX = 45, 1242 _SC_MQ_OPEN_MAX = 46, 1243 _SC_PAGESIZE = 47, 1244 _SC_RTSIG_MAX = 48, 1245 _SC_SEM_NSEMS_MAX = 49, 1246 _SC_SEM_VALUE_MAX = 50, 1247 _SC_SIGQUEUE_MAX = 51, 1248 _SC_TIMER_MAX = 52, 1249 _SC_IOV_MAX = 56, 1250 _SC_NPROCESSORS_CONF = 57, 1251 _SC_NPROCESSORS_ONLN = 58, 1252 _SC_2_PBS = 59, 1253 _SC_2_PBS_ACCOUNTING = 60, 1254 _SC_2_PBS_CHECKPOINT = 61, 1255 _SC_2_PBS_LOCATE = 62, 1256 _SC_2_PBS_MESSAGE = 63, 1257 _SC_2_PBS_TRACK = 64, 1258 _SC_ADVISORY_INFO = 65, 1259 _SC_BARRIERS = 66, 1260 _SC_CLOCK_SELECTION = 67, 1261 _SC_CPUTIME = 68, 1262 _SC_FILE_LOCKING = 69, 1263 _SC_GETGR_R_SIZE_MAX = 70, 1264 _SC_GETPW_R_SIZE_MAX = 71, 1265 _SC_HOST_NAME_MAX = 72, 1266 _SC_LOGIN_NAME_MAX = 73, 1267 _SC_MONOTONIC_CLOCK = 74, 1268 _SC_MQ_PRIO_MAX = 75, 1269 _SC_READER_WRITER_LOCKS = 76, 1270 _SC_REGEXP = 77, 1271 _SC_SHELL = 78, 1272 _SC_SPAWN = 79, 1273 _SC_SPIN_LOCKS = 80, 1274 _SC_SPORADIC_SERVER = 81, 1275 _SC_THREAD_ATTR_STACKADDR = 82, 1276 _SC_THREAD_ATTR_STACKSIZE = 83, 1277 _SC_THREAD_CPUTIME = 84, 1278 _SC_THREAD_DESTRUCTOR_ITERATIONS = 85, 1279 _SC_THREAD_KEYS_MAX = 86, 1280 _SC_THREAD_PRIO_INHERIT = 87, 1281 _SC_THREAD_PRIO_PROTECT = 88, 1282 _SC_THREAD_PRIORITY_SCHEDULING = 89, 1283 _SC_THREAD_PROCESS_SHARED = 90, 1284 _SC_THREAD_SAFE_FUNCTIONS = 91, 1285 _SC_THREAD_SPORADIC_SERVER = 92, 1286 _SC_THREAD_STACK_MIN = 93, 1287 _SC_THREAD_THREADS_MAX = 94, 1288 _SC_TIMEOUTS = 95, 1289 _SC_THREADS = 96, 1290 _SC_TRACE = 97, 1291 _SC_TRACE_EVENT_FILTER = 98, 1292 _SC_TRACE_INHERIT = 99, 1293 _SC_TRACE_LOG = 100, 1294 _SC_TTY_NAME_MAX = 101, 1295 _SC_TYPED_MEMORY_OBJECTS = 102, 1296 _SC_V6_ILP32_OFF32 = 103, 1297 _SC_V6_ILP32_OFFBIG = 104, 1298 _SC_V6_LP64_OFF64 = 105, 1299 _SC_V6_LPBIG_OFFBIG = 106, 1300 _SC_IPV6 = 118, 1301 _SC_RAW_SOCKETS = 119, 1302 _SC_SYMLOOP_MAX = 120, 1303 _SC_ATEXIT_MAX = 107, 1304 _SC_XOPEN_CRYPT = 108, 1305 _SC_XOPEN_ENH_I18N = 109, 1306 _SC_XOPEN_LEGACY = 110, 1307 _SC_XOPEN_REALTIME = 111, 1308 _SC_XOPEN_REALTIME_THREADS = 112, 1309 _SC_XOPEN_SHM = 113, 1310 _SC_XOPEN_STREAMS = 114, 1311 _SC_XOPEN_UNIX = 115, 1312 _SC_XOPEN_VERSION = 116, 1313 _SC_XOPEN_XCU_VERSION = 117, 1314 _SC_CPUSET_SIZE = 122, 1315 _SC_PHYS_PAGES = 121, 1316 } 1317 1318 enum _SC_PAGE_SIZE = _SC_PAGESIZE; 1319 1320 enum 1321 { 1322 _CS_PATH = 1, 1323 _CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2, 1324 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3, 1325 _CS_POSIX_V6_ILP32_OFF32_LIBS = 4, 1326 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5, 1327 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6, 1328 _CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7, 1329 _CS_POSIX_V6_LP64_OFF64_CFLAGS = 8, 1330 _CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9, 1331 _CS_POSIX_V6_LP64_OFF64_LIBS = 10, 1332 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11, 1333 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12, 1334 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13, 1335 _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14, 1336 } 1337 } 1338 else version (CRuntime_Bionic) 1339 { 1340 enum F_OK = 0; 1341 enum R_OK = 4; 1342 enum W_OK = 2; 1343 enum X_OK = 1; 1344 1345 enum 1346 { 1347 _SC_ARG_MAX = 0x0000, 1348 _SC_BC_BASE_MAX = 0x0001, 1349 _SC_BC_DIM_MAX = 0x0002, 1350 _SC_BC_SCALE_MAX = 0x0003, 1351 _SC_BC_STRING_MAX = 0x0004, 1352 _SC_CHILD_MAX = 0x0005, 1353 _SC_CLK_TCK = 0x0006, 1354 _SC_COLL_WEIGHTS_MAX = 0x0007, 1355 _SC_EXPR_NEST_MAX = 0x0008, 1356 _SC_LINE_MAX = 0x0009, 1357 _SC_NGROUPS_MAX = 0x000a, 1358 _SC_OPEN_MAX = 0x000b, 1359 _SC_PASS_MAX = 0x000c, 1360 _SC_2_C_BIND = 0x000d, 1361 _SC_2_C_DEV = 0x000e, 1362 _SC_2_C_VERSION = 0x000f, 1363 _SC_2_CHAR_TERM = 0x0010, 1364 _SC_2_FORT_DEV = 0x0011, 1365 _SC_2_FORT_RUN = 0x0012, 1366 _SC_2_LOCALEDEF = 0x0013, 1367 _SC_2_SW_DEV = 0x0014, 1368 _SC_2_UPE = 0x0015, 1369 _SC_2_VERSION = 0x0016, 1370 _SC_JOB_CONTROL = 0x0017, 1371 _SC_SAVED_IDS = 0x0018, 1372 _SC_VERSION = 0x0019, 1373 _SC_RE_DUP_MAX = 0x001a, 1374 _SC_STREAM_MAX = 0x001b, 1375 _SC_TZNAME_MAX = 0x001c, 1376 _SC_XOPEN_CRYPT = 0x001d, 1377 _SC_XOPEN_ENH_I18N = 0x001e, 1378 _SC_XOPEN_SHM = 0x001f, 1379 _SC_XOPEN_VERSION = 0x0020, 1380 _SC_XOPEN_XCU_VERSION = 0x0021, 1381 _SC_XOPEN_REALTIME = 0x0022, 1382 _SC_XOPEN_REALTIME_THREADS = 0x0023, 1383 _SC_XOPEN_LEGACY = 0x0024, 1384 _SC_ATEXIT_MAX = 0x0025, 1385 _SC_IOV_MAX = 0x0026, 1386 _SC_UIO_MAXIOV = _SC_IOV_MAX, 1387 _SC_PAGESIZE = 0x0027, 1388 _SC_PAGE_SIZE = 0x0028, 1389 _SC_XOPEN_UNIX = 0x0029, 1390 _SC_XBS5_ILP32_OFF32 = 0x002a, 1391 _SC_XBS5_ILP32_OFFBIG = 0x002b, 1392 _SC_XBS5_LP64_OFF64 = 0x002c, 1393 _SC_XBS5_LPBIG_OFFBIG = 0x002d, 1394 _SC_AIO_LISTIO_MAX = 0x002e, 1395 _SC_AIO_MAX = 0x002f, 1396 _SC_AIO_PRIO_DELTA_MAX = 0x0030, 1397 _SC_DELAYTIMER_MAX = 0x0031, 1398 _SC_MQ_OPEN_MAX = 0x0032, 1399 _SC_MQ_PRIO_MAX = 0x0033, 1400 _SC_RTSIG_MAX = 0x0034, 1401 _SC_SEM_NSEMS_MAX = 0x0035, 1402 _SC_SEM_VALUE_MAX = 0x0036, 1403 _SC_SIGQUEUE_MAX = 0x0037, 1404 _SC_TIMER_MAX = 0x0038, 1405 _SC_ASYNCHRONOUS_IO = 0x0039, 1406 _SC_FSYNC = 0x003a, 1407 _SC_MAPPED_FILES = 0x003b, 1408 _SC_MEMLOCK = 0x003c, 1409 _SC_MEMLOCK_RANGE = 0x003d, 1410 _SC_MEMORY_PROTECTION = 0x003e, 1411 _SC_MESSAGE_PASSING = 0x003f, 1412 _SC_PRIORITIZED_IO = 0x0040, 1413 _SC_PRIORITY_SCHEDULING = 0x0041, 1414 _SC_REALTIME_SIGNALS = 0x0042, 1415 _SC_SEMAPHORES = 0x0043, 1416 _SC_SHARED_MEMORY_OBJECTS = 0x0044, 1417 _SC_SYNCHRONIZED_IO = 0x0045, 1418 _SC_TIMERS = 0x0046, 1419 _SC_GETGR_R_SIZE_MAX = 0x0047, 1420 _SC_GETPW_R_SIZE_MAX = 0x0048, 1421 _SC_LOGIN_NAME_MAX = 0x0049, 1422 _SC_THREAD_DESTRUCTOR_ITERATIONS = 0x004a, 1423 _SC_THREAD_KEYS_MAX = 0x004b, 1424 _SC_THREAD_STACK_MIN = 0x004c, 1425 _SC_THREAD_THREADS_MAX = 0x004d, 1426 _SC_TTY_NAME_MAX = 0x004e, 1427 1428 _SC_THREADS = 0x004f, 1429 _SC_THREAD_ATTR_STACKADDR = 0x0050, 1430 _SC_THREAD_ATTR_STACKSIZE = 0x0051, 1431 _SC_THREAD_PRIORITY_SCHEDULING = 0x0052, 1432 _SC_THREAD_PRIO_INHERIT = 0x0053, 1433 _SC_THREAD_PRIO_PROTECT = 0x0054, 1434 _SC_THREAD_SAFE_FUNCTIONS = 0x0055, 1435 1436 _SC_NPROCESSORS_CONF = 0x0060, 1437 _SC_NPROCESSORS_ONLN = 0x0061, 1438 _SC_PHYS_PAGES = 0x0062, 1439 _SC_AVPHYS_PAGES = 0x0063, 1440 _SC_MONOTONIC_CLOCK = 0x0064, 1441 1442 _SC_2_PBS = 0x0065, 1443 _SC_2_PBS_ACCOUNTING = 0x0066, 1444 _SC_2_PBS_CHECKPOINT = 0x0067, 1445 _SC_2_PBS_LOCATE = 0x0068, 1446 _SC_2_PBS_MESSAGE = 0x0069, 1447 _SC_2_PBS_TRACK = 0x006a, 1448 _SC_ADVISORY_INFO = 0x006b, 1449 _SC_BARRIERS = 0x006c, 1450 _SC_CLOCK_SELECTION = 0x006d, 1451 _SC_CPUTIME = 0x006e, 1452 _SC_HOST_NAME_MAX = 0x006f, 1453 _SC_IPV6 = 0x0070, 1454 _SC_RAW_SOCKETS = 0x0071, 1455 _SC_READER_WRITER_LOCKS = 0x0072, 1456 _SC_REGEXP = 0x0073, 1457 _SC_SHELL = 0x0074, 1458 _SC_SPAWN = 0x0075, 1459 _SC_SPIN_LOCKS = 0x0076, 1460 _SC_SPORADIC_SERVER = 0x0077, 1461 _SC_SS_REPL_MAX = 0x0078, 1462 _SC_SYMLOOP_MAX = 0x0079, 1463 _SC_THREAD_CPUTIME = 0x007a, 1464 _SC_THREAD_PROCESS_SHARED = 0x007b, 1465 _SC_THREAD_ROBUST_PRIO_INHERIT = 0x007c, 1466 _SC_THREAD_ROBUST_PRIO_PROTECT = 0x007d, 1467 _SC_THREAD_SPORADIC_SERVER = 0x007e, 1468 _SC_TIMEOUTS = 0x007f, 1469 _SC_TRACE = 0x0080, 1470 _SC_TRACE_EVENT_FILTER = 0x0081, 1471 _SC_TRACE_EVENT_NAME_MAX = 0x0082, 1472 _SC_TRACE_INHERIT = 0x0083, 1473 _SC_TRACE_LOG = 0x0084, 1474 _SC_TRACE_NAME_MAX = 0x0085, 1475 _SC_TRACE_SYS_MAX = 0x0086, 1476 _SC_TRACE_USER_EVENT_MAX = 0x0087, 1477 _SC_TYPED_MEMORY_OBJECTS = 0x0088, 1478 _SC_V7_ILP32_OFF32 = 0x0089, 1479 _SC_V7_ILP32_OFFBIG = 0x008a, 1480 _SC_V7_LP64_OFF64 = 0x008b, 1481 _SC_V7_LPBIG_OFFBIG = 0x008c, 1482 _SC_XOPEN_STREAMS = 0x008d, 1483 _SC_XOPEN_UUCP = 0x008e, 1484 1485 _SC_LEVEL1_ICACHE_SIZE = 0x008f, 1486 _SC_LEVEL1_ICACHE_ASSOC = 0x0090, 1487 _SC_LEVEL1_ICACHE_LINESIZE = 0x0091, 1488 _SC_LEVEL1_DCACHE_SIZE = 0x0092, 1489 _SC_LEVEL1_DCACHE_ASSOC = 0x0093, 1490 _SC_LEVEL1_DCACHE_LINESIZE = 0x0094, 1491 _SC_LEVEL2_CACHE_SIZE = 0x0095, 1492 _SC_LEVEL2_CACHE_ASSOC = 0x0096, 1493 _SC_LEVEL2_CACHE_LINESIZE = 0x0097, 1494 _SC_LEVEL3_CACHE_SIZE = 0x0098, 1495 _SC_LEVEL3_CACHE_ASSOC = 0x0099, 1496 _SC_LEVEL3_CACHE_LINESIZE = 0x009a, 1497 _SC_LEVEL4_CACHE_SIZE = 0x009b, 1498 _SC_LEVEL4_CACHE_ASSOC = 0x009c, 1499 _SC_LEVEL4_CACHE_LINESIZE = 0x009d, 1500 } 1501 } 1502 else version (Solaris) 1503 { 1504 enum F_OK = 0; 1505 enum R_OK = 4; 1506 enum W_OK = 2; 1507 enum X_OK = 1; 1508 1509 enum F_ULOCK = 0; 1510 enum F_LOCK = 1; 1511 enum F_TLOCK = 2; 1512 enum F_TEST = 3; 1513 1514 enum 1515 { 1516 // large file compilation environment configuration 1517 _CS_LFS_CFLAGS = 68, 1518 _CS_LFS_LDFLAGS = 69, 1519 _CS_LFS_LIBS = 70, 1520 _CS_LFS_LINTFLAGS = 71, 1521 // transitional large file interface configuration 1522 _CS_LFS64_CFLAGS = 72, 1523 _CS_LFS64_LDFLAGS = 73, 1524 _CS_LFS64_LIBS = 74, 1525 _CS_LFS64_LINTFLAGS = 75, 1526 1527 // UNIX 98 1528 _CS_XBS5_ILP32_OFF32_CFLAGS = 700, 1529 _CS_XBS5_ILP32_OFF32_LDFLAGS = 701, 1530 _CS_XBS5_ILP32_OFF32_LIBS = 702, 1531 _CS_XBS5_ILP32_OFF32_LINTFLAGS = 703, 1532 _CS_XBS5_ILP32_OFFBIG_CFLAGS = 705, 1533 _CS_XBS5_ILP32_OFFBIG_LDFLAGS = 706, 1534 _CS_XBS5_ILP32_OFFBIG_LIBS = 707, 1535 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 708, 1536 _CS_XBS5_LP64_OFF64_CFLAGS = 709, 1537 _CS_XBS5_LP64_OFF64_LDFLAGS = 710, 1538 _CS_XBS5_LP64_OFF64_LIBS = 711, 1539 _CS_XBS5_LP64_OFF64_LINTFLAGS = 712, 1540 _CS_XBS5_LPBIG_OFFBIG_CFLAGS = 713, 1541 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 714, 1542 _CS_XBS5_LPBIG_OFFBIG_LIBS = 715, 1543 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 716, 1544 1545 // UNIX 03 1546 _CS_POSIX_V6_ILP32_OFF32_CFLAGS = 800, 1547 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 801, 1548 _CS_POSIX_V6_ILP32_OFF32_LIBS = 802, 1549 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS = 803, 1550 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 804, 1551 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 805, 1552 _CS_POSIX_V6_ILP32_OFFBIG_LIBS = 806, 1553 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS = 807, 1554 _CS_POSIX_V6_LP64_OFF64_CFLAGS = 808, 1555 _CS_POSIX_V6_LP64_OFF64_LDFLAGS = 809, 1556 _CS_POSIX_V6_LP64_OFF64_LIBS = 810, 1557 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS = 811, 1558 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 812, 1559 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 813, 1560 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 814, 1561 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS = 815, 1562 _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 816 1563 } 1564 1565 enum { 1566 _SC_ARG_MAX = 1, 1567 _SC_CHILD_MAX = 2, 1568 _SC_CLK_TCK = 3, 1569 _SC_NGROUPS_MAX = 4, 1570 _SC_OPEN_MAX = 5, 1571 _SC_JOB_CONTROL = 6, 1572 _SC_SAVED_IDS = 7, 1573 _SC_VERSION = 8, 1574 1575 _SC_PASS_MAX = 9, 1576 _SC_LOGNAME_MAX = 10, 1577 _SC_PAGESIZE = 11, 1578 _SC_XOPEN_VERSION = 12, 1579 // 13 reserved for SVr4-ES/MP _SC_NACLS_MAX 1580 _SC_NPROCESSORS_CONF = 14, 1581 _SC_NPROCESSORS_ONLN = 15, 1582 _SC_STREAM_MAX = 16, 1583 _SC_TZNAME_MAX = 17, 1584 1585 _SC_AIO_LISTIO_MAX = 18, 1586 _SC_AIO_MAX = 19, 1587 _SC_AIO_PRIO_DELTA_MAX = 20, 1588 _SC_ASYNCHRONOUS_IO = 21, 1589 _SC_DELAYTIMER_MAX = 22, 1590 _SC_FSYNC = 23, 1591 _SC_MAPPED_FILES = 24, 1592 _SC_MEMLOCK = 25, 1593 _SC_MEMLOCK_RANGE = 26, 1594 _SC_MEMORY_PROTECTION = 27, 1595 _SC_MESSAGE_PASSING = 28, 1596 _SC_MQ_OPEN_MAX = 29, 1597 _SC_MQ_PRIO_MAX = 30, 1598 _SC_PRIORITIZED_IO = 31, 1599 _SC_PRIORITY_SCHEDULING = 32, 1600 _SC_REALTIME_SIGNALS = 33, 1601 _SC_RTSIG_MAX = 34, 1602 _SC_SEMAPHORES = 35, 1603 _SC_SEM_NSEMS_MAX = 36, 1604 _SC_SEM_VALUE_MAX = 37, 1605 _SC_SHARED_MEMORY_OBJECTS = 38, 1606 _SC_SIGQUEUE_MAX = 39, 1607 _SC_SIGRT_MIN = 40, 1608 _SC_SIGRT_MAX = 41, 1609 _SC_SYNCHRONIZED_IO = 42, 1610 _SC_TIMERS = 43, 1611 _SC_TIMER_MAX = 44, 1612 1613 _SC_2_C_BIND = 45, 1614 _SC_2_C_DEV = 46, 1615 _SC_2_C_VERSION = 47, 1616 _SC_2_FORT_DEV = 48, 1617 _SC_2_FORT_RUN = 49, 1618 _SC_2_LOCALEDEF = 50, 1619 _SC_2_SW_DEV = 51, 1620 _SC_2_UPE = 52, 1621 _SC_2_VERSION = 53, 1622 _SC_BC_BASE_MAX = 54, 1623 _SC_BC_DIM_MAX = 55, 1624 _SC_BC_SCALE_MAX = 56, 1625 _SC_BC_STRING_MAX = 57, 1626 _SC_COLL_WEIGHTS_MAX = 58, 1627 _SC_EXPR_NEST_MAX = 59, 1628 _SC_LINE_MAX = 60, 1629 _SC_RE_DUP_MAX = 61, 1630 _SC_XOPEN_CRYPT = 62, 1631 _SC_XOPEN_ENH_I18N = 63, 1632 _SC_XOPEN_SHM = 64, 1633 _SC_2_CHAR_TERM = 66, 1634 _SC_XOPEN_XCU_VERSION = 67, 1635 1636 _SC_ATEXIT_MAX = 76, 1637 _SC_IOV_MAX = 77, 1638 _SC_XOPEN_UNIX = 78, 1639 1640 _SC_T_IOV_MAX = 79, 1641 1642 _SC_PHYS_PAGES = 500, 1643 _SC_AVPHYS_PAGES = 501, 1644 1645 _SC_COHER_BLKSZ = 503, 1646 _SC_SPLIT_CACHE = 504, 1647 _SC_ICACHE_SZ = 505, 1648 _SC_DCACHE_SZ = 506, 1649 _SC_ICACHE_LINESZ = 507, 1650 _SC_DCACHE_LINESZ = 508, 1651 _SC_ICACHE_BLKSZ = 509, 1652 _SC_DCACHE_BLKSZ = 510, 1653 _SC_DCACHE_TBLKSZ = 511, 1654 _SC_ICACHE_ASSOC = 512, 1655 _SC_DCACHE_ASSOC = 513, 1656 1657 _SC_MAXPID = 514, 1658 _SC_STACK_PROT = 515, 1659 _SC_NPROCESSORS_MAX = 516, 1660 _SC_CPUID_MAX = 517, 1661 _SC_EPHID_MAX = 518, 1662 1663 _SC_THREAD_DESTRUCTOR_ITERATIONS = 568, 1664 _SC_GETGR_R_SIZE_MAX = 569, 1665 _SC_GETPW_R_SIZE_MAX = 570, 1666 _SC_LOGIN_NAME_MAX = 571, 1667 _SC_THREAD_KEYS_MAX = 572, 1668 _SC_THREAD_STACK_MIN = 573, 1669 _SC_THREAD_THREADS_MAX = 574, 1670 _SC_TTY_NAME_MAX = 575, 1671 _SC_THREADS = 576, 1672 _SC_THREAD_ATTR_STACKADDR = 577, 1673 _SC_THREAD_ATTR_STACKSIZE = 578, 1674 _SC_THREAD_PRIORITY_SCHEDULING = 579, 1675 _SC_THREAD_PRIO_INHERIT = 580, 1676 _SC_THREAD_PRIO_PROTECT = 581, 1677 _SC_THREAD_PROCESS_SHARED = 582, 1678 _SC_THREAD_SAFE_FUNCTIONS = 583, 1679 1680 _SC_XOPEN_LEGACY = 717, 1681 _SC_XOPEN_REALTIME = 718, 1682 _SC_XOPEN_REALTIME_THREADS = 719, 1683 _SC_XBS5_ILP32_OFF32 = 720, 1684 _SC_XBS5_ILP32_OFFBIG = 721, 1685 _SC_XBS5_LP64_OFF64 = 722, 1686 _SC_XBS5_LPBIG_OFFBIG = 723, 1687 1688 _SC_2_PBS = 724, 1689 _SC_2_PBS_ACCOUNTING = 725, 1690 _SC_2_PBS_CHECKPOINT = 726, 1691 _SC_2_PBS_LOCATE = 728, 1692 _SC_2_PBS_MESSAGE = 729, 1693 _SC_2_PBS_TRACK = 730, 1694 _SC_ADVISORY_INFO = 731, 1695 _SC_BARRIERS = 732, 1696 _SC_CLOCK_SELECTION = 733, 1697 _SC_CPUTIME = 734, 1698 _SC_HOST_NAME_MAX = 735, 1699 _SC_MONOTONIC_CLOCK = 736, 1700 _SC_READER_WRITER_LOCKS = 737, 1701 _SC_REGEXP = 738, 1702 _SC_SHELL = 739, 1703 _SC_SPAWN = 740, 1704 _SC_SPIN_LOCKS = 741, 1705 _SC_SPORADIC_SERVER = 742, 1706 _SC_SS_REPL_MAX = 743, 1707 _SC_SYMLOOP_MAX = 744, 1708 _SC_THREAD_CPUTIME = 745, 1709 _SC_THREAD_SPORADIC_SERVER = 746, 1710 _SC_TIMEOUTS = 747, 1711 _SC_TRACE = 748, 1712 _SC_TRACE_EVENT_FILTER = 749, 1713 _SC_TRACE_EVENT_NAME_MAX = 750, 1714 _SC_TRACE_INHERIT = 751, 1715 _SC_TRACE_LOG = 752, 1716 _SC_TRACE_NAME_MAX = 753, 1717 _SC_TRACE_SYS_MAX = 754, 1718 _SC_TRACE_USER_EVENT_MAX = 755, 1719 _SC_TYPED_MEMORY_OBJECTS = 756, 1720 _SC_V6_ILP32_OFF32 = 757, 1721 _SC_V6_ILP32_OFFBIG = 758, 1722 _SC_V6_LP64_OFF64 = 759, 1723 _SC_V6_LPBIG_OFFBIG = 760, 1724 _SC_XOPEN_STREAMS = 761, 1725 _SC_IPV6 = 762, 1726 _SC_RAW_SOCKETS = 763, 1727 } 1728 enum _SC_PAGE_SIZE = _SC_PAGESIZE; 1729 1730 enum { 1731 _PC_LINK_MAX = 1, 1732 _PC_MAX_CANON = 2, 1733 _PC_MAX_INPUT = 3, 1734 _PC_NAME_MAX = 4, 1735 _PC_PATH_MAX = 5, 1736 _PC_PIPE_BUF = 6, 1737 _PC_NO_TRUNC = 7, 1738 _PC_VDISABLE = 8, 1739 _PC_CHOWN_RESTRICTED = 9, 1740 1741 _PC_ASYNC_IO = 10, 1742 _PC_PRIO_IO = 11, 1743 _PC_SYNC_IO = 12, 1744 1745 _PC_ALLOC_SIZE_MIN = 13, 1746 _PC_REC_INCR_XFER_SIZE = 14, 1747 _PC_REC_MAX_XFER_SIZE = 15, 1748 _PC_REC_MIN_XFER_SIZE = 16, 1749 _PC_REC_XFER_ALIGN = 17, 1750 _PC_SYMLINK_MAX = 18, 1751 _PC_2_SYMLINKS = 19, 1752 _PC_ACL_ENABLED = 20, 1753 _PC_MIN_HOLE_SIZE = 21, 1754 _PC_CASE_BEHAVIOR = 22, 1755 _PC_SATTR_ENABLED = 23, 1756 _PC_SATTR_EXISTS = 24, 1757 _PC_ACCESS_FILTERING = 25, 1758 1759 _PC_TIMESTAMP_RESOLUTION = 26, 1760 1761 _PC_FILESIZEBITS = 67, 1762 1763 _PC_XATTR_ENABLED = 100, 1764 _PC_XATTR_EXISTS = 101 1765 } 1766 1767 enum _PC_LAST = 101; 1768 } 1769 else version (CRuntime_Musl) 1770 { 1771 enum F_OK = 0; 1772 enum R_OK = 4; 1773 enum W_OK = 2; 1774 enum X_OK = 1; 1775 1776 enum F_ULOCK = 0; 1777 enum F_LOCK = 1; 1778 enum F_TLOCK = 2; 1779 enum F_TEST = 3; 1780 1781 enum 1782 { 1783 _CS_PATH, 1784 _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS, 1785 _CS_GNU_LIBC_VERSION, 1786 _CS_GNU_LIBPTHREAD_VERSION, 1787 _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS, 1788 _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS, 1789 1790 _CS_POSIX_V6_ILP32_OFF32_CFLAGS = 1116, 1791 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, 1792 _CS_POSIX_V6_ILP32_OFF32_LIBS, 1793 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, 1794 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, 1795 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, 1796 _CS_POSIX_V6_ILP32_OFFBIG_LIBS, 1797 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, 1798 _CS_POSIX_V6_LP64_OFF64_CFLAGS, 1799 _CS_POSIX_V6_LP64_OFF64_LDFLAGS, 1800 _CS_POSIX_V6_LP64_OFF64_LIBS, 1801 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, 1802 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, 1803 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, 1804 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, 1805 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, 1806 _CS_POSIX_V7_ILP32_OFF32_CFLAGS, 1807 _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, 1808 _CS_POSIX_V7_ILP32_OFF32_LIBS, 1809 _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, 1810 _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, 1811 _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, 1812 _CS_POSIX_V7_ILP32_OFFBIG_LIBS, 1813 _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, 1814 _CS_POSIX_V7_LP64_OFF64_CFLAGS, 1815 _CS_POSIX_V7_LP64_OFF64_LDFLAGS, 1816 _CS_POSIX_V7_LP64_OFF64_LIBS, 1817 _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, 1818 _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, 1819 _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, 1820 _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, 1821 _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, 1822 _CS_V6_ENV, 1823 _CS_V7_ENV 1824 } 1825 1826 enum 1827 { 1828 _PC_LINK_MAX, 1829 _PC_MAX_CANON, 1830 _PC_MAX_INPUT, 1831 _PC_NAME_MAX, 1832 _PC_PATH_MAX, 1833 _PC_PIPE_BUF, 1834 _PC_CHOWN_RESTRICTED, 1835 _PC_NO_TRUNC, 1836 _PC_VDISABLE, 1837 _PC_SYNC_IO, 1838 _PC_ASYNC_IO, 1839 _PC_PRIO_IO, 1840 _PC_SOCK_MAXBUF, 1841 _PC_FILESIZEBITS, 1842 _PC_REC_INCR_XFER_SIZE, 1843 _PC_REC_MAX_XFER_SIZE, 1844 _PC_REC_MIN_XFER_SIZE, 1845 _PC_REC_XFER_ALIGN, 1846 _PC_ALLOC_SIZE_MIN, 1847 _PC_SYMLINK_MAX, 1848 _PC_2_SYMLINKS 1849 } 1850 1851 enum 1852 { 1853 _SC_ARG_MAX, 1854 _SC_CHILD_MAX, 1855 _SC_CLK_TCK, 1856 _SC_NGROUPS_MAX, 1857 _SC_OPEN_MAX, 1858 _SC_STREAM_MAX, 1859 _SC_TZNAME_MAX, 1860 _SC_JOB_CONTROL, 1861 _SC_SAVED_IDS, 1862 _SC_REALTIME_SIGNALS, 1863 _SC_PRIORITY_SCHEDULING, 1864 _SC_TIMERS, 1865 _SC_ASYNCHRONOUS_IO, 1866 _SC_PRIORITIZED_IO, 1867 _SC_SYNCHRONIZED_IO, 1868 _SC_FSYNC, 1869 _SC_MAPPED_FILES, 1870 _SC_MEMLOCK, 1871 _SC_MEMLOCK_RANGE, 1872 _SC_MEMORY_PROTECTION, 1873 _SC_MESSAGE_PASSING, 1874 _SC_SEMAPHORES, 1875 _SC_SHARED_MEMORY_OBJECTS, 1876 _SC_AIO_LISTIO_MAX, 1877 _SC_AIO_MAX, 1878 _SC_AIO_PRIO_DELTA_MAX, 1879 _SC_DELAYTIMER_MAX, 1880 _SC_MQ_OPEN_MAX, 1881 _SC_MQ_PRIO_MAX, 1882 _SC_VERSION, 1883 _SC_PAGE_SIZE, 1884 _SC_PAGESIZE = _SC_PAGE_SIZE, 1885 _SC_RTSIG_MAX, 1886 _SC_SEM_NSEMS_MAX, 1887 _SC_SEM_VALUE_MAX, 1888 _SC_SIGQUEUE_MAX, 1889 _SC_TIMER_MAX, 1890 _SC_BC_BASE_MAX, 1891 _SC_BC_DIM_MAX, 1892 _SC_BC_SCALE_MAX, 1893 _SC_BC_STRING_MAX, 1894 _SC_COLL_WEIGHTS_MAX, 1895 1896 _SC_EXPR_NEST_MAX = 42, 1897 _SC_LINE_MAX, 1898 _SC_RE_DUP_MAX, 1899 1900 _SC_2_VERSION = 46, 1901 _SC_2_C_BIND, 1902 _SC_2_C_DEV, 1903 _SC_2_FORT_DEV, 1904 _SC_2_FORT_RUN, 1905 _SC_2_SW_DEV, 1906 _SC_2_LOCALEDEF, 1907 1908 _SC_UIO_MAXIOV = 60, 1909 _SC_IOV_MAX = _SC_UIO_MAXIOV, 1910 1911 _SC_THREADS = 67, 1912 _SC_THREAD_SAFE_FUNCTIONS, 1913 _SC_GETGR_R_SIZE_MAX, 1914 _SC_GETPW_R_SIZE_MAX, 1915 _SC_LOGIN_NAME_MAX, 1916 _SC_TTY_NAME_MAX, 1917 _SC_THREAD_DESTRUCTOR_ITERATIONS, 1918 _SC_THREAD_KEYS_MAX, 1919 _SC_THREAD_STACK_MIN, 1920 _SC_THREAD_THREADS_MAX, 1921 _SC_THREAD_ATTR_STACKADDR, 1922 _SC_THREAD_ATTR_STACKSIZE, 1923 _SC_THREAD_PRIORITY_SCHEDULING, 1924 _SC_THREAD_PRIO_INHERIT, 1925 _SC_THREAD_PRIO_PROTECT, 1926 _SC_THREAD_PROCESS_SHARED, 1927 1928 _SC_NPROCESSORS_CONF, 1929 _SC_NPROCESSORS_ONLN, 1930 _SC_PHYS_PAGES, 1931 _SC_AVPHYS_PAGES, 1932 _SC_ATEXIT_MAX, 1933 _SC_PASS_MAX, 1934 1935 _SC_XOPEN_VERSION, 1936 _SC_XOPEN_XCU_VERSION, 1937 _SC_XOPEN_UNIX, 1938 _SC_XOPEN_CRYPT, 1939 _SC_XOPEN_ENH_I18N, 1940 _SC_XOPEN_SHM, 1941 1942 _SC_2_CHAR_TERM, 1943 _SC_2_UPE = 97, 1944 1945 _SC_XOPEN_XPG2, 1946 _SC_XOPEN_XPG3, 1947 _SC_XOPEN_XPG4, 1948 1949 _SC_NZERO = 109, 1950 1951 _SC_XBS5_ILP32_OFF32 = 125, 1952 _SC_XBS5_ILP32_OFFBIG, 1953 _SC_XBS5_LP64_OFF64, 1954 _SC_XBS5_LPBIG_OFFBIG, 1955 1956 _SC_XOPEN_LEGACY, 1957 _SC_XOPEN_REALTIME, 1958 _SC_XOPEN_REALTIME_THREADS, 1959 1960 _SC_ADVISORY_INFO, 1961 _SC_BARRIERS, 1962 _SC_CLOCK_SELECTION = 137, 1963 _SC_CPUTIME, 1964 _SC_THREAD_CPUTIME, 1965 _SC_MONOTONIC_CLOCK = 149, 1966 _SC_READER_WRITER_LOCKS = 153, 1967 _SC_SPIN_LOCKS, 1968 _SC_REGEXP, 1969 _SC_SHELL = 157, 1970 _SC_SPAWN = 159, 1971 _SC_SPORADIC_SERVER, 1972 _SC_THREAD_SPORADIC_SERVER, 1973 _SC_TIMEOUTS = 164, 1974 _SC_TYPED_MEMORY_OBJECTS, 1975 _SC_2_PBS = 168, 1976 _SC_2_PBS_ACCOUNTING, 1977 _SC_2_PBS_LOCATE, 1978 _SC_2_PBS_MESSAGE, 1979 _SC_2_PBS_TRACK, 1980 _SC_SYMLOOP_MAX, 1981 _SC_STREAMS, 1982 _SC_2_PBS_CHECKPOINT, 1983 1984 _SC_V6_ILP32_OFF32, 1985 _SC_V6_ILP32_OFFBIG, 1986 _SC_V6_LP64_OFF64, 1987 _SC_V6_LPBIG_OFFBIG, 1988 1989 _SC_HOST_NAME_MAX, 1990 _SC_TRACE, 1991 _SC_TRACE_EVENT_FILTER, 1992 _SC_TRACE_INHERIT, 1993 _SC_TRACE_LOG, 1994 1995 _SC_IPV6 = 235, 1996 _SC_RAW_SOCKETS, 1997 _SC_V7_ILP32_OFF32, 1998 _SC_V7_ILP32_OFFBIG, 1999 _SC_V7_LP64_OFF64, 2000 _SC_V7_LPBIG_OFFBIG, 2001 _SC_SS_REPL_MAX, 2002 _SC_TRACE_EVENT_NAME_MAX, 2003 _SC_TRACE_NAME_MAX, 2004 _SC_TRACE_SYS_MAX, 2005 _SC_TRACE_USER_EVENT_MAX, 2006 _SC_XOPEN_STREAMS, 2007 _SC_THREAD_ROBUST_PRIO_INHERIT, 2008 _SC_THREAD_ROBUST_PRIO_PROTECT 2009 } 2010 } 2011 else version (CRuntime_UClibc) 2012 { 2013 enum F_OK = 0; 2014 enum R_OK = 4; 2015 enum W_OK = 2; 2016 enum X_OK = 1; 2017 2018 enum F_ULOCK = 0; 2019 enum F_LOCK = 1; 2020 enum F_TLOCK = 2; 2021 enum F_TEST = 3; 2022 2023 enum 2024 { 2025 _CS_PATH, 2026 2027 _CS_V6_WIDTH_RESTRICTED_ENVS, 2028 2029 _CS_GNU_LIBC_VERSION, 2030 _CS_GNU_LIBPTHREAD_VERSION, 2031 2032 _CS_LFS_CFLAGS = 1000, 2033 _CS_LFS_LDFLAGS, 2034 _CS_LFS_LIBS, 2035 _CS_LFS_LINTFLAGS, 2036 _CS_LFS64_CFLAGS, 2037 _CS_LFS64_LDFLAGS, 2038 _CS_LFS64_LIBS, 2039 _CS_LFS64_LINTFLAGS, 2040 2041 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, 2042 _CS_XBS5_ILP32_OFF32_LDFLAGS, 2043 _CS_XBS5_ILP32_OFF32_LIBS, 2044 _CS_XBS5_ILP32_OFF32_LINTFLAGS, 2045 _CS_XBS5_ILP32_OFFBIG_CFLAGS, 2046 _CS_XBS5_ILP32_OFFBIG_LDFLAGS, 2047 _CS_XBS5_ILP32_OFFBIG_LIBS, 2048 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, 2049 _CS_XBS5_LP64_OFF64_CFLAGS, 2050 _CS_XBS5_LP64_OFF64_LDFLAGS, 2051 _CS_XBS5_LP64_OFF64_LIBS, 2052 _CS_XBS5_LP64_OFF64_LINTFLAGS, 2053 _CS_XBS5_LPBIG_OFFBIG_CFLAGS, 2054 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, 2055 _CS_XBS5_LPBIG_OFFBIG_LIBS, 2056 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, 2057 2058 _CS_POSIX_V6_ILP32_OFF32_CFLAGS, 2059 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, 2060 _CS_POSIX_V6_ILP32_OFF32_LIBS, 2061 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, 2062 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, 2063 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, 2064 _CS_POSIX_V6_ILP32_OFFBIG_LIBS, 2065 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, 2066 _CS_POSIX_V6_LP64_OFF64_CFLAGS, 2067 _CS_POSIX_V6_LP64_OFF64_LDFLAGS, 2068 _CS_POSIX_V6_LP64_OFF64_LIBS, 2069 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, 2070 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, 2071 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, 2072 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, 2073 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS 2074 } 2075 2076 enum 2077 { 2078 _PC_LINK_MAX, 2079 _PC_MAX_CANON, 2080 _PC_MAX_INPUT, 2081 _PC_NAME_MAX, 2082 _PC_PATH_MAX, 2083 _PC_PIPE_BUF, 2084 _PC_CHOWN_RESTRICTED, 2085 _PC_NO_TRUNC, 2086 _PC_VDISABLE, 2087 _PC_SYNC_IO, 2088 _PC_ASYNC_IO, 2089 _PC_PRIO_IO, 2090 _PC_SOCK_MAXBUF, 2091 _PC_FILESIZEBITS, 2092 _PC_REC_INCR_XFER_SIZE, 2093 _PC_REC_MAX_XFER_SIZE, 2094 _PC_REC_MIN_XFER_SIZE, 2095 _PC_REC_XFER_ALIGN, 2096 _PC_ALLOC_SIZE_MIN, 2097 _PC_SYMLINK_MAX, 2098 _PC_2_SYMLINKS 2099 } 2100 2101 enum 2102 { 2103 _SC_ARG_MAX, 2104 _SC_CHILD_MAX, 2105 _SC_CLK_TCK, 2106 _SC_NGROUPS_MAX, 2107 _SC_OPEN_MAX, 2108 _SC_STREAM_MAX, 2109 _SC_TZNAME_MAX, 2110 _SC_JOB_CONTROL, 2111 _SC_SAVED_IDS, 2112 _SC_REALTIME_SIGNALS, 2113 _SC_PRIORITY_SCHEDULING, 2114 _SC_TIMERS, 2115 _SC_ASYNCHRONOUS_IO, 2116 _SC_PRIORITIZED_IO, 2117 _SC_SYNCHRONIZED_IO, 2118 _SC_FSYNC, 2119 _SC_MAPPED_FILES, 2120 _SC_MEMLOCK, 2121 _SC_MEMLOCK_RANGE, 2122 _SC_MEMORY_PROTECTION, 2123 _SC_MESSAGE_PASSING, 2124 _SC_SEMAPHORES, 2125 _SC_SHARED_MEMORY_OBJECTS, 2126 _SC_AIO_LISTIO_MAX, 2127 _SC_AIO_MAX, 2128 _SC_AIO_PRIO_DELTA_MAX, 2129 _SC_DELAYTIMER_MAX, 2130 _SC_MQ_OPEN_MAX, 2131 _SC_MQ_PRIO_MAX, 2132 _SC_VERSION, 2133 _SC_PAGESIZE, 2134 _SC_PAGE_SIZE = _SC_PAGESIZE, 2135 _SC_RTSIG_MAX, 2136 _SC_SEM_NSEMS_MAX, 2137 _SC_SEM_VALUE_MAX, 2138 _SC_SIGQUEUE_MAX, 2139 _SC_TIMER_MAX, 2140 2141 _SC_BC_BASE_MAX, 2142 _SC_BC_DIM_MAX, 2143 _SC_BC_SCALE_MAX, 2144 _SC_BC_STRING_MAX, 2145 _SC_COLL_WEIGHTS_MAX, 2146 _SC_EQUIV_CLASS_MAX, 2147 _SC_EXPR_NEST_MAX, 2148 _SC_LINE_MAX, 2149 _SC_RE_DUP_MAX, 2150 _SC_CHARCLASS_NAME_MAX, 2151 2152 _SC_2_VERSION, 2153 _SC_2_C_BIND, 2154 _SC_2_C_DEV, 2155 _SC_2_FORT_DEV, 2156 _SC_2_FORT_RUN, 2157 _SC_2_SW_DEV, 2158 _SC_2_LOCALEDEF, 2159 2160 _SC_PII, 2161 _SC_PII_XTI, 2162 _SC_PII_SOCKET, 2163 _SC_PII_INTERNET, 2164 _SC_PII_OSI, 2165 _SC_POLL, 2166 _SC_SELECT, 2167 _SC_UIO_MAXIOV, 2168 _SC_IOV_MAX = _SC_UIO_MAXIOV, 2169 _SC_PII_INTERNET_STREAM, 2170 _SC_PII_INTERNET_DGRAM, 2171 _SC_PII_OSI_COTS, 2172 _SC_PII_OSI_CLTS, 2173 _SC_PII_OSI_M, 2174 _SC_T_IOV_MAX, 2175 2176 _SC_THREADS, 2177 _SC_THREAD_SAFE_FUNCTIONS, 2178 _SC_GETGR_R_SIZE_MAX, 2179 _SC_GETPW_R_SIZE_MAX, 2180 _SC_LOGIN_NAME_MAX, 2181 _SC_TTY_NAME_MAX, 2182 _SC_THREAD_DESTRUCTOR_ITERATIONS, 2183 _SC_THREAD_KEYS_MAX, 2184 _SC_THREAD_STACK_MIN, 2185 _SC_THREAD_THREADS_MAX, 2186 _SC_THREAD_ATTR_STACKADDR, 2187 _SC_THREAD_ATTR_STACKSIZE, 2188 _SC_THREAD_PRIORITY_SCHEDULING, 2189 _SC_THREAD_PRIO_INHERIT, 2190 _SC_THREAD_PRIO_PROTECT, 2191 _SC_THREAD_PROCESS_SHARED, 2192 2193 _SC_NPROCESSORS_CONF, 2194 _SC_NPROCESSORS_ONLN, 2195 _SC_PHYS_PAGES, 2196 _SC_AVPHYS_PAGES, 2197 _SC_ATEXIT_MAX, 2198 _SC_PASS_MAX, 2199 2200 _SC_XOPEN_VERSION, 2201 _SC_XOPEN_XCU_VERSION, 2202 _SC_XOPEN_UNIX, 2203 _SC_XOPEN_CRYPT, 2204 _SC_XOPEN_ENH_I18N, 2205 _SC_XOPEN_SHM, 2206 2207 _SC_2_CHAR_TERM, 2208 _SC_2_C_VERSION, 2209 _SC_2_UPE, 2210 2211 _SC_XOPEN_XPG2, 2212 _SC_XOPEN_XPG3, 2213 _SC_XOPEN_XPG4, 2214 2215 _SC_CHAR_BIT, 2216 _SC_CHAR_MAX, 2217 _SC_CHAR_MIN, 2218 _SC_INT_MAX, 2219 _SC_INT_MIN, 2220 _SC_LONG_BIT, 2221 _SC_WORD_BIT, 2222 _SC_MB_LEN_MAX, 2223 _SC_NZERO, 2224 _SC_SSIZE_MAX, 2225 _SC_SCHAR_MAX, 2226 _SC_SCHAR_MIN, 2227 _SC_SHRT_MAX, 2228 _SC_SHRT_MIN, 2229 _SC_UCHAR_MAX, 2230 _SC_UINT_MAX, 2231 _SC_ULONG_MAX, 2232 _SC_USHRT_MAX, 2233 2234 _SC_NL_ARGMAX, 2235 _SC_NL_LANGMAX, 2236 _SC_NL_MSGMAX, 2237 _SC_NL_NMAX, 2238 _SC_NL_SETMAX, 2239 _SC_NL_TEXTMAX, 2240 2241 _SC_XBS5_ILP32_OFF32, 2242 _SC_XBS5_ILP32_OFFBIG, 2243 _SC_XBS5_LP64_OFF64, 2244 _SC_XBS5_LPBIG_OFFBIG, 2245 2246 _SC_XOPEN_LEGACY, 2247 _SC_XOPEN_REALTIME, 2248 _SC_XOPEN_REALTIME_THREADS, 2249 2250 _SC_ADVISORY_INFO, 2251 _SC_BARRIERS, 2252 _SC_BASE, 2253 _SC_C_LANG_SUPPORT, 2254 _SC_C_LANG_SUPPORT_R, 2255 _SC_CLOCK_SELECTION, 2256 _SC_CPUTIME, 2257 _SC_THREAD_CPUTIME, 2258 _SC_DEVICE_IO, 2259 _SC_DEVICE_SPECIFIC, 2260 _SC_DEVICE_SPECIFIC_R, 2261 _SC_FD_MGMT, 2262 _SC_FIFO, 2263 _SC_PIPE, 2264 _SC_FILE_ATTRIBUTES, 2265 _SC_FILE_LOCKING, 2266 _SC_FILE_SYSTEM, 2267 _SC_MONOTONIC_CLOCK, 2268 _SC_MULTI_PROCESS, 2269 _SC_SINGLE_PROCESS, 2270 _SC_NETWORKING, 2271 _SC_READER_WRITER_LOCKS, 2272 _SC_SPIN_LOCKS, 2273 _SC_REGEXP, 2274 _SC_REGEX_VERSION, 2275 _SC_SHELL, 2276 _SC_SIGNALS, 2277 _SC_SPAWN, 2278 _SC_SPORADIC_SERVER, 2279 _SC_THREAD_SPORADIC_SERVER, 2280 _SC_SYSTEM_DATABASE, 2281 _SC_SYSTEM_DATABASE_R, 2282 _SC_TIMEOUTS, 2283 _SC_TYPED_MEMORY_OBJECTS, 2284 _SC_USER_GROUPS, 2285 _SC_USER_GROUPS_R, 2286 _SC_2_PBS, 2287 _SC_2_PBS_ACCOUNTING, 2288 _SC_2_PBS_LOCATE, 2289 _SC_2_PBS_MESSAGE, 2290 _SC_2_PBS_TRACK, 2291 _SC_SYMLOOP_MAX, 2292 _SC_STREAMS, 2293 _SC_2_PBS_CHECKPOINT, 2294 2295 _SC_V6_ILP32_OFF32, 2296 _SC_V6_ILP32_OFFBIG, 2297 _SC_V6_LP64_OFF64, 2298 _SC_V6_LPBIG_OFFBIG, 2299 2300 _SC_HOST_NAME_MAX, 2301 _SC_TRACE, 2302 _SC_TRACE_EVENT_FILTER, 2303 _SC_TRACE_INHERIT, 2304 _SC_TRACE_LOG, 2305 2306 _SC_LEVEL1_ICACHE_SIZE, 2307 _SC_LEVEL1_ICACHE_ASSOC, 2308 _SC_LEVEL1_ICACHE_LINESIZE, 2309 _SC_LEVEL1_DCACHE_SIZE, 2310 _SC_LEVEL1_DCACHE_ASSOC, 2311 _SC_LEVEL1_DCACHE_LINESIZE, 2312 _SC_LEVEL2_CACHE_SIZE, 2313 _SC_LEVEL2_CACHE_ASSOC, 2314 _SC_LEVEL2_CACHE_LINESIZE, 2315 _SC_LEVEL3_CACHE_SIZE, 2316 _SC_LEVEL3_CACHE_ASSOC, 2317 _SC_LEVEL3_CACHE_LINESIZE, 2318 _SC_LEVEL4_CACHE_SIZE, 2319 _SC_LEVEL4_CACHE_ASSOC, 2320 _SC_LEVEL4_CACHE_LINESIZE, 2321 2322 _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, 2323 _SC_RAW_SOCKETS 2324 } 2325 } 2326 2327 // 2328 // File Synchronization (FSC) 2329 // 2330 /* 2331 int fsync(int); 2332 */ 2333 2334 version (CRuntime_Glibc) 2335 { 2336 int fsync(int) @trusted; 2337 } 2338 else version (Darwin) 2339 { 2340 int fsync(int) @trusted; 2341 } 2342 else version (FreeBSD) 2343 { 2344 int fsync(int) @trusted; 2345 } 2346 else version (NetBSD) 2347 { 2348 int fsync(int) @trusted; 2349 } 2350 else version (OpenBSD) 2351 { 2352 int fsync(int) @trusted; 2353 } 2354 else version (DragonFlyBSD) 2355 { 2356 int fsync(int) @trusted; 2357 } 2358 else version (CRuntime_Bionic) 2359 { 2360 int fsync(int) @trusted; 2361 } 2362 else version (CRuntime_Musl) 2363 { 2364 int fsync(int) @trusted; 2365 } 2366 else version (Solaris) 2367 { 2368 int fsync(int) @trusted; 2369 } 2370 else version (CRuntime_UClibc) 2371 { 2372 int fsync(int) @trusted; 2373 } 2374 2375 // 2376 // Synchronized I/O (SIO) 2377 // 2378 /* 2379 int fdatasync(int); 2380 */ 2381 2382 version (CRuntime_Glibc) 2383 { 2384 int fdatasync(int) @trusted; 2385 } 2386 else version (Solaris) 2387 { 2388 int fdatasync(int) @trusted; 2389 } 2390 else version (CRuntime_Bionic) 2391 { 2392 int fdatasync(int) @trusted; 2393 } 2394 else version (CRuntime_UClibc) 2395 { 2396 int fdatasync(int) @trusted; 2397 } 2398 2399 // 2400 // XOpen (XSI) 2401 // 2402 /* 2403 char* crypt(const scope char*, const scope char*); 2404 char* ctermid(char*); 2405 void encrypt(ref char[64], int); 2406 int fchdir(int); 2407 c_long gethostid(); 2408 pid_t getpgid(pid_t); 2409 pid_t getsid(pid_t); 2410 char* getwd(char*); // LEGACY 2411 int lchown(const scope char*, uid_t, gid_t); 2412 int lockf(int, int, off_t); 2413 int nice(int); 2414 ssize_t pread(int, void*, size_t, off_t); 2415 ssize_t pwrite(int, const scope void*, size_t, off_t); 2416 pid_t setpgrp(); 2417 int setregid(gid_t, gid_t); 2418 int setreuid(uid_t, uid_t); 2419 void swab(const scope void*, void*, ssize_t); 2420 void sync(); 2421 int truncate(const scope char*, off_t); 2422 useconds_t ualarm(useconds_t, useconds_t); 2423 int usleep(useconds_t); 2424 pid_t vfork(); 2425 */ 2426 2427 version (CRuntime_Glibc) 2428 { 2429 char* crypt(const scope char*, const scope char*); 2430 char* ctermid(char*); 2431 void encrypt(ref char[64], int) @trusted; 2432 int fchdir(int) @trusted; 2433 c_long gethostid() @trusted; 2434 pid_t getpgid(pid_t) @trusted; 2435 pid_t getsid(pid_t) @trusted; 2436 char* getwd(char*); // LEGACY 2437 int lchown(const scope char*, uid_t, gid_t); 2438 //int lockf(int, int, off_t); 2439 int nice(int) @trusted; 2440 //ssize_t pread(int, void*, size_t, off_t); 2441 //ssize_t pwrite(int, const scope void*, size_t, off_t); 2442 pid_t setpgrp() @trusted; 2443 int setregid(gid_t, gid_t) @trusted; 2444 int setreuid(uid_t, uid_t) @trusted; 2445 void swab(const scope void*, void*, ssize_t); 2446 void sync() @trusted; 2447 //int truncate(const scope char*, off_t); 2448 useconds_t ualarm(useconds_t, useconds_t) @trusted; 2449 int usleep(useconds_t) @trusted; 2450 pid_t vfork(); 2451 2452 static if ( __USE_FILE_OFFSET64 ) 2453 { 2454 int lockf64(int, int, off_t) @trusted; 2455 alias lockf64 lockf; 2456 2457 ssize_t pread64(int, void*, size_t, off_t); 2458 alias pread64 pread; 2459 2460 ssize_t pwrite64(int, const scope void*, size_t, off_t); 2461 alias pwrite64 pwrite; 2462 2463 int truncate64(const scope char*, off_t); 2464 alias truncate64 truncate; 2465 } 2466 else 2467 { 2468 int lockf(int, int, off_t) @trusted; 2469 ssize_t pread(int, void*, size_t, off_t); 2470 ssize_t pwrite(int, const scope void*, size_t, off_t); 2471 int truncate(const scope char*, off_t); 2472 } 2473 } 2474 else version (CRuntime_Musl) 2475 { 2476 int fchdir(int) @trusted; 2477 int lockf(int, int, off_t); 2478 alias lockf lockf64; 2479 } 2480 else version (Darwin) 2481 { 2482 char* crypt(const scope char*, const scope char*); 2483 char* ctermid(char*); 2484 void encrypt(ref char[64], int) @trusted; 2485 int fchdir(int) @trusted; 2486 c_long gethostid() @trusted; 2487 pid_t getpgid(pid_t) @trusted; 2488 pid_t getsid(pid_t) @trusted; 2489 char* getwd(char*); // LEGACY 2490 int lchown(const scope char*, uid_t, gid_t); 2491 int lockf(int, int, off_t) @trusted; 2492 int nice(int) @trusted; 2493 ssize_t pread(int, void*, size_t, off_t); 2494 ssize_t pwrite(int, const scope void*, size_t, off_t); 2495 pid_t setpgrp() @trusted; 2496 int setregid(gid_t, gid_t) @trusted; 2497 int setreuid(uid_t, uid_t) @trusted; 2498 void swab(const scope void*, void*, ssize_t); 2499 void sync() @trusted; 2500 int truncate(const scope char*, off_t); 2501 useconds_t ualarm(useconds_t, useconds_t) @trusted; 2502 int usleep(useconds_t) @trusted; 2503 pid_t vfork(); 2504 } 2505 else version (FreeBSD) 2506 { 2507 char* crypt(const scope char*, const scope char*); 2508 //char* ctermid(char*); 2509 void encrypt(ref char[64], int) @trusted; 2510 int fchdir(int) @trusted; 2511 c_long gethostid() @trusted; 2512 int getpgid(pid_t) @trusted; 2513 int getsid(pid_t) @trusted; 2514 char* getwd(char*); // LEGACY 2515 int lchown(const scope char*, uid_t, gid_t); 2516 int lockf(int, int, off_t) @trusted; 2517 int nice(int) @trusted; 2518 ssize_t pread(int, void*, size_t, off_t); 2519 ssize_t pwrite(int, const scope void*, size_t, off_t); 2520 int setpgrp(pid_t, pid_t) @trusted; 2521 int setregid(gid_t, gid_t) @trusted; 2522 int setreuid(uid_t, uid_t) @trusted; 2523 void swab(const scope void*, void*, ssize_t); 2524 void sync() @trusted; 2525 int truncate(const scope char*, off_t); 2526 useconds_t ualarm(useconds_t, useconds_t) @trusted; 2527 int usleep(useconds_t) @trusted; 2528 pid_t vfork(); 2529 } 2530 else version (NetBSD) 2531 { 2532 char* crypt(const scope char*, const scope char*); 2533 //char* ctermid(char*); 2534 void encrypt(ref char[64], int) @trusted; 2535 int fchdir(int) @trusted; 2536 c_long gethostid() @trusted; 2537 int getpgid(pid_t) @trusted; 2538 int getsid(pid_t) @trusted; 2539 char* getwd(char*); // LEGACY 2540 int lchown(const scope char*, uid_t, gid_t); 2541 int lockf(int, int, off_t) @trusted; 2542 int nice(int) @trusted; 2543 ssize_t pread(int, void*, size_t, off_t); 2544 ssize_t pwrite(int, const scope void*, size_t, off_t); 2545 int setpgrp(pid_t, pid_t) @trusted; 2546 int setregid(gid_t, gid_t) @trusted; 2547 int setreuid(uid_t, uid_t) @trusted; 2548 void swab(const scope void*, void*, ssize_t); 2549 void sync() @trusted; 2550 int truncate(const scope char*, off_t); 2551 useconds_t ualarm(useconds_t, useconds_t) @trusted; 2552 int usleep(useconds_t) @trusted; 2553 pid_t vfork(); 2554 } 2555 else version (OpenBSD) 2556 { 2557 char* crypt(const scope char*, const scope char*); 2558 //char* ctermid(char*); 2559 //void encrypt(ref char[64], int) @trusted; 2560 int fchdir(int) @trusted; 2561 c_long gethostid() @trusted; 2562 pid_t getpgid(pid_t) @trusted; 2563 pid_t getsid(pid_t) @trusted; 2564 char* getwd(char*); 2565 int lchown(const scope char*, uid_t, gid_t); 2566 int lockf(int, int, off_t) @trusted; 2567 int nice(int) @trusted; 2568 ssize_t pread(int, void*, size_t, off_t); 2569 ssize_t pwrite(int, const scope void*, size_t, off_t); 2570 int setpgrp(pid_t, pid_t) @trusted; 2571 int setregid(gid_t, gid_t) @trusted; 2572 int setreuid(uid_t, uid_t) @trusted; 2573 void swab(const scope void*, void*, ssize_t); 2574 void sync() @trusted; 2575 int truncate(const scope char*, off_t); 2576 useconds_t ualarm(useconds_t, useconds_t) @trusted; 2577 int usleep(useconds_t) @trusted; 2578 pid_t vfork(); 2579 } 2580 else version (DragonFlyBSD) 2581 { 2582 char* crypt(const scope char*, const scope char*); 2583 //char* ctermid(char*); 2584 void encrypt(ref char[64], int) @trusted; 2585 int fchdir(int) @trusted; 2586 c_long gethostid() @trusted; 2587 int getpgid(pid_t) @trusted; 2588 int getsid(pid_t) @trusted; 2589 char* getwd(char*); // LEGACY 2590 int lchown(const scope char*, uid_t, gid_t); 2591 int lockf(int, int, off_t) @trusted; 2592 int nice(int) @trusted; 2593 ssize_t pread(int, void*, size_t, off_t); 2594 ssize_t pwrite(int, const scope void*, size_t, off_t); 2595 int setpgrp(pid_t, pid_t) @trusted; 2596 int setregid(gid_t, gid_t) @trusted; 2597 int setreuid(uid_t, uid_t) @trusted; 2598 void swab(const scope void*, void*, ssize_t); 2599 void sync() @trusted; 2600 int truncate(const scope char*, off_t); 2601 useconds_t ualarm(useconds_t, useconds_t) @trusted; 2602 int usleep(useconds_t) @trusted; 2603 pid_t vfork(); 2604 } 2605 else version (CRuntime_Bionic) 2606 { 2607 int fchdir(int) @trusted; 2608 pid_t getpgid(pid_t) @trusted; 2609 int lchown(const scope char*, uid_t, gid_t); 2610 int nice(int) @trusted; 2611 ssize_t pread(int, void*, size_t, off_t); 2612 ssize_t pwrite(int, const scope void*, size_t, off_t); 2613 int setpgrp() @trusted; 2614 int setregid(gid_t, gid_t) @trusted; 2615 int setreuid(uid_t, uid_t) @trusted; 2616 int sync() @trusted; 2617 int truncate(const scope char*, off_t); 2618 int usleep(c_ulong) @trusted; 2619 pid_t vfork(); 2620 } 2621 else version (Solaris) 2622 { 2623 char* crypt(const scope char*, const scope char*); 2624 char* ctermid(char*); 2625 void encrypt(ref char[64], int); 2626 int fchdir(int); 2627 c_long gethostid(); 2628 pid_t getpgid(pid_t); 2629 pid_t getsid(pid_t); 2630 char* getwd(char*); // LEGACY 2631 int lchown(const scope char*, uid_t, gid_t); 2632 int nice(int); 2633 pid_t setpgrp(); 2634 int setregid(gid_t, gid_t); 2635 int setreuid(uid_t, uid_t); 2636 void swab(const scope void*, void*, ssize_t); 2637 void sync(); 2638 useconds_t ualarm(useconds_t, useconds_t); 2639 int usleep(useconds_t); 2640 pid_t vfork(); 2641 2642 version (D_LP64) 2643 { 2644 int lockf(int, int, off_t); 2645 alias lockf lockf64; 2646 2647 ssize_t pread(int, void*, size_t, off_t); 2648 alias pread pread64; 2649 2650 ssize_t pwrite(int, const scope void*, size_t, off_t); 2651 alias pwrite pwrite64; 2652 2653 int truncate(const scope char*, off_t); 2654 alias truncate truncate64; 2655 } 2656 else 2657 { 2658 static if ( __USE_FILE_OFFSET64 ) 2659 { 2660 int lockf64(int, int, off64_t); 2661 alias lockf64 lockf; 2662 2663 ssize_t pread64(int, void*, size_t, off64_t); 2664 alias pread64 pread; 2665 2666 ssize_t pwrite64(int, const scope void*, size_t, off_t); 2667 alias pwrite64 pwrite; 2668 2669 int truncate64(const scope char*, off_t); 2670 alias truncate64 truncate; 2671 } 2672 else 2673 { 2674 int lockf(int, int, off_t); 2675 ssize_t pread(int, void*, size_t, off_t); 2676 ssize_t pwrite(int, const scope void*, size_t, off_t); 2677 int truncate(const scope char*, off_t); 2678 } 2679 } 2680 } 2681 else version (CRuntime_UClibc) 2682 { 2683 char* crypt(const scope char*, const scope char*); 2684 char* ctermid(char*); 2685 void encrypt(ref char[64], int) @trusted; 2686 int fchdir(int) @trusted; 2687 c_long gethostid() @trusted; 2688 pid_t getpgid(pid_t) @trusted; 2689 pid_t getsid(pid_t) @trusted; 2690 char* getwd(char*); // LEGACY 2691 int lchown(const scope char*, uid_t, gid_t); 2692 int nice(int) @trusted; 2693 pid_t setpgrp() @trusted; 2694 int setregid(gid_t, gid_t) @trusted; 2695 int setreuid(uid_t, uid_t) @trusted; 2696 void swab(const scope void*, void*, ssize_t); 2697 void sync() @trusted; 2698 useconds_t ualarm(useconds_t, useconds_t) @trusted; 2699 int usleep(useconds_t) @trusted; 2700 pid_t vfork(); 2701 2702 static if ( __USE_FILE_OFFSET64 ) 2703 { 2704 int lockf64(int, int, off_t) @trusted; 2705 alias lockf64 lockf; 2706 2707 ssize_t pread64(int, void*, size_t, off_t); 2708 alias pread64 pread; 2709 2710 ssize_t pwrite64(int, const scope void*, size_t, off_t); 2711 alias pwrite64 pwrite; 2712 2713 int truncate64(const scope char*, off_t); 2714 alias truncate64 truncate; 2715 } 2716 else 2717 { 2718 int lockf(int, int, off_t) @trusted; 2719 ssize_t pread(int, void*, size_t, off_t); 2720 ssize_t pwrite(int, const scope void*, size_t, off_t); 2721 int truncate(const scope char*, off_t); 2722 } 2723 } 2724 2725 // Non-standard definition to access user process environment 2726 version (CRuntime_Glibc) 2727 { 2728 extern __gshared const char** environ; 2729 } 2730 else version (Darwin) 2731 { 2732 extern (D) @property const(char**) environ()() 2733 { 2734 pragma (inline, true); 2735 import core.sys.darwin.crt_externs : _NSGetEnviron; 2736 return *_NSGetEnviron(); 2737 } 2738 } 2739 else version (FreeBSD) 2740 { 2741 extern __gshared const char** environ; 2742 } 2743 else version (NetBSD) 2744 { 2745 extern __gshared const char** environ; 2746 } 2747 else version (OpenBSD) 2748 { 2749 extern __gshared const char** environ; 2750 } 2751 else version (DragonFlyBSD) 2752 { 2753 extern __gshared const char** environ; 2754 } 2755 else version (CRuntime_Bionic) 2756 { 2757 extern __gshared const char** environ; 2758 } 2759 else version (CRuntime_Musl) 2760 { 2761 extern __gshared const char** environ; 2762 } 2763 else version (Solaris) 2764 { 2765 extern __gshared const char** environ; 2766 } 2767 else version (CRuntime_UClibc) 2768 { 2769 extern __gshared const char** __environ; 2770 alias environ = __environ; 2771 }