# HG changeset patch # User Eric Blake # Date 1316196761 21600 # Node ID 1add0c3b0f4b50668a43f29acc6d119ba25c8ea1 # Parent 814138b4cfed153cbb2433ac7f55462ce98cea85 unistd: update refs to newer POSIX usleep only exists in POSIX 2001, but for the rest of the functions where we pointed to online POSIX specs, we might as well point to the latest version of the standard. * lib/unistd.in.h: Prefer POSIX 2008 over 2001. Suggested by Bruno Haible. Signed-off-by: Eric Blake diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2011-09-16 Eric Blake + unistd: update refs to newer POSIX + * lib/unistd.in.h: Prefer POSIX 2008 over 2001. + Suggested by Bruno Haible. + fdatasync: new module * modules/fsync (Description): Document difference to fdatasync. * modules/fdatasync: New module. diff --git a/lib/unistd.in.h b/lib/unistd.in.h --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -228,8 +228,8 @@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Follow symbolic links. Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - . */ + See the POSIX:2008 specification + . */ + See the POSIX:2008 specification + . */ # if @REPLACE_DUP2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup2 rpl_dup2 @@ -426,8 +426,8 @@ /* Change the process' current working directory to the directory on which the given file descriptor is open. Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - . */ + See the POSIX:2008 specification + . */ # if ! @HAVE_FCHDIR@ _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); @@ -487,8 +487,8 @@ #if @GNULIB_FDATASYNC@ /* Synchronize changes to a file. Return 0 if successful, otherwise -1 and errno set. - See POSIX:2001 specification - . */ + See POSIX:2008 specification + . */ # if !@HAVE_FDATASYNC@ _GL_FUNCDECL_SYS (fdatasync, int, (int fd)); # endif @@ -506,8 +506,8 @@ #if @GNULIB_FSYNC@ /* Synchronize changes, including metadata, to a file. Return 0 if successful, otherwise -1 and errno set. - See POSIX:2001 specification - . */ + See POSIX:2008 specification + . */ # if !@HAVE_FSYNC@ _GL_FUNCDECL_SYS (fsync, int, (int fd)); # endif @@ -525,8 +525,8 @@ #if @GNULIB_FTRUNCATE@ /* Change the size of the file to which FD is opened to become equal to LENGTH. Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - . */ + See the POSIX:2008 specification + . */ # if !@HAVE_FTRUNCATE@ _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); # endif @@ -546,8 +546,8 @@ of BUF. Return BUF if successful, or NULL if the directory couldn't be determined or SIZE was too small. - See the POSIX:2001 specification - . + See the POSIX:2008 specification + . Additionally, the gnulib module 'getcwd' guarantees the following GNU extension: If BUF is NULL, an array is allocated with 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as @@ -910,8 +910,8 @@ /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE to GID (if GID is not -1). Do not follow symbolic links. Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - . */ + See the POSIX:2008 specification + . */ # if @REPLACE_LCHOWN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef lchown @@ -940,8 +940,8 @@ #if @GNULIB_LINK@ /* Create a new hard link for an existing file. Return 0 if successful, otherwise -1 and errno set. - See POSIX:2001 specification - . */ + See POSIX:2008 specification + . */ # if @REPLACE_LINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define link rpl_link @@ -1006,8 +1006,8 @@ #if @GNULIB_LSEEK@ /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. Return the new offset if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - . */ + See the POSIX:2008 specification + . */ # if @REPLACE_LSEEK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lseek rpl_lseek @@ -1077,8 +1077,9 @@ #if @GNULIB_PREAD@ /* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. Return the number of bytes placed into BUF if successful, otherwise - set errno and return -1. 0 indicates EOF. See the POSIX:2001 - specification . */ + set errno and return -1. 0 indicates EOF. + See the POSIX:2008 specification + . */ # if @REPLACE_PREAD@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef pread @@ -1112,8 +1113,8 @@ /* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. Return the number of bytes written if successful, otherwise set errno and return -1. 0 indicates nothing written. See the - POSIX:2001 specification - . */ + POSIX:2008 specification + . */ # if @REPLACE_PWRITE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef pwrite @@ -1145,8 +1146,8 @@ #if @GNULIB_READ@ /* Read up to COUNT bytes from file descriptor FD into the buffer starting - at BUF. See the POSIX:2001 specification - . */ + at BUF. See the POSIX:2008 specification + . */ # if @REPLACE_READ@ && @GNULIB_UNISTD_H_NONBLOCKING@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef read @@ -1169,8 +1170,8 @@ /* Read the contents of the symbolic link FILE and place the first BUFSIZE bytes of it into BUF. Return the number of bytes placed into BUF if successful, otherwise -1 and errno set. - See the POSIX:2001 specification - . */ + See the POSIX:2008 specification + . */ # if @REPLACE_READLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define readlink rpl_readlink @@ -1241,8 +1242,8 @@ #if @GNULIB_SLEEP@ /* Pause the execution of the current thread for N seconds. Returns the number of seconds left to sleep. - See the POSIX:2001 specification - . */ + See the POSIX:2008 specification + . */ # if @REPLACE_SLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef sleep @@ -1391,7 +1392,7 @@ /* Pause the execution of the current thread for N microseconds. Returns 0 on completion, or -1 on range error. See the POSIX:2001 specification - . */ + . */ # if @REPLACE_USLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef usleep @@ -1417,8 +1418,8 @@ #if @GNULIB_WRITE@ /* Write up to COUNT bytes starting at BUF to file descriptor FD. - See the POSIX:2001 specification - . */ + See the POSIX:2008 specification + . */ # if @REPLACE_WRITE@ && (@GNULIB_UNISTD_H_NONBLOCKING@ || @GNULIB_UNISTD_H_SIGPIPE@) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef write