scp doesn't work with large (>2GB) files

Matthew Vernon matthew at debian.org
Thu Sep 13 00:48:42 EST 2001


Michael Stone <mstone at cs.loyola.edu> writes:

> 
> On Wed, Sep 12, 2001 at 12:14:47PM +0100, M.C. Vernon wrote:
> > On Wed, 12 Sep 2001, Markus Friedl wrote:
> > > why is O_LARGEFILE needed? is this some standard API?
> > 
> > It's not a standard API, except on Solaris/SunOS and Linux (as far as a
> > quick look will tell me). HP-UX 11i has this flag and notes "This is a
> > non-standard flag which may be used by 32-bit applications to access files
> > larger than 2 GB". OTOH, on those platforms, open() will fail on files
> > bigger than 2GB. This seems to me a good reason to include this flag on
> > platforms where it is defined. 
> 
> Actually, it's a terrible idea, because off_t will still be 32 bits.
> What would work is
> #define _FILE_OFFSET_BITS 64
> which would make off_t 64 bits and add an implicit O_LARGEFILE. (That's
> what most of the utilities using O_LARGEFILE would be doing.) You can
> take a look at the configure routines from some of the GNU utilities
> (e.g., fileutils) to see how they do the large file support detection.

Yes, indeed. Can this go into the next release? adding a CFLAG of
-D_FILE_OFFSET_BITS=64 for systems like Linux would be fine. In the
mean time, I'll add it by hand to the debian/rules file.

Thanks,

Matthew

-- 
"At least you know where you are with Microsoft."
"True. I just wish I'd brought a paddle."
http://www.debian.org



More information about the openssh-unix-dev mailing list