From df31d32b411022d130b078de177cfa40b7bf6cde Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sun, 22 Jan 2006 19:35:08 +0000 Subject: Enable _GNU_SOURCE build wide, trying to get consistent interfaces, else IMA is a useless attempt --- libc/sysdeps/linux/sh/pread_write.c | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) (limited to 'libc/sysdeps/linux/sh') diff --git a/libc/sysdeps/linux/sh/pread_write.c b/libc/sysdeps/linux/sh/pread_write.c index 4b6d57b08..437bbdaa6 100644 --- a/libc/sysdeps/linux/sh/pread_write.c +++ b/libc/sysdeps/linux/sh/pread_write.c @@ -12,20 +12,7 @@ * from GNU libc 2.2.5, but reworked considerably... */ -#define _GNU_SOURCE -#define _LARGEFILE64_SOURCE -#include -#undef __OPTIMIZE__ -/* We absolutely do _NOT_ want interfaces silently - * * * renamed under us or very bad things will happen... */ -#ifdef __USE_FILE_OFFSET64 -# undef __USE_FILE_OFFSET64 -#endif - - -#include -#include -#include +#include "../common/syscalls.h" #include #include @@ -37,9 +24,7 @@ #endif #ifdef __NR_pread - - -#define __NR___syscall_pread __NR_pread +# define __NR___syscall_pread __NR_pread static inline _syscall6(ssize_t, __syscall_pread, int, fd, void *, buf, size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo); @@ -49,7 +34,7 @@ ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset) } strong_alias(__libc_pread,pread) -#if defined __UCLIBC_HAS_LFS__ +# ifdef __UCLIBC_HAS_LFS__ ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset) { uint32_t low = offset & 0xffffffff; @@ -57,8 +42,7 @@ ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset) return(__syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR (high, low))); } strong_alias(__libc_pread64,pread64) -#endif /* __UCLIBC_HAS_LFS__ */ - +# endif /* __UCLIBC_HAS_LFS__ */ #endif /* __NR_pread */ /**********************************************************************/ @@ -71,8 +55,7 @@ strong_alias(__libc_pread64,pread64) #endif #ifdef __NR_pwrite - -#define __NR___syscall_pwrite __NR_pwrite +# define __NR___syscall_pwrite __NR_pwrite static inline _syscall6(ssize_t, __syscall_pwrite, int, fd, const void *, buf, size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo); @@ -82,7 +65,7 @@ ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset) } strong_alias(__libc_pwrite,pwrite) -#if defined __UCLIBC_HAS_LFS__ +# ifdef __UCLIBC_HAS_LFS__ ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset) { uint32_t low = offset & 0xffffffff; @@ -90,6 +73,5 @@ ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset) return(__syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR (high, low))); } strong_alias(__libc_pwrite64,pwrite64) -#endif /* __UCLIBC_HAS_LFS__ */ - +# endif /* __UCLIBC_HAS_LFS__ */ #endif /* __NR_pwrite */ -- cgit v1.2.3