Re: FREAD fails on files >4GB
- From: Antoninus Twink <nospam@xxxxxxxxxxxxxx>
- Date: Thu, 31 Jul 2008 08:06:02 +0000 (UTC)
On 30 Jul 2008 at 23:44, vippstar@xxxxxxxxx wrote:
On Jul 31, 1:30 am, Richie Kernagan <ho...@xxxxxxxxxx> wrote:
The parameters to fread size and count are both size_t ie 64 bits. Even
so the call fails when the size arg is greater than 4GB (ie exceeds 32
bit unsigned value).
So what? fread can succeed or fail.
Great. Just great.
When an implementation deviates by a tiny fraction from the golden
tablets of The Standard, the people here come down on it like a ton of
bricks. But as long as it obeys the letter of the law, noone minds how
poor the quality of implementation might be.
Do malloc() and fopen() always return NULL? No problem! That's OK
according to The Standard. Of course it makes no difference to "vip
star" and his friends, as it's clear they never actually program C in
the real world, so a program in the abstract machine that always
terminates gracefully with an informative error message like
"Program failed at line 1 - this implementation always returns NULL to
malloc()"
is just fine for them...just as long as the return type of main() is
right.
.
- Follow-Ups:
- Re: FREAD fails on files >4GB
- From: Walter Roberson
- Re: FREAD fails on files >4GB
- References:
- Re: FREAD fails on files >4GB
- From: vippstar
- Re: FREAD fails on files >4GB
- Prev by Date: Re: Seg fault even though address space is accessible
- Next by Date: Re: $ & _
- Previous by thread: Re: FREAD fails on files >4GB
- Next by thread: Re: FREAD fails on files >4GB
- Index(es):
Relevant Pages
|