about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r--sysdeps/unix/sysv/linux/alpha/getdents.c6
-rw-r--r--sysdeps/unix/sysv/linux/alpha/getdents64.c1
-rw-r--r--sysdeps/unix/sysv/linux/alpha/readdir.c7
-rw-r--r--sysdeps/unix/sysv/linux/alpha/readdir64.c1
-rw-r--r--sysdeps/unix/sysv/linux/alpha/readdir64_r.c1
-rw-r--r--sysdeps/unix/sysv/linux/alpha/readdir_r.c4
-rw-r--r--sysdeps/unix/sysv/linux/arm/Versions3
-rw-r--r--sysdeps/unix/sysv/linux/arm/glob64.c1
-rw-r--r--sysdeps/unix/sysv/linux/i386/Versions3
-rw-r--r--sysdeps/unix/sysv/linux/i386/glob64.c48
-rw-r--r--sysdeps/unix/sysv/linux/ia64/readdir.c8
-rw-r--r--sysdeps/unix/sysv/linux/ia64/readdir_r.c5
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/Versions3
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/glob64.c1
-rw-r--r--sysdeps/unix/sysv/linux/readdir64.c9
-rw-r--r--sysdeps/unix/sysv/linux/readdir64_r.c9
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/Versions3
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/glob64.c1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/readdir.c8
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/readdir_r.c5
20 files changed, 89 insertions, 38 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/getdents.c b/sysdeps/unix/sysv/linux/alpha/getdents.c
index f127cd8aad..dfecfef924 100644
--- a/sysdeps/unix/sysv/linux/alpha/getdents.c
+++ b/sysdeps/unix/sysv/linux/alpha/getdents.c
@@ -1,5 +1,3 @@
-#define DIRENT_TYPE struct dirent64
-#define __getdents64 __no___getdents64_decl
+#define DIRENT_SET_DP_INO(dp, value) \
+  do { (dp)->d_ino = (value); (dp)->__pad = 0; } while (0)
 #include <sysdeps/unix/sysv/linux/getdents.c>
