unistd.h(0P)

okay bestie, welcome to the POSIX Programmer's Manual page for unistd.h(0P). ๐Ÿ’– This is the header that's giving standard symbolic constants and types realness.

๐ŸŒˆ PROLOG ๐ŸŒˆ

This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details on Linux behavior), or the interface may not be implemented on Linux.

no cap, if you're on Linux, go peek at the Linux manual page too. ๐Ÿง

โœจ NAME โœจ

unistd.h โ€” standard symbolic constants and types

๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

#include <unistd.h>

๐Ÿ’… DESCRIPTION ๐Ÿ’…

The <unistd.h> header defines miscellaneous symbolic constants and types, and declares miscellaneous functions. The actual values of the constants are unspecified except as shown. The contents of this header are shown below.

๐ŸŽ€ Version Test Macros ๐ŸŽ€

The <unistd.h> header shall define the following symbolic constants. The values shall be suitable for use in #if preprocessing directives.

  • _POSIX_VERSION โ€” Integer value indicating version of this standard (C-language binding) to which the implementation conforms. For implementations conforming to POSIX.1โ€2008, the value shall be 200809L.
  • _POSIX2_VERSION โ€” Integer value indicating version of the Shell and Utilities volume of POSIX.1 to which the implementation conforms. For implementations conforming to POSIX.1โ€2008, the value shall be 200809L. For profile implementations that define _POSIX_SUBPROFILE (see Section 2.1.5.1, Subprofiling Considerations) in <unistd.h>, _POSIX2_VERSION may be left undefined or be defined with the value -1 to indicate that the Shell and Utilities volume of POSIX.1 is not supported. In this case, a call to sysconf(_SC_2_VERSION) shall return either 200809L or -1 indicating that the Shell and Utilities volume of POSIX.1 is or is not, respectively, supported at runtime.

The <unistd.h> header shall define the following symbolic constant only if the implementation supports the XSI option; see Section 2.1.4, XSI Conformance. If defined, its value shall be suitable for use in #if preprocessing directives.

  • _XOPEN_VERSION โ€” Integer value indicating version of the X/Open Portability Guide to which the implementation conforms. The value shall be 700.

๐ŸŒŸ Constants for Options and Option Groups ๐ŸŒŸ

The following symbolic constants, if defined in <unistd.h>, shall have a value of -1, 0, or greater, unless otherwise specified below. For profile implementations that define _POSIX_SUBPROFILE (see Section 2.1.5.1, Subprofiling Considerations) in <unistd.h>, constants described below as always having a value greater than zero need not be defined and, if defined, may have a value of -1, 0, or greater. The values shall be suitable for use in #if preprocessing directives.

