alpha: fix fts64 function

Message ID 1458677019-11598-1-git-send-email-aurelien@aurel32.net
State New, archived
Headers

Commit Message

Aurelien Jarno March 22, 2016, 8:03 p.m. UTC
  On wordsize-64 architectures, fts64 is defined as an alias to fts,
because the FTS and FTSENT structures are the same than the FTS64 and
FTSENT64. This is however not true on alpha, where ino_t does not have
the same size than ino64_t.

To fix that, add alpha specific version of fts.c and fts64.c including
io/fts.c and io/fts64.c to have two different versions. This fixes the
io/tst-fts-lfs test.

Changelog:
	* sysdeps/unix/sysv/linux/alpha/fts.c: New file.
	* sysdeps/unix/sysv/linux/alpha/fts64.c: New file.
---
 ChangeLog                             | 5 +++++
 sysdeps/unix/sysv/linux/alpha/fts.c   | 1 +
 sysdeps/unix/sysv/linux/alpha/fts64.c | 1 +
 3 files changed, 7 insertions(+)
 create mode 100644 sysdeps/unix/sysv/linux/alpha/fts.c
 create mode 100644 sysdeps/unix/sysv/linux/alpha/fts64.c
  

Comments

Roland McGrath March 28, 2016, 10:57 p.m. UTC | #1
Rather than special-casing alpha, the logic for whether the aliases can be
used should test __INO_T_MATCHES_INO64_T et al.  It might require inventing
analogous macros for all the LFS-affected types used in FTSENT, but IMHO
that is the right way to do this.
  

Patch

diff --git a/ChangeLog b/ChangeLog
index 36360d9..066b6d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@ 
+2016-03-22  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/unix/sysv/linux/alpha/fts.c: New file.
+	* sysdeps/unix/sysv/linux/alpha/fts64.c: New file.
+
 2016-03-22  Samuel Thibault  <samuel.thibault@ens-lyon.org>
 
 	* malloc/Makefile ($(objpfx)tst-malloc-backtrace,
diff --git a/sysdeps/unix/sysv/linux/alpha/fts.c b/sysdeps/unix/sysv/linux/alpha/fts.c
new file mode 100644
index 0000000..d0c62e6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/fts.c
@@ -0,0 +1 @@ 
+#include <io/fts.c>
diff --git a/sysdeps/unix/sysv/linux/alpha/fts64.c b/sysdeps/unix/sysv/linux/alpha/fts64.c
new file mode 100644
index 0000000..2472f8b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/fts64.c
@@ -0,0 +1 @@ 
+#include <io/fts64.c>