Hi Eric, * Eric Blake wrote on Wed, Jan 06, 2010 at 03:12:34PM CET: > According to Ralf Wildenhues on 1/5/2010 11:44 PM: > > 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?
I don't think AC_USE_SYSTEM_EXTENSIONS defines _XOPEN_SOURCE. I'm not sure it should though, it also disables some APIs on some systems. > > OK to commit? > > No. The whole point of the signature checks is that POSIX 2008 requires > headers to be self-contained. Ah, ok. > 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). It was ino_t, see below; sorry for the sloppy reporting. > 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? Your patch fixes things for fseeko, ftello, getdelim, and getline, thanks. The following two failures remain: $ gnulib-tool --with-tests --test dirent [...] make[4]: Entering directory `/tmp/gnulib/build/gltests' gcc -DHAVE_CONFIG_H -I. -I../../gltests -I. -I../../gltests -I.. -I../../gltests/.. -I../gllib -I../../gltests/../gllib -g -O2 -MT test-dirent.o -MD -MP -MF .deps/test-dirent.Tpo -c -o test-dirent.o ../../gltests/test-dirent.c ../../gltests/test-dirent.c:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘i’ ../../gltests/test-dirent.c: In function ‘main’: ../../gltests/test-dirent.c:31: error: ‘i’ undeclared (first use in this function) ../../gltests/test-dirent.c:31: error: (Each undeclared identifier is reported only once ../../gltests/test-dirent.c:31: error: for each function it appears in.) make[4]: *** [test-dirent.o] Error 1 $ gnulib-tool --with-tests --test pread [...] make[4]: Entering directory `/tmp/gnulib/build/gltests' gcc -DHAVE_CONFIG_H -I. -I../../gltests -I. -I../../gltests -I.. -I../../gltests/.. -I../gllib -I../../gltests/../gllib -g -O2 -MT test-lseek.o -MD -MP -MF .deps/test-lseek.Tpo -c -o test-lseek.o ../../gltests/test-lseek.c mv -f .deps/test-lseek.Tpo .deps/test-lseek.Po gcc -g -O2 -o test-lseek test-lseek.o ../gllib/libgnu.a gcc -DHAVE_CONFIG_H -I. -I../../gltests -I. -I../../gltests -I.. -I../../gltests/.. -I../gllib -I../../gltests/../gllib -g -O2 -MT test-pread.o -MD -MP -MF .deps/test-pread.Tpo -c -o test-pread.o ../../gltests/test-pread.c ../../gltests/test-pread.c:24: error: ‘pread’ undeclared here (not in a function) make[4]: *** [test-pread.o] Error 1 Cheers, Ralf