Title really explains it all: I've been pondering this for a while.
The read/write functions defined by POSIX are all syscalls, and as such all the parameters *have* to be 32bits on a 32 bit system, right? So how do you access past 4GB of a file by using the standard read/write syscalls?
How do 32-bit POSIX compliant systems access files > 4GB?
Single Unix specification Large file support defines a file offset to be of 'extended signed integral type' i.e. signed long long int. This means the standard functions like fseek should support LFS by standard in a c library that supports it. How this translates into syscalls is up to you. I suppose functions in a small file only c library could call one syscall, and those in a large file one could call a different syscall (e.g. fstat/fstat64 in glibc). How you pass a 64-bit value to a syscall is a question you probably should have already answered, e.g. use EAX:EDX or use EAX to point to a 64 bit value in memory.
Regards,
John.
Regards,
John.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
The Wikipedia article on LFS seems to be a good resource as well..
http://en.wikipedia.org/wiki/Large_file_support
http://en.wikipedia.org/wiki/Large_file_support