[uClibc]Re: pread/pwrite broken w/o large file support

Miles Bader miles at lsi.nec.co.jp
Thu Jul 4 00:54:57 UTC 2002


Ronald Wahl <rwa at peppercon.com> writes:
> I noticed that pread and pwrite are broken if large file support is
> disabled. These calls have a 64bit offset so the syscall must be
> wrapped.  Patch:
> 
>         http://www.peppercon.de/~rwa/pread_pwrite.patch
> 
> I dunno if this is the correct way, but it works for me. Glibc uses a
> wrapper too.

The sycall-interface-definition-macros for most architectures in linux (on
2.4.x at least) silently truncate all arguments to 32 bits (by casting them
to long), so I don't think the above patch will work; presumably it would
have to be handled the same way truncate64 is, by explicitly splitting the
64-bit argument into two 32-bit arguments on 32-bit architectures.

Does the glibc def really do the same thing?  Does it actually work
correctly for 64-bit arguments on 32-bit archs?

-Miles
-- 
Love is a snowmobile racing across the tundra.  Suddenly it flips over,
pinning you underneath.  At night the ice weasels come.  --Nietzsche



More information about the uClibc mailing list