> > I wasn't aware of AC_SYS_LARGEFILE. Can you give me a pointer to it?
> 
> Attached. Remove your getconf stuff and replace with AC_SYS_LARGEFILE,
> copy the attachment to acinclude.m4, and run autoconf.

hmmm, I've had a look at it and I think the current code is better,
even if it doesn't work on some systems :)

The problem with the AC_SYS_LARGEFILE macro you sent me is that it is
not at all future proof. As I understand it a OS vendor is free to
require any flags/libraries they like to implement LFS. If a vendor
does get the getconf info correct but the autoconf macros don't test
that particular combination then that platform won't work. 

I know you said that HPUX doesn't work with getconf (ie. doesn't give
64 bit offsets) but I presume that is because getconf is broken on
HPUX. I'd rather be broken with broken platforms than be broken with
non-broken platforms :)

Maybe the macros should try getconf first and if that fails then try
the common sets of compile/link flags? 

> Agreed! And in Samba too :)

unfortunately smbsh in Samba needs to know more about the internals of
these calls, and actually needs to separately call the 32 and 64 bit
versions in the same code! (see the smbwrapper code for an
explanation. Have a bucket handy - its ugly).

Also, Samba needs to know if the 64 bit LFS code actually
_works_. Some glibc versions claim 64 bit compatibility but actually
don't do 64 bit locking (they just silently truncate the lock offset
to 32 bits!). This bit us badly in one version. Luckily rsync doesn't
do any locking (yet) so this isn't a problem.

>         if test "$GCC" != yes; then
>         # IRIX 6.2 and later do not support large files by default,
>         # so use the C compiler's -n32 option if that helps.
>         AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , ,
>           [ac_save_CC="$CC"
>            CC="$CC -n32"
>            AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, ,
>              ac_cv_sys_largefile_CC=' -n32')
>            CC="$ac_save_CC"])
>         fi])

oops, the above is no good. What if I do:

  CC=/usr/local/bin/cc ./configure

then the above will override my choice of compiler! Or have I misread
it?

Cheers, Tridge

Reply via email to