1unistd.h(0P)               POSIX Programmer's Manual              unistd.h(0P)
2
3
4

PROLOG

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

NAME

12       unistd.h — standard symbolic constants and types
13

SYNOPSIS

15       #include <unistd.h>
16

DESCRIPTION

18       The <unistd.h> header  defines  miscellaneous  symbolic  constants  and
19       types,  and  declares miscellaneous functions. The actual values of the
20       constants are unspecified except as shown. The contents of this  header
21       are shown below.
22
23   Version Test Macros
24       The  <unistd.h>  header  shall define the following symbolic constants.
25       The values shall be suitable for use in #if preprocessing directives.
26
27       _POSIX_VERSION
28             Integer value indicating version  of  this  standard  (C-language
29             binding)  to  which  the implementation conforms. For implementa‐
30             tions conforming to POSIX.1‐2008, the value shall be 200809L.
31
32       _POSIX2_VERSION
33             Integer value indicating version of the Shell and Utilities  vol‐
34             ume  of  POSIX.1 to which the implementation conforms. For imple‐
35             mentations  conforming  to  POSIX.1‐2008,  the  value  shall   be
36             200809L.  For  profile implementations that define _POSIX_SUBPRO‐
37             FILE  (see  Section  2.1.5.1,  Subprofiling  Considerations)   in
38             <unistd.h>,  _POSIX2_VERSION  may be left undefined or be defined
39             with the value -1 to indicate that the Shell and Utilities volume
40             of   POSIX.1   is   not  supported.  In  this  case,  a  call  to
41             sysconf(_SC_2_VERSION) shall return either 200809L or -1 indicat‐
42             ing  that the Shell and Utilities volume of POSIX.1 is or is not,
43             respectively, supported at runtime.
44
45       The <unistd.h> header shall define the following symbolic constant only
46       if  the  implementation supports the XSI option; see Section 2.1.4, XSI
47       Conformance.  If defined, its value shall be suitable for  use  in  #if
48       preprocessing directives.
49
50       _XOPEN_VERSION
51             Integer  value indicating version of the X/Open Portability Guide
52             to which the implementation conforms. The value shall be 700.
53
54   Constants for Options and Option Groups
55       The following symbolic constants, if defined in <unistd.h>, shall  have
56       a  value  of  -1,  0, or greater, unless otherwise specified below. For
57       profile implementations  that  define  _POSIX_SUBPROFILE  (see  Section
58       2.1.5.1,   Subprofiling   Considerations)   in   <unistd.h>,  constants
59       described below as always having a value greater than zero need not  be
60       defined  and,  if  defined, may have a value of -1, 0, or greater.  The
61       values shall be suitable for use in #if preprocessing directives.
62
63       If a symbolic constant is not defined or is defined with the value  -1,
64       the  option  is  not supported for compilation. If it is defined with a
65       value greater than zero, the option shall always be supported when  the
66       application  is  executed.  If  it  is defined with the value zero, the
67       option shall be supported for compilation and might  or  might  not  be
68       supported  at  runtime. See Section 2.1.6, Options for further informa‐
69       tion about the conformance requirements of these  three  categories  of
70       support.
71
72       _POSIX_ADVISORY_INFO
73             The  implementation supports the Advisory Information option.  If
74             this symbol is defined in <unistd.h>, it shall be defined  to  be
75             -1, 0, or 200809L. The value of this symbol reported by sysconf()
76             shall either be -1 or 200809L.
77
78       _POSIX_ASYNCHRONOUS_IO
79             The implementation supports asynchronous input and output.   This
80             symbol shall always be set to the value 200809L.
81
82       _POSIX_BARRIERS
83             The  implementation  supports barriers.  This symbol shall always
84             be set to the value 200809L.
85
86       _POSIX_CHOWN_RESTRICTED
87             The use of chown() and fchown() is restricted to a  process  with
88             appropriate  privileges,  and  to changing the group ID of a file
89             only to the effective group ID of the process or to  one  of  its
90             supplementary  group  IDs.  This  symbol  shall be defined with a
91             value other than -1.
92
93       _POSIX_CLOCK_SELECTION
94             The implementation supports clock selection.  This  symbol  shall
95             always be set to the value 200809L.
96
97       _POSIX_CPUTIME
98             The  implementation  supports the Process CPU-Time Clocks option.
99             If this symbol is defined in <unistd.h>, it shall be  defined  to
100             be  -1,  0,  or  200809L.  The  value  of this symbol reported by
101             sysconf() shall either be -1 or 200809L.
102
103       _POSIX_FSYNC
104             The implementation supports the File Synchronization option.   If
105             this  symbol  is defined in <unistd.h>, it shall be defined to be
106             -1, 0, or 200809L. The value of this symbol reported by sysconf()
107             shall either be -1 or 200809L.
108
109       _POSIX_IPV6
110             The  implementation  supports the IPv6 option.  If this symbol is
111             defined in <unistd.h>, it shall  be  defined  to  be  -1,  0,  or
112             200809L.  The  value  of  this symbol reported by sysconf() shall
113             either be -1 or 200809L.
114
115       _POSIX_JOB_CONTROL
116             The implementation supports job control. This symbol shall always
117             be set to a value greater than zero.
118
119       _POSIX_MAPPED_FILES
120             The  implementation  supports  memory  mapped Files.  This symbol
121             shall always be set to the value 200809L.
122
123       _POSIX_MEMLOCK
124             The implementation supports the Process  Memory  Locking  option.
125             If  this  symbol is defined in <unistd.h>, it shall be defined to
126             be -1, 0, or 200809L.  The  value  of  this  symbol  reported  by
127             sysconf() shall either be -1 or 200809L.
128
129       _POSIX_MEMLOCK_RANGE
130             The  implementation supports the Range Memory Locking option.  If
131             this symbol is defined in <unistd.h>, it shall be defined  to  be
132             -1, 0, or 200809L. The value of this symbol reported by sysconf()
133             shall either be -1 or 200809L.
134
135       _POSIX_MEMORY_PROTECTION
136             The implementation supports memory protection.  This symbol shall
137             always be set to the value 200809L.
138
139       _POSIX_MESSAGE_PASSING
140             The  implementation supports the Message Passing option.  If this
141             symbol is defined in <unistd.h>, it shall be defined to be -1, 0,
142             or  200809L. The value of this symbol reported by sysconf() shall
143             either be -1 or 200809L.
144
145       _POSIX_MONOTONIC_CLOCK
146             The implementation supports the Monotonic Clock option.  If  this
147             symbol is defined in <unistd.h>, it shall be defined to be -1, 0,
148             or 200809L. The value of this symbol reported by sysconf()  shall
149             either be -1 or 200809L.
150
151       _POSIX_NO_TRUNC
152             Pathname  components  longer  than  {NAME_MAX} generate an error.
153             This symbol shall be defined with a value other than -1.
154
155       _POSIX_PRIORITIZED_IO
156             The implementation supports  the  Prioritized  Input  and  Output
157             option.   If  this  symbol  is defined in <unistd.h>, it shall be
158             defined to be -1,  0,  or  200809L.  The  value  of  this  symbol
159             reported by sysconf() shall either be -1 or 200809L.
160
161       _POSIX_PRIORITY_SCHEDULING
162             The  implementation  supports  the Process Scheduling option.  If
163             this symbol is defined in <unistd.h>, it shall be defined  to  be
164             -1, 0, or 200809L. The value of this symbol reported by sysconf()
165             shall either be -1 or 200809L.
166
167       _POSIX_RAW_SOCKETS
168             The implementation supports the Raw Sockets option.  If this sym‐
169             bol is defined in <unistd.h>, it shall be defined to be -1, 0, or
170             200809L. The value of this symbol  reported  by  sysconf()  shall
171             either be -1 or 200809L.
172
173       _POSIX_READER_WRITER_LOCKS
174             The  implementation supports read-write locks.  This symbol shall
175             always be set to the value 200809L.
176
177       _POSIX_REALTIME_SIGNALS
178             The implementation supports realtime signals.  This symbol  shall
179             always be set to the value 200809L.
180
181       _POSIX_REGEXP
182             The  implementation  supports  the  Regular  Expression  Handling
183             option.  This symbol shall always be set to a value greater  than
184             zero.
185
186       _POSIX_SAVED_IDS
187             Each  process  has  a saved set-user-ID and a saved set-group-ID.
188             This symbol shall always be set to a value greater than zero.
189
190       _POSIX_SEMAPHORES
191             The implementation supports semaphores.  This symbol shall always
192             be set to the value 200809L.
193
194       _POSIX_SHARED_MEMORY_OBJECTS
195             The implementation supports the Shared Memory Objects option.  If
196             this symbol is defined in <unistd.h>, it shall be defined  to  be
197             -1, 0, or 200809L. The value of this symbol reported by sysconf()
198             shall either be -1 or 200809L.
199
200       _POSIX_SHELL
201             The implementation supports the POSIX shell.  This  symbol  shall
202             always be set to a value greater than zero.
203
204       _POSIX_SPAWN
205             The  implementation supports the Spawn option.  If this symbol is
206             defined in <unistd.h>, it shall  be  defined  to  be  -1,  0,  or
207             200809L.  The  value  of  this symbol reported by sysconf() shall
208             either be -1 or 200809L.
209
210       _POSIX_SPIN_LOCKS
211             The implementation supports spin locks.  This symbol shall always
212             be set to the value 200809L.
213
214       _POSIX_SPORADIC_SERVER
215             The  implementation  supports the Process Sporadic Server option.
216             If this symbol is defined in <unistd.h>, it shall be  defined  to
217             be  -1,  0,  or  200809L.  The  value  of this symbol reported by
218             sysconf() shall either be -1 or 200809L.
219
220       _POSIX_SYNCHRONIZED_IO
221             The implementation supports the  Synchronized  Input  and  Output
222             option.   If  this  symbol  is defined in <unistd.h>, it shall be
223             defined to be -1,  0,  or  200809L.  The  value  of  this  symbol
224             reported by sysconf() shall either be -1 or 200809L.
225
226       _POSIX_THREAD_ATTR_STACKADDR
227             The  implementation  supports  the Thread Stack Address Attribute
228             option.  If this symbol is defined in  <unistd.h>,  it  shall  be
229             defined  to  be  -1,  0,  or  200809L.  The  value of this symbol
230             reported by sysconf() shall either be -1 or 200809L.
231
232       _POSIX_THREAD_ATTR_STACKSIZE
233             The implementation  supports  the  Thread  Stack  Size  Attribute
234             option.   If  this  symbol  is defined in <unistd.h>, it shall be
235             defined to be -1,  0,  or  200809L.  The  value  of  this  symbol
236             reported by sysconf() shall either be -1 or 200809L.
237
238       _POSIX_THREAD_CPUTIME
239             The  implementation  supports  the Thread CPU-Time Clocks option.
240             If this symbol is defined in <unistd.h>, it shall be  defined  to
241             be  -1,  0,  or  200809L.  The  value  of this symbol reported by
242             sysconf() shall either be -1 or 200809L.
243
244       _POSIX_THREAD_PRIO_INHERIT
245             The implementation supports the Non-Robust Mutex Priority Inheri‐
246             tance  option.  If this symbol is defined in <unistd.h>, it shall
247             be defined to be -1, 0, or 200809L.  The  value  of  this  symbol
248             reported by sysconf() shall either be -1 or 200809L.
249
250       _POSIX_THREAD_PRIO_PROTECT
251             The implementation supports the Non-Robust Mutex Priority Protec‐
252             tion option. If this symbol is defined in <unistd.h>, it shall be
253             defined  to  be  -1,  0,  or  200809L.  The  value of this symbol
254             reported by sysconf() shall either be -1 or 200809L.
255
256       _POSIX_THREAD_PRIORITY_SCHEDULING
257             The  implementation  supports  the  Thread  Execution  Scheduling
258             option.   If  this  symbol  is defined in <unistd.h>, it shall be
259             defined to be -1,  0,  or  200809L.  The  value  of  this  symbol
260             reported by sysconf() shall either be -1 or 200809L.
261
262       _POSIX_THREAD_PROCESS_SHARED
263             The  implementation  supports  the Thread Process-Shared Synchro‐
264             nization option.  If this symbol is  defined  in  <unistd.h>,  it
265             shall  be defined to be -1, 0, or 200809L. The value of this sym‐
266             bol reported by sysconf() shall either be -1 or 200809L.
267
268       _POSIX_THREAD_ROBUST_PRIO_INHERIT
269             The implementation supports the Robust Mutex Priority Inheritance
270             option.  If  this  symbol  is  defined in <unistd.h>, it shall be
271             defined to be -1,  0,  or  200809L.  The  value  of  this  symbol
272             reported by sysconf() shall either be -1 or 200809L.
273
274       _POSIX_THREAD_ROBUST_PRIO_PROTECT
275             The  implementation supports the Robust Mutex Priority Protection
276             option. If this symbol is defined  in  <unistd.h>,  it  shall  be
277             defined  to  be  -1,  0,  or  200809L.  The  value of this symbol
278             reported by sysconf() shall either be -1 or 200809L.
279
280       _POSIX_THREAD_SAFE_FUNCTIONS
281             The implementation supports thread-safe functions.   This  symbol
282             shall always be set to the value 200809L.
283
284       _POSIX_THREAD_SPORADIC_SERVER
285             The  implementation  supports  the Thread Sporadic Server option.
286             If this symbol is defined in <unistd.h>, it shall be  defined  to
287             be  -1,  0,  or  200809L.  The  value  of this symbol reported by
288             sysconf() shall either be -1 or 200809L.
289
290       _POSIX_THREADS
291             The implementation supports threads.  This symbol shall always be
292             set to the value 200809L.
293
294       _POSIX_TIMEOUTS
295             The  implementation  supports timeouts.  This symbol shall always
296             be set to the value 200809L.
297
298       _POSIX_TIMERS
299             The implementation supports timers.  This symbol shall always  be
300             set to the value 200809L.
301
302       _POSIX_TRACE
303             The  implementation supports the Trace option.  If this symbol is
304             defined in <unistd.h>, it shall  be  defined  to  be  -1,  0,  or
305             200809L.  The  value  of  this symbol reported by sysconf() shall
306             either be -1 or 200809L.
307
308       _POSIX_TRACE_EVENT_FILTER
309             The implementation supports the Trace Event  Filter  option.   If
310             this  symbol  is defined in <unistd.h>, it shall be defined to be
311             -1, 0, or 200809L. The value of this symbol reported by sysconf()
312             shall either be -1 or 200809L.
313
314       _POSIX_TRACE_INHERIT
315             The  implementation  supports  the Trace Inherit option.  If this
316             symbol is defined in <unistd.h>, it shall be defined to be -1, 0,
317             or  200809L. The value of this symbol reported by sysconf() shall
318             either be -1 or 200809L.
319
320       _POSIX_TRACE_LOG
321             The implementation supports the Trace Log option.  If this symbol
322             is  defined  in  <unistd.h>,  it shall be defined to be -1, 0, or
323             200809L. The value of this symbol  reported  by  sysconf()  shall
324             either be -1 or 200809L.
325
326       _POSIX_TYPED_MEMORY_OBJECTS
327             The  implementation supports the Typed Memory Objects option.  If
328             this symbol is defined in <unistd.h>, it shall be defined  to  be
329             -1, 0, or 200809L. The value of this symbol reported by sysconf()
330             shall either be -1 or 200809L.
331
332       _POSIX_V6_ILP32_OFF32
333             The implementation provides a C-language compilation  environment
334             with 32-bit int, long, pointer, and off_t types.
335
336       _POSIX_V6_ILP32_OFFBIG
337             The  implementation provides a C-language compilation environment
338             with 32-bit int, long, and pointer types and an off_t type  using
339             at least 64 bits.
340
341       _POSIX_V6_LP64_OFF64
342             The  implementation provides a C-language compilation environment
343             with 32-bit int and 64-bit long, pointer, and off_t types.
344
345       _POSIX_V6_LPBIG_OFFBIG
346             The implementation provides a C-language compilation  environment
347             with  an  int  type using at least 32 bits and long, pointer, and
348             off_t types using at least 64 bits.
349
350       _POSIX_V7_ILP32_OFF32
351             The implementation provides a C-language compilation  environment
352             with 32-bit int, long, pointer, and off_t types.
353
354       _POSIX_V7_ILP32_OFFBIG
355             The  implementation provides a C-language compilation environment
356             with 32-bit int, long, and pointer types and an off_t type  using
357             at least 64 bits.
358
359       _POSIX_V7_LP64_OFF64
360             The  implementation provides a C-language compilation environment
361             with 32-bit int and 64-bit long, pointer, and off_t types.
362
363       _POSIX_V7_LPBIG_OFFBIG
364             The implementation provides a C-language compilation  environment
365             with  an  int  type using at least 32 bits and long, pointer, and
366             off_t types using at least 64 bits.
367
368       _POSIX2_C_BIND
369             The implementation supports the C-Language Binding  option.  This
370             symbol shall always have the value 200809L.
371
372       _POSIX2_C_DEV
373             The  implementation supports the C-Language Development Utilities
374             option.  If this symbol is defined in  <unistd.h>,  it  shall  be
375             defined  to  be  -1,  0,  or  200809L.  The  value of this symbol
376             reported by sysconf() shall either be -1 or 200809L.
377
378       _POSIX2_CHAR_TERM
379             The implementation supports the Terminal Characteristics  option.
380             The value of this symbol reported by sysconf() shall either be -1
381             or a value greater than zero.
382
383       _POSIX2_FORT_DEV
384             The implementation supports  the  FORTRAN  Development  Utilities
385             option.   If  this  symbol  is defined in <unistd.h>, it shall be
386             defined to be -1,  0,  or  200809L.  The  value  of  this  symbol
387             reported by sysconf() shall either be -1 or 200809L.
388
389       _POSIX2_FORT_RUN
390             The implementation supports the FORTRAN Runtime Utilities option.
391             If this symbol is defined in <unistd.h>, it shall be  defined  to
392             be  -1,  0,  or  200809L.  The  value  of this symbol reported by
393             sysconf() shall either be -1 or 200809L.
394
395       _POSIX2_LOCALEDEF
396             The implementation  supports  the  creation  of  locales  by  the
397             localedef  utility.   If this symbol is defined in <unistd.h>, it
398             shall be defined to be -1, 0, or 200809L. The value of this  sym‐
399             bol reported by sysconf() shall either be -1 or 200809L.
400
401       _POSIX2_PBS
402             The  implementation  supports  the Batch Environment Services and
403             Utilities option.  If this symbol is defined  in  <unistd.h>,  it
404             shall  be defined to be -1, 0, or 200809L. The value of this sym‐
405             bol reported by sysconf() shall either be -1 or 200809L.
406
407       _POSIX2_PBS_ACCOUNTING
408             The implementation supports the Batch Accounting option.  If this
409             symbol is defined in <unistd.h>, it shall be defined to be -1, 0,
410             or 200809L. The value of this symbol reported by sysconf()  shall
411             either be -1 or 200809L.
412
413       _POSIX2_PBS_CHECKPOINT
414             The  implementation supports the Batch Checkpoint/Restart option.
415             If this symbol is defined in <unistd.h>, it shall be  defined  to
416             be  -1,  0,  or  200809L.  The  value  of this symbol reported by
417             sysconf() shall either be -1 or 200809L.
418
419       _POSIX2_PBS_LOCATE
420             The implementation supports the Locate Batch Job Request  option.
421             If  this  symbol is defined in <unistd.h>, it shall be defined to
422             be -1, 0, or 200809L.  The  value  of  this  symbol  reported  by
423             sysconf() shall either be -1 or 200809L.
424
425       _POSIX2_PBS_MESSAGE
426             The implementation supports the Batch Job Message Request option.
427             If this symbol is defined in <unistd.h>, it shall be  defined  to
428             be  -1,  0,  or  200809L.  The  value  of this symbol reported by
429             sysconf() shall either be -1 or 200809L.
430
431       _POSIX2_PBS_TRACK
432             The implementation supports the Track Batch Job  Request  option.
433             If  this  symbol is defined in <unistd.h>, it shall be defined to
434             be -1, 0, or 200809L.  The  value  of  this  symbol  reported  by
435             sysconf() shall either be -1 or 200809L.
436
437       _POSIX2_SW_DEV
438             The  implementation  supports  the Software Development Utilities
439             option.  If this symbol is defined in  <unistd.h>,  it  shall  be
440             defined  to  be  -1,  0,  or  200809L.  The  value of this symbol
441             reported by sysconf() shall either be -1 or 200809L.
442
443       _POSIX2_UPE
444             The  implementation  supports  the  User  Portability   Utilities
445             option.   If  this  symbol  is defined in <unistd.h>, it shall be
446             defined to be -1,  0,  or  200809L.  The  value  of  this  symbol
447             reported by sysconf() shall either be -1 or 200809L.
448
449       _XOPEN_CRYPT
450             The implementation supports the X/Open Encryption Option Group.
451
452       _XOPEN_ENH_I18N
453             The  implementation  supports  the  Issue  4,  Version 2 Enhanced
454             Internationalization Option Group. This symbol  shall  always  be
455             set to a value other than -1.
456
457       _XOPEN_REALTIME
458             The implementation supports the X/Open Realtime Option Group.
459
460       _XOPEN_REALTIME_THREADS
461             The  implementation  supports  the X/Open Realtime Threads Option
462             Group.
463
464       _XOPEN_SHM
465             The implementation supports the Issue 4, Version 2 Shared  Memory
466             Option  Group.  This  symbol shall always be set to a value other
467             than -1.
468
469       _XOPEN_STREAMS
470             The implementation supports the XSI STREAMS Option Group.
471
472       _XOPEN_UNIX
473             The implementation supports the XSI option.
474
475       _XOPEN_UUCP
476             The implementation supports the UUCP Utilities  option.  If  this
477             symbol is defined in <unistd.h>, it shall be defined to be -1, 0,
478             or 200809L. The value of this symbol reported by sysconf()  shall
479             be either -1 or 200809L.
480
481   Execution-Time Symbolic Constants
482       If  any  of  the  following  symbolic  constants are not defined in the
483       <unistd.h> header, the value shall vary depending on the file to  which
484       it  is  applied. If defined, they shall have values suitable for use in
485       #if preprocessing directives.
486
487       If any of the following symbolic constants are defined to have value -1
488       in  the  <unistd.h>  header,  the  implementation shall not provide the
489       option on any file; if any are defined to have a value other than -1 in
490       the  <unistd.h>  header, the implementation shall provide the option on
491       all applicable files.
492
493       All of the following values, whether defined as symbolic  constants  in
494       <unistd.h> or not, may be queried with respect to a specific file using
495       the pathconf() or fpathconf() functions:
496
497       _POSIX_ASYNC_IO
498             Asynchronous input or output operations may be performed for  the
499             associated file.
500
501       _POSIX_PRIO_IO
502             Prioritized  input  or output operations may be performed for the
503             associated file.
504
505       _POSIX_SYNC_IO
506             Synchronized input or output operations may be performed for  the
507             associated file.
508
509       If  the  following  symbolic  constants  are  defined in the <unistd.h>
510       header, they apply to files and all paths in all file  systems  on  the
511       implementation:
512
513       _POSIX_TIMESTAMP_RESOLUTION
514             The resolution in nanoseconds for all file timestamps.
515
516       _POSIX2_SYMLINKS
517             Symbolic links can be created.
518
519   Constants for Functions
520       The <unistd.h> header shall define NULL as described in <stddef.h>.
521
522       The <unistd.h> header shall define the following symbolic constants for
523       use with the access() function. The values shall be suitable for use in
524       #if preprocessing directives.
525
526       F_OK        Test for existence of file.
527
528       R_OK        Test for read permission.
529
530       W_OK        Test for write permission.
531
532       X_OK        Test for execute (search) permission.
533
534       The constants F_OK, R_OK, W_OK, and X_OK and the expressions R_OK|W_OK,
535       R_OK|X_OK, and R_OK|W_OK|X_OK shall all have distinct values.
536
537       The <unistd.h> header shall define the following symbolic constants for
538       the confstr() function:
539
540       _CS_PATH
541             This  is  the  value for the PATH environment variable that finds
542             all of the standard utilities  that  are  provided  in  a  manner
543             accessible via the exec family of functions.
544
545       _CS_POSIX_V7_ILP32_OFF32_CFLAGS
546             If  sysconf(_SC_V7_ILP32_OFF32)  returns  -1, the meaning of this
547             value is unspecified. Otherwise, this value is the set of initial
548             options  to  be  given to the c99 utility to build an application
549             using a programming model with 32-bit  int,  long,  pointer,  and
550             off_t types.
551
552       _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
553             If  sysconf(_SC_V7_ILP32_OFF32)  returns  -1, the meaning of this
554             value is unspecified. Otherwise, this value is the set  of  final
555             options  to  be  given to the c99 utility to build an application
556             using a programming model with 32-bit  int,  long,  pointer,  and
557             off_t types.
558
559       _CS_POSIX_V7_ILP32_OFF32_LIBS
560             If  sysconf(_SC_V7_ILP32_OFF32)  returns  -1, the meaning of this
561             value is  unspecified.  Otherwise,  this  value  is  the  set  of
562             libraries  to be given to the c99 utility to build an application
563             using a programming model with 32-bit  int,  long,  pointer,  and
564             off_t types.
565
566       _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
567             If  sysconf(_SC_V7_ILP32_OFFBIG)  returns -1, the meaning of this
568             value is unspecified. Otherwise, this value is the set of initial
569             options  to  be  given to the c99 utility to build an application
570             using a programming model with  32-bit  int,  long,  and  pointer
571             types, and an off_t type using at least 64 bits.
572
573       _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
574             If  sysconf(_SC_V7_ILP32_OFFBIG)  returns -1, the meaning of this
575             value is unspecified. Otherwise, this value is the set  of  final
576             options  to  be  given to the c99 utility to build an application
577             using a programming model with  32-bit  int,  long,  and  pointer
578             types, and an off_t type using at least 64 bits.
579
580       _CS_POSIX_V7_ILP32_OFFBIG_LIBS
581             If  sysconf(_SC_V7_ILP32_OFFBIG)  returns -1, the meaning of this
582             value is  unspecified.  Otherwise,  this  value  is  the  set  of
583             libraries  to be given to the c99 utility to build an application
584             using a programming model with  32-bit  int,  long,  and  pointer
585             types, and an off_t type using at least 64 bits.
586
587       _CS_POSIX_V7_LP64_OFF64_CFLAGS
588             If  sysconf(_SC_V7_LP64_OFF64)  returns  -1,  the meaning of this
589             value is unspecified. Otherwise, this value is the set of initial
590             options  to  be  given to the c99 utility to build an application
591             using a programming  model  with  32-bit  int  and  64-bit  long,
592             pointer, and off_t types.
593
594       _CS_POSIX_V7_LP64_OFF64_LDFLAGS
595             If  sysconf(_SC_V7_LP64_OFF64)  returns  -1,  the meaning of this
596             value is unspecified. Otherwise, this value is the set  of  final
597             options  to  be  given to the c99 utility to build an application
598             using a programming  model  with  32-bit  int  and  64-bit  long,
599             pointer, and off_t types.
600
601       _CS_POSIX_V7_LP64_OFF64_LIBS
602             If  sysconf(_SC_V7_LP64_OFF64)  returns  -1,  the meaning of this
603             value is  unspecified.  Otherwise,  this  value  is  the  set  of
604             libraries  to be given to the c99 utility to build an application
605             using a programming  model  with  32-bit  int  and  64-bit  long,
606             pointer, and off_t types.
607
608       _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
609             If  sysconf(_SC_V7_LPBIG_OFFBIG)  returns -1, the meaning of this
610             value is unspecified. Otherwise, this value is the set of initial
611             options  to  be  given to the c99 utility to build an application
612             using a programming model with an int type using at least 32 bits
613             and long, pointer, and off_t types using at least 64 bits.
614
615       _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
616             If  sysconf(_SC_V7_LPBIG_OFFBIG)  returns -1, the meaning of this
617             value is unspecified. Otherwise, this value is the set  of  final
618             options  to  be  given to the c99 utility to build an application
619             using a programming model with an int type using at least 32 bits
620             and long, pointer, and off_t types using at least 64 bits.
621
622       _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
623             If  sysconf(_SC_V7_LPBIG_OFFBIG)  returns -1, the meaning of this
624             value is  unspecified.  Otherwise,  this  value  is  the  set  of
625             libraries  to be given to the c99 utility to build an application
626             using a programming model with an int type using at least 32 bits
627             and long, pointer, and off_t types using at least 64 bits.
628
629       _CS_POSIX_V7_THREADS_CFLAGS
630             If  sysconf(_SC_POSIX_THREADS)  returns  -1,  the meaning of this
631             value is unspecified. Otherwise, this value is the set of initial
632             options  to be given to the c99 utility to build a multi-threaded
633             application. These flags are in addition to those associated with
634             any  of  the  other  _CS_POSIX_V7_*_CFLAGS values used to specify
635             particular type size programing environments.
636
637       _CS_POSIX_V7_THREADS_LDFLAGS
638             If sysconf(_SC_POSIX_THREADS) returns -1,  the  meaning  of  this
639             value  is  unspecified. Otherwise, this value is the set of final
640             options to be given to the c99 utility to build a  multi-threaded
641             application. These flags are in addition to those associated with
642             any of the other _CS_POSIX_V7_*_LDFLAGS values  used  to  specify
643             particular type size programing environments.
644
645       _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
646             This  value is a <newline>-separated list of names of programming
647             environments supported by the implementation in which the  widths
648             of the blksize_t, cc_t, mode_t, nfds_t, pid_t, ptrdiff_t, size_t,
649             speed_t, ssize_t,  suseconds_t,  tcflag_t,  wchar_t,  and  wint_t
650             types  are no greater than the width of type long.  The format of
651             each name shall be suitable for use with the getconf -v option.
652
653       _CS_V7_ENV
654             This is the value that provides the environment variable informa‐
655             tion  (other  than that provided by _CS_PATH) that is required by
656             the  implementation  to  create  a  conforming  environment,   as
657             described in the implementation's conformance documentation.
658
659       The  following  symbolic  constants are reserved for compatibility with
660       Issue 6:
661
662       _CS_POSIX_V6_ILP32_OFF32_CFLAGS
663       _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
664       _CS_POSIX_V6_ILP32_OFF32_LIBS
665       _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
666       _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
667       _CS_POSIX_V6_ILP32_OFFBIG_LIBS
668       _CS_POSIX_V6_LP64_OFF64_CFLAGS
669       _CS_POSIX_V6_LP64_OFF64_LDFLAGS
670       _CS_POSIX_V6_LP64_OFF64_LIBS
671       _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
672       _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
673       _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
674       _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS
675       _CS_V6_ENV
676
677       The <unistd.h> header shall define SEEK_CUR, SEEK_END, and SEEK_SET  as
678       described in <stdio.h>.
679
680       The  <unistd.h> header shall define the following symbolic constants as
681       possible values for the function argument to the lockf() function:
682
683       F_LOCK      Lock a section for exclusive use.
684
685       F_TEST      Test section for locks by other processes.
686
687       F_TLOCK     Test and lock a section for exclusive use.
688
689       F_ULOCK     Unlock locked sections.
690
691       The <unistd.h> header shall define the following symbolic constants for
692       pathconf():
693
694       _PC_2_SYMLINKS
695       _PC_ALLOC_SIZE_MIN
696       _PC_ASYNC_IO
697       _PC_CHOWN_RESTRICTED
698       _PC_FILESIZEBITS
699       _PC_LINK_MAX
700       _PC_MAX_CANON
701       _PC_MAX_INPUT
702       _PC_NAME_MAX
703       _PC_NO_TRUNC
704       _PC_PATH_MAX
705       _PC_PIPE_BUF
706       _PC_PRIO_IO
707       _PC_REC_INCR_XFER_SIZE
708       _PC_REC_MAX_XFER_SIZE
709       _PC_REC_MIN_XFER_SIZE
710       _PC_REC_XFER_ALIGN
711       _PC_SYMLINK_MAX
712       _PC_SYNC_IO
713       _PC_TIMESTAMP_RESOLUTION
714       _PC_VDISABLE
715
716       The <unistd.h> header shall define the following symbolic constants for
717       sysconf():
718
719       _SC_2_C_BIND
720       _SC_2_C_DEV
721       _SC_2_CHAR_TERM
722       _SC_2_FORT_DEV
723       _SC_2_FORT_RUN
724       _SC_2_LOCALEDEF
725       _SC_2_PBS
726       _SC_2_PBS_ACCOUNTING
727       _SC_2_PBS_CHECKPOINT
728       _SC_2_PBS_LOCATE
729       _SC_2_PBS_MESSAGE
730       _SC_2_PBS_TRACK
731       _SC_2_SW_DEV
732       _SC_2_UPE
733       _SC_2_VERSION
734       _SC_ADVISORY_INFO
735       _SC_AIO_LISTIO_MAX
736       _SC_AIO_MAX
737       _SC_AIO_PRIO_DELTA_MAX
738       _SC_ARG_MAX
739       _SC_ASYNCHRONOUS_IO
740       _SC_ATEXIT_MAX
741       _SC_BARRIERS
742       _SC_BC_BASE_MAX
743       _SC_BC_DIM_MAX
744       _SC_BC_SCALE_MAX
745       _SC_BC_STRING_MAX
746       _SC_CHILD_MAX
747       _SC_CLK_TCK
748       _SC_CLOCK_SELECTION
749       _SC_COLL_WEIGHTS_MAX
750       _SC_CPUTIME
751       _SC_DELAYTIMER_MAX
752       _SC_EXPR_NEST_MAX
753       _SC_FSYNC
754       _SC_GETGR_R_SIZE_MAX
755       _SC_GETPW_R_SIZE_MAX
756       _SC_HOST_NAME_MAX
757       _SC_IOV_MAX
758       _SC_IPV6
759       _SC_JOB_CONTROL
760       _SC_LINE_MAX
761       _SC_LOGIN_NAME_MAX
762       _SC_MAPPED_FILES
763       _SC_MEMLOCK
764       _SC_MEMLOCK_RANGE
765       _SC_MEMORY_PROTECTION
766       _SC_MESSAGE_PASSING
767       _SC_MONOTONIC_CLOCK
768       _SC_MQ_OPEN_MAX
769       _SC_MQ_PRIO_MAX
770       _SC_NGROUPS_MAX
771       _SC_OPEN_MAX
772       _SC_PAGE_SIZE
773       _SC_PAGESIZE
774       _SC_PRIORITIZED_IO
775       _SC_PRIORITY_SCHEDULING
776       _SC_RAW_SOCKETS
777       _SC_RE_DUP_MAX
778       _SC_READER_WRITER_LOCKS
779       _SC_REALTIME_SIGNALS
780       _SC_REGEXP
781       _SC_RTSIG_MAX
782       _SC_SAVED_IDS
783       _SC_SEM_NSEMS_MAX
784       _SC_SEM_VALUE_MAX
785       _SC_SEMAPHORES
786       _SC_SHARED_MEMORY_OBJECTS
787       _SC_SHELL
788       _SC_SIGQUEUE_MAX
789       _SC_SPAWN
790       _SC_SPIN_LOCKS
791       _SC_SPORADIC_SERVER
792       _SC_SS_REPL_MAX
793       _SC_STREAM_MAX
794       _SC_SYMLOOP_MAX
795       _SC_SYNCHRONIZED_IO
796       _SC_THREAD_ATTR_STACKADDR
797       _SC_THREAD_ATTR_STACKSIZE
798       _SC_THREAD_CPUTIME
799       _SC_THREAD_DESTRUCTOR_ITERATIONS
800       _SC_THREAD_KEYS_MAX
801       _SC_THREAD_PRIO_INHERIT
802       _SC_THREAD_PRIO_PROTECT
803       _SC_THREAD_PRIORITY_SCHEDULING
804       _SC_THREAD_PROCESS_SHARED
805       _SC_THREAD_ROBUST_PRIO_INHERIT
806       _SC_THREAD_ROBUST_PRIO_PROTECT
807       _SC_THREAD_SAFE_FUNCTIONS
808       _SC_THREAD_SPORADIC_SERVER
809       _SC_THREAD_STACK_MIN
810       _SC_THREAD_THREADS_MAX
811       _SC_THREADS
812       _SC_TIMEOUTS
813       _SC_TIMER_MAX
814       _SC_TIMERS
815       _SC_TRACE
816       _SC_TRACE_EVENT_FILTER
817       _SC_TRACE_EVENT_NAME_MAX
818       _SC_TRACE_INHERIT
819       _SC_TRACE_LOG
820       _SC_TRACE_NAME_MAX
821       _SC_TRACE_SYS_MAX
822       _SC_TRACE_USER_EVENT_MAX
823       _SC_TTY_NAME_MAX
824       _SC_TYPED_MEMORY_OBJECTS
825       _SC_TZNAME_MAX
826       _SC_V7_ILP32_OFF32
827       _SC_V7_ILP32_OFFBIG
828       _SC_V7_LP64_OFF64
829       _SC_V7_LPBIG_OFFBIG
830       _SC_V6_ILP32_OFF32
831       _SC_V6_ILP32_OFFBIG
832       _SC_V6_LP64_OFF64
833       _SC_V6_LPBIG_OFFBIG
834       _SC_VERSION
835       _SC_XOPEN_CRYPT
836       _SC_XOPEN_ENH_I18N
837       _SC_XOPEN_REALTIME
838       _SC_XOPEN_REALTIME_THREADS
839       _SC_XOPEN_SHM
840       _SC_XOPEN_STREAMS
841       _SC_XOPEN_UNIX
842       _SC_XOPEN_UUCP
843       _SC_XOPEN_VERSION
844
845       The two constants _SC_PAGESIZE and _SC_PAGE_SIZE may be defined to have
846       the same value.
847
848       The <unistd.h> header shall define the following symbolic constants for
849       file streams:
850
851       STDERR_FILENO File number of stderr; 2.
852
853       STDIN_FILENO  File number of stdin; 0.
854
855       STDOUT_FILENO File number of stdout; 1.
856
857       The <unistd.h> header shall define the following symbolic constant  for
858       terminal special character handling:
859
860       _POSIX_VDISABLE
861                     This symbol shall be defined to be the value of a charac‐
862                     ter that shall disable terminal  special  character  han‐
863                     dling  as  described  in  Section 11.2.6, Special Control
864                     Characters.  This symbol shall always be set to  a  value
865                     other than -1.
866
867   Type Definitions
868       The  <unistd.h>  header shall define the size_t, ssize_t, uid_t, gid_t,
869       off_t, and pid_t types as described in <sys/types.h>.
870
871       The <unistd.h> header shall define the intptr_t type  as  described  in
872       <stdint.h>.
873
874   Declarations
875       The following shall be declared as functions and may also be defined as
876       macros. Function prototypes shall be provided.
877
878
879           int          access(const char *, int);
880           unsigned     alarm(unsigned);
881           int          chdir(const char *);
882           int          chown(const char *, uid_t, gid_t);
883           int          close(int);
884           size_t       confstr(int, char *, size_t);
885           char        *crypt(const char *, const char *);
886           int          dup(int);
887           int          dup2(int, int);
888           void         _exit(int);
889           void         encrypt(char [64], int);
890           int          execl(const char *, const char *, ...);
891           int          execle(const char *, const char *, ...);
892           int          execlp(const char *, const char *, ...);
893           int          execv(const char *, char *const []);
894           int          execve(const char *, char *const [], char *const []);
895           int          execvp(const char *, char *const []);
896           int          faccessat(int, const char *, int, int);
897           int          fchdir(int);
898           int          fchown(int, uid_t, gid_t);
899           int          fchownat(int, const char *, uid_t, gid_t, int);
900           int          fdatasync(int);
901           int          fexecve(int, char *const [], char *const []);
902           pid_t        fork(void);
903           long         fpathconf(int, int);
904           int          fsync(int);
905           int          ftruncate(int, off_t);
906           char        *getcwd(char *, size_t);
907           gid_t        getegid(void);
908           uid_t        geteuid(void);
909           gid_t        getgid(void);
910           int          getgroups(int, gid_t []);
911           long         gethostid(void);
912           int          gethostname(char *, size_t);
913           char        *getlogin(void);
914           int          getlogin_r(char *, size_t);
915           int          getopt(int, char * const [], const char *);
916           pid_t        getpgid(pid_t);
917           pid_t        getpgrp(void);
918           pid_t        getpid(void);
919           pid_t        getppid(void);
920           pid_t        getsid(pid_t);
921           uid_t        getuid(void);
922           int          isatty(int);
923           int          lchown(const char *, uid_t, gid_t);
924           int          link(const char *, const char *);
925           int          linkat(int, const char *, int, const char *, int);
926           int          lockf(int, int, off_t);
927           off_t        lseek(int, off_t, int);
928           int          nice(int);
929           long         pathconf(const char *, int);
930           int          pause(void);
931           int          pipe(int [2]);
932           ssize_t      pread(int, void *, size_t, off_t);
933           ssize_t      pwrite(int, const void *, size_t, off_t);
934           ssize_t      read(int, void *, size_t);
935           ssize_t      readlink(const char *restrict, char *restrict, size_t);
936           ssize_t      readlinkat(int, const char *restrict, char *restrict, size_t);
937           int          rmdir(const char *);
938           int          setegid(gid_t);
939           int          seteuid(uid_t);
940           int          setgid(gid_t);
941           int          setpgid(pid_t, pid_t);
942           pid_t        setpgrp(void);
943           int          setregid(gid_t, gid_t);
944           int          setreuid(uid_t, uid_t);
945           pid_t        setsid(void);
946           int          setuid(uid_t);
947           unsigned     sleep(unsigned);
948           void         swab(const void *restrict, void *restrict, ssize_t);
949           int          symlink(const char *, const char *);
950           int          symlinkat(const char *, int, const char *);
951           void         sync(void);
952           long         sysconf(int);
953           pid_t        tcgetpgrp(int);
954           int          tcsetpgrp(int, pid_t);
955           int          truncate(const char *, off_t);
956           char        *ttyname(int);
957           int          ttyname_r(int, char *, size_t);
958           int          unlink(const char *);
959           int          unlinkat(int, const char *, int);
960           ssize_t      write(int, const void *, size_t);
961
962       Implementations may also  include  the  pthread_atfork()  prototype  as
963       defined in <pthread.h>.  Implementations may also include the ctermid()
964       prototype as defined in <stdio.h>.
965
966       The <unistd.h> header shall declare the following external variables:
967
968
969           extern char  *optarg;
970           extern int    opterr, optind, optopt;
971
972       Inclusion of the <unistd.h> header may make visible  all  symbols  from
973       the headers <stddef.h>, <stdint.h>, and <stdio.h>.
974
975       The following sections are informative.
976

