next up previous contents index
Next: 12.4.32 utime.h: file times Up: 12.4 Header Files Previous: 12.4.30 termios.h: terminal handling

12.4.31 unistd.h: POSIX standard symbolic constants

 

DESCRIPTION

This file contains the required symbolic constants for a POSIX system. These include the symbolic access and seek constants:
R_OK
Test for read permission.
W_OK
Test for write permission.
X_OK
Test for execute permission.
F_OK
Test for file existence.
SEEK_SET
Set file offset to value.
SEEK_CUR
Set file offset to current plus value.
SEEK_END
Set file offset to EOF plus value.

This file defines no POSIX compile-time or execution-time constants. Additionally defined are the constants:
STDIN_FILENO
File descriptor for stdin.
STDOUT_FILENO
File descriptor for stdout.
STDERR_FILENO
File descriptor for stderr.

prototypes for standard POSIX functions:
_exit
Terminate a process.
access
Check file accessibility.
close
Close a file.
lseek
Reposition read/write file offset.
read
Read from a file.
unlink
Remove directory entries.
write
Write to a file.

Of the above routines, only _exit is considered part of the minimal C library. The remaining functions are part of the extended POSIX environment. Refer to Section 17 for details.



Utah Flux Research Group