From: Eric Blake Date: Wed, 6 Jan 2010 14:09:03 +0000 (-0700) Subject: stdio, unistd: guarantee ssize_t X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60ad192b7032409b579ea059591cfd2558f57075;p=pspp 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 index e20f352e78..0dbbe19083 100644 --- 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 index 1c73db6696..1fc4f30edc 100644 --- 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 index f5f97f07c9..f1ed8b826a 100644 --- 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