[git commit] make arch specific cacheflush, readahead and sysmips LINUX_SPECIFIC dependent

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Jun 15 12:00:43 UTC 2012


commit: http://git.uclibc.org/uClibc/commit/?id=5fc54227982c5e5edd060396f9fe2639795622d0
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Remove the related headers.
Adapt sh's type to the one used everywhere and add prototype for it.

Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 Makefile.in                           |    6 +++++-
 libc/sysdeps/linux/bfin/Makefile.arch |    6 +++++-
 libc/sysdeps/linux/bfin/cacheflush.c  |    2 +-
 libc/sysdeps/linux/mips/Makefile.arch |    7 +++++--
 libc/sysdeps/linux/sh/Makefile.arch   |    6 +++++-
 libc/sysdeps/linux/sh/cacheflush.c    |    5 ++---
 6 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 16d77de..9ead65f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -286,7 +286,10 @@ HEADERS_RM-$(UCLIBC_HAS_WCHAR)               += wchar.h wctype.h
 HEADERS_RM-$(UCLIBC_HAS_WORDEXP)             += wordexp.h
 HEADERS_RM-$(UCLIBC_HAS_XATTR)               += sys/xattr.h
 HEADERS_RM-$(UCLIBC_HAS_XLOCALE)             += xlocale.h
-HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC)          += sys/eventfd.h sys/fsuid.h \
+HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC)          += \
+	sys/cachectl.h \
+	sys/eventfd.h \
+	sys/fsuid.h \
 	bits/inotify.h \
 	sys/inotify.h \
 	sys/kdaemon.h \
@@ -304,6 +307,7 @@ HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC)          += sys/eventfd.h sys/fsuid.h \
 	sys/sysinfo.h \
 	bits/timerfd.h \
 	sys/timerfd.h \
+	sys/sysmips.h \
 	sys/vfs.h
 HEADERS_RM-$(UCLIBC_SUPPORT_AI_ADDRCONFIG)   += ifaddrs.h
 HEADERS_RM-$(UCLIBC_SV4_DEPRECATED)          += ustat.h sys/ustat.h bits/ustat.h
diff --git a/libc/sysdeps/linux/bfin/Makefile.arch b/libc/sysdeps/linux/bfin/Makefile.arch
index 425a688..15ecfd8 100644
--- a/libc/sysdeps/linux/bfin/Makefile.arch
+++ b/libc/sysdeps/linux/bfin/Makefile.arch
@@ -6,7 +6,11 @@
 #
 
 CSRC := bsdsetjmp.c clone.c \
-	sram-alloc.c sram-free.c dma-memcpy.c cacheflush.c
+	sram-alloc.c sram-free.c dma-memcpy.c
+
+ifeq ($(UCLIBC_LINUX_SPECIFIC),y)
+CSRC += cacheflush.c
+endif
 
 SSRC := __longjmp.S setjmp.S bsd-_setjmp.S
 
diff --git a/libc/sysdeps/linux/bfin/cacheflush.c b/libc/sysdeps/linux/bfin/cacheflush.c
index 6ff3ad5..a4b9f4a 100644
--- a/libc/sysdeps/linux/bfin/cacheflush.c
+++ b/libc/sysdeps/linux/bfin/cacheflush.c
@@ -11,5 +11,5 @@
 #ifdef __NR_cacheflush
 # include <sys/cachectl.h>
 
-_syscall3 (int, cacheflush, void *, start, const int, nbytes, const int, flags)
+_syscall3 (int, cacheflush, void *, addr, const int, nbytes, const int, flags)
 #endif
diff --git a/libc/sysdeps/linux/mips/Makefile.arch b/libc/sysdeps/linux/mips/Makefile.arch
index 6db0b2a..fce99f8 100644
--- a/libc/sysdeps/linux/mips/Makefile.arch
+++ b/libc/sysdeps/linux/mips/Makefile.arch
@@ -7,8 +7,11 @@
 
 CSRC := \
 	__longjmp.c  brk.c setjmp_aux.c \
-	cacheflush.c pread_write.c sigaction.c sysmips.c _test_and_set.c \
-	readahead.c
+	pread_write.c sigaction.c _test_and_set.c
+
+ifeq ($(UCLIBC_LINUX_SPECIFIC),y)
+CSRC +=	cacheflush.c readahead.c sysmips.c
+endif
 
 SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S syscall.S pipe.S syscall_error.S
 
diff --git a/libc/sysdeps/linux/sh/Makefile.arch b/libc/sysdeps/linux/sh/Makefile.arch
index 5ebf42b..3ec8cbd 100644
--- a/libc/sysdeps/linux/sh/Makefile.arch
+++ b/libc/sysdeps/linux/sh/Makefile.arch
@@ -7,7 +7,11 @@
 #
 
 CSRC := \
-	pipe.c __init_brk.c brk.c sbrk.c pread_write.c cacheflush.c
+	pipe.c __init_brk.c brk.c sbrk.c pread_write.c
+
+ifeq ($(UCLIBC_LINUX_SPECIFIC),y)
+CSRC += cacheflush.c
+endif
 
 SSRC := setjmp.S __longjmp.S ___fpscr_values.S
 
diff --git a/libc/sysdeps/linux/sh/cacheflush.c b/libc/sysdeps/linux/sh/cacheflush.c
index 5822918..619b96b 100644
--- a/libc/sysdeps/linux/sh/cacheflush.c
+++ b/libc/sysdeps/linux/sh/cacheflush.c
@@ -6,10 +6,9 @@
  *
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
-#include <errno.h>
-#include <unistd.h>
 #include <sys/syscall.h>
 
 #ifdef __NR_cacheflush
-_syscall3(int, cacheflush, char *, addr, int, nbytes, int, op)
+int cacheflush(void *addr, const int nbytes, int op);
+_syscall3(int, cacheflush, void *, addr, const int, nbytes, const int, op)
 #endif


More information about the uClibc-cvs mailing list