This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.16-ports-merge-847-ge933a94


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  e933a9432cab6ff8d7995b984f0da625b3592f88 (commit)
      from  270a72ed73df7a6fd6c73dd1fa1d577a348400dc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e933a9432cab6ff8d7995b984f0da625b3592f88

commit e933a9432cab6ff8d7995b984f0da625b3592f88
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Thu Dec 6 15:01:35 2012 -0500

    linux: posix_fadvise: support __NR_fadvise64_64
    
    Some arches do not have a __NR_fadvise64 but do have __NR_fadvise64_64.
    If the former is unavailable, fallback to the latter.
    
    Reviewed-by: Carlos O'Donell <carlos@systemhalted.org>
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>

diff --git a/ChangeLog b/ChangeLog
index 36b2bb0..2dfde80 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-12-06  Carlos O'Donell  <carlos@systemhalted.org>
+	    Mike Frysinger  <vapier@gentoo.org>
+
+	* sysdeps/unix/sysv/linux/posix_fadvise.c (posix_fadvise): Also
+	check for __NR_fadvise64_64.
+
 2012-12-06  Chris Metcalf  <cmetcalf@tilera.com>
 
 	* sysdeps/generic/fpu_control.h (_FPU_GETCW): Define to set cw to
diff --git a/sysdeps/unix/sysv/linux/posix_fadvise.c b/sysdeps/unix/sysv/linux/posix_fadvise.c
index cf28faf..064281f 100644
--- a/sysdeps/unix/sysv/linux/posix_fadvise.c
+++ b/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;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                               |    6 ++++++
 sysdeps/unix/sysv/linux/posix_fadvise.c |   13 +++++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]