Re: AC_SYS_LARGEFILE in configure.ac

Bob Friesenhahn <[email protected]>
Newsgroups gmane.comp.video.graphicsmagick.core
Message-ID <[email protected]>
On Wed, 25 Jun 2003, Albert Chin wrote:

> On Wed, Jun 25, 2003 at 10:05:33AM -0500, Bob Friesenhahn wrote:
> > On Wed, 25 Jun 2003, Albert Chin wrote:
> >
> > > Any reason a custom largefile detection routine in configure.ac is
> > > used in lieu of AC_SYS_LARGEFILE? Is it because you don't want to
> > > pollute the library with the extra CFLAGS brought in? If so, what is
> > > the problem with them being brought in?
> >
> > The reason that AC_SYS_LARGEFILE is not used is that AC_SYS_LARGEFILE
> > adds defines to configure.h which is fine for normal software, but
> > doesn't work for the Perl extension.  The Perl extension requires
> > pre-processor options on the "command line".
>
> Will you run into problems if libMagick is built with LFS and the Perl
> module is not?

It is quite likely that there would be severe problems since the size
of several data types is dependent on the LFS defines.  Theoretically
only size_t and off_t should be effected, but GraphicsMagick inherits
some ImageMagick strangeness in that these types are assumed to be the
biggest integral type the processor supports (bad assumption), so they
are used as the base type for ExtendedSignedIntegralType and
ExtendedUnsignedIntegralType which are used for some of the API
interface definitions.

GraphicsMagick does have configure logic which determines the actual
available integer types, but they have not been actively used yet.  I
do plan to use these types, but care must be taken since some code
uses the extend types for file access, while other code simply uses it
to store large numbers.

Also, stdio (e.g. putc) is unlikely to work properly if there is a mix
of LFS and non-LFS code in the same application since some stdio code
uses macros.  Systems like Solaris use macros to substitute 64-bit
functions when compiling in LFS mode.

Bob
======================================
Bob Friesenhahn
[email protected]
http://www.simplesystems.org/users/bfriesen



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.