diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2005-11-03 23:33:53 +0000 |
---|---|---|
committer | Peter S. Mazinger <ps.m@gmx.net> | 2005-11-03 23:33:53 +0000 |
commit | c72bf65f092dfa5e52d140a5dd189ded4119b5fd (patch) | |
tree | 2fcb0b130789d7e60b7d33ef5b285780dc235453 /include | |
parent | 40980904dd9bffd2c21a757401bddf235841c590 (diff) |
Sync w/ glibc
Diffstat (limited to 'include')
-rw-r--r-- | include/unistd.h | 296 |
1 files changed, 201 insertions, 95 deletions
diff --git a/include/unistd.h b/include/unistd.h index 6ee8732dd..bb5cfd4bd 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1991-2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -30,34 +30,30 @@ __BEGIN_DECLS /* These may be used to determine what facilities are present at compile time. Their values can be obtained at run time from `sysconf'. */ -/* POSIX Standard approved as ISO/IEC 9945-1 as of August, 1988 and - extended by POSIX-1b (aka POSIX-4) and POSIX-1c (aka POSIX threads). */ -#define _POSIX_VERSION 199506L +/* POSIX Standard approved as ISO/IEC 9945-1 as of December 2001. */ +#define _POSIX_VERSION 200112L /* These are not #ifdef __USE_POSIX2 because they are in the theoretically application-owned namespace. */ -/* POSIX Standard approved as ISO/IEC 9945-2 as of December, 1993. */ -#define _POSIX2_C_VERSION 199209L - /* The utilities on GNU systems also correspond to this version. */ -#define _POSIX2_VERSION 199209L +#define _POSIX2_VERSION 200112L /* If defined, the implementation supports the C Language Bindings Option. */ -#define _POSIX2_C_BIND 1 +#define _POSIX2_C_BIND 200112L /* If defined, the implementation supports the C Language Development Utilities Option. */ -#define _POSIX2_C_DEV 1 +#define _POSIX2_C_DEV 200112L /* If defined, the implementation supports the Software Development Utilities Option. */ -#define _POSIX2_SW_DEV 1 +#define _POSIX2_SW_DEV 200112L /* If defined, the implementation supports the creation of locales with the localedef utility. */ -#define _POSIX2_LOCALEDEF 1 +#define _POSIX2_LOCALEDEF 200112L /* X/Open version number to which the library conforms. It is selectable. */ #ifdef __USE_UNIX98 @@ -198,7 +194,7 @@ typedef __ssize_t ssize_t; #define __need_NULL #include <stddef.h> -#ifdef __USE_XOPEN +#if defined __USE_XOPEN || defined __USE_XOPEN2K /* The Single Unix specification says that some more types are available here. */ # ifndef __gid_t_defined @@ -257,7 +253,14 @@ typedef __socklen_t socklen_t; #define F_OK 0 /* Test for existence. */ /* Test for access to NAME using the real UID and real GID. */ -extern int access (__const char *__name, int __type) __THROW; +extern int access (__const char *__name, int __type) __THROW __nonnull ((1)); + +#if 0 /* def __USE_GNU */ +/* Test for access to NAME using the effective UID and GID + (as normal file operations use). */ +extern int euidaccess (__const char *__name, int __type) + __THROW __nonnull ((1)); +#endif /* Values for the WHENCE argument to lseek. */ @@ -285,9 +288,8 @@ extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW; #else # ifdef __REDIRECT extern __off64_t __REDIRECT (lseek, - (int __fd, __off64_t __offset, int __whence) - __THROW, - lseek64); + (int __fd, __off64_t __offset, int __whence), + lseek64); # else # define lseek lseek64 # endif @@ -296,31 +298,51 @@ extern __off64_t __REDIRECT (lseek, extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) __THROW; #endif -/* Close the file descriptor FD. */ -extern int close (int __fd) __THROW; +/* Close the file descriptor FD. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int close (int __fd); /* Read NBYTES into BUF from FD. Return the - number read, -1 for errors or 0 for EOF. */ -extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __THROW; + number read, -1 for errors or 0 for EOF. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern ssize_t read (int __fd, void *__buf, size_t __nbytes); + +/* Write N bytes of BUF to FD. Return the number written, or -1. -/* Write N bytes of BUF to FD. Return the number written, or -1. */ -extern ssize_t write (int __fd, __const void *__buf, size_t __n) __THROW; + This function is a cancellation point and therefore not marked with + __THROW. */ +extern ssize_t write (int __fd, __const void *__buf, size_t __n); #ifdef __USE_UNIX98 # ifndef __USE_FILE_OFFSET64 -extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) - __THROW; +/* Read NBYTES into BUF from FD at the given position OFFSET without + changing the file pointer. Return the number read, -1 for errors + or 0 for EOF. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, + __off_t __offset); + +/* Write N bytes of BUF to FD at the given position OFFSET without + changing the file pointer. Return the number written, or -1. + + This function is a cancellation point and therefore not marked with + __THROW. */ extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, - __off_t __offset) __THROW; + __off_t __offset); # else # ifdef __REDIRECT extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes, - __off64_t __offset) __THROW, + __off64_t __offset), pread64); extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf, - size_t __nbytes, __off64_t __offset) - __THROW, - pwrite64); + size_t __nbytes, __off64_t __offset), + pwrite64); # else # define pread pread64 # define pwrite pwrite64 @@ -332,11 +354,11 @@ extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf, changing the file pointer. Return the number read, -1 for errors or 0 for EOF. */ extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, - __off64_t __offset) __THROW; + __off64_t __offset); /* Write N bytes of BUF to FD at the given position OFFSET without changing the file pointer. Return the number written, or -1. */ extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, - __off64_t __offset) __THROW; + __off64_t __offset); # endif #endif @@ -361,8 +383,11 @@ extern unsigned int alarm (unsigned int __seconds) __THROW; If a signal handler does a `longjmp' or modifies the handling of the SIGALRM signal while inside `sleep' call, the handling of the SIGALRM signal afterwards is undefined. There is no return value to indicate - error, but if `sleep' returns SECONDS, it probably didn't work. */ -extern unsigned int sleep (unsigned int __seconds) __THROW; + error, but if `sleep' returns SECONDS, it probably didn't work. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern unsigned int sleep (unsigned int __seconds); #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Set an alarm to go off (generating a SIGALRM signal) in VALUE @@ -373,19 +398,25 @@ extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) __THROW; /* Sleep USECONDS microseconds, or until a signal arrives that is not blocked - or ignored. */ -extern int usleep (__useconds_t __useconds) __THROW; + or ignored. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int usleep (__useconds_t __useconds); #endif /* Suspend the process until a signal arrives. - This always returns -1 and sets `errno' to EINTR. */ -extern int pause (void) __THROW; + This always returns -1 and sets `errno' to EINTR. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int pause (void); /* Change the owner and group of FILE. */ extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) - __THROW; + __THROW __nonnull ((1)); #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Change the owner and group of the file that FD is open on. */ @@ -395,12 +426,12 @@ extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __THROW; /* Change owner and group of FILE, if it is a symbolic link the ownership of the symbolic link is changed. */ extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) - __THROW; + __THROW __nonnull ((1)); #endif /* Use BSD || X/Open Unix. */ /* Change the process's working directory to PATH. */ -extern int chdir (__const char *__path) __THROW; +extern int chdir (__const char *__path) __THROW __nonnull ((1)); #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Change the process's working directory to the one FD is open on. */ @@ -416,11 +447,19 @@ extern int fchdir (int __fd) __THROW; big as necessary. */ extern char *getcwd (char *__buf, size_t __size) __THROW; +#ifdef __USE_GNU /* Return a malloc'd string containing the current directory name. If the environment variable `PWD' is set, and its value is correct, that value is used. */ extern char *get_current_dir_name (void) __THROW; +#endif +#if 0 /* defined __USE_BSD || defined __USE_XOPEN_EXTENDED */ +/* Put the absolute pathname of the current working directory in BUF. + If successful, return BUF. If not, put an error message in + BUF and return NULL. BUF should be at least PATH_MAX bytes long. */ +extern char *getwd (char *__buf) __THROW __nonnull ((1)); +#endif /* Duplicate FD, returning a new file descriptor on the same file. */ @@ -439,27 +478,40 @@ extern char **environ; /* Replace the current process, executing PATH with arguments ARGV and environment ENVP. ARGV and ENVP are terminated by NULL pointers. */ extern int execve (__const char *__path, char *__const __argv[], - char *__const __envp[]) __THROW; + char *__const __envp[]) __THROW __nonnull ((1)); + +#if 0 /* def __USE_GNU */ +/* Execute the file FD refers to, overlaying the running program image. + ARGV and ENVP are passed to the new program, as for `execve'. */ +extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) + __THROW; +#endif + /* Execute PATH with arguments ARGV and environment from `environ'. */ -extern int execv (__const char *__path, char *__const __argv[]) __THROW; +extern int execv (__const char *__path, char *__const __argv[]) + __THROW __nonnull ((1)); /* Execute PATH with all arguments after PATH until a NULL pointer, and the argument after that for environment. */ -extern int execle (__const char *__path, __const char *__arg, ...) __THROW; +extern int execle (__const char *__path, __const char *__arg, ...) + __THROW __nonnull ((1)); /* Execute PATH with all arguments after PATH until a NULL pointer and environment from `environ'. */ -extern int execl (__const char *__path, __const char *__arg, ...) __THROW; +extern int execl (__const char *__path, __const char *__arg, ...) + __THROW __nonnull ((1)); /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with arguments ARGV and environment from `environ'. */ -extern int execvp (__const char *__file, char *__const __argv[]) __THROW; +extern int execvp (__const char *__file, char *__const __argv[]) + __THROW __nonnull ((1)); /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with all arguments after FILE until a NULL pointer and environment from `environ'. */ -extern int execlp (__const char *__file, __const char *__arg, ...) __THROW; +extern int execlp (__const char *__file, __const char *__arg, ...) + __THROW __nonnull ((1)); #if defined __USE_MISC || defined __USE_XOPEN @@ -478,7 +530,8 @@ extern void _exit (int __status) __attribute__ ((__noreturn__)); #include <bits/confname.h> /* Get file-specific configuration information about PATH. */ -extern long int pathconf (__const char *__path, int __name) __THROW; +extern long int pathconf (__const char *__path, int __name) + __THROW __nonnull ((1)); /* Get file-specific configuration about descriptor FD. */ extern long int fpathconf (int __fd, int __name) __THROW; @@ -504,7 +557,7 @@ extern __pid_t getppid (void) __THROW; extern __pid_t getpgrp (void) __THROW; #else # ifdef __REDIRECT -extern __pid_t __REDIRECT (getpgrp, (__pid_t __pid) __THROW, __getpgid); +extern __pid_t __REDIRECT (getpgrp, (__pid_t __pid), __getpgid); # else # define getpgrp __getpgid # endif @@ -543,8 +596,7 @@ extern int setpgrp (void) __THROW; /* Another name for `setpgid' (above). */ # ifdef __REDIRECT -extern int __REDIRECT (setpgrp, (__pid_t __pid, __pid_t __pgrp) __THROW, - setpgid); +extern int __REDIRECT (setpgrp, (__pid_t __pid, __pid_t __pgrp), setpgid); # else # define setpgrp setpgid # endif @@ -579,6 +631,11 @@ extern __gid_t getegid (void) __THROW; of its supplementary groups in LIST and return the number written. */ extern int getgroups (int __size, __gid_t __list[]) __THROW; +#if 0 /* def __USE_GNU */ +/* Return nonzero iff the calling process is in group GID. */ +extern int group_member (__gid_t __gid) __THROW; +#endif + /* Set the user ID of the calling process to UID. If the calling process is the super-user, set the real and effective user IDs, and the saved set-user-ID to UID; @@ -654,33 +711,42 @@ extern char *ttyname (int __fd) __THROW; /* Store at most BUFLEN characters of the pathname of the terminal FD is open on in BUF. Return 0 on success, otherwise an error number. */ -extern int ttyname_r (int __fd, char *__buf, size_t __buflen) __THROW; +extern int ttyname_r (int __fd, char *__buf, size_t __buflen) + __THROW __nonnull ((2)); /* Return 1 if FD is a valid descriptor associated with a terminal, zero if not. */ extern int isatty (int __fd) __THROW; +#if 0 /* defined __USE_BSD \ + || (defined __USE_XOPEN_EXTENDED && !defined __USE_UNIX98) */ +/* Return the index into the active-logins file (utmp) for + the controlling terminal. */ +extern int ttyslot (void) __THROW; +#endif /* Make a link to FROM named TO. */ -extern int link (__const char *__from, __const char *__to) __THROW; +extern int link (__const char *__from, __const char *__to) + __THROW __nonnull ((1, 2)); -#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K /* Make a symbolic link to FROM named TO. */ -extern int symlink (__const char *__from, __const char *__to) __THROW; +extern int symlink (__const char *__from, __const char *__to) + __THROW __nonnull ((1, 2)); /* Read the contents of the symbolic link PATH into no more than LEN bytes of BUF. The contents are not null-terminated. Returns the number of characters read, or -1 for errors. */ extern int readlink (__const char *__restrict __path, char *__restrict __buf, - size_t __len) __THROW; + size_t __len) __THROW __nonnull ((1, 2)); #endif /* Use BSD. */ /* Remove the link NAME. */ -extern int unlink (__const char *__name) __THROW; +extern int unlink (__const char *__name) __THROW __nonnull ((1)); /* Remove the directory PATH. */ -extern int rmdir (__const char *__path) __THROW; +extern int rmdir (__const char *__path) __THROW __nonnull ((1)); /* Return the foreground process group ID of FD. */ @@ -690,15 +756,25 @@ extern __pid_t tcgetpgrp (int __fd) __THROW; extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __THROW; -/* Return the login name of the user. */ -extern char *getlogin (void) __THROW; +/* Return the login name of the user. + + This function is a possible cancellation points and therefore not + marked with __THROW. */ +extern char *getlogin (void); #if defined __USE_REENTRANT || defined __USE_UNIX98 /* Return at most NAME_LEN characters of the login name of the user in NAME. If it cannot be determined or some other error occurred, return the error - code. Otherwise return 0. */ -extern int getlogin_r (char *__name, size_t __name_len) __THROW; + code. Otherwise return 0. + + This function is a possible cancellation points and therefore not + marked with __THROW. */ +extern int getlogin_r (char *__name, size_t __name_len) __nonnull ((1)); #endif +#if 0 /* def __USE_BSD */ +/* Set the login name returned by `getlogin'. */ +extern int setlogin (__const char *__name) __THROW __nonnull ((1)); +#endif #ifdef __USE_POSIX2 @@ -706,7 +782,7 @@ extern int getlogin_r (char *__name, size_t __name_len) __THROW; arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. */ # define __need_getopt -# include <bits/getopt.h> +# include <getopt.h> #endif @@ -714,14 +790,15 @@ extern int getlogin_r (char *__name, size_t __name_len) __THROW; /* Put the name of the current host in no more than LEN bytes of NAME. The result is null-terminated if LEN is large enough for the full name and the terminator. */ -extern int gethostname (char *__name, size_t __len) __THROW; +extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1)); #endif #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98) /* Set the name of the current host to NAME, which is LEN bytes long. This call is restricted to the super-user. */ -extern int sethostname (__const char *__name, size_t __len) __THROW; +extern int sethostname (__const char *__name, size_t __len) + __THROW __nonnull ((1)); /* Set the current machine's Internet number to ID. This call is restricted to the super-user. */ @@ -731,8 +808,10 @@ extern int sethostid (long int __id) __THROW; /* Get and set the NIS (aka YP) domain name, if any. Called just like `gethostname' and `sethostname'. The NIS domain name is usually the empty string when not using NIS. */ -extern int getdomainname (char *__name, size_t __len) __THROW; -extern int setdomainname (__const char *__name, size_t __len) __THROW; +extern int getdomainname (char *__name, size_t __len) + __THROW __nonnull ((1)); +extern int setdomainname (__const char *__name, size_t __len) + __THROW __nonnull ((1)); /* Revoke access permissions to all processes currently communicating @@ -740,12 +819,26 @@ extern int setdomainname (__const char *__name, size_t __len) __THROW; group of the control terminal. */ extern int vhangup (void) __THROW; +#if 0 +/* Revoke the access of all descriptors currently open on FILE. */ +extern int revoke (__const char *__file) __THROW __nonnull ((1)); + + +/* Enable statistical profiling, writing samples of the PC into at most + SIZE bytes of SAMPLE_BUFFER; every processor clock tick while profiling + is enabled, the system examines the user PC and increments + SAMPLE_BUFFER[((PC - OFFSET) / 2) * SCALE / 65536]. If SCALE is zero, + disable profiling. Returns zero on success, -1 on error. */ +extern int profil (unsigned short int *__sample_buffer, size_t __size, + size_t __offset, unsigned int __scale) + __THROW __nonnull ((1)); +#endif /* Turn accounting on if NAME is an existing file. The system will then write a record for each process as it terminates, to this file. If NAME is NULL, turn accounting off. This call is restricted to the super-user. */ -extern int acct (__const char *__name) __THROW; +extern int acct (__const char *__name) __THROW __nonnull ((1)); /* Successive calls return the shells listed in `/etc/shells'. */ @@ -754,7 +847,7 @@ extern void endusershell (void) __THROW; /* Discard cached info. */ extern void setusershell (void) __THROW; /* Rewind and re-read the file. */ -#if defined __ARCH_HAS_MMU__ +#ifdef __ARCH_HAS_MMU__ /* Put the program in the background, and dissociate from the controlling terminal. If NOCHDIR is zero, do `chdir ("/")'. If NOCLOSE is zero, redirects stdin, stdout, and stderr to /dev/null. */ @@ -766,24 +859,27 @@ extern int daemon (int __nochdir, int __noclose) __THROW; #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K) /* Make PATH be the root directory (the starting point for absolute paths). This call is restricted to the super-user. */ -extern int chroot (__const char *__path) __THROW; +extern int chroot (__const char *__path) __THROW __nonnull ((1)); /* Prompt with PROMPT and read a string from the terminal without echoing. Uses /dev/tty if possible; otherwise stderr and stdin. */ -extern char *getpass (__const char *__prompt) __THROW; +extern char *getpass (__const char *__prompt) __nonnull ((1)); #endif /* Use BSD || X/Open. */ #if defined __USE_BSD || defined __USE_XOPEN -/* Make all changes done to FD actually appear on disk. */ -extern int fsync (int __fd) __THROW; +/* Make all changes done to FD actually appear on disk. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int fsync (int __fd); #endif /* Use BSD || X/Open. */ #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED -/* Return the current machine's Internet number. */ -extern long int gethostid (void) __THROW; +/* Return identifier for the current host. */ +extern long int gethostid (void); /* Make all changes done to all files actually appear on disk. */ extern void sync (void) __THROW; @@ -794,29 +890,40 @@ extern void sync (void) __THROW; extern int getpagesize (void) __THROW __attribute__ ((__const__)); +/* Return the maximum number of file descriptors + the current process could possibly have. */ +extern int getdtablesize (void) __THROW; + + /* Truncate FILE to LENGTH bytes. */ # ifndef __USE_FILE_OFFSET64 -extern int truncate (__const char *__file, __off_t __length) __THROW; +extern int truncate (__const char *__file, __off_t __length) + __THROW __nonnull ((1)); # else # ifdef __REDIRECT extern int __REDIRECT (truncate, - (__const char *__file, __off64_t __length) __THROW, - truncate64); + (__const char *__file, __off64_t __length), + truncate64) __nonnull ((1)); # else # define truncate truncate64 # endif # endif # ifdef __USE_LARGEFILE64 -extern int truncate64 (__const char *__file, __off64_t __length) __THROW; +extern int truncate64 (__const char *__file, __off64_t __length) + __THROW __nonnull ((1)); # endif +#endif /* Use BSD || X/Open Unix. */ + +#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K + /* Truncate the file FD is open on to LENGTH bytes. */ # ifndef __USE_FILE_OFFSET64 extern int ftruncate (int __fd, __off_t __length) __THROW; # else # ifdef __REDIRECT -extern int __REDIRECT (ftruncate, (int __fd, __off64_t __length) __THROW, - ftruncate64); +extern int __REDIRECT (ftruncate, (int __fd, __off64_t __length), + ftruncate64); # else # define ftruncate ftruncate64 # endif @@ -825,12 +932,7 @@ extern int __REDIRECT (ftruncate, (int __fd, __off64_t __length) __THROW, extern int ftruncate64 (int __fd, __off64_t __length) __THROW; # endif - -/* Return the maximum number of file descriptors - the current process could possibly have. */ -extern int getdtablesize (void) __THROW; - -#endif /* Use BSD || X/Open Unix. */ +#endif /* Use BSD || X/Open Unix || POSIX 2003. */ #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED @@ -870,7 +972,10 @@ extern long int syscall (long int __sysno, ...) __THROW; /* `lockf' is a simpler interface to the locking facilities of `fcntl'. LEN is always relative to the current file position. - The CMD argument is one of the following. */ + The CMD argument is one of the following. + + This function is a cancellation point and therefore not marked with + __THROW. */ # define F_ULOCK 0 /* Unlock a previously locked region. */ # define F_LOCK 1 /* Lock a region for exclusive use. */ @@ -878,17 +983,17 @@ extern long int syscall (long int __sysno, ...) __THROW; # define F_TEST 3 /* Test a region for other processes locks. */ # ifndef __USE_FILE_OFFSET64 -extern int lockf (int __fd, int __cmd, __off_t __len) __THROW; +extern int lockf (int __fd, int __cmd, __off_t __len); # else # ifdef __REDIRECT -extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len) __THROW, +extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len), lockf64); # else # define lockf lockf64 # endif # endif # ifdef __USE_LARGEFILE64 -extern int lockf64 (int __fd, int __cmd, __off64_t __len) __THROW; +extern int lockf64 (int __fd, int __cmd, __off64_t __len); # endif #endif /* Use misc and F_LOCK not already defined. */ @@ -917,11 +1022,12 @@ extern int fdatasync (int __fildes) __THROW; be defined here. */ #ifdef __USE_XOPEN /* Encrypt at most 8 characters from KEY using salt to perturb DES. */ -extern char *crypt (__const char *__key, __const char *__salt) __THROW; +extern char *crypt (__const char *__key, __const char *__salt) + __THROW __nonnull ((1, 2)); /* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt block in place. */ -extern void encrypt (char *__block, int __edflag) __THROW; +extern void encrypt (char *__block, int __edflag) __THROW __nonnull ((1)); /* Swab pairs bytes in the first N bytes of the area pointed to by @@ -929,7 +1035,7 @@ extern void encrypt (char *__block, int __edflag) __THROW; range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM is without partner. */ extern void swab (__const void *__restrict __from, void *__restrict __to, - ssize_t __n) __THROW; + ssize_t __n) __THROW __nonnull ((1, 2)); #endif @@ -937,7 +1043,7 @@ extern void swab (__const void *__restrict __from, void *__restrict __to, It is also found in <stdio.h>. */ #ifdef __USE_XOPEN /* Return the name of the controlling terminal. */ -extern char *ctermid (char *__s) __THROW; +extern char *ctermid (char *__s) __THROW __nonnull ((1)); #endif __END_DECLS |