unistd.h(7POSIX)

๐Ÿ’– unistd.h(7POSIX) โ€” POSIX Programmer's Manual ๐Ÿ’–

hey bestie, welcome to the <unistd.h> glow-up. this is page 7POSIX of the POSIX Programmer's Manual, and it's a long one, so we're doing it in five parts. part one starts right here. let's gooo โœจ


๐ŸŽ€ PROLOG ๐ŸŽ€

okay so first thing: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ โ€” so if you're on Linux, pls go consult the corresponding Linux manual page for the deets on Linux behavior. or, plot twist, the interface might not even be implemented on Linux at all. ๐Ÿ™ˆ


โœจ NAME โœจ

unistd.h โ€” standard symbolic constants and types. that's it, that's the name, it's giving iconic header file energy ๐Ÿ’…


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

#include <unistd.h>

just that one line, no cap. so simple, so clean ๐Ÿซถ


๐Ÿ’… DESCRIPTION ๐Ÿ’…

the <unistd.h> header defines miscellaneous symbolic constants and types, and it declares miscellaneous functions too. basically it's the header that has a little bit of everything.

the actual values of the constants are unspecified except as shown. and the contents of this header? they're shown below, bestie. keep reading. โฌ‡๏ธ


๐ŸŒธ Version Test Macros ๐ŸŒธ

