unistd(F)


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(S)):


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(S) 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(S) and fcntl(S) 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(S) functions save the effective user and group.

_POSIX_VDISABLE
Terminal special characters defined in termios.h (see termio(HW)) 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(S) and ftello(S) functions.

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

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

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

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

The following symbolic constants are defined for sysconf(S):

   _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(S):

   _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(S), exec(S), fcntl(S), fork(S), fpathconf(S), group(F), lseek(S), passwd(F), pread(S), pwrite(S), sysconf(S), termio(HW), termios(S)

Notices

The following values for constants are defined for:


_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

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 02 June 2005