If a symbolic constant is not defined or is defined with the value -1, the option is not supported for compilation. If it is defined with a value greater than zero, the option shall always be supported when the application is executed. If it is defined with the value zero, the option shall be supported for compilation and might or might not be supported at runtime. See Section 2.1.6, Options for further information about the conformance requirements of these three categories of support.

  • _POSIX_ADVISORY_INFO โ€” The implementation supports the Advisory Information option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_ASYNCHRONOUS_IO โ€” The implementation supports asynchronous input and output. This symbol shall always be set to the value 200809L.
  • _POSIX_BARRIERS โ€” The implementation supports barriers. This symbol shall always be set to the value 200809L.
  • _POSIX_CHOWN_RESTRICTED โ€” The use of chown() and fchown() is restricted to a process with appropriate privileges, and to changing the group ID of a file only to the effective group ID of the process or to one of its supplementary group IDs. This symbol shall be defined with a value other than -1.
  • _POSIX_CLOCK_SELECTION โ€” The implementation supports clock selection. This symbol shall always be set to the value 200809L.
  • _POSIX_CPUTIME โ€” The implementation supports the Process CPU-Time Clocks option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_FSYNC โ€” The implementation supports the File Synchronization option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_IPV6 โ€” The implementation supports the IPv6 option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_JOB_CONTROL โ€” The implementation supports job control. This symbol shall always be set to a value greater than zero.
  • _POSIX_MAPPED_FILES โ€” The implementation supports memory mapped Files. This symbol shall always be set to the value 200809L.
  • _POSIX_MEMLOCK โ€” The implementation supports the Process Memory Locking option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_MEMLOCK_RANGE โ€” The implementation supports the Range Memory Locking option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_MEMORY_PROTECTION โ€” The implementation supports memory protection. This symbol shall always be set to the value 200809L.
  • _POSIX_MESSAGE_PASSING โ€” The implementation supports the Message Passing option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_MONOTONIC_CLOCK โ€” The implementation supports the Monotonic Clock option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_NO_TRUNC โ€” Pathname components longer than {NAME_MAX} generate an error. This symbol shall be defined with a value other than -1.
  • _POSIX_PRIORITIZED_IO โ€” The implementation supports the Prioritized Input and Output option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_PRIORITY_SCHEDULING โ€” The implementation supports the Process Scheduling option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_RAW_SOCKETS โ€” The implementation supports the Raw Sockets option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_READER_WRITER_LOCKS โ€” The implementation supports read-write locks. This symbol shall always be set to the value 200809L.
  • _POSIX_REALTIME_SIGNALS โ€” The implementation supports realtime signals. This symbol shall always be set to the value 200809L.
  • _POSIX_REGEXP โ€” The implementation supports the Regular Expression Handling option. This symbol shall always be set to a value greater than zero.
  • _POSIX_SAVED_IDS โ€” Each process has a saved set-user-ID and a saved set-group-ID. This symbol shall always be set to a value greater than zero.
  • _POSIX_SEMAPHORES โ€” The implementation supports semaphores. This symbol shall always be set to the value 200809L.
  • _POSIX_SHARED_MEMORY_OBJECTS โ€” The implementation supports the Shared Memory Objects option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_SHELL โ€” The implementation supports the POSIX shell. This symbol shall always be set to a value greater than zero.
  • _POSIX_SPAWN โ€” The implementation supports the Spawn option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_SPIN_LOCKS โ€” The implementation supports spin locks. This symbol shall always be set to the value 200809L.
  • _POSIX_SPORADIC_SERVER โ€” The implementation supports the Process Sporadic Server option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_SYNCHRONIZED_IO โ€” The implementation supports the Synchronized Input and Output option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_THREAD_ATTR_STACKADDR โ€” The implementation supports the Thread Stack Address Attribute option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_THREAD_ATTR_STACKSIZE โ€” The implementation supports the Thread Stack Size Attribute option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_THREAD_CPUTIME โ€” The implementation supports the Thread CPU-Time Clocks option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_THREAD_PRIO_INHERIT โ€” The implementation supports the Non-Robust Mutex Priority Inheritance option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall either be -1 or 200809L.
  • _POSIX_THREAD_PRIO_PROTECT โ€” ok so this means the implementation supports the Non-Robust Mutex Priority Protection option ๐Ÿ’…. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. And whatever value sysconf() reports for it shall be either -1 or 200809L โ€” those are the only two moods it's allowed to have, fr.
  • _POSIX_THREAD_PRIORITY_SCHEDULING โ€” this one says the implementation supports the Thread Execution Scheduling option โœจ. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value sysconf() reports for it shall be either -1 or 200809L.
  • _POSIX_THREAD_PROCESS_SHARED โ€” supports the Thread Process-Shared Synchronization option ๐Ÿฆ‹. Defined in <unistd.h>? Then it shall be -1, 0, or 200809L. And sysconf()'s reported value shall be either -1 or 200809L. no cap.
  • _POSIX_THREAD_ROBUST_PRIO_INHERIT โ€” this is the Robust Mutex Priority Inheritance option ๐Ÿ‘‘. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. sysconf() reporting it shall give either -1 or 200809L.
  • _POSIX_THREAD_ROBUST_PRIO_PROTECT โ€” Robust Mutex Priority Protection, yes ma'am ๐Ÿ’–. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value sysconf() reports shall be either -1 or 200809L.
  • _POSIX_THREAD_SAFE_FUNCTIONS โ€” implementation supports thread-safe functions ๐ŸŒธ. This symbol shall always be set to the value 200809L. no wiggle room, that's the vibe.
  • _POSIX_THREAD_SPORADIC_SERVER โ€” supports the Thread Sporadic Server option ๐ŸŽ€. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L, and sysconf() shall report either -1 or 200809L.
  • _POSIX_THREADS โ€” the implementation supports threads ๐Ÿงตโœจ. This symbol shall always be set to the value 200809L. iconic.
  • _POSIX_TIMEOUTS โ€” supports timeouts โณ. This symbol shall always be set to the value 200809L.
  • _POSIX_TIMERS โ€” supports timers โฐ. This symbol shall always be set to the value 200809L.
  • _POSIX_TRACE โ€” supports the Trace option ๐Ÿ”. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value sysconf() reports shall be either -1 or 200809L.
  • _POSIX_TRACE_EVENT_FILTER โ€” supports the Trace Event Filter option ๐Ÿซถ. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. And sysconf() shall report either -1 or 200809L.
  • _POSIX_TRACE_INHERIT โ€” supports the Trace Inherit option ๐Ÿ’œ. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value sysconf() reports shall be either -1 or 200809L.
  • _POSIX_TRACE_LOG โ€” supports the Trace Log option ๐Ÿ““. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. sysconf()'s value shall be either -1 or 200809L.
  • _POSIX_TYPED_MEMORY_OBJECTS โ€” supports the Typed Memory Objects option ๐Ÿง . If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value sysconf() reports shall be either -1 or 200809L.

ok now we're getting into the data model girlies, and this is where it gets SPICY ๐ŸŒถ๏ธ because it's all about how many bits each type has. pay attention bestie:

  • _POSIX_V6_ILP32_OFF32 โ€” the implementation provides a C-language compilation environment with 32-bit int, long, pointer, and off_t types. so. many. 32s.
  • _POSIX_V6_ILP32_OFFBIG โ€” the implementation provides a C-language compilation environment with 32-bit int, long, and pointer types, plus an off_t type using at least 64 bits ๐ŸŒˆ.
  • _POSIX_V6_LP64_OFF64 โ€” the implementation provides a C-language compilation environment with 32-bit int and 64-bit long, pointer, and off_t types โœจ.
  • _POSIX_V6_LPBIG_OFFBIG โ€” the implementation provides a C-language compilation environment with an int type using at least 32 bits and long, pointer, and off_t types using at least 64 bits ๐Ÿ‘‘
  • _POSIX_V7_ILP32_OFF32 โ€” the implementation provides a C-language compilation environment with 32-bit int, long, pointer, and off_t types.
  • _POSIX_V7_ILP32_OFFBIG โ€” the implementation provides a C-language compilation environment with 32-bit int, long, and pointer types and an off_t type using at least 64 bits ๐Ÿ’….
  • _POSIX_V7_LP64_OFF64 โ€” the implementation provides a C-language compilation environment with 32-bit int and 64-bit long, pointer, and off_t types ๐ŸŒŸ.
  • _POSIX_V7_LPBIG_OFFBIG โ€” the implementation provides a C-language compilation environment with an int type using at least 32 bits and long, pointer, and off_t types using at least 64 bits ๐Ÿ’–.