APPLICATION USAGE

978       POSIX.1‐2008  only describes the behavior of systems that claim confor‐
979       mance to it. However, application developers who want to write applica‐
980       tions that adapt to other versions of this standard (or to systems that
981       do not conform to any POSIX standard) may find it useful to  code  them
982       so as to conditionally compile different code depending on the value of
983       _POSIX_VERSION, for example:
984
985
986           #if _POSIX_VERSION >= 200112L
987           /* Use the newer function that copes with large files. */
988           off_t pos=ftello(fp);
989           #else
990           /* Either this is an old version of POSIX, or _POSIX_VERSION is
991              not even defined, so use the traditional function. */
992           long pos=ftell(fp);
993           #endif
994
995       Earlier versions of POSIX.1‐2008 and of the Single  UNIX  Specification
996       can be identified by the following macros:
997
998       POSIX.1‐1988 standard
999             _POSIX_VERSION==198808L
1000
1001       POSIX.1‐1990 standard
1002             _POSIX_VERSION==199009L
1003
1004       ISO POSIX‐1:1996 standard
1005             _POSIX_VERSION==199506L
1006
1007       Single UNIX Specification, Version 1
1008             _XOPEN_UNIX and _XOPEN_VERSION==4
1009
1010       Single UNIX Specification, Version 2
1011             _XOPEN_UNIX and _XOPEN_VERSION==500
1012
1013       ISO POSIX‐1:2001 and Single UNIX Specification, Version 3
1014             _POSIX_VERSION==200112L,  plus  (if  the XSI option is supported)
1015             _XOPEN_UNIX and _XOPEN_VERSION==600
1016
1017       POSIX.1‐2008 does not make any attempt  to  define  application  binary
1018       interaction  with the underlying operating system. However, application
1019       developers may find it useful  to  query  _SC_VERSION  at  runtime  via
1020       sysconf()  to  determine  whether  the current version of the operating
1021       system supports the necessary functionality as in the following program
1022       fragment:
1023
1024
1025           if (sysconf(_SC_VERSION) < 200809L) {
1026               fprintf(stderr, "POSIX.1-2008 system required, terminating \n");
1027               exit(1);
1028           }
1029
1030       New applications should not use _XOPEN_SHM or _XOPEN_ENH_I18N.
1031

