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.21-312-gd0ccd0d


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  d0ccd0d977df62f0fe0f6c91237613b95f5d5a5f (commit)
       via  4bd40bcf44e79e610189d4498c49bba3ecb01c42 (commit)
      from  305392eaca0be3111cdabc4b458400a6596b6970 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d0ccd0d977df62f0fe0f6c91237613b95f5d5a5f

commit d0ccd0d977df62f0fe0f6c91237613b95f5d5a5f
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Apr 24 13:50:18 2015 +0200

    __ASSUME_FALLOCATE is always true on 32-bit architectures
    
    This means we can clean up the generic code a bit.  The 64-bit
    variant still needs to support !__ASSUME_FALLOCATE for alpha.

diff --git a/ChangeLog b/ChangeLog
index 4dda364..50a8d09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2015-05-05  Florian Weimer  <fweimer@redhat.com>
 
+	* sysdeps/unix/sysv/linux/posix_fallocate.c (posix_fallocate):
+	Assume __ASSUME_FALLOCATE is always true.
+	* sysdeps/unix/sysv/linux/posix_fallocate64.c
+	(__posix_fallocate64_l64): Likweise.
+	* sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c
+	(posix_fallocate): Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c
+	(__posix_fallocate64_l64): Likewise.
+	* sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c
+	[!__ASSUME_FALLOCATE]: Add comment.
+
+2015-05-05  Florian Weimer  <fweimer@redhat.com>
+
 	* sysdeps/unix/sysv/linux/i386/Makefile
 	(sysdep_routines) [$(subdir) = misc]: Remove call_fallocate.
 	(sysdep_routines) [$(subdir) = io]: Add libc-do-syscall.
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c
index be08323..a9c8d73 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c
@@ -16,42 +16,22 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <fcntl.h>
-#include <kernel-features.h>
 #include <sysdep.h>
 
 #define posix_fallocate static internal_fallocate
 #include <sysdeps/posix/posix_fallocate.c>
 #undef posix_fallocate
 
-#if !defined __ASSUME_FALLOCATE && defined __NR_fallocate
-int __have_fallocate attribute_hidden;
-#endif
-
-
 /* Reserve storage for the data of the file associated with FD.  */
 int
 posix_fallocate (int fd, __off_t offset, __off_t len)
 {
-#ifdef __NR_fallocate
-# ifndef __ASSUME_FALLOCATE
-  if (__builtin_expect (__have_fallocate >= 0, 1))
-# endif
-    {
-      INTERNAL_SYSCALL_DECL (err);
-      int res = INTERNAL_SYSCALL (fallocate, err, 4, fd, 0, offset, len);
-
-      if (! INTERNAL_SYSCALL_ERROR_P (res, err))
-	return 0;
-
-# ifndef __ASSUME_FALLOCATE
-      if (__builtin_expect (INTERNAL_SYSCALL_ERRNO (res, err) == ENOSYS, 0))
-	__have_fallocate = -1;
-      else
-# endif
-	if (INTERNAL_SYSCALL_ERRNO (res, err) != EOPNOTSUPP)
-	  return INTERNAL_SYSCALL_ERRNO (res, err);
-    }
-#endif
+  INTERNAL_SYSCALL_DECL (err);
+  int res = INTERNAL_SYSCALL (fallocate, err, 4, fd, 0, offset, len);
 
+  if (! INTERNAL_SYSCALL_ERROR_P (res, err))
+    return 0;
+  if (INTERNAL_SYSCALL_ERRNO (res, err) != EOPNOTSUPP)
+    return INTERNAL_SYSCALL_ERRNO (res, err);
   return internal_fallocate (fd, offset, len);
 }
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c
index 0934550..503e918 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c
@@ -16,7 +16,6 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <fcntl.h>
-#include <kernel-features.h>
 #include <sysdep.h>
 
 extern int __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len);
@@ -24,36 +23,16 @@ extern int __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len);
 #include <sysdeps/posix/posix_fallocate64.c>
 #undef __posix_fallocate64_l64
 
