Subject: Re: Watch out for lseek and stat struct st_size fields!
To: None <rhealey@aggregate.com>
From: None <mw@eunet.ch>
List: amiga-dev
Date: 07/13/1994 21:23:27
> I've been bit hard in the last two days due to the 64 bit size of files
> in NetBSD. Make sure you cast references to file size in lseek
> to off_t and to cast references to the st_size field of the stat
> structure to int. You'll also run in to problems with sys_errlist's
*soap box on*
_GRIN_ So, how many people had benefits so far from having a 64bit off_t OS,
and how many suffer from the mess it caused?
*soap box off*
Sorry, couldn't resist:-) BTW, what would happen if I'd compile -current with
THAT typedef in <sys/types.h> reset to long?
Could you do "#if sizeof(off_t) == sizeof(long)" ? Else we could get the same
result by using something like __QUAD_OFF_T__ along with the typedef, and
change the very few structs that contain off_t (just remember stat) to
include padding like in old times (:-)) iff __QUAD_OFF_T__ is not defined?
I just can hardly believe that it would be such an impossible task to
have a kernel that can be both compilable for 32 and 64 bit... Well, enough
whining again for a while :-)
Ciao,
-Markus
--
EUnet Switzerland Tel: +41 1 291 45 80 Markus Wild
Zweierstrasse 35 Hotline: +41 1 291 45 60 mw@eunet.ch
CH-8004 Zuerich Fax: +41 1 291 46 42 S=mw;P=EUnet;A=EUnet;C=CH
------------------------------------------------------------------------------