Re: Library that needs large file support

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

 



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
bfriesen@xxxxxxxxxxxxxxxxxxx
http://www.simplesystems.org/users/bfriesen




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux