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

Andrew Bartlett abartlet at samba.org
Thu Apr 5 00:00:21 MDT 2012


On Wed, 2012-04-04 at 08:51 -0700, Jeremy Allison wrote:
> 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.
> 
> I really don't think there are any such systems anymore.
> 
> +1 from me on pushing this changeset !

I've pushed that, and it is in master now.  I've also updated my
largefile branch with one more patch, to remove SMB_OFF_T, and replace
with just off_t.  Let me know what you think.

Thanks,

Andrew Bartlett
-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list