Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Re: LFS notes RE: pws-18 is go



"Andrej Borsenkow" wrote:
> > This includes the large file support for SunOS, although Andrej's points
> > are all valid.
> 
> Unfotunately, after more close look at it, this is broken.
> 
> 1. It sets both LFS_CLFAGS *and* LFS64_CFLAGS.

Well, this is what I got from bash.  I changed it to use just LFS_CFLAGS,
where just fseek/ftell are explicitly affected.

> 2. Zsh is using fseek/ftell. These are using long and are incompatible with
> LFS; to be on safe side, one must use fseeko/ftello that use off_t.

This is now handled by #define's in system.h: in fact, on Solaris ftello is
defined to ftello64 anyway.  I've tested it and nothing seems immediately
wrong.  I fixed up one file pointer in input.c to use off_t (this is safe
as configure handles the check), other references to seek/tell were OK.
Strictly that means zalloc() should be using off_t, but I shudder to think
at this actually being necessary.

> 3. Setting LFS[64]_CFLAGS & Co is not enough!!! One must set either
> _LARGEFILE_SOURCE *or* _LARGEFILE64_SOURCE to indicate, which mode is used
> (a side note, that _LARGEFILE64_SOURCE has some problems on our system).

Eh?  The LFS_CFLAGS getconf stuff just probes for the right flags to set.
On Solaris 5.6 I get CPPFLAGS set to
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
Is the getconf test working where you are?  If not, none of this stuff
applies anyway.

> 4. (minor) summary at the end of configure does not include LFS flags.

I've added CPPFLAGS to the things it prints out, which is appropriate for
Solaris, at least.

> I urge you once again to really think about adopting LP64 model. If system
> supports LFS it should (most probably) support LP64 as well. It does not
> have as nice configure tests, must I admit ... but it does not require
> changes in ZSH sources.

As I said, I can't because I don't have it, or at least can't find it.  If
someone else wants to send me the stuff I'll apply it.  I don't even use
Solaris much.

> Additional note: I think, until all issues are resolved, the configure
> parameter (--enable-lfs would do) is needed. Currently I simply cannot
> disable LFS even if I don't need it at all (I don't want to set CPPFLAGS to
> some silly value; and in my case they are CFLAGS and not CPPFLAGS in the
> first place).

I've added this, but all you're supposed to do is set CPPFLAGS to anything,
even empty, and it will suppress modification of all the flags by the large
file check.

Somebody should read through what I've added to INSTALL.

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



Messages sorted by: Reverse Date, Date, Thread, Author