[Fwd: [Patch] Configure broken for Solaris 2.6 (PR#12014)]
eischen at vigrid.com
Thu Dec 17 17:03:55 GMT 1998
David Collier-Brown wrote:
> Daniel Eischen wrote:
> > Yes, we are using gcc. Hmm, but now that you mention it, the
> > gcc we were using was built for Solaris 2.5, not Solaris 2.6.
> > And the Solaris 2.6 system is also patched a recent Sun
> > recommended 2.6 patch cluster thingy.
> > Subsequent to reporting this problem, I have rebuilt GCC
> > (2.8.1) for Solaris 2.6.
> > Looking at the Sun include files, it still looks like we
> > should be using LARGEFILE64_x instead of LARGEFILE_x.
> Righto: I think I see what's happening...
> Samba explicitly calls statvfs64() function, and
> the sun implementation triggered by
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> only makes statvfs() visible, using the 64-bit
> sizes of the various variables.
> I **think** this means we should check for
> a native statvfs with -D_LARGEFILE_SOURCE
> and -D_FILE_OFFSET_BITS=64, and see if it
At a quick glance...
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) && \
int statvfs64(const char *, struct statvfs64 *);
int fstatvfs64(int, struct statvfs64 *);
#endif /* _LARGEFILE64_SOURCE... */
because _FILE_OFFSET_BITS is 64 and __PRAGMA_REDEFINE_EXTNAME isn't
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.
> _LARGEFILE_SOURCE really means "migrate all
> 32-bit calls to 64-bit,. without changing the
> function names or data structure names, just
> as if you were running on a machine with
> longs and pointers of 64 bits"
> _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!]
> I loked at my 2.7 system, it ends with a sucessful
> compile-check of statfvs:
[ Config log snipped ]
It seems they've changed the Solaris include files somewhat for
Solaris 2.7. We've still got Solaris 2.7 in a box and can't
upgrade just yet.
eischen at vigrid.com
More information about the samba-technical