-#if !defined __ASSUME_FALLOCATE && defined __NR_fallocate
-/* Defined in posix_fallocate.c.  */
-extern int __have_fallocate attribute_hidden;
-#endif
-
-
 /* Reserve storage for the data of the file associated with FD.  */
 int
 __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len)
 {
-#ifdef __NR_fallocate
-# ifndef __ASSUME_FALLOCATE
-  if (__builtin_expect (__have_fallocate >= 0, 1))
-# endif
-    {
-      INTERNAL_SYSCALL_DECL (err);
-      int res = INTERNAL_SYSCALL (fallocate, err, 4, fd, 0, offset, len);
-
-      if (! INTERNAL_SYSCALL_ERROR_P (res, err))
-	return 0;
-
-# ifndef __ASSUME_FALLOCATE
-      if (__builtin_expect (INTERNAL_SYSCALL_ERRNO (res, err) == ENOSYS, 0))
-	__have_fallocate = -1;
-      else
-# endif
-	if (INTERNAL_SYSCALL_ERRNO (res, err) != EOPNOTSUPP)
-	  return INTERNAL_SYSCALL_ERRNO (res, err);
-    }
-#endif
+  INTERNAL_SYSCALL_DECL (err);
+  int res = INTERNAL_SYSCALL (fallocate, err, 4, fd, 0, offset, len);
 
+  if (! INTERNAL_SYSCALL_ERROR_P (res, err))
+    return 0;
+  if (INTERNAL_SYSCALL_ERRNO (res, err) != EOPNOTSUPP)
+    return INTERNAL_SYSCALL_ERRNO (res, err);
   return internal_fallocate64 (fd, offset, len);
 }
diff --git a/sysdeps/unix/sysv/linux/posix_fallocate.c b/sysdeps/unix/sysv/linux/posix_fallocate.c
index 13d4afd..4587029 100644
--- a/sysdeps/unix/sysv/linux/posix_fallocate.c
+++ b/sysdeps/unix/sysv/linux/posix_fallocate.c
@@ -16,44 +16,24 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <fcntl.h>
-#include <kernel-features.h>
 #include <sysdep.h>
 
 #define posix_fallocate static internal_fallocate
 #include <sysdeps/posix/posix_fallocate.c>
 #undef posix_fallocate
 
-#if !defined __ASSUME_FALLOCATE && defined __NR_fallocate
-int __have_fallocate attribute_hidden;
-#endif
-
-
 /* Reserve storage for the data of the file associated with FD.  */
 int
 posix_fallocate (int fd, __off_t offset, __off_t len)
 {
-#ifdef __NR_fallocate
-# ifndef __ASSUME_FALLOCATE
-  if (__glibc_likely (__have_fallocate >= 0))
-# endif
-    {
-      INTERNAL_SYSCALL_DECL (err);
-      int res = INTERNAL_SYSCALL (fallocate, err, 6, fd, 0,
-				  __LONG_LONG_PAIR (offset >> 31, offset),
-				  __LONG_LONG_PAIR (len >> 31, len));
-
-      if (! INTERNAL_SYSCALL_ERROR_P (res, err))
-	return 0;
-
-# ifndef __ASSUME_FALLOCATE
-      if (__glibc_unlikely (INTERNAL_SYSCALL_ERRNO (res, err) == ENOSYS))
-	__have_fallocate = -1;
-      else
-# endif
-	if (INTERNAL_SYSCALL_ERRNO (res, err) != EOPNOTSUPP)
-	  return INTERNAL_SYSCALL_ERRNO (res, err);
-    }
-#endif
-
+  INTERNAL_SYSCALL_DECL (err);
+  int res = INTERNAL_SYSCALL (fallocate, err, 6, fd, 0,
+			      __LONG_LONG_PAIR (offset >> 31, offset),
+			      __LONG_LONG_PAIR (len >> 31, len));
+
+  if (! INTERNAL_SYSCALL_ERROR_P (res, err))
+    return 0;
+  if (INTERNAL_SYSCALL_ERRNO (res, err) != EOPNOTSUPP)
+    return INTERNAL_SYSCALL_ERRNO (res, err);
   return internal_fallocate (fd, offset, len);
 }
diff --git a/sysdeps/unix/sysv/linux/posix_fallocate64.c b/sysdeps/unix/sysv/linux/posix_fallocate64.c
index 9545459..771e59c 100644
--- a/sysdeps/unix/sysv/linux/posix_fallocate64.c
+++ b/sysdeps/unix/sysv/linux/posix_fallocate64.c
@@ -16,7 +16,6 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <fcntl.h>
-#include <kernel-features.h>
 #include <sysdep.h>
 
 extern int __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len);