back to the option-y ones, bestie, we're not done yet:

  • _POSIX2_C_BIND โ€” supports the C-Language Binding option ๐ŸŽ€. This symbol shall always have the value 200809L.
  • _POSIX2_C_DEV โ€” supports the C-Language Development Utilities option ๐Ÿ› ๏ธ. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value sysconf() reports shall be either -1 or 200809L.
  • _POSIX2_CHAR_TERM โ€” supports the Terminal Characteristics option ๐Ÿ–ฅ๏ธ. The value of this symbol reported by sysconf() shall be either -1 or a value greater than zero. (note: no 200809L requirement here, she's special ๐Ÿ’…)
  • _POSIX2_FORT_DEV โ€” supports the FORTRAN Development Utilities option ๐Ÿฐ. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value sysconf() reports shall be either -1 or 200809L.
  • _POSIX2_FORT_RUN โ€” supports the FORTRAN Runtime Utilities option ๐Ÿƒ. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. sysconf() shall report either -1 or 200809L.
  • _POSIX2_LOCALEDEF โ€” supports the creation of locales by the localedef utility ๐ŸŒ. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value sysconf() reports shall be either -1 or 200809L.
  • _POSIX2_PBS โ€” supports the Batch Environment Services and Utilities option ๐Ÿ“ฆ. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. sysconf()'s value shall be either -1 or 200809L.
  • _POSIX2_PBS_ACCOUNTING โ€” supports the Batch Accounting option ๐Ÿงพ. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value sysconf() reports shall be either -1 or 200809L.
  • _POSIX2_PBS_CHECKPOINT โ€” supports the Batch Checkpoint/Restart option ๐Ÿ’พ. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. sysconf() shall report either -1 or 200809L.
  • _POSIX2_PBS_LOCATE โ€” supports the Locate Batch Job Request option ๐Ÿ”Ž. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value sysconf() reports shall be either -1 or 200809L.
  • _POSIX2_PBS_MESSAGE โ€” supports the Batch Job Message Request option ๐Ÿ’ฌ. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. sysconf()'s reported value shall be either -1 or 200809L.
  • _POSIX2_PBS_TRACK โ€” supports the Track Batch Job Request option ๐Ÿ›ฐ๏ธ. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value sysconf() reports shall be either -1 or 200809L.
  • _POSIX2_SW_DEV โ€” supports the Software Development Utilities option ๐Ÿงฐ. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value sysconf() reports shall be either -1 or 200809L.
  • _POSIX2_UPE โ€” supports the User Portability Utilities option ๐Ÿงณ. If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. sysconf() shall report either -1 or 200809L.

and now the X/Open girlies, they're a whole different breed ๐Ÿ’…:

  • _XOPEN_CRYPT โ€” supports the X/Open Encryption Option Group ๐Ÿ”.
  • _XOPEN_ENH_I18N โ€” supports the Issue 4, Version 2 Enhanced Internationalization Option Group ๐ŸŒ. This symbol shall always be set to a value other than -1.
  • _XOPEN_REALTIME โ€” supports the X/Open Realtime Option Group โšก.
  • _XOPEN_REALTIME_THREADS โ€” supports the X/Open Realtime Threads Option Group ๐Ÿงตโšก.
  • _XOPEN_SHM โ€” supports the Issue 4, Version 2 Shared Memory Option Group ๐Ÿค. This symbol shall always be set to a value other than -1.
  • _XOPEN_STREAMS โ€” supports the XSI STREAMS Option Group ๐ŸŒŠ.
  • _XOPEN_UNIX โ€” supports the XSI option ๐Ÿ‘‘.
  • _XOPEN_UUCP โ€” supports the UUCP Utilities option ๐Ÿ“ . If it's defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value of this symbol reported by sysconf() shall be either -1 or 200809L.

โœจ Execution-Time Symbolic Constants โœจ

ok so here's the tea bestie, and it's actually important โ˜•:

If any of these following symbolic constants are not defined in the <unistd.h> header, the value shall vary depending on the file to which it is applied. If they are defined, they shall have values suitable for use in #if preprocessing directives.

If any of them are defined to have the value -1 in the <unistd.h> header, the implementation shall not provide the option on any file ๐Ÿšซ. If any are defined to have a value other than -1 in the <unistd.h> header, the implementation shall provide the option on all applicable files โœ….

And listen โ€” all of the following values, whether they're defined as symbolic constants in <unistd.h> or not, may be queried with respect to a specific file using the pathconf() or fpathconf() functions ๐Ÿ”โœจ. so you can just ask about one specific file, cute.

  • _POSIX_ASYNC_IO โ€” asynchronous input or output operations may be performed for the associated file โšก๐Ÿ“.

  • _POSIX_PRIO_IO โ€” prioritized input or output operations may be performed for the associated file. ๐Ÿ”ฅ
  • _POSIX_SYNC_IO โ€” synchronized input or output operations may be performed for the associated file. โœจ

Okay so if the following symbolic constants are defined in the <unistd.h> header, bestie, they apply to files and all paths in all file systems on the implementation:

  • _POSIX_TIMESTAMP_RESOLUTION โ€” the resolution, in nanoseconds, for all file timestamps. โฑ๏ธ
  • _POSIX2_SYMLINKS โ€” symbolic links can be created. ๐Ÿฆ‹

๐ŸŽ€ Constants for Functions ๐ŸŽ€

The <unistd.h> header shall define NULL as described in <stddef.h>. periodt.

The <unistd.h> header shall define the following symbolic constants for use with the access() function. The values shall be suitable for use in #if preprocessing directives. (yes, fr fr, they're #if-ready ๐Ÿ’…)

  • F_OK โ€” test for existence of file. ๐Ÿ‘€
  • R_OK โ€” test for read permission. ๐Ÿ“–
  • W_OK โ€” test for write permission. โœ๏ธ
  • X_OK โ€” test for execute (search) permission. ๐Ÿƒ

The constants F_OK, R_OK, W_OK, and X_OK and the expressions R_OK|W_OK, R_OK|X_OK, and R_OK|W_OK|X_OK shall all have distinct values. no overlap, no cap.

The <unistd.h> header shall define the following symbolic constants for the confstr() function:

  • _CS_PATH โ€” this is the value for the PATH environment variable that finds all of the standard utilities that are provided in a manner accessible via the exec family of functions. ๐Ÿ›ฃ๏ธ
  • _CS_POSIX_V7_ILP32_OFF32_CFLAGS โ€” if sysconf(_SC_V7_ILP32_OFF32) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set of initial options to be given to the c99 utility to build an application using a programming model with 32-bit int, long, pointer, and off_t types.
  • _CS_POSIX_V7_ILP32_OFF32_LDFLAGS โ€” if sysconf(_SC_V7_ILP32_OFF32) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set of final options to be given to the c99 utility to build an application using a programming model with 32-bit int, long, pointer, and off_t types.
  • _CS_POSIX_V7_ILP32_OFF32_LIBS โ€” if sysconf(_SC_V7_ILP32_OFF32) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set of libraries to be given to the c99 utility to build an application using a programming model with 32-bit int, long, pointer, and off_t types.
  • _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS โ€” if sysconf(_SC_V7_ILP32_OFFBIG) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set of initial options to be given to the c99 utility to build an application using a programming model with 32-bit int, long, and pointer types, and an off_t type using at least 64 bits.
  • _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS โ€” if sysconf(_SC_V7_ILP32_OFFBIG) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set of final options to be given to the c99 utility to build an application using a programming model with 32-bit int, long, and pointer types, and an off_t type using at least 64 bits.
  • _CS_POSIX_V7_ILP32_OFFBIG_LIBS โ€” if sysconf(_SC_V7_ILP32_OFFBIG) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set of libraries to be given to the c99 utility to build an application using a programming model with 32-bit int, long, and pointer types, and an off_t type using at least 64 bits.
  • _CS_POSIX_V7_LP64_OFF64_CFLAGS โ€” if sysconf(_SC_V7_LP64_OFF64) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set of initial options to be given to the c99 utility to build an application using a programming model with 32-bit int and 64-bit long, pointer, and off_t types.
  • _CS_POSIX_V7_LP64_OFF64_LDFLAGS โ€” if sysconf(_SC_V7_LP64_OFF64) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set of final options to be given to the c99 utility to build an application using a programming model with 32-bit int and 64-bit long, pointer, and off_t types.
  • _CS_POSIX_V7_LP64_OFF64_LIBS โ€” if sysconf(_SC_V7_LP64_OFF64) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set of libraries to be given to the c99 utility to build an application using a programming model with 32-bit int and 64-bit long, pointer, and off_t types.
  • _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS โ€” if sysconf(_SC_V7_LPBIG_OFFBIG) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set of initial options to be given to the c99 utility to build an application using a programming model with an int type using at least 32 bits and long, pointer, and off_t types using at least 64 bits.
  • _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS โ€” if sysconf(_SC_V7_LPBIG_OFFBIG) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set of final options to be given to the c99 utility to build an application using a programming model with an int type using at least 32 bits and long, pointer, and off_t types using at least 64 bits.
  • _CS_POSIX_V7_LPBIG_OFFBIG_LIBS โ€” if sysconf(_SC_V7_LPBIG_OFFBIG) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set of libraries to be given to the c99 utility to build an application using a programming model with an int type using at least 32 bits and long, pointer, and off_t types using at least 64 bits.
  • _CS_POSIX_V7_THREADS_CFLAGS โ€” if sysconf(_SC_POSIX_THREADS) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set of initial options to be given to the c99 utility to build a multi-threaded application. These flags are in addition to those associated with any of the other _CS_POSIX_V7_*_CFLAGS values used to specify particular type size programing environments. ๐Ÿงต
  • _CS_POSIX_V7_THREADS_LDFLAGS โ€” if sysconf(_SC_POSIX_THREADS) returns -1, the meaning of this value is unspecified. Otherwise, this value is the set of final options to be given to the c99 utility to build a multi-threaded application. These flags are in addition to those associated with any of the other _CS_POSIX_V7_*_LDFLAGS values used to specify particular type size programing environments. ๐Ÿงต
  • _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS โ€” this value is a <newline>-separated list of names of programming environments supported by the implementation in which the widths of the blksize_t, cc_t, mode_t, nfds_t, pid_t, ptrdiff_t, size_t, speed_t, ssize_t, suseconds_t, tcflag_t, wchar_t, and wint_t types are no greater than the width of type long. The format of each name shall be suitable for use with the getconf -v option. ๐Ÿ“
  • _CS_V7_ENV โ€” this is the value that provides the environment variable information (other than that provided by _CS_PATH) that is required by the implementation to create a conforming environment, as described in the implementation's conformance documentation.

The following symbolic constants are reserved for compatibility with Issue 6 (vintage, but iconic ๐Ÿ‘‘):

  • _CS_POSIX_V6_ILP32_OFF32_CFLAGS
  • _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
  • _CS_POSIX_V6_ILP32_OFF32_LIBS
  • _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
  • _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
  • _CS_POSIX_V6_ILP32_OFFBIG_LIBS
  • _CS_POSIX_V6_LP64_OFF64_CFLAGS
  • _CS_POSIX_V6_LP64_OFF64_LDFLAGS
  • _CS_POSIX_V6_LP64_OFF64_LIBS
  • _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
  • _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
  • _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
  • _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS
  • _CS_V6_ENV

The <unistd.h> header shall define SEEK_CUR, SEEK_END, and SEEK_SET as described in <stdio.h>. ๐ŸŽฏ

The <unistd.h> header shall define the following symbolic constants as possible values for the function argument to the lockf() function:

  • F_LOCK โ€” lock a section for exclusive use. ๐Ÿ”’
  • F_TEST โ€” test section for locks by other processes. ๐Ÿ•ต๏ธ
  • F_TLOCK โ€” test and lock a section for exclusive use. ๐Ÿ”
  • F_ULOCK โ€” unlock locked sections. ๐Ÿ”“

The <unistd.h> header shall define the following symbolic constants for pathconf():

  • _PC_2_SYMLINKS
  • _PC_ALLOC_SIZE_MIN
  • _PC_ASYNC_IO
  • _PC_CHOWN_RESTRICTED
  • _PC_FILESIZEBITS
  • _PC_LINK_MAX
  • _PC_MAX_CANON
  • _PC_MAX_INPUT
  • _PC_NAME_MAX
  • _PC_NO_TRUNC
  • _PC_PATH_MAX
  • _PC_PIPE_BUF
  • _PC_PRIO_IO
  • _PC_REC_INCR_XFER_SIZE
  • _PC_REC_MAX_XFER_SIZE
  • _PC_REC_MIN_XFER_SIZE
  • _PC_REC_XFER_ALIGN
  • _PC_SYMLINK_MAX
  • _PC_SYNC_IO
  • _PC_TIMESTAMP_RESOLUTION
  • _PC_VDISABLE

The <unistd.h> header shall define the following symbolic constants for sysconf():

  • _SC_2_C_BIND โ€” the C bind one, first of the _2_ crew ๐ŸŽ€
  • _SC_2_C_DEV โ€” C dev, still rolling with the _2_ crew
  • _SC_2_CHAR_TERM โ€” char term, she's here ๐Ÿ’…
  • _SC_2_FORT_DEV โ€” fortran dev, a legacy icon fr
  • _SC_2_FORT_RUN โ€” fortran run, her sister
  • _SC_2_LOCALEDEF โ€” localedef, obsessed
  • _SC_2_PBS โ€” PBS, yes bestie, that PBS
  • _SC_2_PBS_ACCOUNTING โ€” PBS accounting ๐ŸŒธ
  • _SC_2_PBS_CHECKPOINT โ€” PBS checkpoint
  • _SC_2_PBS_LOCATE โ€” PBS locate
  • _SC_2_PBS_MESSAGE โ€” PBS message
  • _SC_2_PBS_TRACK โ€” PBS track
  • _SC_2_SW_DEV โ€” SW dev, slay
  • _SC_2_UPE โ€” UPE
  • _SC_2_VERSION โ€” version, last of the _2_ gang โœจ
  • _SC_ADVISORY_INFO โ€” advisory info
  • _SC_AIO_LISTIO_MAX โ€” AIO listio max
  • _SC_AIO_MAX โ€” AIO max
  • _SC_AIO_PRIO_DELTA_MAX โ€” AIO prio delta max
  • _SC_ARG_MAX โ€” arg max ๐Ÿ’œ
  • _SC_ASYNCHRONOUS_IO โ€” asynchronous I/O
  • _SC_ATEXIT_MAX โ€” atexit max
  • _SC_BARRIERS โ€” barriers
  • _SC_BC_BASE_MAX โ€” bc base max
  • _SC_BC_DIM_MAX โ€” bc dim max
  • _SC_BC_SCALE_MAX โ€” bc scale max
  • _SC_BC_STRING_MAX โ€” bc string max
  • _SC_CHILD_MAX โ€” child max
  • _SC_CLK_TCK โ€” clk tck, the classic
  • _SC_CLOCK_SELECTION โ€” clock selection
  • _SC_COLL_WEIGHTS_MAX โ€” coll weights max
  • _SC_CPUTIME โ€” cputime โฑ๏ธ
  • _SC_DELAYTIMER_MAX โ€” delaytimer max
  • _SC_EXPR_NEST_MAX โ€” expr nest max
  • _SC_FSYNC โ€” fsync, we know her
  • _SC_GETGR_R_SIZE_MAX โ€” getgr_r size max
  • _SC_GETPW_R_SIZE_MAX โ€” getpw_r size max
  • _SC_HOST_NAME_MAX โ€” host name max ๐Ÿฆ‹
  • _SC_IOV_MAX โ€” iov max
  • _SC_IPV6 โ€” IPv6, periodt
  • _SC_JOB_CONTROL โ€” job control
  • _SC_LINE_MAX โ€” line max
  • _SC_LOGIN_NAME_MAX โ€” login name max
  • _SC_MAPPED_FILES โ€” mapped files
  • _SC_MEMLOCK โ€” memlock
  • _SC_MEMLOCK_RANGE โ€” memlock range
  • _SC_MEMORY_PROTECTION โ€” memory protection ๐Ÿซถ
  • _SC_MESSAGE_PASSING โ€” message passing
  • _SC_MONOTONIC_CLOCK โ€” monotonic clock
  • _SC_MQ_OPEN_MAX โ€” mq open max
  • _SC_MQ_PRIO_MAX โ€” mq prio max
  • _SC_NGROUPS_MAX โ€” ngroups max
  • _SC_OPEN_MAX โ€” open max
  • _SC_PAGE_SIZE โ€” page size ๐Ÿ‘‘
  • _SC_PAGESIZE โ€” pagesize, her twin ๐Ÿ‘‘
  • _SC_PRIORITIZED_IO โ€” prioritized I/O
  • _SC_PRIORITY_SCHEDULING โ€” priority scheduling
  • _SC_RAW_SOCKETS โ€” raw sockets
  • _SC_RE_DUP_MAX โ€” re dup max
  • _SC_READER_WRITER_LOCKS โ€” reader writer locks
  • _SC_REALTIME_SIGNALS โ€” realtime signals
  • _SC_REGEXP โ€” regexp ๐ŸŒˆ
  • _SC_RTSIG_MAX โ€” rtsig max
  • _SC_SAVED_IDS โ€” saved ids
  • _SC_SEM_NSEMS_MAX โ€” sem nsems max
  • _SC_SEM_VALUE_MAX โ€” sem value max
  • _SC_SEMAPHORES โ€” semaphores
  • _SC_SHARED_MEMORY_OBJECTS โ€” shared memory objects
  • _SC_SHELL โ€” shell ๐Ÿš
  • _SC_SIGQUEUE_MAX โ€” sigqueue max
  • _SC_SPAWN โ€” spawn
  • _SC_SPIN_LOCKS โ€” spin locks
  • _SC_SPORADIC_SERVER โ€” sporadic server
  • _SC_SS_REPL_MAX โ€” ss repl max
  • _SC_STREAM_MAX โ€” stream max
  • _SC_SYMLOOP_MAX โ€” symloop max
  • _SC_SYNCHRONIZED_IO โ€” synchronized I/O
  • _SC_THREAD_ATTR_STACKADDR โ€” thread attr stackaddr
  • _SC_THREAD_ATTR_STACKSIZE โ€” thread attr stacksize
  • _SC_THREAD_CPUTIME โ€” thread cputime
  • _SC_THREAD_DESTRUCTOR_ITERATIONS โ€” thread destructor iterations
  • _SC_THREAD_KEYS_MAX โ€” thread keys max
  • _SC_THREAD_PRIO_INHERIT โ€” thread prio inherit
  • _SC_THREAD_PRIO_PROTECT โ€” thread prio protect
  • _SC_THREAD_PRIORITY_SCHEDULING โ€” thread priority scheduling
  • _SC_THREAD_PROCESS_SHARED โ€” thread process shared
  • _SC_THREAD_ROBUST_PRIO_INHERIT โ€” thread robust prio inherit
  • _SC_THREAD_ROBUST_PRIO_PROTECT โ€” thread robust prio protect
  • _SC_THREAD_SAFE_FUNCTIONS โ€” thread safe functions
  • _SC_THREAD_SPORADIC_SERVER โ€” thread sporadic server
  • _SC_THREAD_STACK_MIN โ€” thread stack min
  • _SC_THREAD_THREADS_MAX โ€” thread threads max
  • _SC_THREADS โ€” threads ๐Ÿงต
  • _SC_TIMEOUTS โ€” timeouts
  • _SC_TIMER_MAX โ€” timer max
  • _SC_TIMERS โ€” timers
  • _SC_TRACE โ€” trace
  • _SC_TRACE_EVENT_FILTER โ€” trace event filter
  • _SC_TRACE_EVENT_NAME_MAX โ€” trace event name max
  • _SC_TRACE_INHERIT โ€” trace inherit
  • _SC_TRACE_LOG โ€” trace log
  • _SC_TRACE_NAME_MAX โ€” trace name max
  • _SC_TRACE_SYS_MAX โ€” trace sys max
  • _SC_TRACE_USER_EVENT_MAX โ€” trace user event max
  • _SC_TTY_NAME_MAX โ€” tty name max
  • _SC_TYPED_MEMORY_OBJECTS โ€” typed memory objects
  • _SC_TZNAME_MAX โ€” tzname max
  • _SC_V7_ILP32_OFF32 โ€” v7 ilp32 off32
  • _SC_V7_ILP32_OFFBIG โ€” v7 ilp32 offbig
  • _SC_V7_LP64_OFF64 โ€” v7 lp64 off64
  • _SC_V7_LPBIG_OFFBIG โ€” v7 lpbig offbig
  • _SC_V6_ILP32_OFF32 โ€” v6 ilp32 off32
  • _SC_V6_ILP32_OFFBIG โ€” v6 ilp32 offbig
  • _SC_V6_LP64_OFF64 โ€” v6 lp64 off64
  • _SC_V6_LPBIG_OFFBIG โ€” v6 lpbig offbig
  • _SC_VERSION โ€” version โญ
  • _SC_XOPEN_CRYPT โ€” xopen crypt
  • _SC_XOPEN_ENH_I18N โ€” xopen enh i18n
  • _SC_XOPEN_REALTIME โ€” xopen realtime
  • _SC_XOPEN_REALTIME_THREADS โ€” xopen realtime threads
  • _SC_XOPEN_SHM โ€” xopen shm
  • _SC_XOPEN_STREAMS โ€” xopen streams
  • _SC_XOPEN_UNIX โ€” xopen unix
  • _SC_XOPEN_UUCP โ€” xopen uucp
  • _SC_XOPEN_VERSION โ€” xopen version โœจ

The two constants _SC_PAGESIZE and _SC_PAGE_SIZE may be defined to have the same value. (twins!! ๐Ÿ’…)


The <unistd.h> header shall define the following symbolic constants for file streams:

  • STDERR_FILENO โ€” file number of stderr; 2. the messy one ๐Ÿ˜ญ
  • STDIN_FILENO โ€” file number of stdin; 0. the listener ๐Ÿซถ
  • STDOUT_FILENO โ€” file number of stdout; 1. the performer โœจ

And the <unistd.h> header shall define the following symbolic constant for terminal special character handling:

  • _POSIX_VDISABLE โ€” this symbol shall be defined to be the value of a character that shall disable terminal special character handling as described in Section 11.2.6, Special Control Characters. This symbol shall always be set to a value other than -1. no cap, always not -1 ๐Ÿ’€

๐ŸŽ€ Type Definitions ๐ŸŽ€

The <unistd.h> header shall define the size_t, ssize_t, uid_t, gid_t, off_t, and pid_t types as described in <sys/types.h>.

The <unistd.h> header shall define the intptr_t type as described in <stdint.h>.


๐Ÿ’… Declarations ๐Ÿ’…

The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.

int          access(const char *, int);
unsigned     alarm(unsigned);
int          chdir(const char *);
int          chown(const char *, uid_t, gid_t);
int          close(int);
size_t       confstr(int, char *, size_t);
char        *crypt(const char *, const char *);
int          dup(int);
int          dup2(int, int);
void         _exit(int);
void         encrypt(char [64], int);
int          execl(const char *, const char *, ...);
int          execle(const char *, const char *, ...);
int          execlp(const char *, const char *, ...);
int          execv(const char *, char *const []);
int          execve(const char *, char *const [], char *const []);
int          execvp(const char *, char *const []);
int          faccessat(int, const char *, int, int);
int          fchdir(int);
int          fchown(int, uid_t, gid_t);
int          fchownat(int, const char *, uid_t, gid_t, int);
int          fdatasync(int);
int          fexecve(int, char *const [], char *const []);
pid_t        fork(void);
long         fpathconf(int, int);
int          fsync(int);
int          ftruncate(int, off_t);
char        *getcwd(char *, size_t);
gid_t        getegid(void);
uid_t        geteuid(void);
gid_t        getgid(void);
int          getgroups(int, gid_t []);
long         gethostid(void);
int          gethostname(char *, size_t);
char        *getlogin(void);
int          getlogin_r(char *, size_t);
int          getopt(int, char * const [], const char *);
pid_t        getpgid(pid_t);
pid_t        getpgrp(void);
pid_t        getpid(void);
pid_t        getppid(void);
pid_t        getsid(pid_t);
uid_t        getuid(void);
int          isatty(int);
int          lchown(const char *, uid_t, gid_t);
int          link(const char *, const char *);
int          linkat(int, const char *, int, const char *, int);
int          lockf(int, int, off_t);
off_t        lseek(int, off_t, int);
int          nice(int);
long         pathconf(const char *, int);
int          pause(void);
int          pipe(int [2]);
ssize_t      pread(int, void *, size_t, off_t);
ssize_t      pwrite(int, const void *, size_t, off_t);
ssize_t      read(int, void *, size_t);
ssize_t      readlink(const char *restrict, char *restrict, size_t);
ssize_t      readlinkat(int, const char *restrict, char *restrict, size_t);
int          rmdir(const char *);
int          setegid(gid_t);
int          seteuid(uid_t);
int          setgid(gid_t);
int          setpgid(pid_t, pid_t);
pid_t        setpgrp(void);
int          setregid(gid_t, gid_t);
int          setreuid(uid_t, uid_t);
pid_t        setsid(void);
int          setuid(uid_t);
unsigned     sleep(unsigned);
void         swab(const void *restrict, void *restrict, ssize_t);
int          symlink(const char *, const char *);
int          symlinkat(const char *, int, const char *);
void         sync(void);
long         sysconf(int);
pid_t        tcgetpgrp(int);
int          tcsetpgrp(int, pid_t);
int          truncate(const char *, off_t);
char        *ttyname(int);
int          ttyname_r(int, char *, size_t);
int          unlink(const char *);
int          unlinkat(int, const char *, int);
ssize_t      write(int, const void *, size_t);

Implementations may also include the pthread_atfork() prototype as defined in <pthread.h>. Implementations may also include the ctermid() prototype as defined in <stdio.h>.

The <unistd.h> header shall declare the following external variables:

extern char  *optarg;
extern int    opterr, optind, optopt;

Inclusion of the <unistd.h> header may make visible all symbols from the headers <stddef.h>, <stdint.h>, and <stdio.h>.

The following sections are informative.


๐ŸŒˆ APPLICATION USAGE ๐ŸŒˆ

okay so real talk: POSIX.1โ€‘2008 only describes the behavior of systems that claim conformance to it. That's it, that's the deal.

But โ€” and this is the part that's actually useful โ€” application developers who want to write applications that adapt to other versions of this standard (or to systems that do not conform to any POSIX standard at all) may find it useful to code them so as to conditionally compile different code depending on the value of _POSIX_VERSION. For example:

#if _POSIX_VERSION >= 200112L
/* Use the newer function that copes with large files. */
off_t pos=ftello(fp);
#else
/* Either this is an old version of POSIX, or _POSIX_VERSION is
   not even defined, so use the traditional function. */
long pos=ftell(fp);
#endif

Earlier versions of POSIX.1โ€‘2008 and of the Single UNIX Specification can be identified by the following macros:

  • POSIX.1โ€‘1988 standard โ€” _POSIX_VERSION==198808L
  • POSIX.1โ€‘1990 standard โ€” _POSIX_VERSION==199009L
  • ISO POSIXโ€1:1996 standard โ€” _POSIX_VERSION==199506L
  • Single UNIX Specification, Version 1 โ€” _XOPEN_UNIX and _XOPEN_VERSION==4
  • Single UNIX Specification, Version 2 โ€” _XOPEN_UNIX and _XOPEN_VERSION==500
  • ISO POSIXโ€1:2001 and Single UNIX Specification, Version 3 โ€” _POSIX_VERSION==200112L, plus (if the XSI option is supported) _XOPEN_UNIX and _XOPEN_VERSION==600

POSIX.1โ€‘2008 does not make any attempt to define application binary interaction with the underlying operating system. bestie, it just doesn't, it's not that kind of document ๐Ÿ’€

However, application developers may find it useful to query _SC_VERSION at runtime via sysconf() to determine whether the current version of the operating system supports the necessary functionality, as in the following program fragment:

if (sysconf(_SC_VERSION) < 200809L) {
    fprintf(stderr, "POSIX.1-2008 system required, terminating \n");
    exit(1);
}
New applications should not use _XOPEN_SHM or _XOPEN_ENH_I18N. likeโ€ฆ just don't, okay? ๐Ÿ™ˆ

๐Ÿง  RATIONALE (aka the "why is it Like This" section)

okay bestie so as POSIX.1โ€2008 kept evolving, some options got standardized enough that the standard developers were like "honestly, just requiring one of the option choices is simpler than keeping the whole option around." but for backwards-compatibility? the option flags (with their required constant values) stayed. periodt. ๐Ÿ’…


๐Ÿ“… Version Test Macros

so the standard developers were this close to changing the definition of _POSIX_VERSION and yeeting _SC_VERSION out of the sysconf() spec, because ngl some of them thought the utility to an application was pretty minimal, and implementing the functionality is potentially problematic. ๐Ÿ™ˆ but then they remembered: support for existing application binaries is a whole thing for manufacturers, application developers, and users of implementations conforming to POSIX.1โ€2008. so they kept it.

and like, sure, the example using _SC_VERSION in the APPLICATION USAGE section doesn't give you the greatest degree of imaginable utility as an application developer or user, but it's arguably better than a core file or some other equally obscure result. (also possible: implementations can encode and recognize application binaries compiled in various POSIX.1-conforming environments, and modify the semantics of the underlying system to conform to what the application expects. iconic behavior honestly.) so for all the reasons above and in APPLICATION USAGE, the standard developers elected to retain the _POSIX_VERSION and _SC_VERSION functionality. ๐Ÿ’–


๐Ÿงฉ Compile-Time Symbolic Constants for System-Wide Options

POSIX.1โ€2008 includes support in certain areas for the newly adopted policy governing options and stubs. โœจ

this policy gives implementations flexibility in how they support options, and it also spells out how conforming applications can adapt to different implementations that support different sets of options. it allows the following:

  1. if an implementation has zero interest in supporting an option, it doesn't have to provide anything associated with that option beyond the announcement that it does not support it.
  2. an implementation can support a partial or incompatible version of an option (as a non-standard extension) as long as it does not claim to support the option.
  3. an application can determine whether the option is supported. a strictly conforming application must check this announcement mechanism before first using anything associated with the option.
โš ๏ธ there's an important implication of this policy, bestie, and you need to hear it: POSIX.1โ€2008 cannot dictate the behavior of interfaces associated with an option when the implementation does not claim to support the option. in particular, it cannot require that a function associated with an unsupported option will fail if it does not perform as specified.

however, this policy does not prevent a standard from requiring certain functions to always be present, but that they shall always fail on some implementations. the setpgid() function in the POSIX.1โ€1990 standard, for example, is considered appropriate. ๐Ÿ‘‘

the POSIX standards include various options, and the C-language binding support for an option implies that the implementation must supply data types and function interfaces. an application must be able to discover whether the implementation supports each option.

any application must consider the following three cases for each option:

  1. Option never supported.

the implementation advertises at compile time that the option will never be supported. in this case, it is not necessary for the implementation to supply any of the data types or function interfaces that are provided only as part of the option. the implementation might provide data types and functions that are similar to those defined by POSIX.1โ€2008, but there is no guarantee for any particular behavior. ๐Ÿ™ƒ

  1. Option always supported.

the implementation advertises at compile time that the option will always be supported. in this case, all data types and function interfaces shall be available and shall operate as specified. slay. โœจ

  1. Option might or might not be supported.

some implementations might not provide a mechanism to specify support of options at compile time. in addition, the implementation might be unable or unwilling to specify support or non-support at compile time. in either case, any application that might use the option at runtime must be able to compile and execute. the implementation must provide, at compile time, all data types and function interfaces that are necessary to allow this. in this situation, there must be a mechanism that allows the application to query, at runtime, whether the option is supported. if the application attempts to use the option when it is not supported, the result is unspecified unless explicitly specified otherwise in POSIX.1โ€2008. ๐Ÿ’€


๐Ÿ”ฎ FUTURE DIRECTIONS

None.

(yeah. nothing. the future is... quiet. ๐ŸŒธ)


๐Ÿ‘€ SEE ALSO

the header besties you gotta go visit:

  • <limits.h>
  • <stddef.h>
  • <stdint.h>
  • <stdio.h>
  • <sys_socket.h>
  • <sys_types.h>
  • <termios.h>
  • <wctype.h>

and from the System Interfaces volume of POSIX.1โ€2017, the whole function friend group:

access(), alarm(), chown(), close(), confstr(), crypt(), ctermid(), dup(), _Exit(), encrypt(), exec, fchdir(), fchown(), fdatasync(), fork(), fpathconf(), fsync(), ftruncate(), getcwd(), getegid(), geteuid(), getgid(), getgroups(), gethostid(), gethostname(), getlogin(), getopt(), getpgid(), getpgrp(), getpid(), getppid(), getsid(), getuid(), isatty(), lchown(), link(), lockf(), lseek(), nice(), pause(), pipe(), read(), readlink(), rmdir(), setegid(), seteuid(), setgid(), setpgid(), setpgrp(), setregid(), setreuid(), setsid(), setuid(), sleep(), swab(), symlink(), sync(), sysconf(), tcgetpgrp(), tcsetpgrp(), truncate(), ttyname(), unlink(), write()


portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.

in the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. ๐Ÿซถ

the original Standard can be obtained online at http://www.opengroup.org/unix/online.html .

any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .


and that's a wrap on the whole page, bestie!! ๐ŸŽ€ this one's from IEEE/The Open Group, dated 2017, and it's the one and only unistd.h(0P) โ€” go forth and check your feature test macros before you use anything, i'm literally begging. ๐Ÿ’–โœจ๐Ÿฆ‹ no cap. ๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from