diff options
Diffstat (limited to 'libc/sysdeps/linux')
| -rw-r--r-- | libc/sysdeps/linux/Makefile.arch | 44 | ||||
| -rw-r--r-- | libc/sysdeps/linux/alpha/Makefile.arch | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/arm/Makefile.arch | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/common/bits/kernel_sigaction.h | 43 | ||||
| -rw-r--r-- | libc/sysdeps/linux/common/create_module.c | 21 | ||||
| -rw-r--r-- | libc/sysdeps/linux/common/get_kernel_syms.c | 4 | ||||
| -rw-r--r-- | libc/sysdeps/linux/common/getrusage.c | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/cris/Makefile.arch | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/hppa/Makefile.arch | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/hppa/bits/syscalls.h | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/i386/Makefile.arch | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/m68k/Makefile.arch | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/m68k/bits/mman.h | 1 | ||||
| -rw-r--r-- | libc/sysdeps/linux/mips/Makefile.arch | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/powerpc/Makefile.arch | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sh/Makefile.arch | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sparc/Makefile.arch | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/x86_64/Makefile.arch | 2 |
18 files changed, 38 insertions, 101 deletions
diff --git a/libc/sysdeps/linux/Makefile.arch b/libc/sysdeps/linux/Makefile.arch deleted file mode 100644 index 5feffe8d6..000000000 --- a/libc/sysdeps/linux/Makefile.arch +++ /dev/null @@ -1,44 +0,0 @@ -# Makefile template to be included by sysdeps/linux/<ARCH>/Makefile.arch -# -# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org> -# -# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -# - -ARCH_DIR := $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) -ARCH_OUT := $(top_builddir)libc/sysdeps/linux/$(TARGET_ARCH) - -ARCH_CSRC := $(patsubst %.c,$(ARCH_DIR)/%.c,$(CSRC)) -ARCH_COBJ := $(patsubst %.c,$(ARCH_OUT)/%.o,$(CSRC)) -ARCH_SSRC := $(patsubst %.s,$(ARCH_DIR)/%.s,$(patsubst %.S,$(ARCH_DIR)/%.S,$(SSRC))) -ARCH_SOBJ := $(patsubst %.s,$(ARCH_OUT)/%.o,$(patsubst %.S,$(ARCH_OUT)/%.o,$(SSRC))) - -ARCH_OBJS := $(ARCH_COBJ) $(ARCH_SOBJ) - -crt-y := create -libc-a-y += $(ARCH_OBJS) -libc-so-y += $(ARCH_OBJS:.o=.os) -libc-multi-y += $(ARCH_CSRC) -libc-nomulti-y += $(ARCH_SOBJ) -objclean-y += arch_objclean - -arch_objclean: - $(RM) $(ARCH_OUT)/*.{o,os} $(CTOR_TARGETS) $(CRTS) - -ifneq ($(ARCH_HEADERS),) - -ARCH_HEADERS_IN := $(patsubst %,../libc/sysdeps/linux/$(TARGET_ARCH)/%,$(ARCH_HEADERS)) -ARCH_HEADERS_OUT := $(patsubst %,$(top_builddir)include/%,$(ARCH_HEADERS)) - -headers-y += arch_headers -arch_headers: - $(SECHO) $(LN) -fs $(ARCH_HEADERS) $(top_builddir)include/ - @for h in $(ARCH_HEADERS_IN) ; do \ - $(LN) -fs $$h $(top_builddir)include/ ; \ - done - -headers_clean-y += arch_headers_clean -arch_headers_clean: - $(RM) $(ARCH_HEADERS_OUT) - -endif diff --git a/libc/sysdeps/linux/alpha/Makefile.arch b/libc/sysdeps/linux/alpha/Makefile.arch index aafb4a826..91636c71a 100644 --- a/libc/sysdeps/linux/alpha/Makefile.arch +++ b/libc/sysdeps/linux/alpha/Makefile.arch @@ -11,4 +11,4 @@ SSRC := \ __longjmp.S brk.S bsd-_setjmp.S bsd-setjmp.S clone.S \ divl.S divq.S reml.S remq.S setjmp.S -include $(top_srcdir)libc/sysdeps/linux/Makefile.arch +include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch diff --git a/libc/sysdeps/linux/arm/Makefile.arch b/libc/sysdeps/linux/arm/Makefile.arch index c6edc12a1..1ed4b6a6e 100644 --- a/libc/sysdeps/linux/arm/Makefile.arch +++ b/libc/sysdeps/linux/arm/Makefile.arch @@ -11,4 +11,4 @@ SSRC := \ __longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S \ bsd-_setjmp.S sigrestorer.S mmap64.S -include $(top_srcdir)libc/sysdeps/linux/Makefile.arch +include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch diff --git a/libc/sysdeps/linux/common/bits/kernel_sigaction.h b/libc/sysdeps/linux/common/bits/kernel_sigaction.h index 6eaf61f1d..5baf1e224 100644 --- a/libc/sysdeps/linux/common/bits/kernel_sigaction.h +++ b/libc/sysdeps/linux/common/bits/kernel_sigaction.h @@ -4,36 +4,9 @@ /* This file provides whatever this particular arch's kernel thinks * the sigaction struct should look like... */ -#if defined(__alpha__) -#undef HAVE_SA_RESTORER -/* This is the sigaction struction from the Linux 2.1.20 kernel. */ -struct old_kernel_sigaction { - __sighandler_t k_sa_handler; - unsigned long sa_mask; - unsigned int sa_flags; -}; -/* This is the sigaction structure from the Linux 2.1.68 kernel. */ -struct kernel_sigaction { - __sighandler_t k_sa_handler; - unsigned int sa_flags; - sigset_t sa_mask; -}; -#elif defined(__hppa__) -#undef HAVE_SA_RESTORER -/* This is the sigaction struction from the Linux 2.1.20 kernel. */ -/* Blah. This is bogus. We don't ever use it. */ -struct old_kernel_sigaction { - __sighandler_t k_sa_handler; - unsigned long sa_mask; - unsigned long sa_flags; -}; -/* This is the sigaction structure from the Linux 2.1.68 kernel. */ -struct kernel_sigaction { - __sighandler_t k_sa_handler; - unsigned long sa_flags; - sigset_t sa_mask; -}; -#elif defined(__mips__) +#undef NO_OLD_SIGACTION + +#if defined(__mips__) #undef HAVE_SA_RESTORER /* This is the sigaction structure from the Linux 2.1.24 kernel. */ #include <sgidefs.h> @@ -58,6 +31,14 @@ struct kernel_sigaction { void (*sa_restorer)(void); int s_resv[1]; /* reserved */ }; +#elif defined(__ia64__) +#define NO_OLD_SIGACTION +#undef HAVE_SA_RESTORER +struct kernel_sigaction { + __sighandler_t k_sa_handler; + unsigned long sa_flags; + sigset_t sa_mask; +}; #else #define HAVE_SA_RESTORER /* This is the sigaction structure from the Linux 2.1.20 kernel. */ @@ -76,8 +57,10 @@ struct kernel_sigaction { }; #endif +#ifndef NO_OLD_SIGACTION extern int __syscall_sigaction (int, const struct old_kernel_sigaction *__unbounded, struct old_kernel_sigaction *__unbounded); +#endif extern int __syscall_rt_sigaction (int, const struct kernel_sigaction *__unbounded, struct kernel_sigaction *__unbounded, size_t); diff --git a/libc/sysdeps/linux/common/create_module.c b/libc/sysdeps/linux/common/create_module.c index e37f8e804..0c8f50999 100644 --- a/libc/sysdeps/linux/common/create_module.c +++ b/libc/sysdeps/linux/common/create_module.c @@ -27,19 +27,17 @@ #include <sys/syscall.h> -//#define __NR_create_module 127 - #ifdef __NR_create_module #if defined(__i386__) || defined(__m68k__) || defined(__arm__) || defined(__thumb__) || defined(__cris__) || defined(__i960__) -#define __NR___create_module __NR_create_module -#ifdef __STR_NR_create_module -#define __STR_NR___create_module __STR_NR_create_module -#endif +# define __NR___create_module __NR_create_module +# ifdef __STR_NR_create_module +# define __STR_NR___create_module __STR_NR_create_module +# endif _syscall2(long, __create_module, const char *, name, size_t, size); /* By checking the value of errno, we know if we have been fooled * by the syscall2 macro making a very high address look like a - * negaitive, so we we fix it up here. */ + * negative, so we we fix it up here. */ unsigned long create_module(const char *name, size_t size) { long ret = __create_module(name, size); @@ -52,7 +50,7 @@ unsigned long create_module(const char *name, size_t size) return ret; } #elif defined(__alpha__) -#define __NR___create_module __NR_create_module +# define __NR___create_module __NR_create_module /* Alpha doesn't have the same problem, exactly, but a bug in older kernels fails to clear the error flag. Clear it here explicitly. */ _syscall4(unsigned long, __create_module, const char *, name, @@ -66,11 +64,10 @@ unsigned long create_module(const char *name, size_t size) _syscall2(unsigned long, create_module, const char *, name, size_t, size); #endif -#else -unsigned long create_module(const char *name, size_t size) +#else /* !__NR_create_module */ +caddr_t create_module(const char *name, size_t size) { __set_errno(ENOSYS); - return (unsigned long)-1; + return (caddr_t)-1; } #endif - diff --git a/libc/sysdeps/linux/common/get_kernel_syms.c b/libc/sysdeps/linux/common/get_kernel_syms.c index ae19cd2c7..92a105ebd 100644 --- a/libc/sysdeps/linux/common/get_kernel_syms.c +++ b/libc/sysdeps/linux/common/get_kernel_syms.c @@ -9,13 +9,13 @@ #include "syscalls.h" -#ifdef __NR_get_kernel_syms struct kernel_sym; +#ifdef __NR_get_kernel_syms _syscall1(int, get_kernel_syms, struct kernel_sym *, table); #else int get_kernel_syms(struct kernel_sym *table) { __set_errno(ENOSYS); - return (unsigned long)-1; + return -1; } #endif diff --git a/libc/sysdeps/linux/common/getrusage.c b/libc/sysdeps/linux/common/getrusage.c index f0476352c..c6aa5a95e 100644 --- a/libc/sysdeps/linux/common/getrusage.c +++ b/libc/sysdeps/linux/common/getrusage.c @@ -10,4 +10,4 @@ #include "syscalls.h" #include <unistd.h> #include <wait.h> -_syscall2(int, getrusage, int, who, struct rusage *, usage); +_syscall2(int, getrusage, __rusage_who_t, who, struct rusage *, usage); diff --git a/libc/sysdeps/linux/cris/Makefile.arch b/libc/sysdeps/linux/cris/Makefile.arch index ba2040f0d..850c83de5 100644 --- a/libc/sysdeps/linux/cris/Makefile.arch +++ b/libc/sysdeps/linux/cris/Makefile.arch @@ -12,4 +12,4 @@ ifeq ($(UNIFIED_SYSCALL),y) SSRC += __uClibc_syscall.S endif -include $(top_srcdir)libc/sysdeps/linux/Makefile.arch +include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch diff --git a/libc/sysdeps/linux/hppa/Makefile.arch b/libc/sysdeps/linux/hppa/Makefile.arch index 047c01005..9739e74d7 100644 --- a/libc/sysdeps/linux/hppa/Makefile.arch +++ b/libc/sysdeps/linux/hppa/Makefile.arch @@ -10,4 +10,4 @@ CSRC := __syscall_error.c brk.c mmap.c syscall.c SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S \ add_n.s lshift.s rshift.s sub_n.s udiv_qrnnd.s -include $(top_srcdir)libc/sysdeps/linux/Makefile.arch +include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch diff --git a/libc/sysdeps/linux/hppa/bits/syscalls.h b/libc/sysdeps/linux/hppa/bits/syscalls.h index 013c24095..d173aa389 100644 --- a/libc/sysdeps/linux/hppa/bits/syscalls.h +++ b/libc/sysdeps/linux/hppa/bits/syscalls.h @@ -163,4 +163,4 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6 } #endif /* __ASSEMBLER__ */ -#endif /* _ASM_PARISC_UNISTD_H_ */ +#endif /* _BITS_SYSCALLS_H */ diff --git a/libc/sysdeps/linux/i386/Makefile.arch b/libc/sysdeps/linux/i386/Makefile.arch index c0f4f2f40..abd267445 100644 --- a/libc/sysdeps/linux/i386/Makefile.arch +++ b/libc/sysdeps/linux/i386/Makefile.arch @@ -11,4 +11,4 @@ SSRC := \ __longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S \ bsd-_setjmp.S syscall.S mmap.S mmap64.S -include $(top_srcdir)libc/sysdeps/linux/Makefile.arch +include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch diff --git a/libc/sysdeps/linux/m68k/Makefile.arch b/libc/sysdeps/linux/m68k/Makefile.arch index 833d31ffe..81e5b27f7 100644 --- a/libc/sysdeps/linux/m68k/Makefile.arch +++ b/libc/sysdeps/linux/m68k/Makefile.arch @@ -15,4 +15,4 @@ else ARCH_HEADERS := fpu_control.h endif -include $(top_srcdir)libc/sysdeps/linux/Makefile.arch +include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch diff --git a/libc/sysdeps/linux/m68k/bits/mman.h b/libc/sysdeps/linux/m68k/bits/mman.h index 34f14ee5b..7f644b99b 100644 --- a/libc/sysdeps/linux/m68k/bits/mman.h +++ b/libc/sysdeps/linux/m68k/bits/mman.h @@ -72,4 +72,5 @@ /* Flags for `mremap'. */ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 +# define MREMAP_FIXED 2 #endif diff --git a/libc/sysdeps/linux/mips/Makefile.arch b/libc/sysdeps/linux/mips/Makefile.arch index f88e99686..c79aee8ca 100644 --- a/libc/sysdeps/linux/mips/Makefile.arch +++ b/libc/sysdeps/linux/mips/Makefile.arch @@ -14,4 +14,4 @@ SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S syscall.S pipe.S ARCH_HEADERS := sgidefs.h # regdef.h -include $(top_srcdir)libc/sysdeps/linux/Makefile.arch +include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch diff --git a/libc/sysdeps/linux/powerpc/Makefile.arch b/libc/sysdeps/linux/powerpc/Makefile.arch index 125ebc397..eaa1cb7f8 100644 --- a/libc/sysdeps/linux/powerpc/Makefile.arch +++ b/libc/sysdeps/linux/powerpc/Makefile.arch @@ -11,4 +11,4 @@ SSRC := \ __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \ clone.S __uClibc_syscall.S syscall.S vfork.S -include $(top_srcdir)libc/sysdeps/linux/Makefile.arch +include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch diff --git a/libc/sysdeps/linux/sh/Makefile.arch b/libc/sysdeps/linux/sh/Makefile.arch index 33ea8a94f..fa1a49543 100644 --- a/libc/sysdeps/linux/sh/Makefile.arch +++ b/libc/sysdeps/linux/sh/Makefile.arch @@ -11,4 +11,4 @@ CSRC := \ SSRC := setjmp.S __longjmp.S vfork.S clone.S ___fpscr_values.S -include $(top_srcdir)libc/sysdeps/linux/Makefile.arch +include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch diff --git a/libc/sysdeps/linux/sparc/Makefile.arch b/libc/sysdeps/linux/sparc/Makefile.arch index 6730206b4..a6f44f2f0 100644 --- a/libc/sysdeps/linux/sparc/Makefile.arch +++ b/libc/sysdeps/linux/sparc/Makefile.arch @@ -11,4 +11,4 @@ SSRC := \ __longjmp.S fork.S vfork.S clone.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \ urem.S udiv.S umul.S sdiv.S rem.S -include $(top_srcdir)libc/sysdeps/linux/Makefile.arch +include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch diff --git a/libc/sysdeps/linux/x86_64/Makefile.arch b/libc/sysdeps/linux/x86_64/Makefile.arch index 2cd9b2389..b6ad71cbd 100644 --- a/libc/sysdeps/linux/x86_64/Makefile.arch +++ b/libc/sysdeps/linux/x86_64/Makefile.arch @@ -10,4 +10,4 @@ CSRC := brk.c sigaction.c __syscall_error.c mmap.c SSRC := \ __longjmp.S vfork.S setjmp.S syscall.S bsd-setjmp.S bsd-_setjmp.S clone.S -include $(top_srcdir)libc/sysdeps/linux/Makefile.arch +include $(top_srcdir)libc/sysdeps/linux/Makefile.commonarch |
