Fix lseek64 for aarch64 ILP32
Commit Message
This is needed on top of
https://sourceware.org/ml/libc-alpha/2014-10/msg00596.html and
http://sourceware.org/ml/libc-alpha/2015-03/msg00586.html to fix the
return value of lseek64 in the error case. Without this change it
returns 0xffffffff instead of -1.
Andreas.
* sysdeps/unix/sysv/linux/aarch64/sysdep.c (__syscall_error):
Change return type to __SYSCALL_SLONG_TYPE.
Comments
On Wed, 20 May 2015, Andreas Schwab wrote:
> This is needed on top of
> https://sourceware.org/ml/libc-alpha/2014-10/msg00596.html and
> http://sourceware.org/ml/libc-alpha/2015-03/msg00586.html to fix the
> return value of lseek64 in the error case. Without this change it
> returns 0xffffffff instead of -1.
Is there an existing testcase in the glibc testsuite that would have
failed for this issue, given the AArch64 ILP32 patches without this extra
patch? If not, could one be added?
There's a large pile of AArch64 ILP32 patches in patchwork. Some had
review comments from various people and need revision, but I think a lot
may not have been reviewed (and some may be waiting for kernel changes to
go in before anything can happen).
Joseph Myers <joseph@codesourcery.com> writes:
> Is there an existing testcase in the glibc testsuite that would have
> failed for this issue, given the AArch64 ILP32 patches without this extra
> patch?
Yes, libio/bug-fseek.
Andreas.
@@ -19,12 +19,12 @@
#include <sysdep.h>
#include <errno.h>
-long __syscall_error (long err);
+__SYSCALL_SLONG_TYPE __syscall_error (long err);
hidden_proto (__syscall_error)
/* This routine is jumped to by all the syscall handlers, to stash
an error number into errno. */
-long
+__SYSCALL_SLONG_TYPE
__syscall_error (long err)
{
__set_errno (- err);