[git commit future] i386/posix_fadvise64: remove fallback code, uClibc does not do that
Peter S. Mazinger
ps.m at gmx.net
Wed Mar 30 11:53:36 UTC 2011
commit: http://git.uclibc.org/uClibc/commit/?id=50307de778886ce6af5ab182eeea7b32d16b6fc7
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/future
Makefile.arch: include it only if ADVANCED_REALTIME is defined.
Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
---
libc/sysdeps/linux/i386/Makefile.arch | 5 ++-
libc/sysdeps/linux/i386/posix_fadvise64.S | 54 +----------------------------
2 files changed, 5 insertions(+), 54 deletions(-)
diff --git a/libc/sysdeps/linux/i386/Makefile.arch b/libc/sysdeps/linux/i386/Makefile.arch
index 668cca7..75b2bf5 100644
--- a/libc/sysdeps/linux/i386/Makefile.arch
+++ b/libc/sysdeps/linux/i386/Makefile.arch
@@ -13,8 +13,11 @@ endif
SSRC := \
__longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
- sync_file_range.S syscall.S mmap.S mmap64.S posix_fadvise64.S
+ sync_file_range.S syscall.S mmap.S mmap64.S
+ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
+SSRC += posix_fadvise64.S
+endif
ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
SSRC += vfork.S clone.S
diff --git a/libc/sysdeps/linux/i386/posix_fadvise64.S b/libc/sysdeps/linux/i386/posix_fadvise64.S
index b4aeff1..5f966a5 100644
--- a/libc/sysdeps/linux/i386/posix_fadvise64.S
+++ b/libc/sysdeps/linux/i386/posix_fadvise64.S
@@ -17,19 +17,9 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define _ERRNO_H 1
-#include <features.h>
-#include <bits/errno.h>
#include <sys/syscall.h>
-#if defined __NR_fadvise64_64
-
-/* Was named __libc_posix_fadvise64 for some inexplicable reason.
-** google says only uclibc has *__libc*_posix_fadviseXXX,
-** so it cannot be compat with anything.
-**
-** Remove this comment and one at the end after 0.9.31
-*/
+#if defined __NR_fadvise64_64 && defined __UCLIBC_HAS_LFS__
.text
.global posix_fadvise64
@@ -61,47 +51,5 @@ posix_fadvise64:
/* Returns 0 on success, else an error code. */
negl %eax
-
-#elif defined __NR_fadvise64
- /* Save regs */
- pushl %ebx
- pushl %esi
- pushl %edi
-#if 0
- /* does len overflow long? */
- cmpl $0, 28(%esp)
- movl $-EOVERFLOW, %eax
- jne overflow
-#endif
- movl $__NR_fadvise64, %eax /* Syscall number in %eax. */
-
- movl 16(%esp), %ebx
- movl 20(%esp), %ecx
- movl 24(%esp), %edx
- movl 28(%esp), %esi
- movl 32(%esp), %edi
-
- /* Do the system call trap. */
- int $0x80
-overflow:
- /* Restore regs */
- popl %edi
- popl %esi
- popl %ebx
-
- /* Returns 0 on success, else an error code. */
- negl %eax
-
- /* Successful; return the syscall's value. */
- ret
-
.size posix_fadvise64,.-posix_fadvise64
-
-/*
-** libc_hidden_def(__libc_posix_fadvise64)
-** #if defined __UCLIBC_HAS_LFS__ && defined __UCLIBC_HAS_ADVANCED_REALTIME__
-** weak_alias(__libc_posix_fadvise64,posix_fadvise64)
-** #endif
-*/
-
#endif
--
1.7.3.4
More information about the uClibc-cvs
mailing list