Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > U

unistd(5)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

unistd: unistd.h — standard structures and symbolic constants

SYNOPSIS

#include <unistd.h>

DESCRIPTION

The header <unistd.h> defines the following structures and symbolic constants:

Symbolic constants for the access() function:

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.

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.

Symbolic constant representing a null pointer:

NULL

Symbolic constants for the lseek() and fcntl() functions (the following constants 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".

Symbolic constants (with fixed values):

_POSIX_VERSION

Integer value indicating version of IEEE Std 1003.1 standard implemented. The current value is 199009L, indicating the (4-digit) year and (2-digit) month that the standard was approved by the IEEE Standards Board. However, if any of the symbols _AES_SOURCE, _XPG3, or _POSIX1_1988 is defined before <unistd.h> is included, the value of this symbol will be 198808L.

_POSIX2_VERSION

Integer value indicating version of IEEE Std1003.2 standard implemented. The current value is 199209L, indicating the (4-digit) year and (2-digit) month that the standard was approved by the IEEE Standards Board.

_POSIX2_C_VERSION

Integer value indicating version of IEEE Std 1003.2 C-Language Binding Option implemented. The current value is 199209L, indicating the (4-digit) year and (2-digit) month that the standard was approved by the IEEE Standards Board.

_XOPEN_VERSION

Integer value indicating issue number of the X/Open Portability Guide implemented. The current value is 4, indicating Issue 4. However, if the symbol _XPG3 is defined before <unistd.h> is included, the value of this symbol will be 3.

The following symbolic constants are defined in this header if the state of the corresponding option or restriction does not vary after compilation. If a symbol is absent from this header, the value or presence of the corresponding option or restriction should be determined at execution time through sysconf() or pathconf():

_POSIX_CHOWN_RESTRICTED

The use of chown() is restricted to processes that have appropriate privileges.

_POSIX_JOB_CONTROL

Implementation supports job control (true of all HP-UX implementations).

_POSIX_NO_TRUNC

Pathname components longer than NAME_MAX generate an error.

_POSIX_REALTIME_SIGNALS

Implementation supports Realtime Signals Extensions (true of all HP-UX implementations).

_POSIX_SAVED_IDS

Effective user and group are saved across an exec() call (true of all HP-UX implementations).

_POSIX_FSYNC

Implementation supports File Synchronization (true of all HP-UX implementations). See open(2).

_POSIX_SYNCHRONIZED_IO

Implementation supports Synchronized IO (true of all HP-UX implementations). See open(2).

_POSIX_VDISABLE

Terminal special characters can be disabled using this character (see termio(7)).

_POSIX_THREADS

Implementation supports POSIX threads.

_POSIX2_C_BIND

All POSIX.2 C-language functionality is provided in the default libraries used by the c89 C compiler (see cc(1)).

_POSIX2_LOCALEDEF

New locales can be defined by using the localedef command (see localedef(1M)).

_POSIX2_UPE

The system supports IEEE Std1003.2a (POSIX User Portability Utilities Option).

_POSIX2_CHAR_TERM

At least one terminal exists that supports all required POSIX.2a commands.

All symbolic constants whose names begin _CS, _PC, and _SC (see confstr(3C), pathconf(2), and sysconf(2)) are defined.

The following symbolic constants for file streams are defined:

STDIN_FILENO

File number of standard input (stdin).

STDOUT_FILENO

File number of standard output (stdout).

STDERR_FILENO

File number of standard error (stderr).

The types size_t, ssize_t, uid_t, gid_t, off_t, and pid_t are defined.

Declarations are provided for the following functions:

access()alarm()brk()chdir()
chown()chroot()close()confstr()
crypt()ctermid()cuserid()dup()
dup2()encrypt()endusershell()execl()
execle()execlp()execv()execve()
execvp()_exit()fchown()fork()
fpathconf()fsync()ftruncate()getcwd()
getegid()geteuid()getgid()getgroups()
gethostname()getlogin()getopt() 
getpass()getpgrp()getpgrp2()getpid()
getppid()getuid()getusershell()initgroups()
ioctl()isatty()link()lockf()
logname()lseek()mkstemp()mktemp()
nice()pathconf()pause()pipe()
prealloc()read()readlink()rmdir()
sbrk()setgid() setgroups()sethostname()
setpgid()setpgrp()setpgrp2()setresgid()
setresuid()setsid()setuid()setusershell()
sgetl()sleep()sputl()swab()
   
swapon() symlink()sync()sysconf()
tcgetpgrp() tcsetpgrp()truncate()ttyname()
ttyslot() unlink()vfork()write()

AUTHOR

unistd was developed by HP.

STANDARDS CONFORMANCE

<unistd.h>: AES, SVID3, XPG2, XPG3, XPG4, FIPS 151-2, POSIX.1, POSIX.2, POSIX.4

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.