autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Library that needs large file support


From: Bob Friesenhahn
Subject: Re: Library that needs large file support
Date: Sat, 20 Dec 2003 09:30:31 -0600 (CST)

On Sat, 20 Dec 2003, Florian Weimer wrote:

> I'm writing a library that will require large-file support on 32-bit GNU
> platforms (so that off_t and ino_t are 64 bits wide, otherwise data
> structure layout would change).  What is the canonical way to enforce
> this?

I recommend defining your own equivalents to off_t & ino_t (if needed)
which are *always* 64 bits wide.  Only your library implementation
uses the system off_t & ino_t definitions and they are not used in
your public library headers.  This way your library has a consistent
interface and the dependent application can use it regardless of
whether or not it is built to support large files.

> I guess it's not a good idea to force applications to include the
> config.h file that was generated at library build time.

Right.  I have encountered cases (e.g. Perl extensions) where it is
not possible to include a config.h file early enough to work properly.
You can easily build a trimmed-down config.h with scoped names, but
configuration includes only go so far.

Bob
======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen





reply via email to

[Prev in Thread] Current Thread [Next in Thread]