]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man0p/unistd.h.0p
Import of man-pages 1.70
[thirdparty/man-pages.git] / man0p / unistd.h.0p
1 .\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
2 .TH "<unistd.h>" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
3 .\" <unistd.h>
4 .SH NAME
5 unistd.h \- standard symbolic constants and types
6 .SH SYNOPSIS
7 .LP
8 \fB#include <unistd.h>\fP
9 .SH DESCRIPTION
10 .LP
11 The \fI<unistd.h>\fP header defines miscellaneous symbolic constants
12 and types, and declares miscellaneous functions. The
13 actual values of the constants are unspecified except as shown. The
14 contents of this header are shown below.
15 .SS Version Test Macros
16 .LP
17 The following symbolic constants shall be defined:
18 .TP 7
19 _POSIX_VERSION
20 Integer value indicating version of IEEE\ Std\ 1003.1 (C-language
21 binding) to which the implementation conforms. For
22 implementations conforming to IEEE\ Std\ 1003.1-2001, the value shall
23 be 200112L.
24 .TP 7
25 _POSIX2_VERSION
26 Integer value indicating version of the Shell and Utilities volume
27 of IEEE\ Std\ 1003.1 to which the implementation
28 conforms. For implementations conforming to IEEE\ Std\ 1003.1-2001,
29 the value shall be 200112L.
30 .sp
31 .LP
32 The following symbolic constant shall be defined only if the implementation
33 supports the XSI option; see \fIXSI Conformance\fP .
34 .TP 7
35 _XOPEN_VERSION
36 .sp
37 Integer value indicating version of the X/Open Portability Guide to
38 which the implementation conforms. The value shall be 600.
39 .sp
40 .SS Constants for Options and Option Groups
41 .LP
42 The following symbolic constants, if defined in \fI<unistd.h>\fP,
43 shall have a value of -1, 0, or greater, unless
44 otherwise specified below. If these are undefined, the \fIfpathconf\fP(),
45 \fIpathconf\fP(), or \fIsysconf\fP() functions can be
46 used to determine whether the option is provided for a particular
47 invocation of the application.
48 .LP
49 If a symbolic constant is defined with the value -1, the option is
50 not supported. Headers, data types, and function interfaces
51 required only for the option need not be supplied. An application
52 that attempts to use anything associated only with the option is
53 considered to be requiring an extension.
54 .LP
55 If a symbolic constant is defined with a value greater than zero,
56 the option shall always be supported when the application is
57 executed. All headers, data types, and functions shall be present
58 and shall operate as specified.
59 .LP
60 If a symbolic constant is defined with the value zero, all headers,
61 data types, and functions shall be present. The application
62 can check at runtime to see whether the option is supported by calling
63 \fIfpathconf\fP(), \fIpathconf\fP(), or \fIsysconf\fP() with the indicated
64 \fIname\fP parameter.
65 .LP
66 Unless explicitly specified otherwise, the behavior of functions associated
67 with an unsupported option is unspecified, and an
68 application that uses such functions without first checking \fIfpathconf\fP(),
69 \fIpathconf\fP(), or \fIsysconf\fP() is considered to be
70 requiring an extension.
71 .LP
72 For conformance requirements, refer to \fIConformance\fP .
73 .TP 7
74 _POSIX_ADVISORY_INFO
75 .sp
76 The implementation supports the Advisory Information option. If this
77 symbol has a value other than -1 or 0, it shall have the value
78 200112L.
79 .TP 7
80 _POSIX_ASYNCHRONOUS_IO
81 .sp
82 The implementation supports the Asynchronous Input and Output option.
83 If this symbol has a value other than -1 or 0, it shall have
84 the value 200112L.
85 .TP 7
86 _POSIX_BARRIERS
87 .sp
88 The implementation supports the Barriers option. If this symbol has
89 a value other than -1 or 0, it shall have the value 200112L.
90 .TP 7
91 _POSIX_CHOWN_RESTRICTED
92 The use of \fIchown\fP() and \fIfchown\fP() is
93 restricted to a process with appropriate privileges, and to changing
94 the group ID of a file only to the effective group ID of the
95 process or to one of its supplementary group IDs. This symbol shall
96 always be set to a value other than -1.
97 .TP 7
98 _POSIX_CLOCK_SELECTION
99 .sp
100 The implementation supports the Clock Selection option. If this symbol
101 has a value other than -1 or 0, it shall have the value
102 200112L.
103 .TP 7
104 _POSIX_CPUTIME
105 .sp
106 The implementation supports the Process CPU-Time Clocks option. If
107 this symbol has a value other than -1 or 0, it shall have the
108 value 200112L.
109 .TP 7
110 _POSIX_FSYNC
111 .sp
112 The implementation supports the File Synchronization option. If this
113 symbol has a value other than -1 or 0, it shall have the value
114 200112L.
115 .TP 7
116 _POSIX_IPV6
117 The implementation supports the IPv6 option. If this symbol has a
118 value other than -1 or 0, it shall have the value 200112L.
119 .TP 7
120 _POSIX_JOB_CONTROL
121 The implementation supports job control. This symbol shall always
122 be set to a value greater than zero.
123 .TP 7
124 _POSIX_MAPPED_FILES
125 .sp
126 The implementation supports the Memory Mapped Files option. If this
127 symbol has a value other than -1 or 0, it shall have the value
128 200112L.
129 .TP 7
130 _POSIX_MEMLOCK
131 .sp
132 The implementation supports the Process Memory Locking option. If
133 this symbol has a value other than -1 or 0, it shall have the
134 value 200112L.
135 .TP 7
136 _POSIX_MEMLOCK_RANGE
137 .sp
138 The implementation supports the Range Memory Locking option. If this
139 symbol has a value other than -1 or 0, it shall have the value
140 200112L.
141 .TP 7
142 _POSIX_MEMORY_PROTECTION
143 .sp
144 The implementation supports the Memory Protection option. If this
145 symbol has a value other than -1 or 0, it shall have the value
146 200112L.
147 .TP 7
148 _POSIX_MESSAGE_PASSING
149 .sp
150 The implementation supports the Message Passing option. If this symbol
151 has a value other than -1 or 0, it shall have the value
152 200112L.
153 .TP 7
154 _POSIX_MONOTONIC_CLOCK
155 .sp
156 The implementation supports the Monotonic Clock option. If this symbol
157 has a value other than -1 or 0, it shall have the value
158 200112L.
159 .TP 7
160 _POSIX_NO_TRUNC
161 Pathname components longer than {NAME_MAX} generate an error. This
162 symbol shall always be set to a value other than -1.
163 .TP 7
164 _POSIX_PRIORITIZED_IO
165 .sp
166 The implementation supports the Prioritized Input and Output option.
167 If this symbol has a value other than -1 or 0, it shall have
168 the value 200112L.
169 .TP 7
170 _POSIX_PRIORITY_SCHEDULING
171 .sp
172 The implementation supports the Process Scheduling option. If this
173 symbol has a value other than -1 or 0, it shall have the value
174 200112L.
175 .TP 7
176 _POSIX_RAW_SOCKETS
177 .sp
178 The implementation supports the Raw Sockets option. If this symbol
179 has a value other than -1 or 0, it shall have the value 200112L.
180 .TP 7
181 _POSIX_READER_WRITER_LOCKS
182 .sp
183 The implementation supports the Read-Write Locks option. This is always
184 set to a value greater than zero if the Threads option is
185 supported. If this symbol has a value other than -1 or 0, it shall
186 have the value 200112L.
187 .TP 7
188 _POSIX_REALTIME_SIGNALS
189 .sp
190 The implementation supports the Realtime Signals Extension option.
191 If this symbol has a value other than -1 or 0, it shall have the
192 value 200112L.
193 .TP 7
194 _POSIX_REGEXP
195 The implementation supports the Regular Expression Handling option.
196 This symbol shall always be set to a value greater than
197 zero.
198 .TP 7
199 _POSIX_SAVED_IDS
200 Each process has a saved set-user-ID and a saved set-group-ID. This
201 symbol shall always be set to a value greater than zero.
202 .TP 7
203 _POSIX_SEMAPHORES
204 .sp
205 The implementation supports the Semaphores option. If this symbol
206 has a value other than -1 or 0, it shall have the value 200112L.
207 .TP 7
208 _POSIX_SHARED_MEMORY_OBJECTS
209 .sp
210 The implementation supports the Shared Memory Objects option. If this
211 symbol has a value other than -1 or 0, it shall have the
212 value 200112L.
213 .TP 7
214 _POSIX_SHELL
215 The implementation supports the POSIX shell. This symbol shall always
216 be set to a value greater than zero.
217 .TP 7
218 _POSIX_SPAWN
219 .sp
220 The implementation supports the Spawn option. If this symbol has a
221 value other than -1 or 0, it shall have the value 200112L.
222 .TP 7
223 _POSIX_SPIN_LOCKS
224 .sp
225 The implementation supports the Spin Locks option. If this symbol
226 has a value other than -1 or 0, it shall have the value 200112L.
227 .TP 7
228 _POSIX_SPORADIC_SERVER
229 .sp
230 The implementation supports the Process Sporadic Server option. If
231 this symbol has a value other than -1 or 0, it shall have the
232 value 200112L.
233 .TP 7
234 _POSIX_SYNCHRONIZED_IO
235 .sp
236 The implementation supports the Synchronized Input and Output option.
237 If this symbol has a value other than -1 or 0, it shall have
238 the value 200112L.
239 .TP 7
240 _POSIX_THREAD_ATTR_STACKADDR
241 .sp
242 The implementation supports the Thread Stack Address Attribute option.
243 If this symbol has a value other than -1 or 0, it shall have
244 the value 200112L.
245 .TP 7
246 _POSIX_THREAD_ATTR_STACKSIZE
247 .sp
248 The implementation supports the Thread Stack Size Attribute option.
249 If this symbol has a value other than -1 or 0, it shall have
250 the value 200112L.
251 .TP 7
252 _POSIX_THREAD_CPUTIME
253 .sp
254 The implementation supports the Thread CPU-Time Clocks option. If
255 this symbol has a value other than -1 or 0, it shall have the
256 value 200112L.
257 .TP 7
258 _POSIX_THREAD_PRIO_INHERIT
259 .sp
260 The implementation supports the Thread Priority Inheritance option.
261 If this symbol has a value other than -1 or 0, it shall have
262 the value 200112L.
263 .TP 7
264 _POSIX_THREAD_PRIO_PROTECT
265 .sp
266 The implementation supports the Thread Priority Protection option.
267 If this symbol has a value other than -1 or 0, it shall have the
268 value 200112L.
269 .TP 7
270 _POSIX_THREAD_PRIORITY_SCHEDULING
271 .sp
272 The implementation supports the Thread Execution Scheduling option.
273 If this symbol has a value other than -1 or 0, it shall have
274 the value 200112L.
275 .TP 7
276 _POSIX_THREAD_PROCESS_SHARED
277 .sp
278 The implementation supports the Thread Process-Shared Synchronization
279 option. If this symbol has a value other than -1 or 0, it
280 shall have the value 200112L.
281 .TP 7
282 _POSIX_THREAD_SAFE_FUNCTIONS
283 .sp
284 The implementation supports the Thread-Safe Functions option. If this
285 symbol has a value other than -1 or 0, it shall have the
286 value 200112L.
287 .TP 7
288 _POSIX_THREAD_SPORADIC_SERVER
289 .sp
290 The implementation supports the Thread Sporadic Server option. If
291 this symbol has a value other than -1 or 0, it shall have the
292 value 200112L.
293 .TP 7
294 _POSIX_THREADS
295 .sp
296 The implementation supports the Threads option. If this symbol has
297 a value other than -1 or 0, it shall have the value 200112L.
298 .TP 7
299 _POSIX_TIMEOUTS
300 .sp
301 The implementation supports the Timeouts option. If this symbol has
302 a value other than -1 or 0, it shall have the value 200112L.
303 .TP 7
304 _POSIX_TIMERS
305 .sp
306 The implementation supports the Timers option. If this symbol has
307 a value other than -1 or 0, it shall have the value 200112L.
308 .TP 7
309 _POSIX_TRACE
310 .sp
311 The implementation supports the Trace option. If this symbol has a
312 value other than -1 or 0, it shall have the value 200112L.
313 .TP 7
314 _POSIX_TRACE_EVENT_FILTER
315 .sp
316 The implementation supports the Trace Event Filter option. If this
317 symbol has a value other than -1 or 0, it shall have the value
318 200112L.
319 .TP 7
320 _POSIX_TRACE_INHERIT
321 .sp
322 The implementation supports the Trace Inherit option. If this symbol
323 has a value other than -1 or 0, it shall have the value
324 200112L.
325 .TP 7
326 _POSIX_TRACE_LOG
327 .sp
328 The implementation supports the Trace Log option. If this symbol has
329 a value other than -1 or 0, it shall have the value 200112L.
330 .TP 7
331 _POSIX_TYPED_MEMORY_OBJECTS
332 .sp
333 The implementation supports the Typed Memory Objects option. If this
334 symbol has a value other than -1 or 0, it shall have the value
335 200112L.
336 .TP 7
337 _POSIX_VDISABLE
338 This symbol shall be defined to be the value of a character that shall
339 disable terminal special character handling as described in
340 \fI<termios.h>\fP . This symbol shall always be set to a value other
341 than -1.
342 .TP 7
343 _POSIX2_C_BIND
344 The implementation supports the C-Language Binding option. This symbol
345 shall always have the value 200112L.
346 .TP 7
347 _POSIX2_C_DEV
348 .sp
349 The implementation supports the C-Language Development Utilities option.
350 If this symbol has a value other than -1 or 0, it shall
351 have the value 200112L.
352 .TP 7
353 _POSIX2_CHAR_TERM
354 The implementation supports at least one terminal type.
355 .TP 7
356 _POSIX2_FORT_DEV
357 .sp
358 The implementation supports the FORTRAN Development Utilities option.
359 If this symbol has a value other than -1 or 0, it shall have
360 the value 200112L.
361 .TP 7
362 _POSIX2_FORT_RUN
363 .sp
364 The implementation supports the FORTRAN Runtime Utilities option.
365 If this symbol has a value other than -1 or 0, it shall have the
366 value 200112L.
367 .TP 7
368 _POSIX2_LOCALEDEF
369 The implementation supports the creation of locales by the \fIlocaledef\fP
370 utility. If
371 this symbol has a value other than -1 or 0, it shall have the value
372 200112L.
373 .TP 7
374 _POSIX2_PBS
375 .sp
376 The implementation supports the Batch Environment Services and Utilities
377 option. If this symbol has a value other than -1 or 0, it
378 shall have the value 200112L.
379 .TP 7
380 _POSIX2_PBS_ACCOUNTING
381 .sp
382 The implementation supports the Batch Accounting option. If this symbol
383 has a value other than -1 or 0, it shall have the value
384 200112L.
385 .TP 7
386 _POSIX2_PBS_CHECKPOINT
387 .sp
388 The implementation supports the Batch Checkpoint/Restart option. If
389 this symbol has a value other than -1 or 0, it shall have the
390 value 200112L.
391 .TP 7
392 _POSIX2_PBS_LOCATE
393 .sp
394 The implementation supports the Locate Batch Job Request option. If
395 this symbol has a value other than -1 or 0, it shall have the
396 value 200112L.
397 .TP 7
398 _POSIX2_PBS_MESSAGE
399 .sp
400 The implementation supports the Batch Job Message Request option.
401 If this symbol has a value other than -1 or 0, it shall have the
402 value 200112L.
403 .TP 7
404 _POSIX2_PBS_TRACK
405 .sp
406 The implementation supports the Track Batch Job Request option. If
407 this symbol has a value other than -1 or 0, it shall have the
408 value 200112L.
409 .TP 7
410 _POSIX2_SW_DEV
411 .sp
412 The implementation supports the Software Development Utilities option.
413 If this symbol has a value other than -1 or 0, it shall have
414 the value 200112L.
415 .TP 7
416 _POSIX2_UPE
417 .sp
418 The implementation supports the User Portability Utilities option.
419 If this symbol has a value other than -1 or 0, it shall have the
420 value 200112L.
421 .TP 7
422 _V6_ILP32_OFF32
423 The implementation provides a C-language compilation environment with
424 32-bit \fBint\fP, \fBlong\fP, \fBpointer\fP, and
425 \fBoff_t\fP types.
426 .TP 7
427 _V6_ILP32_OFFBIG
428 The implementation provides a C-language compilation environment with
429 32-bit \fBint\fP, \fBlong\fP, and \fBpointer\fP types and
430 an \fBoff_t\fP type using at least 64 bits.
431 .TP 7
432 _V6_LP64_OFF64
433 The implementation provides a C-language compilation environment with
434 32-bit \fBint\fP and 64-bit \fBlong\fP, \fBpointer\fP, and
435 \fBoff_t\fP types.
436 .TP 7
437 _V6_LPBIG_OFFBIG
438 The implementation provides a C-language compilation environment with
439 an \fBint\fP type using at least 32 bits and \fBlong\fP,
440 \fBpointer\fP, and \fBoff_t\fP types using at least 64 bits.
441 .TP 7
442 _XBS5_ILP32_OFF32 (\fBLEGACY\fP)
443 .sp
444 The implementation provides a C-language compilation environment with
445 32-bit \fBint\fP, \fBlong\fP, \fBpointer\fP, and
446 \fBoff_t\fP types.
447 .TP 7
448 _XBS5_ILP32_OFFBIG (\fBLEGACY\fP)
449 .sp
450 The implementation provides a C-language compilation environment with
451 32-bit \fBint\fP, \fBlong\fP, and \fBpointer\fP types and
452 an \fBoff_t\fP type using at least 64 bits.
453 .TP 7
454 _XBS5_LP64_OFF64 (\fBLEGACY\fP)
455 .sp
456 The implementation provides a C-language compilation environment with
457 32-bit \fBint\fP and 64-bit \fBlong\fP, \fBpointer\fP, and
458 \fBoff_t\fP types.
459 .TP 7
460 _XBS5_LPBIG_OFFBIG (\fBLEGACY\fP)
461 .sp
462 The implementation provides a C-language compilation environment with
463 an \fBint\fP type using at least 32 bits and \fBlong\fP,
464 \fBpointer\fP, and \fBoff_t\fP types using at least 64 bits.
465 .TP 7
466 _XOPEN_CRYPT
467 .sp
468 The implementation supports the X/Open Encryption Option Group.
469 .TP 7
470 _XOPEN_ENH_I18N
471 The implementation supports the Issue 4, Version 2 Enhanced Internationalization
472 Option Group. This symbol shall always be set to a
473 value other than -1.
474 .TP 7
475 _XOPEN_LEGACY
476 The implementation supports the Legacy Option Group.
477 .TP 7
478 _XOPEN_REALTIME
479 The implementation supports the X/Open Realtime Option Group.
480 .TP 7
481 _XOPEN_REALTIME_THREADS
482 The implementation supports the X/Open Realtime Threads Option Group.
483 .TP 7
484 _XOPEN_SHM
485 The implementation supports the Issue 4, Version 2 Shared Memory Option
486 Group. This symbol shall always be set to a value other
487 than -1.
488 .TP 7
489 _XOPEN_STREAMS
490 The implementation supports the XSI STREAMS Option Group.
491 .TP 7
492 _XOPEN_UNIX
493 .sp
494 The implementation supports the XSI extension.
495 .sp
496 .SS Execution-Time Symbolic Constants
497 .LP
498 If any of the following constants are not defined in the \fI<unistd.h>\fP
499 header, the value shall vary depending on the
500 file to which it is applied.
501 .LP
502 If any of the following constants are defined to have value -1 in
503 the \fI<unistd.h>\fP header, the implementation shall
504 not provide the option on any file; if any are defined to have a value
505 other than -1 in the \fI<unistd.h>\fP header, the
506 implementation shall provide the option on all applicable files.
507 .LP
508 All of the following constants, whether defined in \fI<unistd.h>\fP
509 or not, may be queried with respect to a specific
510 file using the \fIpathconf\fP() or \fIfpathconf\fP() functions:
511 .TP 7
512 _POSIX_ASYNC_IO
513 Asynchronous input or output operations may be performed for the associated
514 file.
515 .TP 7
516 _POSIX_PRIO_IO
517 Prioritized input or output operations may be performed for the associated
518 file.
519 .TP 7
520 _POSIX_SYNC_IO
521 Synchronized input or output operations may be performed for the associated
522 file.
523 .sp
524 .SS Constants for Functions
525 .LP
526 The following symbolic constant shall be defined:
527 .TP 7
528 NULL
529 Null pointer
530 .sp
531 .LP
532 The following symbolic constants shall be defined for the \fIaccess\fP()
533 function:
534 .TP 7
535 F_OK
536 Test for existence of file.
537 .TP 7
538 R_OK
539 Test for read permission.
540 .TP 7
541 W_OK
542 Test for write permission.
543 .TP 7
544 X_OK
545 Test for execute (search) permission.
546 .sp
547 .LP
548 The constants F_OK, R_OK, W_OK, and X_OK and the expressions \fIR_OK\fP|\fIW_OK\fP,
549 \fIR_OK\fP|\fIX_OK\fP, and
550 \fIR_OK\fP|\fIW_OK\fP|\fIX_OK\fP shall all have distinct values.
551 .LP
552 The following symbolic constants shall be defined for the \fIconfstr\fP()
553 function:
554 .TP 7
555 _CS_PATH
556 This is the value for the \fIPATH\fP environment variable that finds
557 all standard utilities.
558 .TP 7
559 _CS_POSIX_V6_ILP32_OFF32_CFLAGS
560 If \fIsysconf\fP(_SC_V6_ILP32_OFF32) returns -1, the meaning of this
561 value is unspecified. Otherwise, this value is the set of
562 initial options to be given to the \fIc99\fP utility to build an application
563 using a
564 programming model with 32-bit \fBint\fP, \fBlong\fP, \fBpointer\fP,
565 and \fBoff_t\fP types.
566 .TP 7
567 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
568 If \fIsysconf\fP(_SC_V6_ILP32_OFF32) returns -1, the meaning of this
569 value is unspecified. Otherwise, this value is the set of
570 final options to be given to the \fIc99\fP utility to build an application
571 using a programming
572 model with 32-bit \fBint\fP, \fBlong\fP, \fBpointer\fP, and \fBoff_t\fP
573 types.
574 .TP 7
575 _CS_POSIX_V6_ILP32_OFF32_LIBS
576 If \fIsysconf\fP(_SC_V6_ILP32_OFF32) returns -1, the meaning of this
577 value is unspecified. Otherwise, this value is the set of
578 libraries to be given to the \fIc99\fP utility to build an application
579 using a programming
580 model with 32-bit \fBint\fP, \fBlong\fP, \fBpointer\fP, and \fBoff_t\fP
581 types.
582 .TP 7
583 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
584 If \fIsysconf\fP(_SC_V6_ILP32_OFFBIG) returns -1, the meaning of this
585 value is unspecified. Otherwise, this value is the set of
586 initial options to be given to the \fIc99\fP utility to build an application
587 using a
588 programming model with 32-bit \fBint\fP, \fBlong\fP, and \fBpointer\fP
589 types, and an \fBoff_t\fP type using at least 64
590 bits.
591 .TP 7
592 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
593 If \fIsysconf\fP(_SC_V6_ILP32_OFFBIG) returns -1, the meaning of this
594 value is unspecified. Otherwise, this value is the set of
595 final options to be given to the \fIc99\fP utility to build an application
596 using a programming
597 model with 32-bit \fBint\fP, \fBlong\fP, and \fBpointer\fP types,
598 and an \fBoff_t\fP type using at least 64 bits.
599 .TP 7
600 _CS_POSIX_V6_ILP32_OFFBIG_LIBS
601 If \fIsysconf\fP(_SC_V6_ILP32_OFFBIG) returns -1, the meaning of this
602 value is unspecified. Otherwise, this value is the set of
603 libraries to be given to the \fIc99\fP utility to build an application
604 using a programming
605 model with 32-bit \fBint\fP, \fBlong\fP, and \fBpointer\fP types,
606 and an \fBoff_t\fP type using at least 64 bits.
607 .TP 7
608 _CS_POSIX_V6_LP64_OFF64_CFLAGS
609 If \fIsysconf\fP(_SC_V6_LP64_OFF64) returns -1, the meaning of this
610 value is unspecified. Otherwise, this value is the set of
611 initial options to be given to the \fIc99\fP utility to build an application
612 using a
613 programming model with 32-bit \fBint\fP and 64-bit \fBlong\fP, \fBpointer\fP,
614 and \fBoff_t\fP types.
615 .TP 7
616 _CS_POSIX_V6_LP64_OFF64_LDFLAGS
617 If \fIsysconf\fP(_SC_V6_LP64_OFF64) returns -1, the meaning of this
618 value is unspecified. Otherwise, this value is the set of
619 final options to be given to the \fIc99\fP utility to build an application
620 using a programming
621 model with 32-bit \fBint\fP and 64-bit \fBlong\fP, \fBpointer\fP,
622 and \fBoff_t\fP types.
623 .TP 7
624 _CS_POSIX_V6_LP64_OFF64_LIBS
625 If \fIsysconf\fP(_SC_V6_LP64_OFF64) returns -1, the meaning of this
626 value is unspecified. Otherwise, this value is the set of
627 libraries to be given to the \fIc99\fP utility to build an application
628 using a programming
629 model with 32-bit \fBint\fP and 64-bit \fBlong\fP, \fBpointer\fP,
630 and \fBoff_t\fP types.
631 .TP 7
632 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
633 If \fIsysconf\fP(_SC_V6_LPBIG_OFFBIG) returns -1, the meaning of this
634 value is unspecified. Otherwise, this value is the set of
635 initial options to be given to the \fIc99\fP utility to build an application
636 using a
637 programming model with an \fBint\fP type using at least 32 bits and
638 \fBlong\fP, \fBpointer\fP, and \fBoff_t\fP types using at
639 least 64 bits.
640 .TP 7
641 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
642 If \fIsysconf\fP(_SC_V6_LPBIG_OFFBIG) returns -1, the meaning of this
643 value is unspecified. Otherwise, this value is the set of
644 final options to be given to the \fIc99\fP utility to build an application
645 using a programming
646 model with an \fBint\fP type using at least 32 bits and \fBlong\fP,
647 \fBpointer\fP, and \fBoff_t\fP types using at least 64
648 bits.
649 .TP 7
650 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
651 If \fIsysconf\fP(_SC_V6_LPBIG_OFFBIG) returns -1, the meaning of this
652 value is unspecified. Otherwise, this value is the set of
653 libraries to be given to the \fIc99\fP utility to build an application
654 using a programming
655 model with an \fBint\fP type using at least 32 bits and \fBlong\fP,
656 \fBpointer\fP, and \fBoff_t\fP types using at least 64
657 bits.
658 .TP 7
659 _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS
660 This value is a <newline>-separated list of names of programming environments
661 supported by the implementation in which the
662 widths of the \fBblksize_t\fP, \fBcc_t\fP, \fBmode_t\fP, \fBnfds_t\fP,
663 \fBpid_t\fP, \fBptrdiff_t\fP, \fBsize_t\fP,
664 \fBspeed_t\fP, \fBssize_t\fP, \fBsuseconds_t\fP, \fBtcflag_t\fP, \fBuseconds_t\fP,
665 \fBwchar_t\fP, and \fBwint_t\fP types are
666 no greater than the width of type \fBlong\fP.
667 .sp
668 .LP
669 The following symbolic constants are reserved for compatibility with
670 Issue 5:
671 .LP
672 .sp
673 _CS_XBS5_ILP32_OFF32_CFLAGS (\fBLEGACY\fP)
674 .br
675 _CS_XBS5_ILP32_OFF32_LDFLAGS (\fBLEGACY\fP)
676 .br
677 _CS_XBS5_ILP32_OFF32_LIBS (\fBLEGACY\fP)
678 .br
679 _CS_XBS5_ILP32_OFF32_LINTFLAGS (\fBLEGACY\fP)
680 .br
681 _CS_XBS5_ILP32_OFFBIG_CFLAGS (\fBLEGACY\fP)
682 .br
683 _CS_XBS5_ILP32_OFFBIG_LDFLAGS (\fBLEGACY\fP)
684 .br
685 _CS_XBS5_ILP32_OFFBIG_LIBS (\fBLEGACY\fP)
686 .br
687 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS (\fBLEGACY\fP)
688 .br
689 _CS_XBS5_LP64_OFF64_CFLAGS (\fBLEGACY\fP)
690 .br
691 _CS_XBS5_LP64_OFF64_LDFLAGS (\fBLEGACY\fP)
692 .br
693 _CS_XBS5_LP64_OFF64_LIBS (\fBLEGACY\fP)
694 .br
695 _CS_XBS5_LP64_OFF64_LINTFLAGS (\fBLEGACY\fP)
696 .br
697 _CS_XBS5_LPBIG_OFFBIG_CFLAGS (\fBLEGACY\fP)
698 .br
699 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS (\fBLEGACY\fP)
700 .br
701 _CS_XBS5_LPBIG_OFFBIG_LIBS (\fBLEGACY\fP)
702 .br
703 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS (\fBLEGACY\fP)
704 .br
705 .sp
706 .LP
707 The following symbolic constants shall be defined for the \fIlseek\fP()
708 and \fIfcntl\fP() functions and shall have distinct values:
709 .TP 7
710 SEEK_CUR
711 Set file offset to current plus \fIoffset\fP.
712 .TP 7
713 SEEK_END
714 Set file offset to EOF plus \fIoffset\fP.
715 .TP 7
716 SEEK_SET
717 Set file offset to \fIoffset\fP.
718 .sp
719 .LP
720 The following symbolic constants shall be defined as possible values
721 for the \fIfunction\fP argument to the \fIlockf\fP() function:
722 .TP 7
723 F_LOCK
724 Lock a section for exclusive use.
725 .TP 7
726 F_TEST
727 Test section for locks by other processes.
728 .TP 7
729 F_TLOCK
730 Test and lock a section for exclusive use.
731 .TP 7
732 F_ULOCK
733 Unlock locked sections.
734 .sp
735 .LP
736 The following symbolic constants shall be defined for \fIpathconf\fP():
737 .LP
738 .sp
739 _PC_ALLOC_SIZE_MIN
740 .br
741 _PC_ASYNC_IO
742 .br
743 _PC_CHOWN_RESTRICTED
744 .br
745 _PC_FILESIZEBITS
746 .br
747 _PC_LINK_MAX
748 .br
749 _PC_MAX_CANON
750 .br
751 _PC_MAX_INPUT
752 .br
753 _PC_NAME_MAX
754 .br
755 _PC_NO_TRUNC
756 .br
757 _PC_PATH_MAX
758 .br
759 _PC_PIPE_BUF
760 .br
761 _PC_PRIO_IO
762 .br
763 _PC_REC_INCR_XFER_SIZE
764 .br
765 _PC_REC_MIN_XFER_SIZE
766 .br
767 _PC_REC_XFER_ALIGN
768 .br
769 _PC_SYMLINK_MAX
770 .br
771 _PC_SYNC_IO
772 .br
773 _PC_VDISABLE
774 .br
775 .LP
776 The following symbolic constants shall be defined for \fIsysconf\fP():
777 .LP
778 .sp
779 _SC_2_C_BIND
780 .br
781 _SC_2_C_DEV
782 .br
783 _SC_2_C_VERSION
784 .br
785 _SC_2_CHAR_TERM
786 .br
787 _SC_2_FORT_DEV
788 .br
789 _SC_2_FORT_RUN
790 .br
791 _SC_2_LOCALEDEF
792 .br
793 _SC_2_PBS
794 .br
795 _SC_2_PBS_ACCOUNTING
796 .br
797 _SC_2_PBS_CHECKPOINT
798 .br
799 _SC_2_PBS_LOCATE
800 .br
801 _SC_2_PBS_MESSAGE
802 .br
803 _SC_2_PBS_TRACK
804 .br
805 _SC_2_SW_DEV
806 .br
807 _SC_2_UPE
808 .br
809 _SC_2_VERSION
810 .br
811 _SC_ADVISORY_INFO
812 .br
813 _SC_ARG_MAX
814 .br
815 _SC_AIO_LISTIO_MAX
816 .br
817 _SC_AIO_MAX
818 .br
819 _SC_AIO_PRIO_DELTA_MAX
820 .br
821 _SC_ASYNCHRONOUS_IO
822 .br
823 _SC_ATEXIT_MAX
824 .br
825 _SC_BARRIERS
826 .br
827 _SC_BC_BASE_MAX
828 .br
829 _SC_BC_DIM_MAX
830 .br
831 _SC_BC_SCALE_MAX
832 .br
833 _SC_BC_STRING_MAX
834 .br
835 _SC_CHILD_MAX
836 .br
837 _SC_CLK_TCK
838 .br
839 _SC_CLOCK_SELECTION
840 .br
841 _SC_COLL_WEIGHTS_MAX
842 .br
843 _SC_CPUTIME
844 .br
845 _SC_DELAYTIMER_MAX
846 .br
847 _SC_EXPR_NEST_MAX
848 .br
849 _SC_FILE_LOCKING
850 .br
851 _SC_FSYNC
852 .br
853 _SC_GETGR_R_SIZE_MAX
854 .br
855 _SC_GETPW_R_SIZE_MAX
856 .br
857 _SC_HOST_NAME_MAX
858 .br
859 _SC_IOV_MAX
860 .br
861 _SC_IPV6
862 .br
863 _SC_JOB_CONTROL
864 .br
865 _SC_LINE_MAX
866 .br
867 _SC_LOGIN_NAME_MAX
868 .br
869 _SC_MAPPED_FILES
870 .br
871 _SC_MEMLOCK
872 .br
873 _SC_MEMLOCK_RANGE
874 .br
875 _SC_MEMORY_PROTECTION
876 .br
877 _SC_MESSAGE_PASSING
878 .br
879 _SC_MONOTONIC_CLOCK
880 .br
881 _SC_MQ_OPEN_MAX
882 .br
883 _SC_MQ_PRIO_MAX
884 .br
885 _SC_NGROUPS_MAX
886 .br
887 _SC_OPEN_MAX
888 .br
889 _SC_PAGE_SIZE
890 .br
891 _SC_PAGESIZE
892 .br
893 _SC_PRIORITIZED_IO
894 .br
895 _SC_PRIORITY_SCHEDULING
896 .br
897 _SC_RAW_SOCKETS
898 .br
899 _SC_RE_DUP_MAX
900 .br
901 _SC_READER_WRITER_LOCKS
902 .br
903 _SC_REALTIME_SIGNALS
904 .br
905 _SC_REGEXP
906 .br
907 _SC_RTSIG_MAX
908 .br
909 _SC_SAVED_IDS
910 .br
911 _SC_SEMAPHORES
912 .br
913 _SC_SEM_NSEMS_MAX
914 .br
915 _SC_SEM_VALUE_MAX
916 .br
917 _SC_SHARED_MEMORY_OBJECTS
918 .br
919 _SC_SHELL
920 .br
921 _SC_SIGQUEUE_MAX
922 .br
923 _SC_SPAWN
924 .br
925 _SC_SPIN_LOCKS
926 .br
927 _SC_SPORADIC_SERVER
928 .br
929 _SC_STREAM_MAX
930 .br
931 _SC_SYMLOOP_MAX
932 .br
933 _SC_SYNCHRONIZED_IO
934 .br
935 _SC_THREAD_ATTR_STACKADDR
936 .br
937 _SC_THREAD_ATTR_STACKSIZE
938 .br
939 _SC_THREAD_CPUTIME
940 .br
941 _SC_THREAD_DESTRUCTOR_ITERATIONS
942 .br
943 _SC_THREAD_KEYS_MAX
944 .br
945 _SC_THREAD_PRIO_INHERIT
946 .br
947 _SC_THREAD_PRIO_PROTECT
948 .br
949 _SC_THREAD_PRIORITY_SCHEDULING
950 .br
951 _SC_THREAD_PROCESS_SHARED
952 .br
953 _SC_THREAD_SAFE_FUNCTIONS
954 .br
955 _SC_THREAD_SPORADIC_SERVER
956 .br
957 _SC_THREAD_STACK_MIN
958 .br
959 _SC_THREAD_THREADS_MAX
960 .br
961 _SC_TIMEOUTS
962 .br
963 _SC_THREADS
964 .br
965 _SC_TIMER_MAX
966 .br
967 _SC_TIMERS
968 .br
969 _SC_TRACE
970 .br
971 _SC_TRACE_EVENT_FILTER
972 .br
973 _SC_TRACE_INHERIT
974 .br
975 _SC_TRACE_LOG
976 .br
977 _SC_TTY_NAME_MAX
978 .br
979 _SC_TYPED_MEMORY_OBJECTS
980 .br
981 _SC_TZNAME_MAX
982 .br
983 _SC_V6_ILP32_OFF32
984 .br
985 _SC_V6_ILP32_OFFBIG
986 .br
987 _SC_V6_LP64_OFF64
988 .br
989 _SC_V6_LPBIG_OFFBIG
990 .br
991 _SC_VERSION
992 .br
993 _SC_XBS5_ILP32_OFF32 (\fBLEGACY\fP)
994 .br
995 _SC_XBS5_ILP32_OFFBIG (\fBLEGACY\fP)
996 .br
997 _SC_XBS5_LP64_OFF64 (\fBLEGACY\fP)
998 .br
999 _SC_XBS5_LPBIG_OFFBIG (\fBLEGACY\fP)
1000 .br
1001 _SC_XOPEN_CRYPT
1002 .br
1003 _SC_XOPEN_ENH_I18N
1004 .br
1005 _SC_XOPEN_LEGACY
1006 .br
1007 _SC_XOPEN_REALTIME
1008 .br
1009 _SC_XOPEN_REALTIME_THREADS
1010 .br
1011 _SC_XOPEN_SHM
1012 .br
1013 _SC_XOPEN_STREAMS
1014 .br
1015 _SC_XOPEN_UNIX
1016 .br
1017 _SC_XOPEN_VERSION
1018 .br
1019 _SC_XOPEN_XCU_VERSION
1020 .br
1021 .LP
1022 The two constants _SC_PAGESIZE and _SC_PAGE_SIZE may be defined to
1023 have the same value.
1024 .LP
1025 The following symbolic constants shall be defined for file streams:
1026 .TP 7
1027 STDERR_FILENO
1028 File number of \fIstderr\fP; 2.
1029 .TP 7
1030 STDIN_FILENO
1031 File number of \fIstdin\fP; 0.
1032 .TP 7
1033 STDOUT_FILENO
1034 File number of \fIstdout\fP; 1.
1035 .sp
1036 .SS Type Definitions
1037 .LP
1038 The \fBsize_t\fP, \fBssize_t\fP, \fBuid_t\fP, \fBgid_t\fP, \fBoff_t\fP,
1039 \fBpid_t\fP, and \fBuseconds_t\fP types shall be
1040 defined as described in \fI<sys/types.h>\fP.
1041 .LP
1042 The \fBintptr_t\fP type shall be defined as described in \fI<inttypes.h>\fP.
1043 .SS Declarations
1044 .LP
1045 The following shall be declared as functions and may also be defined
1046 as macros. Function prototypes shall be provided.
1047 .sp
1048 .RS
1049 .nf
1050
1051 \fBint access(const char *, int);
1052 unsigned alarm(unsigned);
1053 int chdir(const char *);
1054 int chown(const char *, uid_t, gid_t);
1055 int close(int);
1056 size_t confstr(int, char *, size_t);
1057 .sp
1058
1059
1060 char *crypt(const char *, const char *);
1061 char *ctermid(char *);
1062
1063 int dup(int);
1064 .sp
1065
1066 int dup2(int, int);
1067
1068 void encrypt(char[64], int);
1069
1070 int execl(const char *, const char *, ...);
1071 int execle(const char *, const char *, ...);
1072 int execlp(const char *, const char *, ...);
1073 int execv(const char *, char *const []);
1074 int execve(const char *, char *const [], char *const []);
1075 int execvp(const char *, char *const []);
1076 void _exit(int);
1077 int fchown(int, uid_t, gid_t);
1078
1079 int fchdir(int);
1080
1081
1082 int fdatasync(int);
1083
1084 pid_t fork(void);
1085 long fpathconf(int, int);
1086
1087 int fsync(int);
1088
1089 int ftruncate(int, off_t);
1090 char *getcwd(char *, size_t);
1091 gid_t getegid(void);
1092 uid_t geteuid(void);
1093 gid_t getgid(void);
1094 int getgroups(int, gid_t []);
1095
1096 long gethostid(void);
1097
1098 int gethostname(char *, size_t);
1099 char *getlogin(void);
1100 int getlogin_r(char *, size_t);
1101 int getopt(int, char * const [], const char *);
1102
1103 pid_t getpgid(pid_t);
1104
1105 pid_t getpgrp(void);
1106 pid_t getpid(void);
1107 pid_t getppid(void);
1108
1109 pid_t getsid(pid_t);
1110
1111 uid_t getuid(void);
1112
1113 char *getwd(char *); (\fP\fBLEGACY\fP \fB)
1114
1115 int isatty(int);
1116
1117 int lchown(const char *, uid_t, gid_t);
1118
1119 int link(const char *, const char *);
1120
1121 int lockf(int, int, off_t);
1122
1123 off_t lseek(int, off_t, int);
1124
1125 int nice(int);
1126
1127 long pathconf(const char *, int);
1128 int pause(void);
1129 int pipe(int [2]);
1130
1131 ssize_t pread(int, void *, size_t, off_t);
1132 ssize_t pwrite(int, const void *, size_t, off_t);
1133
1134 ssize_t read(int, void *, size_t);
1135 ssize_t readlink(const char *restrict, char *restrict, size_t);
1136 int rmdir(const char *);
1137 int setegid(gid_t);
1138 int seteuid(uid_t);
1139 int setgid(gid_t);
1140 .sp
1141
1142 int setpgid(pid_t, pid_t);
1143
1144 pid_t setpgrp(void);
1145 int setregid(gid_t, gid_t);
1146 int setreuid(uid_t, uid_t);
1147
1148 pid_t setsid(void);
1149 int setuid(uid_t);
1150 unsigned sleep(unsigned);
1151
1152 void swab(const void *restrict, void *restrict, ssize_t);
1153 int symlink(const char *, const char *);
1154 void sync(void);
1155
1156 long sysconf(int);
1157 pid_t tcgetpgrp(int);
1158 int tcsetpgrp(int, pid_t);
1159
1160 int truncate(const char *, off_t);
1161
1162 char *ttyname(int);
1163 int ttyname_r(int, char *, size_t);
1164
1165 useconds_t ualarm(useconds_t, useconds_t);
1166
1167 int unlink(const char *);
1168
1169 int usleep(useconds_t);
1170 pid_t vfork(void);
1171
1172 ssize_t write(int, const void *, size_t);
1173 \fP
1174 .fi
1175 .RE
1176 .LP
1177 Implementations may also include the \fIpthread_atfork\fP() prototype
1178 as defined
1179 in \fI<pthread.h>\fP .
1180 .LP
1181 The following external variables shall be declared:
1182 .sp
1183 .RS
1184 .nf
1185
1186 \fBextern char *optarg;
1187 extern int optind, opterr, optopt;
1188 \fP
1189 .fi
1190 .RE
1191 .LP
1192 \fIThe following sections are informative.\fP
1193 .SH APPLICATION USAGE
1194 .LP
1195 IEEE\ Std\ 1003.1-2001 only describes the behavior of systems that
1196 claim conformance to it. However, application
1197 developers who want to write applications that adapt to other versions
1198 of IEEE\ Std\ 1003.1 (or to systems that do not
1199 conform to any POSIX standard) may find it useful to code them so
1200 as to conditionally compile different code depending on the value
1201 of _POSIX_VERSION, for example:
1202 .sp
1203 .RS
1204 .nf
1205
1206 \fB#if _POSIX_VERSION >= 200112L
1207 /* Use the newer function that copes with large files. */
1208 off_t pos=ftello(fp);
1209 #else
1210 /* Either this is an old version of POSIX, or _POSIX_VERSION is
1211 not even defined, so use the traditional function. */
1212 long pos=ftell(fp);
1213 #endif
1214 \fP
1215 .fi
1216 .RE
1217 .LP
1218 Earlier versions of IEEE\ Std\ 1003.1 and of the Single UNIX Specification
1219 can be identified by the following
1220 macros:
1221 .TP 7
1222 POSIX.1-1988 standard
1223 _POSIX_VERSION==198808L
1224 .TP 7
1225 POSIX.1-1990 standard
1226 _POSIX_VERSION==199009L
1227 .TP 7
1228 ISO\ POSIX-1:1996 standard
1229 _POSIX_VERSION==199506L
1230 .TP 7
1231 Single UNIX Specification, Version 1
1232 _XOPEN_UNIX and _XOPEN_VERSION==4
1233 .TP 7
1234 Single UNIX Specification, Version 2
1235 _XOPEN_UNIX and _XOPEN_VERSION==500
1236 .sp
1237 .LP
1238 IEEE\ Std\ 1003.1-2001 does not make any attempt to define application
1239 binary interaction with the underlying operating
1240 system. However, application developers may find it useful to query
1241 _SC_VERSION at runtime via \fIsysconf\fP() to determine whether the
1242 current version of the operating system supports the
1243 necessary functionality as in the following program fragment:
1244 .sp
1245 .RS
1246 .nf
1247
1248 \fBif (sysconf(_SC_VERSION) < 200112L) {
1249 fprintf(stderr, "POSIX.1-2001 system required, terminating \\n");
1250 exit(1);
1251 }
1252 \fP
1253 .fi
1254 .RE
1255 .LP
1256 New applications should not use _XOPEN_SHM or _XOPEN_ENH_I18N.
1257 .SH RATIONALE
1258 .LP
1259 As IEEE\ Std\ 1003.1-2001 evolved, certain options became sufficiently
1260 standardized that it was concluded that simply
1261 requiring one of the option choices was simpler than retaining the
1262 option. However, for backwards-compatibility, the option flags
1263 (with required constant values) are retained.
1264 .SS Version Test Macros
1265 .LP
1266 The standard developers considered altering the definition of _POSIX_VERSION
1267 and removing _SC_VERSION from the specification of
1268 \fIsysconf\fP() since the utility to an application was deemed by
1269 some to be minimal, and
1270 since the implementation of the functionality is potentially problematic.
1271 However, they recognized that support for existing
1272 application binaries is a concern to manufacturers, application developers,
1273 and the users of implementations conforming to
1274 IEEE\ Std\ 1003.1-2001.
1275 .LP
1276 While the example using _SC_VERSION in the APPLICATION USAGE section
1277 does not provide the greatest degree of imaginable utility
1278 to the application developer or user, it is arguably better than a
1279 \fBcore\fP file or some other equally obscure result. (It is
1280 also possible for implementations to encode and recognize application
1281 binaries compiled in various POSIX.1-conforming environments,
1282 and modify the semantics of the underlying system to conform to the
1283 expectations of the application.) For the reasons outlined in
1284 the preceding paragraphs and in the APPLICATION USAGE section, the
1285 standard developers elected to retain the _POSIX_VERSION and
1286 _SC_VERSION functionality.
1287 .SS Compile-Time Symbolic Constants for System-Wide Options
1288 .LP
1289 IEEE\ Std\ 1003.1-2001 now includes support in certain areas for the
1290 newly adopted policy governing options and
1291 stubs.
1292 .LP
1293 This policy provides flexibility for implementations in how they support
1294 options. It also specifies how conforming applications
1295 can adapt to different implementations that support different sets
1296 of options. It allows the following:
1297 .IP " 1." 4
1298 If an implementation has no interest in supporting an option, it does
1299 not have to provide anything associated with that option
1300 beyond the announcement that it does not support it.
1301 .LP
1302 .IP " 2." 4
1303 An implementation can support a partial or incompatible version of
1304 an option (as a non-standard extension) as long as it does
1305 not claim to support the option.
1306 .LP
1307 .IP " 3." 4
1308 An application can determine whether the option is supported. A strictly
1309 conforming application must check this announcement
1310 mechanism before first using anything associated with the option.
1311 .LP
1312 .LP
1313 There is an important implication of this policy. IEEE\ Std\ 1003.1-2001
1314 cannot dictate the behavior of interfaces
1315 associated with an option when the implementation does not claim to
1316 support the option. In particular, it cannot require that a
1317 function associated with an unsupported option will fail if it does
1318 not perform as specified. However, this policy does not prevent
1319 a standard from requiring certain functions to always be present,
1320 but that they shall always fail on some implementations. The \fIsetpgid\fP()
1321 function in the POSIX.1-1990 standard, for example, is considered
1322 appropriate.
1323 .LP
1324 The POSIX standards include various options, and the C-language binding
1325 support for an option implies that the implementation
1326 must supply data types and function interfaces. An application must
1327 be able to discover whether the implementation supports each
1328 option.
1329 .LP
1330 Any application must consider the following three cases for each option:
1331 .IP " 1." 4
1332 Option never supported.
1333 .LP
1334 The implementation advertises at compile time that the option will
1335 never be supported. In this case, it is not necessary for the
1336 implementation to supply any of the data types or function interfaces
1337 that are provided only as part of the option. The
1338 implementation might provide data types and functions that are similar
1339 to those defined by IEEE\ Std\ 1003.1-2001, but
1340 there is no guarantee for any particular behavior.
1341 .LP
1342 .IP " 2." 4
1343 Option always supported.
1344 .LP
1345 The implementation advertises at compile time that the option will
1346 always be supported. In this case, all data types and
1347 function interfaces shall be available and shall operate as specified.
1348 .LP
1349 .IP " 3." 4
1350 Option might or might not be supported.
1351 .LP
1352 Some implementations might not provide a mechanism to specify support
1353 of options at compile time. In addition, the
1354 implementation might be unable or unwilling to specify support or
1355 non-support at compile time. In either case, any application that
1356 might use the option at runtime must be able to compile and execute.
1357 The implementation must provide, at compile time, all data
1358 types and function interfaces that are necessary to allow this. In
1359 this situation, there must be a mechanism that allows the
1360 application to query, at runtime, whether the option is supported.
1361 If the application attempts to use the option when it is not
1362 supported, the result is unspecified unless explicitly specified otherwise
1363 in IEEE\ Std\ 1003.1-2001.
1364 .LP
1365 .SH FUTURE DIRECTIONS
1366 .LP
1367 None.
1368 .SH SEE ALSO
1369 .LP
1370 \fI<inttypes.h>\fP , \fI<limits.h>\fP , \fI<sys/socket.h>\fP , \fI<sys/types.h>\fP
1371 , \fI<termios.h>\fP , \fI<wctype.h>\fP , the System Interfaces volume
1372 of IEEE\ Std\ 1003.1-2001, \fIaccess\fP(), \fIalarm\fP(), \fIchdir\fP(),
1373 \fIchown\fP(), \fIclose\fP(), \fIcrypt\fP(), \fIctermid\fP(), \fIdup\fP(),
1374 \fIencrypt\fP(), \fIenviron\fP, \fIexec\fP, \fIexit\fP(), \fIfchdir\fP(),
1375 \fIfchown\fP(), \fIfcntl\fP(), \fIfork\fP(), \fIfpathconf\fP(), \fIfsync\fP(),
1376 \fIftruncate\fP(), \fIgetcwd\fP(), \fIgetegid\fP(), \fIgeteuid\fP(),
1377 \fIgetgid\fP(), \fIgetgroups\fP(), \fIgethostid\fP(), \fIgethostname\fP(),
1378 \fIgetlogin\fP(), \fIgetpgid\fP(), \fIgetpgrp\fP(), \fIgetpid\fP(),
1379 \fIgetppid\fP(), \fIgetsid\fP(), \fIgetuid\fP(), \fIisatty\fP(), \fIlchown\fP(),
1380 \fIlink\fP(), \fIlockf\fP(), \fIlseek\fP(), \fInice\fP(), \fIpathconf\fP(),
1381 \fIpause\fP(), \fIpipe\fP(), \fIread\fP(), \fIreadlink\fP(), \fIrmdir\fP(),
1382 \fIsetgid\fP(), \fIsetpgid\fP(), \fIsetpgrp\fP(), \fIsetregid\fP(),
1383 \fIsetreuid\fP(), \fIsetsid\fP(), \fIsetuid\fP(), \fIsleep\fP(), \fIswab\fP(),
1384 \fIsymlink\fP(), \fIsync\fP(), \fIsysconf\fP(), \fItcgetpgrp\fP(),
1385 \fItcsetpgrp\fP(), \fItruncate\fP(), \fIttyname\fP(), \fIualarm\fP(),
1386 \fIunlink\fP(), \fIusleep\fP(), \fIvfork\fP(), \fIwrite\fP()
1387 .SH COPYRIGHT
1388 Portions of this text are reprinted and reproduced in electronic form
1389 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
1390 -- Portable Operating System Interface (POSIX), The Open Group Base
1391 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
1392 Electrical and Electronics Engineers, Inc and The Open Group. In the
1393 event of any discrepancy between this version and the original IEEE and
1394 The Open Group Standard, the original IEEE and The Open Group Standard
1395 is the referee document. The original Standard can be obtained online at
1396 http://www.opengroup.org/unix/online.html .