@@ -24,40 +23,20 @@ extern int __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len);
 #include <sysdeps/posix/posix_fallocate64.c>
 #undef __posix_fallocate64_l64
 
-#if !defined __ASSUME_FALLOCATE && defined __NR_fallocate
-/* Defined in posix_fallocate.c.  */
-extern int __have_fallocate attribute_hidden;
-#endif
-
-
 /* Reserve storage for the data of the file associated with FD.  */
 int
 __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len)
 {
-#ifdef __NR_fallocate
-# ifndef __ASSUME_FALLOCATE
-  if (__glibc_likely (__have_fallocate >= 0))
-# endif
-    {
-      INTERNAL_SYSCALL_DECL (err);
-      int res = INTERNAL_SYSCALL (fallocate, err, 6, fd, 0,
-				  __LONG_LONG_PAIR ((long int) (offset >> 32),
-						    (long int) offset),
-				  __LONG_LONG_PAIR ((long int) (len >> 32),
-						    (long int) len));
-
-      if (! INTERNAL_SYSCALL_ERROR_P (res, err))
-	return 0;
-
-# ifndef __ASSUME_FALLOCATE
-      if (__glibc_unlikely (INTERNAL_SYSCALL_ERRNO (res, err) == ENOSYS))
-	__have_fallocate = -1;
-      else
-# endif
-	if (INTERNAL_SYSCALL_ERRNO (res, err) != EOPNOTSUPP)
-	  return INTERNAL_SYSCALL_ERRNO (res, err);
-    }
-#endif
-
+  INTERNAL_SYSCALL_DECL (err);
+  int res = INTERNAL_SYSCALL (fallocate, err, 6, fd, 0,
+			      __LONG_LONG_PAIR ((long int) (offset >> 32),
+						(long int) offset),
+			      __LONG_LONG_PAIR ((long int) (len >> 32),
+						(long int) len));
+
+  if (! INTERNAL_SYSCALL_ERROR_P (res, err))
+    return 0;
+  if (INTERNAL_SYSCALL_ERRNO (res, err) != EOPNOTSUPP)
+    return INTERNAL_SYSCALL_ERRNO (res, err);
   return internal_fallocate64 (fd, offset, len);
 }
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c b/sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c
index ecc6505..8ae8a29 100644
--- a/sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c
+++ b/sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c
@@ -23,6 +23,8 @@
 #include <sysdeps/posix/posix_fallocate.c>
 #undef posix_fallocate
 
+/* The alpha architecture introduced the fallocate system call in
+   2.6.33-rc1, so we still need the fallback code.  */
 #if !defined __ASSUME_FALLOCATE && defined __NR_fallocate
 static int __have_fallocate;
 #endif

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4bd40bcf44e79e610189d4498c49bba3ecb01c42

commit 4bd40bcf44e79e610189d4498c49bba3ecb01c42
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Apr 24 13:26:09 2015 +0200

    i386: Remove fallocate, fallocate64, posix_fallocate, posix_fallocate64
    
    With 6-argument system call support, the generic Linux implementations of
    these system calls work, and there is no need for i386-specific versions.

diff --git a/ChangeLog b/ChangeLog
index b5a58c7..4dda364 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2015-05-05  Florian Weimer  <fweimer@redhat.com>
+
+	* sysdeps/unix/sysv/linux/i386/Makefile
+	(sysdep_routines) [$(subdir) = misc]: Remove call_fallocate.
+	(sysdep_routines) [$(subdir) = io]: Add libc-do-syscall.
+	* sysdeps/unix/sysv/linux/i386/call_fallocate.S: Remove.
+	* sysdeps/unix/sysv/linux/i386/fallocate.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/fallocate64.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/posix_fallocate.c: Likewise.
+	* sysdeps/unix/sysv/linux/i386/posix_fallocate64.c: Likewise.
+
 2015-05-02  Joseph Myers  <joseph@codesourcery.com>
 
 	* math/auto-libm-test-in: Add more tests of atan, clog, clog10,
diff --git a/sysdeps/unix/sysv/linux/i386/Makefile b/sysdeps/unix/sysv/linux/i386/Makefile
index d7a59d3..e0fb1ed 100644
--- a/sysdeps/unix/sysv/linux/i386/Makefile
+++ b/sysdeps/unix/sysv/linux/i386/Makefile
@@ -2,7 +2,7 @@
 default-abi := 32
 
 ifeq ($(subdir),misc)