the <unistd.h> header shall define the following symbolic constants. their values shall be suitable for use in #if preprocessing directives (yes, the preprocessor ones, we love a compile-time moment).

  • _POSIX_VERSION โ€” an integer value indicating the version of this standard (the C-language binding) that the implementation conforms to. for implementations conforming to POSIX.1-2008, the value shall be 200809L. โญ
  • _POSIX2_VERSION โ€” an integer value indicating the version of the Shell and Utilities volume of POSIX.1 that the implementation conforms to. for implementations conforming to POSIX.1-2008, the value shall be 200809L. now here's the โœจ nuance โœจ โ€” 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 that 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. lowkey a whole saga, but we move. ๐Ÿ’€

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 โ€” an integer value indicating the version of the X/Open Portability Guide that the implementation conforms to. 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. (and for profile implementations that define _POSIX_SUBPROFILE (see Section 2.1.5.1, Subprofiling Considerations) in <unistd.h>, the constants described below as always having a value greater than zero don't have to be defined, and if they are defined they may have a value of -1, 0, or greater.) the values shall be suitable for use in #if preprocessing directives.

so like, here's the vibe check on what those numbers mean:

  • if a symbolic constant is not defined or is defined with the value -1, the option is not supported for compilation.
  • if it's defined with a value greater than zero, the option shall always be supported when the application is executed.
  • if it's defined with the value zero, the option shall be supported for compilation and might or might not be supported at runtime. it's giving mystery, it's giving "we'll see" ๐ŸŽญ

see Section 2.1.6, Options for further information about the conformance requirements of these three categories of support.

alright, the list. it's long. hydrate first. ๐Ÿ’ง

  • _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.

and that's a wrap on part one, bestie โ€” but we are SO not done. more of this header is coming, so don't go anywhere ๐Ÿซถโœจ

  • _POSIX_THREAD_PRIO_PROTECT โ€” bestie, this one means the implementation supports the Non-Robust Mutex Priority Protection option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. And the value that sysconf() reports for it shall either be -1 or 200809L. That's it, that's the whole vibe. ๐Ÿ’…
  • _POSIX_THREAD_PRIORITY_SCHEDULING โ€” supports the Thread Execution Scheduling option. If it's defined in <unistd.h>, it shall be -1, 0, or 200809L. The sysconf() value 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. sysconf() reports either -1 or 200809L. slay. โœจ
  • _POSIX_THREAD_ROBUST_PRIO_INHERIT โ€” supports the Robust Mutex Priority Inheritance option. If defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The sysconf() value shall either be -1 or 200809L. ๐Ÿซถ
  • _POSIX_THREAD_ROBUST_PRIO_PROTECT โ€” supports the Robust Mutex Priority Protection option. If defined in <unistd.h>, it shall be -1, 0, or 200809L, and sysconf() shall report either -1 or 200809L. iconic behavior fr fr. ๐Ÿ’œ
  • _POSIX_THREAD_SAFE_FUNCTIONS โ€” the implementation supports thread-safe functions. And listen, this one isn't a maybe: this symbol shall always be set to the value 200809L. No negotiating. periodt. ๐Ÿ‘‘
  • _POSIX_THREAD_SPORADIC_SERVER โ€” supports the Thread Sporadic Server option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value reported by sysconf() shall either be -1 or 200809L. ๐Ÿฆ‹
  • _POSIX_THREADS โ€” the implementation supports threads. This symbol shall always be set to the value 200809L. always always. ๐Ÿ”ฅ
  • _POSIX_TIMEOUTS โ€” the implementation supports timeouts. This symbol shall always be set to the value 200809L. ๐Ÿ’ซ
  • _POSIX_TIMERS โ€” the implementation supports timers. This symbol shall always be set to the value 200809L. โฐโœจ
  • _POSIX_TRACE โ€” supports the Trace option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The sysconf() value shall either be -1 or 200809L. ๐Ÿ”
  • _POSIX_TRACE_EVENT_FILTER โ€” supports the Trace Event Filter option. If defined in <unistd.h>, it shall be -1, 0, or 200809L, and sysconf() shall report either -1 or 200809L. ๐ŸŽ€
  • _POSIX_TRACE_INHERIT โ€” supports the Trace Inherit option. If defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value reported by sysconf() shall either be -1 or 200809L. ๐ŸŒธ
  • _POSIX_TRACE_LOG โ€” supports the Trace Log option. If this symbol is defined in <unistd.h>, it shall be -1, 0, or 200809L. sysconf() shall report either -1 or 200809L. ๐Ÿ“œ
  • _POSIX_TYPED_MEMORY_OBJECTS โ€” supports the Typed Memory Objects option. If defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. And the value reported by sysconf() shall either be -1 or 200809L. ๐Ÿง 
  • _POSIX_V6_ILP32_OFF32 โ€” the implementation provides a C-language compilation environment with 32-bit int, long, pointer, and off_t types. ๐Ÿ’…
  • _POSIX_V6_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_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. (yes bestie, it's the V7 twin of the V6 one, same energy, different number ๐Ÿ’–)
  • _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. ๐Ÿ”ฅ
  • _POSIX2_C_BIND โ€” supports the C-Language Binding option. This symbol shall always have the value 200809L. no exceptions, no cap. ๐Ÿ’ฏ
  • _POSIX2_C_DEV โ€” supports the C-Language Development Utilities option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value reported by sysconf() shall either be -1 or 200809L. ๐Ÿ› ๏ธ
  • _POSIX2_CHAR_TERM โ€” supports the Terminal Characteristics option. Heads up, this one's a lil different: the value of this symbol reported by sysconf() shall either be -1 or a value greater than zero. ๐Ÿ‘€
  • _POSIX2_FORT_DEV โ€” supports the FORTRAN Development Utilities option. If defined in <unistd.h>, it shall be -1, 0, or 200809L, and sysconf() shall report either -1 or 200809L. ๐Ÿง“โœจ
  • _POSIX2_FORT_RUN โ€” supports the FORTRAN Runtime Utilities option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The sysconf() value shall either be -1 or 200809L. ๐Ÿƒ
  • _POSIX2_LOCALEDEF โ€” supports the creation of locales by the localedef utility. If defined in <unistd.h>, it shall be -1, 0, or 200809L, and sysconf() shall report either -1 or 200809L. ๐ŸŒ
  • _POSIX2_PBS โ€” supports the Batch Environment Services and Utilities option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value reported by sysconf() shall either be -1 or 200809L. ๐Ÿ“ฆ
  • _POSIX2_PBS_ACCOUNTING โ€” supports the Batch Accounting option. If defined in <unistd.h>, it shall be -1, 0, or 200809L. sysconf() shall report either -1 or 200809L. ๐Ÿงพ
  • _POSIX2_PBS_CHECKPOINT โ€” supports the Batch Checkpoint/Restart option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L, and the value reported by sysconf() shall either be -1 or 200809L. ๐Ÿ’พ
  • _POSIX2_PBS_LOCATE โ€” supports the Locate Batch Job Request option. If defined in <unistd.h>, it shall be -1, 0, or 200809L, and sysconf() shall report either -1 or 200809L. ๐Ÿ”Ž
  • _POSIX2_PBS_MESSAGE โ€” supports the Batch Job Message Request option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The value reported by sysconf() shall either be -1 or 200809L. โœ‰๏ธ
  • _POSIX2_PBS_TRACK โ€” supports the Track Batch Job Request option. If defined in <unistd.h>, it shall be -1, 0, or 200809L, and sysconf() shall report either -1 or 200809L. ๐Ÿ›ฐ๏ธ
  • _POSIX2_SW_DEV โ€” supports the Software Development Utilities option. If this symbol is defined in <unistd.h>, it shall be defined to be -1, 0, or 200809L. The sysconf() value shall either be -1 or 200809L. ๐Ÿงฐ
  • _POSIX2_UPE โ€” supports the User Portability Utilities option. If defined in <unistd.h>, it shall be -1, 0, or 200809L, and sysconf() shall report either -1 or 200809L. ๐Ÿงณ
  • _XOPEN_CRYPT โ€” the implementation supports the X/Open Encryption Option Group. ๐Ÿ”
  • _XOPEN_ENH_I18N โ€” the implementation supports the Issue 4, Version 2 Enhanced Internationalization Option Group. This symbol shall always be set to a value other than -1. ๐Ÿ—บ๏ธ
  • _XOPEN_REALTIME โ€” the implementation supports the X/Open Realtime Option Group. โšก
  • _XOPEN_REALTIME_THREADS โ€” the implementation supports the X/Open Realtime Threads Option Group. ๐Ÿงต
  • _XOPEN_SHM โ€” the implementation supports the Issue 4, Version 2 Shared Memory Option Group. This symbol shall always be set to a value other than -1. ๐Ÿง โœจ
  • _XOPEN_STREAMS โ€” the implementation supports the XSI STREAMS Option Group. ๐ŸŒŠ
  • _XOPEN_UNIX โ€” the implementation supports the XSI option. ๐Ÿง
  • _XOPEN_UUCP โ€” the implementation supports the UUCP Utilities 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 be either -1 or 200809L. ๐Ÿ“ž

โฐ Execution-Time Symbolic Constants โฐ

okay okay, new category bestie, and the rules here are different so pay attention ๐Ÿ‘€

If any of the 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 defined, they shall have values suitable for use in #if preprocessing directives. yes, #if. the preprocessor wants in on this. ๐Ÿ’…

If any of the following symbolic constants are defined to have value -1 in the <unistd.h> header, the implementation shall not provide the option on any file. But 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. it's giving all-or-nothing energy fr fr. ๐Ÿ˜ค

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. ๐Ÿซถ

  • _POSIX_ASYNC_IO โ€” asynchronous input or output operations may be performed for the associated file. like, the file is doing its own thing in the background and honestly? good for it. ๐Ÿฆ‹โœจ
  • _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. โœจ

If these next symbolic constants are defined in the <unistd.h> header, bestie, they apply to files and to all paths in all file systems on the implementation โ€” like, the whole vibe, everywhere:

  • _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>. (Yes, that NULL. The iconic one. ๐Ÿซถ)

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 โ€” iykyk, they gotta work in the preprocessor:

  • 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.

And 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 duplicates, 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 (legacy icons, we still love them ๐Ÿ’œ):

  • _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():

okay bestie, deep breath, because here comes the rest of the sysconf() constants and there are, like, a hundred of them ๐Ÿ’… Not me counting. I counted. Every single one gets its moment, no skips, no cuts, we're doing the whole list:

  • _SC_2_C_BIND
  • _SC_2_C_DEV
  • _SC_2_CHAR_TERM
  • _SC_2_FORT_DEV
  • _SC_2_FORT_RUN
  • _SC_2_LOCALEDEF
  • _SC_2_PBS
  • _SC_2_PBS_ACCOUNTING
  • _SC_2_PBS_CHECKPOINT
  • _SC_2_PBS_LOCATE
  • _SC_2_PBS_MESSAGE
  • _SC_2_PBS_TRACK
  • _SC_2_SW_DEV
  • _SC_2_UPE
  • _SC_2_VERSION
  • _SC_ADVISORY_INFO
  • _SC_AIO_LISTIO_MAX
  • _SC_AIO_MAX
  • _SC_AIO_PRIO_DELTA_MAX
  • _SC_ARG_MAX
  • _SC_ASYNCHRONOUS_IO
  • _SC_ATEXIT_MAX
  • _SC_BARRIERS
  • _SC_BC_BASE_MAX
  • _SC_BC_DIM_MAX
  • _SC_BC_SCALE_MAX
  • _SC_BC_STRING_MAX
  • _SC_CHILD_MAX
  • _SC_CLK_TCK
  • _SC_CLOCK_SELECTION
  • _SC_COLL_WEIGHTS_MAX
  • _SC_CPUTIME
  • _SC_DELAYTIMER_MAX
  • _SC_EXPR_NEST_MAX
  • _SC_FSYNC
  • _SC_GETGR_R_SIZE_MAX
  • _SC_GETPW_R_SIZE_MAX
  • _SC_HOST_NAME_MAX
  • _SC_IOV_MAX
  • _SC_IPV6
  • _SC_JOB_CONTROL
  • _SC_LINE_MAX
  • _SC_LOGIN_NAME_MAX
  • _SC_MAPPED_FILES
  • _SC_MEMLOCK
  • _SC_MEMLOCK_RANGE
  • _SC_MEMORY_PROTECTION
  • _SC_MESSAGE_PASSING
  • _SC_MONOTONIC_CLOCK
  • _SC_MQ_OPEN_MAX
  • _SC_MQ_PRIO_MAX
  • _SC_NGROUPS_MAX
  • _SC_OPEN_MAX
  • _SC_PAGE_SIZE
  • _SC_PAGESIZE
  • _SC_PRIORITIZED_IO
  • _SC_PRIORITY_SCHEDULING
  • _SC_RAW_SOCKETS
  • _SC_RE_DUP_MAX
  • _SC_READER_WRITER_LOCKS
  • _SC_REALTIME_SIGNALS
  • _SC_REGEXP
  • _SC_RTSIG_MAX
  • _SC_SAVED_IDS
  • _SC_SEM_NSEMS_MAX
  • _SC_SEM_VALUE_MAX
  • _SC_SEMAPHORES
  • _SC_SHARED_MEMORY_OBJECTS
  • _SC_SHELL
  • _SC_SIGQUEUE_MAX
  • _SC_SPAWN
  • _SC_SPIN_LOCKS
  • _SC_SPORADIC_SERVER
  • _SC_SS_REPL_MAX
  • _SC_STREAM_MAX
  • _SC_SYMLOOP_MAX
  • _SC_SYNCHRONIZED_IO
  • _SC_THREAD_ATTR_STACKADDR
  • _SC_THREAD_ATTR_STACKSIZE
  • _SC_THREAD_CPUTIME
  • _SC_THREAD_DESTRUCTOR_ITERATIONS
  • _SC_THREAD_KEYS_MAX
  • _SC_THREAD_PRIO_INHERIT
  • _SC_THREAD_PRIO_PROTECT
  • _SC_THREAD_PRIORITY_SCHEDULING
  • _SC_THREAD_PROCESS_SHARED
  • _SC_THREAD_ROBUST_PRIO_INHERIT
  • _SC_THREAD_ROBUST_PRIO_PROTECT
  • _SC_THREAD_SAFE_FUNCTIONS
  • _SC_THREAD_SPORADIC_SERVER
  • _SC_THREAD_STACK_MIN
  • _SC_THREAD_THREADS_MAX
  • _SC_THREADS
  • _SC_TIMEOUTS
  • _SC_TIMER_MAX
  • _SC_TIMERS
  • _SC_TRACE
  • _SC_TRACE_EVENT_FILTER
  • _SC_TRACE_EVENT_NAME_MAX
  • _SC_TRACE_INHERIT
  • _SC_TRACE_LOG
  • _SC_TRACE_NAME_MAX
  • _SC_TRACE_SYS_MAX
  • _SC_TRACE_USER_EVENT_MAX
  • _SC_TTY_NAME_MAX
  • _SC_TYPED_MEMORY_OBJECTS
  • _SC_TZNAME_MAX
  • _SC_V7_ILP32_OFF32
  • _SC_V7_ILP32_OFFBIG
  • _SC_V7_LP64_OFF64
  • _SC_V7_LPBIG_OFFBIG
  • _SC_V6_ILP32_OFF32
  • _SC_V6_ILP32_OFFBIG
  • _SC_V6_LP64_OFF64
  • _SC_V6_LPBIG_OFFBIG
  • _SC_VERSION
  • _SC_XOPEN_CRYPT
  • _SC_XOPEN_ENH_I18N
  • _SC_XOPEN_REALTIME
  • _SC_XOPEN_REALTIME_THREADS
  • _SC_XOPEN_SHM
  • _SC_XOPEN_STREAMS
  • _SC_XOPEN_UNIX
  • _SC_XOPEN_UUCP
  • _SC_XOPEN_VERSION

we made it. icon behavior honestly ๐Ÿ’œ

Quick lil note on two of them: the two constants _SC_PAGESIZE and _SC_PAGE_SIZE may be defined to have the same value. That's it, that's the whole tea. ๐Ÿต


๐ŸŒˆ File Streams ๐ŸŒˆ

The <unistd.h> header shall define the following symbolic constants for file streams โ€” these are the ones you actually use every single day, bestie, no exaggeration:

  • STDERR_FILENO โ€” file number of stderr; 2.
  • STDIN_FILENO โ€” file number of stdin; 0.
  • STDOUT_FILENO โ€” file number of stdout; 1.

๐ŸŽ€ Terminal Special Characters ๐ŸŽ€

And the <unistd.h> header shall define this 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. And this symbol shall always be set to a value other than -1. Periodt. ๐Ÿซถ

๐Ÿฆ‹ 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 ๐Ÿ“œ

Okay so here's the part where it just drops the whole roster. These following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided. Look at her, she's stunning:

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>.

And the <unistd.h> header shall declare these external variables โ€” yes, the getopt() girlies, they live here:

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>.

heads up bestie: everything below this line is informative, not normative. Different vibe entirely. Still useful though! ๐Ÿงš

โœจ APPLICATION USAGE โœจ

So, the tea: POSIX.1โ€2008 only describes the behavior of systems that claim conformance to it. But if you're an application developer who wants to write apps that adapt to other versions of this standard โ€” or to systems that don't conform to any POSIX standard at all โ€” you might find it useful to conditionally compile different code depending on the value of _POSIX_VERSION, like this:

#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 โ€” it's giving archaeology but make it โœจ:

  • 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. 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);
}
and one last thing, bestie: new applications should not use _XOPEN_SHM or _XOPEN_ENH_I18N. Just don't. ๐Ÿ’…

