[PATCH] Prepare PPC pread/pwrite for linux-2.5 headers
Franz Sirl
Franz.Sirl-kernel@lauterbach.com
Mon Nov 4 04:29:00 GMT 2002
Hi,
linux-2.5 headers renamed the pread/pwrite syscalls to pread64/pwrite64. This
patch mirrors the changes done to the generic linux files to the PPC specific
ones.
Franz.
* sysdeps/unix/sysv/linux/powerpc/pread.c: Handle both __NR_pread64
and __NR_pread.
* sysdeps/unix/sysv/linux/powerpc/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/pwrite.c: Handle both __NR_pwrite64
and __NR_pwrite.
* sysdeps/unix/sysv/linux/powerpc/pwrite64.c: Likewise.
-------------- next part --------------
Index: sysdeps/unix/sysv/linux/powerpc/pread.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/powerpc/pread.c,v
retrieving revision 1.4
diff -u -p -r1.4 pread.c
--- sysdeps/unix/sysv/linux/powerpc/pread.c 6 Jul 2001 04:56:19 -0000 1.4
+++ sysdeps/unix/sysv/linux/powerpc/pread.c 27 Oct 2002 13:53:29 -0000
@@ -23,6 +23,13 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_pread
+# error "__NR_pread and __NR_pread64 both defined???"
+# endif
+# define __NR_pread __NR_pread64
+#endif
+
#ifdef __NR_pread
extern ssize_t __syscall_pread (int fd, void *buf, size_t count,
Index: sysdeps/unix/sysv/linux/powerpc/pread64.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/powerpc/pread64.c,v
retrieving revision 1.5
diff -u -p -r1.5 pread64.c
--- sysdeps/unix/sysv/linux/powerpc/pread64.c 6 Jul 2001 04:56:19 -0000 1.5
+++ sysdeps/unix/sysv/linux/powerpc/pread64.c 27 Oct 2002 13:53:29 -0000
@@ -23,6 +23,13 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_pread
+# error "__NR_pread and __NR_pread64 both defined???"
+# endif
+# define __NR_pread __NR_pread64
+#endif
+
#ifdef __NR_pread
extern ssize_t __syscall_pread (int fd, void *buf, size_t count,
Index: sysdeps/unix/sysv/linux/powerpc/pwrite.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/powerpc/pwrite.c,v
retrieving revision 1.5
diff -u -p -r1.5 pwrite.c
--- sysdeps/unix/sysv/linux/powerpc/pwrite.c 6 Jul 2001 04:56:19 -0000 1.5
+++ sysdeps/unix/sysv/linux/powerpc/pwrite.c 27 Oct 2002 13:53:29 -0000
@@ -23,6 +23,13 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_pwrite
+# error "__NR_pwrite and __NR_pwrite64 both defined???"
+# endif
+# define __NR_pwrite __NR_pread64
+#endif
+
#ifdef __NR_pwrite
extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count,
Index: sysdeps/unix/sysv/linux/powerpc/pwrite64.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/powerpc/pwrite64.c,v
retrieving revision 1.7
diff -u -p -r1.7 pwrite64.c
--- sysdeps/unix/sysv/linux/powerpc/pwrite64.c 3 Aug 2002 06:57:52 -0000 1.7
+++ sysdeps/unix/sysv/linux/powerpc/pwrite64.c 27 Oct 2002 13:53:30 -0000
@@ -23,6 +23,13 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
+# ifdef __NR_pwrite
+# error "__NR_pwrite and __NR_pwrite64 both defined???"
+# endif
+# define __NR_pwrite __NR_pread64
+#endif
+
#ifdef __NR_pwrite
extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count,
More information about the Libc-alpha
mailing list