svn commit: trunk/uClibc/libc/sysdeps/linux/sh
vapier at uclibc.org
vapier at uclibc.org
Mon Apr 30 21:23:23 UTC 2007
Author: vapier
Date: 2007-04-30 14:23:22 -0700 (Mon, 30 Apr 2007)
New Revision: 18533
Log:
Carmelo AMOROSO writes:
running LTP test suite on uClibc-nptl for sh4 I found a bug into pread
and pwrite functions. When the offset is negative it is not correctly
handled due to a missing shift operation, so it is passed to the
syscall as the highest unsigned positive value.
Modified:
trunk/uClibc/libc/sysdeps/linux/sh/pread_write.c
Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/sh/pread_write.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/sh/pread_write.c 2007-04-29 23:42:54 UTC (rev 18532)
+++ trunk/uClibc/libc/sysdeps/linux/sh/pread_write.c 2007-04-30 21:23:22 UTC (rev 18533)
@@ -33,7 +33,7 @@
ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
{
- return(__syscall_pread(fd,buf,count,0,__LONG_LONG_PAIR((off_t)0,offset)));
+ return(__syscall_pread(fd,buf,count,0,__LONG_LONG_PAIR(offset >> 31,offset)));
}
weak_alias(__libc_pread,pread)
@@ -66,7 +66,7 @@
ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
{
- return(__syscall_pwrite(fd,buf,count,0,__LONG_LONG_PAIR((off_t)0,offset)));
+ return(__syscall_pwrite(fd,buf,count,0,__LONG_LONG_PAIR(offset >> 31,offset)));
}
weak_alias(__libc_pwrite,pwrite)
More information about the uClibc-cvs
mailing list