diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2012-12-25 10:39:27 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2012-12-25 10:39:27 +0000 |
commit | 105320fa7b3665877cb3c50c821d10cf7ce154d0 (patch) | |
tree | 1b9b6f46b453cf110c6df3493e977b4468af25f6 /libc/sysdeps/unix/sysv/linux | |
parent | 94c459cc7a611211d10773eef526826a8da80456 (diff) |
Merge changes between r21911 and r22029 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@22061 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/sysdeps/unix/sysv/linux')
-rw-r--r-- | libc/sysdeps/unix/sysv/linux/posix_fadvise.c | 13 | ||||
-rw-r--r-- | libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h | 2 | ||||
-rw-r--r-- | libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h | 5 |
3 files changed, 14 insertions, 6 deletions
diff --git a/libc/sysdeps/unix/sysv/linux/posix_fadvise.c b/libc/sysdeps/unix/sysv/linux/posix_fadvise.c index cf28faf9b..064281ffc 100644 --- a/libc/sysdeps/unix/sysv/linux/posix_fadvise.c +++ b/libc/sysdeps/unix/sysv/linux/posix_fadvise.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,11 +25,20 @@ int posix_fadvise (int fd, off_t offset, off_t len, int advise) { -#ifdef __NR_fadvise64 +#if defined(__NR_fadvise64) || defined(__NR_fadvise64_64) INTERNAL_SYSCALL_DECL (err); +# ifdef __NR_fadvise64 int ret = INTERNAL_SYSCALL (fadvise64, err, 5, fd, __LONG_LONG_PAIR (offset >> 31, offset), len, advise); +# else + int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, + __LONG_LONG_PAIR ((long) (offset >> 31), + (long) offset), + __LONG_LONG_PAIR ((long) (len >> 31), + (long) len), + advise); +# endif if (INTERNAL_SYSCALL_ERROR_P (ret, err)) return INTERNAL_SYSCALL_ERRNO (ret, err); return 0; diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h index b0fa372d9..da25c0150 100644 --- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h +++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h @@ -175,7 +175,7 @@ an error return status). */ # undef INTERNAL_SYSCALL_DECL -# define INTERNAL_SYSCALL_DECL(err) long int err +# define INTERNAL_SYSCALL_DECL(err) long int err __attribute__ ((unused)) # undef INTERNAL_SYSCALL # define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h index 9b0693a19..059cf7075 100644 --- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h +++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h @@ -1,5 +1,4 @@ -/* Copyright (C) 1992,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2012 - Free Software Foundation, Inc. +/* Copyright (C) 1992-2012, Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -218,7 +217,7 @@ INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, args) #undef INTERNAL_SYSCALL_DECL -#define INTERNAL_SYSCALL_DECL(err) long int err +#define INTERNAL_SYSCALL_DECL(err) long int err __attribute__ ((unused)) #undef INTERNAL_SYSCALL_ERROR_P #define INTERNAL_SYSCALL_ERROR_P(val, err) \ |