[inn-current] -D_GNU_SOURCE missing in 'configure' for Linux

Christophe Wolfhugel wolf at oleane.net
Sat Jan 10 08:22:54 UTC 2004


Russ Allbery :
> Without _GNU_SOURCE set, Linux should fail to declare pread at all, at
> which point INN should declare it internally using off_t.  Since this is
> done after _FILE_OFFSET_BITS is set, this should give the 64-bit off_t.
>
> Do you know why this isn't happening?  Is configure reporting that it
> found a declaration for pread?

'configure' is not finding the declaration of pread :

checking whether pread is declared... no
checking for pread... yes

It will then be declared in clibrary.h with the 64-bit off_t :

extern ssize_t          pread(int, void *, size_t, off_t);

But a "strace" of the process still shows that the 32-bit pread is
being used.

I checked how the pre-processor and Linux (this is Debian 3.0) does
its own declarations. With _FILE_OFFSET_BITS=64 and _GNU_SOURCE :

extern ssize_t  pread    (int __fd, void *__buf, size_t __nbytes,
                   __off64_t __offset)    __asm__ (""     "pread64"    ) ;

I would suspect this means 'use pread64 instead of pread'.

-- 
Christophe Wolfhugel -+- wolf at oleane.net -+- France Telecom Transpac
Direction de l'Internet et de l'hébergement
Téléphone : +33 1 4612 6645


More information about the inn-workers mailing list