Author: Dann Corbit
Date: 14:39:20 11/17/98
Go up one level in this thread
On November 17, 1998 at 17:19:30, Robert Hyatt wrote:
[snip]
>how do you address such a big file since (a) the PC has 32 bit words
>and (b) the ansi standard requires that the data type for fseek() be
>a "long" and not something obtuse?
>
>IE the alpha handles this nicely even under linux... but on a peecee...
There is no requirement for a C compiler to implement long as exactly 32bits.
The long type must be *at least* 32 bits. Even for a 32 bit PC, they could
choose a 64 bit type if it tickled their fancy. The only requirement is that
these limits *at least* are maintained:
-- minimum value for an object of type long int
LONG_MIN -2147483647
-- maximum value for an object of type long int
LONG_MAX +2147483647
Hence, an implementation that does this:
-- minimum value for an object of type long int
LONG_MIN -9223372036854775807
-- maximum value for an object of type long int
LONG_MAX +9223372036854775807
Is in perfect compliance with the standard. That having been said, I don't
*know* of any PC compilers that implement long as a 64 bit type. However, both
our DEC UNIX machine and our AS/400 are 64 bit native through and through, so
they could do 64 bit seeks without a hitch.
[snip]
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.