[Fwd: [Patch] Configure broken for Solaris 2.6 (PR#12014)]

Andrej Borsenkow borsenkow.msk at sni.de
Thu Dec 17 18:21:06 GMT 1998

> But, at least with Solaris 2.6 include files, if you provide
> _FILE_OFFSET_BITS=64, then /usr/include/sys/statvfs.h redefines
> [f]statvfs to [f]statvfs64.  And the following check also fails:
>   /* transitional large file interface versions */
>   #if	defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
> 	    !defined(__PRAGMA_REDEFINE_EXTNAME))
>   int statvfs64(const char *, struct statvfs64 *);
>   int fstatvfs64(int, struct statvfs64 *);
>   #endif	/* _LARGEFILE64_SOURCE... */
> defined.  So the prototypes for [f]statvfs and [f]statvfs64 are never
> found.  Perhaps adding -D__PRAGMA_REDEFINE_EXTNAME would make it
> work for Solaris 2.6 if you didn't want to use LARGEFILE64_SOURCE.

I don't know about Solaris, but LARGEFILE64_SOURCE and _FILE_OFFSET_BITS ==
64 _must_ be mutually incompatible. The former means, that you want off_t be
32 bit and explicitly use xxx64 versions of some functions and off64_t,
ino64_t; the latter means, that off_t, ino_t etc are 64 bit long and you do
_not_ want use xxx64 functions, but just plain ones (that are most porbably
mapped to xxx64 friends anyway :-)

On my system:

itsrm1% getconf LFS64_CFLAGS
itsrm1% getconf LFS_CFLAGS

God, people, ther _is_ standard way to do things. It may be possible, that
this or other system is broken - then we must find fix or workaround for it.
We must decide, what type of interface (transitional or explicit) to use in
SAMBA. To use transitional interface, the application needs to define
_LARGEFILE64_SOURCE and set CFLAGS to output of getconf LFS64_CFLAGS. To use
explicit interface, applicaition needs to set _LARGEFILE_SOURCE and CFLAGS
to output of getconf LFS_CFLAGS. This way it should work on any LFS
conformant system. If this does not work - the system is broken. But Sun was
member of LFS, and I don't see any reason, why it won't work there.

> >
> >         _LARGEFILE64_SOURCE means "provide xxx64()
> >         functions and structs, so you can mix standard
> >         32-bit calls with 64-bit calls".
> >
> >         The latter is, in my considered (ie, not humble at all)
> >         opinion, a usefull kludge, suitable for a quick
> >         hack around a problem.  Not for real code!]
> >

Yes. It is marked as transitional and is meant for those programs, that mix
off_t with another types and cannot simply switch to 64 bit API.


More information about the samba-technical mailing list