-sysdep_routines += ioperm iopl vm86 call_pselect6 call_fallocate
+sysdep_routines += ioperm iopl vm86 call_pselect6
 endif
 
 ifeq ($(subdir),elf)
@@ -10,8 +10,9 @@ sysdep-others += lddlibc4
 install-bin += lddlibc4
 endif
 
+# fallocate, posix_fallocate use six-argument inline syscalls.
 ifeq ($(subdir),io)
-sysdep_routines += call_sync_file_range
+sysdep_routines += call_sync_file_range libc-do-syscall
 endif
 
 # libpthread uses six-argument inline syscalls.
diff --git a/sysdeps/unix/sysv/linux/i386/call_fallocate.S b/sysdeps/unix/sysv/linux/i386/call_fallocate.S
deleted file mode 100644
index 39ab797..0000000
--- a/sysdeps/unix/sysv/linux/i386/call_fallocate.S
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <sysdep.h>
-
-#ifdef __NR_fallocate
-PSEUDO_ERRVAL (__call_fallocate, fallocate, 6)
- ret_ERRVAL
-PSEUDO_END_ERRVAL(__call_fallocate)
-#endif
diff --git a/sysdeps/unix/sysv/linux/i386/fallocate.c b/sysdeps/unix/sysv/linux/i386/fallocate.c
deleted file mode 100644
index 5534113..0000000
--- a/sysdeps/unix/sysv/linux/i386/fallocate.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright (C) 2007-2015 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <sysdep-cancel.h>
-
-
-extern int __call_fallocate (int fd, int mode, __off64_t offset, __off64_t len)
-     attribute_hidden;
-
-
-/* Reserve storage for the data of the file associated with FD.  */
-int
-fallocate (int fd, int mode, __off_t offset, __off_t len)
-{
-#ifdef __NR_fallocate
-  int err;
-  if (SINGLE_THREAD_P)
-    err = __call_fallocate (fd, mode, offset, len);
-  else
-    {
-      int oldtype = LIBC_CANCEL_ASYNC ();
-
-      err = __call_fallocate (fd, mode, offset, len);
-
-      LIBC_CANCEL_RESET (oldtype);
-    }
-  if (__glibc_unlikely (err))
-    {
-      __set_errno (err);
-      err = -1;
-    }
-  return err;
-#else
-  __set_errno (ENOSYS);
-  return -1;
-#endif
-}
diff --git a/sysdeps/unix/sysv/linux/i386/fallocate64.c b/sysdeps/unix/sysv/linux/i386/fallocate64.c
deleted file mode 100644
index d0ead81..0000000
--- a/sysdeps/unix/sysv/linux/i386/fallocate64.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright (C) 2007-2015 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <sysdep-cancel.h>
-
-
-extern int __call_fallocate (int fd, int mode, __off64_t offset, __off64_t len)
-     attribute_hidden;
-
-
-/* Reserve storage for the data of the file associated with FD.  */
-int
-fallocate64 (int fd, int mode, __off64_t offset, __off64_t len)
-{
-#ifdef __NR_fallocate
-  int err;
-  if (SINGLE_THREAD_P)
-    err = __call_fallocate (fd, mode, offset, len);
-  else
-    {
-      int oldtype = LIBC_CANCEL_ASYNC ();
-
-      err = __call_fallocate (fd, mode, offset, len);
-
-      LIBC_CANCEL_RESET (oldtype);
-    }
-  if (__glibc_unlikely (err))
-    {
-      __set_errno (err);
-      err = -1;
-    }
-  return err;
-#else
-  __set_errno (ENOSYS);
-  return -1;
-#endif
-}
diff --git a/sysdeps/unix/sysv/linux/i386/posix_fallocate.c b/sysdeps/unix/sysv/linux/i386/posix_fallocate.c
deleted file mode 100644
index 19a9ffe..0000000
--- a/sysdeps/unix/sysv/linux/i386/posix_fallocate.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Copyright (C) 2007-2015 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fcntl.h>
-#include <kernel-features.h>
-#include <sysdep.h>
-
-#define posix_fallocate static internal_fallocate
-#include <sysdeps/posix/posix_fallocate.c>
-#undef posix_fallocate
-
-#if !defined __ASSUME_FALLOCATE && defined __NR_fallocate
-int __have_fallocate attribute_hidden;
-#endif
-
-extern int __call_fallocate (int fd, int mode, __off64_t offset, __off64_t len)
-     attribute_hidden;
-
-/* Reserve storage for the data of the file associated with FD.  */
-int
-posix_fallocate (int fd, __off_t offset, __off_t len)
-{
-#ifdef __NR_fallocate
-# ifndef __ASSUME_FALLOCATE
-  if (__glibc_likely (__have_fallocate >= 0))
-# endif
-    {
-      int res = __call_fallocate (fd, 0, offset, len);
-      if (! res)
-	return 0;
-
-# ifndef __ASSUME_FALLOCATE
-      if (__glibc_unlikely (res == ENOSYS))
-	__have_fallocate = -1;
-      else
-# endif
-	if (res != EOPNOTSUPP)
-	  return res;
-    }
-#endif
-
-  return internal_fallocate (fd, offset, len);
-}
diff --git a/sysdeps/unix/sysv/linux/i386/posix_fallocate64.c b/sysdeps/unix/sysv/linux/i386/posix_fallocate64.c
deleted file mode 100644
index a9a7b9a..0000000
--- a/sysdeps/unix/sysv/linux/i386/posix_fallocate64.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Copyright (C) 2007-2015 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <fcntl.h>
-#include <kernel-features.h>
-#include <sysdep.h>
-
-extern int __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len);
-#define __posix_fallocate64_l64 static internal_fallocate64
-#include <sysdeps/posix/posix_fallocate64.c>
-#undef __posix_fallocate64_l64
-
-#if !defined __ASSUME_FALLOCATE && defined __NR_fallocate
-/* Defined in posix_fallocate.c.  */
-extern int __have_fallocate attribute_hidden;
-#endif
-
-extern int __call_fallocate (int fd, int mode, __off64_t offset, __off64_t len)
-     attribute_hidden;
-
-/* Reserve storage for the data of the file associated with FD.  */
-int
-__posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len)
-{
-#ifdef __NR_fallocate
-# ifndef __ASSUME_FALLOCATE
-  if (__glibc_likely (__have_fallocate >= 0))
-# endif
-    {
-      int res = __call_fallocate (fd, 0, offset, len);
-
-      if (! res)
-	return 0;
-
-# ifndef __ASSUME_FALLOCATE
-      if (__glibc_unlikely (res == ENOSYS))
-	__have_fallocate = -1;
-      else
-# endif
-	if (res != EOPNOTSUPP)
-	  return res;
-    }
-#endif
-
-  return internal_fallocate64 (fd, offset, len);
-}

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

