From 4b172769b29087fbf9989494e7d09b8c4347208e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 14 Sep 2002 08:32:37 +0000 Subject: [PATCH] * sysdeps/unix/sysv/linux/pread.c: __NR_pread64 may be defined instead of __NR_pread. * sysdeps/unix/sysv/linux/pread64.c: Likewise. * sysdeps/unix/sysv/linux/pwrite.c: __NR_pwrite64 may be defined instead of __NR_pwrite. * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. --- ChangeLog | 9 +++++++++ sysdeps/unix/sysv/linux/pread.c | 7 +++++++ sysdeps/unix/sysv/linux/pread64.c | 7 +++++++ sysdeps/unix/sysv/linux/pwrite.c | 7 +++++++ sysdeps/unix/sysv/linux/pwrite64.c | 7 +++++++ 5 files changed, 37 insertions(+) diff --git a/ChangeLog b/ChangeLog index be6f1fc..d126ea3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2002-09-14 Roland McGrath + + * sysdeps/unix/sysv/linux/pread.c: __NR_pread64 may be defined + instead of __NR_pread. + * sysdeps/unix/sysv/linux/pread64.c: Likewise. + * sysdeps/unix/sysv/linux/pwrite.c: __NR_pwrite64 may be defined + instead of __NR_pwrite. + * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. + 2002-09-13 Roland McGrath * manual/libc.texinfo: @ifinfo -> @ifnottex around copyright notice. diff --git a/sysdeps/unix/sysv/linux/pread.c b/sysdeps/unix/sysv/linux/pread.c index 2d5af61..31abf7e 100644 --- a/sysdeps/unix/sysv/linux/pread.c +++ b/sysdeps/unix/sysv/linux/pread.c @@ -28,6 +28,13 @@ #include "kernel-features.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 + #if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0 /* The order of hi, lo depends on endianness. */ diff --git a/sysdeps/unix/sysv/linux/pread64.c b/sysdeps/unix/sysv/linux/pread64.c index 8dd00595..d27f9af 100644 --- a/sysdeps/unix/sysv/linux/pread64.c +++ b/sysdeps/unix/sysv/linux/pread64.c @@ -27,6 +27,13 @@ #include "kernel-features.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 + #if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0 extern ssize_t __syscall_pread (int fd, void *__unbounded buf, size_t count, diff --git a/sysdeps/unix/sysv/linux/pwrite.c b/sysdeps/unix/sysv/linux/pwrite.c index 6a68adc..45fca41 100644 --- a/sysdeps/unix/sysv/linux/pwrite.c +++ b/sysdeps/unix/sysv/linux/pwrite.c @@ -28,6 +28,13 @@ #include "kernel-features.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 + #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 /* The order of hi, lo depends on endianness. */ diff --git a/sysdeps/unix/sysv/linux/pwrite64.c b/sysdeps/unix/sysv/linux/pwrite64.c index 322dd5e..ef72364 100644 --- a/sysdeps/unix/sysv/linux/pwrite64.c +++ b/sysdeps/unix/sysv/linux/pwrite64.c @@ -27,6 +27,13 @@ #include "kernel-features.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 + #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0 extern ssize_t __syscall_pwrite (int fd, const void *__unbounded buf, size_t count, -- 2.7.4