[git commit 0_9_30] Build posix_fadvice{64} only when UCLIBC_HAS_ADVANCED_REALTIME is set.

Khem Raj raj.khem at gmail.com
Sat Oct 10 16:44:02 UTC 2009


commit: http://git.uclibc.org/uClibc/commit/?id=77ee5b304e2964a2e3b98122dc9d7cab4e04e622
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/0_9_30

Right now for ARM, MIPS, Xtensa and powerpc posix_fadvise
routines are included conditionally. They should only be
enabled when UCLIBC_HAS_ADVANCED_REALTIME is set. Also fix
code style in powerpc/posix_fadvise64.c

Signed-off-by: Khem Raj <raj.khem at gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 libc/sysdeps/linux/arm/Makefile.arch         |    7 +++++--
 libc/sysdeps/linux/mips/Makefile.arch        |    6 +++++-
 libc/sysdeps/linux/powerpc/Makefile.arch     |    6 +++++-
 libc/sysdeps/linux/powerpc/posix_fadvise64.c |    5 ++---
 libc/sysdeps/linux/xtensa/Makefile.arch      |    7 +++++--
 5 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/libc/sysdeps/linux/arm/Makefile.arch b/libc/sysdeps/linux/arm/Makefile.arch
index 8f1c3b8..e7296d3 100644
--- a/libc/sysdeps/linux/arm/Makefile.arch
+++ b/libc/sysdeps/linux/arm/Makefile.arch
@@ -5,13 +5,16 @@
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 #
 
-CSRC := brk.c ioperm.c iopl.c mmap.c posix_fadvise.c posix_fadvise64.c \
-	sigaction.c __syscall_error.c
+CSRC := brk.c ioperm.c iopl.c mmap.c sigaction.c __syscall_error.c
 
 SSRC := \
 	__longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S \
 	bsd-_setjmp.S sigrestorer.S mmap64.S
 
+ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
+        CSRC += posix_fadvise.c posix_fadvise64.c
+endif
+
 ifeq ($(CONFIG_ARM_EABI),y)
 CSRC += aeabi_assert.c aeabi_atexit.c aeabi_errno_addr.c \
 	aeabi_localeconv.c aeabi_memclr.c aeabi_memcpy.c \
diff --git a/libc/sysdeps/linux/mips/Makefile.arch b/libc/sysdeps/linux/mips/Makefile.arch
index ce80c75..2570a69 100644
--- a/libc/sysdeps/linux/mips/Makefile.arch
+++ b/libc/sysdeps/linux/mips/Makefile.arch
@@ -8,7 +8,11 @@
 CSRC := \
 	__longjmp.c  brk.c setjmp_aux.c mmap.c __syscall_error.c \
 	cacheflush.c pread_write.c sysmips.c _test_and_set.c sigaction.c \
-	readahead.c posix_fadvise.c posix_fadvise64.c
+	readahead.c
+
+ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
+        CSRC += posix_fadvise.c posix_fadvise64.c
+endif
 
 SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S syscall.S pipe.S
 
diff --git a/libc/sysdeps/linux/powerpc/Makefile.arch b/libc/sysdeps/linux/powerpc/Makefile.arch
index 2034f53..8c7fc2d 100644
--- a/libc/sysdeps/linux/powerpc/Makefile.arch
+++ b/libc/sysdeps/linux/powerpc/Makefile.arch
@@ -5,7 +5,11 @@
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 #
 
-CSRC := __syscall_error.c pread_write.c ioctl.c posix_fadvise.c posix_fadvise64.c
+CSRC := __syscall_error.c pread_write.c ioctl.c
+
+ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
+CSRC += posix_fadvise.c posix_fadvise64.c
+endif
 
 SSRC := \
 	__longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \
diff --git a/libc/sysdeps/linux/powerpc/posix_fadvise64.c b/libc/sysdeps/linux/powerpc/posix_fadvise64.c
index 159bdfa..2c7d207 100644
--- a/libc/sysdeps/linux/powerpc/posix_fadvise64.c
+++ b/libc/sysdeps/linux/powerpc/posix_fadvise64.c
@@ -30,9 +30,8 @@ int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise)
   if (len != (off_t) len)
     return EOVERFLOW;
   INTERNAL_SYSCALL_DECL (err);
-    int ret = INTERNAL_SYSCALL (posix_fadvise64, err, 6, fd, 0,
-                               __LONG_LONG_PAIR ((long) (offset >> 32),
-                                                 (long) offset),
+  int ret = INTERNAL_SYSCALL (posix_fadvise64, err, 6, fd, 0,
+                               __LONG_LONG_PAIR ((long) (offset >> 32), (long) offset),
                                (off_t) len, advise);
   if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
     return 0;
diff --git a/libc/sysdeps/linux/xtensa/Makefile.arch b/libc/sysdeps/linux/xtensa/Makefile.arch
index 3e2b1e1..bf45031 100644
--- a/libc/sysdeps/linux/xtensa/Makefile.arch
+++ b/libc/sysdeps/linux/xtensa/Makefile.arch
@@ -5,8 +5,11 @@
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 #
 
-CSRC := brk.c fork.c posix_fadvise.c posix_fadvise64.c pread_write.c \
-     	sigaction.c __syscall_error.c
+CSRC := brk.c fork.c pread_write.c sigaction.c __syscall_error.c
+
+ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
+    CSRC += posix_fadvise.c posix_fadvise64.c
+endif
 
 SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S \
 	sigrestorer.S syscall.S mmap.S windowspill.S __longjmp.S vfork.S
-- 
1.6.3.3



More information about the uClibc-cvs mailing list