Summary of changes:
 ChangeLog                                          |   24 ++++++++
 sysdeps/unix/sysv/linux/i386/Makefile              |    5 +-
 sysdeps/unix/sysv/linux/i386/call_fallocate.S      |    7 --
 sysdeps/unix/sysv/linux/i386/fallocate.c           |   53 -----------------
 sysdeps/unix/sysv/linux/i386/fallocate64.c         |   53 -----------------
 sysdeps/unix/sysv/linux/i386/posix_fallocate.c     |   57 -------------------
 sysdeps/unix/sysv/linux/i386/posix_fallocate64.c   |   60 --------------------
 .../sysv/linux/mips/mips64/n32/posix_fallocate.c   |   32 ++---------
 .../sysv/linux/mips/mips64/n32/posix_fallocate64.c |   33 ++---------
 sysdeps/unix/sysv/linux/posix_fallocate.c          |   38 +++----------
 sysdeps/unix/sysv/linux/posix_fallocate64.c        |   43 ++++----------
 .../unix/sysv/linux/wordsize-64/posix_fallocate.c  |    2 +
 12 files changed, 61 insertions(+), 346 deletions(-)
 delete mode 100644 sysdeps/unix/sysv/linux/i386/call_fallocate.S
 delete mode 100644 sysdeps/unix/sysv/linux/i386/fallocate.c
 delete mode 100644 sysdeps/unix/sysv/linux/i386/fallocate64.c
 delete mode 100644 sysdeps/unix/sysv/linux/i386/posix_fallocate.c
 delete mode 100644 sysdeps/unix/sysv/linux/i386/posix_fallocate64.c


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]