summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/alpha/sysdep.c24
-rw-r--r--libc/sysdeps/linux/arm/__syscall_error.c23
-rw-r--r--libc/sysdeps/linux/arm/brk.c2
-rw-r--r--libc/sysdeps/linux/arm/ioperm.c3
-rw-r--r--libc/sysdeps/linux/bfin/brk.c3
-rw-r--r--libc/sysdeps/linux/bfin/clone.c6
-rw-r--r--libc/sysdeps/linux/bfin/syscall.c16
-rw-r--r--libc/sysdeps/linux/bfin/vfork.S9
-rw-r--r--libc/sysdeps/linux/common/__rt_sigtimedwait.c10
-rw-r--r--libc/sysdeps/linux/common/__socketcall.c4
-rw-r--r--libc/sysdeps/linux/common/__syscall_fcntl.c6
-rw-r--r--libc/sysdeps/linux/common/__syscall_fcntl64.c6
-rw-r--r--libc/sysdeps/linux/common/__syscall_ipc.c4
-rw-r--r--libc/sysdeps/linux/common/__syscall_rt_sigaction.c5
-rw-r--r--libc/sysdeps/linux/common/__syscall_sigaction.c4
-rw-r--r--libc/sysdeps/linux/common/_exit.c21
-rw-r--r--libc/sysdeps/linux/common/access.c4
-rw-r--r--libc/sysdeps/linux/common/acct.c4
-rw-r--r--libc/sysdeps/linux/common/adjtimex.c7
-rw-r--r--libc/sysdeps/linux/common/alarm.c8
-rw-r--r--libc/sysdeps/linux/common/bdflush.c4
-rw-r--r--libc/sysdeps/linux/common/capget.c10
-rw-r--r--libc/sysdeps/linux/common/capset.c10
-rw-r--r--libc/sysdeps/linux/common/chdir.c8
-rw-r--r--libc/sysdeps/linux/common/chmod.c7
-rw-r--r--libc/sysdeps/linux/common/chown.c4
-rw-r--r--libc/sysdeps/linux/common/chroot.c4
-rw-r--r--libc/sysdeps/linux/common/clock_getres.c16
-rw-r--r--libc/sysdeps/linux/common/clock_gettime.c16
-rw-r--r--libc/sysdeps/linux/common/clock_settime.c16
-rw-r--r--libc/sysdeps/linux/common/close.c4
-rw-r--r--libc/sysdeps/linux/common/cmsg_nxthdr.c3
-rw-r--r--libc/sysdeps/linux/common/create_module.c18
-rw-r--r--libc/sysdeps/linux/common/delete_module.c5
-rw-r--r--libc/sysdeps/linux/common/dup.c5
-rw-r--r--libc/sysdeps/linux/common/dup2.c8
-rw-r--r--libc/sysdeps/linux/common/epoll.c4
-rw-r--r--libc/sysdeps/linux/common/execve.c7
-rw-r--r--libc/sysdeps/linux/common/fchdir.c8
-rw-r--r--libc/sysdeps/linux/common/fchmod.c4
-rw-r--r--libc/sysdeps/linux/common/fdatasync.c4
-rw-r--r--libc/sysdeps/linux/common/flock.c4
-rw-r--r--libc/sysdeps/linux/common/fork.c4
-rw-r--r--libc/sysdeps/linux/common/fstat.c10
-rw-r--r--libc/sysdeps/linux/common/fstat64.c12
-rw-r--r--libc/sysdeps/linux/common/fstatfs.c8
-rw-r--r--libc/sysdeps/linux/common/fsync.c4
-rw-r--r--libc/sysdeps/linux/common/ftruncate.c8
-rw-r--r--libc/sysdeps/linux/common/ftruncate64.c64
-rw-r--r--libc/sysdeps/linux/common/get_kernel_syms.c4
-rw-r--r--libc/sysdeps/linux/common/getcwd.c24
-rw-r--r--libc/sysdeps/linux/common/getdents.c25
-rw-r--r--libc/sysdeps/linux/common/getdents64.c35
-rw-r--r--libc/sysdeps/linux/common/getdnnm.c3
-rw-r--r--libc/sysdeps/linux/common/getdtablesize.c25
-rw-r--r--libc/sysdeps/linux/common/getegid.c7
-rw-r--r--libc/sysdeps/linux/common/geteuid.c7
-rw-r--r--libc/sysdeps/linux/common/getgid.c7
-rw-r--r--libc/sysdeps/linux/common/getgroups.c7
-rw-r--r--libc/sysdeps/linux/common/gethstnm.c3
-rw-r--r--libc/sysdeps/linux/common/getitimer.c4
-rw-r--r--libc/sysdeps/linux/common/getpgid.c4
-rw-r--r--libc/sysdeps/linux/common/getpriority.c7
-rw-r--r--libc/sysdeps/linux/common/getresgid.c6
-rw-r--r--libc/sysdeps/linux/common/getresuid.c6
-rw-r--r--libc/sysdeps/linux/common/getrlimit.c12
-rw-r--r--libc/sysdeps/linux/common/getrusage.c4
-rw-r--r--libc/sysdeps/linux/common/getsid.c7
-rw-r--r--libc/sysdeps/linux/common/gettimeofday.c8
-rw-r--r--libc/sysdeps/linux/common/getuid.c7
-rw-r--r--libc/sysdeps/linux/common/init_module.c4
-rw-r--r--libc/sysdeps/linux/common/ioctl.c4
-rw-r--r--libc/sysdeps/linux/common/ioperm.c4
-rw-r--r--libc/sysdeps/linux/common/iopl.c4
-rw-r--r--libc/sysdeps/linux/common/kill.c8
-rw-r--r--libc/sysdeps/linux/common/klogctl.c4
-rw-r--r--libc/sysdeps/linux/common/lchown.c4
-rw-r--r--libc/sysdeps/linux/common/link.c4
-rw-r--r--libc/sysdeps/linux/common/llseek.c26
-rw-r--r--libc/sysdeps/linux/common/lseek.c8
-rw-r--r--libc/sysdeps/linux/common/lstat.c8
-rw-r--r--libc/sysdeps/linux/common/lstat64.c17
-rw-r--r--libc/sysdeps/linux/common/madvise.c4
-rw-r--r--libc/sysdeps/linux/common/mincore.c9
-rw-r--r--libc/sysdeps/linux/common/mkdir.c7
-rw-r--r--libc/sysdeps/linux/common/mknod.c7
-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/mmap.c10
-rw-r--r--libc/sysdeps/linux/common/mmap64.c49
-rw-r--r--libc/sysdeps/linux/common/modify_ldt.c5
-rw-r--r--libc/sysdeps/linux/common/mount.c4
-rw-r--r--libc/sysdeps/linux/common/mprotect.c4
-rw-r--r--libc/sysdeps/linux/common/mremap.c8
-rw-r--r--libc/sysdeps/linux/common/msync.c4
-rw-r--r--libc/sysdeps/linux/common/munlock.c4
-rw-r--r--libc/sysdeps/linux/common/munlockall.c4
-rw-r--r--libc/sysdeps/linux/common/munmap.c8
-rw-r--r--libc/sysdeps/linux/common/nanosleep.c5
-rw-r--r--libc/sysdeps/linux/common/nice.c14
-rw-r--r--libc/sysdeps/linux/common/open.c8
-rw-r--r--libc/sysdeps/linux/common/open64.c29
-rw-r--r--libc/sysdeps/linux/common/pause.c4
-rw-r--r--libc/sysdeps/linux/common/personality.c4
-rw-r--r--libc/sysdeps/linux/common/pipe.c8
-rw-r--r--libc/sysdeps/linux/common/pivot_root.c4
-rw-r--r--libc/sysdeps/linux/common/poll.c3
-rw-r--r--libc/sysdeps/linux/common/posix_fadvise.c4
-rw-r--r--libc/sysdeps/linux/common/posix_fadvise64.c4
-rw-r--r--libc/sysdeps/linux/common/prctl.c4
-rw-r--r--libc/sysdeps/linux/common/pread_write.c36
-rw-r--r--libc/sysdeps/linux/common/ptrace.c25
-rw-r--r--libc/sysdeps/linux/common/query_module.c4
-rw-r--r--libc/sysdeps/linux/common/quotactl.c4
-rw-r--r--libc/sysdeps/linux/common/read.c4
-rw-r--r--libc/sysdeps/linux/common/readlink.c8
-rw-r--r--libc/sysdeps/linux/common/readv.c4
-rw-r--r--libc/sysdeps/linux/common/reboot.c4
-rw-r--r--libc/sysdeps/linux/common/rename.c4
-rw-r--r--libc/sysdeps/linux/common/rmdir.c8
-rw-r--r--libc/sysdeps/linux/common/sbrk.c25
-rw-r--r--libc/sysdeps/linux/common/sched_get_priority_max.c4
-rw-r--r--libc/sysdeps/linux/common/sched_get_priority_min.c4
-rw-r--r--libc/sysdeps/linux/common/sched_getparam.c4
-rw-r--r--libc/sysdeps/linux/common/sched_getscheduler.c4
-rw-r--r--libc/sysdeps/linux/common/sched_rr_get_interval.c4
-rw-r--r--libc/sysdeps/linux/common/sched_setparam.c4
-rw-r--r--libc/sysdeps/linux/common/sched_setscheduler.c4
-rw-r--r--libc/sysdeps/linux/common/sched_yield.c4
-rw-r--r--libc/sysdeps/linux/common/select.c11
-rw-r--r--libc/sysdeps/linux/common/sendfile.c4
-rw-r--r--libc/sysdeps/linux/common/sendfile64.c26
-rw-r--r--libc/sysdeps/linux/common/setdomainname.c4
-rw-r--r--libc/sysdeps/linux/common/setegid.c2
-rw-r--r--libc/sysdeps/linux/common/seteuid.c3
-rw-r--r--libc/sysdeps/linux/common/setfsgid.c4
-rw-r--r--libc/sysdeps/linux/common/setfsuid.c4
-rw-r--r--libc/sysdeps/linux/common/setgid.c4
-rw-r--r--libc/sysdeps/linux/common/setgroups.c7
-rw-r--r--libc/sysdeps/linux/common/sethostname.c4
-rw-r--r--libc/sysdeps/linux/common/setitimer.c8
-rw-r--r--libc/sysdeps/linux/common/setpgid.c7
-rw-r--r--libc/sysdeps/linux/common/setpriority.c8
-rw-r--r--libc/sysdeps/linux/common/setregid.c7
-rw-r--r--libc/sysdeps/linux/common/setresgid.c8
-rw-r--r--libc/sysdeps/linux/common/setresuid.c8
-rw-r--r--libc/sysdeps/linux/common/setreuid.c7
-rw-r--r--libc/sysdeps/linux/common/setrlimit.c15
-rw-r--r--libc/sysdeps/linux/common/setsid.c8
-rw-r--r--libc/sysdeps/linux/common/settimeofday.c10
-rw-r--r--libc/sysdeps/linux/common/setuid.c4
-rw-r--r--libc/sysdeps/linux/common/sigaltstack.c4
-rw-r--r--libc/sysdeps/linux/common/sigpending.c7
-rw-r--r--libc/sysdeps/linux/common/sigprocmask.c28
-rw-r--r--libc/sysdeps/linux/common/sigsuspend.c11
-rw-r--r--libc/sysdeps/linux/common/stat.c7
-rw-r--r--libc/sysdeps/linux/common/stat64.c19
-rw-r--r--libc/sysdeps/linux/common/statfs.c7
-rw-r--r--libc/sysdeps/linux/common/swapoff.c4
-rw-r--r--libc/sysdeps/linux/common/swapon.c4
-rw-r--r--libc/sysdeps/linux/common/symlink.c4
-rw-r--r--libc/sysdeps/linux/common/sync.c17
-rw-r--r--libc/sysdeps/linux/common/syscalls.h19
-rw-r--r--libc/sysdeps/linux/common/sysctl.c4
-rw-r--r--libc/sysdeps/linux/common/sysfs.c4
-rw-r--r--libc/sysdeps/linux/common/sysinfo.c4
-rw-r--r--libc/sysdeps/linux/common/time.c8
-rw-r--r--libc/sysdeps/linux/common/times.c8
-rw-r--r--libc/sysdeps/linux/common/truncate.c8
-rw-r--r--libc/sysdeps/linux/common/truncate64.c12
-rw-r--r--libc/sysdeps/linux/common/ulimit.c18
-rw-r--r--libc/sysdeps/linux/common/umask.c4
-rw-r--r--libc/sysdeps/linux/common/umount.c11
-rw-r--r--libc/sysdeps/linux/common/umount2.c4
-rw-r--r--libc/sysdeps/linux/common/uname.c8
-rw-r--r--libc/sysdeps/linux/common/unlink.c8
-rw-r--r--libc/sysdeps/linux/common/uselib.c4
-rw-r--r--libc/sysdeps/linux/common/ustat.c4
-rw-r--r--libc/sysdeps/linux/common/utime.c8
-rw-r--r--libc/sysdeps/linux/common/utimes.c9
-rw-r--r--libc/sysdeps/linux/common/vfork.c3
-rw-r--r--libc/sysdeps/linux/common/vhangup.c4
-rw-r--r--libc/sysdeps/linux/common/wait4.c8
-rw-r--r--libc/sysdeps/linux/common/write.c4
-rw-r--r--libc/sysdeps/linux/common/writev.c4
-rw-r--r--libc/sysdeps/linux/common/xattr.c8
-rw-r--r--libc/sysdeps/linux/cris/__longjmp.S6
-rw-r--r--libc/sysdeps/linux/cris/brk.c9
-rw-r--r--libc/sysdeps/linux/cris/fork.c6
-rw-r--r--libc/sysdeps/linux/cris/sbrk.c8
-rw-r--r--libc/sysdeps/linux/e1/longjmp.c9
-rw-r--r--libc/sysdeps/linux/e1/vfork.c9
-rw-r--r--libc/sysdeps/linux/frv/__longjmp.S8
-rw-r--r--libc/sysdeps/linux/frv/brk.c8
-rw-r--r--libc/sysdeps/linux/frv/fstat.c24
-rw-r--r--libc/sysdeps/linux/frv/fstat64.c24
-rw-r--r--libc/sysdeps/linux/frv/lstat.c24
-rw-r--r--libc/sysdeps/linux/frv/lstat64.c24
-rw-r--r--libc/sysdeps/linux/frv/mmap.c3
-rw-r--r--libc/sysdeps/linux/frv/sbrk.c3
-rw-r--r--libc/sysdeps/linux/frv/stat.c24
-rw-r--r--libc/sysdeps/linux/frv/stat64.c24
-rw-r--r--libc/sysdeps/linux/h8300/brk.c8
-rw-r--r--libc/sysdeps/linux/h8300/vfork.S2
-rw-r--r--libc/sysdeps/linux/hppa/__syscall_error.c22
-rw-r--r--libc/sysdeps/linux/hppa/brk.c3
-rw-r--r--libc/sysdeps/linux/hppa/mmap.c7
-rw-r--r--libc/sysdeps/linux/i386/__syscall_error.c28
-rw-r--r--libc/sysdeps/linux/i386/brk.c2
-rw-r--r--libc/sysdeps/linux/m68k/__syscall_error.c22
-rw-r--r--libc/sysdeps/linux/m68k/brk.c8
-rw-r--r--libc/sysdeps/linux/m68k/ptrace.c5
-rw-r--r--libc/sysdeps/linux/m68k/vfork.S6
-rw-r--r--libc/sysdeps/linux/microblaze/__longjmp.S2
-rw-r--r--libc/sysdeps/linux/microblaze/mmap.c8
-rw-r--r--libc/sysdeps/linux/microblaze/vfork.S2
-rw-r--r--libc/sysdeps/linux/mips/__longjmp.c3
-rw-r--r--libc/sysdeps/linux/mips/__syscall_error.c22
-rw-r--r--libc/sysdeps/linux/mips/brk.c3
-rw-r--r--libc/sysdeps/linux/mips/cacheflush.c2
-rw-r--r--libc/sysdeps/linux/mips/mmap.c9
-rw-r--r--libc/sysdeps/linux/mips/pipe.S5
-rw-r--r--libc/sysdeps/linux/mips/pipe.c9
-rw-r--r--libc/sysdeps/linux/mips/pread_write.c21
-rw-r--r--libc/sysdeps/linux/nios/brk.c2
-rw-r--r--libc/sysdeps/linux/nios2/brk.c2
-rw-r--r--libc/sysdeps/linux/nios2/clone.c8
-rw-r--r--libc/sysdeps/linux/powerpc/__syscall_error.c22
-rw-r--r--libc/sysdeps/linux/powerpc/ioctl.c3
-rw-r--r--libc/sysdeps/linux/powerpc/mmap.c8
-rw-r--r--libc/sysdeps/linux/powerpc/pread_write.c25
-rw-r--r--libc/sysdeps/linux/powerpc/vfork.c3
-rw-r--r--libc/sysdeps/linux/sh/__longjmp.S2
-rw-r--r--libc/sysdeps/linux/sh/brk.c8
-rw-r--r--libc/sysdeps/linux/sh/mmap.c3
-rw-r--r--libc/sysdeps/linux/sh/pipe.c11
-rw-r--r--libc/sysdeps/linux/sh/pread_write.c21
-rw-r--r--libc/sysdeps/linux/sh/sbrk.c3
-rw-r--r--libc/sysdeps/linux/sh64/brk.c8
-rw-r--r--libc/sysdeps/linux/sh64/sbrk.c8
-rw-r--r--libc/sysdeps/linux/sparc/__syscall_error.c22
-rw-r--r--libc/sysdeps/linux/sparc/brk.c3
-rw-r--r--libc/sysdeps/linux/v850/__longjmp.S1
-rw-r--r--libc/sysdeps/linux/v850/mmap.c8
-rw-r--r--libc/sysdeps/linux/v850/vfork.S2
-rw-r--r--libc/sysdeps/linux/x86_64/__syscall_error.c22
-rw-r--r--libc/sysdeps/linux/x86_64/brk.c3
-rw-r--r--libc/sysdeps/linux/x86_64/mmap.c7
248 files changed, 989 insertions, 1218 deletions
diff --git a/libc/sysdeps/linux/alpha/sysdep.c b/libc/sysdeps/linux/alpha/sysdep.c
index 17260f72f..cb3cb2639 100644
--- a/libc/sysdeps/linux/alpha/sysdep.c
+++ b/libc/sysdeps/linux/alpha/sysdep.c
@@ -1,26 +1,14 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <errno.h>
/* This routine is jumped to by all the syscall handlers, to stash
an error number into errno. */
-int __syscall_error (int err_no)
+int attribute_hidden __syscall_error (int err_no)
{
__set_errno (err_no);
return -1;
diff --git a/libc/sysdeps/linux/arm/__syscall_error.c b/libc/sysdeps/linux/arm/__syscall_error.c
index 40b6b10dc..25fd67b9f 100644
--- a/libc/sysdeps/linux/arm/__syscall_error.c
+++ b/libc/sysdeps/linux/arm/__syscall_error.c
@@ -1,24 +1,11 @@
/* Wrapper for setting errno.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
#include <features.h>
+#include <errno.h>
/* This routine is jumped to by all the syscall handlers, to stash
* an error number into errno. */
diff --git a/libc/sysdeps/linux/arm/brk.c b/libc/sysdeps/linux/arm/brk.c
index 88f489e26..3d606e533 100644
--- a/libc/sysdeps/linux/arm/brk.c
+++ b/libc/sysdeps/linux/arm/brk.c
@@ -21,6 +21,8 @@
#include <unistd.h>
#include <sys/syscall.h>
+libc_hidden_proto(brk)
+
/* This must be initialized data because commons can't have aliases. */
void *__curbrk = 0;
diff --git a/libc/sysdeps/linux/arm/ioperm.c b/libc/sysdeps/linux/arm/ioperm.c
index ed370d551..d85b98e43 100644
--- a/libc/sysdeps/linux/arm/ioperm.c
+++ b/libc/sysdeps/linux/arm/ioperm.c
@@ -47,6 +47,8 @@
#include <asm/page.h>
#include <sys/sysctl.h>
+libc_hidden_proto(ioperm)
+
libc_hidden_proto(readlink)
libc_hidden_proto(mmap)
libc_hidden_proto(sscanf)
@@ -212,7 +214,6 @@ int ioperm (unsigned long int from, unsigned long int num, int turn_on)
return 0;
}
-libc_hidden_proto(ioperm)
libc_hidden_def(ioperm)
diff --git a/libc/sysdeps/linux/bfin/brk.c b/libc/sysdeps/linux/bfin/brk.c
index 334bf6fc0..3b261697b 100644
--- a/libc/sysdeps/linux/bfin/brk.c
+++ b/libc/sysdeps/linux/bfin/brk.c
@@ -8,6 +8,8 @@
#include <sys/syscall.h>
#include <errno.h>
+libc_hidden_proto(brk)
+
/* This must be initialized data because commons can't have aliases. */
void * __curbrk = 0;
@@ -33,5 +35,4 @@ int brk (void *addr)
return 0;
}
-libc_hidden_proto(brk)
libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/bfin/clone.c b/libc/sysdeps/linux/bfin/clone.c
index 746da8e22..f326f00a0 100644
--- a/libc/sysdeps/linux/bfin/clone.c
+++ b/libc/sysdeps/linux/bfin/clone.c
@@ -1,11 +1,9 @@
/*
* libc/sysdeps/linux/bfin/clone.c -- `clone' syscall for linux/blackfin
*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License. See the file COPYING.LIB in the main
- * directory of this archive for more details.
- *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include <asm/unistd.h>
diff --git a/libc/sysdeps/linux/bfin/syscall.c b/libc/sysdeps/linux/bfin/syscall.c
index 6fe6cf2e6..c223f56a3 100644
--- a/libc/sysdeps/linux/bfin/syscall.c
+++ b/libc/sysdeps/linux/bfin/syscall.c
@@ -2,21 +2,9 @@
/* syscall for blackfin/uClibc
*
* Copyright (C) 2004 by Analog Devices Inc.
- * Copyright (C) 2002 by Erik Andersen <andersen@uclibc.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include <features.h>
diff --git a/libc/sysdeps/linux/bfin/vfork.S b/libc/sysdeps/linux/bfin/vfork.S
index 694265b7a..23ebfb806 100644
--- a/libc/sysdeps/linux/bfin/vfork.S
+++ b/libc/sysdeps/linux/bfin/vfork.S
@@ -1,13 +1,16 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
#include <features.h>
#include <asm/unistd.h>
.text
.globl _vfork
- .globl __libc_vfork
.type _vfork,STT_FUNC;
.align 4
-__libc_vfork:
_vfork:
p0 = __NR_vfork;
excpt 0;
rts;
-libc_hidden_def(_vfork)
diff --git a/libc/sysdeps/linux/common/__rt_sigtimedwait.c b/libc/sysdeps/linux/common/__rt_sigtimedwait.c
index 43c6b6517..f27c0e000 100644
--- a/libc/sysdeps/linux/common/__rt_sigtimedwait.c
+++ b/libc/sysdeps/linux/common/__rt_sigtimedwait.c
@@ -2,15 +2,19 @@
/*
* __rt_sigtimedwait() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <signal.h>
#define __need_NULL
#include <stddef.h>
+
+libc_hidden_proto(sigwaitinfo)
+libc_hidden_proto(sigtimedwait)
+
#ifdef __NR_rt_sigtimedwait
#define __NR___rt_sigtimedwait __NR_rt_sigtimedwait
static _syscall4(int, __rt_sigtimedwait, const sigset_t *, set, siginfo_t *, info,
@@ -46,7 +50,5 @@ int sigtimedwait(const sigset_t * set, siginfo_t * info,
return -1;
}
#endif
-libc_hidden_proto(sigwaitinfo)
libc_hidden_def(sigwaitinfo)
-libc_hidden_proto(sigtimedwait)
libc_hidden_def(sigtimedwait)
diff --git a/libc/sysdeps/linux/common/__socketcall.c b/libc/sysdeps/linux/common/__socketcall.c
index 48a083c3a..3e20f54f8 100644
--- a/libc/sysdeps/linux/common/__socketcall.c
+++ b/libc/sysdeps/linux/common/__socketcall.c
@@ -2,9 +2,9 @@
/*
* __socketcall() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/__syscall_fcntl.c b/libc/sysdeps/linux/common/__syscall_fcntl.c
index 19be50fc1..ab0e5e6fa 100644
--- a/libc/sysdeps/linux/common/__syscall_fcntl.c
+++ b/libc/sysdeps/linux/common/__syscall_fcntl.c
@@ -2,7 +2,7 @@
/*
* __syscall_fcntl() for uClibc
*
- * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
@@ -12,6 +12,9 @@
#include <fcntl.h>
#include <bits/wordsize.h>
+extern int __libc_fcntl(int fd, int cmd, ...);
+libc_hidden_proto(__libc_fcntl)
+
#if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
extern int __libc_fcntl64(int fd, int cmd, ...);
libc_hidden_proto(__libc_fcntl64)
@@ -43,7 +46,6 @@ int __libc_fcntl(int fd, int cmd, ...)
return (__syscall_fcntl(fd, cmd, arg));
}
-libc_hidden_proto(__libc_fcntl)
libc_hidden_def(__libc_fcntl)
strong_alias(__libc_fcntl,fcntl)
diff --git a/libc/sysdeps/linux/common/__syscall_fcntl64.c b/libc/sysdeps/linux/common/__syscall_fcntl64.c
index 759ba949f..06aef210d 100644
--- a/libc/sysdeps/linux/common/__syscall_fcntl64.c
+++ b/libc/sysdeps/linux/common/__syscall_fcntl64.c
@@ -2,7 +2,7 @@
/*
* __syscall_fcntl64() for uClibc
*
- * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
@@ -12,6 +12,9 @@
#include <fcntl.h>
#if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
+extern int __libc_fcntl64(int fd, int cmd, ...);
+libc_hidden_proto(__libc_fcntl64)
+
#define __NR___syscall_fcntl64 __NR_fcntl64
static inline _syscall3(int, __syscall_fcntl64, int, fd, int, cmd, long, arg);
int __libc_fcntl64(int fd, int cmd, ...)
@@ -25,7 +28,6 @@ int __libc_fcntl64(int fd, int cmd, ...)
va_end(list);
return (__syscall_fcntl64(fd, cmd, arg));
}
-libc_hidden_proto(__libc_fcntl64)
libc_hidden_def(__libc_fcntl64)
strong_alias(__libc_fcntl64,fcntl64)
diff --git a/libc/sysdeps/linux/common/__syscall_ipc.c b/libc/sysdeps/linux/common/__syscall_ipc.c
index b19637e40..6d1bb4b80 100644
--- a/libc/sysdeps/linux/common/__syscall_ipc.c
+++ b/libc/sysdeps/linux/common/__syscall_ipc.c
@@ -2,9 +2,9 @@
/*
* __syscall_ipc() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/__syscall_rt_sigaction.c b/libc/sysdeps/linux/common/__syscall_rt_sigaction.c
index be7709040..598761f01 100644
--- a/libc/sysdeps/linux/common/__syscall_rt_sigaction.c
+++ b/libc/sysdeps/linux/common/__syscall_rt_sigaction.c
@@ -2,9 +2,9 @@
/*
* __syscall_rt_sigaction() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
@@ -17,5 +17,4 @@
attribute_hidden _syscall4(int, __syscall_rt_sigaction, int, signum,
const struct sigaction *, act, struct sigaction *, oldact,
size_t, size);
-
#endif
diff --git a/libc/sysdeps/linux/common/__syscall_sigaction.c b/libc/sysdeps/linux/common/__syscall_sigaction.c
index 4333a6a1a..bb04b85bb 100644
--- a/libc/sysdeps/linux/common/__syscall_sigaction.c
+++ b/libc/sysdeps/linux/common/__syscall_sigaction.c
@@ -2,9 +2,9 @@
/*
* __syscall_sigaction() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/_exit.c b/libc/sysdeps/linux/common/_exit.c
index a708fad90..d86aca009 100644
--- a/libc/sysdeps/linux/common/_exit.c
+++ b/libc/sysdeps/linux/common/_exit.c
@@ -2,30 +2,20 @@
/*
* exit syscall for uClibc
*
- * Copyright (C) 2002 by Erik Andersen <andersen@codepoet.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define _GNU_SOURCE
#include <features.h>
#include <errno.h>
+#include <unistd.h>
#include <sys/types.h>
#include <sys/syscall.h>
+libc_hidden_proto(_exit)
+
#ifndef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) __syscall_exit (args)
#define __NR___syscall_exit __NR_exit
@@ -38,5 +28,4 @@ void attribute_noreturn _exit(int status)
while(1)
INLINE_SYSCALL(exit, 1, status);
}
-libc_hidden_proto(_exit)
libc_hidden_def(_exit)
diff --git a/libc/sysdeps/linux/common/access.c b/libc/sysdeps/linux/common/access.c
index 6ac237e83..0b8c3fe3a 100644
--- a/libc/sysdeps/linux/common/access.c
+++ b/libc/sysdeps/linux/common/access.c
@@ -2,9 +2,9 @@
/*
* access() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/acct.c b/libc/sysdeps/linux/common/acct.c
index 878c4ec75..5c64623fb 100644
--- a/libc/sysdeps/linux/common/acct.c
+++ b/libc/sysdeps/linux/common/acct.c
@@ -2,9 +2,9 @@
/*
* acct() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/adjtimex.c b/libc/sysdeps/linux/common/adjtimex.c
index a6c9be2b8..f6cfda9cb 100644
--- a/libc/sysdeps/linux/common/adjtimex.c
+++ b/libc/sysdeps/linux/common/adjtimex.c
@@ -2,15 +2,16 @@
/*
* adjtimex() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <sys/timex.h>
-_syscall1(int, adjtimex, struct timex *, buf);
libc_hidden_proto(adjtimex)
+
+_syscall1(int, adjtimex, struct timex *, buf);
libc_hidden_def(adjtimex)
strong_alias(adjtimex,ntp_adjtime)
diff --git a/libc/sysdeps/linux/common/alarm.c b/libc/sysdeps/linux/common/alarm.c
index 6089a50cf..4179d3416 100644
--- a/libc/sysdeps/linux/common/alarm.c
+++ b/libc/sysdeps/linux/common/alarm.c
@@ -2,13 +2,16 @@
/*
* alarm() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
+
+libc_hidden_proto(alarm)
+
#ifdef __NR_alarm
#define __NR___alarm __NR_alarm
_syscall1(unsigned int, alarm, unsigned int, seconds);
@@ -36,5 +39,4 @@ unsigned int alarm(unsigned int seconds)
return retval;
}
#endif
-libc_hidden_proto(alarm)
libc_hidden_def(alarm)
diff --git a/libc/sysdeps/linux/common/bdflush.c b/libc/sysdeps/linux/common/bdflush.c
index f272c961c..9d3118875 100644
--- a/libc/sysdeps/linux/common/bdflush.c
+++ b/libc/sysdeps/linux/common/bdflush.c
@@ -2,9 +2,9 @@
/*
* bdflush() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/capget.c b/libc/sysdeps/linux/common/capget.c
index e63cfa821..4cdd7c210 100644
--- a/libc/sysdeps/linux/common/capget.c
+++ b/libc/sysdeps/linux/common/capget.c
@@ -2,18 +2,18 @@
/*
* capget() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
-# ifdef __NR_capget
+#ifdef __NR_capget
_syscall2(int, capget, void *, header, void *, data);
-# else
+#else
int capget(void *header, void *data)
{
__set_errno(ENOSYS);
return -1;
}
-# endif
+#endif
diff --git a/libc/sysdeps/linux/common/capset.c b/libc/sysdeps/linux/common/capset.c
index 166de85e4..77b7ad9cb 100644
--- a/libc/sysdeps/linux/common/capset.c
+++ b/libc/sysdeps/linux/common/capset.c
@@ -2,18 +2,18 @@
/*
* capset() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
-# ifdef __NR_capset
+#ifdef __NR_capset
_syscall2(int, capset, void *, header, const void *, data);
-# else
+#else
int capset(void *header, const void *data)
{
__set_errno(ENOSYS);
return -1;
}
-# endif
+#endif
diff --git a/libc/sysdeps/linux/common/chdir.c b/libc/sysdeps/linux/common/chdir.c
index 230f86eb9..7afccf20c 100644
--- a/libc/sysdeps/linux/common/chdir.c
+++ b/libc/sysdeps/linux/common/chdir.c
@@ -2,20 +2,22 @@
/*
* chdir() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <string.h>
+#include <unistd.h>
#include <sys/param.h>
+libc_hidden_proto(chdir)
+
#define __NR___syscall_chdir __NR_chdir
static inline _syscall1(int, __syscall_chdir, const char *, path);
int chdir(const char *path)
{
return __syscall_chdir(path);
}
-libc_hidden_proto(chdir)
libc_hidden_def(chdir)
diff --git a/libc/sysdeps/linux/common/chmod.c b/libc/sysdeps/linux/common/chmod.c
index d6be1e130..03438c054 100644
--- a/libc/sysdeps/linux/common/chmod.c
+++ b/libc/sysdeps/linux/common/chmod.c
@@ -2,14 +2,16 @@
/*
* chmod() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <sys/stat.h>
+libc_hidden_proto(chmod)
+
#define __NR___syscall_chmod __NR_chmod
static inline _syscall2(int, __syscall_chmod, const char *, path, __kernel_mode_t, mode);
@@ -17,5 +19,4 @@ int chmod(const char *path, mode_t mode)
{
return __syscall_chmod(path, mode);
}
-libc_hidden_proto(chmod)
libc_hidden_def(chmod)
diff --git a/libc/sysdeps/linux/common/chown.c b/libc/sysdeps/linux/common/chown.c
index c017e6f73..8ca955de5 100644
--- a/libc/sysdeps/linux/common/chown.c
+++ b/libc/sysdeps/linux/common/chown.c
@@ -2,9 +2,9 @@
/*
* chown() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/chroot.c b/libc/sysdeps/linux/common/chroot.c
index 462ec77fb..fcf2adac2 100644
--- a/libc/sysdeps/linux/common/chroot.c
+++ b/libc/sysdeps/linux/common/chroot.c
@@ -2,9 +2,9 @@
/*
* chroot() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/clock_getres.c b/libc/sysdeps/linux/common/clock_getres.c
index 985426444..41d5079b9 100644
--- a/libc/sysdeps/linux/common/clock_getres.c
+++ b/libc/sysdeps/linux/common/clock_getres.c
@@ -2,21 +2,9 @@
* clock_getres() for uClibc
*
* Copyright (C) 2005 by Peter Kjellerstedt <pkj@axis.com>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define _GNU_SOURCE
diff --git a/libc/sysdeps/linux/common/clock_gettime.c b/libc/sysdeps/linux/common/clock_gettime.c
index e72432b3c..703399406 100644
--- a/libc/sysdeps/linux/common/clock_gettime.c
+++ b/libc/sysdeps/linux/common/clock_gettime.c
@@ -3,21 +3,9 @@
*
* Copyright (C) 2003 by Justus Pendleton <uc@ryoohki.net>
* Copyright (C) 2005 by Peter Kjellerstedt <pkj@axis.com>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define _GNU_SOURCE
diff --git a/libc/sysdeps/linux/common/clock_settime.c b/libc/sysdeps/linux/common/clock_settime.c
index 88d5df93e..93e1b72a7 100644
--- a/libc/sysdeps/linux/common/clock_settime.c
+++ b/libc/sysdeps/linux/common/clock_settime.c
@@ -2,21 +2,9 @@
* clock_settime() for uClibc
*
* Copyright (C) 2005 by Peter Kjellerstedt <pkj@axis.com>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define _GNU_SOURCE
diff --git a/libc/sysdeps/linux/common/close.c b/libc/sysdeps/linux/common/close.c
index 38381a223..7e5c7e5f7 100644
--- a/libc/sysdeps/linux/common/close.c
+++ b/libc/sysdeps/linux/common/close.c
@@ -2,9 +2,9 @@
/*
* close() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/cmsg_nxthdr.c b/libc/sysdeps/linux/common/cmsg_nxthdr.c
index a2352efe4..ce6a298c0 100644
--- a/libc/sysdeps/linux/common/cmsg_nxthdr.c
+++ b/libc/sysdeps/linux/common/cmsg_nxthdr.c
@@ -21,6 +21,8 @@
#include <features.h>
#include <sys/socket.h>
+libc_hidden_proto(__cmsg_nxthdr)
+
struct cmsghdr *
__cmsg_nxthdr (struct msghdr *mhdr, struct cmsghdr *cmsg)
{
@@ -38,5 +40,4 @@ __cmsg_nxthdr (struct msghdr *mhdr, struct cmsghdr *cmsg)
return NULL;
return cmsg;
}
-libc_hidden_proto(__cmsg_nxthdr)
libc_hidden_def(__cmsg_nxthdr)
diff --git a/libc/sysdeps/linux/common/create_module.c b/libc/sysdeps/linux/common/create_module.c
index 5a604d0dc..7bd38a39c 100644
--- a/libc/sysdeps/linux/common/create_module.c
+++ b/libc/sysdeps/linux/common/create_module.c
@@ -2,22 +2,7 @@
/* Syscalls for uClibc
*
* Copyright (C) 2000 by Lineo, inc. and Erik Andersen
- * Copyright (C) 2000,2001 by Erik Andersen <andersen@uclibc.org>
- * Written by Erik Andersen <andersen@uclibc.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*/
#include <errno.h>
@@ -26,7 +11,6 @@
#include <sys/types.h>
#include <sys/syscall.h>
-
#ifdef __NR_create_module
#if defined(__i386__) || defined(__m68k__) || defined(__arm__) || defined(__thumb__) || defined(__cris__) || defined(__i960__)
diff --git a/libc/sysdeps/linux/common/delete_module.c b/libc/sysdeps/linux/common/delete_module.c
index d31f885bc..96f5ab492 100644
--- a/libc/sysdeps/linux/common/delete_module.c
+++ b/libc/sysdeps/linux/common/delete_module.c
@@ -1,10 +1,9 @@
/* vi: set sw=4 ts=4: */
/*
* delete_module() for uClibc
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
- *
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/dup.c b/libc/sysdeps/linux/common/dup.c
index 86c91ac8e..01b467639 100644
--- a/libc/sysdeps/linux/common/dup.c
+++ b/libc/sysdeps/linux/common/dup.c
@@ -1,10 +1,9 @@
/* vi: set sw=4 ts=4: */
/*
* dup() for uClibc
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
- *
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/dup2.c b/libc/sysdeps/linux/common/dup2.c
index c7bd115aa..27d837608 100644
--- a/libc/sysdeps/linux/common/dup2.c
+++ b/libc/sysdeps/linux/common/dup2.c
@@ -2,13 +2,15 @@
/*
* dup2() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
-_syscall2(int, dup2, int, oldfd, int, newfd);
+
libc_hidden_proto(dup2)
+
+_syscall2(int, dup2, int, oldfd, int, newfd);
libc_hidden_def(dup2)
diff --git a/libc/sysdeps/linux/common/epoll.c b/libc/sysdeps/linux/common/epoll.c
index 27a9fc526..b867a98b6 100644
--- a/libc/sysdeps/linux/common/epoll.c
+++ b/libc/sysdeps/linux/common/epoll.c
@@ -2,9 +2,9 @@
/*
* epoll_create() / epoll_ctl() / epoll_wait() for uClibc
*
- * Copyright (C) 2005 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/execve.c b/libc/sysdeps/linux/common/execve.c
index bbc7b1dec..4e97795b4 100644
--- a/libc/sysdeps/linux/common/execve.c
+++ b/libc/sysdeps/linux/common/execve.c
@@ -2,9 +2,9 @@
/*
* execve() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
@@ -12,6 +12,8 @@
#include <string.h>
#include <sys/param.h>
+libc_hidden_proto(execve)
+
#define __NR___syscall_execve __NR_execve
static inline _syscall3(int, __syscall_execve, const char *, filename,
char *const *, argv, char *const *, envp);
@@ -20,5 +22,4 @@ int execve(const char * filename, char *const * argv, char *const * envp)
{
return __syscall_execve(filename, argv, envp);
}
-libc_hidden_proto(execve)
libc_hidden_def(execve)
diff --git a/libc/sysdeps/linux/common/fchdir.c b/libc/sysdeps/linux/common/fchdir.c
index 3da6e1d58..1c59bac00 100644
--- a/libc/sysdeps/linux/common/fchdir.c
+++ b/libc/sysdeps/linux/common/fchdir.c
@@ -2,13 +2,15 @@
/*
* fchdir() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
-_syscall1(int, fchdir, int, fd);
+
libc_hidden_proto(fchdir)
+
+_syscall1(int, fchdir, int, fd);
libc_hidden_def(fchdir)
diff --git a/libc/sysdeps/linux/common/fchmod.c b/libc/sysdeps/linux/common/fchmod.c
index 70c8eb571..f1eb170ce 100644
--- a/libc/sysdeps/linux/common/fchmod.c
+++ b/libc/sysdeps/linux/common/fchmod.c
@@ -2,9 +2,9 @@
/*
* fchmod() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/fdatasync.c b/libc/sysdeps/linux/common/fdatasync.c
index d98d9da5e..fbac46ae4 100644
--- a/libc/sysdeps/linux/common/fdatasync.c
+++ b/libc/sysdeps/linux/common/fdatasync.c
@@ -2,9 +2,9 @@
/*
* fdatasync() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/flock.c b/libc/sysdeps/linux/common/flock.c
index 53370654e..c08783ca9 100644
--- a/libc/sysdeps/linux/common/flock.c
+++ b/libc/sysdeps/linux/common/flock.c
@@ -2,9 +2,9 @@
/*
* flock() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/fork.c b/libc/sysdeps/linux/common/fork.c
index 23c6fedff..e8d16fe17 100644
--- a/libc/sysdeps/linux/common/fork.c
+++ b/libc/sysdeps/linux/common/fork.c
@@ -2,9 +2,9 @@
/*
* fork() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/fstat.c b/libc/sysdeps/linux/common/fstat.c
index 0a8c81df6..be822d1a1 100644
--- a/libc/sysdeps/linux/common/fstat.c
+++ b/libc/sysdeps/linux/common/fstat.c
@@ -2,12 +2,12 @@
/*
* fstat() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
-/* need to hide the 64bit prototype or the weak_alias()
+/* need to hide the 64bit prototype or the strong_alias()
* will fail when __NR_fstat64 doesnt exist */
#define fstat64 __hidefstat64
@@ -18,8 +18,9 @@
#undef fstat64
+libc_hidden_proto(fstat)
+
#define __NR___syscall_fstat __NR_fstat
-#undef fstat
static inline _syscall2(int, __syscall_fstat, int, fd, struct kernel_stat *, buf);
int fstat(int fd, struct stat *buf)
@@ -33,7 +34,6 @@ int fstat(int fd, struct stat *buf)
}
return result;
}
-libc_hidden_proto(fstat)
libc_hidden_def(fstat)
#if ! defined __NR_fstat64 && defined __UCLIBC_HAS_LFS__
diff --git a/libc/sysdeps/linux/common/fstat64.c b/libc/sysdeps/linux/common/fstat64.c
index fc91cbaf9..f992de20a 100644
--- a/libc/sysdeps/linux/common/fstat64.c
+++ b/libc/sysdeps/linux/common/fstat64.c
@@ -2,19 +2,21 @@
/*
* fstat64() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#if defined __UCLIBC_HAS_LFS__ && defined __NR_fstat64
-#define __NR___syscall_fstat64 __NR_fstat64
#include <unistd.h>
#include <sys/stat.h>
#include "xstatconv.h"
+libc_hidden_proto(fstat64)
+
+#define __NR___syscall_fstat64 __NR_fstat64
static inline _syscall2(int, __syscall_fstat64,
int, filedes, struct kernel_stat64 *, buf);
@@ -29,7 +31,5 @@ int fstat64(int fd, struct stat64 *buf)
}
return result;
}
-libc_hidden_proto(fstat64)
libc_hidden_def(fstat64)
-
-#endif /* __UCLIBC_HAS_LFS__ */
+#endif
diff --git a/libc/sysdeps/linux/common/fstatfs.c b/libc/sysdeps/linux/common/fstatfs.c
index c88162e6d..2a90a38ed 100644
--- a/libc/sysdeps/linux/common/fstatfs.c
+++ b/libc/sysdeps/linux/common/fstatfs.c
@@ -2,13 +2,15 @@
/*
* fstatfs() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <sys/vfs.h>
-_syscall2(int, fstatfs, int, fd, struct statfs *, buf);
+
libc_hidden_proto(fstatfs)
+
+_syscall2(int, fstatfs, int, fd, struct statfs *, buf);
libc_hidden_def(fstatfs)
diff --git a/libc/sysdeps/linux/common/fsync.c b/libc/sysdeps/linux/common/fsync.c
index ab382bd87..d17186261 100644
--- a/libc/sysdeps/linux/common/fsync.c
+++ b/libc/sysdeps/linux/common/fsync.c
@@ -2,9 +2,9 @@
/*
* fsync() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/ftruncate.c b/libc/sysdeps/linux/common/ftruncate.c
index 1d4e62d26..8c342e7fc 100644
--- a/libc/sysdeps/linux/common/ftruncate.c
+++ b/libc/sysdeps/linux/common/ftruncate.c
@@ -2,13 +2,15 @@
/*
* ftruncate() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
-_syscall2(int, ftruncate, int, fd, __off_t, length);
+
libc_hidden_proto(ftruncate)
+
+_syscall2(int, ftruncate, int, fd, __off_t, length);
libc_hidden_def(ftruncate)
diff --git a/libc/sysdeps/linux/common/ftruncate64.c b/libc/sysdeps/linux/common/ftruncate64.c
index 5516f3b6f..ff732d432 100644
--- a/libc/sysdeps/linux/common/ftruncate64.c
+++ b/libc/sysdeps/linux/common/ftruncate64.c
@@ -1,67 +1,68 @@
/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ *
* ftruncate64 syscall. Copes with 64 bit and 32 bit machines
* and on 32 bit machines this sends things into the kernel as
* two 32-bit arguments (high and low 32 bits of length) that
* are ordered based on endianess. It turns out endian.h has
* just the macro we need to order things, __LONG_LONG_PAIR.
- *
- * Copyright (C) 2002 Erik Andersen <andersen@codepoet.org>
- *
- * This file is subject to the terms and conditions of the GNU
- * Lesser General Public License. See the file COPYING.LIB in
- * the main directory of this archive for more details.
*/
#include <features.h>
-#include <unistd.h>
-#include <errno.h>
-#include <endian.h>
-#include <stdint.h>
-#include <sys/types.h>
-#include <sys/syscall.h>
-#if defined __UCLIBC_HAS_LFS__
+#ifdef __UCLIBC_HAS_LFS__
+
+# include <unistd.h>
+# include <errno.h>
+# include <endian.h>
+# include <stdint.h>
+# include <sys/types.h>
+# include <sys/syscall.h>
+
+libc_hidden_proto(ftruncate64)
-#if defined __NR_ftruncate64
+# ifdef __NR_ftruncate64
-#if __WORDSIZE == 64
+# if __WORDSIZE == 64
/* For a 64 bit machine, life is simple... */
_syscall2(int, ftruncate64, int, fd, __off64_t, length);
-#elif __WORDSIZE == 32
+# elif __WORDSIZE == 32
-#ifndef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) __syscall_ftruncate64 (args)
-#define __NR___syscall_ftruncate64 __NR_ftruncate64
-#if defined(__powerpc__) || defined(__mips__)
+# ifndef INLINE_SYSCALL
+# define INLINE_SYSCALL(name, nr, args...) __syscall_ftruncate64 (args)
+# define __NR___syscall_ftruncate64 __NR_ftruncate64
+# if defined(__powerpc__) || defined(__mips__)
static inline _syscall4(int, __syscall_ftruncate64, int, fd, uint32_t, pad,
unsigned long, high_length, unsigned long, low_length);
-#else
+# else
static inline _syscall3(int, __syscall_ftruncate64, int, fd,
unsigned long, high_length, unsigned long, low_length);
-#endif
-#endif
+# endif
+# endif
/* The exported ftruncate64 function. */
int ftruncate64 (int fd, __off64_t length)
{
uint32_t low = length & 0xffffffff;
uint32_t high = length >> 32;
-#if defined(__powerpc__) || defined(__mips__)
+# if defined(__powerpc__) || defined(__mips__)
return INLINE_SYSCALL(ftruncate64,
4, fd, 0, __LONG_LONG_PAIR (high, low));
-#else
+# else
return INLINE_SYSCALL(ftruncate64, 3, fd,
__LONG_LONG_PAIR (high, low));
-#endif
+# endif
}
-#else /* __WORDSIZE */
-#error Your machine is not 64 bit or 32 bit, I am dazed and confused.
-#endif /* __WORDSIZE */
+# else /* __WORDSIZE */
+# error Your machine is not 64 bit or 32 bit, I am dazed and confused.
+# endif /* __WORDSIZE */
-#else /* __NR_ftruncate64 */
+# else /* __NR_ftruncate64 */
libc_hidden_proto(ftruncate)
@@ -78,6 +79,7 @@ int ftruncate64 (int fd, __off64_t length)
return -1;
}
-#endif /* __NR_ftruncate64 */
+# endif /* __NR_ftruncate64 */
+libc_hidden_def(ftruncate64)
#endif /* __UCLIBC_HAS_LFS__ */
diff --git a/libc/sysdeps/linux/common/get_kernel_syms.c b/libc/sysdeps/linux/common/get_kernel_syms.c
index a1ab3a552..d00152686 100644
--- a/libc/sysdeps/linux/common/get_kernel_syms.c
+++ b/libc/sysdeps/linux/common/get_kernel_syms.c
@@ -2,9 +2,9 @@
/*
* get_kernel_syms() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/getcwd.c b/libc/sysdeps/linux/common/getcwd.c
index 63b195ec2..a9042c76b 100644
--- a/libc/sysdeps/linux/common/getcwd.c
+++ b/libc/sysdeps/linux/common/getcwd.c
@@ -11,8 +11,11 @@
#include <sys/stat.h>
#include <dirent.h>
#include <string.h>
+#include <unistd.h>
#include <sys/syscall.h>
+libc_hidden_proto(getcwd)
+
libc_hidden_proto(strcat)
libc_hidden_proto(strcpy)
libc_hidden_proto(strncpy)
@@ -24,7 +27,7 @@ libc_hidden_proto(stat)
#ifdef __NR_getcwd
-#define __NR___syscall_getcwd __NR_getcwd
+# define __NR___syscall_getcwd __NR_getcwd
static inline
_syscall2(int, __syscall_getcwd, char *, buf, unsigned long, size);
@@ -49,18 +52,18 @@ static char *search_dir(dev_t this_dev, ino_t this_ino, char *path_buf, int path
int slen;
struct stat st;
-#ifdef FAST_DIR_SEARCH_POSSIBLE
+# ifdef FAST_DIR_SEARCH_POSSIBLE
/* The test is for ELKS lib 0.0.9, this should be fixed in the real kernel */
int slow_search = (sizeof(ino_t) != sizeof(d->d_ino));
-#endif
+# endif
if (stat(path_buf, &st) < 0) {
goto oops;
}
-#ifdef FAST_DIR_SEARCH_POSSIBLE
+# ifdef FAST_DIR_SEARCH_POSSIBLE
if (this_dev != st.st_dev)
slow_search = 1;
-#endif
+# endif
slen = strlen(path_buf);
ptr = path_buf + slen - 1;
@@ -79,9 +82,9 @@ static char *search_dir(dev_t this_dev, ino_t this_ino, char *path_buf, int path
}
while ((d = readdir(dp)) != 0) {
-#ifdef FAST_DIR_SEARCH_POSSIBLE
+# ifdef FAST_DIR_SEARCH_POSSIBLE
if (slow_search || this_ino == d->d_ino) {
-#endif
+# endif
if (slen + strlen(d->d_name) > path_size) {
goto oops;
}
@@ -92,9 +95,9 @@ static char *search_dir(dev_t this_dev, ino_t this_ino, char *path_buf, int path
closedir(dp);
return path_buf;
}
-#ifdef FAST_DIR_SEARCH_POSSIBLE
+# ifdef FAST_DIR_SEARCH_POSSIBLE
}
-#endif
+# endif
}
closedir(dp);
@@ -166,7 +169,7 @@ int __syscall_getcwd(char * buf, unsigned long size)
return len;
}
-#endif
+#endif /* __NR_getcwd */
char *getcwd(char *buf, size_t size)
{
@@ -200,5 +203,4 @@ char *getcwd(char *buf, size_t size)
free (path);
return NULL;
}
-libc_hidden_proto(getcwd)
libc_hidden_def(getcwd)
diff --git a/libc/sysdeps/linux/common/getdents.c b/libc/sysdeps/linux/common/getdents.c
index 4b85d2c62..f54344d31 100644
--- a/libc/sysdeps/linux/common/getdents.c
+++ b/libc/sysdeps/linux/common/getdents.c
@@ -1,20 +1,8 @@
-/* Copyright (C) 1993, 1995-2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <alloca.h>
#include <assert.h>
@@ -32,7 +20,7 @@ libc_hidden_proto(memcpy)
libc_hidden_proto(lseek)
#ifndef offsetof
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
struct kernel_dirent
@@ -46,7 +34,6 @@ struct kernel_dirent
#define __NR___syscall_getdents __NR_getdents
static inline _syscall3(int, __syscall_getdents, int, fd, unsigned char *, kdirp, size_t, count);
-
ssize_t attribute_hidden __getdents (int fd, char *buf, size_t nbytes)
{
struct dirent *dp;
diff --git a/libc/sysdeps/linux/common/getdents64.c b/libc/sysdeps/linux/common/getdents64.c
index c734fbbb6..9452b94bd 100644
--- a/libc/sysdeps/linux/common/getdents64.c
+++ b/libc/sysdeps/linux/common/getdents64.c
@@ -1,20 +1,8 @@
-/* Copyright (C) 1993, 1995-2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <features.h>
#include <alloca.h>
@@ -29,14 +17,14 @@
#include <sys/types.h>
#include <sys/syscall.h>
+#if defined __UCLIBC_HAS_LFS__ && defined __NR_getdents64
+
libc_hidden_proto(memcpy)
libc_hidden_proto(lseek64)
-#if defined __UCLIBC_HAS_LFS__ && defined __NR_getdents64
-
-#ifndef offsetof
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-#endif
+# ifndef offsetof
+# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+# endif
struct kernel_dirent64
{
@@ -48,10 +36,9 @@ struct kernel_dirent64
};
-#define __NR___syscall_getdents64 __NR_getdents64
+# define __NR___syscall_getdents64 __NR_getdents64
static inline _syscall3(int, __syscall_getdents64, int, fd, unsigned char *, dirp, size_t, count);
-
ssize_t attribute_hidden __getdents64 (int fd, char *buf, size_t nbytes)
{
struct dirent64 *dp;
diff --git a/libc/sysdeps/linux/common/getdnnm.c b/libc/sysdeps/linux/common/getdnnm.c
index 04077b197..ab33dc01a 100644
--- a/libc/sysdeps/linux/common/getdnnm.c
+++ b/libc/sysdeps/linux/common/getdnnm.c
@@ -11,6 +11,8 @@
#define __USE_GNU
#include <sys/utsname.h>
+libc_hidden_proto(getdomainname)
+
libc_hidden_proto(strlen)
libc_hidden_proto(strcpy)
libc_hidden_proto(uname)
@@ -34,5 +36,4 @@ getdomainname(char *name, size_t len)
strcpy(name, uts.domainname);
return 0;
}
-libc_hidden_proto(getdomainname)
libc_hidden_def(getdomainname)
diff --git a/libc/sysdeps/linux/common/getdtablesize.c b/libc/sysdeps/linux/common/getdtablesize.c
index 4408273b7..4efd8280d 100644
--- a/libc/sysdeps/linux/common/getdtablesize.c
+++ b/libc/sysdeps/linux/common/getdtablesize.c
@@ -1,26 +1,16 @@
-/* Copyright (C) 1991, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <stdlib.h>
#include <unistd.h>
#include <sys/resource.h>
#include <limits.h>
+libc_hidden_proto(getdtablesize)
+
libc_hidden_proto(getrlimit)
#define __LOCAL_OPEN_MAX 256
@@ -36,5 +26,4 @@ int getdtablesize (void)
returns -1. */
return getrlimit (RLIMIT_NOFILE, &ru) < 0 ? __LOCAL_OPEN_MAX : ru.rlim_cur;
}
-libc_hidden_proto(getdtablesize)
libc_hidden_def(getdtablesize)
diff --git a/libc/sysdeps/linux/common/getegid.c b/libc/sysdeps/linux/common/getegid.c
index 4379ddd0b..ff28c51b7 100644
--- a/libc/sysdeps/linux/common/getegid.c
+++ b/libc/sysdeps/linux/common/getegid.c
@@ -2,14 +2,16 @@
/*
* getegid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
+libc_hidden_proto(getegid)
+
#ifdef __NR_getegid
#define __NR___syscall_getegid __NR_getegid
static inline _syscall0(int, __syscall_getegid);
@@ -25,5 +27,4 @@ gid_t getegid(void)
return (getgid());
}
#endif
-libc_hidden_proto(getegid)
libc_hidden_def(getegid)
diff --git a/libc/sysdeps/linux/common/geteuid.c b/libc/sysdeps/linux/common/geteuid.c
index c267d1483..819a1d65f 100644
--- a/libc/sysdeps/linux/common/geteuid.c
+++ b/libc/sysdeps/linux/common/geteuid.c
@@ -2,14 +2,16 @@
/*
* geteuid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
+libc_hidden_proto(geteuid)
+
#ifdef __NR_geteuid
#define __NR___syscall_geteuid __NR_geteuid
static inline _syscall0(int, __syscall_geteuid);
@@ -25,5 +27,4 @@ uid_t geteuid(void)
return (getuid());
}
#endif
-libc_hidden_proto(geteuid)
libc_hidden_def(geteuid)
diff --git a/libc/sysdeps/linux/common/getgid.c b/libc/sysdeps/linux/common/getgid.c
index 48c9af17c..ccaed306a 100644
--- a/libc/sysdeps/linux/common/getgid.c
+++ b/libc/sysdeps/linux/common/getgid.c
@@ -2,14 +2,16 @@
/*
* getgid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
+libc_hidden_proto(getgid)
+
#define __NR___syscall_getgid __NR_getgid
#if defined (__alpha__)
#define __NR_getgid __NR_getxgid
@@ -20,5 +22,4 @@ gid_t getgid(void)
{
return (__syscall_getgid());
}
-libc_hidden_proto(getgid)
libc_hidden_def(getgid)
diff --git a/libc/sysdeps/linux/common/getgroups.c b/libc/sysdeps/linux/common/getgroups.c
index 081f001f1..a922b7cd6 100644
--- a/libc/sysdeps/linux/common/getgroups.c
+++ b/libc/sysdeps/linux/common/getgroups.c
@@ -2,9 +2,9 @@
/*
* getgroups() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
@@ -12,6 +12,8 @@
#include <unistd.h>
#include <grp.h>
+libc_hidden_proto(getgroups)
+
libc_hidden_proto(sysconf)
#define MIN(a,b) (((a)<(b))?(a):(b))
@@ -47,5 +49,4 @@ ret_error:
return ngids;
}
}
-libc_hidden_proto(getgroups)
libc_hidden_def(getgroups)
diff --git a/libc/sysdeps/linux/common/gethstnm.c b/libc/sysdeps/linux/common/gethstnm.c
index c932d239c..fc5a72c8d 100644
--- a/libc/sysdeps/linux/common/gethstnm.c
+++ b/libc/sysdeps/linux/common/gethstnm.c
@@ -9,6 +9,8 @@
#include <sys/utsname.h>
#include <errno.h>
+libc_hidden_proto(gethostname)
+
libc_hidden_proto(strlen)
libc_hidden_proto(strcpy)
libc_hidden_proto(uname)
@@ -32,5 +34,4 @@ gethostname(char *name, size_t len)
strcpy(name, uts.nodename);
return 0;
}
-libc_hidden_proto(gethostname)
libc_hidden_def(gethostname)
diff --git a/libc/sysdeps/linux/common/getitimer.c b/libc/sysdeps/linux/common/getitimer.c
index a7bc89209..0d2024dfc 100644
--- a/libc/sysdeps/linux/common/getitimer.c
+++ b/libc/sysdeps/linux/common/getitimer.c
@@ -2,9 +2,9 @@
/*
* getitimer() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/getpgid.c b/libc/sysdeps/linux/common/getpgid.c
index adb8beb06..c71be810b 100644
--- a/libc/sysdeps/linux/common/getpgid.c
+++ b/libc/sysdeps/linux/common/getpgid.c
@@ -2,9 +2,9 @@
/*
* getpgid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/getpriority.c b/libc/sysdeps/linux/common/getpriority.c
index bde7a3d85..96156841b 100644
--- a/libc/sysdeps/linux/common/getpriority.c
+++ b/libc/sysdeps/linux/common/getpriority.c
@@ -2,14 +2,16 @@
/*
* getpriority() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <sys/resource.h>
+libc_hidden_proto(getpriority)
+
#define __NR___syscall_getpriority __NR_getpriority
static inline _syscall2(int, __syscall_getpriority,
__priority_which_t, which, id_t, who);
@@ -26,5 +28,4 @@ int getpriority(enum __priority_which which, id_t who)
res = PZERO - res;
return res;
}
-libc_hidden_proto(getpriority)
libc_hidden_def(getpriority)
diff --git a/libc/sysdeps/linux/common/getresgid.c b/libc/sysdeps/linux/common/getresgid.c
index a4b4e13c3..d6ad980a2 100644
--- a/libc/sysdeps/linux/common/getresgid.c
+++ b/libc/sysdeps/linux/common/getresgid.c
@@ -2,15 +2,15 @@
/*
* getresgid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#ifdef __NR_getresgid
-#define __NR___syscall_getresgid __NR_getresgid
+# define __NR___syscall_getresgid __NR_getresgid
static inline _syscall3(int, __syscall_getresgid, __kernel_gid_t *, egid,
__kernel_gid_t *, rgid, __kernel_gid_t *, sgid);
diff --git a/libc/sysdeps/linux/common/getresuid.c b/libc/sysdeps/linux/common/getresuid.c
index 98fdcc4cb..7e087d8dd 100644
--- a/libc/sysdeps/linux/common/getresuid.c
+++ b/libc/sysdeps/linux/common/getresuid.c
@@ -2,15 +2,15 @@
/*
* getresuid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#ifdef __NR_getresuid
-#define __NR___syscall_getresuid __NR_getresuid
+# define __NR___syscall_getresuid __NR_getresuid
static inline _syscall3(int, __syscall_getresuid, __kernel_uid_t *, ruid,
__kernel_uid_t *, euid, __kernel_uid_t *, suid);
diff --git a/libc/sysdeps/linux/common/getrlimit.c b/libc/sysdeps/linux/common/getrlimit.c
index 804410b34..70d038a76 100644
--- a/libc/sysdeps/linux/common/getrlimit.c
+++ b/libc/sysdeps/linux/common/getrlimit.c
@@ -2,17 +2,19 @@
/*
* getrlimit() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
#include <sys/resource.h>
+libc_hidden_proto(getrlimit)
+
#ifdef __NR_ugetrlimit
-#define __NR___ugetrlimit __NR_ugetrlimit
+# define __NR___ugetrlimit __NR_ugetrlimit
static inline
_syscall2(int, __ugetrlimit, enum __rlimit_resource, resource,
struct rlimit *, rlim);
@@ -24,7 +26,7 @@ int getrlimit(__rlimit_resource_t resource, struct rlimit *rlimits)
#else /* __NR_ugetrlimit */
/* Only include the old getrlimit if the new one (ugetrlimit) is not around */
-#define __NR___syscall_getrlimit __NR_getrlimit
+# define __NR___syscall_getrlimit __NR_getrlimit
static inline
_syscall2(int, __syscall_getrlimit, int, resource, struct rlimit *, rlim);
@@ -46,6 +48,4 @@ int getrlimit(__rlimit_resource_t resource, struct rlimit *rlimits)
return result;
}
#endif
-
-libc_hidden_proto(getrlimit)
libc_hidden_def(getrlimit)
diff --git a/libc/sysdeps/linux/common/getrusage.c b/libc/sysdeps/linux/common/getrusage.c
index c6aa5a95e..9b87cb1b4 100644
--- a/libc/sysdeps/linux/common/getrusage.c
+++ b/libc/sysdeps/linux/common/getrusage.c
@@ -2,9 +2,9 @@
/*
* getrusage() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/getsid.c b/libc/sysdeps/linux/common/getsid.c
index 91d327098..1a574441c 100644
--- a/libc/sysdeps/linux/common/getsid.c
+++ b/libc/sysdeps/linux/common/getsid.c
@@ -2,14 +2,16 @@
/*
* getsid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
+libc_hidden_proto(getsid)
+
#define __NR___syscall_getsid __NR_getsid
static inline _syscall1(__kernel_pid_t, __syscall_getsid, __kernel_pid_t, pid);
@@ -17,5 +19,4 @@ pid_t getsid(pid_t pid)
{
return (__syscall_getsid(pid));
}
-libc_hidden_proto(getsid)
libc_hidden_def(getsid)
diff --git a/libc/sysdeps/linux/common/gettimeofday.c b/libc/sysdeps/linux/common/gettimeofday.c
index 175691f89..2d8a6cb25 100644
--- a/libc/sysdeps/linux/common/gettimeofday.c
+++ b/libc/sysdeps/linux/common/gettimeofday.c
@@ -2,13 +2,15 @@
/*
* gettimeofday() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <sys/time.h>
-_syscall2(int, gettimeofday, struct timeval *, tv, struct timezone *, tz);
+
libc_hidden_proto(gettimeofday)
+
+_syscall2(int, gettimeofday, struct timeval *, tv, struct timezone *, tz);
libc_hidden_def(gettimeofday)
diff --git a/libc/sysdeps/linux/common/getuid.c b/libc/sysdeps/linux/common/getuid.c
index 610c34edc..6a06a78e4 100644
--- a/libc/sysdeps/linux/common/getuid.c
+++ b/libc/sysdeps/linux/common/getuid.c
@@ -2,14 +2,16 @@
/*
* getuid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
+libc_hidden_proto(getuid)
+
#if defined (__alpha__)
#define __NR_getuid __NR_getxuid
#endif
@@ -21,5 +23,4 @@ uid_t getuid(void)
{
return (__syscall_getuid());
}
-libc_hidden_proto(getuid)
libc_hidden_def(getuid)
diff --git a/libc/sysdeps/linux/common/init_module.c b/libc/sysdeps/linux/common/init_module.c
index 0065a74b8..558a59708 100644
--- a/libc/sysdeps/linux/common/init_module.c
+++ b/libc/sysdeps/linux/common/init_module.c
@@ -2,9 +2,9 @@
/*
* init_module() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/ioctl.c b/libc/sysdeps/linux/common/ioctl.c
index e9ea707ab..e8e3a1031 100644
--- a/libc/sysdeps/linux/common/ioctl.c
+++ b/libc/sysdeps/linux/common/ioctl.c
@@ -2,9 +2,9 @@
/*
* ioctl() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/ioperm.c b/libc/sysdeps/linux/common/ioperm.c
index 16c9eecfa..61794bb1b 100644
--- a/libc/sysdeps/linux/common/ioperm.c
+++ b/libc/sysdeps/linux/common/ioperm.c
@@ -2,9 +2,9 @@
/*
* ioperm() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/iopl.c b/libc/sysdeps/linux/common/iopl.c
index ab9513d9b..5d5cffb16 100644
--- a/libc/sysdeps/linux/common/iopl.c
+++ b/libc/sysdeps/linux/common/iopl.c
@@ -2,9 +2,9 @@
/*
* iopl() for uClibc
*
- * Copyright (C) 2000-2005 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/kill.c b/libc/sysdeps/linux/common/kill.c
index 2a6bfce8e..7e1b330a5 100644
--- a/libc/sysdeps/linux/common/kill.c
+++ b/libc/sysdeps/linux/common/kill.c
@@ -2,15 +2,16 @@
/*
* kill() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <signal.h>
-#undef kill
+libc_hidden_proto(kill)
+
#define __NR___syscall_kill __NR_kill
static inline _syscall2(int, __syscall_kill, __kernel_pid_t, pid, int, sig);
@@ -18,5 +19,4 @@ int kill(pid_t pid, int sig)
{
return (__syscall_kill(pid, sig));
}
-libc_hidden_proto(kill)
libc_hidden_def(kill)
diff --git a/libc/sysdeps/linux/common/klogctl.c b/libc/sysdeps/linux/common/klogctl.c
index acfeac59d..a77e4cb96 100644
--- a/libc/sysdeps/linux/common/klogctl.c
+++ b/libc/sysdeps/linux/common/klogctl.c
@@ -2,9 +2,9 @@
/*
* klogctl() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/lchown.c b/libc/sysdeps/linux/common/lchown.c
index 96fef52d0..ffee39126 100644
--- a/libc/sysdeps/linux/common/lchown.c
+++ b/libc/sysdeps/linux/common/lchown.c
@@ -2,9 +2,9 @@
/*
* lchown() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/link.c b/libc/sysdeps/linux/common/link.c
index 4035fcac6..21d1f1413 100644
--- a/libc/sysdeps/linux/common/link.c
+++ b/libc/sysdeps/linux/common/link.c
@@ -2,9 +2,9 @@
/*
* link() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/llseek.c b/libc/sysdeps/linux/common/llseek.c
index b48641a1a..7cfbce8ba 100644
--- a/libc/sysdeps/linux/common/llseek.c
+++ b/libc/sysdeps/linux/common/llseek.c
@@ -2,22 +2,9 @@
/*
* llseek/lseek64 syscall for uClibc
*
- * Copyright (C) 2002 by Erik Andersen <andersen@codepoet.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define _GNU_SOURCE
@@ -35,12 +22,12 @@
#if defined __NR__llseek && defined __UCLIBC_HAS_LFS__
-#ifndef INLINE_SYSCALL
-#define INLINE_SYSCALL(name, nr, args...) __syscall_llseek (args)
-#define __NR___syscall_llseek __NR__llseek
+# ifndef INLINE_SYSCALL
+# define INLINE_SYSCALL(name, nr, args...) __syscall_llseek (args)
+# define __NR___syscall_llseek __NR__llseek
static inline _syscall5(int, __syscall_llseek, int, fd, off_t, offset_hi,
off_t, offset_lo, loff_t *, result, int, whence);
-#endif
+# endif
loff_t __libc_lseek64(int fd, loff_t offset, int whence)
{
@@ -51,6 +38,7 @@ loff_t __libc_lseek64(int fd, loff_t offset, int whence)
#else
extern __off_t __libc_lseek(int fildes, off_t offset, int whence);
libc_hidden_proto(__libc_lseek)
+
loff_t __libc_lseek64(int fd, loff_t offset, int whence)
{
return(loff_t)(__libc_lseek(fd, (off_t) (offset), whence));
diff --git a/libc/sysdeps/linux/common/lseek.c b/libc/sysdeps/linux/common/lseek.c
index 2ed5e4a14..022d2f6a0 100644
--- a/libc/sysdeps/linux/common/lseek.c
+++ b/libc/sysdeps/linux/common/lseek.c
@@ -2,17 +2,19 @@
/*
* lseek() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
+extern __off_t __libc_lseek (int __fd, __off_t __offset, int __whence) __THROW;
+libc_hidden_proto(__libc_lseek)
+
#define __NR___libc_lseek __NR_lseek
_syscall3(__off_t, __libc_lseek, int, fildes, __off_t, offset, int, whence);
-libc_hidden_proto(__libc_lseek)
libc_hidden_def(__libc_lseek)
strong_alias(__libc_lseek,lseek)
diff --git a/libc/sysdeps/linux/common/lstat.c b/libc/sysdeps/linux/common/lstat.c
index 9509c489d..2c4a86b9d 100644
--- a/libc/sysdeps/linux/common/lstat.c
+++ b/libc/sysdeps/linux/common/lstat.c
@@ -2,9 +2,9 @@
/*
* lstat() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
/* need to hide the 64bit prototype or the weak_alias()
@@ -18,8 +18,9 @@
#undef lstat64
+libc_hidden_proto(lstat)
+
#define __NR___syscall_lstat __NR_lstat
-#undef lstat
static inline _syscall2(int, __syscall_lstat,
const char *, file_name, struct kernel_stat *, buf);
@@ -34,7 +35,6 @@ int lstat(const char *file_name, struct stat *buf)
}
return result;
}
-libc_hidden_proto(lstat)
libc_hidden_def(lstat)
#if ! defined __NR_lstat64 && defined __UCLIBC_HAS_LFS__
diff --git a/libc/sysdeps/linux/common/lstat64.c b/libc/sysdeps/linux/common/lstat64.c
index b56184f82..2dc06c692 100644
--- a/libc/sysdeps/linux/common/lstat64.c
+++ b/libc/sysdeps/linux/common/lstat64.c
@@ -2,19 +2,21 @@
/*
* lstat64() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#if defined __UCLIBC_HAS_LFS__ && defined __NR_lstat64
-#include <unistd.h>
-#include <sys/stat.h>
-#include "xstatconv.h"
+# include <unistd.h>
+# include <sys/stat.h>
+# include "xstatconv.h"
-#define __NR___syscall_lstat64 __NR_lstat64
+libc_hidden_proto(lstat64)
+
+# define __NR___syscall_lstat64 __NR_lstat64
static inline _syscall2(int, __syscall_lstat64, const char *, file_name,
struct kernel_stat64 *, buf);
@@ -29,7 +31,6 @@ int lstat64(const char *file_name, struct stat64 *buf)
}
return result;
}
-libc_hidden_proto(lstat64)
libc_hidden_def(lstat64)
-#endif /* __UCLIBC_HAS_LFS__ */
+#endif
diff --git a/libc/sysdeps/linux/common/madvise.c b/libc/sysdeps/linux/common/madvise.c
index bdea24c66..fa4f38046 100644
--- a/libc/sysdeps/linux/common/madvise.c
+++ b/libc/sysdeps/linux/common/madvise.c
@@ -2,9 +2,9 @@
/*
* madvise() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/mincore.c b/libc/sysdeps/linux/common/mincore.c
index ecae441a5..530f7b67d 100644
--- a/libc/sysdeps/linux/common/mincore.c
+++ b/libc/sysdeps/linux/common/mincore.c
@@ -1,10 +1,9 @@
-/*
- * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvs/uClibc/libc/sysdeps/linux/common/mincore.c,v 1.1 2004/12/20 00:10:51 solar Exp $
- *
+/*
* This file provides the mincore() system call to uClibc.
- * 20041215 - <solar@gentoo.org>
+ * Copyright (C) 20041215 - <solar@gentoo.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/mkdir.c b/libc/sysdeps/linux/common/mkdir.c
index 819793f87..93b66ae40 100644
--- a/libc/sysdeps/linux/common/mkdir.c
+++ b/libc/sysdeps/linux/common/mkdir.c
@@ -2,14 +2,16 @@
/*
* mkdir() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <sys/stat.h>
+libc_hidden_proto(mkdir)
+
#define __NR___syscall_mkdir __NR_mkdir
static inline _syscall2(int, __syscall_mkdir, const char *, pathname,
__kernel_mode_t, mode);
@@ -18,5 +20,4 @@ int mkdir(const char *pathname, mode_t mode)
{
return (__syscall_mkdir(pathname, mode));
}
-libc_hidden_proto(mkdir)
libc_hidden_def(mkdir)
diff --git a/libc/sysdeps/linux/common/mknod.c b/libc/sysdeps/linux/common/mknod.c
index f914af5d7..b71541d95 100644
--- a/libc/sysdeps/linux/common/mknod.c
+++ b/libc/sysdeps/linux/common/mknod.c
@@ -2,15 +2,17 @@
/*
* mknod() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <sys/stat.h>
#include <sys/sysmacros.h>
+libc_hidden_proto(mknod)
+
#define __NR___syscall_mknod __NR_mknod
static inline _syscall3(int, __syscall_mknod, const char *, path,
__kernel_mode_t, mode, __kernel_dev_t, dev);
@@ -23,5 +25,4 @@ int mknod(const char *path, mode_t mode, dev_t dev)
k_dev = ((major(dev) & 0xff) << 8) | (minor(dev) & 0xff);
return __syscall_mknod(path, mode, k_dev);
}
-libc_hidden_proto(mknod)
libc_hidden_def(mknod)
diff --git a/libc/sysdeps/linux/common/mlock.c b/libc/sysdeps/linux/common/mlock.c
index aa6bbb63b..28a6e7927 100644
--- a/libc/sysdeps/linux/common/mlock.c
+++ b/libc/sysdeps/linux/common/mlock.c
@@ -2,9 +2,9 @@
/*
* mlock() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/mlockall.c b/libc/sysdeps/linux/common/mlockall.c
index 4f51bd0df..ea48811ae 100644
--- a/libc/sysdeps/linux/common/mlockall.c
+++ b/libc/sysdeps/linux/common/mlockall.c
@@ -2,9 +2,9 @@
/*
* mlockall() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/mmap.c b/libc/sysdeps/linux/common/mmap.c
index eadecfeee..29d78a712 100644
--- a/libc/sysdeps/linux/common/mmap.c
+++ b/libc/sysdeps/linux/common/mmap.c
@@ -1,10 +1,10 @@
/* vi: set sw=4 ts=4: */
/*
- * _mmap() for uClibc
+ * mmap() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
@@ -12,6 +12,9 @@
#include <sys/mman.h>
#ifdef __NR_mmap
+
+libc_hidden_proto(mmap)
+
#define __NR__mmap __NR_mmap
static inline _syscall1(__ptr_t, _mmap, unsigned long *, buffer);
__ptr_t mmap(__ptr_t addr, size_t len, int prot,
@@ -27,6 +30,5 @@ __ptr_t mmap(__ptr_t addr, size_t len, int prot,
buffer[5] = (unsigned long) offset;
return (__ptr_t) _mmap(buffer);
}
-libc_hidden_proto(mmap)
libc_hidden_def(mmap)
#endif
diff --git a/libc/sysdeps/linux/common/mmap64.c b/libc/sysdeps/linux/common/mmap64.c
index c0bc2b53a..9f7ae75f3 100644
--- a/libc/sysdeps/linux/common/mmap64.c
+++ b/libc/sysdeps/linux/common/mmap64.c
@@ -1,22 +1,8 @@
-/* Copyright (C) 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Daniel Jacobowitz <dan@debian.org>, 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
/* Massivly hacked up for uClibc by Erik Andersen */
#include <features.h>
@@ -24,11 +10,13 @@
#include <unistd.h>
#include <sys/mman.h>
-#if defined __UCLIBC_HAS_LFS__
+#ifdef __UCLIBC_HAS_LFS__
+
+libc_hidden_proto(mmap)
#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64
-#undef _FILE_OFFSET_BITS
-#define _FILE_OFFSET_BITS 64
+# undef _FILE_OFFSET_BITS
+# define _FILE_OFFSET_BITS 64
#endif
#ifndef __USE_LARGEFILE64
# define __USE_LARGEFILE64 1
@@ -39,10 +27,7 @@
# undef __USE_FILE_OFFSET64
#endif
-
-#if ! defined __NR_mmap2 || ! defined _syscall6
-
-libc_hidden_proto(mmap)
+# if ! defined __NR_mmap2 || ! defined _syscall6
/*
* This version is a stub that just chops off everything at the mmap 32 bit
@@ -62,16 +47,16 @@ __ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t
return mmap (addr, len, prot, flags, fd, (off_t) offset);
}
-#else
+# else
-#define __NR___syscall_mmap2 __NR_mmap2
+# define __NR___syscall_mmap2 __NR_mmap2
static inline _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr,
size_t, len, int, prot, int, flags, int, fd, off_t, offset);
/* This is always 12, even on architectures where PAGE_SHIFT != 12. */
-# ifndef MMAP2_PAGE_SHIFT
-# define MMAP2_PAGE_SHIFT 12
-# endif
+# ifndef MMAP2_PAGE_SHIFT
+# define MMAP2_PAGE_SHIFT 12
+# endif
__ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t offset)
{
@@ -82,5 +67,5 @@ __ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t
return(__syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT)));
}
-#endif
+# endif
#endif /* __UCLIBC_HAS_LFS__ */
diff --git a/libc/sysdeps/linux/common/modify_ldt.c b/libc/sysdeps/linux/common/modify_ldt.c
index 47ed7e350..3df6379b0 100644
--- a/libc/sysdeps/linux/common/modify_ldt.c
+++ b/libc/sysdeps/linux/common/modify_ldt.c
@@ -2,14 +2,13 @@
/*
* modify_ldt() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#ifdef __NR_modify_ldt
_syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount);
-/*weak_alias(modify_ldt, __modify_ldt)*/
#endif
diff --git a/libc/sysdeps/linux/common/mount.c b/libc/sysdeps/linux/common/mount.c
index f62c62676..9cbefe4a8 100644
--- a/libc/sysdeps/linux/common/mount.c
+++ b/libc/sysdeps/linux/common/mount.c
@@ -2,9 +2,9 @@
/*
* mount() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/mprotect.c b/libc/sysdeps/linux/common/mprotect.c
index cb6beb489..7eab338d0 100644
--- a/libc/sysdeps/linux/common/mprotect.c
+++ b/libc/sysdeps/linux/common/mprotect.c
@@ -2,9 +2,9 @@
/*
* mprotect() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/mremap.c b/libc/sysdeps/linux/common/mremap.c
index 16359193b..080d2c1c2 100644
--- a/libc/sysdeps/linux/common/mremap.c
+++ b/libc/sysdeps/linux/common/mremap.c
@@ -2,15 +2,17 @@
/*
* mremap() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
#include <sys/mman.h>
+
+libc_hidden_proto(mremap)
+
_syscall4(__ptr_t, mremap, __ptr_t, old_address, size_t, old_size, size_t,
new_size, int, may_move);
-libc_hidden_proto(mremap)
libc_hidden_def(mremap)
diff --git a/libc/sysdeps/linux/common/msync.c b/libc/sysdeps/linux/common/msync.c
index 044652720..bede0dc60 100644
--- a/libc/sysdeps/linux/common/msync.c
+++ b/libc/sysdeps/linux/common/msync.c
@@ -2,9 +2,9 @@
/*
* msync() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/munlock.c b/libc/sysdeps/linux/common/munlock.c
index 674ae41e0..80fd898fa 100644
--- a/libc/sysdeps/linux/common/munlock.c
+++ b/libc/sysdeps/linux/common/munlock.c
@@ -2,9 +2,9 @@
/*
* munlock() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/munlockall.c b/libc/sysdeps/linux/common/munlockall.c
index c1087658f..d0a086a37 100644
--- a/libc/sysdeps/linux/common/munlockall.c
+++ b/libc/sysdeps/linux/common/munlockall.c
@@ -2,9 +2,9 @@
/*
* munlockall() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/munmap.c b/libc/sysdeps/linux/common/munmap.c
index cd76eb297..7a82df632 100644
--- a/libc/sysdeps/linux/common/munmap.c
+++ b/libc/sysdeps/linux/common/munmap.c
@@ -2,14 +2,16 @@
/*
* munmap() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
#include <sys/mman.h>
-_syscall2(int, munmap, void *, start, size_t, length);
+
libc_hidden_proto(munmap)
+
+_syscall2(int, munmap, void *, start, size_t, length);
libc_hidden_def(munmap)
diff --git a/libc/sysdeps/linux/common/nanosleep.c b/libc/sysdeps/linux/common/nanosleep.c
index 0032f6623..c695e827d 100644
--- a/libc/sysdeps/linux/common/nanosleep.c
+++ b/libc/sysdeps/linux/common/nanosleep.c
@@ -2,14 +2,15 @@
/*
* nanosleep() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <time.h>
+
#define __NR___libc_nanosleep __NR_nanosleep
_syscall2(int, __libc_nanosleep, const struct timespec *, req,
struct timespec *, rem);
diff --git a/libc/sysdeps/linux/common/nice.c b/libc/sysdeps/linux/common/nice.c
index 75e065e65..e6e80e7be 100644
--- a/libc/sysdeps/linux/common/nice.c
+++ b/libc/sysdeps/linux/common/nice.c
@@ -2,10 +2,10 @@
/*
* nice() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
* Copyright (C) 2005 by Manuel Novoa III <mjn3@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
@@ -16,12 +16,12 @@ libc_hidden_proto(getpriority)
#ifdef __NR_nice
-#define __NR___syscall_nice __NR_nice
+# define __NR___syscall_nice __NR_nice
static inline _syscall1(int, __syscall_nice, int, incr);
#else
-#include <limits.h>
+# include <limits.h>
libc_hidden_proto(setpriority)
@@ -41,10 +41,10 @@ static inline int int_add_no_wrap(int a, int b)
static inline int __syscall_nice(int incr)
{
int old_priority;
-#if 1
+# if 1
/* This should never fail. */
old_priority = getpriority(PRIO_PROCESS, 0);
-#else
+# else
/* But if you want to be paranoid... */
int old_errno;
@@ -55,7 +55,7 @@ static inline int __syscall_nice(int incr)
return -1;
}
__set_errno(old_errno);
-#endif
+# endif
if (setpriority(PRIO_PROCESS, 0, int_add_no_wrap(old_priority, incr))) {
__set_errno(EPERM); /* SUSv3 mandates EPERM for nice failure. */
diff --git a/libc/sysdeps/linux/common/open.c b/libc/sysdeps/linux/common/open.c
index 14cf65750..1be1f2567 100644
--- a/libc/sysdeps/linux/common/open.c
+++ b/libc/sysdeps/linux/common/open.c
@@ -2,9 +2,9 @@
/*
* open() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
@@ -14,6 +14,9 @@
#include <string.h>
#include <sys/param.h>
+extern int __libc_open(const char *file, int flags, ...);
+libc_hidden_proto(__libc_open)
+
#define __NR___syscall_open __NR_open
static inline _syscall3(int, __syscall_open, const char *, file,
int, flags, __kernel_mode_t, mode);
@@ -33,7 +36,6 @@ int __libc_open(const char *file, int flags, ...)
}
return __syscall_open(file, flags, mode);
}
-libc_hidden_proto(__libc_open)
libc_hidden_def(__libc_open)
strong_alias(__libc_open,open)
diff --git a/libc/sysdeps/linux/common/open64.c b/libc/sysdeps/linux/common/open64.c
index fbe99b0d9..97c3d2df9 100644
--- a/libc/sysdeps/linux/common/open64.c
+++ b/libc/sysdeps/linux/common/open64.c
@@ -1,31 +1,19 @@
-/* Copyright (C) 1991, 1995-1997, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <features.h>
#include <fcntl.h>
#include <stdarg.h>
+#ifdef __UCLIBC_HAS_LFS__
+
#ifndef O_LARGEFILE
-#define O_LARGEFILE 0100000
+# define O_LARGEFILE 0100000
#endif
-#ifdef __UCLIBC_HAS_LFS__
extern int __libc_open (__const char *__file, int __oflag, ...) __nonnull ((1));
libc_hidden_proto(__libc_open)
@@ -45,7 +33,6 @@ int __libc_open64 (const char *file, int oflag, ...)
return __libc_open(file, oflag | O_LARGEFILE, mode);
}
-
strong_alias(__libc_open64,open64)
libc_hidden_proto(open64)
libc_hidden_def(open64)
diff --git a/libc/sysdeps/linux/common/pause.c b/libc/sysdeps/linux/common/pause.c
index 1028a7a63..f26dbe664 100644
--- a/libc/sysdeps/linux/common/pause.c
+++ b/libc/sysdeps/linux/common/pause.c
@@ -2,9 +2,9 @@
/*
* pause() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/personality.c b/libc/sysdeps/linux/common/personality.c
index 138909fcc..39b15007f 100644
--- a/libc/sysdeps/linux/common/personality.c
+++ b/libc/sysdeps/linux/common/personality.c
@@ -2,9 +2,9 @@
/*
* personality() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/pipe.c b/libc/sysdeps/linux/common/pipe.c
index 93d52b88f..02a6975e9 100644
--- a/libc/sysdeps/linux/common/pipe.c
+++ b/libc/sysdeps/linux/common/pipe.c
@@ -2,13 +2,15 @@
/*
* pipe() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
-_syscall1(int, pipe, int *, filedes);
+
libc_hidden_proto(pipe)
+
+_syscall1(int, pipe, int *, filedes);
libc_hidden_def(pipe)
diff --git a/libc/sysdeps/linux/common/pivot_root.c b/libc/sysdeps/linux/common/pivot_root.c
index c424afd13..a182df9b4 100644
--- a/libc/sysdeps/linux/common/pivot_root.c
+++ b/libc/sysdeps/linux/common/pivot_root.c
@@ -2,9 +2,9 @@
/*
* pivot_root() for uClibc
*
- * Copyright (C) 2000-2005 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/poll.c b/libc/sysdeps/linux/common/poll.c
index c76df966f..00fd70816 100644
--- a/libc/sysdeps/linux/common/poll.c
+++ b/libc/sysdeps/linux/common/poll.c
@@ -20,6 +20,8 @@
#include "syscalls.h"
#include <sys/poll.h>
+libc_hidden_proto(poll)
+
#ifdef __NR_poll
_syscall3(int, poll, struct pollfd *, fds,
unsigned long int, nfds, int, timeout);
@@ -205,5 +207,4 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout)
}
#endif
-libc_hidden_proto(poll)
libc_hidden_def(poll)
diff --git a/libc/sysdeps/linux/common/posix_fadvise.c b/libc/sysdeps/linux/common/posix_fadvise.c
index 72419be7b..3fe15c40c 100644
--- a/libc/sysdeps/linux/common/posix_fadvise.c
+++ b/libc/sysdeps/linux/common/posix_fadvise.c
@@ -3,9 +3,9 @@
* posix_fadvise() for uClibc
* http://www.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html
*
- * Copyright (C) 2000-2005 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/posix_fadvise64.c b/libc/sysdeps/linux/common/posix_fadvise64.c
index e5f23d509..d931aff60 100644
--- a/libc/sysdeps/linux/common/posix_fadvise64.c
+++ b/libc/sysdeps/linux/common/posix_fadvise64.c
@@ -3,9 +3,9 @@
* posix_fadvise64() for uClibc
* http://www.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html
*
- * Copyright (C) 2000-2005 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include <features.h>
diff --git a/libc/sysdeps/linux/common/prctl.c b/libc/sysdeps/linux/common/prctl.c
index e908c44cd..a75ac2cf5 100644
--- a/libc/sysdeps/linux/common/prctl.c
+++ b/libc/sysdeps/linux/common/prctl.c
@@ -2,9 +2,9 @@
/*
* prctl() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c
index 090f73fd4..327a9c785 100644
--- a/libc/sysdeps/linux/common/pread_write.c
+++ b/libc/sysdeps/linux/common/pread_write.c
@@ -1,26 +1,16 @@
-/* vi: set sw=4 ts=4:
+/* vi: set sw=4 ts=4: */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * Copyright (C) 2002 by Erik Andersen <andersen@uclibc.org>
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+/*
* Based in part on the files
* ./sysdeps/unix/sysv/linux/pwrite.c,
* ./sysdeps/unix/sysv/linux/pread.c,
* sysdeps/posix/pread.c
* sysdeps/posix/pwrite.c
* from GNU libc 2.2.5, but reworked considerably...
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define _GNU_SOURCE
@@ -40,15 +30,6 @@
#include <unistd.h>
#include <stdint.h>
-libc_hidden_proto(read)
-libc_hidden_proto(write)
-
-#ifdef __UCLIBC_HAS_LFS__
-libc_hidden_proto(lseek64)
-#else
-libc_hidden_proto(lseek)
-#endif
-
#ifdef __NR_pread
#define __NR___syscall_pread __NR_pread
@@ -100,6 +81,11 @@ strong_alias(__libc_pwrite64,pwrite64)
#if ! defined __NR_pread || ! defined __NR_pwrite
+libc_hidden_proto(read)
+libc_hidden_proto(write)
+libc_hidden_proto(lseek)
+libc_hidden_proto(lseek64)
+
static ssize_t __fake_pread_write(int fd, void *buf,
size_t count, off_t offset, int do_pwrite)
{
diff --git a/libc/sysdeps/linux/common/ptrace.c b/libc/sysdeps/linux/common/ptrace.c
index 1f2b35b33..fda2e9d84 100644
--- a/libc/sysdeps/linux/common/ptrace.c
+++ b/libc/sysdeps/linux/common/ptrace.c
@@ -1,20 +1,8 @@
-/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <errno.h>
#include <sys/types.h>
@@ -22,10 +10,9 @@
#include <sys/syscall.h>
#include <stdarg.h>
-
#define __NR___syscall_ptrace __NR_ptrace
-static _syscall4(long, __syscall_ptrace, enum __ptrace_request, request,
+static inline _syscall4(long, __syscall_ptrace, enum __ptrace_request, request,
__kernel_pid_t, pid, void*, addr, void*, data);
long int
diff --git a/libc/sysdeps/linux/common/query_module.c b/libc/sysdeps/linux/common/query_module.c
index 853b9ed94..e65e32d7f 100644
--- a/libc/sysdeps/linux/common/query_module.c
+++ b/libc/sysdeps/linux/common/query_module.c
@@ -2,9 +2,9 @@
/*
* query_module() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/quotactl.c b/libc/sysdeps/linux/common/quotactl.c
index 3ac367748..2982f4956 100644
--- a/libc/sysdeps/linux/common/quotactl.c
+++ b/libc/sysdeps/linux/common/quotactl.c
@@ -2,9 +2,9 @@
/*
* quotactl() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/read.c b/libc/sysdeps/linux/common/read.c
index 912533e55..079bd0eb5 100644
--- a/libc/sysdeps/linux/common/read.c
+++ b/libc/sysdeps/linux/common/read.c
@@ -2,9 +2,9 @@
/*
* read() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/readlink.c b/libc/sysdeps/linux/common/readlink.c
index d1587154d..73d5441c0 100644
--- a/libc/sysdeps/linux/common/readlink.c
+++ b/libc/sysdeps/linux/common/readlink.c
@@ -2,13 +2,15 @@
/*
* readlink() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
-_syscall3(int, readlink, const char *, path, char *, buf, size_t, bufsiz);
+
libc_hidden_proto(readlink)
+
+_syscall3(int, readlink, const char *, path, char *, buf, size_t, bufsiz);
libc_hidden_def(readlink)
diff --git a/libc/sysdeps/linux/common/readv.c b/libc/sysdeps/linux/common/readv.c
index 79ecf6f6d..040e61266 100644
--- a/libc/sysdeps/linux/common/readv.c
+++ b/libc/sysdeps/linux/common/readv.c
@@ -2,9 +2,9 @@
/*
* readv() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/reboot.c b/libc/sysdeps/linux/common/reboot.c
index 57ac2398b..8347ebfe8 100644
--- a/libc/sysdeps/linux/common/reboot.c
+++ b/libc/sysdeps/linux/common/reboot.c
@@ -2,9 +2,9 @@
/*
* _reboot() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/rename.c b/libc/sysdeps/linux/common/rename.c
index 7906cc939..55de6b1d0 100644
--- a/libc/sysdeps/linux/common/rename.c
+++ b/libc/sysdeps/linux/common/rename.c
@@ -2,9 +2,9 @@
/*
* rename() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/rmdir.c b/libc/sysdeps/linux/common/rmdir.c
index 706fa0fd3..0aadd73f2 100644
--- a/libc/sysdeps/linux/common/rmdir.c
+++ b/libc/sysdeps/linux/common/rmdir.c
@@ -2,13 +2,15 @@
/*
* rmdir() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
-_syscall1(int, rmdir, const char *, pathname);
+
libc_hidden_proto(rmdir)
+
+_syscall1(int, rmdir, const char *, pathname);
libc_hidden_def(rmdir)
diff --git a/libc/sysdeps/linux/common/sbrk.c b/libc/sysdeps/linux/common/sbrk.c
index bdc8c68a7..3c2d9bdc9 100644
--- a/libc/sysdeps/linux/common/sbrk.c
+++ b/libc/sysdeps/linux/common/sbrk.c
@@ -1,24 +1,14 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <unistd.h>
#include <errno.h>
+libc_hidden_proto(sbrk)
+
libc_hidden_proto(brk)
/* Defined in brk.c. */
@@ -45,5 +35,4 @@ void * sbrk (intptr_t increment)
return oldbrk;
}
-libc_hidden_proto(sbrk)
libc_hidden_def(sbrk)
diff --git a/libc/sysdeps/linux/common/sched_get_priority_max.c b/libc/sysdeps/linux/common/sched_get_priority_max.c
index 77da3573e..c9292ffbd 100644
--- a/libc/sysdeps/linux/common/sched_get_priority_max.c
+++ b/libc/sysdeps/linux/common/sched_get_priority_max.c
@@ -2,9 +2,9 @@
/*
* sched_get_priority_max() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/sched_get_priority_min.c b/libc/sysdeps/linux/common/sched_get_priority_min.c
index adcb6d622..317911fc1 100644
--- a/libc/sysdeps/linux/common/sched_get_priority_min.c
+++ b/libc/sysdeps/linux/common/sched_get_priority_min.c
@@ -2,9 +2,9 @@
/*
* sched_get_priority_min() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/sched_getparam.c b/libc/sysdeps/linux/common/sched_getparam.c
index 992010ddb..d9b3dcde5 100644
--- a/libc/sysdeps/linux/common/sched_getparam.c
+++ b/libc/sysdeps/linux/common/sched_getparam.c
@@ -2,9 +2,9 @@
/*
* sched_getparam() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/sched_getscheduler.c b/libc/sysdeps/linux/common/sched_getscheduler.c
index dedd5e17f..13df2aefd 100644
--- a/libc/sysdeps/linux/common/sched_getscheduler.c
+++ b/libc/sysdeps/linux/common/sched_getscheduler.c
@@ -2,9 +2,9 @@
/*
* sched_getscheduler() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/sched_rr_get_interval.c b/libc/sysdeps/linux/common/sched_rr_get_interval.c
index 8bf31dcbf..0eb25016e 100644
--- a/libc/sysdeps/linux/common/sched_rr_get_interval.c
+++ b/libc/sysdeps/linux/common/sched_rr_get_interval.c
@@ -2,9 +2,9 @@
/*
* sched_rr_get_interval() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/sched_setparam.c b/libc/sysdeps/linux/common/sched_setparam.c
index f10b5269d..a0ff56840 100644
--- a/libc/sysdeps/linux/common/sched_setparam.c
+++ b/libc/sysdeps/linux/common/sched_setparam.c
@@ -2,9 +2,9 @@
/*
* sched_setparam() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/sched_setscheduler.c b/libc/sysdeps/linux/common/sched_setscheduler.c
index ebf4b777a..14236e927 100644
--- a/libc/sysdeps/linux/common/sched_setscheduler.c
+++ b/libc/sysdeps/linux/common/sched_setscheduler.c
@@ -2,9 +2,9 @@
/*
* sched_setscheduler() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/sched_yield.c b/libc/sysdeps/linux/common/sched_yield.c
index 77674143a..3953d8d16 100644
--- a/libc/sysdeps/linux/common/sched_yield.c
+++ b/libc/sysdeps/linux/common/sched_yield.c
@@ -2,9 +2,9 @@
/*
* sched_yield() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/select.c b/libc/sysdeps/linux/common/select.c
index 19e14b99a..d5a0663fa 100644
--- a/libc/sysdeps/linux/common/select.c
+++ b/libc/sysdeps/linux/common/select.c
@@ -2,19 +2,20 @@
/*
* select() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
+libc_hidden_proto(select)
+
#ifdef __NR__newselect
-#undef __NR_select
-#define __NR_select __NR__newselect
+# undef __NR_select
+# define __NR_select __NR__newselect
#endif
_syscall5(int, select, int, n, fd_set *, readfds, fd_set *, writefds,
fd_set *, exceptfds, struct timeval *, timeout);
-libc_hidden_proto(select)
libc_hidden_def(select)
diff --git a/libc/sysdeps/linux/common/sendfile.c b/libc/sysdeps/linux/common/sendfile.c
index cff95f579..ba3734f09 100644
--- a/libc/sysdeps/linux/common/sendfile.c
+++ b/libc/sysdeps/linux/common/sendfile.c
@@ -2,9 +2,9 @@
/*
* sendfile() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/sendfile64.c b/libc/sysdeps/linux/common/sendfile64.c
index 9c7c0ad3c..3e704770f 100644
--- a/libc/sysdeps/linux/common/sendfile64.c
+++ b/libc/sysdeps/linux/common/sendfile64.c
@@ -1,15 +1,13 @@
/*
- * sendfile64 syscall. Copes with 64 bit and 32 bit machines
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+/* sendfile64 syscall. Copes with 64 bit and 32 bit machines
* and on 32 bit machines this sends things into the kernel as
* two 32-bit arguments (high and low 32 bits of length) that
* are ordered based on endianess. It turns out endian.h has
* just the macro we need to order things, __LONG_LONG_PAIR.
- *
- * Copyright (C) 2002 Erik Andersen <andersen@codepoet.org>
- *
- * This file is subject to the terms and conditions of the GNU
- * Lesser General Public License. See the file COPYING.LIB in
- * the main directory of this archive for more details.
*/
#include <features.h>
@@ -22,19 +20,19 @@
#if defined __NR_sendfile64
-#if __WORDSIZE == 64 || (defined(__powerpc__) && defined (__UCLIBC_HAS_LFS__))
+# if __WORDSIZE == 64 || (defined(__powerpc__) && defined (__UCLIBC_HAS_LFS__))
/* For a 64 bit machine, life is simple... */
_syscall4(ssize_t,sendfile64, int, out_fd, int, in_fd, __off64_t *, offset, size_t, count);
-#elif __WORDSIZE == 32
+# elif __WORDSIZE == 32
-#if defined __UCLIBC_HAS_LFS__
+# if defined __UCLIBC_HAS_LFS__
_syscall4(ssize_t,sendfile64, int, out_fd, int, in_fd, __off64_t *, offset, size_t, count);
-#endif /* __UCLIBC_HAS_LFS__ */
+# endif /* __UCLIBC_HAS_LFS__ */
-#else /* __WORDSIZE */
-#error Your machine is not 64 bit or 32 bit, I am dazed and confused.
-#endif /* __WORDSIZE */
+# else /* __WORDSIZE */
+# error Your machine is not 64 bit or 32 bit, I am dazed and confused.
+# endif /* __WORDSIZE */
#else /* ! defined __NR_sendfile64 */
diff --git a/libc/sysdeps/linux/common/setdomainname.c b/libc/sysdeps/linux/common/setdomainname.c
index a88e5a47d..138250d09 100644
--- a/libc/sysdeps/linux/common/setdomainname.c
+++ b/libc/sysdeps/linux/common/setdomainname.c
@@ -2,9 +2,9 @@
/*
* setdomainname() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/setegid.c b/libc/sysdeps/linux/common/setegid.c
index dcd207132..759c9b0f3 100644
--- a/libc/sysdeps/linux/common/setegid.c
+++ b/libc/sysdeps/linux/common/setegid.c
@@ -12,7 +12,9 @@
#include <sys/types.h>
#include <sys/syscall.h>
+#ifdef __NR_setresgid
libc_hidden_proto(setresgid)
+#endif
libc_hidden_proto(setregid)
int setegid(gid_t gid)
diff --git a/libc/sysdeps/linux/common/seteuid.c b/libc/sysdeps/linux/common/seteuid.c
index dea919c3b..dc4b82c4c 100644
--- a/libc/sysdeps/linux/common/seteuid.c
+++ b/libc/sysdeps/linux/common/seteuid.c
@@ -12,6 +12,8 @@
#include <sys/types.h>
#include <sys/syscall.h>
+libc_hidden_proto(seteuid)
+
libc_hidden_proto(setresuid)
libc_hidden_proto(setreuid)
@@ -35,5 +37,4 @@ int seteuid(uid_t uid)
return result;
}
-libc_hidden_proto(seteuid)
libc_hidden_def(seteuid)
diff --git a/libc/sysdeps/linux/common/setfsgid.c b/libc/sysdeps/linux/common/setfsgid.c
index 87e72683e..027dd11f6 100644
--- a/libc/sysdeps/linux/common/setfsgid.c
+++ b/libc/sysdeps/linux/common/setfsgid.c
@@ -2,9 +2,9 @@
/*
* setfsgid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/setfsuid.c b/libc/sysdeps/linux/common/setfsuid.c
index a515652fe..4bbc931cf 100644
--- a/libc/sysdeps/linux/common/setfsuid.c
+++ b/libc/sysdeps/linux/common/setfsuid.c
@@ -2,9 +2,9 @@
/*
* setfsuid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/setgid.c b/libc/sysdeps/linux/common/setgid.c
index b055b9333..d0698f517 100644
--- a/libc/sysdeps/linux/common/setgid.c
+++ b/libc/sysdeps/linux/common/setgid.c
@@ -2,9 +2,9 @@
/*
* setgid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/setgroups.c b/libc/sysdeps/linux/common/setgroups.c
index a41578d62..b767f6aa7 100644
--- a/libc/sysdeps/linux/common/setgroups.c
+++ b/libc/sysdeps/linux/common/setgroups.c
@@ -2,9 +2,9 @@
/*
* setgroups() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
@@ -12,6 +12,8 @@
#include <unistd.h>
#include <grp.h>
+libc_hidden_proto(setgroups)
+
libc_hidden_proto(sysconf)
#define __NR___syscall_setgroups __NR_setgroups
@@ -47,5 +49,4 @@ ret_error:
return i;
}
}
-libc_hidden_proto(setgroups)
libc_hidden_def(setgroups)
diff --git a/libc/sysdeps/linux/common/sethostname.c b/libc/sysdeps/linux/common/sethostname.c
index 16d636b6f..d8e0789bb 100644
--- a/libc/sysdeps/linux/common/sethostname.c
+++ b/libc/sysdeps/linux/common/sethostname.c
@@ -2,9 +2,9 @@
/*
* sethostname() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/setitimer.c b/libc/sysdeps/linux/common/setitimer.c
index f34a9f39c..fb6c6b1e6 100644
--- a/libc/sysdeps/linux/common/setitimer.c
+++ b/libc/sysdeps/linux/common/setitimer.c
@@ -2,14 +2,16 @@
/*
* setitimer() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <sys/time.h>
+
+libc_hidden_proto(setitimer)
+
_syscall3(int, setitimer, __itimer_which_t, which,
const struct itimerval *, new, struct itimerval *, old);
-libc_hidden_proto(setitimer)
libc_hidden_def(setitimer)
diff --git a/libc/sysdeps/linux/common/setpgid.c b/libc/sysdeps/linux/common/setpgid.c
index 0453fbdfb..98289ff72 100644
--- a/libc/sysdeps/linux/common/setpgid.c
+++ b/libc/sysdeps/linux/common/setpgid.c
@@ -2,14 +2,16 @@
/*
* setpgid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
+libc_hidden_proto(setpgid)
+
#define __NR___syscall_setpgid __NR_setpgid
static inline _syscall2(int, __syscall_setpgid,
__kernel_pid_t, pid, __kernel_pid_t, pgid);
@@ -18,5 +20,4 @@ int setpgid(pid_t pid, pid_t pgid)
{
return (__syscall_setpgid(pid, pgid));
}
-libc_hidden_proto(setpgid)
libc_hidden_def(setpgid)
diff --git a/libc/sysdeps/linux/common/setpriority.c b/libc/sysdeps/linux/common/setpriority.c
index 7347786af..d836153d5 100644
--- a/libc/sysdeps/linux/common/setpriority.c
+++ b/libc/sysdeps/linux/common/setpriority.c
@@ -2,13 +2,15 @@
/*
* setpriority() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <sys/resource.h>
-_syscall3(int, setpriority, __priority_which_t, which, id_t, who, int, prio);
+
libc_hidden_proto(setpriority)
+
+_syscall3(int, setpriority, __priority_which_t, which, id_t, who, int, prio);
libc_hidden_def(setpriority)
diff --git a/libc/sysdeps/linux/common/setregid.c b/libc/sysdeps/linux/common/setregid.c
index d9aca14bb..a085ed2ab 100644
--- a/libc/sysdeps/linux/common/setregid.c
+++ b/libc/sysdeps/linux/common/setregid.c
@@ -2,14 +2,16 @@
/*
* setregid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
+libc_hidden_proto(setregid)
+
#define __NR___syscall_setregid __NR_setregid
static inline _syscall2(int, __syscall_setregid,
__kernel_gid_t, rgid, __kernel_gid_t, egid);
@@ -23,5 +25,4 @@ int setregid(gid_t rgid, gid_t egid)
}
return (__syscall_setregid(rgid, egid));
}
-libc_hidden_proto(setregid)
libc_hidden_def(setregid)
diff --git a/libc/sysdeps/linux/common/setresgid.c b/libc/sysdeps/linux/common/setresgid.c
index 82087d1c1..aa331e3bb 100644
--- a/libc/sysdeps/linux/common/setresgid.c
+++ b/libc/sysdeps/linux/common/setresgid.c
@@ -2,14 +2,17 @@
/*
* setresgid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
+#include <unistd.h>
#ifdef __NR_setresgid
+libc_hidden_proto(setresgid)
+
#define __NR___syscall_setresgid __NR_setresgid
static inline _syscall3(int, __syscall_setresgid,
__kernel_gid_t, rgid, __kernel_gid_t, egid, __kernel_gid_t, sgid);
@@ -24,6 +27,5 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid)
}
return (__syscall_setresgid(rgid, egid, sgid));
}
-libc_hidden_proto(setresgid)
libc_hidden_def(setresgid)
#endif
diff --git a/libc/sysdeps/linux/common/setresuid.c b/libc/sysdeps/linux/common/setresuid.c
index 7d34c4027..7e23774ac 100644
--- a/libc/sysdeps/linux/common/setresuid.c
+++ b/libc/sysdeps/linux/common/setresuid.c
@@ -2,14 +2,17 @@
/*
* setresuid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
+#include <unistd.h>
#ifdef __NR_setresuid
+libc_hidden_proto(setresuid)
+
#define __NR___syscall_setresuid __NR_setresuid
static inline _syscall3(int, __syscall_setresuid,
__kernel_uid_t, rgid, __kernel_uid_t, egid, __kernel_uid_t, sgid);
@@ -24,6 +27,5 @@ int setresuid(uid_t ruid, uid_t euid, uid_t suid)
}
return (__syscall_setresuid(ruid, euid, suid));
}
-libc_hidden_proto(setresuid)
libc_hidden_def(setresuid)
#endif
diff --git a/libc/sysdeps/linux/common/setreuid.c b/libc/sysdeps/linux/common/setreuid.c
index 93684d047..dcbe4adfe 100644
--- a/libc/sysdeps/linux/common/setreuid.c
+++ b/libc/sysdeps/linux/common/setreuid.c
@@ -2,14 +2,16 @@
/*
* setreuid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
+libc_hidden_proto(setreuid)
+
#define __NR___syscall_setreuid __NR_setreuid
static inline _syscall2(int, __syscall_setreuid,
__kernel_uid_t, ruid, __kernel_uid_t, euid);
@@ -23,5 +25,4 @@ int setreuid(uid_t ruid, uid_t euid)
}
return (__syscall_setreuid(ruid, euid));
}
-libc_hidden_proto(setreuid)
libc_hidden_def(setreuid)
diff --git a/libc/sysdeps/linux/common/setrlimit.c b/libc/sysdeps/linux/common/setrlimit.c
index 08e955e05..2e62a5e1d 100644
--- a/libc/sysdeps/linux/common/setrlimit.c
+++ b/libc/sysdeps/linux/common/setrlimit.c
@@ -2,19 +2,21 @@
/*
* setrlimit() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
+#include <unistd.h>
+#include <sys/resource.h>
+
+libc_hidden_proto(setrlimit)
#ifndef __NR_ugetrlimit
/* Only wrap setrlimit if the new ugetrlimit is not present */
#define __NR___syscall_setrlimit __NR_setrlimit
-#include <unistd.h>
-#include <sys/resource.h>
#define RMIN(x, y) ((x) < (y) ? (x) : (y))
static inline
_syscall2(int, __syscall_setrlimit, int, resource, const struct rlimit *, rlim);
@@ -34,12 +36,7 @@ int setrlimit(__rlimit_resource_t resource, const struct rlimit *rlimits)
#undef RMIN
#else /* We don't need to wrap setrlimit */
-
-#include <unistd.h>
-struct rlimit;
_syscall2(int, setrlimit, unsigned int, resource,
const struct rlimit *, rlim);
#endif
-
-libc_hidden_proto(setrlimit)
libc_hidden_def(setrlimit)
diff --git a/libc/sysdeps/linux/common/setsid.c b/libc/sysdeps/linux/common/setsid.c
index 6b63e3a31..042ee43a4 100644
--- a/libc/sysdeps/linux/common/setsid.c
+++ b/libc/sysdeps/linux/common/setsid.c
@@ -2,13 +2,15 @@
/*
* setsid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
-_syscall0(pid_t, setsid);
+
libc_hidden_proto(setsid)
+
+_syscall0(pid_t, setsid);
libc_hidden_def(setsid)
diff --git a/libc/sysdeps/linux/common/settimeofday.c b/libc/sysdeps/linux/common/settimeofday.c
index 7f4c336a2..2dc2a6a44 100644
--- a/libc/sysdeps/linux/common/settimeofday.c
+++ b/libc/sysdeps/linux/common/settimeofday.c
@@ -2,14 +2,16 @@
/*
* settimeofday() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <sys/time.h>
-attribute_hidden _syscall2(int, settimeofday, const struct timeval *, tv,
- const struct timezone *, tz);
+
libc_hidden_proto(settimeofday)
+
+_syscall2(int, settimeofday, const struct timeval *, tv,
+ const struct timezone *, tz);
libc_hidden_def(settimeofday)
diff --git a/libc/sysdeps/linux/common/setuid.c b/libc/sysdeps/linux/common/setuid.c
index 237b986ce..b4b2e1bd1 100644
--- a/libc/sysdeps/linux/common/setuid.c
+++ b/libc/sysdeps/linux/common/setuid.c
@@ -2,9 +2,9 @@
/*
* setuid() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/sigaltstack.c b/libc/sysdeps/linux/common/sigaltstack.c
index 23ad14689..af087ae57 100644
--- a/libc/sysdeps/linux/common/sigaltstack.c
+++ b/libc/sysdeps/linux/common/sigaltstack.c
@@ -2,9 +2,9 @@
/*
* sigaltstack() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/sigpending.c b/libc/sysdeps/linux/common/sigpending.c
index 66513feb6..ea8fc40e6 100644
--- a/libc/sysdeps/linux/common/sigpending.c
+++ b/libc/sysdeps/linux/common/sigpending.c
@@ -2,9 +2,9 @@
/*
* sigpending() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
@@ -12,14 +12,13 @@
#undef sigpending
#ifdef __NR_rt_sigpending
-#define __NR___rt_sigpending __NR_rt_sigpending
+# define __NR___rt_sigpending __NR_rt_sigpending
static inline _syscall2(int, __rt_sigpending, sigset_t *, set, size_t, size);
int sigpending(sigset_t * set)
{
return __rt_sigpending(set, _NSIG / 8);
}
-
#else
_syscall1(int, sigpending, sigset_t *, set);
#endif
diff --git a/libc/sysdeps/linux/common/sigprocmask.c b/libc/sysdeps/linux/common/sigprocmask.c
index 6ca040c59..cbaea0f62 100644
--- a/libc/sysdeps/linux/common/sigprocmask.c
+++ b/libc/sysdeps/linux/common/sigprocmask.c
@@ -2,9 +2,9 @@
/*
* sigprocmask() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
@@ -12,9 +12,11 @@
#undef sigprocmask
+libc_hidden_proto(sigprocmask)
+
#ifdef __NR_rt_sigprocmask
-#define __NR___rt_sigprocmask __NR_rt_sigprocmask
+# define __NR___rt_sigprocmask __NR_rt_sigprocmask
static inline
_syscall4(int, __rt_sigprocmask, int, how, const sigset_t *, set,
sigset_t *, oldset, size_t, size);
@@ -22,13 +24,13 @@ _syscall4(int, __rt_sigprocmask, int, how, const sigset_t *, set,
int sigprocmask(int how, const sigset_t * set, sigset_t * oldset)
{
if (set &&
-#if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2)
+# if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2)
(((unsigned int) how) > 2)
-#else
-#warning "compile time assumption violated.. slow path..."
+# else
+# warning "compile time assumption violated.. slow path..."
((how != SIG_BLOCK) && (how != SIG_UNBLOCK)
&& (how != SIG_SETMASK))
-#endif
+# endif
) {
__set_errno(EINVAL);
return -1;
@@ -39,7 +41,7 @@ int sigprocmask(int how, const sigset_t * set, sigset_t * oldset)
#else
-#define __NR___syscall_sigprocmask __NR_sigprocmask
+# define __NR___syscall_sigprocmask __NR_sigprocmask
static inline
_syscall3(int, __syscall_sigprocmask, int, how, const sigset_t *, set,
sigset_t *, oldset);
@@ -47,13 +49,13 @@ _syscall3(int, __syscall_sigprocmask, int, how, const sigset_t *, set,
int sigprocmask(int how, const sigset_t * set, sigset_t * oldset)
{
if (set &&
-#if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2)
+# if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2)
(((unsigned int) how) > 2)
-#else
-#warning "compile time assumption violated.. slow path..."
+# else
+# warning "compile time assumption violated.. slow path..."
((how != SIG_BLOCK) && (how != SIG_UNBLOCK)
&& (how != SIG_SETMASK))
-#endif
+# endif
) {
__set_errno(EINVAL);
return -1;
@@ -61,6 +63,4 @@ int sigprocmask(int how, const sigset_t * set, sigset_t * oldset)
return (__syscall_sigprocmask(how, set, oldset));
}
#endif
-
-libc_hidden_proto(sigprocmask)
libc_hidden_def(sigprocmask)
diff --git a/libc/sysdeps/linux/common/sigsuspend.c b/libc/sysdeps/linux/common/sigsuspend.c
index be90d7e87..7bc3a59c1 100644
--- a/libc/sysdeps/linux/common/sigsuspend.c
+++ b/libc/sysdeps/linux/common/sigsuspend.c
@@ -2,17 +2,19 @@
/*
* sigsuspend() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <signal.h>
#undef sigsuspend
+libc_hidden_proto(sigsuspend)
+
#ifdef __NR_rt_sigsuspend
-#define __NR___rt_sigsuspend __NR_rt_sigsuspend
+# define __NR___rt_sigsuspend __NR_rt_sigsuspend
static inline _syscall2(int, __rt_sigsuspend, const sigset_t *, mask, size_t, size);
int sigsuspend(const sigset_t * mask)
@@ -20,7 +22,7 @@ int sigsuspend(const sigset_t * mask)
return __rt_sigsuspend(mask, _NSIG / 8);
}
#else
-#define __NR___syscall_sigsuspend __NR_sigsuspend
+# define __NR___syscall_sigsuspend __NR_sigsuspend
static inline _syscall3(int, __syscall_sigsuspend, int, a, unsigned long int, b,
unsigned long int, c);
@@ -29,5 +31,4 @@ int sigsuspend(const sigset_t * set)
return __syscall_sigsuspend(0, 0, set->__val[0]);
}
#endif
-libc_hidden_proto(sigsuspend)
libc_hidden_def(sigsuspend)
diff --git a/libc/sysdeps/linux/common/stat.c b/libc/sysdeps/linux/common/stat.c
index 51e353f96..f0fbccbf0 100644
--- a/libc/sysdeps/linux/common/stat.c
+++ b/libc/sysdeps/linux/common/stat.c
@@ -2,9 +2,9 @@
/*
* stat() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
/* need to hide the 64bit prototype or the weak_alias()
@@ -18,6 +18,8 @@
#undef stat64
+libc_hidden_proto(stat)
+
#define __NR___syscall_stat __NR_stat
#undef stat
static inline _syscall2(int, __syscall_stat,
@@ -34,7 +36,6 @@ int stat(const char *file_name, struct stat *buf)
}
return result;
}
-libc_hidden_proto(stat)
libc_hidden_def(stat)
#if ! defined __NR_stat64 && defined __UCLIBC_HAS_LFS__
diff --git a/libc/sysdeps/linux/common/stat64.c b/libc/sysdeps/linux/common/stat64.c
index e46cf8a25..54e2b436e 100644
--- a/libc/sysdeps/linux/common/stat64.c
+++ b/libc/sysdeps/linux/common/stat64.c
@@ -2,18 +2,21 @@
/*
* stat64() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
+#include <sys/stat.h>
#if defined __UCLIBC_HAS_LFS__ && defined __NR_stat64
-#define __NR___syscall_stat64 __NR_stat64
-#include <unistd.h>
-#include <sys/stat.h>
-#include "xstatconv.h"
+libc_hidden_proto(stat64)
+
+# define __NR___syscall_stat64 __NR_stat64
+# include <unistd.h>
+# include <sys/stat.h>
+# include "xstatconv.h"
static inline _syscall2(int, __syscall_stat64,
const char *, file_name, struct kernel_stat64 *, buf);
@@ -29,7 +32,5 @@ int stat64(const char *file_name, struct stat64 *buf)
}
return result;
}
-libc_hidden_proto(stat64)
libc_hidden_def(stat64)
-
-#endif /* __UCLIBC_HAS_LFS__ */
+#endif
diff --git a/libc/sysdeps/linux/common/statfs.c b/libc/sysdeps/linux/common/statfs.c
index d931707f4..cc7425f3c 100644
--- a/libc/sysdeps/linux/common/statfs.c
+++ b/libc/sysdeps/linux/common/statfs.c
@@ -2,9 +2,9 @@
/*
* statfs() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
@@ -12,6 +12,8 @@
#include <sys/param.h>
#include <sys/vfs.h>
+libc_hidden_proto(statfs)
+
#define __NR___syscall_statfs __NR_statfs
static inline _syscall2(int, __syscall_statfs,
const char *, path, struct statfs *, buf);
@@ -20,5 +22,4 @@ int statfs(const char *path, struct statfs * buf)
{
return __syscall_statfs(path, buf);
}
-libc_hidden_proto(statfs)
libc_hidden_def(statfs)
diff --git a/libc/sysdeps/linux/common/swapoff.c b/libc/sysdeps/linux/common/swapoff.c
index 8ecb45f85..60df6e473 100644
--- a/libc/sysdeps/linux/common/swapoff.c
+++ b/libc/sysdeps/linux/common/swapoff.c
@@ -2,9 +2,9 @@
/*
* swapoff() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/swapon.c b/libc/sysdeps/linux/common/swapon.c
index c3c507e6b..d5a5c235a 100644
--- a/libc/sysdeps/linux/common/swapon.c
+++ b/libc/sysdeps/linux/common/swapon.c
@@ -2,9 +2,9 @@
/*
* swapon() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/symlink.c b/libc/sysdeps/linux/common/symlink.c
index efd59405b..3c8c39751 100644
--- a/libc/sysdeps/linux/common/symlink.c
+++ b/libc/sysdeps/linux/common/symlink.c
@@ -2,9 +2,9 @@
/*
* symlink() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/sync.c b/libc/sysdeps/linux/common/sync.c
index 8e9850419..7bfea0d70 100644
--- a/libc/sysdeps/linux/common/sync.c
+++ b/libc/sysdeps/linux/common/sync.c
@@ -2,22 +2,9 @@
/*
* sync syscall for uClibc
*
- * Copyright (C) 2002 by Erik Andersen <andersen@codepoet.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define _GNU_SOURCE
diff --git a/libc/sysdeps/linux/common/syscalls.h b/libc/sysdeps/linux/common/syscalls.h
index 743ac8a74..d3f7fea51 100644
--- a/libc/sysdeps/linux/common/syscalls.h
+++ b/libc/sysdeps/linux/common/syscalls.h
@@ -2,22 +2,9 @@
/*
* Common header file for uClibc syscalls
*
- * Copyright (C) 2001-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public License
- * as published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program 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
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define _GNU_SOURCE
@@ -30,7 +17,7 @@
#undef __OPTIMIZE__
/* We absolutely do _NOT_ want interfaces silently
- * * * renamed under us or very bad things will happen... */
+ * being renamed under us or very bad things will happen... */
#ifdef __USE_FILE_OFFSET64
# undef __USE_FILE_OFFSET64
#endif
diff --git a/libc/sysdeps/linux/common/sysctl.c b/libc/sysdeps/linux/common/sysctl.c
index a1ab9bcc5..8359577bc 100644
--- a/libc/sysdeps/linux/common/sysctl.c
+++ b/libc/sysdeps/linux/common/sysctl.c
@@ -2,9 +2,9 @@
/*
* _sysctl() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/sysfs.c b/libc/sysdeps/linux/common/sysfs.c
index 371c08b9e..b3586afdd 100644
--- a/libc/sysdeps/linux/common/sysfs.c
+++ b/libc/sysdeps/linux/common/sysfs.c
@@ -2,9 +2,9 @@
/*
* sysfs() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/sysinfo.c b/libc/sysdeps/linux/common/sysinfo.c
index a2668d75d..67673a290 100644
--- a/libc/sysdeps/linux/common/sysinfo.c
+++ b/libc/sysdeps/linux/common/sysinfo.c
@@ -2,9 +2,9 @@
/*
* sysinfo() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/time.c b/libc/sysdeps/linux/common/time.c
index a4dc1c742..405954aa3 100644
--- a/libc/sysdeps/linux/common/time.c
+++ b/libc/sysdeps/linux/common/time.c
@@ -2,14 +2,17 @@
/*
* time() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <time.h>
#include <sys/time.h>
+
+libc_hidden_proto(time)
+
#ifdef __NR_time
_syscall1(time_t, time, time_t *, t);
#else
@@ -31,5 +34,4 @@ time_t time(time_t * t)
return result;
}
#endif
-libc_hidden_proto(time)
libc_hidden_def(time)
diff --git a/libc/sysdeps/linux/common/times.c b/libc/sysdeps/linux/common/times.c
index fa751a03b..178a73fa9 100644
--- a/libc/sysdeps/linux/common/times.c
+++ b/libc/sysdeps/linux/common/times.c
@@ -2,13 +2,15 @@
/*
* times() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <sys/times.h>
-_syscall1(clock_t, times, struct tms *, buf);
+
libc_hidden_proto(times)
+
+_syscall1(clock_t, times, struct tms *, buf);
libc_hidden_def(times)
diff --git a/libc/sysdeps/linux/common/truncate.c b/libc/sysdeps/linux/common/truncate.c
index d0b04ebee..08c71fc71 100644
--- a/libc/sysdeps/linux/common/truncate.c
+++ b/libc/sysdeps/linux/common/truncate.c
@@ -2,13 +2,15 @@
/*
* truncate() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
-_syscall2(int, truncate, const char *, path, __off_t, length);
+
libc_hidden_proto(truncate)
+
+_syscall2(int, truncate, const char *, path, __off_t, length);
libc_hidden_def(truncate)
diff --git a/libc/sysdeps/linux/common/truncate64.c b/libc/sysdeps/linux/common/truncate64.c
index df6c9e4d5..59324fd3e 100644
--- a/libc/sysdeps/linux/common/truncate64.c
+++ b/libc/sysdeps/linux/common/truncate64.c
@@ -1,15 +1,13 @@
/*
- * truncate64 syscall. Copes with 64 bit and 32 bit machines
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+/* truncate64 syscall. Copes with 64 bit and 32 bit machines
* and on 32 bit machines this sends things into the kernel as
* two 32-bit arguments (high and low 32 bits of length) that
* are ordered based on endianess. It turns out endian.h has
* just the macro we need to order things, __LONG_LONG_PAIR.
- *
- * Copyright (C) 2002 Erik Andersen <andersen@codepoet.org>
- *
- * This file is subject to the terms and conditions of the GNU
- * Lesser General Public License. See the file COPYING.LIB in
- * the main directory of this archive for more details.
*/
#include <features.h>
diff --git a/libc/sysdeps/linux/common/ulimit.c b/libc/sysdeps/linux/common/ulimit.c
index 64bb45515..523beae47 100644
--- a/libc/sysdeps/linux/common/ulimit.c
+++ b/libc/sysdeps/linux/common/ulimit.c
@@ -1,21 +1,8 @@
/* vi: set sw=4 ts=4: */
/*
- * Copyright (C) 2003 by Erik Andersen <andersen@codepoet.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define _GNU_SOURCE
@@ -28,7 +15,6 @@
# undef __USE_FILE_OFFSET64
#endif
-
#ifdef __NR_ulimit
#include <sys/types.h>
diff --git a/libc/sysdeps/linux/common/umask.c b/libc/sysdeps/linux/common/umask.c
index 4a5b33abf..20fb12385 100644
--- a/libc/sysdeps/linux/common/umask.c
+++ b/libc/sysdeps/linux/common/umask.c
@@ -2,9 +2,9 @@
/*
* umask() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/umount.c b/libc/sysdeps/linux/common/umount.c
index 158aefc5f..1480b63cd 100644
--- a/libc/sysdeps/linux/common/umount.c
+++ b/libc/sysdeps/linux/common/umount.c
@@ -2,25 +2,23 @@
/*
* umount() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
-
/* arch provides umount() syscall */
#ifdef __NR_umount
-#include <sys/mount.h>
+# include <sys/mount.h>
_syscall1(int, umount, const char *, specialfile);
-
/* arch provides umount2() syscall */
#elif defined __NR_umount2
-#define __NR___syscall_umount2 __NR_umount2
+# define __NR___syscall_umount2 __NR_umount2
static inline _syscall2(int, __syscall_umount2, const char *, special_file, int, flags);
int umount(const char *special_file)
@@ -28,7 +26,6 @@ int umount(const char *special_file)
return (__syscall_umount2(special_file, 0));
}
-
/* arch doesn't provide any umount syscall !? */
#else
diff --git a/libc/sysdeps/linux/common/umount2.c b/libc/sysdeps/linux/common/umount2.c
index 467ec1dbc..b68c4da9c 100644
--- a/libc/sysdeps/linux/common/umount2.c
+++ b/libc/sysdeps/linux/common/umount2.c
@@ -2,9 +2,9 @@
/*
* umount2() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/uname.c b/libc/sysdeps/linux/common/uname.c
index 936b862c0..8c51f1f76 100644
--- a/libc/sysdeps/linux/common/uname.c
+++ b/libc/sysdeps/linux/common/uname.c
@@ -2,13 +2,15 @@
/*
* uname() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <sys/utsname.h>
-_syscall1(int, uname, struct utsname *, buf);
+
libc_hidden_proto(uname)
+
+_syscall1(int, uname, struct utsname *, buf);
libc_hidden_def(uname)
diff --git a/libc/sysdeps/linux/common/unlink.c b/libc/sysdeps/linux/common/unlink.c
index 37c145226..1ecefd70d 100644
--- a/libc/sysdeps/linux/common/unlink.c
+++ b/libc/sysdeps/linux/common/unlink.c
@@ -2,13 +2,15 @@
/*
* unlink() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <unistd.h>
-_syscall1(int, unlink, const char *, pathname);
+
libc_hidden_proto(unlink)
+
+_syscall1(int, unlink, const char *, pathname);
libc_hidden_def(unlink)
diff --git a/libc/sysdeps/linux/common/uselib.c b/libc/sysdeps/linux/common/uselib.c
index b0b84a775..952169f90 100644
--- a/libc/sysdeps/linux/common/uselib.c
+++ b/libc/sysdeps/linux/common/uselib.c
@@ -2,9 +2,9 @@
/*
* uselib() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/ustat.c b/libc/sysdeps/linux/common/ustat.c
index 4ee1c41d1..73e74e8e1 100644
--- a/libc/sysdeps/linux/common/ustat.c
+++ b/libc/sysdeps/linux/common/ustat.c
@@ -2,9 +2,9 @@
/*
* ustat() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/utime.c b/libc/sysdeps/linux/common/utime.c
index a01da3697..5641cc6f0 100644
--- a/libc/sysdeps/linux/common/utime.c
+++ b/libc/sysdeps/linux/common/utime.c
@@ -2,13 +2,16 @@
/*
* utime() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <utime.h>
+
+libc_hidden_proto(utime)
+
#ifdef __NR_utime
attribute_hidden _syscall2(int, utime, const char *, file, const struct utimbuf *, times);
#else
@@ -36,5 +39,4 @@ int utime(const char *file, const struct utimbuf *times)
return utimes(file, timevals);
}
#endif
-libc_hidden_proto(utime)
libc_hidden_def(utime)
diff --git a/libc/sysdeps/linux/common/utimes.c b/libc/sysdeps/linux/common/utimes.c
index 4dfcfb30a..55f60d8c1 100644
--- a/libc/sysdeps/linux/common/utimes.c
+++ b/libc/sysdeps/linux/common/utimes.c
@@ -2,13 +2,17 @@
/*
* utimes() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
#include <utime.h>
+#include <sys/time.h>
+
+libc_hidden_proto(utimes)
+
#ifdef __NR_utimes
_syscall2(int, utimes, const char *, file, const struct timeval *, tvp);
#else
@@ -31,5 +35,4 @@ int utimes(const char *file, const struct timeval tvp[2])
return utime(file, times);
}
#endif
-libc_hidden_proto(utimes)
libc_hidden_def(utimes)
diff --git a/libc/sysdeps/linux/common/vfork.c b/libc/sysdeps/linux/common/vfork.c
index df00b27c3..b4dc2288f 100644
--- a/libc/sysdeps/linux/common/vfork.c
+++ b/libc/sysdeps/linux/common/vfork.c
@@ -2,11 +2,12 @@
#include <unistd.h>
#include <sys/types.h>
+libc_hidden_proto(vfork)
+
libc_hidden_proto(fork)
pid_t vfork(void)
{
return fork();
}
-libc_hidden_proto(vfork)
libc_hidden_def(vfork)
diff --git a/libc/sysdeps/linux/common/vhangup.c b/libc/sysdeps/linux/common/vhangup.c
index 5ff243916..f6dc0865f 100644
--- a/libc/sysdeps/linux/common/vhangup.c
+++ b/libc/sysdeps/linux/common/vhangup.c
@@ -2,9 +2,9 @@
/*
* vhangup() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/wait4.c b/libc/sysdeps/linux/common/wait4.c
index 9acca8ff8..9d9de58d6 100644
--- a/libc/sysdeps/linux/common/wait4.c
+++ b/libc/sysdeps/linux/common/wait4.c
@@ -2,14 +2,17 @@
/*
* wait4() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
+#include <sys/wait.h>
#include <sys/resource.h>
+libc_hidden_proto(wait4)
+
#define __NR___syscall_wait4 __NR_wait4
static inline _syscall4(int, __syscall_wait4, __kernel_pid_t, pid,
int *, status, int, opts, struct rusage *, rusage);
@@ -18,5 +21,4 @@ pid_t wait4(pid_t pid, int *status, int opts, struct rusage *rusage)
{
return (__syscall_wait4(pid, status, opts, rusage));
}
-libc_hidden_proto(wait4)
libc_hidden_def(wait4)
diff --git a/libc/sysdeps/linux/common/write.c b/libc/sysdeps/linux/common/write.c
index 814e68cc6..e27bfe06f 100644
--- a/libc/sysdeps/linux/common/write.c
+++ b/libc/sysdeps/linux/common/write.c
@@ -2,9 +2,9 @@
/*
* write() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/writev.c b/libc/sysdeps/linux/common/writev.c
index 4979fade9..4efff02fb 100644
--- a/libc/sysdeps/linux/common/writev.c
+++ b/libc/sysdeps/linux/common/writev.c
@@ -2,9 +2,9 @@
/*
* writev() for uClibc
*
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include "syscalls.h"
diff --git a/libc/sysdeps/linux/common/xattr.c b/libc/sysdeps/linux/common/xattr.c
index 556cd1a57..259ccc155 100644
--- a/libc/sysdeps/linux/common/xattr.c
+++ b/libc/sysdeps/linux/common/xattr.c
@@ -1,8 +1,10 @@
/*
- * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvs/uClibc/libc/sysdeps/linux/common/xattr.c,v 1.2 2004/12/22 19:53:11 andersen Exp $
+ * Copyright (C) 2004 <solar@gentoo.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
- * This file provides the following Extended Attribute system calls to uClibc.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+/* This file provides the following Extended Attribute system calls to uClibc.
*
* setxattr(), lsetxattr(), fsetxattr(),
* getxattr(), lgetxattr(), fgetxattr(),
diff --git a/libc/sysdeps/linux/cris/__longjmp.S b/libc/sysdeps/linux/cris/__longjmp.S
index 98472a673..a4a5d4994 100644
--- a/libc/sysdeps/linux/cris/__longjmp.S
+++ b/libc/sysdeps/linux/cris/__longjmp.S
@@ -17,6 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <features.h>
#include <sysdep.h>
#define _SETJMP_H
#define _ASM
@@ -35,6 +36,5 @@ ENTRY (__longjmp)
movem [$r10],$pc
END (__longjmp)
- .weak longjmp
- longjmp = __longjmp
-
+libc_hidden_def(__longjmp)
+strong_alias(__longjmp,longjmp)
diff --git a/libc/sysdeps/linux/cris/brk.c b/libc/sysdeps/linux/cris/brk.c
index 8b5aa680c..42a3b6de3 100644
--- a/libc/sysdeps/linux/cris/brk.c
+++ b/libc/sysdeps/linux/cris/brk.c
@@ -1,8 +1,16 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
#include <unistd.h>
#include <sys/syscall.h>
#include <errno.h>
#include "sysdep.h"
+libc_hidden_proto(brk)
+
extern void * __curbrk;
extern int __init_brk (void);
@@ -29,5 +37,4 @@ int brk(void * end_data_seg)
return -1;
}
-libc_hidden_proto(brk)
libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/cris/fork.c b/libc/sysdeps/linux/cris/fork.c
index 11b546127..53c071e5c 100644
--- a/libc/sysdeps/linux/cris/fork.c
+++ b/libc/sysdeps/linux/cris/fork.c
@@ -1,3 +1,9 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
#include <sysdep.h>
#define __NR___libc_fork __NR_fork
diff --git a/libc/sysdeps/linux/cris/sbrk.c b/libc/sysdeps/linux/cris/sbrk.c
index 9eb9a2a0e..04c4b5b0a 100644
--- a/libc/sysdeps/linux/cris/sbrk.c
+++ b/libc/sysdeps/linux/cris/sbrk.c
@@ -1,10 +1,17 @@
/* From libc-5.3.12 */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <unistd.h>
#include <sys/syscall.h>
#include <errno.h>
#include "sysdep.h"
+libc_hidden_proto(sbrk)
+
extern void * __curbrk;
extern int __init_brk (void);
@@ -34,5 +41,4 @@ sbrk(intptr_t increment)
}
return ((void *) -1);
}
-libc_hidden_proto(sbrk)
libc_hidden_def(sbrk)
diff --git a/libc/sysdeps/linux/e1/longjmp.c b/libc/sysdeps/linux/e1/longjmp.c
index 306638937..e628bd7e0 100644
--- a/libc/sysdeps/linux/e1/longjmp.c
+++ b/libc/sysdeps/linux/e1/longjmp.c
@@ -1,6 +1,9 @@
-/* This file is lisenced under LGPL
- * Copyright (C) 2002-2003, George Thanos <george.thanos@gdt.gr>
- * Yannis Mitsos <yannis.mitsos@gdt.gr>
+/*
+ * Copyright (C) 2002-2003, George Thanos <george.thanos@gdt.gr>
+ * Yannis Mitsos <yannis.mitsos@gdt.gr>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include <syscall.h>
diff --git a/libc/sysdeps/linux/e1/vfork.c b/libc/sysdeps/linux/e1/vfork.c
index ec9961d62..36f176acb 100644
--- a/libc/sysdeps/linux/e1/vfork.c
+++ b/libc/sysdeps/linux/e1/vfork.c
@@ -1,5 +1,14 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
#include <sys/types.h>
#include <sys/syscall.h>
#include <errno.h>
+libc_hidden_proto(vfork)
+
_syscall0(pid_t, vfork);
+libc_hidden_def(vfork)
diff --git a/libc/sysdeps/linux/frv/__longjmp.S b/libc/sysdeps/linux/frv/__longjmp.S
index a61f8d4e0..c3145c84f 100644
--- a/libc/sysdeps/linux/frv/__longjmp.S
+++ b/libc/sysdeps/linux/frv/__longjmp.S
@@ -1,3 +1,9 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
#define _SETJMP_H
#define _ASM
#include <bits/setjmp.h>
@@ -73,3 +79,5 @@ __longjmp:
ret
.Lend2:
.size __longjmp,.Lend2-__longjmp
+
+libc_hidden_def(__longjmp)
diff --git a/libc/sysdeps/linux/frv/brk.c b/libc/sysdeps/linux/frv/brk.c
index 443c03b25..9af08c37d 100644
--- a/libc/sysdeps/linux/frv/brk.c
+++ b/libc/sysdeps/linux/frv/brk.c
@@ -1,9 +1,16 @@
/* From libc-5.3.12 */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <errno.h>
#include <unistd.h>
#include <sys/syscall.h>
+libc_hidden_proto(brk)
+
extern void * __curbrk;
extern int __init_brk (void);
@@ -20,5 +27,4 @@ int brk(void * end_data_seg)
}
return -1;
}
-libc_hidden_proto(brk)
libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/frv/fstat.c b/libc/sysdeps/linux/frv/fstat.c
index bf031bbbc..92c8df9d2 100644
--- a/libc/sysdeps/linux/frv/fstat.c
+++ b/libc/sysdeps/linux/frv/fstat.c
@@ -1,24 +1,12 @@
/*
* Syscalls for uClibc
*
- * Copyright (C) 2001-2003 by Erik Andersen
- * Extracted from ../common/syscalls.c by Erik Andersen <andersen@codepoet.org>
- * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+/* Extracted from ../common/syscalls.c by Erik Andersen <andersen@codepoet.org>
+ * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
*/
#define _GNU_SOURCE
@@ -41,7 +29,7 @@
#include <bits/stat.h>
#define __NR___syscall_fstat __NR_fstat
-attribute_hidden _syscall2(int, __syscall_fstat, int, fd, struct stat *, buf);
+static inline _syscall2(int, __syscall_fstat, int, fd, struct stat *, buf);
strong_alias(__syscall_fstat,fstat)
libc_hidden_proto(fstat)
libc_hidden_def(fstat)
diff --git a/libc/sysdeps/linux/frv/fstat64.c b/libc/sysdeps/linux/frv/fstat64.c
index 744c5915a..ff7f2397f 100644
--- a/libc/sysdeps/linux/frv/fstat64.c
+++ b/libc/sysdeps/linux/frv/fstat64.c
@@ -1,24 +1,12 @@
/*
* Syscalls for uClibc
*
- * Copyright (C) 2001-2003 by Erik Andersen
- * Extracted from ../common/syscalls.c by Erik Andersen <andersen@codepoet.org>
- * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+/* Extracted from ../common/syscalls.c by Erik Andersen <andersen@codepoet.org>
+ * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
*/
#define _GNU_SOURCE
@@ -42,7 +30,7 @@
#if defined __UCLIBC_HAS_LFS__
#define __NR___syscall_fstat64 __NR_fstat64
-attribute_hidden _syscall2(int, __syscall_fstat64, int, fd, struct stat64 *, buf);
+static inline _syscall2(int, __syscall_fstat64, int, fd, struct stat64 *, buf);
strong_alias(__syscall_fstat64,fstat64)
libc_hidden_proto(fstat64)
libc_hidden_def(fstat64)
diff --git a/libc/sysdeps/linux/frv/lstat.c b/libc/sysdeps/linux/frv/lstat.c
index 63c547c1b..3170e79fb 100644
--- a/libc/sysdeps/linux/frv/lstat.c
+++ b/libc/sysdeps/linux/frv/lstat.c
@@ -1,24 +1,12 @@
/*
* Syscalls for uClibc
*
- * Copyright (C) 2001-2003 by Erik Andersen
- * Extracted from ../common/syscalls.c by Erik Andersen <andersen@codepoet.org>
- * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+/* Extracted from ../common/syscalls.c by Erik Andersen <andersen@codepoet.org>
+ * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
*/
#define _GNU_SOURCE
@@ -41,7 +29,7 @@
#include <bits/stat.h>
#define __NR___syscall_lstat __NR_lstat
-attribute_hidden _syscall2(int, __syscall_lstat, const char *, file_name, struct stat *, buf);
+static inline _syscall2(int, __syscall_lstat, const char *, file_name, struct stat *, buf);
strong_alias(__syscall_lstat,lstat)
libc_hidden_proto(lstat)
libc_hidden_def(lstat)
diff --git a/libc/sysdeps/linux/frv/lstat64.c b/libc/sysdeps/linux/frv/lstat64.c
index ea8abf892..969ef8d65 100644
--- a/libc/sysdeps/linux/frv/lstat64.c
+++ b/libc/sysdeps/linux/frv/lstat64.c
@@ -1,24 +1,12 @@
/*
* Syscalls for uClibc
*
- * Copyright (C) 2001-2003 by Erik Andersen
- * Extracted from ../common/syscalls.c by Erik Andersen <andersen@codepoet.org>
- * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+/* Extracted from ../common/syscalls.c by Erik Andersen <andersen@codepoet.org>
+ * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
*/
#define _GNU_SOURCE
@@ -42,7 +30,7 @@
#if defined __UCLIBC_HAS_LFS__
#define __NR___syscall_lstat64 __NR_lstat64
-attribute_hidden _syscall2(int, __syscall_lstat64, const char *, file_name, struct stat64 *, buf);
+static inline _syscall2(int, __syscall_lstat64, const char *, file_name, struct stat64 *, buf);
strong_alias(__syscall_lstat64,lstat64)
libc_hidden_proto(lstat64)
libc_hidden_def(lstat64)
diff --git a/libc/sysdeps/linux/frv/mmap.c b/libc/sysdeps/linux/frv/mmap.c
index 01dcfb627..d4cfcb062 100644
--- a/libc/sysdeps/linux/frv/mmap.c
+++ b/libc/sysdeps/linux/frv/mmap.c
@@ -29,6 +29,8 @@
#include <sys/syscall.h>
#include <sys/mman.h>
+libc_hidden_proto(mmap)
+
#define __NR___syscall_mmap2 __NR_mmap2
static inline _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr,
size_t, len, int, prot, int, flags, int, fd, off_t, offset);
@@ -46,5 +48,4 @@ __ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offs
}
return(__syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT)));
}
-libc_hidden_proto(mmap)
libc_hidden_def(mmap)
diff --git a/libc/sysdeps/linux/frv/sbrk.c b/libc/sysdeps/linux/frv/sbrk.c
index 7ccefdf58..343dc14fb 100644
--- a/libc/sysdeps/linux/frv/sbrk.c
+++ b/libc/sysdeps/linux/frv/sbrk.c
@@ -4,6 +4,8 @@
#include <unistd.h>
#include <sys/syscall.h>
+libc_hidden_proto(sbrk)
+
extern void * __curbrk;
extern int __init_brk (void);
@@ -23,5 +25,4 @@ sbrk(intptr_t increment)
}
return ((void *) -1);
}
-libc_hidden_proto(sbrk)
libc_hidden_def(sbrk)
diff --git a/libc/sysdeps/linux/frv/stat.c b/libc/sysdeps/linux/frv/stat.c
index 0d531e998..82e3cfa8b 100644
--- a/libc/sysdeps/linux/frv/stat.c
+++ b/libc/sysdeps/linux/frv/stat.c
@@ -1,24 +1,12 @@
/*
* Syscalls for uClibc
*
- * Copyright (C) 2001-2003 by Erik Andersen
- * Extracted from ../common/syscalls.c by Erik Andersen <andersen@codepoet.org>
- * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+/* Extracted from ../common/syscalls.c by Erik Andersen <andersen@codepoet.org>
+ * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
*/
#define _GNU_SOURCE
@@ -41,7 +29,7 @@
#include <bits/stat.h>
#define __NR___syscall_stat __NR_stat
-attribute_hidden _syscall2(int, __syscall_stat, const char *, file_name, struct stat *, buf);
+static inline _syscall2(int, __syscall_stat, const char *, file_name, struct stat *, buf);
strong_alias(__syscall_stat,stat)
libc_hidden_proto(stat)
libc_hidden_def(stat)
diff --git a/libc/sysdeps/linux/frv/stat64.c b/libc/sysdeps/linux/frv/stat64.c
index 3c702d885..b10e66d8a 100644
--- a/libc/sysdeps/linux/frv/stat64.c
+++ b/libc/sysdeps/linux/frv/stat64.c
@@ -1,24 +1,12 @@
/*
* Syscalls for uClibc
*
- * Copyright (C) 2001-2003 by Erik Andersen
- * Extracted from ../common/syscalls.c by Erik Andersen <andersen@codepoet.org>
- * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+/* Extracted from ../common/syscalls.c by Erik Andersen <andersen@codepoet.org>
+ * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
*/
#define _GNU_SOURCE
@@ -42,7 +30,7 @@
#if defined __UCLIBC_HAS_LFS__
#define __NR___syscall_stat64 __NR_stat64
-attribute_hidden _syscall2(int, __syscall_stat64, const char *, file_name, struct stat64 *, buf);
+static inline _syscall2(int, __syscall_stat64, const char *, file_name, struct stat64 *, buf);
strong_alias(__syscall_stat64,stat64)
libc_hidden_proto(stat64)
libc_hidden_def(stat64)
diff --git a/libc/sysdeps/linux/h8300/brk.c b/libc/sysdeps/linux/h8300/brk.c
index 0bba5de99..0da4286e7 100644
--- a/libc/sysdeps/linux/h8300/brk.c
+++ b/libc/sysdeps/linux/h8300/brk.c
@@ -1,14 +1,19 @@
/* brk on H8/300 by ysato */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <errno.h>
#include <unistd.h>
#include <sys/syscall.h>
+libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
void *__curbrk = 0;
-
int brk (void *addr)
{
void *newbrk;
@@ -31,5 +36,4 @@ int brk (void *addr)
return 0;
}
-libc_hidden_proto(brk)
libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/h8300/vfork.S b/libc/sysdeps/linux/h8300/vfork.S
index 94e946912..343bb0183 100644
--- a/libc/sysdeps/linux/h8300/vfork.S
+++ b/libc/sysdeps/linux/h8300/vfork.S
@@ -37,5 +37,3 @@ fix_errno:
sub.l er0,er0
dec.l #1,er0
jmp @er1 /* don't return, just jmp directly */
-
-libc_hidden_def(_vork)
diff --git a/libc/sysdeps/linux/hppa/__syscall_error.c b/libc/sysdeps/linux/hppa/__syscall_error.c
index de65a1f39..4e7a2b3a2 100644
--- a/libc/sysdeps/linux/hppa/__syscall_error.c
+++ b/libc/sysdeps/linux/hppa/__syscall_error.c
@@ -1,21 +1,9 @@
/* Wrapper for setting errno.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <errno.h>
#include <features.h>
diff --git a/libc/sysdeps/linux/hppa/brk.c b/libc/sysdeps/linux/hppa/brk.c
index 0ac8236c8..a5a35050f 100644
--- a/libc/sysdeps/linux/hppa/brk.c
+++ b/libc/sysdeps/linux/hppa/brk.c
@@ -20,6 +20,8 @@
#include <errno.h>
#include <sys/syscall.h>
+libc_hidden_proto(brk)
+
/* This must be initialized data because commons can't have aliases. */
void *__curbrk = 0;
@@ -38,5 +40,4 @@ brk (void *addr)
return 0;
}
-libc_hidden_proto(brk)
libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/hppa/mmap.c b/libc/sysdeps/linux/hppa/mmap.c
index b69f0a2f2..baaee6847 100644
--- a/libc/sysdeps/linux/hppa/mmap.c
+++ b/libc/sysdeps/linux/hppa/mmap.c
@@ -2,10 +2,10 @@
/*
* mmap() for uClibc/x86_64
*
- * Copyright (C) 2005 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
* Copyright (C) 2005 by Mike Frysinger <vapier@gentoo.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include <errno.h>
@@ -13,7 +13,8 @@
#include <sys/mman.h>
#include <sys/syscall.h>
+libc_hidden_proto(mmap)
+
_syscall6(void *, mmap, void *, start, size_t, length, int, prot,
int, flags, int, fd, off_t, offset);
-libc_hidden_proto(mmap)
libc_hidden_def(mmap)
diff --git a/libc/sysdeps/linux/i386/__syscall_error.c b/libc/sysdeps/linux/i386/__syscall_error.c
index 133500cb6..94302e6bd 100644
--- a/libc/sysdeps/linux/i386/__syscall_error.c
+++ b/libc/sysdeps/linux/i386/__syscall_error.c
@@ -1,24 +1,8 @@
/* Wrapper for setting errno.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <errno.h>
-#include <features.h>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
/* This routine is jumped to by all the syscall handlers, to stash
* an error number into errno. */
@@ -36,6 +20,10 @@
* We have to stash the errno from %eax in a local stack var because
* __set_errno will prob call a function thus clobbering %eax on us.
*/
+
+#include <errno.h>
+#include <features.h>
+
int attribute_hidden __syscall_error(void)
{
register int edx asm("%edx");
diff --git a/libc/sysdeps/linux/i386/brk.c b/libc/sysdeps/linux/i386/brk.c
index cf7e19be8..1b3128f9c 100644
--- a/libc/sysdeps/linux/i386/brk.c
+++ b/libc/sysdeps/linux/i386/brk.c
@@ -21,6 +21,7 @@
#include <unistd.h>
#include <sys/syscall.h>
+libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
void *__curbrk = 0;
@@ -46,5 +47,4 @@ int brk (void *addr)
return 0;
}
-libc_hidden_proto(brk)
libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/m68k/__syscall_error.c b/libc/sysdeps/linux/m68k/__syscall_error.c
index d6ac82c12..b68298074 100644
--- a/libc/sysdeps/linux/m68k/__syscall_error.c
+++ b/libc/sysdeps/linux/m68k/__syscall_error.c
@@ -1,21 +1,9 @@
/* Wrapper for setting errno.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <errno.h>
#include <features.h>
diff --git a/libc/sysdeps/linux/m68k/brk.c b/libc/sysdeps/linux/m68k/brk.c
index 5204c7493..cad5976de 100644
--- a/libc/sysdeps/linux/m68k/brk.c
+++ b/libc/sysdeps/linux/m68k/brk.c
@@ -1,9 +1,16 @@
/* consider this code LGPL - davidm */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <unistd.h>
#include <sys/syscall.h>
#include <errno.h>
+libc_hidden_proto(brk)
+
/* This must be initialized data because commons can't have aliases. */
void * __curbrk = 0;
@@ -28,5 +35,4 @@ int brk (void *addr)
return 0;
}
-libc_hidden_proto(brk)
libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/m68k/ptrace.c b/libc/sysdeps/linux/m68k/ptrace.c
index e595a6ecd..43487546e 100644
--- a/libc/sysdeps/linux/m68k/ptrace.c
+++ b/libc/sysdeps/linux/m68k/ptrace.c
@@ -1,3 +1,8 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <errno.h>
#include <asm/ptrace.h>
diff --git a/libc/sysdeps/linux/m68k/vfork.S b/libc/sysdeps/linux/m68k/vfork.S
index d5e26ddd2..ec319d077 100644
--- a/libc/sysdeps/linux/m68k/vfork.S
+++ b/libc/sysdeps/linux/m68k/vfork.S
@@ -1,3 +1,9 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
#include <features.h>
#include <asm/unistd.h>
diff --git a/libc/sysdeps/linux/microblaze/__longjmp.S b/libc/sysdeps/linux/microblaze/__longjmp.S
index a58418ae9..e87a6f6a3 100644
--- a/libc/sysdeps/linux/microblaze/__longjmp.S
+++ b/libc/sysdeps/linux/microblaze/__longjmp.S
@@ -45,5 +45,3 @@ C_END(__longjmp)
.weak C_SYMBOL_NAME(__sigprocmask)
C_SYMBOL_NAME(__sigprocmask) = C_SYMBOL_NAME(sigprocmask)
-
-libc_hidden_def(__longjmp)
diff --git a/libc/sysdeps/linux/microblaze/mmap.c b/libc/sysdeps/linux/microblaze/mmap.c
index 592161789..cad528d17 100644
--- a/libc/sysdeps/linux/microblaze/mmap.c
+++ b/libc/sysdeps/linux/microblaze/mmap.c
@@ -1,11 +1,17 @@
/* Use new style mmap for microblaze */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <unistd.h>
#include <errno.h>
#include <sys/mman.h>
#include <sys/syscall.h>
+libc_hidden_proto(mmap)
+
_syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
int, flags, int, fd, __off_t, offset);
-libc_hidden_proto(mmap)
libc_hidden_def(mmap)
diff --git a/libc/sysdeps/linux/microblaze/vfork.S b/libc/sysdeps/linux/microblaze/vfork.S
index b641fedf1..a82fbb209 100644
--- a/libc/sysdeps/linux/microblaze/vfork.S
+++ b/libc/sysdeps/linux/microblaze/vfork.S
@@ -40,5 +40,3 @@ C_ENTRY (vfork):
rtsd r15, 8 // error return
nop
C_END(vfork)
-
-libc_hidden_def(vfork)
diff --git a/libc/sysdeps/linux/mips/__longjmp.c b/libc/sysdeps/linux/mips/__longjmp.c
index fb042218b..acb8d2313 100644
--- a/libc/sysdeps/linux/mips/__longjmp.c
+++ b/libc/sysdeps/linux/mips/__longjmp.c
@@ -23,6 +23,8 @@
#undef __longjmp
+libc_hidden_proto(__longjmp)
+
#ifndef __GNUC__
#error This file uses GNU C extensions; you must compile with GCC.
#endif
@@ -82,5 +84,4 @@ void __longjmp (__jmp_buf env, int val_arg)
/* Avoid `volatile function does return' warnings. */
for (;;);
}
-libc_hidden_proto(__longjmp)
libc_hidden_def(__longjmp)
diff --git a/libc/sysdeps/linux/mips/__syscall_error.c b/libc/sysdeps/linux/mips/__syscall_error.c
index de65a1f39..4e7a2b3a2 100644
--- a/libc/sysdeps/linux/mips/__syscall_error.c
+++ b/libc/sysdeps/linux/mips/__syscall_error.c
@@ -1,21 +1,9 @@
/* Wrapper for setting errno.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <errno.h>
#include <features.h>
diff --git a/libc/sysdeps/linux/mips/brk.c b/libc/sysdeps/linux/mips/brk.c
index 29479f621..cf48288f4 100644
--- a/libc/sysdeps/linux/mips/brk.c
+++ b/libc/sysdeps/linux/mips/brk.c
@@ -21,6 +21,8 @@
#include <unistd.h>
#include <sys/syscall.h>
+libc_hidden_proto(brk)
+
void *__curbrk = 0;
int brk (void *addr)
@@ -48,5 +50,4 @@ int brk (void *addr)
return 0;
}
-libc_hidden_proto(brk)
libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/mips/cacheflush.c b/libc/sysdeps/linux/mips/cacheflush.c
index 18d7e467c..cd23e98d0 100644
--- a/libc/sysdeps/linux/mips/cacheflush.c
+++ b/libc/sysdeps/linux/mips/cacheflush.c
@@ -21,6 +21,6 @@
#include <sys/syscall.h>
_syscall3(int, cacheflush, void *, addr, const int, nbytes, const int, op);
-weak_alias(cacheflush, _flush_cache)
+strong_alias(cacheflush, _flush_cache)
_syscall3(int, cachectl, void *, addr, const int, nbytes, const int, op);
diff --git a/libc/sysdeps/linux/mips/mmap.c b/libc/sysdeps/linux/mips/mmap.c
index 125523eef..4e0897f45 100644
--- a/libc/sysdeps/linux/mips/mmap.c
+++ b/libc/sysdeps/linux/mips/mmap.c
@@ -1,9 +1,17 @@
/* Use new style mmap for mips */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
#include <unistd.h>
#include <errno.h>
#include <sys/mman.h>
#include <sys/syscall.h>
+libc_hidden_proto(mmap)
+
#if 0
/* For now, leave mmap using mmap1 since mmap2 seems
* to have issues (i.e. it doesn't work 100% properly).
@@ -16,5 +24,4 @@
_syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
int, flags, int, fd, __off_t, offset);
-libc_hidden_proto(mmap)
libc_hidden_def(mmap)
diff --git a/libc/sysdeps/linux/mips/pipe.S b/libc/sysdeps/linux/mips/pipe.S
index 093b4dddc..e58b530dc 100644
--- a/libc/sysdeps/linux/mips/pipe.S
+++ b/libc/sysdeps/linux/mips/pipe.S
@@ -1,4 +1,9 @@
/* pipe system call for Linux/MIPS */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
/*see uClibc's sh/pipe.c and glibc-2.2.4's mips/pipe.S */
diff --git a/libc/sysdeps/linux/mips/pipe.c b/libc/sysdeps/linux/mips/pipe.c
index a4a7e9da1..bfca4b60d 100644
--- a/libc/sysdeps/linux/mips/pipe.c
+++ b/libc/sysdeps/linux/mips/pipe.c
@@ -1,11 +1,17 @@
/* pipe system call for Linux/MIPS */
-
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
/*see uClibc's sh/pipe.c and glibc-2.2.4's mips/pipe.S */
#include <errno.h>
#include <unistd.h>
#include <syscall.h>
+libc_hidden_proto(pipe)
+
int pipe(int *fd)
{
register long int res __asm__ ("$2"); // v0
@@ -21,5 +27,4 @@ int pipe(int *fd)
fd[1] = res2;
return(0);
}
-libc_hidden_proto(pipe)
libc_hidden_def(pipe)
diff --git a/libc/sysdeps/linux/mips/pread_write.c b/libc/sysdeps/linux/mips/pread_write.c
index 4ee81d4d9..3ae4a98b7 100644
--- a/libc/sysdeps/linux/mips/pread_write.c
+++ b/libc/sysdeps/linux/mips/pread_write.c
@@ -1,26 +1,15 @@
/* vi: set sw=4 ts=4:
*
- * Copyright (C) 2002 by Erik Andersen <andersen@uclibc.org>
- * Based in part on the files
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+/* Based in part on the files
* ./sysdeps/unix/sysv/linux/pwrite.c,
* ./sysdeps/unix/sysv/linux/pread.c,
* sysdeps/posix/pread.c
* sysdeps/posix/pwrite.c
* from GNU libc 2.2.5, but reworked considerably...
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define _GNU_SOURCE
diff --git a/libc/sysdeps/linux/nios/brk.c b/libc/sysdeps/linux/nios/brk.c
index 9c9f2d80f..2c252f90c 100644
--- a/libc/sysdeps/linux/nios/brk.c
+++ b/libc/sysdeps/linux/nios/brk.c
@@ -21,6 +21,7 @@
#include <sys/syscall.h>
#include <errno.h>
+libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
void *__curbrk = 0;
@@ -42,5 +43,4 @@ int brk (void *addr)
return 0;
}
-libc_hidden_proto(brk)
libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/nios2/brk.c b/libc/sysdeps/linux/nios2/brk.c
index 921cd771b..0e5811cee 100644
--- a/libc/sysdeps/linux/nios2/brk.c
+++ b/libc/sysdeps/linux/nios2/brk.c
@@ -21,6 +21,7 @@
#include <sys/syscall.h>
#include <errno.h>
+libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
void *__curbrk = 0;
@@ -44,5 +45,4 @@ int brk (void *addr)
return 0;
}
-libc_hidden_proto(brk)
libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/nios2/clone.c b/libc/sysdeps/linux/nios2/clone.c
index 0555658b4..6bb79ade5 100644
--- a/libc/sysdeps/linux/nios2/clone.c
+++ b/libc/sysdeps/linux/nios2/clone.c
@@ -1,14 +1,14 @@
/*
* libc/sysdeps/linux/nios2/clone.c -- `clone' syscall for linux/nios2
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
*
* Copyright (C) 2004,05 Microtronix Datacom Ltd
* Copyright (C) 2002,03 NEC Electronics Corporation
* Copyright (C) 2002,03 Miles Bader <miles@gnu.org>
*
- * This file is subject to the terms and conditions of the GNU Lesser
- * General Public License. See the file COPYING.LIB in the main
- * directory of this archive for more details.
- *
* Written by Miles Bader <miles@gnu.org>
* Nios2 port by Wentao Xu
*/
diff --git a/libc/sysdeps/linux/powerpc/__syscall_error.c b/libc/sysdeps/linux/powerpc/__syscall_error.c
index de65a1f39..4e7a2b3a2 100644
--- a/libc/sysdeps/linux/powerpc/__syscall_error.c
+++ b/libc/sysdeps/linux/powerpc/__syscall_error.c
@@ -1,21 +1,9 @@
/* Wrapper for setting errno.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <errno.h>
#include <features.h>
diff --git a/libc/sysdeps/linux/powerpc/ioctl.c b/libc/sysdeps/linux/powerpc/ioctl.c
index 211bb3b25..7f92be410 100644
--- a/libc/sysdeps/linux/powerpc/ioctl.c
+++ b/libc/sysdeps/linux/powerpc/ioctl.c
@@ -22,6 +22,8 @@
#include <sys/ioctl.h>
#include <sys/syscall.h>
+libc_hidden_proto(ioctl)
+
libc_hidden_proto(tcsetattr)
libc_hidden_proto(tcgetattr)
@@ -69,5 +71,4 @@ int ioctl (int fd, unsigned long int request, ...)
return result;
}
-libc_hidden_proto(ioctl)
libc_hidden_def(ioctl)
diff --git a/libc/sysdeps/linux/powerpc/mmap.c b/libc/sysdeps/linux/powerpc/mmap.c
index 8003c8bbc..62c97c1c5 100644
--- a/libc/sysdeps/linux/powerpc/mmap.c
+++ b/libc/sysdeps/linux/powerpc/mmap.c
@@ -1,9 +1,16 @@
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <unistd.h>
#include <sys/mman.h>
#include <errno.h>
#include <sys/syscall.h>
+libc_hidden_proto(mmap)
+
#define __syscall_clobbers \
"r9", "r10", "r11", "r12"
#define __syscall_return(type) \
@@ -45,5 +52,4 @@ void * mmap(void *start, size_t length, int prot, int flags, int fd,
__syscall_return (void *);
}
-libc_hidden_proto(mmap)
libc_hidden_def(mmap)
diff --git a/libc/sysdeps/linux/powerpc/pread_write.c b/libc/sysdeps/linux/powerpc/pread_write.c
index 1cf7f690b..b8d0caef4 100644
--- a/libc/sysdeps/linux/powerpc/pread_write.c
+++ b/libc/sysdeps/linux/powerpc/pread_write.c
@@ -1,26 +1,15 @@
/* vi: set sw=4 ts=4:
*
- * Copyright (C) 2002 by Erik Andersen <andersen@uclibc.org>
- * Based in part on the files
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+/* Based in part on the files
* ./sysdeps/unix/sysv/linux/pwrite.c,
* ./sysdeps/unix/sysv/linux/pread.c,
* sysdeps/posix/pread.c
* sysdeps/posix/pwrite.c
* from GNU libc 2.2.5, but reworked considerably...
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define _GNU_SOURCE
@@ -86,10 +75,10 @@ strong_alias(__libc_pwrite64,pwrite64)
#if ! defined __NR_pread || ! defined __NR_pwrite
-libc_hidden_proto(lseek)
-libc_hidden_proto(lseek64)
libc_hidden_proto(read)
libc_hidden_proto(write)
+libc_hidden_proto(lseek)
+libc_hidden_proto(lseek64)
static ssize_t __fake_pread_write(int fd, void *buf,
size_t count, off_t offset, int do_pwrite)
diff --git a/libc/sysdeps/linux/powerpc/vfork.c b/libc/sysdeps/linux/powerpc/vfork.c
index 92e9f8d63..16d66bd24 100644
--- a/libc/sysdeps/linux/powerpc/vfork.c
+++ b/libc/sysdeps/linux/powerpc/vfork.c
@@ -3,6 +3,8 @@
#include <errno.h>
#include <sys/syscall.h>
+libc_hidden_proto(vfork)
+
#define __syscall_clobbers \
"r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12"
#define __syscall_return(type) \
@@ -46,5 +48,4 @@ pid_t vfork(void)
__syscall_return (pid_t);
}
-libc_hidden_proto(vfork)
libc_hidden_def(vfork)
diff --git a/libc/sysdeps/linux/sh/__longjmp.S b/libc/sysdeps/linux/sh/__longjmp.S
index a9a7cba8a..a3151239e 100644
--- a/libc/sysdeps/linux/sh/__longjmp.S
+++ b/libc/sysdeps/linux/sh/__longjmp.S
@@ -64,5 +64,7 @@ __longjmp:
.size __longjmp,.-__longjmp
libc_hidden_def(__longjmp)
+/* sigprocmask is not defined here, why the weak then ?*/
+/* it should rather be libc_hidden_def(sigprocmask) if needed */
.weak __sigprocmask
__sigprocmask = sigprocmask
diff --git a/libc/sysdeps/linux/sh/brk.c b/libc/sysdeps/linux/sh/brk.c
index 443c03b25..9af08c37d 100644
--- a/libc/sysdeps/linux/sh/brk.c
+++ b/libc/sysdeps/linux/sh/brk.c
@@ -1,9 +1,16 @@
/* From libc-5.3.12 */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <errno.h>
#include <unistd.h>
#include <sys/syscall.h>
+libc_hidden_proto(brk)
+
extern void * __curbrk;
extern int __init_brk (void);
@@ -20,5 +27,4 @@ int brk(void * end_data_seg)
}
return -1;
}
-libc_hidden_proto(brk)
libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/sh/mmap.c b/libc/sysdeps/linux/sh/mmap.c
index cefc532a2..6bc45e939 100644
--- a/libc/sysdeps/linux/sh/mmap.c
+++ b/libc/sysdeps/linux/sh/mmap.c
@@ -23,6 +23,8 @@
#include <errno.h>
#include <sys/mman.h>
+libc_hidden_proto(mmap)
+
#ifdef HIOS
# define __SH_SYSCALL6_TRAPA "0x2E"
#else
@@ -32,5 +34,4 @@
#include <sys/syscall.h>
_syscall6(__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot, int, flags, int, fd, __off_t, offset);
-libc_hidden_proto(mmap)
libc_hidden_def(mmap)
diff --git a/libc/sysdeps/linux/sh/pipe.c b/libc/sysdeps/linux/sh/pipe.c
index c8540c897..e4cc0080d 100644
--- a/libc/sysdeps/linux/sh/pipe.c
+++ b/libc/sysdeps/linux/sh/pipe.c
@@ -1,10 +1,16 @@
-
-/* Copyright (C) 2001 Lineo, <davidm@lineo.com> */
+/*
+ * Copyright (C) 2001 Lineo, <davidm@lineo.com>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <errno.h>
#include <unistd.h>
#include <syscall.h>
+libc_hidden_proto(pipe)
+
int pipe(int *fd)
{
long __res, __res2;
@@ -27,5 +33,4 @@ int pipe(int *fd)
fd[1] = __res2;
return(0);
}
-libc_hidden_proto(pipe)
libc_hidden_def(pipe)
diff --git a/libc/sysdeps/linux/sh/pread_write.c b/libc/sysdeps/linux/sh/pread_write.c
index 23454e035..4b6d57b08 100644
--- a/libc/sysdeps/linux/sh/pread_write.c
+++ b/libc/sysdeps/linux/sh/pread_write.c
@@ -1,26 +1,15 @@
/* vi: set sw=4 ts=4:
*
- * Copyright (C) 2002 by Erik Andersen <andersen@uclibc.org>
- * Based in part on the files
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+/* Based in part on the files
* ./sysdeps/unix/sysv/linux/pwrite.c,
* ./sysdeps/unix/sysv/linux/pread.c,
* sysdeps/posix/pread.c
* sysdeps/posix/pwrite.c
* from GNU libc 2.2.5, but reworked considerably...
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Library General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program 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 Library General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define _GNU_SOURCE
diff --git a/libc/sysdeps/linux/sh/sbrk.c b/libc/sysdeps/linux/sh/sbrk.c
index 7ccefdf58..343dc14fb 100644
--- a/libc/sysdeps/linux/sh/sbrk.c
+++ b/libc/sysdeps/linux/sh/sbrk.c
@@ -4,6 +4,8 @@
#include <unistd.h>
#include <sys/syscall.h>
+libc_hidden_proto(sbrk)
+
extern void * __curbrk;
extern int __init_brk (void);
@@ -23,5 +25,4 @@ sbrk(intptr_t increment)
}
return ((void *) -1);
}
-libc_hidden_proto(sbrk)
libc_hidden_def(sbrk)
diff --git a/libc/sysdeps/linux/sh64/brk.c b/libc/sysdeps/linux/sh64/brk.c
index 443c03b25..9af08c37d 100644
--- a/libc/sysdeps/linux/sh64/brk.c
+++ b/libc/sysdeps/linux/sh64/brk.c
@@ -1,9 +1,16 @@
/* From libc-5.3.12 */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <errno.h>
#include <unistd.h>
#include <sys/syscall.h>
+libc_hidden_proto(brk)
+
extern void * __curbrk;
extern int __init_brk (void);
@@ -20,5 +27,4 @@ int brk(void * end_data_seg)
}
return -1;
}
-libc_hidden_proto(brk)
libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/sh64/sbrk.c b/libc/sysdeps/linux/sh64/sbrk.c
index e9faf7db0..343dc14fb 100644
--- a/libc/sysdeps/linux/sh64/sbrk.c
+++ b/libc/sysdeps/linux/sh64/sbrk.c
@@ -4,13 +4,15 @@
#include <unistd.h>
#include <sys/syscall.h>
+libc_hidden_proto(sbrk)
+
extern void * __curbrk;
extern int __init_brk (void);
extern void *_brk(void *ptr) attribute_hidden;
-void attribute_hidden *
-__sbrk(intptr_t increment)
+void *
+sbrk(intptr_t increment)
{
if (__init_brk () == 0)
{
@@ -23,4 +25,4 @@ __sbrk(intptr_t increment)
}
return ((void *) -1);
}
-strong_alias(__sbrk,sbrk)
+libc_hidden_def(sbrk)
diff --git a/libc/sysdeps/linux/sparc/__syscall_error.c b/libc/sysdeps/linux/sparc/__syscall_error.c
index de65a1f39..4e7a2b3a2 100644
--- a/libc/sysdeps/linux/sparc/__syscall_error.c
+++ b/libc/sysdeps/linux/sparc/__syscall_error.c
@@ -1,21 +1,9 @@
/* Wrapper for setting errno.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <errno.h>
#include <features.h>
diff --git a/libc/sysdeps/linux/sparc/brk.c b/libc/sysdeps/linux/sparc/brk.c
index 21464f740..f6d5281d2 100644
--- a/libc/sysdeps/linux/sparc/brk.c
+++ b/libc/sysdeps/linux/sparc/brk.c
@@ -21,11 +21,11 @@
#include <unistd.h>
#include <sys/syscall.h>
+libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
void *__curbrk = 0;
-
int brk (void *addr)
{
void *newbrk;
@@ -47,5 +47,4 @@ int brk (void *addr)
return 0;
}
-libc_hidden_proto(brk)
libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/v850/__longjmp.S b/libc/sysdeps/linux/v850/__longjmp.S
index 98d99bc1e..87a77a215 100644
--- a/libc/sysdeps/linux/v850/__longjmp.S
+++ b/libc/sysdeps/linux/v850/__longjmp.S
@@ -41,4 +41,3 @@ C_END(__longjmp)
.weak C_SYMBOL_NAME(__sigprocmask)
C_SYMBOL_NAME(__sigprocmask) = C_SYMBOL_NAME(sigprocmask)
-libc_hidden_def(__longjmp)
diff --git a/libc/sysdeps/linux/v850/mmap.c b/libc/sysdeps/linux/v850/mmap.c
index f075ac77c..72fb37dd2 100644
--- a/libc/sysdeps/linux/v850/mmap.c
+++ b/libc/sysdeps/linux/v850/mmap.c
@@ -1,11 +1,17 @@
/* Use new style mmap for v850 */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <unistd.h>
#include <errno.h>
#include <sys/mman.h>
#include <sys/syscall.h>
+libc_hidden_proto(mmap)
+
_syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
int, flags, int, fd, __off_t, offset);
-libc_hidden_proto(mmap)
libc_hidden_def(mmap)
diff --git a/libc/sysdeps/linux/v850/vfork.S b/libc/sysdeps/linux/v850/vfork.S
index ace1bd16b..34a0ca64c 100644
--- a/libc/sysdeps/linux/v850/vfork.S
+++ b/libc/sysdeps/linux/v850/vfork.S
@@ -38,5 +38,3 @@ C_ENTRY (vfork):
st.w r10, 0[r11]
jmp [lp] // error return
C_END(vfork)
-
-libc_hidden_def(vfork)
diff --git a/libc/sysdeps/linux/x86_64/__syscall_error.c b/libc/sysdeps/linux/x86_64/__syscall_error.c
index d8cf84c2b..e196ed427 100644
--- a/libc/sysdeps/linux/x86_64/__syscall_error.c
+++ b/libc/sysdeps/linux/x86_64/__syscall_error.c
@@ -1,21 +1,9 @@
/* Wrapper for setting errno.
- Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+/*
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
#include <errno.h>
#include <features.h>
diff --git a/libc/sysdeps/linux/x86_64/brk.c b/libc/sysdeps/linux/x86_64/brk.c
index 8d85bcb3d..09d911066 100644
--- a/libc/sysdeps/linux/x86_64/brk.c
+++ b/libc/sysdeps/linux/x86_64/brk.c
@@ -21,6 +21,8 @@
#include <unistd.h>
#include <sys/syscall.h>
+libc_hidden_proto(brk)
+
/* This must be initialized data because commons can't have aliases. */
void *__curbrk = 0;
@@ -42,5 +44,4 @@ int brk (void *addr)
return 0;
}
-libc_hidden_proto(brk)
libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/x86_64/mmap.c b/libc/sysdeps/linux/x86_64/mmap.c
index b69f0a2f2..baaee6847 100644
--- a/libc/sysdeps/linux/x86_64/mmap.c
+++ b/libc/sysdeps/linux/x86_64/mmap.c
@@ -2,10 +2,10 @@
/*
* mmap() for uClibc/x86_64
*
- * Copyright (C) 2005 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
* Copyright (C) 2005 by Mike Frysinger <vapier@gentoo.org>
*
- * GNU Library General Public License (LGPL) version 2 or later.
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#include <errno.h>
@@ -13,7 +13,8 @@
#include <sys/mman.h>
#include <sys/syscall.h>
+libc_hidden_proto(mmap)
+
_syscall6(void *, mmap, void *, start, size_t, length, int, prot,
int, flags, int, fd, off_t, offset);
-libc_hidden_proto(mmap)
libc_hidden_def(mmap)