l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2001 Dec 30 17:02

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Re: [vox] Large File Support
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Re: [vox] Large File Support

  • Subject: Re: [vox-tech] Re: [vox] Large File Support
  • From: Micah Cowan <micahMAPS@cowanbox.com>
  • Date: Tue, 27 Mar 2001 12:10:27 -0800
  • References: 3AC0E3AB.78EB93E0@sagresdiscovery.com
  • References: 20010327115626.A10673@dirac.org

On Tue, Mar 27, 2001 at 11:56:26AM -0800, Peter Jay Salzman wrote:
> eric, first, let me tell you the reason for the limit in the first place.
> the 2GB limit isn't linux's fault.  it's the fault of the ISO/ANSI C team.
> many operating systems use the (what i call) "strange" data types like
> fpos_t and off_t.  these functions *can* break when you deal with files
> larger than 2GB.  the answer is to retypedef the wierd data types.  to wit:
> ssize_t write(int fd, const void *buf, size_t count);
>  ^                                      ^
>  |                                      |
> wierd                                 wierd
> i think you can get the definitions for these wierd types in types.h.
> however, there are functions like fseek() and ftell() which use a good old
> fasioned "long int" for the offset, and you can't play around with that.
> AFAIK, 2.2.18 does not support files larger than 2GB without a kernel patch.
> i do believe, though, that the patch made it into the 2.3 kernel.

write() isn't ISO/ANSI C.  It's POSIX.

And actually, fpos_t is the /solution/ to the problem, not the cause
of it (off_t isn't ISO/ANSI C either).  The fact that fseek() and
ftell() use old fassioned "long int" means that, if on your
implementation "long int" is 32-bits (which it is on both yours and
mine), it can only address a 2GB file.  fpos_t was provided so that
your C implementation could choose to define it as the most
appropriate type for addressing files on your system.  This is a good
thing, not a bad thing.  


LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!