DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

unistd(4)


unistd -- header file for symbolic constants

Synopsis

   #include <unistd.h>

Description

The unistd.h header file defines the symbolic constants and structures not already defined or declared in some other header file. The contents of this file are shown below.

The following symbolic constants are defined for the access function (see access(2)):


R_OK
Test for read permission.

W_OK
Test for write permission.

X_OK
Test for execute (search) permission.

F_OK
Test for existence of file.

EFF_ONLY_OK
Use effective ids instead of real ids.

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. EFF_ONLY_OK can be ORed with any of these.

unistd declares the constant


NULL
null pointer

The following symbolic constants are defined for the lockf(3C) function:


F_ULOCK
Unlock a previously locked region.

F_LOCK
Lock a region for exclusive use.

F_TLOCK
Test and lock a region for exclusive use.

F_TEST
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):


SEEK_SET
Set file offset to offset.

SEEK_CUR
Set file offset to current plus offset.

SEEK_END
Set file offset to EOF plus offset.

The following symbolic constants are defined (with fixed values):


_POSIX_VERSION
Integer value indicating version of the POSIX standard.

_XOPEN_VERSION
Integer value indicating version of the XPG to which system is compliant.

The following symbolic constant is defined for the confstr function:


_CS_PATH
Indicates whether to use the default PATH environment variable that finds all the standard utilities.

The following symbolic constants are defined to indicate that the option is present:


_POSIX_JOB_CONTROL
Implementation supports job control.

_POSIX_SAVED_IDS
The exec(2) functions save the effective user and group.

_POSIX_VDISABLE
Terminal special characters defined in termios.h (see termio(7)) can be disabled using this character.

The following symbolic constants are defined for version test macros:


_LFS_LARGEFILE
Defined to be ``1'' if the implementation supports the fseeko(3S) and ftello(3S) functions.

_LFS_ASYNCHRONOUS_IO
Defined to be ``1'' if the implementation supports the aio_read(3aio), aio_write(3aio), and lio_listio(3S) functions.

_LFS64_LARGEFILE
Defined to be ``1'' if the implementation supports the transitional functions creat64(2), fstat64(2), fstatvfs64(2), ftruncate64(3C), ftw64(3C), getrlimit64(2), lockf64(3C), lseek64(2), lstat64(2), mmap64(2), nftw64(3C), open64(2), readdir64(3C), stat64(2), setrlimit64(2), statvfs64(2), truncate64(3C),

_LFS64_ASYNCHRONOUS_IO
Defined to be ``1'' if the implementation supports the transitional functions aio_cancel64(3aio), aio_error64(3aio), aio_fsync64(3aio), aio_read64(3aio), aio_return64(3aio), aio_suspend64(3aio), aio_write64(3aio), and lio_listio64(3S).

_LFS64_STDIO
Defined to be ``1'' if the implementation supports the transitional functions fgetpos64(3C), freopen64(3S), fsetpos64(3C), tmpfile64(3S), fopen64(3S), fseeko64(3S), and ftello64(3S),

The following symbolic constants are defined for sysconf(3C):

   _SC_ARG_MAX
   _SC_CHILD_MAX
   _SC_CLK_TCK
   _SC_JOB_CONTROL
   _SC_LOGNAME_MAX
   _SC_NACLS_MAX
   _SC_NGROUPS_MAX
   _SC_OPEN_MAX
   _SC_PAGESIZE
   _SC_PASS_MAX
   _SC_SAVED_IDS
   _SC_VERSION
   _SC_XOPEN_VERSION
   _SC_TZNAME_MAX
   _SC_STREAM_MAX
   _SC_XOPEN_SHM
   _SC_XOPEN_CRYPT
   _SC_XOPEN_ENH_I18N
   _SC_2_LOCALDEF
   _SC_BC_BASE_MAX
   _SC_BC_DIM_MAX
   _SC_BC_SCALE_MAX
   _SC_BC_STRING_MAX
   _SC_COLL_WEIGHTS_MAX
   _SC_EXPR_NEST_MAX
   _SC_LINE_MAX
   _SC_RE_DUP_MAX
   _SC_XOPEN_UNIX
   _SC_2_VERSION
   _SC_2_C_DEV
   _SC_2_C_BIND
   _SC_2_C_VERSION
   _SC_2_CHAR_TERM
   _SC_2_FORT_DEV
   _SC_2_SW_DEV
   _SC_2_UPE

The following symbolic constants are defined for fpathconf(2):

   _PC_CHOWN_RESTRICTED
   _PC_FILESIZEBITS
   _PC_LINK_MAX
   _PC_MAX_CANON
   _PC_MAX_INPUT
   _PC_NAME_MAX
   _PC_NO_TRUNC
   _PC_PATH_MAX
   _PC_PIPE_BUF
   _PC_VDISABLE

The following symbolic constants are defined for file streams:


STDIN_FILENO
File number of stdin. It is 0.

STDOUT_FILENO
File number of stout. It is 1.

STDERR_FILENO
File number of stderr. It is 2.

The following pathnames are defined:


GF_PATH
Pathname of the group file.

PF_PATH
Pathname of the passwd file.

References

access(2), exec(2), fcntl(2), fork(2), fpathconf(2), group(4), lseek(2), passwd(4), pread(2), pwrite(2), sysconf(3C), termio(7), termios(3C)

Notices

The following values for constants are defined for UnixWare:


_POSIX_VERSION
199009L

_POSIX2_VERSION
199209L

_XOPEN_VERSION
4

_XOPEN_ENH_I18N
1

_XOPEN_XPG4
1

_XOPEN_UNIX
1

_POSIX2_C_VERSION
199209L

_XOPEN_XCU_VERSION
4

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004