[uClibc]Re: pread/pwrite broken w/o large file support
Miles Bader
miles at lsi.nec.co.jp
Thu Jul 4 07:50:54 UTC 2002
Ronald Wahl <rwa at peppercon.com> writes:
> Damn - it's not my day. :-/ Here is the right snipped from glibc:
>
> extern ssize_t __syscall_pread (int fd, void *buf, size_t count,
> off64_t offset);
...
> /* First try the syscall. */
> result = __syscall_pread (fd, buf, count, (off64_t) offset);
How is __syscall_pread defined?
Here's the syscall definition uclibc uses on the powerpc:
#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
{ \
unsigned long __sc_ret, __sc_err; \
{ \
...
register unsigned long __sc_6 __asm__ ("r6"); \
...
__sc_6 = (unsigned long) (arg2); \
...
As you can see, it's just going to going to toss away the upper bits in
any argument type longer than a long. [I don't know what a long is
defined to be on a 64-bit powerpc system though]
-Miles
--
97% of everything is grunge
More information about the uClibc
mailing list