[uClibc] uClibc/libc/sysdeps/linux/common/llseek.c vs 64-bit archs

Jakub Bogusz qboosh at pld-linux.org
Sun Apr 25 12:58:40 UTC 2004


In file mentioned in subject (in current snapshot, as it already
contains some alpha-related fixes after 0.9.26 release) we can find:

| #if defined __NR__llseek && defined __UCLIBC_HAS_LFS__
[...]
| #else
| extern __off_t __libc_lseek(int fildes, off_t offset, int whence);
| loff_t __libc_lseek64(int fd, loff_t offset, int whence)
| {
|         return(loff_t)(__libc_lseek(fd, (off_t) (offset & 0xffffffff), whence));
                                                          ^^^^^^^^^^^^
| }
| #endif

On 64-bit archs (such as alpha) there is no llseek syscall (and thus
__NR__llseek) but offset for plain lseek is 64-bit - and in this case
offset shouldn't be truncated to 32 bits...?


-- 
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/
PLD Team        http://www.pld-linux.org/



More information about the uClibc mailing list