@@ -1,5 +1,19 @@
2016-06-28 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate.c: Remove
+ file.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fallocate64.c:
+ Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c:
+ Likewise.
+ * sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c: Likewise.
+ * sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate64.c: Likewise.
+ * sysdeps/unix/sysv/linux/posix_fallocate.c (posix_fallocate): Use
+ SYSCALL_LL to pass both offset and len arguments.
+ * sysdeps/unix/sysv/linux/posix_fallocate64.c (posix_fallocate64):
+ Likewise.
+
* sysdeps/unix/sysv/linux/fallocate.c (fallocate): Use SYSCALL_LL
macro on offset argument.
* sysdeps/unix/sysv/linux/fallocate64.c (fallocate64): Use
deleted file mode 100644
@@ -1,37 +0,0 @@
-/* Copyright (C) 2007-2016 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 <sysdep.h>
-
-#define posix_fallocate static internal_fallocate
-#include <sysdeps/posix/posix_fallocate.c>
-#undef posix_fallocate
-
-/* Reserve storage for the data of the file associated with FD. */
-int
-posix_fallocate (int fd, __off_t offset, __off_t len)
-{
- 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);
-}
deleted file mode 100644
@@ -1,38 +0,0 @@
-/* Copyright (C) 2007-2016 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 <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
-
-/* Reserve storage for the data of the file associated with FD. */
-int
-__posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len)
-{
- 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);
-}
deleted file mode 100644
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c>
deleted file mode 100644
@@ -1 +0,0 @@
-/* posix_fallocate64 is in posix_fallocate.c */
@@ -27,9 +27,13 @@ int
posix_fallocate (int fd, __off_t offset, __off_t len)
{
INTERNAL_SYSCALL_DECL (err);
+#if __WORDSIZE == 64 || defined __ASSUME_WORDSIZE64_ILP32
+ int res = INTERNAL_SYSCALL (fallocate, err, 4, fd, 0,
+ SYSCALL_LL (offset), SYSCALL_LL (len));
+# else
int res = INTERNAL_SYSCALL (fallocate, err, 6, fd, 0,
- __LONG_LONG_PAIR (offset >> 31, offset),
- __LONG_LONG_PAIR (len >> 31, len));
+ SYSCALL_LL (offset), SYSCALL_LL (len));
+# endif
if (! INTERNAL_SYSCALL_ERROR_P (res, err))
return 0;
@@ -28,11 +28,13 @@ int
__posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len)
{
INTERNAL_SYSCALL_DECL (err);
+#if __WORDSIZE == 64 || defined __ASSUME_WORDSIZE64_ILP32
+ int res = INTERNAL_SYSCALL (fallocate, err, 4, fd, 0,
+ SYSCALL_LL64 (offset), SYSCALL_LL64 (len));
+#else
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));
+ SYSCALL_LL64 (offset), SYSCALL_LL64 (len));
+#endif
if (! INTERNAL_SYSCALL_ERROR_P (res, err))
return 0;
deleted file mode 100644
@@ -1,46 +0,0 @@
-/* Copyright (C) 2007-2016 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 <sysdep.h>
-
-#define posix_fallocate static internal_fallocate
-#include <sysdeps/posix/posix_fallocate.c>
-#undef posix_fallocate
-
-/* Reserve storage for the data of the file associated with FD. */
-int
-posix_fallocate (int fd, __off_t offset, __off_t len)
-{
- INTERNAL_SYSCALL_DECL (err);
-#ifdef INTERNAL_SYSCALL_TYPES
- int res = INTERNAL_SYSCALL_TYPES (fallocate, err, 4, int, fd,
- int, 0, off_t, offset,
- off_t, len);
-#else
- int res = INTERNAL_SYSCALL (fallocate, err, 4, fd, 0, offset, len);
-#endif
-
- 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);
-}
-weak_alias (posix_fallocate, posix_fallocate64)
deleted file mode 100644
@@ -1 +0,0 @@
-/* posix_fallocate64 is in posix_fallocate.c */