According to Ralf Wildenhues on 1/5/2010 11:44 PM: > SIGNATURE_CHECK fails a few tests due to undefined ssize_t, and pread, > on my GNU/Linux system. > > Not sure if the patch is right, or if the ssize_t module is needed. > > The pread failure is without a patch; it requires > #define _XOPEN_SOURCE 500 > > here but I'm not sure what the right gnuliby fix is: an AC_CHECK_DECL > somewhere?
Do we need to be using AC_USE_SYSTEM_EXTENSIONS for pread? > OK to commit? No. The whole point of the signature checks is that POSIX 2008 requires headers to be self-contained. For an example, <dirent.h> is now required to provide DIR (although it can be an incomplete type), struct dirent, and ino_t, without the user having to include <sys/types.h> beforehand (but I don't see anything in POSIX or in test-dirent.c that requires ssize_t). The real fix, then, is to fix our wrapper dirent.in.h to guarantee this, and to report a glibc bug in the meantime (similar to the one I posted for stdio.h [1]). [1] http://sources.redhat.com/bugzilla/show_bug.cgi?id=11125 Therefore, I'm pushing this instead, which should fix pread, fseeko, ftello, getdelim, and getline. But I'm not sure what failure you were seeing with test-dirent - care to post it? -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net
From 60ad192b7032409b579ea059591cfd2558f57075 Mon Sep 17 00:00:00 2001 From: Eric Blake <e...@byu.net> Date: Wed, 6 Jan 2010 07:09:03 -0700 Subject: [PATCH] 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 <e...@byu.net> --- ChangeLog | 8 ++++++++ lib/stdio.in.h | 7 ++----- lib/unistd.in.h | 6 ++---- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index e20f352..0dbbe19 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-01-06 Eric Blake <e...@byu.net> + + 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 <bonz...@gnu.org> nl_langinfo: do not call AC_CHECK_FUNC_ONCE inside if. diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 1c73db6..1fc4f30 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -39,11 +39,8 @@ #include <stdarg.h> #include <stddef.h> -#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 <sys/types.h> #endif diff --git a/lib/unistd.in.h b/lib/unistd.in.h index f5f97f0..f1ed8b8 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -61,10 +61,8 @@ # include <io.h> #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 <sys/types.h> #endif -- 1.6.4.2
signature.asc
Description: OpenPGP digital signature