Headers unistd.h(3HEAD)
NAME
unistd.h, unistd - standard symbolic constants and types
SYNOPSIS
#include
DESCRIPTION
The 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.
Version Test Macros
The following symbolic constants are defined (with fixed
values):
POSIXVERSION Integer value indicating version of
the POSIX standard (C language bind-
ing). See standards(5).
POSIX2VERSION Integer value indicating version of
the POSIX.2 standard (Commands).
POSIX2CVERSION Integer value indicating version of
the POSIX.2 standard (C language bind-
ing).
XOPENVERSION Integer value indicating version of
the XPG to which system conforms.
XOPENXCUVERSION Integer value indicating the version
of the XCU specification to which the
implementation conforms. If this con-
stant is not defined, use the
sysconf(3C) function to determine
which features are supported. This
constant is not defined for the SUSv3
environment.
Mandatory Symbolic Constants
The following symbolic constants, if defined in ,
have a value of -1, 0, or greater, unless otherwise speci-
fied below. If these are undefined, the fpathconf(2), path-
conf(2), or sysconf(3C) functions can be used to determine
whether the option is provided for a particular invocation
of the application.
SunOS 5.11 Last change: 16 Dec 2003 1
Headers unistd.h(3HEAD)
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 sup-
plied. An application that attempts to use anything associ-
ated 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 applica-
tion can check at runtime to see whether the option is sup-
ported by calling fpathconf(), pathconf(), or sysconf() with
the indicated name parameter.
Unless explicitly specified otherwise, the behavior of func-
tions 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.
POSIXADVISORYINFO
Implementation supports the Advisory Information option.
POSIXASYNCHRONOUSIO
Implementation supports the Asynchronous Input and Out-
put option.
POSIXBARIERS
Implementation supports the Barriers option.
POSIXCLOCKSELECTION
Implementation supports the Clock Selection option.
POSIXCPUTIME
Implementation supports the Process CPU-Time Clocks
option.
SunOS 5.11 Last change: 16 Dec 2003 2
Headers unistd.h(3HEAD)
POSIXFSYNC
Implementation supports the File Synchronisation option.
POSIXIPV6
Implementation supports the IPv6 option.
POSIXJOBCONTROL
Implementation supports job control.
POSIXMAPEDFILES
Implementation supports the Memory Mapped Files option.
POSIXMEMLOCK
Implementation supports the Process Memory Locking
option.
POSIXMEMLOCKRANGE
Implementation supports the Range Memory Locking option.
POSIXMEMORYPROTECTION
Implementation supports the Memory Protection option.
POSIXMESAGEPASING
Implementation supports the Message Passing option.
POSIXMONOTONICLOCK
Implementation supports the Monotonic Clock option.
POSIXPRIORITYSCHEDULING
Implementation supports the Process Scheduling option.
SunOS 5.11 Last change: 16 Dec 2003 3
Headers unistd.h(3HEAD)
POSIXRAWSOCKETS
Implementation supports the Raw Sockets option.
POSIXREADERWRITERLOCKS
Implementation supports the Read-Write Locks option.
POSIXREALTIMESIGNALS
Implementation supports the Realtime Signals Extension
option.
POSIXREGEXP
Implementation supports the Regular Expression Handling
option.
POSIXSAVEDIDS
The exec functions (see exec(2)) save the effective user
and group.
POSIXSEMAPHORES
Implementation supports the Semaphores option.
POSIXSHAREDMEMORYOBJECTS
Implementation supports the Shared Memory Objects
option.
POSIXSHEL
Implementation supports the POSIX shell.
POSIXSPAWN
Implementation supports the Spawn option.
POSIXSPINLOCKS
Implementation supports the Spin Locks option.
SunOS 5.11 Last change: 16 Dec 2003 4
Headers unistd.h(3HEAD)
POSIXSPORADICSERVER
Implementation supports the Process Sporadic Server
option.
POSIXSYNCHRONIZEDIO
Implementation supports the Synchronized Input and Out-
put option.
POSIXTHREADATRSTACKADR
Implementation supports the thread stack address attri-
bute option.
POSIXTHREADATRSTACKSIZE
Implementation supports the thread stack size attribute
option.
POSIXTHREADCPUTIME
Implementation supports the Thread CPU-Time Clocks
option.
POSIXTHREADPROCESHARED
Implementation supports the process-shared synchroniza-
tion option.
POSIXTHREADSAFEFUNCTIONS
Implementation supports the thread-safe functions
option.
POSIXTHREADSPORADICSERVER
Implementation supports the Thread Sporadic Server
option.
POSIXTHREADS
Implementation supports the threads option.
SunOS 5.11 Last change: 16 Dec 2003 5
Headers unistd.h(3HEAD)
POSIXTIMERS
Implementation supports the Timers option.
POSIXTIMEOUTS
Implementation supports the Timeouts option.
POSIXTRACE
Implementation supports the Trace option.
POSIXTRACEVENTFILTER
Implementation supports the Trace Event Filter option.
POSIXTRACEINHERIT
Implementation supports the Trace Inherit option.
POSIXTRACELOG
Implementation supports the Trace Log option.
POSIXTYPEDMEMORYOBJECTS
Implementation supports the Typed Memory Objects option.
POSIXV6ILP32OF32
Implementation provides a C-language compilation
environment with 32-bit int, long, and pointer types and
an offt type using at least 64 bits.
POSIXV6ILP32OFBIG
Implementation provides a C-language compilation
environment with 32-bit int, long, and pointer types and
an offt type using at least 64 bits.
POSIXV6LP64OF64
Implementation provides a C-language compilation
SunOS 5.11 Last change: 16 Dec 2003 6
Headers unistd.h(3HEAD)
environment with 32-bit int and 64-bit long, pointer,
and offt types.
POSIXV6LPBIGOFBIG
Implementation provides a C-language compilation
environment with an int type using at least 32 bits and
long, pointer, and offt types using at least 64 bits.
POSIXOPENSTREAMS
Implementation supports the XSI STREAMS Option Group.
POSIX2CBIND
Implementation supports the C Language Binding option.
POSIX2CDEV
Implementation supports the C Language Development Util-
ities option.
POSIX2CHARTERM
Implementation supports at least one terminal type.
POSIX2LOCALEDEF
Implementation supports the creation of locales by the
localedef(1) utility.
POSIX2PBS
Implementation supports the Batch Environment Services
and Utilities option.
POSIX2PBSACOUNTING
Implementation supports the Batch Accounting option.
POSIX2PBSCHECKPOINT
Implementation supports the Batch Checkpoint/Restart
SunOS 5.11 Last change: 16 Dec 2003 7
Headers unistd.h(3HEAD)
option.
POSIX2PBSLOCATE
Implementation supports the Locate Batch Job Request
option.
POSIX2PBSMESAGE
Implementation supports the Batch Job Message Request
option.
POSIX2PBSTRACK
Implementation supports the Track Batch Job Request
option.
POSIX2SWDEV
Implementation supports the Software Development Utili-
ties option.
POSIX2UPE
Implementation supports the User Portability Utilities
option.
XBS5ILP32OF32
Implementation provides a C-language compilation
environment with 32-bit int, long, pointer and offt
types.
XBS5ILP32OFBIG
Implementation provides a C-language compilation
environment with 32-bit int, long and pointer types and
an offt type using at least 64 bits.
XBS5LP64OF64
Implementation provides a C-language compilation
environment with 32-bit int and 64-bit long, pointer and
offt types.
SunOS 5.11 Last change: 16 Dec 2003 8
Headers unistd.h(3HEAD)
XBS5LPBIGOFBIG
Implementation provides a C-language compilation
environment with an int type using at least 32 bits and
long, pointer and offt types using at least 64 bits.
XOPENENHI18N
Implementation supports the Issue 4, Version 2 Enhanced
Internationalization Feature Group.
XOPENLEGACY
Implementation supports the Legacy Feature Group.
XOPENREALTIME
Implementation supports the X/Open Realtime Feature
Group.
XOPENSHM
Implementation supports the Issue 4, Version 2 Shared
Memory Feature Group.
XOPENUNIX
X/Open CAE Specification, January 1997, System Inter-
faces and Headers, Issue 5 (ISBN: 1-85912-181-0, C606).
XOPENXPG3
X/Open Specification, February 1992, System Interfaces
and Headers, Issue 3 (ISBN: 1-872630-37-5, C212); this
specification was formerly X/Open Portability Guide,
Issue 3, Volume 2, January 1989, XSI System Interface
and Headers (ISBN: 0-13-685843-0, XO/XPG/89/003).
XOPENXPG4
X/Open CAE Specification, July 1992, System Interfaces
and Headers, Issue 4 (ISBN: 1-872630-47-2, C202).
SunOS 5.11 Last change: 16 Dec 2003 9
Headers unistd.h(3HEAD)
Execution-time Symbolic Constants
If any of the following constants are not defined in the
header , 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 , the implementation will not
provide the option on any file; if any are defined to have a
value other than -1 in the header , the implemen-
tation will provide the option on all applicable files.
All of the following constants, whether defined in
or not, can be queried with respect to a specific
file using the pathconf() or fpathconf() functions.
POSIXASYNCIO Asynchronous input or output operations
can be performed for the associated file.
POSIXPRIOIO Prioritized input or output operations
can be performed for the associated file.
POSIXSYNCIO Synchronized input or output operations
can be performed for the associated file.
Constants for Functions
The following constant is defined:
NUL Null pointer.
The following symbolic constants are defined for the
access(2) function:
ROK Test for read permission.
WOK Test for write permission.
XOK Test for execute (search) permission.
FOK Test for existence of file.
SunOS 5.11 Last change: 16 Dec 2003 10
Headers unistd.h(3HEAD)
The constants FOK, ROK, WOK, and XOK, and the expres-
sions ROKWOK, ROKXOK, and ROKWOKXOK all have dis-
tinct values.
The following symbolic constants are defined for the
lockf(3C) function:
FULOCK Unlock a previously locked region.
FLOCK Lock a region for exclusive use.
FTLOCK Test and lock a region for exclusive use.
FTEST Test a region for other processes locks.
The following symbolic constants are defined for the
lseek(2) and fcntl(2) functions (they have distinct values):
SEKSET Set file offset to offset.
SEKCUR Set file offset to current plus offset.
SEKEND Set file offset to EOF plus offset.
The following symbolic constants are defined for the
confstr(3C) function for both SPARC and x86:
CSLFS64CFLAGS CSLFS64LDFLAGS
CSLFS64LIBS CSLFS64LINTFLAGS
CSLFSCFLAGS CSLFSLDFLAGS
CSLFSLIBS CSLFSLINTFLAGS
CSPATH CSPOSIXV6ILP32OF32CFLAGS
CSPOSIXV6ILP32OF32LDFLAGS CSPOSIXV6ILP32OF32LIBS
CSPOSIXV6ILP32OF32LINTFLAGS CSPOSIXV6ILP32OFBIGCFLAGS
CSPOSIXV6ILP32OFBIGLDFLAGS CSPOSIXV6ILP32OFBIGLIBS
CSPOSIXV6ILP32OFBIGLINTFLAGS CSPOSIXV6WIDTHRESTRICTEDENV
CSXBS5ILP32OF32CFLAGS CSXBS5ILP32OF32LDFLAGS
CSXBS5ILP32OF32LIBS CSXBS5ILP32OF32LINTFLAGS
CSXBS5ILP32OFBIGCFLAGS CSXBS5ILP32OFBIGLDFLAGS
CSXBS5ILP32OFBIGLIBS CSXBS5ILP32OFBIGLINTFLAGS
SunOS 5.11 Last change: 16 Dec 2003 11
Headers unistd.h(3HEAD)
The followwing symbolic constants are defined for the
confstr() function for SPARC only:
CSPOSIXV6LP64OF64CFLAGS CSPOSIXV6LP64OF64LDFLAGS
CSPOSIXV6LP64OF64LIBS CSPOSIXV6LP64OF64LINTFLAGS
CSPOSIXV6LPBIGOFBIGCFLAGS CSPOSIXV6LPBIGOFBIGLDFLAGS
CSPOSIXV6LPBIGOFBIGLIBS CSPOSIXV6LPBIGOFBIGLINTFLAGS
CSXBS5LP64OF64CFLAGS CSXBS5LP64OF64LDFLAGS
CSXBS5LP64OF64LIBS CSXBS5LP64OF64LINTFLAGS
CSXBS5LPBIGOFBIGCFLAGS CSXBS5LPBIGOFBIGLDFLAGS
CSXBS5LPBIGOFBIGLIBS CSXBS5LPBIGOFBIGLINTFLAGS
The following symbolic constants are defined for the
sysconf(3C) function:
SC2CBIND SC2CDEV
SC2CVERSION SC2FORTDEV
SC2FORTRUN SC2LOCALEDEF
SC2PBS SC2PBSACOUNTING
SC2PBSCHECKPOINT SC2PBSLOCATE
SC2PBSMESAGE SC2PBSTRACK
SC2SWDEV SC2UPE
SC2VERSION SCADVISORYINFO
SCAIOLISTIOMAX SCAIOMAX
SCAIOPRIODELTAMAX SCARGMAX
SCASYNCHRONOUSIO SCATEXITMAX
SCAVPHYSPAGES SCBARIERS
SCBCBASEMAX SCBCDIMAX
SCBCSCALEMAX SCBCSTRINGMAX
SCHILDMAX SCLKTCK
SCLOCKSELECTION SCOLWEIGHTSMAX
SCPUTIME SCDELAYTIMERMAX
SCEXPRNESTMAX SCFSYNC
SCGETGRSIZEMAX SCGETPWRSIZEMAX
SCHOSTNAMEMAX SCIOVMAX
SCIPV6 SCJOBCONTROL
SCLINEMAX SCLOGINAMEMAX
SCLOGNAMEMAX SCMAPEDFILES
SCMEMLOCK SCMEMLOCKRANGE
SCMEMORYPROTECTION SCMESAGEPASING
SCMONOTONICLOCK SCMQOPENMAX
SCMQPRIOMAX SCNGROUPSMAX
SCNPROCESORSCONF SCNPROCESORSONLN
SCOPENMAX SCPAGESIZE
SCPAGESIZE SCPASMAX
SCPHYSPAGES SCPRIORITIZEDIO
SunOS 5.11 Last change: 16 Dec 2003 12
Headers unistd.h(3HEAD)
SCPRIORITYSCHEDULING SCRAWSOCKETS
SCREADERWRITERLOCKS SCREALTIMESIGNALS
SCREGEXP SCREDUPMAX
SCRTSIGMAX SCSAVEDIDS
SCSEMAPHORES SCSEMNSEMSMAX
SCSEMVALUEMAX SCSHAREDMEMORYOBJECTS
SCSHEL SCSIGQUEUEMAX
SCSPAWN SCSPINLOCKS
SCSPORADICSERVER SCSREPLMAX
SCSTREAMAX SCSYMLOPMAX
SCSYNCHRONIZEDIO SCTHREADATRSTACKADR
SCTHREADATRSTACKSIZE SCTHREADCPUTIME
SCTHREADESTRUCTORITERATIONS SCTHREADKEYSMAX
SCTHREADPRIOINHERIT SCTHREADPRIOPROTECT
SCTHREADPRIORITYSCHEDULING SCTHREADPROCESHARED
SCTHREADSPORADICSERVER SCTHREADS
SCTHREADSAFEFUNCTIONS SCTHREADSTACKMIN
SCTHREADTHREADSMAX SCTIMEOUTS
SCTIMERMAX SCTIMERS
SCTRACE SCTRACEVENTFILTER
SCTRACEVENTNAMEMAX SCTRACEINHERIT
SCTRACELOG SCTRACENAMEMAX
SCTRACESYSMAX SCTRACEUSEREVENTMAX
SCTYNAMEMAX SCTYPEDMEMORYOBJECTS
SCTZNAMEMAX SCV6ILP32OF32
SCV6ILP32OFBIG SCV6LP64OF64
SCV6LPBIGOFBIG SCVERSION
SCXBS5ILP32OF32 SCXBS5ILP32OFBIG
SCXBS5LP64OF64 SCXBS5LPBIGOFBIG
SCXOPENCRYPT SCXOPENENHI18N
SCXOPENSHM SCXOPENSTREAMS
SCXOPENUNIX SCXOPENVERSION
SCXOPENXCUVERSION
The constants SCPAGESIZE and SCPAGESIZE can be defined
to have the same value.
The following symbolic constants are defined for the fpath-
conf(2) function:
PC2SYMLINKS PCALOCSIZEMIN
PCASYNCIO PCHOWNRESTRICTED
PCFILESIZEBITS PCLINKMAX
PCMAXCANON PCMAXINPUT
PCNAMEMAX PCNOTRUNC
PCPATHMAX PCPIPEBUF
PCPRIOIO PCRECINCRXFERSIZE
SunOS 5.11 Last change: 16 Dec 2003 13
Headers unistd.h(3HEAD)
PCRECMAXFERSIZE PCRECMINXFERSIZE
PCRECXFERALIGN PCSYMLINKMAX
PCSYNCIO PCVDISABLE
PCXATRENABLED PCXATREXISTS
The following symbolic constants are defined for file
streams:
STDINFILENO File number (0) of stdin.
STDOUTFILENO File number (1) of stout.
STDERFILENO File number (2) of stderr.
The following pathnames are defined:
GFPATH Pathname of the group file.
PFPATH Pathname of the passwd file.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Standard
SEE ALSO
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)
SunOS 5.11 Last change: 16 Dec 2003 14
|