Advanced Programming in the UNIX® Environment

(lily) #1
ptg10805159

866 Function Prototypes Appendix A


int openat(intfd,const char *path,intoflag,...
/* mode_tmode*/ );
<fcntl.h> p. 62
oflag:O_RDONLY, O_WRONLY, O_RDWR, O_EXEC,
O_SEARCH;
O_APPEND, O_CLOEXEC, O_CREAT,
O_DIRECTORY, O_DSYNC, O_EXCL,
O_NOCTTY, O_NOFOLLOW, O_NONBLOCK,
O_RSYNC, O_SYNC, O_TRUNC, O_TTY_INIT
mode:S_IS[UG]ID, S_ISVTX,
S_I[RWX](USR|GRP|OTH)
Returns: file descriptor if OK,−1 on error
Platforms:O_FSYNCflag on FreeBSD 8.0 and Mac OS X 10.6.8

DIR *opendir(const char *path);
<dirent.h> p. 130
Returns: pointer if OK,NULLon error

void openlog(const char *ident,intoption,intfacility);
<syslog.h> p. 470
option:LOG_CONS, LOG_NDELAY, LOG_NOWAIT,
LOG_ODELAY, LOG_PERROR, LOG_PID
facility:LOG_AUTH, LOG_AUTHPRIV, LOG_CRON,
LOG_DAEMON, LOG_FTP, LOG_KERN,
LOG_LOCAL[0-7], LOG_LPR, LOG_MAIL,
LOG_NEWS, LOG_SYSLOG, LOG_USER, LOG_UUCP

FILE *open_memstream(char **bufp,size_t *sizep);
<stdio.h> p. 173
Returns: stream pointer if OK,NULLon error

FILE *open_wmemstream(wchar_t **bufp,size_t *sizep);
<wchar.h> p. 173
Returns: stream pointer if OK,NULLon error

long pathconf(const char *path,intname);
<unistd.h> p. 42
name:_PC_ASYNC_IO, _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_PRIO_IO, _PC_SYMLINK_MAX,
_PC_SYNC_IO, _PC_TIMESTAMP_RESOLUTION,
_PC_2_SYMLINKS, _PC_VDISABLE
Returns: corresponding value if OK,−1 on error

int pause(void);
<unistd.h> p. 338
Returns:−1witherrnoset toEINTR
Free download pdf