okay breathe, that was a lot of constants ๐Ÿซถ we're still going though โ€” more to come โœจ

๐Ÿ’… RATIONALE ๐Ÿ’…

okay so picture this: as POSIX.1โ€2008 evolved, certain options got so standardized that the standard developers were like โ€œbestie, why are we even keeping this as an option? simply requiring one of the option choices was simpler than retaining the option.โ€ But for backwards-compatibility, the option flags โ€” with required constant values โ€” are retained. periodt. ๐Ÿ’–

โœจ Version Test Macros โœจ

The standard developers considered altering the definition of _POSIX_VERSION and removing _SC_VERSION from the specification of sysconf(), since the utility to an application was deemed by some to be minimal, and since the implementation of the functionality is potentially problematic. However, they recognized that support for existing application binaries is a concern to manufacturers, application developers, and the users of implementations conforming to POSIX.1โ€2008.

While the example using _SC_VERSION in the APPLICATION USAGE section does not provide the greatest degree of imaginable utility to the application developer or user, it is arguably better than a core file or some other equally obscure result. (It is also possible for implementations to encode and recognize application binaries compiled in various POSIX.1-conforming environments, and modify the semantics of the underlying system to conform to the expectations of the application.) For the reasons outlined in the preceding paragraphs and in the APPLICATION USAGE section, 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 provides flexibility for implementations in how they support options. It also specifies how conforming applications can adapt to different implementations that support different sets of options. It allows the following:

  1. If an implementation has no interest in supporting an option, it does not 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 is an important implication of this policy. 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.
  2. 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.
  3. 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. literally nothing, bestie. the future is a blank canvas. ๐Ÿ’€โœจ


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

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

The System Interfaces volume of POSIX.1โ€2017, 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()


okay legal bestie moment, no cap, hereโ€™s the whole copyright tea:

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 .


thatโ€™s the whole page, bestie! this one came from IEEE/The Open Group, dated 2017, and itโ€™s the unistd.h(7POSIX) page. mwah ๐Ÿ’‹โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from