fadvise gclibc vs uclibc

Corinna Schultz cschultz at linux.vnet.ibm.com
Mon Sep 8 21:35:24 UTC 2008


I noticed this difference between glibc and uclibc, in the fadvise  
code (I'm trying to track down a bug on a ppc32 machine).

Why the difference in the number of arguments? I don't know too much  
about the system call mechanism, so this may be something obvious :)

[posix_fadvise.c]
In glibc:
   int ret = INTERNAL_SYSCALL (fadvise64, err, 6, fd, 0,
                               __LONG_LONG_PAIR (offset >> 31, offset), len,
                               advise);

In uclibc:
   int ret = (int) (INTERNAL_SYSCALL(posix_fadvise, err, 5, fd,
                               __LONG_LONG_PAIR (offset >> 31, offset), len,
                               advice));


[posix_fadvise64.c - why is the advise argument last in uclibc, but  
2nd in glibc?]
In glibc:
   int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, advise,
                               __LONG_LONG_PAIR ((long)(offset >> 32),  
(long)offset),
                               __LONG_LONG_PAIR ((long)(len >> 32),  
(long)len));

In uclibc:
         return (__syscall_fadvise64_64(fd,
                 __LONG_LONG_PAIR(offset >> 32, offset &  0xffffffff),
                 __LONG_LONG_PAIR(len >> 32, len & 0xffffffff),
                 advice));



-Corinna Schultz
IBM LTC




More information about the uClibc mailing list