Current glibc options for largefile

James Ralston qralston+ml.inn-workers at andrew.cmu.edu
Wed May 2 21:49:32 UTC 2001


On 2 May 2001, bill davidsen wrote:

> After all the discussion of largefile support under Linux, I see
> that the current (0502) version still configs with the same options,
> no XOPEN_SOURCE or GUN_SOURCE here.  Moreover, it now doesn't seem
> to compile happily, getting an error if I add the options to
> Makefile.global by hand.

You must configure with the same options you build with.

For CURRENT, at the moment, this is what you want:

    CC="gcc -D_XOPEN_SOURCE=500 -D_BSD_SOURCE"; export CC
    ./configure
    make

> Having identified the glibc problem did anyone *do* anything, or
> does it still not build as distributed, and now not build with the
> patches?

I still believe that the best course of action is to take the
following steps, which I offered to do:

    1.  Replace all instances of the BSD typedefs (u_short, u_int,
        et. al.) with the full (non-typedef'ed) definitions (unsigned
        short, unsigned int, et. al. respectively).

    2.  Rename INN's LOCK_READ, LOCK_WRITE, and LOCK_UNLOCK symbols to
        INN_LOCK_READ, INN_LOCK_WRITE, and INN_LOCK_UNLOCK.  Also
        rename INN's lock_file and lock_range functions to
        inn_lock_file and inn_lock_range.

    3.  Add logic to configure.in to add "-D_GNU_SOURCE" to ${CC} iff
        the C library being linked with is glibc.

    4.  Build INN with -Wall and fix anything gcc (validly) complains
        about.

Russ opposed step #3, arguing that -D_GNU_SOURCE should only be added
iff it is needed for pread/pwrite.  I argued that this was at odds
with what glibc recommends (that -D_GNU_SOURCE be used for new
programs), and asked Russ to explain why he opposed simply defining
_GNU_SOURCE if glibc is detected at all.

I'm still waiting for Russ's response.  (I know he's busy with other
things, so I haven't really been pushing this issue.)

I already took a stab at steps #1 and #2, and I know they will
generate lots and lots of diffs, and will probably break any pending
patches.  Thus, I was waiting to hear from Russ that the "pending
patch queue" was empty (or at least empty of big patches) before
starting the process at all.

If you want to go look at the whole gory discussion, look for the
"Artsize still not quite right in CURRENT" thread from April 17 to
April 21.  (The April 2001 archives aren't yet available on ISC's web
page, but I assume they'll be there in a few days.)

-- 
James Ralston, Information Technology
Software Engineering Institute
Carnegie Mellon University, Pittsburgh, PA, USA



More information about the inn-workers mailing list