unistd.h, unistd - standard symbolic constants and types
#include <unistd.h>
The <unistd.h> header defines the symbolic constants and structures which are not already defined or declared in some other header. The contents of this header are shown below.
The following symbolic constants are defined (with fixed values):
_POSIX_VERSION
_POSIX2_VERSION
_POSIX2_C_VERSION
_XOPEN_VERSION
_XOPEN_XCU_VERSION
The following symbolic constants, if defined in <unistd.h>, have a value of -1, 0, or greater, unless otherwise specified below. If these are undefined, the fpathconf(2), pathconf(2), or sysconf(3C) functions can be used to determine whether the option is provided for a particular invocation of the application.
If a symbolic constant is defined with the value -1, the option is not supported. Headers, data types, and function interfaces required only for the option need not be supplied. An application that attempts to use anything associated only with the option is considered to be requiring an extension.
If a symbolic constant is defined with a value greater than zero, the option is always supported when the application is executed. All headers, data types, and functions are present and operate as specified.
If a symbolic constant is defined with the value zero, all headers, data types, and functions are present. The application can check at runtime to see whether the option is supported by calling fpathconf(), pathconf(), or sysconf() with the indicated name parameter.
Unless explicitly specified otherwise, the behavior of functions associated with an unsupported option is unspecified, and an application that uses such functions without first checking fpathconf(), pathconf(), or sysconf() is considered to be requiring an extension.
_POSIX_ADVISORY_INFO
_POSIX_ASYNCHRONOUS_IO
_POSIX_BARRIERS
_POSIX_CLOCK_SELECTION
_POSIX_CPUTIME
_POSIX_FSYNC
_POSIX_IPV6
_POSIX_JOB_CONTROL
_POSIX_MAPPED_FILES
_POSIX_MEMLOCK
_POSIX_MEMLOCK_RANGE
_POSIX_MEMORY_PROTECTION
_POSIX_MESSAGE_PASSING
_POSIX_MONOTONIC_CLOCK
_POSIX_PRIORITY_SCHEDULING
_POSIX_RAW_SOCKETS
_POSIX_READER_WRITER_LOCKS
_POSIX_REALTIME_SIGNALS
_POSIX_REGEXP
_POSIX_SAVED_IDS
_POSIX_SEMAPHORES
_POSIX_SHARED_MEMORY_OBJECTS
_POSIX_SHELL
_POSIX_SPAWN
_POSIX_SPIN_LOCKS
_POSIX_SPORADIC_SERVER
_POSIX_SYNCHRONIZED_IO
_POSIX_THREAD_ATTR_STACKADDR
_POSIX_THREAD_ATTR_STACKSIZE
_POSIX_THREAD_CPUTIME
_POSIX_THREAD_PROCESS_SHARED
_POSIX_THREAD_SAFE_FUNCTIONS
_POSIX_THREAD_SPORADIC_SERVER
_POSIX_THREADS
_POSIX_TIMERS
_POSIX_TIMEOUTS
_POSIX_TRACE
_POSIX_TRACE_EVENT_FILTER
_POSIX_TRACE_INHERIT
_POSIX_TRACE_LOG
_POSIX_TYPED_MEMORY_OBJECTS
_POSIX_V6_ILP32_OFF32
_POSIX_V6_ILP32_OFFBIG
_POSIX_V6_LP64_OFF64
_POSIX_V6_LPBIG_OFFBIG
_POSIX_XOPEN_STREAMS
_POSIX2_C_BIND
_POSIX2_C_DEV
_POSIX2_CHAR_TERM
_POSIX2_LOCALEDEF
_POSIX2_PBS
_POSIX2_PBS_ACCOUNTING
_POSIX2_PBS_CHECKPOINT
_POSIX2_PBS_LOCATE
_POSIX2_PBS_MESSAGE
_POSIX2_PBS_TRACK
_POSIX2_SW_DEV
_POSIX2_UPE
_XBS5_ILP32_OFF32
_XBS5_ILP32_OFFBIG
_XBS5_LP64_OFF64
_XBS5_LPBIG_OFFBIG
_XOPEN_ENH_I18N
_XOPEN_LEGACY
_XOPEN_REALTIME
_XOPEN_SHM
_XOPEN_UNIX
_XOPEN_XPG3
_XOPEN_XPG4
If any of the following constants are not defined in the header <unistd.h>, the value varies depending on the file to which it is applied.
If any of the following constants are defined to have value -1 in the header <unistd.h>, the implementation will not provide the option on any file; if any are defined to have a value other than -1 in the header <unistd.h>, the implementation will provide the option on all applicable files.
All of the following constants, whether defined in <unistd.h> or not, can be queried with respect to a specific file using the pathconf() or fpathconf() functions.
_POSIX_ASYNC_IO
_POSIX_PRIO_IO
_POSIX_SYNC_IO
The following constant is defined:
NULL
The following symbolic constants are defined for the access(2) function:
R_OK
W_OK
X_OK
F_OK
The constants F_OK, R_OK, W_OK, and X_OK, and the expressions R_OK|W_OK, R_OK|X_OK, and R_OK|W_OK|X_OK all have distinct values.
The following symbolic constants are defined for the lockf(3C) function:
F_ULOCK
F_LOCK
F_TLOCK
F_TEST
The following symbolic constants are defined for the lseek(2) and fcntl(2) functions (they have distinct values):
SEEK_SET
SEEK_CUR
SEEK_END
The following symbolic constants are defined for the confstr(3C) function for both SPARC and x86:
_CS_LFS64_CFLAGS | _CS_LFS64_LDFLAGS |
_CS_LFS64_LIBS | _CS_LFS64_LINTFLAGS |
_CS_LFS_CFLAGS | |
_CS_LFS_LIBS | |
_CS_PATH | |
_CS_POSIX_V6_ILP32_OFF32_LDFLAGS | |
_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS | |
_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS | |
_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS | |
_CS_XBS5_ILP32_OFF32_CFLAGS | |
_CS_XBS5_ILP32_OFF32_LIBS | |
_CS_XBS5_ILP32_OFFBIG_CFLAGS | |
_CS_XBS5_ILP32_OFFBIG_LIBS |
The followwing symbolic constants are defined for the confstr() function for SPARC only:
_CS_POSIX_V6_LP64_OFF64_CFLAGS | _CS_POSIX_V6_LP64_OFF64_LDFLAGS |
_CS_POSIX_V6_LP64_OFF64_LIBS | _CS_POSIX_V6_LP64_OFF64_LINTFLAGS |
_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS | |
_CS_POSIX_V6_LPBIG_OFFBIG_LIBS | |
_CS_XBS5_LP64_OFF64_CFLAGS | |
_CS_XBS5_LP64_OFF64_LIBS | |
_CS_XBS5_LPBIG_OFFBIG_CFLAGS | |
_CS_XBS5_LPBIG_OFFBIG_LIBS |
The following symbolic constants are defined for the sysconf(3C) function:
_SC_2_C_BIND | _SC_2_C_DEV |
_SC_2_C_VERSION | _SC_2_FORT_DEV |
_SC_2_FORT_RUN | |
_SC_2_PBS | |
_SC_2_PBS_CHECKPOINT | |
_SC_2_PBS_MESSAGE | |
_SC_2_SW_DEV | |
_SC_2_VERSION | |
_SC_AIO_LISTIO_MAX | |
_SC_AIO_PRIO_DELTA_MAX | |
_SC_ASYNCHRONOUS_IO | |
_SC_AVPHYS_PAGES | |
_SC_BC_BASE_MAX | |
_SC_BC_SCALE_MAX | |
_SC_CHILD_MAX | |
_SC_CLOCK_SELECTION | |
_SC_CPUTIME | |
_SC_EXPR_NEST_MAX | |
_SC_GETGR_R_SIZE_MAX | |
_SC_HOST_NAME_MAX | |
_SC_IPV6 | |
_SC_LINE_MAX | |
_SC_LOGNAME_MAX | |
_SC_MEMLOCK | |
_SC_MEMORY_PROTECTION | |
_SC_MONOTONIC_CLOCK | |
_SC_MQ_PRIO_MAX | |
_SC_NPROCESSORS_CONF | |
_SC_OPEN_MAX | |
_SC_PAGE_SIZE | |
_SC_PHYS_PAGES | |
_SC_PRIORITY_SCHEDULING | |
_SC_READER_WRITER_LOCKS | |
_SC_REGEXP | |
_SC_RTSIG_MAX | |
_SC_SEMAPHORES | |
_SC_SEM_VALUE_MAX | |
_SC_SHELL | |
_SC_SPAWN | |
_SC_SPORADIC_SERVER | |
_SC_STREAM_MAX | |
_SC_SYNCHRONIZED_IO | |
_SC_THREAD_ATTR_STACKSIZE | |
_SC_THREAD_DESTRUCTOR_ITERATIONS | |
_SC_THREAD_PRIO_INHERIT | |
_SC_THREAD_PRIORITY_SCHEDULING | |
_SC_THREAD_SPORADIC_SERVER | |
_SC_THREAD_SAFE_FUNCTIONS | |
_SC_THREAD_THREADS_MAX | |
_SC_TIMER_MAX | |
_SC_TRACE | |
_SC_TRACE_EVENT_NAME_MAX | |
_SC_TRACE_LOG | |
_SC_TRACE_SYS_MAX | |
_SC_TTY_NAME_MAX | |
_SC_TZNAME_MAX | |
_SC_V6_ILP32_OFFBIG | |
_SC_V6_LPBIG_OFFBIG | |
_SC_XBS5_ILP32_OFF32 | |
_SC_XBS5_LP64_OFF64 | |
_SC_XOPEN_CRYPT | |
_SC_XOPEN_SHM | |
_SC_XOPEN_UNIX | |
_SC_XOPEN_XCU_VERSION |
The constants _SC_PAGESIZE and _SC_PAGE_SIZE can be defined to have the same value.
The following symbolic constants are defined for the fpathconf(2) function:
_PC_2_SYMLINKS | _PC_ALLOC_SIZE_MIN |
_PC_ASYNC_IO | _PC_CHOWN_RESTRICTED |
_PC_FILESIZEBITS | |
_PC_MAX_CANON | |
_PC_NAME_MAX | |
_PC_PATH_MAX | |
_PC_PRIO_IO | |
_PC_REC_MAX_XFER_SIZE | |
_PC_REC_XFER_ALIGN | |
_PC_SYNC_IO | |
_PC_XATTR_ENABLED |
The following symbolic constants are defined for file streams:
STDIN_FILENO
STDOUT_FILENO
STDERR_FILENO
The following pathnames are defined:
GF_PATH
PF_PATH
See attributes(5) for descriptions of the following attributes:
|
access(2), exec(2), fcntl(2), fpathconf(2), lseek(2), confstr(3C), lockf(3C), sysconf(3C), termios(3C), group(4), passwd(4), attributes(5), standards(5), termio(7I)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |