From: jonathan@... (Jonathan Baker) Date: 2002-03-07T02:32:39+09:00 Subject: Re: patch for large file support Ron Jeffries wrote in message news:<686371C2828F7E76.B37F8D9380D99FDA.6A52E2B93D4B3E22@lp.airnews.net>... > > Describe the defect, please ... > > Ronald E Jeffries > http://www.XProgramming.com > http://www.objectmentor.com > I'm giving the best advice I have. You get to decide whether it's true for you. Well, the file handling functions (open, seek, tell, pos, pos=, size?) only worked with long ints, which are typically 32-bit and so you only get to use files up to 2 GB. This patch adds some functions so that Ruby can deal with long long ints where they are available, and it uses some compiler incantations where needed so that the file functions take off_t, which can be made to be 64-bit on many platforms. Note that the 64-bit ints are still represented internally as Bignums (if a long is 32 bits); it would be cool to have the option to make the Fixnums 64-bit to avoid the overhead of the Bignum if you're doing lots of 64-bit math (I think Perl can do something along these lines). Though you don't necessarily want to make all your Fixnums take up twice as much RAM for no reason if you're doing 32-bit math. But anyway that is a much more considerable hack. :) --Jonathan