Link to home
Start Free TrialLog in
Avatar of zizi21
zizi21

asked on

64bit for fwrite ...

Hi,

if i use off_t on 64 bit machine and enable the LFS, do i need to change the fwrite to sizeof(off_t)

fwrite(&value, sizeof(unsigned int),1,fp);

thanks..
ASKER CERTIFIED SOLUTION
Avatar of evilrix
evilrix
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zizi21
zizi21

ASKER

thanks a million..
The offset into the file (off_t) only refers to the position in the file. It says nothing about the data at that position, nor its size.

You can write whatever data you want (of whatever size you want) at the given offset, and sizeof(off_t) has no play in that.

The only thing that is relevant to you about sizeof(off_t), is that it tells you the maximum offset you can use for a file.