summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/arm/crt1.S17
-rw-r--r--libc/sysdeps/linux/common/fork.c8
-rw-r--r--libc/sysdeps/linux/common/ioperm.c6
-rw-r--r--libc/sysdeps/linux/common/iopl.c6
-rw-r--r--libc/sysdeps/linux/common/mlock.c4
-rw-r--r--libc/sysdeps/linux/common/mlockall.c4
-rw-r--r--libc/sysdeps/linux/common/munlock.c4
-rw-r--r--libc/unistd/Makefile6
-rw-r--r--libc/unistd/daemon.c5
9 files changed, 28 insertions, 32 deletions
diff --git a/libc/sysdeps/linux/arm/crt1.S b/libc/sysdeps/linux/arm/crt1.S
index 987c52936..26146ba86 100644
--- a/libc/sysdeps/linux/arm/crt1.S
+++ b/libc/sysdeps/linux/arm/crt1.S
@@ -7,6 +7,23 @@
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
diff --git a/libc/sysdeps/linux/common/fork.c b/libc/sysdeps/linux/common/fork.c
index 987626587..9f87ea4e2 100644
--- a/libc/sysdeps/linux/common/fork.c
+++ b/libc/sysdeps/linux/common/fork.c
@@ -13,11 +13,5 @@
#ifdef __ARCH_HAS_MMU__
#define __NR___libc_fork __NR_fork
_syscall0(pid_t, __libc_fork);
-#else
-pid_t __libc_fork(void)
-{
- __set_errno(ENOSYS);
- return -1;
-}
-#endif
weak_alias(__libc_fork, fork);
+#endif
diff --git a/libc/sysdeps/linux/common/ioperm.c b/libc/sysdeps/linux/common/ioperm.c
index 874577a64..16c9eecfa 100644
--- a/libc/sysdeps/linux/common/ioperm.c
+++ b/libc/sysdeps/linux/common/ioperm.c
@@ -10,10 +10,4 @@
#include "syscalls.h"
#if defined __ARCH_HAS_MMU__ && defined __NR_ioperm
_syscall3(int, ioperm, unsigned long, from, unsigned long, num, int, turn_on);
-#else
-int ioperm(unsigned long from, unsigned long num, int turn_on)
-{
- __set_errno(ENOSYS);
- return -1;
-}
#endif
diff --git a/libc/sysdeps/linux/common/iopl.c b/libc/sysdeps/linux/common/iopl.c
index dd45563c2..ab9513d9b 100644
--- a/libc/sysdeps/linux/common/iopl.c
+++ b/libc/sysdeps/linux/common/iopl.c
@@ -11,10 +11,4 @@
/* Tuns out the m68k unistd.h kernel header is broken */
#if defined __ARCH_HAS_MMU__ && defined __NR_iopl && ( !defined(__mc68000__))
_syscall1(int, iopl, int, level);
-#else
-int iopl(int level)
-{
- __set_errno(ENOSYS);
- return -1;
-}
#endif
diff --git a/libc/sysdeps/linux/common/mlock.c b/libc/sysdeps/linux/common/mlock.c
index 025f8e94a..aa6bbb63b 100644
--- a/libc/sysdeps/linux/common/mlock.c
+++ b/libc/sysdeps/linux/common/mlock.c
@@ -9,6 +9,6 @@
#include "syscalls.h"
#include <sys/mman.h>
-# if defined __ARCH_HAS_MMU__ && defined __NR_mlock
+#if defined __ARCH_HAS_MMU__ && defined __NR_mlock
_syscall2(int, mlock, const void *, addr, size_t, len);
-# endif
+#endif
diff --git a/libc/sysdeps/linux/common/mlockall.c b/libc/sysdeps/linux/common/mlockall.c
index 1bf6ecc3f..4f51bd0df 100644
--- a/libc/sysdeps/linux/common/mlockall.c
+++ b/libc/sysdeps/linux/common/mlockall.c
@@ -9,6 +9,6 @@
#include "syscalls.h"
#include <sys/mman.h>
-# if defined __ARCH_HAS_MMU__ && defined __NR_mlockall
+#if defined __ARCH_HAS_MMU__ && defined __NR_mlockall
_syscall1(int, mlockall, int, flags);
-# endif
+#endif
diff --git a/libc/sysdeps/linux/common/munlock.c b/libc/sysdeps/linux/common/munlock.c
index 7bbcb6cae..674ae41e0 100644
--- a/libc/sysdeps/linux/common/munlock.c
+++ b/libc/sysdeps/linux/common/munlock.c
@@ -9,6 +9,6 @@
#include "syscalls.h"
#include <sys/mman.h>
-# if defined __ARCH_HAS_MMU__ && defined __NR_munlock
+#if defined __ARCH_HAS_MMU__ && defined __NR_munlock
_syscall2(int, munlock, const void *, addr, size_t, len);
-# endif
+#endif
diff --git a/libc/unistd/Makefile b/libc/unistd/Makefile
index ed142a8aa..6493615b2 100644
--- a/libc/unistd/Makefile
+++ b/libc/unistd/Makefile
@@ -25,11 +25,9 @@ MOBJ1 = execl.o execv.o execle.o execlp.o execvp.o
CSRC= sleep.c usleep.c ualarm.c getpass.c sysconf.c getlogin.c \
fpathconf.c confstr.c pathconf.c swab.c usershell.c \
- getsubopt.c
+ getsubopt.c daemon.c
-ifeq ($(strip $(ARCH_HAS_MMU)),y)
- CSRC += daemon.c
-else
+ifneq ($(strip $(ARCH_HAS_MMU)),y)
MOBJ1 += __exec_alloc.o
endif
diff --git a/libc/unistd/daemon.c b/libc/unistd/daemon.c
index 91ae4056f..c584d8fc5 100644
--- a/libc/unistd/daemon.c
+++ b/libc/unistd/daemon.c
@@ -29,8 +29,7 @@
#include <paths.h>
#include <unistd.h>
-/* Note that this file should not be compiled in
- * unless __ARCH_HAS_MMU__ is defined */
+#if defined __ARCH_HAS_MMU__
int daemon( int nochdir, int noclose )
{
@@ -66,7 +65,7 @@ int daemon( int nochdir, int noclose )
return(0);
}
-
+#endif
/*-
* Copyright (c) 1990, 1993