-#undef __getdents64
-weak_alias(__getdents, __getdents64);
diff --git a/sysdeps/unix/sysv/linux/alpha/getdents64.c b/sysdeps/unix/sysv/linux/alpha/getdents64.c
deleted file mode 100644
index 0df2c8f4c6..0000000000
--- a/sysdeps/unix/sysv/linux/alpha/getdents64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* getdents64 is in getdents.c */
diff --git a/sysdeps/unix/sysv/linux/alpha/readdir.c b/sysdeps/unix/sysv/linux/alpha/readdir.c
deleted file mode 100644
index 300ebb2629..0000000000
--- a/sysdeps/unix/sysv/linux/alpha/readdir.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#define readdir64 __no_readdir64_decl
-#define __readdir64 __no___readdir64_decl
-#include <sysdeps/unix/readdir.c>
-#undef __readdir64
-strong_alias (__readdir, __readdir64)
-#undef readdir64
-weak_alias (__readdir, readdir64)
diff --git a/sysdeps/unix/sysv/linux/alpha/readdir64.c b/sysdeps/unix/sysv/linux/alpha/readdir64.c
deleted file mode 100644
index 9796431dc4..0000000000
--- a/sysdeps/unix/sysv/linux/alpha/readdir64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* readdir64 is in readdir.c */
diff --git a/sysdeps/unix/sysv/linux/alpha/readdir64_r.c b/sysdeps/unix/sysv/linux/alpha/readdir64_r.c
deleted file mode 100644
index b8fe9a31b4..0000000000
--- a/sysdeps/unix/sysv/linux/alpha/readdir64_r.c
+++ /dev/null
@@ -1 +0,0 @@
-/* readdir64_r is in readdir_r.c */
diff --git a/sysdeps/unix/sysv/linux/alpha/readdir_r.c b/sysdeps/unix/sysv/linux/alpha/readdir_r.c
deleted file mode 100644
index adb92db6af..0000000000
--- a/sysdeps/unix/sysv/linux/alpha/readdir_r.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#define readdir64_r __no_readdir64_r_decl
-#include <sysdeps/unix/readdir_r.c>
-#undef readdir64_r
-weak_alias (__readdir_r, readdir64_r)
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index 5498086253..aeda9fa5fb 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -17,6 +17,9 @@ libc {
     # a*
     alphasort64;
 
+    # g*
+    glob64;
+
     # New rlimit interface
     getrlimit; setrlimit; getrlimit64;
 
diff --git a/sysdeps/unix/sysv/linux/arm/glob64.c b/sysdeps/unix/sysv/linux/arm/glob64.c
new file mode 100644
index 0000000000..82a9a296a7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/glob64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/glob64.c>
diff --git a/sysdeps/unix/sysv/linux/i386/Versions b/sysdeps/unix/sysv/linux/i386/Versions
index b7af24b1b3..3015c41451 100644
--- a/sysdeps/unix/sysv/linux/i386/Versions
+++ b/sysdeps/unix/sysv/linux/i386/Versions
@@ -19,6 +19,9 @@ libc {
     # a*
     alphasort64;
 
+    # g*
+    glob64;
+
     # New rlimit interface
     getrlimit; setrlimit; getrlimit64;
 
diff --git a/sysdeps/unix/sysv/linux/i386/glob64.c b/sysdeps/unix/sysv/linux/i386/glob64.c
new file mode 100644
index 0000000000..9f32742034
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/i386/glob64.c
@@ -0,0 +1,48 @@
+#include <dirent.h>
+#include <glob.h>
+#include <sys/stat.h>
+
+#define dirent dirent64
+#define __readdir(dirp) __readdir64 (dirp)
+
+#define glob_t glob64_t
+#define glob(pattern, flags, errfunc, pglob) \
+  __glob64 (pattern, flags, errfunc, pglob)
+#define globfree(pglob) globfree64 (pglob)
+
+#undef stat
+#define stat stat64
+#undef __stat
+#define __stat(file, buf) __xstat64 (_STAT_VER, file, buf)
+
+#define NO_GLOB_PATTERN_P 1
+
+#include <sysdeps/generic/glob.c>
+
+#include "shlib-compat.h"
+
+versioned_symbol (libc, __glob64, glob64, GLIBC_2_2);
+
+#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
+
+#include <sysdeps/unix/sysv/linux/i386/olddirent.h>
+
+int __old_glob64 (__const char *__pattern, int __flags,
+		  int (*__errfunc) (__const char *, int),
+		  glob64_t *__pglob);
+
+#undef dirent
+#define dirent __old_dirent64
+#undef __readdir
+#define __readdir(dirp) __old_readdir64 (dirp)
+#undef glob
+#define glob(pattern, flags, errfunc, pglob) \
+  __old_glob64 (pattern, flags, errfunc, pglob)
+#define glob_in_dir __old_glob_in_dir
+
+#define GLOB_ONLY_P 1
+
+#include <sysdeps/generic/glob.c>
+
+compat_symbol (libc, __old_glob64, glob64, GLIBC_2_1);
+#endif
diff --git a/sysdeps/unix/sysv/linux/ia64/readdir.c b/sysdeps/unix/sysv/linux/ia64/readdir.c
index e64b2f8bdd..300ebb2629 100644
--- a/sysdeps/unix/sysv/linux/ia64/readdir.c
+++ b/sysdeps/unix/sysv/linux/ia64/readdir.c
@@ -1 +1,7 @@
-#include <sysdeps/unix/sysv/linux/alpha/readdir.c>
+#define readdir64 __no_readdir64_decl
+#define __readdir64 __no___readdir64_decl
+#include <sysdeps/unix/readdir.c>
+#undef __readdir64
+strong_alias (__readdir, __readdir64)
+#undef readdir64
+weak_alias (__readdir, readdir64)
diff --git a/sysdeps/unix/sysv/linux/ia64/readdir_r.c b/sysdeps/unix/sysv/linux/ia64/readdir_r.c
index fc5818fa19..adb92db6af 100644
--- a/sysdeps/unix/sysv/linux/ia64/readdir_r.c
+++ b/sysdeps/unix/sysv/linux/ia64/readdir_r.c
@@ -1 +1,4 @@
-#include <sysdeps/unix/sysv/linux/alpha/readdir_r.c>
+#define readdir64_r __no_readdir64_r_decl
+#include <sysdeps/unix/readdir_r.c>
+#undef readdir64_r
+weak_alias (__readdir_r, readdir64_r)
diff --git a/sysdeps/unix/sysv/linux/powerpc/Versions b/sysdeps/unix/sysv/linux/powerpc/Versions
index 1ea93d74f3..a2296a968a 100644
--- a/sysdeps/unix/sysv/linux/powerpc/Versions
+++ b/sysdeps/unix/sysv/linux/powerpc/Versions
@@ -9,6 +9,9 @@ libc {
     # functions used in other libraries
     __xstat64; __fxstat64; __lxstat64;
 
+    # g*
+    glob64;
+
     # New rlimit interface
     getrlimit; setrlimit; getrlimit64; setrlimit64;
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/glob64.c b/sysdeps/unix/sysv/linux/powerpc/glob64.c
new file mode 100644
index 0000000000..82a9a296a7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/glob64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/glob64.c>
diff --git a/sysdeps/unix/sysv/linux/readdir64.c b/sysdeps/unix/sysv/linux/readdir64.c
index 9341e3bd13..fa815e9581 100644
--- a/sysdeps/unix/sysv/linux/readdir64.c
+++ b/sysdeps/unix/sysv/linux/readdir64.c
@@ -4,11 +4,4 @@
 
 #include <sysdeps/unix/readdir.c>
 
-#include <shlib-compat.h>
-
-versioned_symbol (libc, __readdir64, readdir64, GLIBC_2_2);
-
-#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__readdir64, __old_readdir64)
-compat_symbol (libc, __old_readdir64, readdir64, GLIBC_2_1);
-#endif
+weak_alias(__readdir64, readdir64)
diff --git a/sysdeps/unix/sysv/linux/readdir64_r.c b/sysdeps/unix/sysv/linux/readdir64_r.c
index 63a6b80f95..d63680bf9a 100644
--- a/sysdeps/unix/sysv/linux/readdir64_r.c
+++ b/sysdeps/unix/sysv/linux/readdir64_r.c
@@ -4,11 +4,4 @@
 
 #include <sysdeps/unix/readdir_r.c>
 
-#include <shlib-compat.h>
-
-versioned_symbol (libc, __readdir64_r, readdir64_r, GLIBC_2_2);
-
-#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__readdir64_r, __old_readdir64_r)
-compat_symbol (libc, __old_readdir64_r, readdir64_r, GLIBC_2_1);
-#endif
+weak_alias(__readdir64_r, readdir64_r)
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/Versions b/sysdeps/unix/sysv/linux/sparc/sparc32/Versions
index 2448fa2d37..d7a19f812a 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/Versions
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/Versions
@@ -9,6 +9,9 @@ libc {
     # functions used in other libraries
     __xstat64; __fxstat64; __lxstat64;
 
+    # g*
+    glob64;
+
     # r*
     readdir64; readdir64_r;
 
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/glob64.c b/sysdeps/unix/sysv/linux/sparc/sparc32/glob64.c
new file mode 100644
index 0000000000..82a9a296a7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/glob64.c
@@ -0,0 +1 @@
+#include <sysdeps/unix/sysv/linux/i386/glob64.c>
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/readdir.c b/sysdeps/unix/sysv/linux/sparc/sparc64/readdir.c
index e64b2f8bdd..300ebb2629 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/readdir.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/readdir.c
@@ -1 +1,7 @@
-#include <sysdeps/unix/sysv/linux/alpha/readdir.c>
+#define readdir64 __no_readdir64_decl
+#define __readdir64 __no___readdir64_decl
+#include <sysdeps/unix/readdir.c>
+#undef __readdir64
+strong_alias (__readdir, __readdir64)
+#undef readdir64
+weak_alias (__readdir, readdir64)
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/readdir_r.c b/sysdeps/unix/sysv/linux/sparc/sparc64/readdir_r.c
index fc5818fa19..adb92db6af 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/readdir_r.c
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/readdir_r.c
@@ -1 +1,4 @@
-#include <sysdeps/unix/sysv/linux/alpha/readdir_r.c>
+#define readdir64_r __no_readdir64_r_decl
+#include <sysdeps/unix/readdir_r.c>
+#undef readdir64_r
+weak_alias (__readdir_r, readdir64_r)