[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 2Gig filesize limit problem....
- To: Yotam Rubin <yotam(at-nospam)makif.omer.k12.il>
- Subject: Re: 2Gig filesize limit problem....
- From: guy keren <choo(at-nospam)actcom.co.il>
- Date: Mon, 19 Nov 2001 16:41:54 +0200 (EET)
- cc: Happy Linux Campers <linux-il(at-nospam)linux.org.il>
- Delivered-To: linux.org.il-linux-il@linux.org.il
- In-Reply-To: <20011119141129.A6366@yotam@makif.omer.k12.il>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
On Mon, 19 Nov 2001, Yotam Rubin wrote:
> On Mon, Nov 19, 2001 at 10:35:26AM +0200, Schlomo Schapiro wrote:
> > That's what I mean. If you don't use 64bit variables you can't use the
> > long file stuff because then you would try to use 32bit variables in 64bit
> > functions.
> >
> > Or do the flags(__*) also change the internal type of longint ?
>
> It's all described in my previous message. The aforementioned flags change
> the file handling interface, so fseeko for example is passed with a 64 bit
> offset in a transparent manner. The user doesn't have to know anything about
> the change. When I call fseek(somefile, 0xfff023, SEEK_SET) using the new
> interface, the offset argument is 64 bits in size, not 32 bits. Obviously,
> this is fully backwards compatible, since 64 bits may contain 32 bits.
i think shlomo was refering to the fact that if you copy an off_t into an
int or a long, and you try to use this '64-bit-hack' - then you'll get
overflows and a non-working code.
only if the code uses off_t _all over_ - will this trick work. if anywhere
in the code you have:
long offset = ftell(fd);
then you're in trouble, and in need to fix the code.
--
guy
"For world domination - press 1,
or dial 0, and please hold, for the creator." -- nob o. dy
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il