RATIONALE

1033       As  POSIX.1‐2008 evolved, certain options became sufficiently standard‐
1034       ized that it was concluded that simply  requiring  one  of  the  option
1035       choices  was simpler than retaining the option. However, for backwards-
1036       compatibility, the option flags (with  required  constant  values)  are
1037       retained.
1038
1039   Version Test Macros
1040       The   standard   developers   considered  altering  the  definition  of
1041       _POSIX_VERSION and  removing  _SC_VERSION  from  the  specification  of
1042       sysconf()  since the utility to an application was deemed by some to be
1043       minimal, and since the implementation of the  functionality  is  poten‐
1044       tially  problematic. However, they recognized that support for existing
1045       application binaries is a concern to manufacturers, application  devel‐
1046       opers, and the users of implementations conforming to POSIX.1‐2008.
1047
1048       While  the  example  using _SC_VERSION in the APPLICATION USAGE section
1049       does not provide the greatest  degree  of  imaginable  utility  to  the
1050       application  developer  or user, it is arguably better than a core file
1051       or some other equally obscure result. (It is also possible  for  imple‐
1052       mentations  to  encode  and  recognize application binaries compiled in
1053       various POSIX.1-conforming environments, and modify  the  semantics  of
1054       the  underlying  system  to conform to the expectations of the applica‐
1055       tion.) For the reasons outlined in the preceding paragraphs and in  the
1056       APPLICATION  USAGE  section,  the standard developers elected to retain
1057       the _POSIX_VERSION and _SC_VERSION functionality.
1058
1059   Compile-Time Symbolic Constants for System-Wide Options
1060       POSIX.1‐2008 includes support in certain areas for  the  newly  adopted
1061       policy governing options and stubs.
1062
1063       This  policy  provides flexibility for implementations in how they sup‐
1064       port options. It also specifies how conforming applications  can  adapt
1065       to different implementations that support different sets of options. It
1066       allows the following:
1067
1068        1. If an implementation has no interest in supporting  an  option,  it
1069           does  not  have  to  provide  anything  associated with that option
1070           beyond the announcement that it does not support it.
1071
1072        2. An implementation can support a partial or incompatible version  of
1073           an  option  (as  a  non-standard  extension) as long as it does not
1074           claim to support the option.
1075
1076        3. An application can determine whether the  option  is  supported.  A
1077           strictly conforming application must check this announcement mecha‐
1078           nism before first using anything associated with the option.
1079
1080       There is an important implication of this policy.  POSIX.1‐2008  cannot
1081       dictate  the  behavior of interfaces associated with an option when the
1082       implementation does not claim to support the option. In particular,  it
1083       cannot  require  that  a function associated with an unsupported option
1084       will fail if it does not perform as  specified.  However,  this  policy
1085       does  not prevent a standard from requiring certain functions to always
1086       be present, but that they shall always fail  on  some  implementations.
1087       The  setpgid()  function  in the POSIX.1‐1990 standard, for example, is
1088       considered appropriate.
1089
1090       The POSIX standards include various options, and the C-language binding
1091       support  for an option implies that the implementation must supply data
1092       types and function interfaces. An application must be able to  discover
1093       whether the implementation supports each option.
1094
1095       Any  application  must  consider  the  following  three  cases for each
1096       option:
1097
1098        1. Option never supported.
1099
1100           The implementation advertises at compile time that the option  will
1101           never  be  supported.  In  this  case,  it is not necessary for the
1102           implementation to supply any of the data types or  function  inter‐
1103           faces that are provided only as part of the option. The implementa‐
1104           tion might provide data types and functions  that  are  similar  to
1105           those  defined  by  POSIX.1‐2008, but there is no guarantee for any
1106           particular behavior.
1107
1108        2. Option always supported.
1109
1110           The implementation advertises at compile time that the option  will
1111           always  be  supported.  In  this  case, all data types and function
1112           interfaces shall be available and shall operate as specified.
1113
1114        3. Option might or might not be supported.
1115
1116           Some implementations might not provide a mechanism to specify  sup‐
1117           port  of  options  at compile time. In addition, the implementation
1118           might be unable or unwilling to specify support or  non-support  at
1119           compile  time.   In either case, any application that might use the
1120           option at runtime must be able to compile and execute.  The  imple‐
1121           mentation  must  provide, at compile time, all data types and func‐
1122           tion interfaces that are necessary to allow this.  In  this  situa‐
1123           tion,  there  must  be  a  mechanism that allows the application to
1124           query, at runtime, whether the option is supported. If the applica‐
1125           tion  attempts  to  use  the  option  when it is not supported, the
1126           result is unspecified  unless  explicitly  specified  otherwise  in
1127           POSIX.1‐2008.
1128

