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/alpha/sysdep.c | 24 ++------ libc/sysdeps/linux/arm/__syscall_error.c | 23 ++------ libc/sysdeps/linux/arm/brk.c | 2 + libc/sysdeps/linux/arm/ioperm.c | 3 +- libc/sysdeps/linux/bfin/brk.c | 3 +- libc/sysdeps/linux/bfin/clone.c | 6 +- libc/sysdeps/linux/bfin/syscall.c | 16 +----- libc/sysdeps/linux/bfin/vfork.S | 9 ++- 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 ++- libc/sysdeps/linux/cris/__longjmp.S | 6 +- libc/sysdeps/linux/cris/brk.c | 9 ++- libc/sysdeps/linux/cris/fork.c | 6 ++ libc/sysdeps/linux/cris/sbrk.c | 8 ++- libc/sysdeps/linux/e1/longjmp.c | 9 ++- libc/sysdeps/linux/e1/vfork.c | 9 +++ libc/sysdeps/linux/frv/__longjmp.S | 8 +++ libc/sysdeps/linux/frv/brk.c | 8 ++- libc/sysdeps/linux/frv/fstat.c | 24 ++------ libc/sysdeps/linux/frv/fstat64.c | 24 ++------ libc/sysdeps/linux/frv/lstat.c | 24 ++------ libc/sysdeps/linux/frv/lstat64.c | 24 ++------ libc/sysdeps/linux/frv/mmap.c | 3 +- libc/sysdeps/linux/frv/sbrk.c | 3 +- libc/sysdeps/linux/frv/stat.c | 24 ++------ libc/sysdeps/linux/frv/stat64.c | 24 ++------ libc/sysdeps/linux/h8300/brk.c | 8 ++- libc/sysdeps/linux/h8300/vfork.S | 2 - libc/sysdeps/linux/hppa/__syscall_error.c | 22 ++------ libc/sysdeps/linux/hppa/brk.c | 3 +- libc/sysdeps/linux/hppa/mmap.c | 7 ++- libc/sysdeps/linux/i386/__syscall_error.c | 28 +++------- libc/sysdeps/linux/i386/brk.c | 2 +- libc/sysdeps/linux/m68k/__syscall_error.c | 22 ++------ libc/sysdeps/linux/m68k/brk.c | 8 ++- libc/sysdeps/linux/m68k/ptrace.c | 5 ++ libc/sysdeps/linux/m68k/vfork.S | 6 ++ libc/sysdeps/linux/microblaze/__longjmp.S | 2 - libc/sysdeps/linux/microblaze/mmap.c | 8 ++- libc/sysdeps/linux/microblaze/vfork.S | 2 - libc/sysdeps/linux/mips/__longjmp.c | 3 +- libc/sysdeps/linux/mips/__syscall_error.c | 22 ++------ libc/sysdeps/linux/mips/brk.c | 3 +- libc/sysdeps/linux/mips/cacheflush.c | 2 +- libc/sysdeps/linux/mips/mmap.c | 9 ++- libc/sysdeps/linux/mips/pipe.S | 5 ++ libc/sysdeps/linux/mips/pipe.c | 9 ++- libc/sysdeps/linux/mips/pread_write.c | 21 ++----- libc/sysdeps/linux/nios/brk.c | 2 +- libc/sysdeps/linux/nios2/brk.c | 2 +- libc/sysdeps/linux/nios2/clone.c | 8 +-- libc/sysdeps/linux/powerpc/__syscall_error.c | 22 ++------ libc/sysdeps/linux/powerpc/ioctl.c | 3 +- libc/sysdeps/linux/powerpc/mmap.c | 8 ++- libc/sysdeps/linux/powerpc/pread_write.c | 25 +++------ libc/sysdeps/linux/powerpc/vfork.c | 3 +- libc/sysdeps/linux/sh/__longjmp.S | 2 + libc/sysdeps/linux/sh/brk.c | 8 ++- libc/sysdeps/linux/sh/mmap.c | 3 +- libc/sysdeps/linux/sh/pipe.c | 11 +++- libc/sysdeps/linux/sh/pread_write.c | 21 ++----- libc/sysdeps/linux/sh/sbrk.c | 3 +- libc/sysdeps/linux/sh64/brk.c | 8 ++- libc/sysdeps/linux/sh64/sbrk.c | 8 ++- libc/sysdeps/linux/sparc/__syscall_error.c | 22 ++------ libc/sysdeps/linux/sparc/brk.c | 3 +- libc/sysdeps/linux/v850/__longjmp.S | 1 - libc/sysdeps/linux/v850/mmap.c | 8 ++- libc/sysdeps/linux/v850/vfork.S | 2 - libc/sysdeps/linux/x86_64/__syscall_error.c | 22 ++------ libc/sysdeps/linux/x86_64/brk.c | 3 +- libc/sysdeps/linux/x86_64/mmap.c | 7 ++- 248 files changed, 989 insertions(+), 1218 deletions(-) (limited to 'libc/sysdeps/linux') 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 + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include /* 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 + * + * 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 #include +#include /* 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 #include +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 #include +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 #include +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 * - * 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 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 + * 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. */ #include 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 + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + #include #include .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 + * 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 04077