]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Remove __ASSUME_OFF_DIFF_OFF64 definition
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 28 Jun 2016 12:48:18 +0000 (09:48 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 8 Jul 2016 17:28:08 +0000 (14:28 -0300)
This patch removes the __ASSUME_OFF_DIFF_OFF64 define introduced in
p{read,write} consolidation patch.  This define was added based on
the idea 32 bits ports would continue to follow previous off{64}_t
definition where off_t size differs from off64_t one.

However, with recent AArch64/ILP32 patch submission and also with
discussion for RISCV kernel interface, 32 bits ports now may aim
to use off_t and off64_t with the same size as 64 bits.

So current assumption for both p{read,write} and p{read,write}v
are not compatible with new type definition.  This patch now makes
the syscall wrappers to only depend on __OFF_T_MATCHES_OFF64_T to
define the default and 64-suffix variant, as follow:

  <function>.c
  #ifndef __OFF_T_MATCHES_OFF64_T
  /* build <function> */
  #endif

  and

  <function>64.c

  /* build <function>64 */
  #ifdef __OFF_T_MATCHES_OFF64_T
  weak_alias (fallocate64, fallocate)
  #endif

Tested on x86_64, i686, x32, and armhf.

* sysdeps/unix/sysv/linux/mips/kernel-features.h
(__ASSUME_OFF_DIFF_OFF64): Remove define.
* sysdeps/unix/sysv/linux/pread.c
[__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pread): Replace by
__OFF_T_MATCHES_OFF64_T.
* sysdeps/unix/sysv/linux/pread64.c
[__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pread64): Likewise.
* sysdeps/unix/sysv/linux/preadv.c
[__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (preadv): Likewise.
* sysdeps/unix/sysv/linux/preadv64.c
[__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (preadv64): Likewise.
* sysdeps/unix/sysv/linux/pwrite.c
[__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwrite): Likewise.
* sysdeps/unix/sysv/linux/pwrite64.c
[__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwrite64): Likewise.
* sysdeps/unix/sysv/linux/pwritev.c
[__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwritev): Likewise.
* sysdeps/unix/sysv/linux/pwritev64.c
[__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwritev64): Likewise.

ChangeLog
sysdeps/unix/sysv/linux/mips/kernel-features.h
sysdeps/unix/sysv/linux/pread.c
sysdeps/unix/sysv/linux/pread64.c
sysdeps/unix/sysv/linux/preadv.c
sysdeps/unix/sysv/linux/preadv64.c
sysdeps/unix/sysv/linux/pwrite.c
sysdeps/unix/sysv/linux/pwrite64.c
sysdeps/unix/sysv/linux/pwritev.c
sysdeps/unix/sysv/linux/pwritev64.c

index 72b1c7258817535032850a7857a25f9faa976917..8406319c656fcb30ae9502b9842f7e91ea979f43 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2016-07-08  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+       * sysdeps/unix/sysv/linux/mips/kernel-features.h
+       (__ASSUME_OFF_DIFF_OFF64): Remove define.
+       * sysdeps/unix/sysv/linux/pread.c
+       [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pread): Replace by
+       __OFF_T_MATCHES_OFF64_T.
+       * sysdeps/unix/sysv/linux/pread64.c
+       [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pread64): Likewise.
+       * sysdeps/unix/sysv/linux/preadv.c
+       [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (preadv): Likewise.
+       * sysdeps/unix/sysv/linux/preadv64.c
+       [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (preadv64): Likewise.
+       * sysdeps/unix/sysv/linux/pwrite.c
+       [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwrite): Likewise.
+       * sysdeps/unix/sysv/linux/pwrite64.c
+       [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwrite64): Likewise.
+       * sysdeps/unix/sysv/linux/pwritev.c
+       [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwritev): Likewise.
+       * sysdeps/unix/sysv/linux/pwritev64.c
+       [__WORDSIZE != 64 || __ASSUME_OFF_DIFF_OFF64] (pwritev64): Likewise.
+
 2016-07-08  Martin Galvan  <martin.galvan@tallertechnologies.com>
 
        * Makeconfig (build-hardcoded-path-in-tests): Set to 'yes'
index 09d5ecedd8a80765fd74d2b048dc8f0939f32629..b486d904c33206cb5a24c0955c87eba10bc09a1e 100644 (file)
@@ -38,5 +38,4 @@
    pass 64-bits values through syscalls.  */
 #if _MIPS_SIM == _ABIN32
 # define __ASSUME_WORDSIZE64_ILP32     1
-# define __ASSUME_OFF_DIFF_OFF64        1
 #endif
index 566309278a491ca4f41114b32b3bd9c8d9afdf6c..1bcff64781b2843b080b6fd2c2f5886500358065 100644 (file)
@@ -19,7 +19,7 @@
 #include <unistd.h>
 #include <sysdep-cancel.h>
 
-#if __WORDSIZE != 64 || defined (__ASSUME_OFF_DIFF_OFF64)
+#ifndef __OFF_T_MATCHES_OFF64_T
 
 # ifndef __NR_pread
 #  define __NR_pread __NR_pread64
index c599f7664b50331a87b6be48912206e749f21d2a..58c6aeb5413ac606ba6cf7d43ae53c00ebc234d6 100644 (file)
@@ -33,7 +33,7 @@ __libc_pread64 (int fd, void *buf, size_t count, off64_t offset)
 weak_alias (__libc_pread64, __pread64)
 weak_alias (__libc_pread64, pread64)
 
-#if __WORDSIZE == 64 && !defined (__ASSUME_OFF_DIFF_OFF64)
+#ifdef __OFF_T_MATCHES_OFF64_T
 strong_alias (__libc_pread64, __libc_pread)
 weak_alias (__libc_pread64, __pread)
 weak_alias (__libc_pread64, pread)
index be206e277b5546f878538fd0fe4dd1fc73c7b308..107cb818f934147448e45172ee092789847e7995 100644 (file)
@@ -18,7 +18,7 @@
 #include <sys/uio.h>
 #include <sysdep-cancel.h>
 
-#if __WORDSIZE != 64 || defined (__ASSUME_OFF_DIFF_OFF64)
+#ifndef __OFF_T_MATCHES_OFF64_T
 
 # ifdef __ASSUME_PREADV
 
index 64164bbe6bb8bf464c1265757266a014655ee8d7..66afd4c82e6058253a653c4190c4ac1f5eb8b8c1 100644 (file)
@@ -49,6 +49,6 @@ preadv64 (int fd, const struct iovec *vector, int count, off64_t offset)
 # include <sysdeps/posix/preadv.c>
 #endif
 
-#if __WORDSIZE == 64 && !defined (__ASSUME_OFF_DIFF_OFF64)
+#ifdef __OFF_T_MATCHES_OFF64_T
 strong_alias (preadv64, preadv)
 #endif
index ca3014f06d6ed9ab5696764f863e94427b656e80..9c502beac163b33fc91cabecb3f242ac3b1e9820 100644 (file)
@@ -19,7 +19,7 @@
 #include <unistd.h>
 #include <sysdep-cancel.h>
 
-#if __WORDSIZE != 64 || defined (__ASSUME_OFF_DIFF_OFF64)
+#ifndef __OFF_T_MATCHES_OFF64_T
 
 # ifndef __NR_pwrite
 #  define __NR_pwrite __NR_pwrite64
index 5a37701848f99457ebbe2cd49ade1d45062bb396..b49e6bc286cb05dbb48c02384565867355e71458 100644 (file)
@@ -33,7 +33,7 @@ weak_alias (__libc_pwrite64, __pwrite64)
 libc_hidden_weak (__pwrite64)
 weak_alias (__libc_pwrite64, pwrite64)
 
-#if __WORDSIZE == 64 && !defined (__ASSUME_OFF_DIFF_OFF64)
+#ifdef __OFF_T_MATCHES_OFF64_T
 strong_alias (__libc_pwrite64, __libc_pwrite)
 weak_alias (__libc_pwrite64, __pwrite)
 weak_alias (__libc_pwrite64, pwrite)
index 19b4a109a9a5e181a04b25ec89bd9a7cd8231a82..6747f42c48a523a4db4bba3f0995f84e98590e70 100644 (file)
@@ -18,7 +18,7 @@
 #include <sys/uio.h>
 #include <sysdep-cancel.h>
 
-#if __WORDSIZE != 64 || defined (__ASSUME_OFF_DIFF_OFF64)
+#ifndef __OFF_T_MATCHES_OFF64_T
 
 # ifdef __ASSUME_PREADV
 
index c0cfe4b413664b9a97bd3a8141bcfc7c79eee65e..e162948cabbfccedc102b1c4d5b2bfb354979c65 100644 (file)
@@ -49,6 +49,6 @@ pwritev64 (int fd, const struct iovec *vector, int count, off64_t offset)
 # include <sysdeps/posix/pwritev.c>
 #endif
 
-#if __WORDSIZE == 64 && !defined (__ASSUME_OFF_DIFF_OFF64)
+#ifdef __OFF_T_MATCHES_OFF64_T
 strong_alias (pwritev64, pwritev)
 #endif