# HG changeset patch # User Eric Blake # Date 1262786943 25200 # Node ID 87284d3e1be21cfae871b7b2ac5b5f9c0353ad23 # Parent 462199e08415d6eaddd0ecaf0ed227b2ec60b2a0 stdio, unistd: guarantee ssize_t Per POSIX 2008, ssize_t needs to exist whether or not we are replacing functions that use it. For now, we only guarantee it if we know that the user expects a function that uses that type, while waiting for glibc to catch up to POSIX. * lib/unistd.in.h (includes): Ensure that types required by POSIX 2008 are exposed when needed. * lib/stdio.in.h (includes): Likewise. Reported by Ralf Wildenhues. Signed-off-by: Eric Blake diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-01-06 Eric Blake + + stdio, unistd: guarantee ssize_t + * lib/unistd.in.h (includes): Ensure that types required by POSIX + 2008 are exposed when needed. + * lib/stdio.in.h (includes): Likewise. + Reported by Ralf Wildenhues. + 2010-01-06 Paolo Bonzini nl_langinfo: do not call AC_CHECK_FUNC_ONCE inside if. diff --git a/lib/stdio.in.h b/lib/stdio.in.h --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -39,11 +39,8 @@ #include #include -#if ((@GNULIB_FSEEKO@ && @REPLACE_FSEEKO@) \ - || (@GNULIB_FTELLO@ && @REPLACE_FTELLO@) \ - || (@GNULIB_GETDELIM@ && !@HAVE_DECL_GETDELIM@) \ - || (@GNULIB_GETLINE@ && (!@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@)) \ - || defined GNULIB_POSIXCHECK) +#if (@GNULIB_FSEEKO@ || @GNULIB_FTELLO@ || @GNULIB_GETDELIM@ \ + || @GNULIB_GETLINE@ || defined GNULIB_POSIXCHECK) /* Get off_t and ssize_t. */ # include #endif diff --git a/lib/unistd.in.h b/lib/unistd.in.h --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -61,10 +61,8 @@ # include #endif -#if ((@GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@) \ - || (@GNULIB_READLINK@ && (!@HAVE_READLINK@ || @REPLACE_READLINK@)) \ - || (@GNULIB_READLINKAT@ && !@HAVE_READLINKAT@) \ - || defined GNULIB_POSIXCHECK) +#if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ + || @GNULIB_PREAD@ || defined GNULIB_POSIXCHECK) /* Get ssize_t. */ # include #endif