Do we need sys_open() et al (_LARGEFILE64_SOURCE and open64())?

Jelmer Vernooij jelmer at samba.org
Wed Apr 4 07:04:15 MDT 2012


On Wed, Apr 04, 2012 at 07:41:32PM +1000, Andrew Bartlett wrote:
> On Mon, 2012-04-02 at 12:31 +0200, Andreas Schneider wrote:
> > On Monday 26 March 2012 08:56:57 Andrew Bartlett wrote:
> > > On Sun, 2012-03-25 at 08:19 -0700, Jeremy Allison wrote:
> > > > On Sun, Mar 25, 2012 at 01:55:04PM +1100, Andrew Bartlett wrote:
> 
> > > > > As such, are there any systems that we need that have
> > > > > _LARGEFILE64_SOURCE but not _FILE_OFFSET_BITS?
> > > > > 
> > > > > Thanks,
> > > > 
> > > > Oooh. That's a really good point. It would simplify
> > > > those interfaces. How do we find out if the open64
> > > > etc. are still being used on platforms ?
> > > 
> > > I've done some research on the build farm.  I've checked the size of
> > > off_t, as the way of knowing if large file support is in place:
> > > 
> > > grep "checking size of off_t" build.samba_3_master*.log
> > > 
> > > Every reporting host has off_t being 8 bytes.  This is probably because
> > > we first declare _FILE_OFFSET_BITS 64.
> > 
> > Normally you should check with 'getconf LFS_CFLAGS' on systems with glibc. Not 
> > sure if getconf is available on other systems.
> 
> Thanks for the suggestion.  I'll add a check for that first, it may well
> cover some of the other odd systems at the same time. 
> 
> I'm hoping to merge this soon, so if anyone has a 32-bit system that is
> both powerful enough to handle Samba's make test (I found out my laptop
> isn't...) and odd enough not to have native 64-bit files, now would be a
> good time to test.
Using getconf would be nice, of course, rather than just hardcoding a
specific set of defines.

I think we should just go ahead and remove the support for the
deprecated _64 functions though. None of the buildfarm need
it, it's deprecated, and we're not consistently using the existing wrappers
anyway.

Cheers,

Jelmer


More information about the samba-technical mailing list