From 6f7dc709ed7e403af224b0fbb91e9619629eb2ec Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 14 Jan 2006 19:45:02 +0000 Subject: make DODEBUG=y happy, update sysdeps/common/* copyright --- libc/sysdeps/linux/common/__rt_sigtimedwait.c | 10 ++-- libc/sysdeps/linux/common/__socketcall.c | 4 +- libc/sysdeps/linux/common/__syscall_fcntl.c | 6 +- libc/sysdeps/linux/common/__syscall_fcntl64.c | 6 +- libc/sysdeps/linux/common/__syscall_ipc.c | 4 +- libc/sysdeps/linux/common/__syscall_rt_sigaction.c | 5 +- libc/sysdeps/linux/common/__syscall_sigaction.c | 4 +- libc/sysdeps/linux/common/_exit.c | 21 ++----- libc/sysdeps/linux/common/access.c | 4 +- libc/sysdeps/linux/common/acct.c | 4 +- libc/sysdeps/linux/common/adjtimex.c | 7 ++- libc/sysdeps/linux/common/alarm.c | 8 ++- libc/sysdeps/linux/common/bdflush.c | 4 +- libc/sysdeps/linux/common/capget.c | 10 ++-- libc/sysdeps/linux/common/capset.c | 10 ++-- libc/sysdeps/linux/common/chdir.c | 8 ++- libc/sysdeps/linux/common/chmod.c | 7 ++- libc/sysdeps/linux/common/chown.c | 4 +- libc/sysdeps/linux/common/chroot.c | 4 +- libc/sysdeps/linux/common/clock_getres.c | 16 +----- libc/sysdeps/linux/common/clock_gettime.c | 16 +----- libc/sysdeps/linux/common/clock_settime.c | 16 +----- libc/sysdeps/linux/common/close.c | 4 +- libc/sysdeps/linux/common/cmsg_nxthdr.c | 3 +- libc/sysdeps/linux/common/create_module.c | 18 +----- libc/sysdeps/linux/common/delete_module.c | 5 +- libc/sysdeps/linux/common/dup.c | 5 +- libc/sysdeps/linux/common/dup2.c | 8 ++- libc/sysdeps/linux/common/epoll.c | 4 +- libc/sysdeps/linux/common/execve.c | 7 ++- libc/sysdeps/linux/common/fchdir.c | 8 ++- libc/sysdeps/linux/common/fchmod.c | 4 +- libc/sysdeps/linux/common/fdatasync.c | 4 +- libc/sysdeps/linux/common/flock.c | 4 +- libc/sysdeps/linux/common/fork.c | 4 +- libc/sysdeps/linux/common/fstat.c | 10 ++-- libc/sysdeps/linux/common/fstat64.c | 12 ++-- libc/sysdeps/linux/common/fstatfs.c | 8 ++- libc/sysdeps/linux/common/fsync.c | 4 +- libc/sysdeps/linux/common/ftruncate.c | 8 ++- libc/sysdeps/linux/common/ftruncate64.c | 64 +++++++++++----------- libc/sysdeps/linux/common/get_kernel_syms.c | 4 +- libc/sysdeps/linux/common/getcwd.c | 24 ++++---- libc/sysdeps/linux/common/getdents.c | 25 ++------- libc/sysdeps/linux/common/getdents64.c | 35 ++++-------- libc/sysdeps/linux/common/getdnnm.c | 3 +- libc/sysdeps/linux/common/getdtablesize.c | 25 +++------ libc/sysdeps/linux/common/getegid.c | 7 ++- libc/sysdeps/linux/common/geteuid.c | 7 ++- libc/sysdeps/linux/common/getgid.c | 7 ++- libc/sysdeps/linux/common/getgroups.c | 7 ++- libc/sysdeps/linux/common/gethstnm.c | 3 +- libc/sysdeps/linux/common/getitimer.c | 4 +- libc/sysdeps/linux/common/getpgid.c | 4 +- libc/sysdeps/linux/common/getpriority.c | 7 ++- libc/sysdeps/linux/common/getresgid.c | 6 +- libc/sysdeps/linux/common/getresuid.c | 6 +- libc/sysdeps/linux/common/getrlimit.c | 12 ++-- libc/sysdeps/linux/common/getrusage.c | 4 +- libc/sysdeps/linux/common/getsid.c | 7 ++- libc/sysdeps/linux/common/gettimeofday.c | 8 ++- libc/sysdeps/linux/common/getuid.c | 7 ++- libc/sysdeps/linux/common/init_module.c | 4 +- libc/sysdeps/linux/common/ioctl.c | 4 +- libc/sysdeps/linux/common/ioperm.c | 4 +- libc/sysdeps/linux/common/iopl.c | 4 +- libc/sysdeps/linux/common/kill.c | 8 +-- libc/sysdeps/linux/common/klogctl.c | 4 +- libc/sysdeps/linux/common/lchown.c | 4 +- libc/sysdeps/linux/common/link.c | 4 +- libc/sysdeps/linux/common/llseek.c | 26 +++------ libc/sysdeps/linux/common/lseek.c | 8 ++- libc/sysdeps/linux/common/lstat.c | 8 +-- libc/sysdeps/linux/common/lstat64.c | 17 +++--- libc/sysdeps/linux/common/madvise.c | 4 +- libc/sysdeps/linux/common/mincore.c | 9 ++- libc/sysdeps/linux/common/mkdir.c | 7 ++- libc/sysdeps/linux/common/mknod.c | 7 ++- libc/sysdeps/linux/common/mlock.c | 4 +- libc/sysdeps/linux/common/mlockall.c | 4 +- libc/sysdeps/linux/common/mmap.c | 10 ++-- libc/sysdeps/linux/common/mmap64.c | 49 ++++++----------- libc/sysdeps/linux/common/modify_ldt.c | 5 +- libc/sysdeps/linux/common/mount.c | 4 +- libc/sysdeps/linux/common/mprotect.c | 4 +- libc/sysdeps/linux/common/mremap.c | 8 ++- libc/sysdeps/linux/common/msync.c | 4 +- libc/sysdeps/linux/common/munlock.c | 4 +- libc/sysdeps/linux/common/munlockall.c | 4 +- libc/sysdeps/linux/common/munmap.c | 8 ++- libc/sysdeps/linux/common/nanosleep.c | 5 +- libc/sysdeps/linux/common/nice.c | 14 ++--- libc/sysdeps/linux/common/open.c | 8 ++- libc/sysdeps/linux/common/open64.c | 29 +++------- libc/sysdeps/linux/common/pause.c | 4 +- libc/sysdeps/linux/common/personality.c | 4 +- libc/sysdeps/linux/common/pipe.c | 8 ++- libc/sysdeps/linux/common/pivot_root.c | 4 +- libc/sysdeps/linux/common/poll.c | 3 +- libc/sysdeps/linux/common/posix_fadvise.c | 4 +- libc/sysdeps/linux/common/posix_fadvise64.c | 4 +- libc/sysdeps/linux/common/prctl.c | 4 +- libc/sysdeps/linux/common/pread_write.c | 36 ++++-------- libc/sysdeps/linux/common/ptrace.c | 25 ++------- libc/sysdeps/linux/common/query_module.c | 4 +- libc/sysdeps/linux/common/quotactl.c | 4 +- libc/sysdeps/linux/common/read.c | 4 +- libc/sysdeps/linux/common/readlink.c | 8 ++- libc/sysdeps/linux/common/readv.c | 4 +- libc/sysdeps/linux/common/reboot.c | 4 +- libc/sysdeps/linux/common/rename.c | 4 +- libc/sysdeps/linux/common/rmdir.c | 8 ++- libc/sysdeps/linux/common/sbrk.c | 25 +++------ libc/sysdeps/linux/common/sched_get_priority_max.c | 4 +- libc/sysdeps/linux/common/sched_get_priority_min.c | 4 +- libc/sysdeps/linux/common/sched_getparam.c | 4 +- libc/sysdeps/linux/common/sched_getscheduler.c | 4 +- libc/sysdeps/linux/common/sched_rr_get_interval.c | 4 +- libc/sysdeps/linux/common/sched_setparam.c | 4 +- libc/sysdeps/linux/common/sched_setscheduler.c | 4 +- libc/sysdeps/linux/common/sched_yield.c | 4 +- libc/sysdeps/linux/common/select.c | 11 ++-- libc/sysdeps/linux/common/sendfile.c | 4 +- libc/sysdeps/linux/common/sendfile64.c | 26 ++++----- libc/sysdeps/linux/common/setdomainname.c | 4 +- libc/sysdeps/linux/common/setegid.c | 2 + libc/sysdeps/linux/common/seteuid.c | 3 +- libc/sysdeps/linux/common/setfsgid.c | 4 +- libc/sysdeps/linux/common/setfsuid.c | 4 +- libc/sysdeps/linux/common/setgid.c | 4 +- libc/sysdeps/linux/common/setgroups.c | 7 ++- libc/sysdeps/linux/common/sethostname.c | 4 +- libc/sysdeps/linux/common/setitimer.c | 8 ++- libc/sysdeps/linux/common/setpgid.c | 7 ++- libc/sysdeps/linux/common/setpriority.c | 8 ++- libc/sysdeps/linux/common/setregid.c | 7 ++- libc/sysdeps/linux/common/setresgid.c | 8 ++- libc/sysdeps/linux/common/setresuid.c | 8 ++- libc/sysdeps/linux/common/setreuid.c | 7 ++- libc/sysdeps/linux/common/setrlimit.c | 15 ++--- libc/sysdeps/linux/common/setsid.c | 8 ++- libc/sysdeps/linux/common/settimeofday.c | 10 ++-- libc/sysdeps/linux/common/setuid.c | 4 +- libc/sysdeps/linux/common/sigaltstack.c | 4 +- libc/sysdeps/linux/common/sigpending.c | 7 +-- libc/sysdeps/linux/common/sigprocmask.c | 28 +++++----- libc/sysdeps/linux/common/sigsuspend.c | 11 ++-- libc/sysdeps/linux/common/stat.c | 7 ++- libc/sysdeps/linux/common/stat64.c | 19 ++++--- libc/sysdeps/linux/common/statfs.c | 7 ++- libc/sysdeps/linux/common/swapoff.c | 4 +- libc/sysdeps/linux/common/swapon.c | 4 +- libc/sysdeps/linux/common/symlink.c | 4 +- libc/sysdeps/linux/common/sync.c | 17 +----- libc/sysdeps/linux/common/syscalls.h | 19 +------ libc/sysdeps/linux/common/sysctl.c | 4 +- libc/sysdeps/linux/common/sysfs.c | 4 +- libc/sysdeps/linux/common/sysinfo.c | 4 +- libc/sysdeps/linux/common/time.c | 8 ++- libc/sysdeps/linux/common/times.c | 8 ++- libc/sysdeps/linux/common/truncate.c | 8 ++- libc/sysdeps/linux/common/truncate64.c | 12 ++-- libc/sysdeps/linux/common/ulimit.c | 18 +----- libc/sysdeps/linux/common/umask.c | 4 +- libc/sysdeps/linux/common/umount.c | 11 ++-- libc/sysdeps/linux/common/umount2.c | 4 +- libc/sysdeps/linux/common/uname.c | 8 ++- libc/sysdeps/linux/common/unlink.c | 8 ++- libc/sysdeps/linux/common/uselib.c | 4 +- libc/sysdeps/linux/common/ustat.c | 4 +- libc/sysdeps/linux/common/utime.c | 8 ++- libc/sysdeps/linux/common/utimes.c | 9 ++- libc/sysdeps/linux/common/vfork.c | 3 +- libc/sysdeps/linux/common/vhangup.c | 4 +- libc/sysdeps/linux/common/wait4.c | 8 ++- libc/sysdeps/linux/common/write.c | 4 +- libc/sysdeps/linux/common/writev.c | 4 +- libc/sysdeps/linux/common/xattr.c | 8 ++- 178 files changed, 686 insertions(+), 818 deletions(-) (limited to 'libc/sysdeps/linux/common') 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 #define __need_NULL #include + +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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ @@ -12,6 +12,9 @@ #include #include +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 + * Copyright (C) 2000-2006 Erik Andersen * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ @@ -12,6 +12,9 @@ #include #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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 - * - * 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 * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #define _GNU_SOURCE #include #include +#include #include #include +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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 -_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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + +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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 +#include #include +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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 +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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 * Copyright (C) 2005 by Peter Kjellerstedt + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 #include +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 - * Written by Erik Andersen - * - * 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 */ #include @@ -26,7 +11,6 @@ #include #include - #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 * - * Copyright (C) 2000-2004 by Erik Andersen - * - * 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 * - * Copyright (C) 2000-2004 by Erik Andersen - * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 -_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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 #include +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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 -_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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 #include #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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 -_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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 -_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 + * + * 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 - * - * 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 -#include -#include -#include -#include -#include -#include -#if defined __UCLIBC_HAS_LFS__ +#ifdef __UCLIBC_HAS_LFS__ + +# include +# include +# include +# include +# include +# include + +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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 #include #include +#include #include +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 + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include @@ -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 + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include @@ -29,14 +17,14 @@ #include #include +#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 +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 + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include #include #include +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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 +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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 +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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 +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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 #include +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 #include +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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 +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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 + * Copyright (C) 2000-2006 Erik Andersen * - * 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 #include +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);