FUTURE DIRECTIONS

1130       None.
1131

SEE ALSO

1133       <limits.h>,    <stddef.h>,   <stdint.h>,   <stdio.h>,   <sys_socket.h>,
1134       <sys_types.h>, <termios.h>, <wctype.h>
1135
1136       The System Interfaces volume of POSIX.1‐2017, access(), alarm(),
1137       chown(), close(), confstr(), crypt(), ctermid(), dup(), _Exit(),
1138       encrypt(), exec, fchdir(), fchown(), fdatasync(), fork(), fpathconf(),
1139       fsync(), ftruncate(), getcwd(), getegid(), geteuid(), getgid(), get‐
1140       groups(), gethostid(), gethostname(), getlogin(), getopt(), getpgid(),
1141       getpgrp(), getpid(), getppid(), getsid(), getuid(), isatty(), lchown(),
1142       link(), lockf(), lseek(), nice(), pause(), pipe(), read(), readlink(),
1143       rmdir(), setegid(), seteuid(), setgid(), setpgid(), setpgrp(),
1144       setregid(), setreuid(), setsid(), setuid(), sleep(), swab(), symlink(),
1145       sync(), sysconf(), tcgetpgrp(), tcsetpgrp(), truncate(), ttyname(),
1146       unlink(), write()
1147
1149       Portions of this text are reprinted and reproduced in  electronic  form
1150       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
1151       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
1152       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
1153       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
1154       event of any discrepancy between this version and the original IEEE and
1155       The Open Group Standard, the original IEEE and The Open Group  Standard
1156       is  the  referee document. The original Standard can be obtained online
1157       at http://www.opengroup.org/unix/online.html .
1158
1159       Any typographical or formatting errors that appear  in  this  page  are
1160       most likely to have been introduced during the conversion of the source
1161       files to man page format. To report such errors,  see  https://www.ker
1162       nel.org/doc/man-pages/reporting_bugs.html .
1163
1164
1165
1166IEEE/The Open Group                  2017                         unistd.h(0P)
Impressum