* [RFC PATCH] Kill some duplication between 64-bit linux arches
@ 2004-03-23 19:32 Jakub Jelinek
2004-03-23 19:38 ` Ulrich Drepper
0 siblings, 1 reply; 8+ messages in thread
From: Jakub Jelinek @ 2004-03-23 19:32 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: Glibc hackers
Hi!
Seeing that on ppc64
#include <unistd.h>
int main (void) { ftruncate64 (1, 32); }
results in:
ftruncate64(1, 32) = -1 ENOSYS (Function not implemented)
ftruncate(1, 32) = -1 EINVAL (Invalid argument)
(instead of just the second call),
#include <sys/mman.h>
int main (void) { mmap64 (0, 16384, PROT_NONE, MAP_FIXED, 0, 0); }
is:
mmap2(NULL, 16384, PROT_NONE, MAP_FILE|MAP_FIXED, 0, 0) = -1 ENOSYS (Function not implemented)
mmap(NULL, 16384, PROT_NONE, MAP_FILE|MAP_FIXED, 0, 0) = -1 ENODEV (No such device)
(again, mmap is enough)
I think increasing code sharing between 64-bit linux architectures sounds
certainly like a good thing.
The following patch has been so far tested just on x86-64, but if you agree
with it I'll test it on other 64-bit arches as well.
2004-03-23 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/alpha/sysdep.h (__NR_pread, __NR_pwrite):
Define to __NR_p{read,write}64 if not defined.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (__NR_pread,
__NR_pwrite): Define to __NR_p{read,write}64 if not defined instead
of defining it the other way around.
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Move common syscalls
for 64bit arches to sysdeps/unix/sysv/linux/wordsize-64/syscalls.list.
* sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/alpha/pread64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/getrlimit64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/glob64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/truncate64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/xstat64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/pwrite64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/posix_fadvise.c: Removed.
* sysdeps/unix/sysv/linux/alpha/mmap64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/fxstat64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/setrlimit64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/ftruncate64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/sendfile64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/lxstat64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/statfs64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/fstatfs64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/pread64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/getrlimit64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/glob64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/readdir64_r.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/truncate64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/xstat64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/pwrite64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/getdents64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/readdir_r.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/lxstat.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/readdir.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/posix_fadvise.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/mmap64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/xstat.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/fxstat64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/setrlimit64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/ftruncate64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/getdents.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/lxstat64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/posix_fadvise64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/readdir64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/fxstat.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/statfs64.c: Removed.
* sysdeps/unix/sysv/linux/s390/s390-64/fstatfs64.c: Removed.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/glob64.c: Removed.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/truncate64.c: Removed.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/xstat64.c: Removed.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/posix_fadvise.c: Removed.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/fxstat64.c: Removed.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/ftruncate64.c: Removed.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/lxstat64.c: Removed.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/posix_fadvise64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/pread64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/getrlimit64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/glob64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/readdir64_r.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/truncate64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/xstat64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/pwrite64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/getdents64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/readdir_r.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/readdir.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/posix_fadvise.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/mmap64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/fxstat64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/setrlimit64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/ftruncate64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/sendfile64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/getdents.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/lxstat64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/posix_fadvise64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/readdir64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/statfs64.c: Removed.
* sysdeps/unix/sysv/linux/sparc/sparc64/fstatfs64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/pread64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/getrlimit64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/glob64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/readdir64_r.c: Removed.
* sysdeps/unix/sysv/linux/ia64/truncate64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/xstat64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/pwrite64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/getdents64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/readdir_r.c: Removed.
* sysdeps/unix/sysv/linux/ia64/lxstat.c: Removed.
* sysdeps/unix/sysv/linux/ia64/readdir.c: Removed.
* sysdeps/unix/sysv/linux/ia64/posix_fadvise.c: Removed.
* sysdeps/unix/sysv/linux/ia64/mmap64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/xstat.c: Removed.
* sysdeps/unix/sysv/linux/ia64/fxstat64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/setrlimit64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/ftruncate64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/sendfile64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/getdents.c: Removed.
* sysdeps/unix/sysv/linux/ia64/lxstat64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/posix_fadvise64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/readdir64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/fxstat.c: Removed.
* sysdeps/unix/sysv/linux/ia64/statfs64.c: Removed.
* sysdeps/unix/sysv/linux/ia64/fstatfs64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/pread64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/getrlimit64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/glob64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/readdir64_r.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/truncate64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/xstat64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/pwrite64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/getdents64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/readdir_r.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/lxstat.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/readdir.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/posix_fadvise.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/mmap64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/xstat.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/fxstat64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/setrlimit64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/ftruncate64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/sendfile64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/getdents.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/lxstat64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/posix_fadvise64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/readdir64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/fxstat.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/statfs64.c: Removed.
* sysdeps/unix/sysv/linux/x86_64/fstatfs64.c: Removed.
* sysdeps/unix/sysv/linux/alpha/Implies: New file.
* sysdeps/unix/sysv/linux/alpha/getdents64.c: New file.
* sysdeps/unix/sysv/linux/s390/s390-64/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/Implies: New file.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/Implies: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/lxstat.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc64/fxstat.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/statvfs64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/fstatvfs64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/pread64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/fstatvfs.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/getrlimit64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/glob64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/readdir64_r.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/truncate64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/xstat64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/pwrite64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/getdents64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/lxstat.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/readdir.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/posix_fadvise.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/mmap64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/xstat.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/fxstat64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/setrlimit64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/ftruncate64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/sendfile64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/getdents.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/statvfs.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/lxstat64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/posix_fadvise64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/readdir64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/syscalls.list: New file.
* sysdeps/unix/sysv/linux/wordsize-64/fxstat.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/statfs64.c: New file.
* sysdeps/unix/sysv/linux/wordsize-64/fstatfs64.c: New file.
* sysdeps/unix/sysv/linux/ia64/Implies: New file.
* sysdeps/unix/sysv/linux/x86_64/Implies: New file.
--- libc/sysdeps/unix/sysv/linux/alpha/Implies.jj 2004-03-23 16:57:51.592149328 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/Implies 2004-03-23 16:57:47.943803161 +0100
@@ -0,0 +1 @@
+unix/sysv/linux/wordsize-64
--- libc/sysdeps/unix/sysv/linux/alpha/pread64.c.jj 1997-10-26 21:06:07.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/pread64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* Empty since the pread syscall is equivalent. */
--- libc/sysdeps/unix/sysv/linux/alpha/getrlimit64.c.jj 1997-12-22 21:20:46.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/getrlimit64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* getrlimit64 is the same as getrlimit. */
--- libc/sysdeps/unix/sysv/linux/alpha/glob64.c.jj 1998-08-10 17:54:05.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/alpha/glob64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* glob64 is in glob.c */
--- libc/sysdeps/unix/sysv/linux/alpha/truncate64.c.jj 1997-12-22 21:20:47.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/truncate64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* truncate64 is the same as truncate. */
--- libc/sysdeps/unix/sysv/linux/alpha/xstat64.c.jj 1997-10-31 23:51:57.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/xstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* xstat64 is in xstat.c */
--- libc/sysdeps/unix/sysv/linux/alpha/pwrite64.c.jj 1997-10-26 21:06:09.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/pwrite64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* Empty since the pread syscall is equivalent. */
--- libc/sysdeps/unix/sysv/linux/alpha/getdents64.c.jj 2004-03-23 18:27:36.536094632 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/getdents64.c 2004-03-23 18:27:32.464824258 +0100
@@ -0,0 +1 @@
+#include "../getdents64.c"
--- libc/sysdeps/unix/sysv/linux/alpha/posix_fadvise.c.jj 2004-03-03 19:56:20.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/posix_fadvise.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-#include <sysdeps/unix/sysv/linux/x86_64/posix_fadvise.c>
-
--- libc/sysdeps/unix/sysv/linux/alpha/mmap64.c.jj 1997-12-28 16:23:32.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/mmap64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* mmap64 is the same as mmap. */
--- libc/sysdeps/unix/sysv/linux/alpha/fxstat64.c.jj 1997-10-31 23:51:57.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/fxstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* fxstat64 is in fxstat.c */
--- libc/sysdeps/unix/sysv/linux/alpha/setrlimit64.c.jj 1997-12-22 21:20:46.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/setrlimit64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* setrlimit64 is the same as setrlimit. */
--- libc/sysdeps/unix/sysv/linux/alpha/ftruncate64.c.jj 1997-12-22 21:20:46.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/ftruncate64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* ftruncate64 is the same as ftruncate. */
--- libc/sysdeps/unix/sysv/linux/alpha/sendfile64.c.jj 2002-06-07 14:33:51.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/alpha/sendfile64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* sendfile64 is alias of sendfile syscall. */
--- libc/sysdeps/unix/sysv/linux/alpha/sysdep.h.jj 2003-06-20 18:24:36.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/alpha/sysdep.h 2004-03-23 18:31:01.070439314 +0100
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003
+/* Copyright (C) 1992, 1993, 1995, 1996, 1997, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
@@ -65,6 +65,16 @@
# define __NR_semtimedop 423
#endif
+/* This is a kludge to make syscalls.list find these under the names
+ pread and pwrite, since some kernel headers define those names
+ and some define the *64 names for the same system calls. */
+#if !defined __NR_pread && defined __NR_pread64
+# define __NR_pread __NR_pread64
+#endif
+#if !defined __NR_pwrite && defined __NR_pwrite64
+# define __NR_pwrite __NR_pwrite64
+#endif
+
/*
* In order to get the hidden arguments for rt_sigaction set up
* properly, we need to call the assembly version. This shouldn't
--- libc/sysdeps/unix/sysv/linux/alpha/lxstat64.c.jj 1997-10-31 23:51:57.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/lxstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* lxstat64 is in lxstat.c */
--- libc/sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c.jj 2004-03-03 19:56:03.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/posix_fadvise64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* posix_fadvise64 is in posix_fadvise.c */
--- libc/sysdeps/unix/sysv/linux/alpha/syscalls.list.jj 2004-03-05 12:13:04.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/syscalls.list 2004-03-23 18:30:03.300792415 +0100
@@ -18,19 +18,6 @@ vfork - vfork 0 __vfork vfork
getpeername - getpeername i:ipp __getpeername getpeername
getpriority - getpriority i:ii __getpriority getpriority
-mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64
-llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
-lseek llseek -
-pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
-pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
-fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64
-statfs - statfs i:sp __statfs statfs statfs64
-getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
-setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit
-ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64
-truncate - truncate 2 truncate truncate64
-readahead - readahead 3 __readahead readahead
-sendfile - sendfile i:iipi sendfile sendfile64
open - open Ci:siv __libc_open __open open !__libc_open64 __open64 open64
open64 open -
--- libc/sysdeps/unix/sysv/linux/alpha/statfs64.c.jj 1997-12-22 21:20:46.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/statfs64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* statfs64 is the same as statfs. */
--- libc/sysdeps/unix/sysv/linux/alpha/fstatfs64.c.jj 1997-12-22 21:20:46.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/fstatfs64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* fstatfs64 is the same as fstatfs. */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/Implies.jj 2004-03-23 16:36:39.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/Implies 2004-03-23 16:43:08.000000000 +0100
@@ -0,0 +1 @@
+unix/sysv/linux/wordsize-64
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/pread64.c.jj 2001-03-16 10:48:35.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/pread64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* Empty since the pread syscall is equivalent. */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/getrlimit64.c.jj 2001-03-16 10:46:37.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/getrlimit64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* getrlimit64 is the same as getrlimit. */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/glob64.c.jj 2001-03-16 10:47:08.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/glob64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* glob64 is in glob.c */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/readdir64_r.c.jj 2001-03-16 10:49:27.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/readdir64_r.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* readdir64_r is in readdir_r.c */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/truncate64.c.jj 2001-03-16 10:52:33.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/truncate64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* truncate64 is the same as truncate. */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/xstat64.c.jj 2001-03-16 10:52:56.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/xstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* xstat64 is in xstat.c */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/pwrite64.c.jj 2001-03-16 10:48:47.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/pwrite64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* Empty since the pwrite syscall is equivalent. */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/getdents64.c.jj 2001-03-16 10:46:23.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/getdents64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* getdents64 is in getdents.c */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/readdir_r.c.jj 2001-03-16 10:49:39.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/readdir_r.c 1970-01-01 01:00:00.000000000 +0100
@@ -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)
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/lxstat.c.jj 2003-09-03 13:10:52.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/lxstat.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,42 +0,0 @@
-/* lxstat using old-style Unix fstat system call. 64 bit S/390 version.
- Copyright (C) 2001, 2002, 2003 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, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Ho hum, since xstat == xstat64 we must get rid of the prototype or gcc
- will complain since they don't strictly match. */
-#define __lxstat64 __lxstat64_disable
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-/* Get information about the file FD in BUF. */
-int
-__lxstat (int vers, const char *name, struct stat *buf)
-{
- return INLINE_SYSCALL (lstat, 2, name, buf);
-}
-
-hidden_def (__lxstat)
-weak_alias (__lxstat, _lxstat);
-#undef __lxstat64
-strong_alias (__lxstat, __lxstat64);
-hidden_ver (__lxstat, __lxstat64)
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/readdir.c.jj 2001-03-16 10:48:59.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/readdir.c 1970-01-01 01:00:00.000000000 +0100
@@ -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)
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/posix_fadvise.c.jj 2004-03-03 19:56:20.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/posix_fadvise.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-#include <sysdeps/unix/sysv/linux/x86_64/posix_fadvise.c>
-
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/mmap64.c.jj 2001-03-16 10:48:23.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/mmap64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* mmap64 is the same as mmap. */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/xstat.c.jj 2003-09-03 13:10:52.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/xstat.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,41 +0,0 @@
-/* xstat using old-style Unix stat system call. 64 bit S/390 version.
- Copyright (C) 2001, 2002, 2003 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, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Ho hum, since xstat == xstat64 we must get rid of the prototype or gcc
- will complain since they don't strictly match. */
-#define __xstat64 __xstat64_disable
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-/* Get information about the file NAME in BUF. */
-int
-__xstat (int vers, const char *name, struct stat *buf)
-{
- return INLINE_SYSCALL (stat, 2, name, buf);
-}
-hidden_def (__xstat)
-weak_alias (__xstat, _xstat);
-#undef __xstat64
-strong_alias (__xstat, __xstat64);
-hidden_ver (__xstat, __xstat64)
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/fxstat64.c.jj 2001-03-16 10:45:59.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/fxstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* fxstat64 is in fxstat.c */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/setrlimit64.c.jj 2001-03-16 10:50:14.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/setrlimit64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* setrlimit64 is the same as setrlimit. */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/ftruncate64.c.jj 2001-03-16 10:45:37.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/ftruncate64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* ftruncate64 is the same as ftruncate. */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h.jj 2003-08-26 23:07:49.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h 2004-03-23 17:50:04.573676717 +0100
@@ -33,14 +33,13 @@
/*
* Newer kernel versions redefined __NR_pread and __NR_pwrite to
- * __NR_pread64 and __NR_pwrite64. We use the new names but have
- * to define them on our own for compiling against older kernels.
+ * __NR_pread64 and __NR_pwrite64.
*/
-#ifndef __NR_pread64
-# define __NR_pread64 __NR_pread
+#ifndef __NR_pread
+# define __NR_pread __NR_pread64
#endif
-#ifndef __NR_pwrite64
-# define __NR_pwrite64 __NR_pwrite
+#ifndef __NR_pwrite
+# define __NR_pwrite __NR_pwrite64
#endif
#undef SYS_ify
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/getdents.c.jj 2001-03-16 10:46:12.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/getdents.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-#define __getdents64 __no___getdents64_decl
-#include <sysdeps/unix/sysv/linux/getdents.c>
-#undef __getdents64
-weak_alias(__getdents, __getdents64);
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/lxstat64.c.jj 2001-03-16 10:47:55.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/lxstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* lxstat64 is in lxstat.c */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/posix_fadvise64.c.jj 2004-03-03 19:56:03.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/posix_fadvise64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* posix_fadvise64 is in posix_fadvise.c */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/readdir64.c.jj 2001-03-16 10:49:12.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/readdir64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* readdir64 is in readdir.c */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list.jj 2004-03-05 12:13:04.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list 2004-03-23 17:47:02.858242578 +0100
@@ -1,16 +1,6 @@
# File name Caller Syscall name # args Strong name Weak names
-llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
-lseek llseek -
-pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
-pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
-fstatfs - fstatfs i:ip __fstatfs fstatfs fstatfs64 __fstatfs64
-statfs - statfs i:sp __statfs statfs statfs64
getpeername - getpeername i:ipp __getpeername getpeername
-ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64 __ftruncate64
-truncate - truncate 2 truncate truncate64
-getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
-setrlimit - setrlimit 2 __setrlimit setrlimit setrlimit64
vfork - vfork 0 __vfork vfork
# semaphore and shm system calls
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/fxstat.c.jj 2003-09-03 13:10:52.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/fxstat.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,42 +0,0 @@
-/* fxstat using old-style Unix fstat system call. 64 bit S/390 version.
- Copyright (C) 2001, 2002, 2003 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, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Ho hum, since xstat == xstat64 we must get rid of the prototype or gcc
- will complain since they don't strictly match. */
-#define __fxstat64 __fxstat64_disable
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-/* Get information about the file FD in BUF. */
-int
-__fxstat (int vers, int fd, struct stat *buf)
-{
- return INLINE_SYSCALL (fstat, 2, fd, buf);
-}
-
-hidden_def (__fxstat)
-weak_alias (__fxstat, _fxstat);
-#undef __fxstat64
-strong_alias (__fxstat, __fxstat64);
-hidden_ver (__fxstat, __fxstat64)
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/statfs64.c.jj 2001-03-16 10:51:30.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/statfs64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* statfs64 is the same as statfs. */
--- libc/sysdeps/unix/sysv/linux/s390/s390-64/fstatfs64.c.jj 2001-03-16 10:45:25.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-64/fstatfs64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* fstatfs64 is the same as fstatfs. */
--- libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/Implies.jj 2004-03-23 16:36:39.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/Implies 2004-03-23 16:43:08.000000000 +0100
@@ -0,0 +1 @@
+unix/sysv/linux/wordsize-64
--- libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/glob64.c.jj 2002-09-18 01:50:03.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/glob64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-/* glob64 is in glob.c */
-/* File glob64.c is redundent to glob.c in 64-bit. */
--- libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/truncate64.c.jj 2003-01-12 09:22:37.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/truncate64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,76 +0,0 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002 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, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-#include "kernel-features.h"
-
-#ifdef __NR_truncate64
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-/* The variable is shared between all wrappers around *truncate64 calls. */
-int have_no_truncate64;
-#endif
-
-
-/* Truncate the file FD refers to to LENGTH bytes. */
-int
-truncate64 (path, length)
- const char *path;
- off64_t length;
-{
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- if (! have_no_truncate64)
-#endif
- {
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- int saved_errno = errno;
-#endif
- int result = INLINE_SYSCALL (truncate64, 2, CHECK_STRING (path),
- length);
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- if (result != -1 || errno != ENOSYS)
-#endif
- return result;
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- __set_errno (saved_errno);
- have_no_truncate64 = 1;
-#endif
- }
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- if ((off_t) length != length)
- {
- __set_errno (EINVAL);
- return -1;
- }
- return truncate (path, (off_t) length);
-#endif
-}
-
-#else
-/* Use the generic implementation. */
-# include <sysdeps/generic/truncate64.c>
-#endif
--- libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/xstat64.c.jj 2002-10-02 10:33:48.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/xstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* xstat64 is in xstat.c */
--- libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/posix_fadvise.c.jj 2004-03-03 19:56:20.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/posix_fadvise.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-#include <sysdeps/unix/sysv/linux/x86_64/posix_fadvise.c>
-
--- libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fxstat64.c.jj 2002-10-02 10:33:48.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fxstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* fxstat64 is in fxstat.c */
--- libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/ftruncate64.c.jj 2003-01-12 09:19:17.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/ftruncate64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,75 +0,0 @@
-/* Copyright (C) 1997,1998,1999,2000,2001,2002 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, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <unistd.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-#include "kernel-features.h"
-
-#ifdef __NR_ftruncate64
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
-/* The variable is shared between all wrappers around *truncate64 calls. */
-extern int have_no_truncate64;
-#endif
-
-
-/* Truncate the file FD refers to to LENGTH bytes. */
-int
-__ftruncate64 (fd, length)
- int fd;
- off64_t length;
-{
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- if (! have_no_truncate64)
-#endif
- {
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- int saved_errno = errno;
-#endif
- int result = INLINE_SYSCALL (ftruncate64, 2, fd, length);
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- if (result != -1 || errno != ENOSYS)
-#endif
- return result;
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- __set_errno (saved_errno);
- have_no_truncate64 = 1;
-#endif
- }
-
-#ifndef __ASSUME_TRUNCATE64_SYSCALL
- if ((off_t) length != length)
- {
- __set_errno (EINVAL);
- return -1;
- }
- return __ftruncate (fd, (off_t) length);
-#endif
-}
-weak_alias (__ftruncate64, ftruncate64)
-
-#else
-/* Use the generic implementation. */
-# include <sysdeps/generic/ftruncate64.c>
-#endif
--- libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/lxstat64.c.jj 2002-10-02 10:33:48.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/lxstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* lxstat64 is in lxstat.c */
--- libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/posix_fadvise64.c.jj 2004-03-03 19:56:04.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/posix_fadvise64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* posix_fadvise64 is in posix_fadvise.c */
--- libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list.jj 2004-03-23 18:13:18.339894983 +0100
+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list 2004-03-23 18:13:31.098608450 +0100
@@ -0,0 +1,3 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+getrlimit - ugetrlimit i:ip __getrlimit getrlimit getrlimit64
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/Implies.jj 2004-03-23 16:47:27.124062444 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/Implies 2004-03-23 16:47:22.716852276 +0100
@@ -0,0 +1 @@
+unix/sysv/linux/wordsize-64
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/pread64.c.jj 1997-10-26 21:08:48.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/pread64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* Empty since the pread syscall is equivalent. */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/getrlimit64.c.jj 1997-12-22 21:43:56.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/getrlimit64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* getrlimit64 is the same as getrlimit. */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/glob64.c.jj 1998-08-10 17:54:13.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/glob64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* glob64 is in glob.c */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/readdir64_r.c.jj 1997-12-22 21:43:56.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/readdir64_r.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* readdir64_r is in readdir_r.c */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/truncate64.c.jj 1997-12-22 21:43:56.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/truncate64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* truncate64 is the same as truncate. */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/xstat64.c.jj 1999-12-24 06:48:58.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/xstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* xstat64 is in xstat.c */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/pwrite64.c.jj 1997-10-26 21:08:50.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/pwrite64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* Empty since the pread syscall is equivalent. */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/getdents64.c.jj 2000-08-12 07:12:39.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/getdents64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* getdents64 is in getdents.c */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/readdir_r.c.jj 2000-08-19 18:37:19.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/readdir_r.c 1970-01-01 01:00:00.000000000 +0100
@@ -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)
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/lxstat.c.jj 2004-03-23 18:24:15.966039495 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/lxstat.c 2004-03-23 18:24:35.884469843 +0100
@@ -0,0 +1 @@
+#include "../../lxstat.c"
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/readdir.c.jj 2000-08-19 18:37:19.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/readdir.c 1970-01-01 01:00:00.000000000 +0100
@@ -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)
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/posix_fadvise.c.jj 2004-03-03 19:56:20.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/posix_fadvise.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-#include <sysdeps/unix/sysv/linux/x86_64/posix_fadvise.c>
-
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/mmap64.c.jj 1997-12-28 16:28:54.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/mmap64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* mmap64 is the same as mmap. */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c.jj 2004-03-23 18:24:19.839345346 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c 2004-03-23 18:24:46.311601160 +0100
@@ -0,0 +1 @@
+#include "../../xstat.c"
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/fxstat64.c.jj 1999-12-24 06:48:44.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/fxstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* fxstat64 is in fxstat.c */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/setrlimit64.c.jj 1997-12-22 21:43:56.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/setrlimit64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* setrlimit64 is the same as setrlimit. */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/ftruncate64.c.jj 1997-12-22 21:43:56.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/ftruncate64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* ftruncate64 is the same as ftruncate. */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/sendfile64.c.jj 2002-06-07 14:33:53.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/sendfile64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* sendfile64 is alias of sendfile syscall. */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/getdents.c.jj 2000-08-12 07:12:32.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/getdents.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-#define __getdents64 __no___getdents64_decl
-#include <sysdeps/unix/sysv/linux/getdents.c>
-#undef __getdents64
-weak_alias(__getdents, __getdents64);
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/lxstat64.c.jj 1999-12-24 06:48:52.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/lxstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* lxstat64 is in lxstat.c */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/posix_fadvise64.c.jj 2004-03-03 19:56:04.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/posix_fadvise64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* posix_fadvise64 is in posix_fadvise.c */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/readdir64.c.jj 1997-12-22 21:43:56.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/readdir64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* readdir64 is in readdir.c */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list.jj 2004-03-05 12:13:04.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list 2004-03-23 18:26:10.371536485 +0100
@@ -1,19 +1,5 @@
# File name Caller Syscall name # args Strong name Weak names
-# Whee! 64-bit systems naturally implement llseek.
-llseek EXTRA lseek C:3 __llseek llseek __libc_lseek64 __lseek64 lseek64
-pread - pread C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
-pwrite - pwrite C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
-fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64
-statfs - statfs 2 __statfs statfs statfs64
-getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
-setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit
-ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64
-truncate - truncate 2 truncate truncate64
-mmap - mmap 6 __mmap mmap __mmap64 mmap64
-readahead - readahead 3 __readahead readahead
-sendfile - sendfile i:iipi sendfile sendfile64
-
# Override select.S in parent directory:
select - select C:5 __select select
accept - accept C:3 __libc_accept __accept accept
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/fxstat.c.jj 2004-03-23 18:24:12.479664301 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/fxstat.c 2004-03-23 18:24:01.187687975 +0100
@@ -0,0 +1 @@
+#include "../../fxstat.c"
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/statfs64.c.jj 1997-12-22 21:43:56.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/statfs64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* statfs64 is the same as statfs. */
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/fstatfs64.c.jj 1997-12-22 21:43:56.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/fstatfs64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* fstatfs64 is the same as fstatfs. */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/statvfs64.c.jj 2004-03-23 18:36:41.899358168 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/statvfs64.c 2004-03-23 18:36:49.507994598 +0100
@@ -0,0 +1 @@
+/* statvfs64 is the same as statvfs. */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/fstatvfs64.c.jj 2004-03-23 18:36:41.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/fstatvfs64.c 2004-03-23 18:37:36.368596545 +0100
@@ -0,0 +1 @@
+/* fstatvfs64 is the same as fstatvfs. */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/pread64.c.jj 2004-03-23 18:32:51.988561289 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/pread64.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* Empty since the pread syscall is equivalent. */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/fstatvfs.c.jj 2004-03-23 18:35:14.397039766 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/fstatvfs.c 2004-03-23 18:36:04.737018161 +0100
@@ -0,0 +1,5 @@
+#define __fstatvfs64(file, buf) __no_fstatvfs64(file, buf)
+#define fstatvfs64(file, buf) no_fstatvfs64(file, buf)
+#include "../fstatvfs.c"
+strong_alias (fstatvfs, __fstatvfs64)
+weak_alias (fstatvfs, fstatvfs64)
--- libc/sysdeps/unix/sysv/linux/wordsize-64/getrlimit64.c.jj 2004-03-23 18:32:51.980562722 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/getrlimit64.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* getrlimit64 is the same as getrlimit. */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/glob64.c.jj 2004-03-23 18:32:51.981562543 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/glob64.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* glob64 is in glob.c */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/readdir64_r.c.jj 2004-03-23 18:32:51.993560393 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/readdir64_r.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* readdir64_r is in readdir_r.c */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/truncate64.c.jj 2004-03-23 18:32:52.000559138 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/truncate64.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* truncate64 is the same as truncate. */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/xstat64.c.jj 2004-03-23 18:32:52.002558780 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/xstat64.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* xstat64 is in xstat.c */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/pwrite64.c.jj 2004-03-23 18:32:51.989561109 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/pwrite64.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* Empty since the pread syscall is equivalent. */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/getdents64.c.jj 2004-03-23 18:32:51.979562901 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/getdents64.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* getdents64 is in getdents.c */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c.jj 2004-03-23 18:32:51.994560213 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c 2000-08-19 18:37:19.000000000 +0200
@@ -0,0 +1,4 @@
+#define readdir64_r __no_readdir64_r_decl
+#include <sysdeps/unix/readdir_r.c>
+#undef readdir64_r
+weak_alias (__readdir_r, readdir64_r)
--- libc/sysdeps/unix/sysv/linux/wordsize-64/lxstat.c.jj 2004-03-23 18:32:51.982562364 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/lxstat.c 2004-03-23 17:26:23.689318388 +0100
@@ -0,0 +1,48 @@
+/* lxstat using old-style Unix lstat system call.
+ Copyright (C) 1991, 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Ho hum, since xstat == xstat64 we must get rid of the prototype or gcc
+ will complain since they don't strictly match. */
+#define __lxstat64 __lxstat64_disable
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+/* Get information about the file FD in BUF. */
+int
+__lxstat (int vers, const char *name, struct stat *buf)
+{
+ if (vers == _STAT_VER_KERNEL || vers == _STAT_VER_LINUX)
+ return INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), CHECK_1 (buf));
+
+ __set_errno (EINVAL);
+ return -1;
+}
+
+hidden_def (__lxstat)
+weak_alias (__lxstat, _lxstat);
+#undef __lxstat64
+strong_alias (__lxstat, __lxstat64);
+hidden_ver (__lxstat, __lxstat64)
--- libc/sysdeps/unix/sysv/linux/wordsize-64/readdir.c.jj 2004-03-23 18:32:51.990560930 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/readdir.c 2000-08-19 18:37:19.000000000 +0200
@@ -0,0 +1,7 @@
+#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)
--- libc/sysdeps/unix/sysv/linux/wordsize-64/posix_fadvise.c.jj 2004-03-23 18:32:51.986561647 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/posix_fadvise.c 2004-03-03 19:56:20.000000000 +0100
@@ -0,0 +1,41 @@
+/* Copyright (C) 2003, 2004 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define posix_fadvise64 __no_posix_fadvise64
+#include <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+#undef posix_fadvise64
+
+/* Advice the system about the expected behaviour of the application with
+ respect to the file associated with FD. */
+
+int
+posix_fadvise (int fd, off_t offset, off_t len, int advise)
+{
+#ifdef __NR_fadvise64
+ INTERNAL_SYSCALL_DECL (err);
+ int ret = INTERNAL_SYSCALL (fadvise64, err, 4, fd, offset, len, advise);
+ if (INTERNAL_SYSCALL_ERROR_P (ret, err))
+ return INTERNAL_SYSCALL_ERRNO (ret, err);
+ return 0;
+#else
+ return ENOSYS;
+#endif
+}
+strong_alias (posix_fadvise, posix_fadvise64)
--- libc/sysdeps/unix/sysv/linux/wordsize-64/mmap64.c.jj 2004-03-23 18:32:51.985561826 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/mmap64.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* mmap64 is the same as mmap. */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/xstat.c.jj 2004-03-23 18:32:52.001558959 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/xstat.c 2004-03-23 17:28:12.712779911 +0100
@@ -0,0 +1,47 @@
+/* xstat using old-style Unix stat system call.
+ Copyright (C) 1991, 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Ho hum, since xstat == xstat64 we must get rid of the prototype or gcc
+ will complain since they don't strictly match. */
+#define __xstat64 __xstat64_disable
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+/* Get information about the file NAME in BUF. */
+int
+__xstat (int vers, const char *name, struct stat *buf)
+{
+ if (vers == _STAT_VER_KERNEL || vers == _STAT_VER_LINUX)
+ return INLINE_SYSCALL (stat, 2, name, CHECK_1 (buf));
+
+ __set_errno (EINVAL);
+ return -1;
+}
+hidden_def (__xstat)
+weak_alias (__xstat, _xstat);
+#undef __xstat64
+strong_alias (__xstat, __xstat64);
+hidden_ver (__xstat, __xstat64)
--- libc/sysdeps/unix/sysv/linux/wordsize-64/fxstat64.c.jj 2004-03-23 18:32:51.977563260 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/fxstat64.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* fxstat64 is in fxstat.c */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/setrlimit64.c.jj 2004-03-23 18:32:51.996559855 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/setrlimit64.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* setrlimit64 is the same as setrlimit. */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/ftruncate64.c.jj 2004-03-23 18:32:51.974563797 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/ftruncate64.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* ftruncate64 is the same as ftruncate. */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/sendfile64.c.jj 2004-03-23 18:32:51.995560034 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/sendfile64.c 2002-06-07 14:33:54.000000000 +0200
@@ -0,0 +1 @@
+/* sendfile64 is alias of sendfile syscall. */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/getdents.c.jj 2004-03-23 18:32:51.978563080 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/getdents.c 2000-08-12 07:06:51.000000000 +0200
@@ -0,0 +1,4 @@
+#define __getdents64 __no___getdents64_decl
+#include <sysdeps/unix/sysv/linux/getdents.c>
+#undef __getdents64
+weak_alias(__getdents, __getdents64);
--- libc/sysdeps/unix/sysv/linux/wordsize-64/statvfs.c.jj 2004-03-23 18:35:01.223400660 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/statvfs.c 2004-03-23 18:36:18.083626269 +0100
@@ -0,0 +1,5 @@
+#define __statvfs64(file, buf) __no_statvfs64(file, buf)
+#define statvfs64(file, buf) no_statvfs64(file, buf)
+#include "../statvfs.c"
+strong_alias (statvfs, __statvfs64)
+weak_alias (statvfs, statvfs64)
--- libc/sysdeps/unix/sysv/linux/wordsize-64/lxstat64.c.jj 2004-03-23 18:32:51.983562184 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/lxstat64.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* lxstat64 is in lxstat.c */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/posix_fadvise64.c.jj 2004-03-23 18:32:51.987561468 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/posix_fadvise64.c 2004-03-03 19:56:03.000000000 +0100
@@ -0,0 +1 @@
+/* posix_fadvise64 is in posix_fadvise.c */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/readdir64.c.jj 2004-03-23 18:32:51.991560751 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/readdir64.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* readdir64 is in readdir.c */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/syscalls.list.jj 2004-03-23 18:32:51.998559497 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/syscalls.list 2004-03-23 17:35:56.864597635 +0100
@@ -0,0 +1,16 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+# Whee! 64-bit systems naturally implement llseek.
+llseek EXTRA lseek Ci:iii __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
+lseek llseek -
+pread - pread Ci:ibni __libc_pread __libc_pread64 __pread pread __pread64 pread64
+pwrite - pwrite Ci:ibni __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
+fstatfs - fstatfs i:ip __fstatfs fstatfs fstatfs64 __fstatfs64
+statfs - statfs i:sp __statfs statfs statfs64
+mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64
+ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64
+truncate - truncate i:si truncate truncate64
+getrlimit - getrlimit i:ip __getrlimit getrlimit getrlimit64
+setrlimit - setrlimit i:ip __setrlimit setrlimit setrlimit64
+readahead - readahead i:iii __readahead readahead
+sendfile - sendfile i:iipi sendfile sendfile64
--- libc/sysdeps/unix/sysv/linux/wordsize-64/fxstat.c.jj 2004-03-23 18:32:51.975563618 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/fxstat.c 2004-03-23 17:25:09.896543050 +0100
@@ -0,0 +1,48 @@
+/* fxstat using old-style Unix fstat system call.
+ Copyright (C) 1991, 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Ho hum, since xstat == xstat64 we must get rid of the prototype or gcc
+ will complain since they don't strictly match. */
+#define __fxstat64 __fxstat64_disable
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+/* Get information about the file FD in BUF. */
+int
+__fxstat (int vers, int fd, struct stat *buf)
+{
+ if (vers == _STAT_VER_KERNEL || vers == _STAT_VER_LINUX)
+ return INLINE_SYSCALL (fstat, 2, fd, CHECK_1 ((struct kernel_stat *) buf));
+
+ __set_errno (EINVAL);
+ return -1;
+}
+
+hidden_def (__fxstat)
+weak_alias (__fxstat, _fxstat);
+#undef __fxstat64
+strong_alias (__fxstat, __fxstat64);
+hidden_ver (__fxstat, __fxstat64)
--- libc/sysdeps/unix/sysv/linux/wordsize-64/statfs64.c.jj 2004-03-23 18:32:51.997559676 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/statfs64.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* statfs64 is the same as statfs. */
--- libc/sysdeps/unix/sysv/linux/wordsize-64/fstatfs64.c.jj 2004-03-23 18:32:51.973563976 +0100
+++ libc/sysdeps/unix/sysv/linux/wordsize-64/fstatfs64.c 2001-09-19 12:31:31.000000000 +0200
@@ -0,0 +1 @@
+/* fstatfs64 is the same as fstatfs. */
--- libc/sysdeps/unix/sysv/linux/ia64/Implies.jj 2004-03-23 16:57:51.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/ia64/Implies 2004-03-23 16:57:47.000000000 +0100
@@ -0,0 +1 @@
+unix/sysv/linux/wordsize-64
--- libc/sysdeps/unix/sysv/linux/ia64/pread64.c.jj 2000-06-29 21:20:29.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/pread64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* Empty since the pread syscall is equivalent. */
--- libc/sysdeps/unix/sysv/linux/ia64/getrlimit64.c.jj 2000-06-29 21:19:47.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/getrlimit64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* getrlimit64 is the same as getrlimit. */
--- libc/sysdeps/unix/sysv/linux/ia64/glob64.c.jj 2000-06-29 21:20:07.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/glob64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* glob64 is in glob.c */
--- libc/sysdeps/unix/sysv/linux/ia64/readdir64_r.c.jj 2000-06-29 21:21:09.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/readdir64_r.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* readdir64_r is in readdir_r.c */
--- libc/sysdeps/unix/sysv/linux/ia64/truncate64.c.jj 2000-06-29 21:22:02.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/truncate64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* truncate64 is the same as truncate. */
--- libc/sysdeps/unix/sysv/linux/ia64/xstat64.c.jj 2000-06-13 00:12:44.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/xstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* xstat64 is in xstat.c */
--- libc/sysdeps/unix/sysv/linux/ia64/pwrite64.c.jj 2000-06-29 21:20:40.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/pwrite64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* Empty since the pread syscall is equivalent. */
--- libc/sysdeps/unix/sysv/linux/ia64/getdents64.c.jj 2000-08-12 07:07:02.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/getdents64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* getdents64 is in getdents.c */
--- libc/sysdeps/unix/sysv/linux/ia64/readdir_r.c.jj 2000-08-19 18:37:19.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/readdir_r.c 1970-01-01 01:00:00.000000000 +0100
@@ -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)
--- libc/sysdeps/unix/sysv/linux/ia64/lxstat.c.jj 2003-09-03 13:10:48.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/lxstat.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,44 +0,0 @@
-/* lxstat using old-style Unix fstat system call.
- Copyright (C) 1991, 1995, 1996, 1997, 1998, 2000, 2002, 2003
- 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, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Ho hum, since xstat == xstat64 we must get rid of the prototype or gcc
- will complain since they don't strictly match. */
-#define __lxstat64 __lxstat64_disable
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-/* Get information about the file FD in BUF. */
-int
-__lxstat (int vers, const char *name, struct stat *buf)
-{
- return INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), CHECK_1 (buf));
-}
-
-hidden_def (__lxstat)
-weak_alias (__lxstat, _lxstat);
-#undef __lxstat64
-strong_alias (__lxstat, __lxstat64);
-hidden_ver (__lxstat, __lxstat64)
--- libc/sysdeps/unix/sysv/linux/ia64/readdir.c.jj 2000-08-19 18:37:19.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/readdir.c 1970-01-01 01:00:00.000000000 +0100
@@ -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)
--- libc/sysdeps/unix/sysv/linux/ia64/posix_fadvise.c.jj 2004-03-03 19:56:20.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/ia64/posix_fadvise.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-#include <sysdeps/unix/sysv/linux/x86_64/posix_fadvise.c>
-
--- libc/sysdeps/unix/sysv/linux/ia64/mmap64.c.jj 2000-06-20 03:35:36.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/mmap64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* mmap64 is the same as mmap. */
--- libc/sysdeps/unix/sysv/linux/ia64/xstat.c.jj 2003-09-03 13:10:49.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/xstat.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,43 +0,0 @@
-/* xstat using old-style Unix stat system call.
- Copyright (C) 1991, 1995, 1996, 1997, 1998, 2000, 2002, 2003
- 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, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Ho hum, since xstat == xstat64 we must get rid of the prototype or gcc
- will complain since they don't strictly match. */
-#define __xstat64 __xstat64_disable
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-/* Get information about the file NAME in BUF. */
-int
-__xstat (int vers, const char *name, struct stat *buf)
-{
- return INLINE_SYSCALL (stat, 2, name, CHECK_1 (buf));
-}
-hidden_def (__xstat)
-weak_alias (__xstat, _xstat);
-#undef __xstat64
-strong_alias (__xstat, __xstat64);
-hidden_ver (__xstat, __xstat64)
--- libc/sysdeps/unix/sysv/linux/ia64/fxstat64.c.jj 2000-06-13 00:12:27.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/fxstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* fxstat64 is in fxstat.c */
--- libc/sysdeps/unix/sysv/linux/ia64/setrlimit64.c.jj 2000-06-29 21:21:28.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/setrlimit64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* setrlimit64 is the same as setrlimit. */
--- libc/sysdeps/unix/sysv/linux/ia64/ftruncate64.c.jj 2000-06-29 21:19:35.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/ftruncate64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* ftruncate64 is the same as ftruncate. */
--- libc/sysdeps/unix/sysv/linux/ia64/sendfile64.c.jj 2002-06-07 14:33:52.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/sendfile64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* sendfile64 is alias of sendfile syscall. */
--- libc/sysdeps/unix/sysv/linux/ia64/getdents.c.jj 2000-08-12 07:06:51.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/getdents.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-#define __getdents64 __no___getdents64_decl
-#include <sysdeps/unix/sysv/linux/getdents.c>
-#undef __getdents64
-weak_alias(__getdents, __getdents64);
--- libc/sysdeps/unix/sysv/linux/ia64/lxstat64.c.jj 2000-06-13 00:12:36.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/lxstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* lxstat64 is in lxstat.c */
--- libc/sysdeps/unix/sysv/linux/ia64/posix_fadvise64.c.jj 2004-03-03 19:56:04.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/ia64/posix_fadvise64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* posix_fadvise64 is in posix_fadvise.c */
--- libc/sysdeps/unix/sysv/linux/ia64/readdir64.c.jj 2000-06-29 21:20:59.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/readdir64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* readdir64 is in readdir.c */
--- libc/sysdeps/unix/sysv/linux/ia64/syscalls.list.jj 2004-03-05 12:13:04.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/ia64/syscalls.list 2004-03-23 18:15:50.134691305 +0100
@@ -2,22 +2,8 @@
umount2 - umount 2 __umount2 umount2
-# Whee! 64-bit systems naturally implement llseek.
-llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
-lseek llseek -
-pread - pread C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
-pwrite - pwrite C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
-fstatfs - fstatfs i:ip __fstatfs fstatfs fstatfs64 __fstatfs64
-statfs - statfs i:sp __statfs statfs statfs64
-mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64
getpeername - getpeername i:ipp __getpeername getpeername
getpriority - getpriority i:ii __getpriority getpriority
-ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64 __ftruncate64
-truncate - truncate 2 truncate truncate64
-getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
-setrlimit - setrlimit 2 __setrlimit setrlimit setrlimit64
-readahead - readahead 3 __readahead readahead
-sendfile - sendfile i:iipi sendfile sendfile64
# semaphore and shm system calls
msgctl - msgctl i:iip __msgctl msgctl
--- libc/sysdeps/unix/sysv/linux/ia64/fxstat.c.jj 2003-09-03 13:10:48.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/fxstat.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,44 +0,0 @@
-/* fxstat using old-style Unix fstat system call.
- Copyright (C) 1991, 1995, 1996, 1997, 1998, 2000, 2002, 2003
- 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, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* Ho hum, since xstat == xstat64 we must get rid of the prototype or gcc
- will complain since they don't strictly match. */
-#define __fxstat64 __fxstat64_disable
-
-#include <errno.h>
-#include <stddef.h>
-#include <sys/stat.h>
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-#include <bp-checks.h>
-
-/* Get information about the file FD in BUF. */
-int
-__fxstat (int vers, int fd, struct stat *buf)
-{
- return INLINE_SYSCALL (fstat, 2, fd, CHECK_1 (buf));
-}
-
-hidden_def (__fxstat)
-weak_alias (__fxstat, _fxstat);
-#undef __fxstat64
-strong_alias (__fxstat, __fxstat64);
-hidden_ver (__fxstat, __fxstat64)
--- libc/sysdeps/unix/sysv/linux/ia64/statfs64.c.jj 2000-06-29 21:21:54.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/statfs64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* statfs64 is the same as statfs. */
--- libc/sysdeps/unix/sysv/linux/ia64/fstatfs64.c.jj 2000-06-29 21:19:21.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/ia64/fstatfs64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* fstatfs64 is the same as fstatfs. */
--- libc/sysdeps/unix/sysv/linux/x86_64/Implies.jj 2004-03-23 16:36:39.934047637 +0100
+++ libc/sysdeps/unix/sysv/linux/x86_64/Implies 2004-03-23 16:43:08.555401441 +0100
@@ -0,0 +1 @@
+unix/sysv/linux/wordsize-64
--- libc/sysdeps/unix/sysv/linux/x86_64/pread64.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/pread64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* Empty since the pread syscall is equivalent. */
--- libc/sysdeps/unix/sysv/linux/x86_64/getrlimit64.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/getrlimit64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* getrlimit64 is the same as getrlimit. */
--- libc/sysdeps/unix/sysv/linux/x86_64/glob64.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/glob64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* glob64 is in glob.c */
--- libc/sysdeps/unix/sysv/linux/x86_64/readdir64_r.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/readdir64_r.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* readdir64_r is in readdir_r.c */
--- libc/sysdeps/unix/sysv/linux/x86_64/truncate64.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/truncate64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* truncate64 is the same as truncate. */
--- libc/sysdeps/unix/sysv/linux/x86_64/xstat64.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/xstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* xstat64 is in xstat.c */
--- libc/sysdeps/unix/sysv/linux/x86_64/pwrite64.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/pwrite64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* Empty since the pread syscall is equivalent. */
--- libc/sysdeps/unix/sysv/linux/x86_64/getdents64.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/getdents64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* getdents64 is in getdents.c */
--- libc/sysdeps/unix/sysv/linux/x86_64/readdir_r.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/readdir_r.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/ia64/readdir_r.c>
--- libc/sysdeps/unix/sysv/linux/x86_64/lxstat.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/lxstat.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/ia64/lxstat.c>
--- libc/sysdeps/unix/sysv/linux/x86_64/readdir.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/readdir.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-#include <sysdeps/unix/sysv/linux/ia64/readdir.c>
-
--- libc/sysdeps/unix/sysv/linux/x86_64/posix_fadvise.c.jj 2004-03-03 19:56:20.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/x86_64/posix_fadvise.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,41 +0,0 @@
-/* Copyright (C) 2003, 2004 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, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#define posix_fadvise64 __no_posix_fadvise64
-#include <errno.h>
-#include <fcntl.h>
-#include <sysdep.h>
-#undef posix_fadvise64
-
-/* Advice the system about the expected behaviour of the application with
- respect to the file associated with FD. */
-
-int
-posix_fadvise (int fd, off_t offset, off_t len, int advise)
-{
-#ifdef __NR_fadvise64
- INTERNAL_SYSCALL_DECL (err);
- int ret = INTERNAL_SYSCALL (fadvise64, err, 4, fd, offset, len, advise);
- if (INTERNAL_SYSCALL_ERROR_P (ret, err))
- return INTERNAL_SYSCALL_ERRNO (ret, err);
- return 0;
-#else
- return ENOSYS;
-#endif
-}
-strong_alias (posix_fadvise, posix_fadvise64)
--- libc/sysdeps/unix/sysv/linux/x86_64/mmap64.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/mmap64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* mmap64 is the same as mmap. */
--- libc/sysdeps/unix/sysv/linux/x86_64/xstat.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/xstat.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/ia64/xstat.c>
--- libc/sysdeps/unix/sysv/linux/x86_64/fxstat64.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/fxstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* fxstat64 is in fxstat.c */
--- libc/sysdeps/unix/sysv/linux/x86_64/setrlimit64.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/setrlimit64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* setrlimit64 is the same as setrlimit. */
--- libc/sysdeps/unix/sysv/linux/x86_64/ftruncate64.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/ftruncate64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* ftruncate64 is the same as ftruncate. */
--- libc/sysdeps/unix/sysv/linux/x86_64/sendfile64.c.jj 2002-06-07 14:33:54.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/sendfile64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* sendfile64 is alias of sendfile syscall. */
--- libc/sysdeps/unix/sysv/linux/x86_64/getdents.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/getdents.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-#include <sysdeps/unix/sysv/linux/ia64/getdents.c>
-
--- libc/sysdeps/unix/sysv/linux/x86_64/lxstat64.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/lxstat64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* lxstat64 is in lxstat.c */
--- libc/sysdeps/unix/sysv/linux/x86_64/posix_fadvise64.c.jj 2004-03-03 19:56:03.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/x86_64/posix_fadvise64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* posix_fadvise64 is in posix_fadvise.c */
--- libc/sysdeps/unix/sysv/linux/x86_64/readdir64.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/readdir64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* readdir64 is in readdir.c */
--- libc/sysdeps/unix/sysv/linux/x86_64/syscalls.list.jj 2004-03-05 12:13:04.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/x86_64/syscalls.list 2004-03-23 17:40:00.863869670 +0100
@@ -1,19 +1,7 @@
# File name Caller Syscall name # args Strong name Weak names
arch_prctl EXTRA arch_prctl i:ii __arch_prctl arch_prctl
-mmap - mmap b:aniiii __mmap mmap __mmap64 mmap64
modify_ldt EXTRA modify_ldt i:ipi __modify_ldt modify_ldt
-llseek EXTRA lseek Ci:iii __libc_lseek64 __llseek llseek __lseek64 lseek64
-pread - pread Ci:ibni __libc_pread __libc_pread64 __pread pread __pread64 pread64
-pwrite - pwrite Ci:ibni __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
-fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64
-statfs - statfs i:sp __statfs statfs statfs64
-getrlimit - getrlimit i:ip __getrlimit getrlimit getrlimit64
-setrlimit - setrlimit i:ip __setrlimit setrlimit64 setrlimit
-ftruncate - ftruncate i:ii __ftruncate ftruncate ftruncate64 __ftruncate64
-truncate - truncate i:si truncate truncate64
-readahead - readahead i:iii __readahead readahead
-sendfile - sendfile i:iipi sendfile sendfile64
# semaphore and shm system calls
msgctl - msgctl i:iip __msgctl msgctl
--- libc/sysdeps/unix/sysv/linux/x86_64/fxstat.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/fxstat.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/ia64/fxstat.c>
--- libc/sysdeps/unix/sysv/linux/x86_64/statfs64.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/statfs64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* statfs64 is the same as statfs. */
--- libc/sysdeps/unix/sysv/linux/x86_64/fstatfs64.c.jj 2001-09-19 12:31:31.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/x86_64/fstatfs64.c 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-/* fstatfs64 is the same as fstatfs. */
Jakub
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC PATCH] Kill some duplication between 64-bit linux arches
2004-03-23 19:32 [RFC PATCH] Kill some duplication between 64-bit linux arches Jakub Jelinek
@ 2004-03-23 19:38 ` Ulrich Drepper
2004-03-23 19:43 ` Roland McGrath
2004-03-24 0:04 ` Jakub Jelinek
0 siblings, 2 replies; 8+ messages in thread
From: Ulrich Drepper @ 2004-03-23 19:38 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Glibc hackers
This patch is not valid under current assumptions. INLINE_SYSCALL is a
Linux-ism. It cannot be used in sysdeps/wordsize-64 which is a generic
directory. The problem is that what is a syscall on Linux need not
necessarily by a syscall equivalent on other OSes. Hurd, for instance,
has read() as a normal function in libc IIRC.
Maybe creating sysdeps/unix/sysv/linux/wordsize-64, moving the new files
there, and requiring that directory for all 64-bit archs on Linux will work.
--
⧠Ulrich Drepper ⧠Red Hat, Inc. ⧠444 Castro St ⧠Mountain View, CA â
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC PATCH] Kill some duplication between 64-bit linux arches
2004-03-23 19:38 ` Ulrich Drepper
@ 2004-03-23 19:43 ` Roland McGrath
2004-03-23 20:37 ` Ulrich Drepper
2004-03-24 0:04 ` Jakub Jelinek
1 sibling, 1 reply; 8+ messages in thread
From: Roland McGrath @ 2004-03-23 19:43 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: Jakub Jelinek, Glibc hackers
> This patch is not valid under current assumptions. INLINE_SYSCALL is a
> Linux-ism. It cannot be used in sysdeps/wordsize-64 which is a generic
> directory. The problem is that what is a syscall on Linux need not
> necessarily by a syscall equivalent on other OSes. Hurd, for instance,
> has read() as a normal function in libc IIRC.
Correct.
> Maybe creating sysdeps/unix/sysv/linux/wordsize-64, moving the new files
> there, and requiring that directory for all 64-bit archs on Linux will work.
If these are useful e.g. for the GNU/*BSD ports, then there could be a
purpose-specific directory such as sysdeps/unix/inline-syscall/wordsize-64.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC PATCH] Kill some duplication between 64-bit linux arches
2004-03-23 19:43 ` Roland McGrath
@ 2004-03-23 20:37 ` Ulrich Drepper
2004-03-23 23:58 ` Roland McGrath
0 siblings, 1 reply; 8+ messages in thread
From: Ulrich Drepper @ 2004-03-23 20:37 UTC (permalink / raw)
To: Roland McGrath; +Cc: Jakub Jelinek, Glibc hackers
Roland McGrath wrote:
> If these are useful e.g. for the GNU/*BSD ports, then there could be a
> purpose-specific directory such as sysdeps/unix/inline-syscall/wordsize-64.
Let's move it all the sysdeps/unix/sysv/linux/wordsize-64. *Iff* tthere
should ever be another need for this code it still can be moved.
--
⧠Ulrich Drepper ⧠Red Hat, Inc. ⧠444 Castro St ⧠Mountain View, CA â
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC PATCH] Kill some duplication between 64-bit linux arches
2004-03-23 20:37 ` Ulrich Drepper
@ 2004-03-23 23:58 ` Roland McGrath
0 siblings, 0 replies; 8+ messages in thread
From: Roland McGrath @ 2004-03-23 23:58 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: Jakub Jelinek, Glibc hackers
> Let's move it all the sysdeps/unix/sysv/linux/wordsize-64. *Iff* tthere
> should ever be another need for this code it still can be moved.
Agreed. Just a note to future hackers, that moving this code rather than
duplicating it will be the right thing.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC PATCH] Kill some duplication between 64-bit linux arches
2004-03-23 19:38 ` Ulrich Drepper
2004-03-23 19:43 ` Roland McGrath
@ 2004-03-24 0:04 ` Jakub Jelinek
2004-03-24 12:00 ` Jakub Jelinek
1 sibling, 1 reply; 8+ messages in thread
From: Jakub Jelinek @ 2004-03-24 0:04 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: Glibc hackers
On Tue, Mar 23, 2004 at 10:52:35AM -0800, Ulrich Drepper wrote:
> This patch is not valid under current assumptions. INLINE_SYSCALL is a
> Linux-ism. It cannot be used in sysdeps/wordsize-64 which is a generic
> directory. The problem is that what is a syscall on Linux need not
> necessarily by a syscall equivalent on other OSes. Hurd, for instance,
> has read() as a normal function in libc IIRC.
>
> Maybe creating sysdeps/unix/sysv/linux/wordsize-64, moving the new files
> there, and requiring that directory for all 64-bit archs on Linux will work.
But that is exactly what this patch is doing:
...
* sysdeps/unix/sysv/linux/wordsize-64/statvfs64.c: New file.
... other 29 files in that new directory.
Jakub
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC PATCH] Kill some duplication between 64-bit linux arches
2004-03-24 0:04 ` Jakub Jelinek
@ 2004-03-24 12:00 ` Jakub Jelinek
2004-03-24 15:25 ` Ulrich Drepper
0 siblings, 1 reply; 8+ messages in thread
From: Jakub Jelinek @ 2004-03-24 12:00 UTC (permalink / raw)
To: Ulrich Drepper; +Cc: Glibc hackers
On Tue, Mar 23, 2004 at 07:27:13PM +0100, Jakub Jelinek wrote:
> > Maybe creating sysdeps/unix/sysv/linux/wordsize-64, moving the new files
> > there, and requiring that directory for all 64-bit archs on Linux will work.
>
> But that is exactly what this patch is doing:
>
> ...
> * sysdeps/unix/sysv/linux/wordsize-64/statvfs64.c: New file.
> ... other 29 files in that new directory.
FYI the patch passed make check on ia64, ppc64, x86-64 and so far looks good
on s390x as well (passed linuxthreads make check, NPTL make check still
running).
Jakub
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC PATCH] Kill some duplication between 64-bit linux arches
2004-03-24 12:00 ` Jakub Jelinek
@ 2004-03-24 15:25 ` Ulrich Drepper
0 siblings, 0 replies; 8+ messages in thread
From: Ulrich Drepper @ 2004-03-24 15:25 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Glibc hackers
Jakub Jelinek wrote:
> FYI the patch passed make check on ia64, ppc64, x86-64 and so far looks good
> on s390x as well (passed linuxthreads make check, NPTL make check still
> running).
Passes my tests, too. I've applied it.
--
⧠Ulrich Drepper ⧠Red Hat, Inc. ⧠444 Castro St ⧠Mountain View, CA â
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-03-24 0:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-23 19:32 [RFC PATCH] Kill some duplication between 64-bit linux arches Jakub Jelinek
2004-03-23 19:38 ` Ulrich Drepper
2004-03-23 19:43 ` Roland McGrath
2004-03-23 20:37 ` Ulrich Drepper
2004-03-23 23:58 ` Roland McGrath
2004-03-24 0:04 ` Jakub Jelinek
2004-03-24 12:00 ` Jakub Jelinek
2004-03-24 15:25 ` Ulrich Drepper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).