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.23-554-g4687006


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  468700675f7f36d55758c36b1ed902250470e8ec (commit)
       via  6320de95367a6d5a7849d2a2ccdd9189277fc181 (commit)
      from  62ce266b0b261def2c6329be9814ffdcc11964d6 (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=468700675f7f36d55758c36b1ed902250470e8ec

commit 468700675f7f36d55758c36b1ed902250470e8ec
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Jul 4 11:34:35 2016 -0300

    Fix LO_HI_LONG definition
    
    The p{read,write}v{64} consolidation patch [1] added a wrong guard
    for LO_HI_LONG definition.  It currently uses both
    '__WORDSIZE == 64' and 'defined __ASSUME_WORDSIZE64_ILP32' to set
    the value to be passed in one argument, otherwise it will be split
    in two.
    
    However it fails on MIPS64n32 where syscalls n32 uses the compat
    implementation in the kernel meaning the off_t arguments are passed
    in two separate registers.
    
    GLIBC already defines a macro for such cases (__OFF_T_MATCHES_OFF64_T),
    so this patch uses it instead.
    
    Checked on x86_64, i686, x32, aarch64, armhf, and s390.
    
    	* sysdeps/unix/sysv/linux/sysdep.h
    	[__WORDSIZE == 64 || __ASSUME_WORDSIZE64_ILP32] (LO_HI_LONG): Remove
    	guards.
    	* misc/tst-preadvwritev-common.c: New file.
    	* misc/tst-preadvwritev.c: Use tst-preadvwritev-common.c.
    	* misc/tst-preadvwritev64.c: Use tst-preadwritev-common.c and add
    	a check for files larger than 2GB.
    
    [1] 4751bbe2ad4d1bfa05774e29376d553ecfe563b0

diff --git a/ChangeLog b/ChangeLog
index 8406319..222e4d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2016-07-08  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* sysdeps/unix/sysv/linux/sysdep.h
+	[__WORDSIZE == 64 || __ASSUME_WORDSIZE64_ILP32] (LO_HI_LONG): Remove
+	guards.
+	* misc/tst-preadvwritev-common.c: New file.
+	* misc/tst-preadvwritev.c: Use tst-preadvwritev-common.c.
+	* misc/tst-preadvwritev64.c: Use tst-preadwritev-common.c and add
+	a check for files larger than 2GB.
+
 	* sysdeps/unix/sysv/linux/mips/kernel-features.h
 	(__ASSUME_OFF_DIFF_OFF64): Remove define.
 	* sysdeps/unix/sysv/linux/pread.c
diff --git a/misc/tst-preadvwritev.c b/misc/tst-preadvwritev-common.c
similarity index 63%
copy from misc/tst-preadvwritev.c
copy to misc/tst-preadvwritev-common.c
index 08deecc..2b1e36f 100644
--- a/misc/tst-preadvwritev.c
+++ b/misc/tst-preadvwritev-common.c
@@ -1,4 +1,4 @@
-/* Tests for preadv and pwritev.
+/* Common definitions for preadv and pwritev.
    Copyright (C) 2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -18,25 +18,19 @@
 
 #include <sys/uio.h>
 
-/* Allow testing of the 64-bit versions as well.  */
-#ifndef PREADV
-# define PREADV  preadv
-# define PWRITEV pwritev
-#endif
-
 static void do_prepare (void);
-static int do_test (void);
 #define PREPARE(argc, argv)     do_prepare ()
+static int do_test (void);
 #define TEST_FUNCTION           do_test ()
-#include "../test-skeleton.c"
+#include "test-skeleton.c"
 
 static char *temp_filename;
 static int temp_fd;
 
-void
+static void
 do_prepare (void)
 {
-  temp_fd = create_temp_file ("tst-PREADVwritev.", &temp_filename);
+  temp_fd = create_temp_file ("tst-preadvwritev.", &temp_filename);
   if (temp_fd == -1)
     {
       printf ("cannot create temporary file: %m\n");
@@ -47,8 +41,8 @@ do_prepare (void)
 #define FAIL(str) \
   do { printf ("error: %s (line %d)\n", str, __LINE__); return 1; } while (0)
 
-int
-do_test (void)
+static int
+do_test_with_offset (off_t offset)
 {
   struct iovec iov[2];
   ssize_t ret;
@@ -59,23 +53,24 @@ do_test (void)
   memset (buf1, 0xf0, sizeof buf1);
   memset (buf2, 0x0f, sizeof buf2);
 
+  /* Write two buffer with 32 and 64 bytes respectively.  */
   memset (iov, 0, sizeof iov);
   iov[0].iov_base = buf1;
   iov[0].iov_len = sizeof buf1;
   iov[1].iov_base = buf2;
   iov[1].iov_len = sizeof buf2;
 
-  ret = PWRITEV (temp_fd, iov, 2, 0);
+  ret = pwritev (temp_fd, iov, 2, offset);
   if (ret == -1)
-    FAIL ("first PWRITEV returned -1");
+    FAIL ("first pwritev returned -1");
   if (ret != (sizeof buf1 + sizeof buf2))
-    FAIL ("first PWRITEV returned an unexpected value");
+    FAIL ("first pwritev returned an unexpected value");
 
-  ret = PWRITEV (temp_fd, iov, 2, sizeof buf1 + sizeof buf2);
+  ret = pwritev (temp_fd, iov, 2, sizeof buf1 + sizeof buf2 + offset);
   if (ret == -1)
-    FAIL ("second PWRITEV returned -1");
+    FAIL ("second pwritev returned -1");
   if (ret != (sizeof buf1 + sizeof buf2))
-    FAIL ("second PWRITEV returned an unexpected value");
+    FAIL ("second pwritev returned an unexpected value");
 
   char buf3[32];
   char buf4[64];
@@ -88,27 +83,29 @@ do_test (void)
   iov[1].iov_base = buf4;
   iov[1].iov_len = sizeof buf4;
 
-  ret = PREADV (temp_fd, iov, 2, 0);
+  /* Now read two buffer with 32 and 64 bytes respectively.  */
+  ret = preadv (temp_fd, iov, 2, offset);
   if (ret == -1)
-    FAIL ("first PREADV returned -1");
+    FAIL ("first preadv returned -1");
   if (ret != (sizeof buf3 + sizeof buf4))
-    FAIL ("first PREADV returned an unexpected value");
+    FAIL ("first preadv returned an unexpected value");
 
   if (memcmp (buf1, buf3, sizeof buf1) != 0)
-    FAIL ("first buffer from first PREADV different than expected");
+    FAIL ("first buffer from first preadv different than expected");
   if (memcmp (buf2, buf4, sizeof buf2) != 0)
-    FAIL ("second buffer from first PREADV different than expected");
+    FAIL ("second buffer from first preadv different than expected");
 
-  ret = PREADV (temp_fd, iov, 2, sizeof buf3 + sizeof buf4);
+  ret = preadv (temp_fd, iov, 2, sizeof buf3 + sizeof buf4 + offset);
   if (ret == -1)
-    FAIL ("second PREADV returned -1");
+    FAIL ("second preadv returned -1");
   if (ret != (sizeof buf3 + sizeof buf4))
-    FAIL ("second PREADV returned an unexpected value");
+    FAIL ("second preadv returned an unexpected value");
 
+  /* And compare the buffers read and written to check if there are equal.  */
   if (memcmp (buf1, buf3, sizeof buf1) != 0)
-    FAIL ("first buffer from second PREADV different than expected");
+    FAIL ("first buffer from second preadv different than expected");
   if (memcmp (buf2, buf4, sizeof buf2) != 0)
-    FAIL ("second buffer from second PREADV different than expected");
+    FAIL ("second buffer from second preadv different than expected");
 
   return 0;
 }
diff --git a/misc/tst-preadvwritev.c b/misc/tst-preadvwritev.c
index 08deecc..fb3f129 100644
--- a/misc/tst-preadvwritev.c
+++ b/misc/tst-preadvwritev.c
@@ -16,99 +16,10 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <sys/uio.h>
+#include "tst-preadvwritev-common.c"
 
-/* Allow testing of the 64-bit versions as well.  */
-#ifndef PREADV
-# define PREADV  preadv
-# define PWRITEV pwritev
-#endif
-
-static void do_prepare (void);
-static int do_test (void);
-#define PREPARE(argc, argv)     do_prepare ()
-#define TEST_FUNCTION           do_test ()
-#include "../test-skeleton.c"
-
-static char *temp_filename;
-static int temp_fd;
-
-void
-do_prepare (void)
-{
-  temp_fd = create_temp_file ("tst-PREADVwritev.", &temp_filename);
-  if (temp_fd == -1)
-    {
-      printf ("cannot create temporary file: %m\n");
-      exit (1);
-    }
-}
-
-#define FAIL(str) \
-  do { printf ("error: %s (line %d)\n", str, __LINE__); return 1; } while (0)
-
-int
+static int
 do_test (void)
 {
-  struct iovec iov[2];
-  ssize_t ret;
-
-  char buf1[32];
-  char buf2[64];
-
-  memset (buf1, 0xf0, sizeof buf1);
-  memset (buf2, 0x0f, sizeof buf2);
-
-  memset (iov, 0, sizeof iov);
-  iov[0].iov_base = buf1;
-  iov[0].iov_len = sizeof buf1;
-  iov[1].iov_base = buf2;
-  iov[1].iov_len = sizeof buf2;
-
-  ret = PWRITEV (temp_fd, iov, 2, 0);
-  if (ret == -1)
-    FAIL ("first PWRITEV returned -1");
-  if (ret != (sizeof buf1 + sizeof buf2))
-    FAIL ("first PWRITEV returned an unexpected value");
-
-  ret = PWRITEV (temp_fd, iov, 2, sizeof buf1 + sizeof buf2);
-  if (ret == -1)
-    FAIL ("second PWRITEV returned -1");
-  if (ret != (sizeof buf1 + sizeof buf2))
-    FAIL ("second PWRITEV returned an unexpected value");
-
-  char buf3[32];
-  char buf4[64];
-
-  memset (buf3, 0x0f, sizeof buf3);
-  memset (buf4, 0xf0, sizeof buf4);
-
-  iov[0].iov_base = buf3;
-  iov[0].iov_len = sizeof buf3;
-  iov[1].iov_base = buf4;
-  iov[1].iov_len = sizeof buf4;
-
-  ret = PREADV (temp_fd, iov, 2, 0);
-  if (ret == -1)
-    FAIL ("first PREADV returned -1");
-  if (ret != (sizeof buf3 + sizeof buf4))
-    FAIL ("first PREADV returned an unexpected value");
-
-  if (memcmp (buf1, buf3, sizeof buf1) != 0)
-    FAIL ("first buffer from first PREADV different than expected");
-  if (memcmp (buf2, buf4, sizeof buf2) != 0)
-    FAIL ("second buffer from first PREADV different than expected");
-
-  ret = PREADV (temp_fd, iov, 2, sizeof buf3 + sizeof buf4);
-  if (ret == -1)
-    FAIL ("second PREADV returned -1");
-  if (ret != (sizeof buf3 + sizeof buf4))
-    FAIL ("second PREADV returned an unexpected value");
-
-  if (memcmp (buf1, buf3, sizeof buf1) != 0)
-    FAIL ("first buffer from second PREADV different than expected");
-  if (memcmp (buf2, buf4, sizeof buf2) != 0)
-    FAIL ("second buffer from second PREADV different than expected");
-
-  return 0;
+  return do_test_with_offset (0);
 }
diff --git a/misc/tst-preadvwritev64.c b/misc/tst-preadvwritev64.c
index ff6e134..53e153e 100644
--- a/misc/tst-preadvwritev64.c
+++ b/misc/tst-preadvwritev64.c
@@ -16,7 +16,36 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#define PREADV  preadv64
-#define PWRITEV pwritev64
+#define _FILE_OFFSET_BITS 64
+#include "tst-preadvwritev-common.c"
 
-#include "tst-preadvwritev.c"
+static int
+do_test (void)
+{
+  int ret;
+
+  ret = do_test_with_offset (0);
+
+  /* Create a sparse file larger than 4GB to check if offset is handled
+     correctly in p{write,read}v64. */
+  off_t base_offset = UINT32_MAX + 2048LL;
+  ret += do_test_with_offset (base_offset);
+
+  struct stat st;
+  if (fstat (temp_fd, &st) == -1)
+    {
+      printf ("error: fstat on temporary file failed: %m");
+      return 1;
+    }
+
+  /* The total size should base_offset plus 2 * 96.  */
+  off_t expected_value = base_offset + (2 * (96LL));
+  if (st.st_size != expected_value)
+    {
+      printf ("error: file size different than expected (%jd != %jd)\n",
+	      (intmax_t) expected_value, (intmax_t) st.st_size);
+      return 1;
+    }
+
+  return ret;
+}
diff --git a/sysdeps/unix/sysv/linux/sysdep.h b/sysdeps/unix/sysv/linux/sysdep.h
index 8c9e62e..a469f57 100644
--- a/sysdeps/unix/sysv/linux/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sysdep.h
@@ -49,10 +49,6 @@
 #endif
 
 /* Provide a macro to pass the off{64}_t argument on p{readv,writev}{64}.  */
-#if __WORDSIZE == 64 || defined __ASSUME_WORDSIZE64_ILP32
-# define LO_HI_LONG(val) (val)
-#else
-# define LO_HI_LONG(val) \
-  (long) (val), \
-  (long) (((uint64_t) (val)) >> 32)
-#endif
+#define LO_HI_LONG(val) \
+ (long) (val), \
+ (long) (((uint64_t) (val)) >> 32)

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

commit 6320de95367a6d5a7849d2a2ccdd9189277fc181
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Jun 28 09:48:18 2016 -0300

    Remove __ASSUME_OFF_DIFF_OFF64 definition
    
    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.

diff --git a/ChangeLog b/ChangeLog
index 72b1c72..8406319 100644
--- 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'
diff --git a/sysdeps/unix/sysv/linux/mips/kernel-features.h b/sysdeps/unix/sysv/linux/mips/kernel-features.h
index 09d5ece..b486d90 100644
--- a/sysdeps/unix/sysv/linux/mips/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/mips/kernel-features.h
@@ -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
diff --git a/sysdeps/unix/sysv/linux/pread.c b/sysdeps/unix/sysv/linux/pread.c
index 5663092..1bcff64 100644
--- a/sysdeps/unix/sysv/linux/pread.c
+++ b/sysdeps/unix/sysv/linux/pread.c
@@ -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
diff --git a/sysdeps/unix/sysv/linux/pread64.c b/sysdeps/unix/sysv/linux/pread64.c
index c599f76..58c6aeb 100644
--- a/sysdeps/unix/sysv/linux/pread64.c
+++ b/sysdeps/unix/sysv/linux/pread64.c
@@ -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)
diff --git a/sysdeps/unix/sysv/linux/preadv.c b/sysdeps/unix/sysv/linux/preadv.c
index be206e2..107cb81 100644
--- a/sysdeps/unix/sysv/linux/preadv.c
+++ b/sysdeps/unix/sysv/linux/preadv.c
@@ -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
 
diff --git a/sysdeps/unix/sysv/linux/preadv64.c b/sysdeps/unix/sysv/linux/preadv64.c
index 64164bb..66afd4c 100644
--- a/sysdeps/unix/sysv/linux/preadv64.c
+++ b/sysdeps/unix/sysv/linux/preadv64.c
@@ -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
diff --git a/sysdeps/unix/sysv/linux/pwrite.c b/sysdeps/unix/sysv/linux/pwrite.c
index ca3014f..9c502be 100644
--- a/sysdeps/unix/sysv/linux/pwrite.c
+++ b/sysdeps/unix/sysv/linux/pwrite.c
@@ -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
diff --git a/sysdeps/unix/sysv/linux/pwrite64.c b/sysdeps/unix/sysv/linux/pwrite64.c
index 5a37701..b49e6bc 100644
--- a/sysdeps/unix/sysv/linux/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/pwrite64.c
@@ -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)
diff --git a/sysdeps/unix/sysv/linux/pwritev.c b/sysdeps/unix/sysv/linux/pwritev.c
index 19b4a10..6747f42 100644
--- a/sysdeps/unix/sysv/linux/pwritev.c
+++ b/sysdeps/unix/sysv/linux/pwritev.c
@@ -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
 
diff --git a/sysdeps/unix/sysv/linux/pwritev64.c b/sysdeps/unix/sysv/linux/pwritev64.c
index c0cfe4b..e162948 100644
--- a/sysdeps/unix/sysv/linux/pwritev64.c
+++ b/sysdeps/unix/sysv/linux/pwritev64.c
@@ -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

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

Summary of changes:
 ChangeLog                                          |   30 ++++++
 ...st-preadvwritev.c => tst-preadvwritev-common.c} |   55 ++++++------
 misc/tst-preadvwritev.c                            |   95 +-------------------
 misc/tst-preadvwritev64.c                          |   35 +++++++-
 sysdeps/unix/sysv/linux/mips/kernel-features.h     |    1 -
 sysdeps/unix/sysv/linux/pread.c                    |    2 +-
 sysdeps/unix/sysv/linux/pread64.c                  |    2 +-
 sysdeps/unix/sysv/linux/preadv.c                   |    2 +-
 sysdeps/unix/sysv/linux/preadv64.c                 |    2 +-
 sysdeps/unix/sysv/linux/pwrite.c                   |    2 +-
 sysdeps/unix/sysv/linux/pwrite64.c                 |    2 +-
 sysdeps/unix/sysv/linux/pwritev.c                  |    2 +-
 sysdeps/unix/sysv/linux/pwritev64.c                |    2 +-
 sysdeps/unix/sysv/linux/sysdep.h                   |   10 +--
 14 files changed, 102 insertions(+), 140 deletions(-)
 copy misc/{tst-preadvwritev.c => tst-preadvwritev-common.c} (63%)


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]