posix_fadvise shifts offset by 31 bits?

Carlos O'Donell carlos@baldric.uwo.ca
Fri Sep 24 15:06:00 GMT 2004


libc-alpha,

Is it correct to shift this offset by 31-bits?

sysdeps/unix/sysv/linux/posix-fadvise.c
...
26 int
27 posix_fadvise (int fd, off_t offset, off_t len, int advise)
28 {
29 #ifdef __NR_fadvise64
30   INTERNAL_SYSCALL_DECL (err);
31   int ret = INTERNAL_SYSCALL (fadvise64, err, 5, fd,
32                               __LONG_LONG_PAIR (offset >> 31, offset), len,
33                               advise);
34   if (INTERNAL_SYSCALL_ERROR_P (ret, err))
35     return INTERNAL_SYSCALL_ERRNO (ret, err);
36   return 0;
37 #else
...

c.



More information about the Libc-alpha mailing list