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

Ronald Wahl rwa at peppercon.com
Thu Jul 4 07:40:44 UTC 2002


On 04 Jul 2002 09:34:45 +0200, Ronald Wahl wrote:
> Hmm, just tried splitting and it does not work for PowerPC. At least for
> PowerPC my patch was correct: 

Damn - it's not my day. :-/ Here is the right snipped from glibc:

glibc-2.2.5/sysdeps/unix/sysv/linux/powerpc/pread.c

...
extern ssize_t __syscall_pread (int fd, void *buf, size_t count,
                                off64_t offset);
...
ssize_t
__libc_pread (fd, buf, count, offset)
     int fd;
     void *buf;
     size_t count;
     off_t offset;
{
  ssize_t result;

  /* First try the syscall.  */
  result = __syscall_pread (fd, buf, count, (off64_t) offset);
  if (result == -1 && errno == ENOSYS)
    /* No system call available.  Use the emulation.  */
    result = __emulate_pread (fd, buf, count, offset);

  return result;
}
...

r"need more sleep"on

-- 
\\      Dipl.-Inf. Ronald Wahl   |   Peppercon AG                  //
 \\\         rwa at peppercon.com  |||  http://www.peppercon.com/   /// 
  \OO  -----------------------  OOO  -------------------------  OO/ 
   OO  GnuPG/PGP key available  OOO  Keep Systems running       OO



More information about the uClibc mailing list