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/inet/addr.c | 14 +++-- libc/inet/getaddrinfo.c | 4 +- libc/inet/getnetent.c | 6 +- libc/inet/getproto.c | 10 ++-- libc/inet/getservice.c | 12 ++-- libc/inet/herror.c | 2 +- libc/inet/if_index.c | 6 +- libc/inet/inet_net.c | 3 +- libc/inet/ntop.c | 4 +- libc/inet/resolv.c | 2 +- libc/inet/rpc/auth_none.c | 2 +- libc/inet/rpc/auth_unix.c | 4 +- libc/inet/rpc/authunix_prot.c | 2 +- libc/inet/rpc/bindresvport.c | 2 +- libc/inet/rpc/clnt_perror.c | 8 +-- libc/inet/rpc/clnt_tcp.c | 2 +- libc/inet/rpc/clnt_udp.c | 4 +- libc/inet/rpc/clnt_unix.c | 2 +- libc/inet/rpc/getrpcent.c | 10 ++-- libc/inet/rpc/pmap_clnt.c | 4 +- libc/inet/rpc/pmap_getport.c | 2 +- libc/inet/rpc/pmap_rmt.c | 2 +- libc/inet/rpc/rexec.c | 2 +- libc/inet/rpc/rpc_callmsg.c | 2 +- libc/inet/rpc/rpc_dtablesize.c | 2 +- libc/inet/rpc/rpc_prot.c | 14 +++-- libc/inet/rpc/rpc_thread.c | 9 +-- libc/inet/rpc/ruserpass.c | 3 +- libc/inet/rpc/svc.c | 26 ++++----- libc/inet/rpc/svc_auth.c | 2 +- libc/inet/rpc/svc_udp.c | 4 +- libc/inet/rpc/xdr.c | 26 ++++----- libc/inet/rpc/xdr_array.c | 2 +- libc/inet/rpc/xdr_mem.c | 2 +- libc/inet/rpc/xdr_rec.c | 8 +-- libc/inet/rpc/xdr_reference.c | 2 +- libc/inet/socketcalls.c | 10 ++-- libc/misc/ctype/ctype.c | 9 ++- libc/misc/dirent/dirfd.c | 3 +- libc/misc/internals/__uClibc_main.c | 6 +- libc/misc/locale/locale.c | 17 ++++-- libc/misc/mntent/mntent.c | 7 ++- libc/misc/search/hsearch_r.c | 7 ++- libc/misc/search/tsearch.c | 7 ++- libc/misc/statfs/fstatfs64.c | 3 +- libc/misc/statfs/statfs64.c | 3 +- libc/misc/time/time.c | 38 +++++-------- libc/misc/wchar/wchar.c | 21 +++---- libc/misc/wctype/wctype.c | 10 ++-- libc/pwd_grp/pwd_grp.c | 15 ++--- libc/pwd_grp/pwd_grp_internal.c | 2 +- libc/signal/sigaddset.c | 2 +- libc/signal/sigblock.c | 2 +- libc/signal/sigdelset.c | 2 +- libc/signal/sigempty.c | 2 +- libc/signal/sigfillset.c | 3 +- libc/signal/signal.c | 2 +- libc/signal/sigpause.c | 5 +- libc/signal/sigsetmask.c | 2 +- libc/signal/sigwait.c | 2 +- libc/stdio/__fsetlocking.c | 4 +- libc/stdio/asprintf.c | 4 +- libc/stdio/fclose.c | 2 +- libc/stdio/fflush.c | 2 +- libc/stdio/fgetc.c | 7 +-- libc/stdio/fgets.c | 2 +- libc/stdio/fgetwc.c | 2 +- libc/stdio/fileno.c | 2 +- libc/stdio/fopen.c | 2 +- libc/stdio/fopencookie.c | 2 +- libc/stdio/fprintf.c | 2 +- libc/stdio/fputc.c | 7 +-- libc/stdio/fputs.c | 2 +- libc/stdio/fputws.c | 2 +- libc/stdio/fread.c | 2 +- libc/stdio/fseeko.c | 5 +- libc/stdio/ftello.c | 5 +- libc/stdio/fwrite.c | 2 +- libc/stdio/getdelim.c | 3 +- libc/stdio/getline.c | 3 +- libc/stdio/open_memstream.c | 2 +- libc/stdio/perror.c | 2 +- libc/stdio/printf.c | 2 +- libc/stdio/remove.c | 2 +- libc/stdio/rewind.c | 2 +- libc/stdio/scanf.c | 6 +- libc/stdio/setvbuf.c | 2 +- libc/stdio/snprintf.c | 2 +- libc/stdio/sprintf.c | 2 +- libc/stdio/ungetc.c | 2 +- libc/stdio/ungetwc.c | 2 +- libc/stdio/vasprintf.c | 2 +- libc/stdio/vdprintf.c | 2 +- libc/stdio/vfprintf.c | 2 +- libc/stdio/vsnprintf.c | 5 +- libc/stdio/vswprintf.c | 3 +- libc/stdlib/erand48_r.c | 2 +- libc/stdlib/jrand48_r.c | 2 +- libc/stdlib/lrand48_r.c | 2 +- libc/stdlib/malloc-standard/mallinfo.c | 2 +- libc/stdlib/nrand48_r.c | 2 +- libc/stdlib/ptsname.c | 3 +- libc/stdlib/random.c | 2 +- libc/stdlib/random_r.c | 8 +-- libc/stdlib/seed48_r.c | 2 +- libc/stdlib/setenv.c | 4 +- libc/stdlib/srand48_r.c | 2 +- libc/stdlib/stdlib.c | 24 ++++---- libc/stdlib/strtod.c | 6 +- libc/string/_collate.c | 6 +- libc/string/generic/memchr.c | 2 +- libc/string/generic/memcmp.c | 4 +- libc/string/generic/memcpy.c | 3 +- libc/string/generic/memmem.c | 3 +- libc/string/generic/memmove.c | 2 +- libc/string/generic/mempcpy.c | 3 +- libc/string/generic/memrchr.c | 3 +- libc/string/generic/memset.c | 2 +- libc/string/generic/rawmemchr.c | 3 +- libc/string/generic/strcat.c | 2 +- libc/string/generic/strchr.c | 2 +- libc/string/generic/strchrnul.c | 3 +- libc/string/generic/strcmp.c | 2 +- libc/string/generic/strcpy.c | 2 +- libc/string/generic/strcspn.c | 2 +- libc/string/generic/strlen.c | 2 +- libc/string/generic/strncat.c | 2 +- libc/string/generic/strncmp.c | 2 +- libc/string/generic/strncpy.c | 2 +- libc/string/generic/strnlen.c | 3 +- libc/string/generic/strrchr.c | 2 +- libc/string/generic/strsep.c | 2 +- libc/string/generic/strspn.c | 2 +- libc/string/generic/strstr.c | 3 +- libc/string/generic/strtok_r.c | 2 +- libc/string/i386/memchr.c | 2 +- libc/string/i386/memcpy.c | 2 +- libc/string/i386/memmove.c | 2 +- libc/string/i386/memset.c | 2 +- libc/string/i386/strcat.c | 2 +- libc/string/i386/strchr.c | 2 +- libc/string/i386/strcmp.c | 2 +- libc/string/i386/strcpy.c | 2 +- libc/string/i386/strlen.c | 2 +- libc/string/i386/strncat.c | 2 +- libc/string/i386/strncmp.c | 2 +- libc/string/i386/strncpy.c | 2 +- libc/string/i386/strnlen.c | 2 +- libc/string/i386/strrchr.c | 2 +- libc/string/powerpc/memcpy.c | 2 +- libc/string/powerpc/memmove.c | 2 +- libc/string/powerpc/memset.c | 3 +- libc/string/strcasecmp.c | 4 +- libc/string/strlcpy.c | 2 +- libc/string/strncasecmp.c | 4 +- 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 ++- libc/unistd/getlogin.c | 3 +- libc/unistd/sysconf.c | 3 +- 405 files changed, 1334 insertions(+), 1544 deletions(-) diff --git a/libc/inet/addr.c b/libc/inet/addr.c index 7c73e2a88..538d9fb8e 100644 --- a/libc/inet/addr.c +++ b/libc/inet/addr.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #ifdef L_inet_aton @@ -42,6 +43,7 @@ * leading 0 -> octal * all else -> decimal */ +libc_hidden_proto(inet_aton) int inet_aton(const char *cp, struct in_addr *addrptr) { in_addr_t addr; @@ -88,7 +90,6 @@ int inet_aton(const char *cp, struct in_addr *addrptr) return 1; } -libc_hidden_proto(inet_aton) libc_hidden_def(inet_aton) #endif @@ -96,6 +97,7 @@ libc_hidden_def(inet_aton) #include libc_hidden_proto(inet_aton) +libc_hidden_proto(inet_addr) in_addr_t inet_addr(const char *cp) { struct in_addr a; @@ -105,7 +107,6 @@ in_addr_t inet_addr(const char *cp) else return a.s_addr; } -libc_hidden_proto(inet_addr) libc_hidden_def(inet_addr) #endif @@ -113,6 +114,8 @@ libc_hidden_def(inet_addr) #define INET_NTOA_MAX_LEN 16 /* max 12 digits + 3 '.'s + 1 nul */ +extern char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN]); +libc_hidden_proto(inet_ntoa_r) char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN]) { in_addr_t addr = ntohl(in.s_addr); @@ -132,15 +135,14 @@ char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN]) return p+1; } -libc_hidden_proto(inet_ntoa_r) libc_hidden_def(inet_ntoa_r) +libc_hidden_proto(inet_ntoa) char *inet_ntoa(struct in_addr in) { static char buf[INET_NTOA_MAX_LEN]; return(inet_ntoa_r(in, buf)); } -libc_hidden_proto(inet_ntoa) libc_hidden_def(inet_ntoa) #endif @@ -153,6 +155,7 @@ libc_hidden_proto(memmove) * Formulate an Internet address from network + host. Used in * building addresses stored in the ifnet structure. */ +libc_hidden_proto(inet_makeaddr) struct in_addr inet_makeaddr(in_addr_t net, in_addr_t host) { in_addr_t addr; @@ -168,7 +171,6 @@ struct in_addr inet_makeaddr(in_addr_t net, in_addr_t host) addr = htonl(addr); return (*(struct in_addr *)&addr); } -libc_hidden_proto(inet_makeaddr) libc_hidden_def(inet_makeaddr) #endif @@ -197,6 +199,7 @@ in_addr_t inet_lnaof(struct in_addr in) * Return the network number from an internet * address; handles class a/b/c network #'s. */ +libc_hidden_proto(inet_netof) in_addr_t inet_netof(struct in_addr in) { @@ -209,6 +212,5 @@ inet_netof(struct in_addr in) else return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT); } -libc_hidden_proto(inet_netof) libc_hidden_def(inet_netof) #endif diff --git a/libc/inet/getaddrinfo.c b/libc/inet/getaddrinfo.c index 225bc75c6..48cb3a19d 100644 --- a/libc/inet/getaddrinfo.c +++ b/libc/inet/getaddrinfo.c @@ -785,6 +785,7 @@ static struct gaih gaih[] = { PF_UNSPEC, NULL } }; +libc_hidden_proto(freeaddrinfo) void freeaddrinfo (struct addrinfo *ai) { @@ -797,9 +798,9 @@ freeaddrinfo (struct addrinfo *ai) free (p); } } -libc_hidden_proto(freeaddrinfo) libc_hidden_def(freeaddrinfo) +libc_hidden_proto(getaddrinfo) int getaddrinfo (const char *name, const char *service, const struct addrinfo *hints, struct addrinfo **pai) @@ -899,5 +900,4 @@ getaddrinfo (const char *name, const char *service, return last_i ? -(last_i & GAIH_EAI) : EAI_NONAME; } -libc_hidden_proto(getaddrinfo) libc_hidden_def(getaddrinfo) diff --git a/libc/inet/getnetent.c b/libc/inet/getnetent.c index 4413811a3..d3fdb988a 100644 --- a/libc/inet/getnetent.c +++ b/libc/inet/getnetent.c @@ -47,6 +47,7 @@ static char *net_aliases[MAXALIASES]; int _net_stayopen attribute_hidden; +libc_hidden_proto(setnetent) void setnetent(int f) { LOCK; @@ -58,9 +59,9 @@ void setnetent(int f) UNLOCK; return; } -libc_hidden_proto(setnetent) libc_hidden_def(setnetent) +libc_hidden_proto(endnetent) void endnetent(void) { LOCK; @@ -71,7 +72,6 @@ void endnetent(void) _net_stayopen = 0; UNLOCK; } -libc_hidden_proto(endnetent) libc_hidden_def(endnetent) static char * any(register char *cp, char *match) @@ -87,6 +87,7 @@ static char * any(register char *cp, char *match) return ((char *)0); } +libc_hidden_proto(getnetent) struct netent *getnetent(void) { char *p; @@ -146,5 +147,4 @@ again: UNLOCK; return (&net); } -libc_hidden_proto(getnetent) libc_hidden_def(getnetent) diff --git a/libc/inet/getproto.c b/libc/inet/getproto.c index e5a11d2c7..0871d17c6 100644 --- a/libc/inet/getproto.c +++ b/libc/inet/getproto.c @@ -97,6 +97,7 @@ static void __initbuf(void) } } +libc_hidden_proto(setprotoent) void setprotoent(int f) { LOCK; @@ -107,9 +108,9 @@ void setprotoent(int f) proto_stayopen |= f; UNLOCK; } -libc_hidden_proto(setprotoent) libc_hidden_def(setprotoent) +libc_hidden_proto(endprotoent) void endprotoent(void) { LOCK; @@ -120,9 +121,9 @@ void endprotoent(void) proto_stayopen = 0; UNLOCK; } -libc_hidden_proto(endprotoent) libc_hidden_def(endprotoent) +libc_hidden_proto(getprotoent_r) int getprotoent_r(struct protoent *result_buf, char *buf, size_t buflen, struct protoent **result) @@ -199,7 +200,6 @@ again: UNLOCK; return 0; } -libc_hidden_proto(getprotoent_r) libc_hidden_def(getprotoent_r) struct protoent * getprotoent(void) @@ -212,6 +212,7 @@ struct protoent * getprotoent(void) } +libc_hidden_proto(getprotobyname_r) int getprotobyname_r(const char *name, struct protoent *result_buf, char *buf, size_t buflen, @@ -235,7 +236,6 @@ found: UNLOCK; return *result?0:ret; } -libc_hidden_proto(getprotobyname_r) libc_hidden_def(getprotobyname_r) @@ -249,6 +249,7 @@ struct protoent * getprotobyname(const char *name) } +libc_hidden_proto(getprotobynumber_r) int getprotobynumber_r (int proto_num, struct protoent *result_buf, char *buf, size_t buflen, @@ -266,7 +267,6 @@ int getprotobynumber_r (int proto_num, UNLOCK; return *result?0:ret; } -libc_hidden_proto(getprotobynumber_r) libc_hidden_def(getprotobynumber_r) struct protoent * getprotobynumber(int proto_num) diff --git a/libc/inet/getservice.c b/libc/inet/getservice.c index 254f638f2..9a2df8c12 100644 --- a/libc/inet/getservice.c +++ b/libc/inet/getservice.c @@ -100,6 +100,7 @@ static void __initbuf(void) } } +libc_hidden_proto(setservent) void setservent(int f) { LOCK; @@ -110,9 +111,9 @@ void setservent(int f) serv_stayopen |= f; UNLOCK; } -libc_hidden_proto(setservent) libc_hidden_def(setservent) +libc_hidden_proto(endservent) void endservent(void) { LOCK; @@ -123,9 +124,9 @@ void endservent(void) serv_stayopen = 0; UNLOCK; } -libc_hidden_proto(endservent) libc_hidden_def(endservent) +libc_hidden_proto(getservent_r) int getservent_r(struct servent * result_buf, char * buf, size_t buflen, struct servent ** result) @@ -205,7 +206,6 @@ again: UNLOCK; return 0; } -libc_hidden_proto(getservent_r) libc_hidden_def(getservent_r) struct servent * getservent(void) @@ -217,6 +217,7 @@ struct servent * getservent(void) return result; } +libc_hidden_proto(getservbyname_r) int getservbyname_r(const char *name, const char *proto, struct servent * result_buf, char * buf, size_t buflen, struct servent ** result) @@ -242,7 +243,6 @@ gotname: UNLOCK; return *result?0:ret; } -libc_hidden_proto(getservbyname_r) libc_hidden_def(getservbyname_r) struct servent *getservbyname(const char *name, const char *proto) @@ -255,6 +255,7 @@ struct servent *getservbyname(const char *name, const char *proto) } +libc_hidden_proto(getservbyport_r) int getservbyport_r(int port, const char *proto, struct servent * result_buf, char * buf, size_t buflen, struct servent ** result) @@ -274,9 +275,9 @@ int getservbyport_r(int port, const char *proto, UNLOCK; return *result?0:ret; } -libc_hidden_proto(getservbyport_r) libc_hidden_def(getservbyport_r) +libc_hidden_proto(getservbyport) struct servent * getservbyport(int port, const char *proto) { struct servent *result; @@ -285,5 +286,4 @@ struct servent * getservbyport(int port, const char *proto) getservbyport_r(port, proto, &serv, servbuf, SBUFSIZE, &result); return result; } -libc_hidden_proto(getservbyport) libc_hidden_def(getservbyport) diff --git a/libc/inet/herror.c b/libc/inet/herror.c index 6efbc2f93..cfcf0e23a 100644 --- a/libc/inet/herror.c +++ b/libc/inet/herror.c @@ -38,6 +38,7 @@ static const int h_nerr = { sizeof(h_errlist)/sizeof(h_errlist[0]) }; /* * herror -- print the error indicated by the h_errno value. */ +libc_hidden_proto(herror) void herror(const char *s) { static const char colon_space[] = ": "; @@ -54,7 +55,6 @@ void herror(const char *s) } fprintf(stderr, "%s%s%s\n", s, c, p); } -libc_hidden_proto(herror) libc_hidden_def(herror) diff --git a/libc/inet/if_index.c b/libc/inet/if_index.c index fd0b901a1..2a687bb89 100644 --- a/libc/inet/if_index.c +++ b/libc/inet/if_index.c @@ -44,6 +44,7 @@ libc_hidden_proto(close) extern int __opensock(void) attribute_hidden; +libc_hidden_proto(if_nametoindex) unsigned int if_nametoindex(const char* ifname) { @@ -71,9 +72,9 @@ if_nametoindex(const char* ifname) return ifr.ifr_ifindex; #endif } -libc_hidden_proto(if_nametoindex) libc_hidden_def(if_nametoindex) +libc_hidden_proto(if_freenameindex) void if_freenameindex (struct if_nameindex *ifn) { @@ -85,9 +86,9 @@ if_freenameindex (struct if_nameindex *ifn) } free (ifn); } -libc_hidden_proto(if_freenameindex) libc_hidden_def(if_freenameindex) +libc_hidden_proto(if_nameindex) #if !__ASSUME_NETLINK_SUPPORT struct if_nameindex * if_nameindex (void) @@ -283,7 +284,6 @@ if_nameindex (void) return idx; } #endif -libc_hidden_proto(if_nameindex) libc_hidden_def(if_nameindex) #if 0 diff --git a/libc/inet/inet_net.c b/libc/inet/inet_net.c index 29226c01a..59cf36022 100644 --- a/libc/inet/inet_net.c +++ b/libc/inet/inet_net.c @@ -36,12 +36,14 @@ #include #include #include +#include /* * Internet network address interpretation routine. * The library routines call this routine to interpret * network numbers. */ +libc_hidden_proto(inet_network) in_addr_t inet_network(const char *cp) { @@ -98,5 +100,4 @@ again: } return (val); } -libc_hidden_proto(inet_network) libc_hidden_def(inet_network) diff --git a/libc/inet/ntop.c b/libc/inet/ntop.c index 16b089f3f..88ff6a150 100644 --- a/libc/inet/ntop.c +++ b/libc/inet/ntop.c @@ -356,6 +356,7 @@ inet_pton6(const char *src, u_char *dst) * author: * Paul Vixie, 1996. */ +libc_hidden_proto(inet_ntop) const char * inet_ntop(int af, const void *src, char *dst, socklen_t size) { @@ -372,7 +373,6 @@ inet_ntop(int af, const void *src, char *dst, socklen_t size) } /* NOTREACHED */ } -libc_hidden_proto(inet_ntop) libc_hidden_def(inet_ntop) @@ -387,6 +387,7 @@ libc_hidden_def(inet_ntop) * author: * Paul Vixie, 1996. */ +libc_hidden_proto(inet_pton) int inet_pton(int af, const char *src, void *dst) { @@ -403,5 +404,4 @@ inet_pton(int af, const char *src, void *dst) } /* NOTREACHED */ } -libc_hidden_proto(inet_pton) libc_hidden_def(inet_pton) diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index 1e0392059..8be057aeb 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -1740,6 +1740,7 @@ int attribute_hidden __get_hosts_byaddr_r(const char * addr, int len, int type, # define min(x,y) (((x) > (y)) ? (y) : (x)) #endif /* min */ +libc_hidden_proto(getnameinfo) int getnameinfo (const struct sockaddr *sa, socklen_t addrlen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, unsigned int flags) @@ -1926,7 +1927,6 @@ int getnameinfo (const struct sockaddr *sa, socklen_t addrlen, char *host, errno = serrno; return 0; } -libc_hidden_proto(getnameinfo) libc_hidden_def(getnameinfo) #endif diff --git a/libc/inet/rpc/auth_none.c b/libc/inet/rpc/auth_none.c index 06f65904a..e69dc2233 100644 --- a/libc/inet/rpc/auth_none.c +++ b/libc/inet/rpc/auth_none.c @@ -72,6 +72,7 @@ struct authnone_private_s { static struct authnone_private_s *authnone_private; #endif +libc_hidden_proto(authnone_create) AUTH * authnone_create (void) { @@ -101,7 +102,6 @@ authnone_create (void) } return (&ap->no_client); } -libc_hidden_proto(authnone_create) libc_hidden_def(authnone_create) /*ARGSUSED */ diff --git a/libc/inet/rpc/auth_unix.c b/libc/inet/rpc/auth_unix.c index dffdc6fad..80b60b56b 100644 --- a/libc/inet/rpc/auth_unix.c +++ b/libc/inet/rpc/auth_unix.c @@ -109,6 +109,7 @@ static bool_t marshal_new_auth (AUTH *) internal_function; * Create a unix style authenticator. * Returns an auth handle with the given stuff in it. */ +libc_hidden_proto(authunix_create) AUTH * authunix_create (char *machname, uid_t uid, gid_t gid, int len, gid_t *aup_gids) @@ -175,13 +176,13 @@ no_memory: marshal_new_auth (auth); return auth; } -libc_hidden_proto(authunix_create) libc_hidden_def(authunix_create) /* * Returns an auth handle with parameters determined by doing lots of * syscalls. */ +libc_hidden_proto(authunix_create_default) AUTH * authunix_create_default (void) { @@ -215,7 +216,6 @@ authunix_create_default (void) free (gids); return ret_auth; } -libc_hidden_proto(authunix_create_default) libc_hidden_def(authunix_create_default) /* diff --git a/libc/inet/rpc/authunix_prot.c b/libc/inet/rpc/authunix_prot.c index 1587b5688..ad26f2c1e 100644 --- a/libc/inet/rpc/authunix_prot.c +++ b/libc/inet/rpc/authunix_prot.c @@ -49,6 +49,7 @@ libc_hidden_proto(xdr_u_long) * XDR for unix authentication parameters. * Unfortunately, none of these can be declared const. */ +libc_hidden_proto(xdr_authunix_parms) bool_t xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p) { @@ -69,5 +70,4 @@ xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p) } return FALSE; } -libc_hidden_proto(xdr_authunix_parms) libc_hidden_def(xdr_authunix_parms) diff --git a/libc/inet/rpc/bindresvport.c b/libc/inet/rpc/bindresvport.c index 68b44d26a..32055cdf6 100644 --- a/libc/inet/rpc/bindresvport.c +++ b/libc/inet/rpc/bindresvport.c @@ -47,6 +47,7 @@ libc_hidden_proto(getpid) /* * Bind a socket to a privileged IP port */ +libc_hidden_proto(bindresvport) int bindresvport (int sd, struct sockaddr_in *sin) { @@ -90,5 +91,4 @@ bindresvport (int sd, struct sockaddr_in *sin) return res; } -libc_hidden_proto(bindresvport) libc_hidden_def(bindresvport) diff --git a/libc/inet/rpc/clnt_perror.c b/libc/inet/rpc/clnt_perror.c index c01390598..ef3ed2d30 100644 --- a/libc/inet/rpc/clnt_perror.c +++ b/libc/inet/rpc/clnt_perror.c @@ -186,6 +186,7 @@ static const struct rpc_errtab rpc_errlist[] = /* * This interface for use by clntrpc */ +libc_hidden_proto(clnt_sperrno) char * clnt_sperrno (enum clnt_stat stat) { @@ -200,7 +201,6 @@ clnt_sperrno (enum clnt_stat stat) } return _("RPC: (unknown error code)"); } -libc_hidden_proto(clnt_sperrno) libc_hidden_def(clnt_sperrno) void @@ -217,6 +217,7 @@ clnt_perrno (enum clnt_stat num) /* * Print reply error info */ +libc_hidden_proto(clnt_sperror) char * clnt_sperror (CLIENT * rpch, const char *msg) { @@ -300,9 +301,9 @@ clnt_sperror (CLIENT * rpch, const char *msg) *++str = '\0'; return (strstart); } -libc_hidden_proto(clnt_sperror) libc_hidden_def(clnt_sperror) +libc_hidden_proto(clnt_perror) void clnt_perror (CLIENT * rpch, const char *msg) { @@ -313,9 +314,9 @@ clnt_perror (CLIENT * rpch, const char *msg) #endif (void) fputs (clnt_sperror (rpch, msg), stderr); } -libc_hidden_proto(clnt_perror) libc_hidden_def(clnt_perror) +libc_hidden_proto(clnt_spcreateerror) char * clnt_spcreateerror (const char *msg) { @@ -359,7 +360,6 @@ clnt_spcreateerror (const char *msg) *++cp = '\0'; return str; } -libc_hidden_proto(clnt_spcreateerror) libc_hidden_def(clnt_spcreateerror) void diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c index 8837062c9..50e5c4cc1 100644 --- a/libc/inet/rpc/clnt_tcp.c +++ b/libc/inet/rpc/clnt_tcp.c @@ -140,6 +140,7 @@ static struct clnt_ops tcp_ops = * NB: The rpch->cl_auth is set null authentication. Caller may wish to set this * something more useful. */ +libc_hidden_proto(clnttcp_create) CLIENT * clnttcp_create (struct sockaddr_in *raddr, u_long prog, u_long vers, int *sockp, u_int sendsz, u_int recvsz) @@ -257,7 +258,6 @@ fooy: mem_free ((caddr_t) h, sizeof (CLIENT)); return ((CLIENT *) NULL); } -libc_hidden_proto(clnttcp_create) libc_hidden_def(clnttcp_create) static enum clnt_stat diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c index 8f3cad926..9e3444069 100644 --- a/libc/inet/rpc/clnt_udp.c +++ b/libc/inet/rpc/clnt_udp.c @@ -144,6 +144,7 @@ struct cu_data * sendsz and recvsz are the maximum allowable packet sizes that can be * sent and received. */ +libc_hidden_proto(clntudp_bufcreate) CLIENT * clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version, struct timeval wait, int *sockp, u_int sendsz, @@ -242,9 +243,9 @@ fooy: mem_free ((caddr_t) cl, sizeof (CLIENT)); return (CLIENT *) NULL; } -libc_hidden_proto(clntudp_bufcreate) libc_hidden_def(clntudp_bufcreate) +libc_hidden_proto(clntudp_create) CLIENT * clntudp_create (struct sockaddr_in *raddr, u_long program, u_long version, struct timeval wait, int *sockp) { @@ -252,7 +253,6 @@ clntudp_create (struct sockaddr_in *raddr, u_long program, u_long version, struc return clntudp_bufcreate (raddr, program, version, wait, sockp, UDPMSGSIZE, UDPMSGSIZE); } -libc_hidden_proto(clntudp_create) libc_hidden_def(clntudp_create) static int diff --git a/libc/inet/rpc/clnt_unix.c b/libc/inet/rpc/clnt_unix.c index 29944af0f..ee4dba6d0 100644 --- a/libc/inet/rpc/clnt_unix.c +++ b/libc/inet/rpc/clnt_unix.c @@ -139,6 +139,7 @@ static struct clnt_ops unix_ops = * NB: The rpch->cl_auth is set null authentication. Caller may wish to set this * something more useful. */ +libc_hidden_proto(clntunix_create) CLIENT * clntunix_create (struct sockaddr_un *raddr, u_long prog, u_long vers, int *sockp, u_int sendsz, u_int recvsz) @@ -237,7 +238,6 @@ fooy: mem_free ((caddr_t) h, sizeof (CLIENT)); return (CLIENT *) NULL; } -libc_hidden_proto(clntunix_create) libc_hidden_def(clntunix_create) static enum clnt_stat diff --git a/libc/inet/rpc/getrpcent.c b/libc/inet/rpc/getrpcent.c index 83dcc7e78..428fbcc31 100644 --- a/libc/inet/rpc/getrpcent.c +++ b/libc/inet/rpc/getrpcent.c @@ -84,6 +84,7 @@ static struct rpcdata *_rpcdata(void) return d; } +libc_hidden_proto(endrpcent) void endrpcent(void) { register struct rpcdata *d = _rpcdata(); @@ -101,9 +102,9 @@ void endrpcent(void) d->rpcf = NULL; } } -libc_hidden_proto(endrpcent) libc_hidden_def(endrpcent) +libc_hidden_proto(setrpcent) void setrpcent(int f) { register struct rpcdata *d = _rpcdata(); @@ -119,7 +120,6 @@ void setrpcent(int f) d->current = NULL; d->stayopen |= f; } -libc_hidden_proto(setrpcent) libc_hidden_def(setrpcent) static struct rpcent *interpret(struct rpcdata *); @@ -131,6 +131,7 @@ static struct rpcent *__get_next_rpcent(struct rpcdata *d) return interpret(d); } +libc_hidden_proto(getrpcent) struct rpcent *getrpcent(void) { register struct rpcdata *d = _rpcdata(); @@ -141,9 +142,9 @@ struct rpcent *getrpcent(void) return NULL; return __get_next_rpcent(d); } -libc_hidden_proto(getrpcent) libc_hidden_def(getrpcent) +libc_hidden_proto(getrpcbynumber) struct rpcent *getrpcbynumber(register int number) { register struct rpcdata *d = _rpcdata(); @@ -159,9 +160,9 @@ struct rpcent *getrpcbynumber(register int number) endrpcent(); return rpc; } -libc_hidden_proto(getrpcbynumber) libc_hidden_def(getrpcbynumber) +libc_hidden_proto(getrpcbyname) struct rpcent *getrpcbyname(const char *name) { struct rpcent *rpc; @@ -179,7 +180,6 @@ struct rpcent *getrpcbyname(const char *name) endrpcent(); return NULL; } -libc_hidden_proto(getrpcbyname) libc_hidden_def(getrpcbyname) #ifdef __linux__ diff --git a/libc/inet/rpc/pmap_clnt.c b/libc/inet/rpc/pmap_clnt.c index 8fe014186..03a1d3321 100644 --- a/libc/inet/rpc/pmap_clnt.c +++ b/libc/inet/rpc/pmap_clnt.c @@ -121,6 +121,7 @@ static const struct timeval tottimeout = {60, 0}; * Set a mapping between program,version and port. * Calls the pmap service remotely to do the mapping. */ +libc_hidden_proto(pmap_set) bool_t pmap_set (u_long program, u_long version, int protocol, u_short port) { @@ -151,13 +152,13 @@ pmap_set (u_long program, u_long version, int protocol, u_short port) /* (void)close(socket); CLNT_DESTROY closes it */ return rslt; } -libc_hidden_proto(pmap_set) libc_hidden_def(pmap_set) /* * Remove the mapping between program,version and port. * Calls the pmap service remotely to do the un-mapping. */ +libc_hidden_proto(pmap_unset) bool_t pmap_unset (u_long program, u_long version) { @@ -182,5 +183,4 @@ pmap_unset (u_long program, u_long version) /* (void)close(socket); CLNT_DESTROY already closed it */ return rslt; } -libc_hidden_proto(pmap_unset) libc_hidden_def(pmap_unset) diff --git a/libc/inet/rpc/pmap_getport.c b/libc/inet/rpc/pmap_getport.c index c841ee9ef..b5e82924d 100644 --- a/libc/inet/rpc/pmap_getport.c +++ b/libc/inet/rpc/pmap_getport.c @@ -56,6 +56,7 @@ static const struct timeval tottimeout = * Calls the pmap service remotely to do the lookup. * Returns 0 if no map exists. */ +libc_hidden_proto(pmap_getport) u_short pmap_getport (struct sockaddr_in *address, u_long program, u_long version, u_int protocol) { @@ -91,5 +92,4 @@ pmap_getport (struct sockaddr_in *address, u_long program, u_long version, u_int address->sin_port = 0; return port; } -libc_hidden_proto(pmap_getport) libc_hidden_def(pmap_getport) diff --git a/libc/inet/rpc/pmap_rmt.c b/libc/inet/rpc/pmap_rmt.c index 9271bffd7..1a6286ba3 100644 --- a/libc/inet/rpc/pmap_rmt.c +++ b/libc/inet/rpc/pmap_rmt.c @@ -88,6 +88,7 @@ static const struct timeval timeout = {3, 0}; * XDR remote call arguments * written for XDR_ENCODE direction only */ +libc_hidden_proto(xdr_rmtcall_args) bool_t xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap) { @@ -113,7 +114,6 @@ xdr_rmtcall_args (XDR *xdrs, struct rmtcallargs *cap) } return FALSE; } -libc_hidden_proto(xdr_rmtcall_args) libc_hidden_def(xdr_rmtcall_args) /* diff --git a/libc/inet/rpc/rexec.c b/libc/inet/rpc/rexec.c index 305eaffff..bbbaac645 100644 --- a/libc/inet/rpc/rexec.c +++ b/libc/inet/rpc/rexec.c @@ -70,6 +70,7 @@ char ahostbuf[NI_MAXHOST] attribute_hidden; extern int ruserpass(const char *host, const char **aname, const char **apass) attribute_hidden; libc_hidden_proto(ruserpass) +libc_hidden_proto(rexec_af) int rexec_af(char **ahost, int rport, const char *name, const char *pass, const char *cmd, int *fd2p, sa_family_t af) { @@ -195,7 +196,6 @@ bad: freeaddrinfo(res0); return (-1); } -libc_hidden_proto(rexec_af) libc_hidden_def(rexec_af) int diff --git a/libc/inet/rpc/rpc_callmsg.c b/libc/inet/rpc/rpc_callmsg.c index 5473ba743..b47a67c71 100644 --- a/libc/inet/rpc/rpc_callmsg.c +++ b/libc/inet/rpc/rpc_callmsg.c @@ -55,6 +55,7 @@ libc_hidden_proto(xdr_opaque_auth) /* * XDR a call message */ +libc_hidden_proto(xdr_callmsg) bool_t xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg) { @@ -211,5 +212,4 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg) return xdr_opaque_auth (xdrs, &(cmsg->rm_call.cb_verf)); return FALSE; } -libc_hidden_proto(xdr_callmsg) libc_hidden_def(xdr_callmsg) diff --git a/libc/inet/rpc/rpc_dtablesize.c b/libc/inet/rpc/rpc_dtablesize.c index 09e08b48a..11a7ad457 100644 --- a/libc/inet/rpc/rpc_dtablesize.c +++ b/libc/inet/rpc/rpc_dtablesize.c @@ -44,6 +44,7 @@ libc_hidden_proto(getdtablesize) * Cache the result of getdtablesize(), so we don't have to do an * expensive system call every time. */ +libc_hidden_proto(_rpc_dtablesize) int _rpc_dtablesize(void) { @@ -54,5 +55,4 @@ _rpc_dtablesize(void) return size; } -libc_hidden_proto(_rpc_dtablesize) libc_hidden_def(_rpc_dtablesize) diff --git a/libc/inet/rpc/rpc_prot.c b/libc/inet/rpc/rpc_prot.c index f6453950b..ebe6c3128 100644 --- a/libc/inet/rpc/rpc_prot.c +++ b/libc/inet/rpc/rpc_prot.c @@ -63,6 +63,7 @@ libc_hidden_proto(xdr_u_long) * XDR an opaque authentication struct * (see auth.h) */ +libc_hidden_proto(xdr_opaque_auth) bool_t xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap) { @@ -72,7 +73,6 @@ xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap) &ap->oa_length, MAX_AUTH_BYTES); return FALSE; } -libc_hidden_proto(xdr_opaque_auth) libc_hidden_def(xdr_opaque_auth) /* @@ -89,6 +89,8 @@ xdr_des_block (XDR *xdrs, des_block *blkp) /* * XDR the MSG_ACCEPTED part of a reply message union */ +extern bool_t xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar); +libc_hidden_proto(xdr_accepted_reply) bool_t xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar) { @@ -110,12 +112,13 @@ xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar) } return TRUE; /* TRUE => open ended set of problems */ } -libc_hidden_proto(xdr_accepted_reply) libc_hidden_def(xdr_accepted_reply) /* * XDR the MSG_DENIED part of a reply message union */ +extern bool_t xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr); +libc_hidden_proto(xdr_rejected_reply) bool_t xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr) { @@ -134,7 +137,6 @@ xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr) } return FALSE; } -libc_hidden_proto(xdr_rejected_reply) libc_hidden_def(xdr_rejected_reply) static const struct xdr_discrim reply_dscrm[3] = @@ -146,6 +148,7 @@ static const struct xdr_discrim reply_dscrm[3] = /* * XDR a reply message */ +libc_hidden_proto(xdr_replymsg) bool_t xdr_replymsg (XDR *xdrs, struct rpc_msg *rmsg) { @@ -157,7 +160,6 @@ xdr_replymsg (XDR *xdrs, struct rpc_msg *rmsg) NULL_xdrproc_t); return FALSE; } -libc_hidden_proto(xdr_replymsg) libc_hidden_def(xdr_replymsg) @@ -166,6 +168,7 @@ libc_hidden_def(xdr_replymsg) * The fields include: rm_xid, rm_direction, rpcvers, prog, and vers. * The rm_xid is not really static, but the user can easily munge on the fly. */ +libc_hidden_proto(xdr_callhdr) bool_t xdr_callhdr (XDR *xdrs, struct rpc_msg *cmsg) { @@ -181,7 +184,6 @@ xdr_callhdr (XDR *xdrs, struct rpc_msg *cmsg) return xdr_u_long (xdrs, &(cmsg->rm_call.cb_vers)); return FALSE; } -libc_hidden_proto(xdr_callhdr) libc_hidden_def(xdr_callhdr) /* ************************** Client utility routine ************* */ @@ -247,6 +249,7 @@ rejected (enum reject_stat rjct_stat, /* * given a reply message, fills in the error */ +libc_hidden_proto(_seterr_reply) void _seterr_reply (struct rpc_msg *msg, struct rpc_err *error) @@ -292,5 +295,4 @@ _seterr_reply (struct rpc_msg *msg, break; } } -libc_hidden_proto(_seterr_reply) libc_hidden_def(_seterr_reply) diff --git a/libc/inet/rpc/rpc_thread.c b/libc/inet/rpc/rpc_thread.c index 70ed62262..3b6ef7d93 100644 --- a/libc/inet/rpc/rpc_thread.c +++ b/libc/inet/rpc/rpc_thread.c @@ -10,6 +10,11 @@ #include #include "rpc_private.h" +libc_hidden_proto(__rpc_thread_svc_fdset) +libc_hidden_proto(__rpc_thread_createerr) +libc_hidden_proto(__rpc_thread_svc_pollfd) +libc_hidden_proto(__rpc_thread_svc_max_pollfd) + #ifdef __UCLIBC_HAS_THREADS__ #include @@ -158,11 +163,7 @@ int * __rpc_thread_svc_max_pollfd (void) #endif /* __UCLIBC_HAS_THREADS__ */ -libc_hidden_proto(__rpc_thread_svc_fdset) libc_hidden_def(__rpc_thread_svc_fdset) -libc_hidden_proto(__rpc_thread_createerr) libc_hidden_def(__rpc_thread_createerr) -libc_hidden_proto(__rpc_thread_svc_pollfd) libc_hidden_def(__rpc_thread_svc_pollfd) -libc_hidden_proto(__rpc_thread_svc_max_pollfd) libc_hidden_def(__rpc_thread_svc_max_pollfd) diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c index 61008b9ec..97f1284b3 100644 --- a/libc/inet/rpc/ruserpass.c +++ b/libc/inet/rpc/ruserpass.c @@ -113,6 +113,8 @@ static const struct toktab { +extern int ruserpass(const char *host, const char **aname, const char **apass); +libc_hidden_proto(ruserpass) int ruserpass(const char *host, const char **aname, const char **apass) { char *hdir, *buf, *tmp; @@ -303,7 +305,6 @@ bad: (void) fclose(cfile); return (-1); } -libc_hidden_proto(ruserpass) libc_hidden_def(ruserpass) static int diff --git a/libc/inet/rpc/svc.c b/libc/inet/rpc/svc.c index 76c046ad3..d3ae65b6a 100644 --- a/libc/inet/rpc/svc.c +++ b/libc/inet/rpc/svc.c @@ -86,6 +86,7 @@ static struct svc_callout *svc_head; /* *************** SVCXPRT related stuff **************** */ /* Activate a transport handle. */ +libc_hidden_proto(xprt_register) void xprt_register (SVCXPRT *xprt) { @@ -126,10 +127,10 @@ xprt_register (SVCXPRT *xprt) POLLRDNORM | POLLRDBAND); } } -libc_hidden_proto(xprt_register) libc_hidden_def(xprt_register) /* De-activate a transport handle. */ +libc_hidden_proto(xprt_unregister) void xprt_unregister (SVCXPRT *xprt) { @@ -148,7 +149,6 @@ xprt_unregister (SVCXPRT *xprt) svc_pollfd[i].fd = -1; } } -libc_hidden_proto(xprt_unregister) libc_hidden_def(xprt_unregister) @@ -176,6 +176,7 @@ done: /* Add a service program to the callout list. The dispatch routine will be called when a rpc request for this program number comes in. */ +libc_hidden_proto(svc_register) bool_t svc_register (SVCXPRT * xprt, rpcprog_t prog, rpcvers_t vers, void (*dispatch) (struct svc_req *, SVCXPRT *), @@ -207,10 +208,10 @@ pmap_it: return TRUE; } -libc_hidden_proto(svc_register) libc_hidden_def(svc_register) /* Remove a service program from the callout list. */ +libc_hidden_proto(svc_unregister) void svc_unregister (rpcprog_t prog, rpcvers_t vers) { @@ -230,12 +231,12 @@ svc_unregister (rpcprog_t prog, rpcvers_t vers) /* now unregister the information with the local binder service */ pmap_unset (prog, vers); } -libc_hidden_proto(svc_unregister) libc_hidden_def(svc_unregister) /* ******************* REPLY GENERATION ROUTINES ************ */ /* Send a reply to an rpc request */ +libc_hidden_proto(svc_sendreply) bool_t svc_sendreply (register SVCXPRT *xprt, xdrproc_t xdr_results, caddr_t xdr_location) @@ -250,7 +251,6 @@ svc_sendreply (register SVCXPRT *xprt, xdrproc_t xdr_results, rply.acpted_rply.ar_results.proc = xdr_results; return SVC_REPLY (xprt, &rply); } -libc_hidden_proto(svc_sendreply) libc_hidden_def(svc_sendreply) /* No procedure error reply */ @@ -267,6 +267,7 @@ svcerr_noproc (register SVCXPRT *xprt) } /* Can't decode args error reply */ +libc_hidden_proto(svcerr_decode) void svcerr_decode (register SVCXPRT *xprt) { @@ -278,7 +279,6 @@ svcerr_decode (register SVCXPRT *xprt) rply.acpted_rply.ar_stat = GARBAGE_ARGS; SVC_REPLY (xprt, &rply); } -libc_hidden_proto(svcerr_decode) libc_hidden_def(svcerr_decode) /* Some system error */ @@ -295,6 +295,7 @@ svcerr_systemerr (register SVCXPRT *xprt) } /* Authentication error reply */ +libc_hidden_proto(svcerr_auth) void svcerr_auth (SVCXPRT *xprt, enum auth_stat why) { @@ -306,7 +307,6 @@ svcerr_auth (SVCXPRT *xprt, enum auth_stat why) rply.rjcted_rply.rj_why = why; SVC_REPLY (xprt, &rply); } -libc_hidden_proto(svcerr_auth) libc_hidden_def(svcerr_auth) /* Auth too weak error reply */ @@ -317,6 +317,7 @@ svcerr_weakauth (SVCXPRT *xprt) } /* Program unavailable error reply */ +libc_hidden_proto(svcerr_noprog) void svcerr_noprog (register SVCXPRT *xprt) { @@ -328,10 +329,10 @@ svcerr_noprog (register SVCXPRT *xprt) rply.acpted_rply.ar_stat = PROG_UNAVAIL; SVC_REPLY (xprt, &rply); } -libc_hidden_proto(svcerr_noprog) libc_hidden_def(svcerr_noprog) /* Program version mismatch error reply */ +libc_hidden_proto(svcerr_progvers) void svcerr_progvers (register SVCXPRT *xprt, rpcvers_t low_vers, rpcvers_t high_vers) @@ -346,7 +347,6 @@ svcerr_progvers (register SVCXPRT *xprt, rpcvers_t low_vers, rply.acpted_rply.ar_vers.high = high_vers; SVC_REPLY (xprt, &rply); } -libc_hidden_proto(svcerr_progvers) libc_hidden_def(svcerr_progvers) /* ******************* SERVER INPUT STUFF ******************* */ @@ -367,6 +367,7 @@ libc_hidden_def(svcerr_progvers) * is mallocated in kernel land. */ +libc_hidden_proto(svc_getreq_common) void svc_getreq_common (const int fd) { @@ -456,9 +457,9 @@ svc_getreq_common (const int fd) } while (stat == XPRT_MOREREQS); } -libc_hidden_proto(svc_getreq_common) libc_hidden_def(svc_getreq_common) +libc_hidden_proto(svc_getreqset) void svc_getreqset (fd_set *readfds) { @@ -474,9 +475,9 @@ svc_getreqset (fd_set *readfds) for (mask = *maskp++; (bit = ffs (mask)); mask ^= (1 << (bit - 1))) svc_getreq_common (sock + bit - 1); } -libc_hidden_proto(svc_getreqset) libc_hidden_def(svc_getreqset) +libc_hidden_proto(svc_getreq) void svc_getreq (int rdfds) { @@ -486,9 +487,9 @@ svc_getreq (int rdfds) readfds.fds_bits[0] = rdfds; svc_getreqset (&readfds); } -libc_hidden_proto(svc_getreq) libc_hidden_def(svc_getreq) +libc_hidden_proto(svc_getreq_poll) void svc_getreq_poll (struct pollfd *pfdp, int pollretval) { @@ -511,7 +512,6 @@ svc_getreq_poll (struct pollfd *pfdp, int pollretval) } } } -libc_hidden_proto(svc_getreq_poll) libc_hidden_def(svc_getreq_poll) #ifdef __UCLIBC_HAS_THREADS__ diff --git a/libc/inet/rpc/svc_auth.c b/libc/inet/rpc/svc_auth.c index 0e4f85436..1a5dcf0ca 100644 --- a/libc/inet/rpc/svc_auth.c +++ b/libc/inet/rpc/svc_auth.c @@ -101,6 +101,7 @@ svcauthsw[] = * There is an assumption that any flavour less than AUTH_NULL is * invalid. */ +libc_hidden_proto(_authenticate) enum auth_stat _authenticate (register struct svc_req *rqst, struct rpc_msg *msg) { @@ -115,7 +116,6 @@ _authenticate (register struct svc_req *rqst, struct rpc_msg *msg) return AUTH_REJECTEDCRED; } -libc_hidden_proto(_authenticate) libc_hidden_def(_authenticate) static enum auth_stat diff --git a/libc/inet/rpc/svc_udp.c b/libc/inet/rpc/svc_udp.c index 07c7661b5..fc01c2848 100644 --- a/libc/inet/rpc/svc_udp.c +++ b/libc/inet/rpc/svc_udp.c @@ -135,6 +135,7 @@ struct svcudp_data * see (svc.h, xprt_register). * The routines returns NULL if a problem occurred. */ +libc_hidden_proto(svcudp_bufcreate) SVCXPRT * svcudp_bufcreate (int sock, u_int sendsz, u_int recvsz) { @@ -224,16 +225,15 @@ svcudp_bufcreate (int sock, u_int sendsz, u_int recvsz) xprt_register (xprt); return xprt; } -libc_hidden_proto(svcudp_bufcreate) libc_hidden_def(svcudp_bufcreate) +libc_hidden_proto(svcudp_create) SVCXPRT * svcudp_create (int sock) { return svcudp_bufcreate (sock, UDPMSGSIZE, UDPMSGSIZE); } -libc_hidden_proto(svcudp_create) libc_hidden_def(svcudp_create) static enum xprt_stat diff --git a/libc/inet/rpc/xdr.c b/libc/inet/rpc/xdr.c index c83416343..9a7569eee 100644 --- a/libc/inet/rpc/xdr.c +++ b/libc/inet/rpc/xdr.c @@ -99,6 +99,7 @@ xdr_void (void) * The definition of xdr_long() is kept for backward * compatibility. Instead xdr_int() should be used. */ +libc_hidden_proto(xdr_long) bool_t xdr_long (XDR *xdrs, long *lp) { @@ -116,12 +117,12 @@ xdr_long (XDR *xdrs, long *lp) return FALSE; } -libc_hidden_proto(xdr_long) libc_hidden_def(xdr_long) /* * XDR short integers */ +libc_hidden_proto(xdr_short) bool_t xdr_short (XDR *xdrs, short *sp) { @@ -146,12 +147,12 @@ xdr_short (XDR *xdrs, short *sp) } return FALSE; } -libc_hidden_proto(xdr_short) libc_hidden_def(xdr_short) /* * XDR integers */ +libc_hidden_proto(xdr_int) bool_t xdr_int (XDR *xdrs, int *ip) { @@ -183,7 +184,6 @@ xdr_int (XDR *xdrs, int *ip) #error unexpected integer sizes in xdr_int() #endif } -libc_hidden_proto(xdr_int) libc_hidden_def(xdr_int) /* @@ -191,6 +191,7 @@ libc_hidden_def(xdr_int) * The definition of xdr_u_long() is kept for backward * compatibility. Instead xdr_u_int() should be used. */ +libc_hidden_proto(xdr_u_long) bool_t xdr_u_long (XDR *xdrs, u_long *ulp) { @@ -219,12 +220,12 @@ xdr_u_long (XDR *xdrs, u_long *ulp) } return FALSE; } -libc_hidden_proto(xdr_u_long) libc_hidden_def(xdr_u_long) /* * XDR unsigned integers */ +libc_hidden_proto(xdr_u_int) bool_t xdr_u_int (XDR *xdrs, u_int *up) { @@ -255,13 +256,13 @@ xdr_u_int (XDR *xdrs, u_int *up) #error unexpected integer sizes in xdr_u_int() #endif } -libc_hidden_proto(xdr_u_int) libc_hidden_def(xdr_u_int) /* * XDR hyper integers * same as xdr_u_hyper - open coded to save a proc call! */ +libc_hidden_proto(xdr_hyper) bool_t xdr_hyper (XDR *xdrs, quad_t *llp) { @@ -289,7 +290,6 @@ xdr_hyper (XDR *xdrs, quad_t *llp) return FALSE; } -libc_hidden_proto(xdr_hyper) libc_hidden_def(xdr_hyper) @@ -297,6 +297,7 @@ libc_hidden_def(xdr_hyper) * XDR hyper integers * same as xdr_hyper - open coded to save a proc call! */ +libc_hidden_proto(xdr_u_hyper) bool_t xdr_u_hyper (XDR *xdrs, u_quad_t *ullp) { @@ -324,7 +325,6 @@ xdr_u_hyper (XDR *xdrs, u_quad_t *ullp) return FALSE; } -libc_hidden_proto(xdr_u_hyper) libc_hidden_def(xdr_u_hyper) bool_t @@ -405,6 +405,7 @@ xdr_u_char (XDR *xdrs, u_char *cp) /* * XDR booleans */ +libc_hidden_proto(xdr_bool) bool_t xdr_bool (XDR *xdrs, bool_t *bp) { @@ -429,12 +430,12 @@ xdr_bool (XDR *xdrs, bool_t *bp) } return FALSE; } -libc_hidden_proto(xdr_bool) libc_hidden_def(xdr_bool) /* * XDR enumerations */ +libc_hidden_proto(xdr_enum) bool_t xdr_enum (XDR *xdrs, enum_t *ep) { @@ -481,7 +482,6 @@ xdr_enum (XDR *xdrs, enum_t *ep) return FALSE; } } -libc_hidden_proto(xdr_enum) libc_hidden_def(xdr_enum) /* @@ -489,6 +489,7 @@ libc_hidden_def(xdr_enum) * Allows the specification of a fixed size sequence of opaque bytes. * cp points to the opaque object and cnt gives the byte length. */ +libc_hidden_proto(xdr_opaque) bool_t xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt) { @@ -533,7 +534,6 @@ xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt) } return FALSE; } -libc_hidden_proto(xdr_opaque) libc_hidden_def(xdr_opaque) /* @@ -541,6 +541,7 @@ libc_hidden_def(xdr_opaque) * *cpp is a pointer to the bytes, *sizep is the count. * If *cpp is NULL maxsize bytes are allocated */ +libc_hidden_proto(xdr_bytes) bool_t xdr_bytes (XDR *xdrs, char **cpp, u_int *sizep, u_int maxsize) { @@ -599,7 +600,6 @@ xdr_bytes (XDR *xdrs, char **cpp, u_int *sizep, u_int maxsize) } return FALSE; } -libc_hidden_proto(xdr_bytes) libc_hidden_def(xdr_bytes) /* @@ -625,6 +625,7 @@ xdr_netobj (xdrs, np) * routine may be called. * If there is no specific or default routine an error is returned. */ +libc_hidden_proto(xdr_union) bool_t xdr_union (XDR *xdrs, enum_t *dscmp, char *unp, const struct xdr_discrim *choices, xdrproc_t dfault) { @@ -655,7 +656,6 @@ xdr_union (XDR *xdrs, enum_t *dscmp, char *unp, const struct xdr_discrim *choice return ((dfault == NULL_xdrproc_t) ? FALSE : (*dfault) (xdrs, unp, LASTUNSIGNED)); } -libc_hidden_proto(xdr_union) libc_hidden_def(xdr_union) /* @@ -672,6 +672,7 @@ libc_hidden_def(xdr_union) * storage is allocated. The last parameter is the max allowed length * of the string as specified by a protocol. */ +libc_hidden_proto(xdr_string) bool_t xdr_string (XDR *xdrs, char **cpp, u_int maxsize) { @@ -744,7 +745,6 @@ xdr_string (XDR *xdrs, char **cpp, u_int maxsize) } return FALSE; } -libc_hidden_proto(xdr_string) libc_hidden_def(xdr_string) /* diff --git a/libc/inet/rpc/xdr_array.c b/libc/inet/rpc/xdr_array.c index cebf44586..45faccfae 100644 --- a/libc/inet/rpc/xdr_array.c +++ b/libc/inet/rpc/xdr_array.c @@ -69,6 +69,7 @@ libc_hidden_proto(xdr_u_int) * elsize is the size (in bytes) of each element, and elproc is the * xdr procedure to call to handle each element of the array. */ +libc_hidden_proto(xdr_array) bool_t xdr_array (XDR *xdrs, caddr_t *addrp, u_int *sizep, u_int maxsize, u_int elsize, xdrproc_t elproc) { @@ -144,7 +145,6 @@ xdr_array (XDR *xdrs, caddr_t *addrp, u_int *sizep, u_int maxsize, u_int elsize, } return stat; } -libc_hidden_proto(xdr_array) libc_hidden_def(xdr_array) /* diff --git a/libc/inet/rpc/xdr_mem.c b/libc/inet/rpc/xdr_mem.c index c2af1393c..e4f5fc237 100644 --- a/libc/inet/rpc/xdr_mem.c +++ b/libc/inet/rpc/xdr_mem.c @@ -77,6 +77,7 @@ static const struct xdr_ops xdrmem_ops = * The procedure xdrmem_create initializes a stream descriptor for a * memory buffer. */ +libc_hidden_proto(xdrmem_create) void xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op) { @@ -87,7 +88,6 @@ xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op) xdrs->x_private = xdrs->x_base = addr; xdrs->x_handy = size; } -libc_hidden_proto(xdrmem_create) libc_hidden_def(xdrmem_create) /* diff --git a/libc/inet/rpc/xdr_rec.c b/libc/inet/rpc/xdr_rec.c index 429503cdc..76c9ba39c 100644 --- a/libc/inet/rpc/xdr_rec.c +++ b/libc/inet/rpc/xdr_rec.c @@ -147,6 +147,7 @@ static bool_t get_input_bytes (RECSTREAM *, caddr_t, int) internal_function; * write respectively. They are like the system * calls expect that they take an opaque handle rather than an fd. */ +libc_hidden_proto(xdrrec_create) void xdrrec_create (XDR *xdrs, u_int sendsize, u_int recvsize, caddr_t tcp_handle, @@ -209,7 +210,6 @@ xdrrec_create (XDR *xdrs, u_int sendsize, rstrm->fbtbc = 0; rstrm->last_frag = TRUE; } -libc_hidden_proto(xdrrec_create) libc_hidden_def(xdrrec_create) @@ -482,6 +482,7 @@ xdrrec_putint32 (XDR *xdrs, const int32_t *ip) * Before reading (deserializing from the stream, one should always call * this procedure to guarantee proper record alignment. */ +libc_hidden_proto(xdrrec_skiprecord) bool_t xdrrec_skiprecord (XDR *xdrs) { @@ -498,7 +499,6 @@ xdrrec_skiprecord (XDR *xdrs) rstrm->last_frag = FALSE; return TRUE; } -libc_hidden_proto(xdrrec_skiprecord) libc_hidden_def(xdrrec_skiprecord) /* @@ -506,6 +506,7 @@ libc_hidden_def(xdrrec_skiprecord) * Returns TRUE iff there is no more input in the buffer * after consuming the rest of the current record. */ +libc_hidden_proto(xdrrec_eof) bool_t xdrrec_eof (XDR *xdrs) { @@ -523,7 +524,6 @@ xdrrec_eof (XDR *xdrs) return TRUE; return FALSE; } -libc_hidden_proto(xdrrec_eof) libc_hidden_def(xdrrec_eof) /* @@ -532,6 +532,7 @@ libc_hidden_def(xdrrec_eof) * (output) tcp stream. (This lets the package support batched or * pipelined procedure calls.) TRUE => immediate flush to tcp connection. */ +libc_hidden_proto(xdrrec_endofrecord) bool_t xdrrec_endofrecord (XDR *xdrs, bool_t sendnow) { @@ -551,7 +552,6 @@ xdrrec_endofrecord (XDR *xdrs, bool_t sendnow) rstrm->out_finger += BYTES_PER_XDR_UNIT; return TRUE; } -libc_hidden_proto(xdrrec_endofrecord) libc_hidden_def(xdrrec_endofrecord) /* diff --git a/libc/inet/rpc/xdr_reference.c b/libc/inet/rpc/xdr_reference.c index 443ce1c8d..43a62e598 100644 --- a/libc/inet/rpc/xdr_reference.c +++ b/libc/inet/rpc/xdr_reference.c @@ -71,6 +71,7 @@ libc_hidden_proto(fputs) * size is the size of the referneced structure. * proc is the routine to handle the referenced structure. */ +libc_hidden_proto(xdr_reference) bool_t xdr_reference (XDR *xdrs, caddr_t *pp, u_int size, xdrproc_t proc) { @@ -111,7 +112,6 @@ xdr_reference (XDR *xdrs, caddr_t *pp, u_int size, xdrproc_t proc) } return stat; } -libc_hidden_proto(xdr_reference) libc_hidden_def(xdr_reference) /* diff --git a/libc/inet/socketcalls.c b/libc/inet/socketcalls.c index e003d700c..880eab3d8 100644 --- a/libc/inet/socketcalls.c +++ b/libc/inet/socketcalls.c @@ -55,6 +55,7 @@ libc_hidden_def(accept) #endif #ifdef L_bind +libc_hidden_proto(bind) #ifdef __NR_bind _syscall3(int, bind, int, sockfd, const struct sockaddr *, myaddr, socklen_t, addrlen); #elif defined(__NR_socketcall) @@ -68,7 +69,6 @@ int bind(int sockfd, const struct sockaddr *myaddr, socklen_t addrlen) return __socketcall(SYS_BIND, args); } #endif -libc_hidden_proto(bind) libc_hidden_def(bind) #endif @@ -109,6 +109,7 @@ int getpeername(int sockfd, struct sockaddr *addr, socklen_t * paddrlen) #endif #ifdef L_getsockname +libc_hidden_proto(getsockname) #ifdef __NR_getsockname _syscall3(int, getsockname, int, sockfd, struct sockaddr *, addr, socklen_t *,paddrlen); #elif defined(__NR_socketcall) @@ -122,7 +123,6 @@ int getsockname(int sockfd, struct sockaddr *addr, socklen_t * paddrlen) return __socketcall(SYS_GETSOCKNAME, args); } #endif -libc_hidden_proto(getsockname) libc_hidden_def(getsockname) #endif @@ -146,6 +146,7 @@ int getsockopt(int fd, int level, int optname, __ptr_t optval, #endif #ifdef L_listen +libc_hidden_proto(listen) #ifdef __NR_listen _syscall2(int, listen, int, sockfd, int, backlog); #elif defined(__NR_socketcall) @@ -158,7 +159,6 @@ int listen(int sockfd, int backlog) return __socketcall(SYS_LISTEN, args); } #endif -libc_hidden_proto(listen) libc_hidden_def(listen) #endif @@ -311,6 +311,7 @@ libc_hidden_def(sendto) #endif #ifdef L_setsockopt +libc_hidden_proto(setsockopt) #ifdef __NR_setsockopt _syscall5(int, setsockopt, int, fd, int, level, int, optname, const void *, optval, socklen_t, optlen); #elif defined(__NR_socketcall) @@ -328,7 +329,6 @@ int setsockopt(int fd, int level, int optname, const void *optval, return (__socketcall(SYS_SETSOCKOPT, args)); } #endif -libc_hidden_proto(setsockopt) libc_hidden_def(setsockopt) #endif @@ -349,6 +349,7 @@ int shutdown(int sockfd, int how) #endif #ifdef L_socket +libc_hidden_proto(socket) #ifdef __NR_socket _syscall3(int, socket, int, family, int, type, int, protocol); #elif defined(__NR_socketcall) @@ -362,7 +363,6 @@ int socket(int family, int type, int protocol) return __socketcall(SYS_SOCKET, args); } #endif -libc_hidden_proto(socket) libc_hidden_def(socket) #endif diff --git a/libc/misc/ctype/ctype.c b/libc/misc/ctype/ctype.c index 3f7bfd859..6589e4177 100644 --- a/libc/misc/ctype/ctype.c +++ b/libc/misc/ctype/ctype.c @@ -270,6 +270,7 @@ IS_FUNC_BODY(xdigit); #ifdef L_tolower #undef tolower +libc_hidden_proto(tolower) #ifdef __UCLIBC_HAS_CTYPE_TABLES__ int tolower(int c) @@ -288,7 +289,6 @@ int tolower(int c) } #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */ -libc_hidden_proto(tolower) libc_hidden_def(tolower) #endif @@ -296,6 +296,7 @@ libc_hidden_def(tolower) #ifdef L_tolower_l #undef tolower_l +libc_hidden_proto(tolower_l) int tolower_l(int c, __locale_t l) { #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__) @@ -303,7 +304,6 @@ int tolower_l(int c, __locale_t l) #endif return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_tolower[c] : c; } -libc_hidden_proto(tolower_l) libc_hidden_def(tolower_l) #endif @@ -311,6 +311,7 @@ libc_hidden_def(tolower_l) #ifdef L_toupper #undef toupper +libc_hidden_proto(toupper) #ifdef __UCLIBC_HAS_CTYPE_TABLES__ int toupper(int c) @@ -329,7 +330,6 @@ int toupper(int c) } #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */ -libc_hidden_proto(toupper) libc_hidden_def(toupper) #endif @@ -337,6 +337,7 @@ libc_hidden_def(toupper) #ifdef L_toupper_l #undef toupper_l +libc_hidden_proto(toupper_l) int toupper_l(int c, __locale_t l) { #if defined(__UCLIBC_HAS_CTYPE_ENFORCED__) @@ -344,8 +345,6 @@ int toupper_l(int c, __locale_t l) #endif return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_toupper[c] : c; } - -libc_hidden_proto(toupper_l) libc_hidden_def(toupper_l) #endif diff --git a/libc/misc/dirent/dirfd.c b/libc/misc/dirent/dirfd.c index 236614642..c6f46e965 100644 --- a/libc/misc/dirent/dirfd.c +++ b/libc/misc/dirent/dirfd.c @@ -8,6 +8,8 @@ #include #include "dirstream.h" +libc_hidden_proto(dirfd) + int dirfd(DIR * dir) { if (!dir || dir->dd_fd == -1) { @@ -17,5 +19,4 @@ int dirfd(DIR * dir) return dir->dd_fd; } -libc_hidden_proto(dirfd) libc_hidden_def(dirfd) diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index 9987324b2..349c0e5d1 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -93,8 +93,9 @@ char **__environ = 0; weak_alias(__environ, environ) /* TODO: don't export __pagesize; we cant now because libpthread uses it */ -size_t __pagesize = 0; +extern size_t __pagesize; libc_hidden_proto(__pagesize) +size_t __pagesize = 0; libc_hidden_def(__pagesize) #ifndef O_NOFOLLOW @@ -152,6 +153,8 @@ static int __check_suid(void) * __uClibc_main. */ +extern void __uClibc_init(void); +libc_hidden_proto(__uClibc_init) void __uClibc_init(void) { static int been_there_done_that = 0; @@ -199,7 +202,6 @@ void __uClibc_init(void) _stdio_init(); } -libc_hidden_proto(__uClibc_init) libc_hidden_def(__uClibc_init) #ifdef __UCLIBC_CTOR_DTOR__ diff --git a/libc/misc/locale/locale.c b/libc/misc/locale/locale.c index 28ebb3fb2..c32d09722 100644 --- a/libc/misc/locale/locale.c +++ b/libc/misc/locale/locale.c @@ -1012,6 +1012,7 @@ static const unsigned char nl_data[C_LC_ALL + 1 + 90 + 320] = { ']', '\x00', '^', '[', 'n', 'N', ']', '\x00', }; +libc_hidden_proto(nl_langinfo) char *nl_langinfo(nl_item item) { unsigned int c; @@ -1025,24 +1026,26 @@ char *nl_langinfo(nl_item item) } return (char *) cat_start; /* Conveniently, this is the empty string. */ } -libc_hidden_proto(nl_langinfo) libc_hidden_def(nl_langinfo) #else /* __LOCALE_C_ONLY */ #if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) +libc_hidden_proto(nl_langinfo) + libc_hidden_proto(nl_langinfo_l) char *nl_langinfo(nl_item item) { return nl_langinfo_l(item, __UCLIBC_CURLOCALE); } -libc_hidden_proto(nl_langinfo) libc_hidden_def(nl_langinfo) #else /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ +libc_hidden_proto(__XL_NPP(nl_langinfo)) + static const char empty[] = ""; char *__XL_NPP(nl_langinfo)(nl_item item __LOCALE_PARAM ) @@ -1057,7 +1060,6 @@ char *__XL_NPP(nl_langinfo)(nl_item item __LOCALE_PARAM ) return (char *) empty; } -libc_hidden_proto(__XL_NPP(nl_langinfo)) libc_hidden_def(__XL_NPP(nl_langinfo)) #endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ @@ -1068,6 +1070,8 @@ libc_hidden_def(__XL_NPP(nl_langinfo)) /**********************************************************************/ #ifdef L_newlocale +libc_hidden_proto(newlocale) + #ifdef __UCLIBC_MJN3_ONLY__ #warning TODO: Move posix and utf8 strings. #endif @@ -1305,13 +1309,14 @@ __locale_t newlocale(int category_mask, const char *locale, __locale_t base) return base; } -libc_hidden_proto(newlocale) libc_hidden_def(newlocale) #endif /**********************************************************************/ #ifdef L_duplocale +libc_hidden_proto(duplocale) + #ifdef __UCLIBC_MJN3_ONLY__ #warning REMINDER: When we allocate ctype tables, remember to dup them. #endif @@ -1339,7 +1344,6 @@ __locale_t duplocale(__locale_t dataset) } return r; } -libc_hidden_proto(duplocale) libc_hidden_def(duplocale) #endif @@ -1363,6 +1367,8 @@ void freelocale(__locale_t dataset) /**********************************************************************/ #ifdef L_uselocale +libc_hidden_proto(uselocale) + __locale_t uselocale(__locale_t dataset) { __locale_t old; @@ -1386,7 +1392,6 @@ __locale_t uselocale(__locale_t dataset) } return old; } -libc_hidden_proto(uselocale) libc_hidden_def(uselocale) #endif diff --git a/libc/misc/mntent/mntent.c b/libc/misc/mntent/mntent.c index f9734fce5..3164f6634 100644 --- a/libc/misc/mntent/mntent.c +++ b/libc/misc/mntent/mntent.c @@ -9,6 +9,10 @@ #include #include +libc_hidden_proto(getmntent_r) +libc_hidden_proto(setmntent) +libc_hidden_proto(endmntent) + libc_hidden_proto(strstr) libc_hidden_proto(strtok_r) libc_hidden_proto(atoi) @@ -74,7 +78,6 @@ struct mntent *getmntent_r (FILE *filep, return mnt; } -libc_hidden_proto(getmntent_r) libc_hidden_def(getmntent_r) struct mntent *getmntent(FILE * filep) @@ -116,7 +119,6 @@ FILE *setmntent(const char *name, const char *mode) { return fopen(name, mode); } -libc_hidden_proto(setmntent) libc_hidden_def(setmntent) int endmntent(FILE * filep) @@ -125,5 +127,4 @@ int endmntent(FILE * filep) fclose(filep); return 1; } -libc_hidden_proto(endmntent) libc_hidden_def(endmntent) diff --git a/libc/misc/search/hsearch_r.c b/libc/misc/search/hsearch_r.c index 47ff185d4..e7ded795f 100644 --- a/libc/misc/search/hsearch_r.c +++ b/libc/misc/search/hsearch_r.c @@ -27,6 +27,10 @@ #include +libc_hidden_proto(hcreate_r) +libc_hidden_proto(hdestroy_r) +libc_hidden_proto(hsearch_r) + /* [Aho,Sethi,Ullman] Compilers: Principles, Techniques and Tools, 1986 [Knuth] The Art of Computer Programming, part 3 (6.4) */ @@ -96,7 +100,6 @@ int hcreate_r (size_t nel, struct hsearch_data *htab) /* everything went alright */ return 1; } -libc_hidden_proto(hcreate_r) libc_hidden_def(hcreate_r) #endif @@ -119,7 +122,6 @@ void hdestroy_r (struct hsearch_data *htab) /* the sign for an existing table is an value != NULL in htable */ htab->table = NULL; } -libc_hidden_proto(hdestroy_r) libc_hidden_def(hdestroy_r) #endif @@ -230,6 +232,5 @@ int hsearch_r (ENTRY item, ACTION action, ENTRY **retval, *retval = NULL; return 0; } -libc_hidden_proto(hsearch_r) libc_hidden_def(hsearch_r) #endif diff --git a/libc/misc/search/tsearch.c b/libc/misc/search/tsearch.c index 47d409468..d66a5c422 100644 --- a/libc/misc/search/tsearch.c +++ b/libc/misc/search/tsearch.c @@ -32,6 +32,10 @@ Cambridge, MA 02139, USA. */ #include #include +libc_hidden_proto(tsearch) +libc_hidden_proto(tfind) +libc_hidden_proto(tdestroy) + /* This routine is not very bad. It makes many assumptions about * the compiler. It assumpts that the first field in node must be * the "key" field, which points to the datum. It is a very trick @@ -77,7 +81,6 @@ void *tsearch(__const void *key, void **vrootp, __compar_fn_t compar) } return (q); } -libc_hidden_proto(tsearch) libc_hidden_def(tsearch) #endif @@ -100,7 +103,6 @@ void *tfind(__const void *key, void * __const *vrootp, __compar_fn_t compar) } return NULL; } -libc_hidden_proto(tfind) libc_hidden_def(tfind) #endif @@ -215,7 +217,6 @@ void tdestroy (void *vroot, __free_fn_t freefct) tdestroy_recurse (root, freefct); } } -libc_hidden_proto(tdestroy) libc_hidden_def(tdestroy) #endif diff --git a/libc/misc/statfs/fstatfs64.c b/libc/misc/statfs/fstatfs64.c index 89ab5107d..291b8719d 100644 --- a/libc/misc/statfs/fstatfs64.c +++ b/libc/misc/statfs/fstatfs64.c @@ -38,6 +38,8 @@ #include #include +libc_hidden_proto(fstatfs64) + libc_hidden_proto(memcpy) libc_hidden_proto(fstatfs) @@ -62,5 +64,4 @@ int fstatfs64 (int fd, struct statfs64 *buf) return 0; } -libc_hidden_proto(fstatfs64) libc_hidden_def(fstatfs64) diff --git a/libc/misc/statfs/statfs64.c b/libc/misc/statfs/statfs64.c index 230b89b9c..e8d2c13d7 100644 --- a/libc/misc/statfs/statfs64.c +++ b/libc/misc/statfs/statfs64.c @@ -36,6 +36,8 @@ #include #include +libc_hidden_proto(statfs64) + libc_hidden_proto(memcpy) libc_hidden_proto(statfs) @@ -60,5 +62,4 @@ int statfs64 (const char *file, struct statfs64 *buf) return 0; } -libc_hidden_proto(statfs64) libc_hidden_def(statfs64) diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c index 39aacddd2..0908a8cea 100644 --- a/libc/misc/time/time.c +++ b/libc/misc/time/time.c @@ -153,6 +153,12 @@ #include #endif +libc_hidden_proto(asctime) +libc_hidden_proto(asctime_r) +libc_hidden_proto(ctime) +libc_hidden_proto(localtime) +libc_hidden_proto(localtime_r) + libc_hidden_proto(memset) libc_hidden_proto(memcpy) libc_hidden_proto(strcmp) @@ -245,15 +251,12 @@ extern time_t _time_mktime_tzi(struct tm *timeptr, int store_on_success, /**********************************************************************/ #ifdef L_asctime -libc_hidden_proto(asctime_r) - static char __time_str[26]; char *asctime(const struct tm *ptm) { return asctime_r(ptm, __time_str); } -libc_hidden_proto(asctime) libc_hidden_def(asctime) #endif @@ -396,7 +399,6 @@ char *asctime_r(register const struct tm *__restrict ptm, return buffer - 8; } -libc_hidden_proto(asctime_r) libc_hidden_def(asctime_r) #endif @@ -471,23 +473,16 @@ clock_t clock(void) /**********************************************************************/ #ifdef L_ctime -libc_hidden_proto(asctime) -libc_hidden_proto(localtime) - char *ctime(const time_t *clock) { /* ANSI/ISO/SUSv3 say that ctime is equivalent to the following. */ return asctime(localtime(clock)); } -libc_hidden_proto(ctime) libc_hidden_def(ctime) #endif /**********************************************************************/ #ifdef L_ctime_r -libc_hidden_proto(asctime_r) -libc_hidden_proto(localtime_r) - char *ctime_r(const time_t *clock, char *buf) { struct tm xtm; @@ -560,8 +555,6 @@ struct tm *gmtime_r(const time_t *__restrict timer, /**********************************************************************/ #ifdef L_localtime -libc_hidden_proto(localtime_r) - struct tm *localtime(const time_t *timer) { register struct tm *ptm = &__time_tm; @@ -572,7 +565,6 @@ struct tm *localtime(const time_t *timer) return ptm; } -libc_hidden_proto(localtime) libc_hidden_def(localtime) #endif @@ -592,7 +584,6 @@ struct tm *localtime_r(register const time_t *__restrict timer, return result; } -libc_hidden_proto(localtime_r) libc_hidden_def(localtime_r) #endif @@ -785,6 +776,8 @@ time_t timegm(struct tm *timeptr) #if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) +libc_hidden_proto(strftime) + libc_hidden_proto(strftime_l) size_t strftime(char *__restrict s, size_t maxsize, @@ -793,7 +786,6 @@ size_t strftime(char *__restrict s, size_t maxsize, { return strftime_l(s, maxsize, format, timeptr, __UCLIBC_CURLOCALE); } -libc_hidden_proto(strftime) libc_hidden_def(strftime) #else /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ @@ -994,6 +986,7 @@ static int load_field(int k, const struct tm *__restrict timeptr) #warning TODO: Check multibyte format string validity. #endif +libc_hidden_proto(__XL_NPP(strftime)) size_t __XL_NPP(strftime)(char *__restrict s, size_t maxsize, const char *__restrict format, const struct tm *__restrict timeptr __LOCALE_PARAM ) @@ -1276,7 +1269,6 @@ size_t __XL_NPP(strftime)(char *__restrict s, size_t maxsize, } goto LOOP; } -libc_hidden_proto(__XL_NPP(strftime)) libc_hidden_def(__XL_NPP(strftime)) #endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ @@ -1295,6 +1287,8 @@ libc_hidden_def(__XL_NPP(strftime)) #if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) +libc_hidden_proto(strptime) + libc_hidden_proto(strptime_l) char *strptime(const char *__restrict buf, const char *__restrict format, @@ -1302,7 +1296,6 @@ char *strptime(const char *__restrict buf, const char *__restrict format, { return strptime_l(buf, format, tm, __UCLIBC_CURLOCALE); } -libc_hidden_proto(strptime) libc_hidden_def(strptime) #else /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ @@ -1449,8 +1442,7 @@ static const unsigned char spec[] = { #define MAX_PUSH 4 -libc_hidden_proto(localtime_r) - +libc_hidden_proto(__XL_NPP(strptime)) char *__XL_NPP(strptime)(const char *__restrict buf, const char *__restrict format, struct tm *__restrict tm __LOCALE_PARAM) { @@ -1660,7 +1652,6 @@ char *__XL_NPP(strptime)(const char *__restrict buf, const char *__restrict form } return NULL; } -libc_hidden_proto(__XL_NPP(strptime)) libc_hidden_def(__XL_NPP(strptime)) #endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ @@ -2356,6 +2347,8 @@ time_t attribute_hidden _time_mktime_tzi(struct tm *timeptr, int store_on_succes #if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) +libc_hidden_proto(wcsftime) + libc_hidden_proto(wcsftime_l) size_t wcsftime(wchar_t *__restrict s, size_t maxsize, @@ -2364,11 +2357,11 @@ size_t wcsftime(wchar_t *__restrict s, size_t maxsize, { return wcsftime_l(s, maxsize, format, timeptr, __UCLIBC_CURLOCALE); } -libc_hidden_proto(wcsftime) libc_hidden_def(wcsftime) #else /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ +libc_hidden_proto(__XL_NPP(wcsftime)) size_t __XL_NPP(wcsftime)(wchar_t *__restrict s, size_t maxsize, const wchar_t *__restrict format, const struct tm *__restrict timeptr __LOCALE_PARAM ) @@ -2376,7 +2369,6 @@ size_t __XL_NPP(wcsftime)(wchar_t *__restrict s, size_t maxsize, #warning wcsftime always fails return 0; /* always fail */ } -libc_hidden_proto(__XL_NPP(wcsftime)) libc_hidden_def(__XL_NPP(wcsftime)) #endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c index 28efbba22..62a5af704 100644 --- a/libc/misc/wchar/wchar.c +++ b/libc/misc/wchar/wchar.c @@ -178,6 +178,7 @@ extern size_t _wchar_wcsntoutf8s(char *__restrict s, size_t n, libc_hidden_proto(mbrtowc) +libc_hidden_proto(btowc) wint_t btowc(int c) { #ifdef __CTYPE_HAS_8_BIT_LOCALES @@ -208,7 +209,6 @@ wint_t btowc(int c) #endif /* __CTYPE_HAS_8_BIT_LOCALES */ } -libc_hidden_proto(btowc) libc_hidden_def(btowc) #endif @@ -248,11 +248,11 @@ int wctob(wint_t c) /**********************************************************************/ #ifdef L_mbsinit +libc_hidden_proto(mbsinit) int mbsinit(const mbstate_t *ps) { return !ps || !ps->__mask; } -libc_hidden_proto(mbsinit) libc_hidden_def(mbsinit) #endif @@ -261,13 +261,13 @@ libc_hidden_def(mbsinit) libc_hidden_proto(mbrtowc) +libc_hidden_proto(mbrlen) size_t mbrlen(const char *__restrict s, size_t n, mbstate_t *__restrict ps) { static mbstate_t mbstate; /* Rely on bss 0-init. */ return mbrtowc(NULL, s, n, (ps != NULL) ? ps : &mbstate); } -libc_hidden_proto(mbrlen) libc_hidden_def(mbrlen) #endif @@ -276,6 +276,7 @@ libc_hidden_def(mbrlen) libc_hidden_proto(mbsnrtowcs) +libc_hidden_proto(mbrtowc) size_t mbrtowc(wchar_t *__restrict pwc, const char *__restrict s, size_t n, mbstate_t *__restrict ps) { @@ -326,7 +327,6 @@ size_t mbrtowc(wchar_t *__restrict pwc, const char *__restrict s, } return (size_t) r; } -libc_hidden_proto(mbrtowc) libc_hidden_def(mbrtowc) #endif @@ -338,6 +338,7 @@ libc_hidden_proto(wcsnrtombs) /* Note: We completely ignore ps in all currently supported conversions. */ /* TODO: Check for valid state anyway? */ +libc_hidden_proto(wcrtomb) size_t wcrtomb(register char *__restrict s, wchar_t wc, mbstate_t *__restrict ps) { @@ -360,7 +361,6 @@ size_t wcrtomb(register char *__restrict s, wchar_t wc, r = wcsnrtombs(s, &pwc, 1, MB_LEN_MAX, ps); return (r != 0) ? r : 1; } -libc_hidden_proto(wcrtomb) libc_hidden_def(wcrtomb) #endif @@ -369,6 +369,7 @@ libc_hidden_def(wcrtomb) libc_hidden_proto(mbsnrtowcs) +libc_hidden_proto(mbsrtowcs) size_t mbsrtowcs(wchar_t *__restrict dst, const char **__restrict src, size_t len, mbstate_t *__restrict ps) { @@ -377,7 +378,6 @@ size_t mbsrtowcs(wchar_t *__restrict dst, const char **__restrict src, return mbsnrtowcs(dst, src, SIZE_MAX, len, ((ps != NULL) ? ps : &mbstate)); } -libc_hidden_proto(mbsrtowcs) libc_hidden_def(mbsrtowcs) #endif @@ -390,12 +390,12 @@ libc_hidden_def(mbsrtowcs) libc_hidden_proto(wcsnrtombs) +libc_hidden_proto(wcsrtombs) size_t wcsrtombs(char *__restrict dst, const wchar_t **__restrict src, size_t len, mbstate_t *__restrict ps) { return wcsnrtombs(dst, src, SIZE_MAX, len, ps); } -libc_hidden_proto(wcsrtombs) libc_hidden_def(wcsrtombs) #endif @@ -694,6 +694,7 @@ size_t attribute_hidden _wchar_wcsntoutf8s(char *__restrict s, size_t n, /* WARNING: We treat len as SIZE_MAX when dst is NULL! */ +libc_hidden_proto(mbsnrtowcs) size_t mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src, size_t NMC, size_t len, mbstate_t *__restrict ps) { @@ -792,7 +793,6 @@ size_t mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src, } return len - count; } -libc_hidden_proto(mbsnrtowcs) libc_hidden_def(mbsnrtowcs) #endif @@ -804,6 +804,7 @@ libc_hidden_def(mbsnrtowcs) /* Note: We completely ignore ps in all currently supported conversions. * TODO: Check for valid state anyway? */ +libc_hidden_proto(wcsnrtombs) size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src, size_t NWC, size_t len, mbstate_t *__restrict ps) { @@ -912,13 +913,14 @@ size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src, } return len - count; } -libc_hidden_proto(wcsnrtombs) libc_hidden_def(wcsnrtombs) #endif /**********************************************************************/ #ifdef L_wcswidth +libc_hidden_proto(wcswidth) + #ifdef __UCLIBC_MJN3_ONLY__ #warning REMINDER: If we start doing translit, wcwidth and wcswidth will need updating. #warning TODO: Update wcwidth to match latest by Kuhn. @@ -1155,7 +1157,6 @@ int wcswidth(const wchar_t *pwcs, size_t n) #endif /* __UCLIBC_HAS_LOCALE__ */ -libc_hidden_proto(wcswidth) libc_hidden_def(wcswidth) #endif diff --git a/libc/misc/wctype/wctype.c b/libc/misc/wctype/wctype.c index 0be119a57..f9feb3822 100644 --- a/libc/misc/wctype/wctype.c +++ b/libc/misc/wctype/wctype.c @@ -185,21 +185,21 @@ enum { #ifdef __UCLIBC_DO_XLOCALE #define ISW_FUNC_BODY(NAME) \ +libc_hidden_proto(__PASTE3(isw,NAME,_l)); \ int __PASTE3(isw,NAME,_l) (wint_t wc, __locale_t l) \ { \ return iswctype_l(wc, __PASTE2(_CTYPE_is,NAME), l); \ } \ -libc_hidden_proto(__PASTE3(isw,NAME,_l)); \ libc_hidden_def(__PASTE3(isw,NAME,_l)) #else /* __UCLIBC_DO_XLOCALE */ #define ISW_FUNC_BODY(NAME) \ +libc_hidden_proto(__PASTE2(isw,NAME)); \ int __PASTE2(isw,NAME) (wint_t wc) \ { \ return iswctype(wc, __PASTE2(_CTYPE_is,NAME)); \ } \ -libc_hidden_proto(__PASTE2(isw,NAME)); \ libc_hidden_def(__PASTE2(isw,NAME)) #endif /* __UCLIBC_DO_XLOCALE */ @@ -500,6 +500,7 @@ libc_hidden_def(towupper) static const unsigned char typestring[] = __CTYPE_TYPESTRING; /* extern const unsigned char typestring[]; */ +libc_hidden_proto(wctype) wctype_t wctype(const char *property) { const unsigned char *p; @@ -518,7 +519,6 @@ wctype_t wctype(const char *property) /* TODO - Add locale-specific classifications. */ return 0; } -libc_hidden_proto(wctype) libc_hidden_def(wctype) #endif @@ -531,11 +531,11 @@ libc_hidden_def(wctype) libc_hidden_proto(wctype) +libc_hidden_proto(wctype_l) wctype_t wctype_l (const char *property, __locale_t locale) { return wctype(property); } -libc_hidden_proto(wctype_l) libc_hidden_def(wctype_l) #endif @@ -907,6 +907,7 @@ libc_hidden_def(towctrans) static const char transstring[] = __CTYPE_TRANSTRING; +libc_hidden_proto(wctrans) wctrans_t wctrans(const char *property) { const unsigned char *p; @@ -925,7 +926,6 @@ wctrans_t wctrans(const char *property) /* TODO - Add locale-specific translations. */ return 0; } -libc_hidden_proto(wctrans) libc_hidden_def(wctrans) #endif diff --git a/libc/pwd_grp/pwd_grp.c b/libc/pwd_grp/pwd_grp.c index 1237df72c..ea350802c 100644 --- a/libc/pwd_grp/pwd_grp.c +++ b/libc/pwd_grp/pwd_grp.c @@ -87,6 +87,7 @@ extern int __pgsreader(int (*__parserfunc)(void *d, char *line), void *data, /**********************************************************************/ #ifdef L_fgetpwent_r +libc_hidden_proto(fgetpwent_r) int fgetpwent_r(FILE *__restrict stream, struct passwd *__restrict resultbuf, char *__restrict buffer, size_t buflen, struct passwd **__restrict result) @@ -101,13 +102,13 @@ int fgetpwent_r(FILE *__restrict stream, struct passwd *__restrict resultbuf, return rv; } -libc_hidden_proto(fgetpwent_r) libc_hidden_def(fgetpwent_r) #endif /**********************************************************************/ #ifdef L_fgetgrent_r +libc_hidden_proto(fgetgrent_r) int fgetgrent_r(FILE *__restrict stream, struct group *__restrict resultbuf, char *__restrict buffer, size_t buflen, struct group **__restrict result) @@ -122,13 +123,13 @@ int fgetgrent_r(FILE *__restrict stream, struct group *__restrict resultbuf, return rv; } -libc_hidden_proto(fgetgrent_r) libc_hidden_def(fgetgrent_r) #endif /**********************************************************************/ #ifdef L_fgetspent_r +libc_hidden_proto(fgetspent_r) int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf, char *__restrict buffer, size_t buflen, struct spwd **__restrict result) @@ -143,7 +144,6 @@ int fgetspent_r(FILE *__restrict stream, struct spwd *__restrict resultbuf, return rv; } -libc_hidden_proto(fgetspent_r) libc_hidden_def(fgetspent_r) #endif @@ -202,6 +202,7 @@ struct spwd *fgetspent(FILE *stream) /**********************************************************************/ #ifdef L_sgetspent_r +libc_hidden_proto(sgetspent_r) int sgetspent_r(const char *string, struct spwd *result_buf, char *buffer, size_t buflen, struct spwd **result) { @@ -229,7 +230,6 @@ int sgetspent_r(const char *string, struct spwd *result_buf, DONE: return rv; } -libc_hidden_proto(sgetspent_r) libc_hidden_def(sgetspent_r) #endif @@ -479,6 +479,7 @@ void endpwent(void) } +libc_hidden_proto(getpwent_r) int getpwent_r(struct passwd *__restrict resultbuf, char *__restrict buffer, size_t buflen, struct passwd **__restrict result) @@ -507,7 +508,7 @@ int getpwent_r(struct passwd *__restrict resultbuf, return rv; } -libc_hidden_proto(getpwent_r) +libc_hidden_def(getpwent_r) #endif /**********************************************************************/ @@ -534,6 +535,7 @@ void endgrent(void) UNLOCK; } +libc_hidden_proto(getgrent_r) int getgrent_r(struct group *__restrict resultbuf, char *__restrict buffer, size_t buflen, struct group **__restrict result) @@ -562,7 +564,6 @@ int getgrent_r(struct group *__restrict resultbuf, return rv; } -libc_hidden_proto(getgrent_r) libc_hidden_def(getgrent_r) #endif @@ -590,6 +591,7 @@ void endspent(void) UNLOCK; } +libc_hidden_proto(getspent_r) int getspent_r(struct spwd *resultbuf, char *buffer, size_t buflen, struct spwd **result) { @@ -617,7 +619,6 @@ int getspent_r(struct spwd *resultbuf, char *buffer, return rv; } -libc_hidden_proto(getspent_r) libc_hidden_def(getspent_r) #endif diff --git a/libc/pwd_grp/pwd_grp_internal.c b/libc/pwd_grp/pwd_grp_internal.c index 6d32ec911..fd42b1ebd 100644 --- a/libc/pwd_grp/pwd_grp_internal.c +++ b/libc/pwd_grp/pwd_grp_internal.c @@ -55,6 +55,7 @@ /**********************************************************************/ #ifdef GETXXKEY_R_FUNC +libc_hidden_proto(GETXXKEY_R_FUNC) int GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key, GETXXKEY_R_ENTTYPE *__restrict resultbuf, char *__restrict buffer, size_t buflen, @@ -89,7 +90,6 @@ int GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key, return rv; } -libc_hidden_proto(GETXXKEY_R_FUNC) libc_hidden_def(GETXXKEY_R_FUNC) #endif diff --git a/libc/signal/sigaddset.c b/libc/signal/sigaddset.c index 36d1edc32..83721772c 100644 --- a/libc/signal/sigaddset.c +++ b/libc/signal/sigaddset.c @@ -19,6 +19,7 @@ #include "sigsetops.h" /* Add SIGNO to SET. */ +libc_hidden_proto(sigaddset) int sigaddset (set, signo) sigset_t *set; @@ -32,5 +33,4 @@ sigaddset (set, signo) return __sigaddset (set, signo); } -libc_hidden_proto(sigaddset) libc_hidden_def(sigaddset) diff --git a/libc/signal/sigblock.c b/libc/signal/sigblock.c index 8dd4eebd7..63156804a 100644 --- a/libc/signal/sigblock.c +++ b/libc/signal/sigblock.c @@ -24,6 +24,7 @@ libc_hidden_proto(sigprocmask) #include "sigset-cvt-mask.h" /* Block signals in MASK, returning the old mask. */ +libc_hidden_proto(sigblock) int sigblock (int mask) { sigset_t set, oset; @@ -36,5 +37,4 @@ int sigblock (int mask) return sigset_get_old_mask (&oset); } -libc_hidden_proto(sigblock) libc_hidden_def(sigblock) diff --git a/libc/signal/sigdelset.c b/libc/signal/sigdelset.c index 6fa7241c7..de988a7e8 100644 --- a/libc/signal/sigdelset.c +++ b/libc/signal/sigdelset.c @@ -19,6 +19,7 @@ #include "sigsetops.h" /* Add SIGNO to SET. */ +libc_hidden_proto(sigdelset) int sigdelset (sigset_t *set, int signo) { if (set == NULL || signo <= 0 || signo >= NSIG) @@ -29,5 +30,4 @@ int sigdelset (sigset_t *set, int signo) return __sigdelset (set, signo); } -libc_hidden_proto(sigdelset) libc_hidden_def(sigdelset) diff --git a/libc/signal/sigempty.c b/libc/signal/sigempty.c index 64330a686..e642e9335 100644 --- a/libc/signal/sigempty.c +++ b/libc/signal/sigempty.c @@ -23,6 +23,7 @@ libc_hidden_proto(memset) /* Clear all signals from SET. */ +libc_hidden_proto(sigemptyset) int sigemptyset (set) sigset_t *set; @@ -37,5 +38,4 @@ sigemptyset (set) return 0; } -libc_hidden_proto(sigemptyset) libc_hidden_def(sigemptyset) diff --git a/libc/signal/sigfillset.c b/libc/signal/sigfillset.c index 2f72e8247..83e47937d 100644 --- a/libc/signal/sigfillset.c +++ b/libc/signal/sigfillset.c @@ -21,9 +21,9 @@ #include libc_hidden_proto(memset) -libc_hidden_proto(__sigdelset) /* Set all signals in SET. */ +libc_hidden_proto(sigfillset) int sigfillset (sigset_t *set) { @@ -46,5 +46,4 @@ sigfillset (sigset_t *set) return 0; } -libc_hidden_proto(sigfillset) libc_hidden_def(sigfillset) diff --git a/libc/signal/signal.c b/libc/signal/signal.c index c9ad64387..87bd7ab84 100644 --- a/libc/signal/signal.c +++ b/libc/signal/signal.c @@ -28,7 +28,7 @@ sigset_t _sigintr attribute_hidden; /* Set by siginterrupt. */ /* Set the handler for the signal SIG to HANDLER, returning the old handler, or SIG_ERR on error. */ -__sighandler_t +attribute_hidden __sighandler_t __bsd_signal (int sig, __sighandler_t handler) { struct sigaction act, oact; diff --git a/libc/signal/sigpause.c b/libc/signal/sigpause.c index e5dfc8e01..9f7fb0e76 100644 --- a/libc/signal/sigpause.c +++ b/libc/signal/sigpause.c @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#define _BSD_SOURCE #include #include #include /* For NULL. */ @@ -29,6 +30,7 @@ libc_hidden_proto(sigsuspend) /* Set the mask of blocked signals to MASK, wait for a signal to arrive, and then restore the mask. */ +libc_hidden_proto(__sigpause) int __sigpause (int sig_or_mask, int is_sig) { sigset_t set; @@ -46,7 +48,6 @@ int __sigpause (int sig_or_mask, int is_sig) return sigsuspend (&set); } -libc_hidden_proto(__sigpause) libc_hidden_def(__sigpause) #undef sigpause @@ -54,9 +55,9 @@ libc_hidden_def(__sigpause) /* We have to provide a default version of this function since the standards demand it. The version which is a bit more reasonable is the BSD version. So make this the default. */ +libc_hidden_proto(sigpause) int sigpause (int mask) { return __sigpause (mask, 0); } -libc_hidden_proto(sigpause) libc_hidden_def(sigpause) diff --git a/libc/signal/sigsetmask.c b/libc/signal/sigsetmask.c index ea68d3ebb..e524aa108 100644 --- a/libc/signal/sigsetmask.c +++ b/libc/signal/sigsetmask.c @@ -24,6 +24,7 @@ libc_hidden_proto(sigprocmask) #include "sigset-cvt-mask.h" /* Set the mask of blocked signals to MASK, returning the old mask. */ +libc_hidden_proto(sigsetmask) int sigsetmask (int mask) { @@ -38,5 +39,4 @@ sigsetmask (int mask) return sigset_get_old_mask (&oset); } -libc_hidden_proto(sigsetmask) libc_hidden_def(sigsetmask) diff --git a/libc/signal/sigwait.c b/libc/signal/sigwait.c index cd46d2dbe..76321b148 100644 --- a/libc/signal/sigwait.c +++ b/libc/signal/sigwait.c @@ -24,6 +24,7 @@ libc_hidden_proto(sigwaitinfo) +libc_hidden_proto(sigwait) int sigwait (const sigset_t *set, int *sig) { int ret = 1; @@ -33,5 +34,4 @@ int sigwait (const sigset_t *set, int *sig) } return 1; } -libc_hidden_proto(sigwait) libc_hidden_def(sigwait) diff --git a/libc/stdio/__fsetlocking.c b/libc/stdio/__fsetlocking.c index 74f253626..2e8710076 100644 --- a/libc/stdio/__fsetlocking.c +++ b/libc/stdio/__fsetlocking.c @@ -8,6 +8,8 @@ #include "_stdio.h" #include +libc_hidden_proto(__fsetlocking) + /* Not threadsafe. */ /* Notes: @@ -43,6 +45,4 @@ int __fsetlocking(FILE *stream, int locking_mode) return FSETLOCKING_INTERNAL; #endif } - -libc_hidden_proto(__fsetlocking) libc_hidden_def(__fsetlocking) diff --git a/libc/stdio/asprintf.c b/libc/stdio/asprintf.c index 98865545e..f5ccfcc7c 100644 --- a/libc/stdio/asprintf.c +++ b/libc/stdio/asprintf.c @@ -8,6 +8,8 @@ #include "_stdio.h" #include +libc_hidden_proto(asprintf) + libc_hidden_proto(vasprintf) #ifndef __STDIO_HAS_VSNPRINTF @@ -25,8 +27,6 @@ int asprintf(char **__restrict buf, const char * __restrict format, ...) return rv; } - -libc_hidden_proto(asprintf) libc_hidden_def(asprintf) #endif diff --git a/libc/stdio/fclose.c b/libc/stdio/fclose.c index ec735d100..843599c0f 100644 --- a/libc/stdio/fclose.c +++ b/libc/stdio/fclose.c @@ -6,6 +6,7 @@ */ #include "_stdio.h" +libc_hidden_proto(fclose) libc_hidden_proto(close) libc_hidden_proto(fflush_unlocked) @@ -87,5 +88,4 @@ int fclose(register FILE *stream) return rv; } -libc_hidden_proto(fclose) libc_hidden_def(fclose) diff --git a/libc/stdio/fflush.c b/libc/stdio/fflush.c index e33a0065a..a03c311e0 100644 --- a/libc/stdio/fflush.c +++ b/libc/stdio/fflush.c @@ -137,6 +137,7 @@ libc_hidden_def(fflush) #elif defined __UCLIBC_HAS_THREADS__ +libc_hidden_proto(fflush) int fflush(register FILE *stream) { int retval; @@ -159,7 +160,6 @@ int fflush(register FILE *stream) return retval; } -libc_hidden_proto(fflush) libc_hidden_def(fflush) #endif diff --git a/libc/stdio/fgetc.c b/libc/stdio/fgetc.c index 599d12b30..eb8c58254 100644 --- a/libc/stdio/fgetc.c +++ b/libc/stdio/fgetc.c @@ -13,6 +13,8 @@ #undef getc #undef getc_unlocked +libc_hidden_proto(__fgetc_unlocked) + #ifdef __DO_UNLOCKED libc_hidden_proto(fflush_unlocked) @@ -71,7 +73,6 @@ int __fgetc_unlocked(FILE *stream) return EOF; } -libc_hidden_proto(__fgetc_unlocked) libc_hidden_def(__fgetc_unlocked) strong_alias(__fgetc_unlocked,fgetc_unlocked) @@ -94,8 +95,7 @@ strong_alias(__fgetc_unlocked,getc) #elif defined __UCLIBC_HAS_THREADS__ -libc_hidden_proto(__fgetc_unlocked) - +libc_hidden_proto(fgetc) int fgetc(register FILE *stream) { if (stream->__user_locking != 0) { @@ -108,7 +108,6 @@ int fgetc(register FILE *stream) return retval; } } -libc_hidden_proto(fgetc) libc_hidden_def(fgetc) strong_alias(fgetc,getc) diff --git a/libc/stdio/fgets.c b/libc/stdio/fgets.c index 031eadaaf..ae2ecdc8d 100644 --- a/libc/stdio/fgets.c +++ b/libc/stdio/fgets.c @@ -71,6 +71,7 @@ libc_hidden_def(fgets) #elif defined __UCLIBC_HAS_THREADS__ +libc_hidden_proto(fgets) char *fgets(char *__restrict s, int n, register FILE * __restrict stream) { @@ -85,7 +86,6 @@ char *fgets(char *__restrict s, int n, return retval; } -libc_hidden_proto(fgets) libc_hidden_def(fgets) #endif diff --git a/libc/stdio/fgetwc.c b/libc/stdio/fgetwc.c index dbcf6bec6..716a8e9c0 100644 --- a/libc/stdio/fgetwc.c +++ b/libc/stdio/fgetwc.c @@ -121,6 +121,7 @@ strong_alias(fgetwc_unlocked,getwc) #elif defined __UCLIBC_HAS_THREADS__ +libc_hidden_proto(fgetwc) wint_t fgetwc(register FILE *stream) { wint_t retval; @@ -134,7 +135,6 @@ wint_t fgetwc(register FILE *stream) return retval; } -libc_hidden_proto(fgetwc) libc_hidden_def(fgetwc) strong_alias(fgetwc,getwc) diff --git a/libc/stdio/fileno.c b/libc/stdio/fileno.c index fb895b8a0..deeff71b1 100644 --- a/libc/stdio/fileno.c +++ b/libc/stdio/fileno.c @@ -32,6 +32,7 @@ libc_hidden_def(fileno) #elif defined __UCLIBC_HAS_THREADS__ +libc_hidden_proto(fileno) int fileno(register FILE *stream) { int retval; @@ -45,7 +46,6 @@ int fileno(register FILE *stream) return retval; } -libc_hidden_proto(fileno) libc_hidden_def(fileno) #endif diff --git a/libc/stdio/fopen.c b/libc/stdio/fopen.c index d73ce711a..ec14b5956 100644 --- a/libc/stdio/fopen.c +++ b/libc/stdio/fopen.c @@ -14,9 +14,9 @@ #undef fopen64 #endif +libc_hidden_proto(fopen) FILE *fopen(const char * __restrict filename, const char * __restrict mode) { return _stdio_fopen(((intptr_t) filename), mode, NULL, FILEDES_ARG); } -libc_hidden_proto(fopen) libc_hidden_def(fopen) diff --git a/libc/stdio/fopencookie.c b/libc/stdio/fopencookie.c index af51f44c9..d754deba5 100644 --- a/libc/stdio/fopencookie.c +++ b/libc/stdio/fopencookie.c @@ -28,6 +28,7 @@ /* Currently no real reentrancy issues other than a possible double close(). */ #ifndef __BCC__ +libc_hidden_proto(fopencookie) FILE *fopencookie(void * __restrict cookie, const char * __restrict mode, cookie_io_functions_t io_functions) #else @@ -58,6 +59,5 @@ FILE *_fopencookie(void * __restrict cookie, const char * __restrict mode, return stream; } #ifndef __BCC__ -libc_hidden_proto(fopencookie) libc_hidden_def(fopencookie) #endif diff --git a/libc/stdio/fprintf.c b/libc/stdio/fprintf.c index 092a64981..4f73441e1 100644 --- a/libc/stdio/fprintf.c +++ b/libc/stdio/fprintf.c @@ -10,6 +10,7 @@ libc_hidden_proto(vfprintf) +libc_hidden_proto(fprintf) int fprintf(FILE * __restrict stream, const char * __restrict format, ...) { va_list arg; @@ -21,5 +22,4 @@ int fprintf(FILE * __restrict stream, const char * __restrict format, ...) return rv; } -libc_hidden_proto(fprintf) libc_hidden_def(fprintf) diff --git a/libc/stdio/fputc.c b/libc/stdio/fputc.c index c30c0a12a..bbc72ab86 100644 --- a/libc/stdio/fputc.c +++ b/libc/stdio/fputc.c @@ -12,6 +12,8 @@ #undef putc #undef putc_unlocked +libc_hidden_proto(__fputc_unlocked) + #ifdef __DO_UNLOCKED int __fputc_unlocked(int c, register FILE *stream) @@ -68,7 +70,6 @@ int __fputc_unlocked(int c, register FILE *stream) BAD: return EOF; } -libc_hidden_proto(__fputc_unlocked) libc_hidden_def(__fputc_unlocked) strong_alias(__fputc_unlocked,fputc_unlocked) @@ -86,8 +87,7 @@ libc_hidden_def(putc) #elif defined __UCLIBC_HAS_THREADS__ -libc_hidden_proto(__fputc_unlocked) - +libc_hidden_proto(fputc) int fputc(int c, register FILE *stream) { if (stream->__user_locking != 0) { @@ -100,7 +100,6 @@ int fputc(int c, register FILE *stream) return retval; } } -libc_hidden_proto(fputc) libc_hidden_def(fputc) strong_alias(fputc,putc) diff --git a/libc/stdio/fputs.c b/libc/stdio/fputs.c index b9dabee30..a2d9c22c3 100644 --- a/libc/stdio/fputs.c +++ b/libc/stdio/fputs.c @@ -36,6 +36,7 @@ libc_hidden_def(fputs) #elif defined __UCLIBC_HAS_THREADS__ +libc_hidden_proto(fputs) int fputs(const char * __restrict s, register FILE * __restrict stream) { int retval; @@ -49,7 +50,6 @@ int fputs(const char * __restrict s, register FILE * __restrict stream) return retval; } -libc_hidden_proto(fputs) libc_hidden_def(fputs) #endif diff --git a/libc/stdio/fputws.c b/libc/stdio/fputws.c index d00c95797..2557155d6 100644 --- a/libc/stdio/fputws.c +++ b/libc/stdio/fputws.c @@ -30,6 +30,7 @@ libc_hidden_def(fputws) #elif defined __UCLIBC_HAS_THREADS__ +libc_hidden_proto(fputws) int fputws(const wchar_t *__restrict ws, register FILE *__restrict stream) { int retval; @@ -43,7 +44,6 @@ int fputws(const wchar_t *__restrict ws, register FILE *__restrict stream) return retval; } -libc_hidden_proto(fputws) libc_hidden_def(fputws) #endif diff --git a/libc/stdio/fread.c b/libc/stdio/fread.c index 417ab2c8d..3145553c2 100644 --- a/libc/stdio/fread.c +++ b/libc/stdio/fread.c @@ -97,6 +97,7 @@ libc_hidden_def(fread) #elif defined __UCLIBC_HAS_THREADS__ +libc_hidden_proto(fread) size_t fread(void * __restrict ptr, size_t size, size_t nmemb, register FILE * __restrict stream) { @@ -111,7 +112,6 @@ size_t fread(void * __restrict ptr, size_t size, size_t nmemb, return retval; } -libc_hidden_proto(fread) libc_hidden_def(fread) #endif diff --git a/libc/stdio/fseeko.c b/libc/stdio/fseeko.c index 0ce4acfb7..74a9e3c3a 100644 --- a/libc/stdio/fseeko.c +++ b/libc/stdio/fseeko.c @@ -16,9 +16,8 @@ # define OFFSET_TYPE long int #endif -#if defined(__UCLIBC_HAS_LFS__) && !defined(__DO_LARGEFILE) libc_hidden_proto(fseeko64) -#endif +libc_hidden_proto(fseek) int FSEEK(register FILE *stream, OFFSET_TYPE offset, int whence) { @@ -78,10 +77,8 @@ int FSEEK(register FILE *stream, OFFSET_TYPE offset, int whence) } #ifdef __DO_LARGEFILE -libc_hidden_proto(fseeko64) libc_hidden_def(fseeko64) #else -libc_hidden_proto(fseek) libc_hidden_def(fseek) strong_alias(fseek,fseeko) #endif diff --git a/libc/stdio/ftello.c b/libc/stdio/ftello.c index 0a3a53856..2b9da8a6b 100644 --- a/libc/stdio/ftello.c +++ b/libc/stdio/ftello.c @@ -7,9 +7,8 @@ #include "_stdio.h" -#if defined(__UCLIBC_HAS_LFS__) && !defined(__DO_LARGEFILE) libc_hidden_proto(ftello64) -#endif +libc_hidden_proto(ftell) #ifndef __DO_LARGEFILE # define FTELL ftell @@ -51,10 +50,8 @@ OFFSET_TYPE FTELL(register FILE *stream) } #ifdef __DO_LARGEFILE -libc_hidden_proto(ftello64) libc_hidden_def(ftello64) #else -libc_hidden_proto(ftell) libc_hidden_def(ftell) strong_alias(ftell,ftello) #endif diff --git a/libc/stdio/fwrite.c b/libc/stdio/fwrite.c index 106ee5db6..85ca6050e 100644 --- a/libc/stdio/fwrite.c +++ b/libc/stdio/fwrite.c @@ -45,6 +45,7 @@ libc_hidden_def(fwrite) #elif defined __UCLIBC_HAS_THREADS__ +libc_hidden_proto(fwrite) size_t fwrite(const void * __restrict ptr, size_t size, size_t nmemb, register FILE * __restrict stream) { @@ -59,7 +60,6 @@ size_t fwrite(const void * __restrict ptr, size_t size, return retval; } -libc_hidden_proto(fwrite) libc_hidden_def(fwrite) #endif diff --git a/libc/stdio/getdelim.c b/libc/stdio/getdelim.c index 7c769dd63..a00cc1e6f 100644 --- a/libc/stdio/getdelim.c +++ b/libc/stdio/getdelim.c @@ -7,6 +7,8 @@ #include "_stdio.h" +libc_hidden_proto(getdelim) + libc_hidden_proto(__fgetc_unlocked) /* Note: There is a defect in this function. (size_t vs ssize_t). */ @@ -75,5 +77,4 @@ ssize_t getdelim(char **__restrict lineptr, size_t *__restrict n, return pos; } -libc_hidden_proto(getdelim) libc_hidden_def(getdelim) diff --git a/libc/stdio/getline.c b/libc/stdio/getline.c index 0426d37f5..aef3de944 100644 --- a/libc/stdio/getline.c +++ b/libc/stdio/getline.c @@ -7,6 +7,8 @@ #include "_stdio.h" +libc_hidden_proto(getline) + libc_hidden_proto(getdelim) ssize_t getline(char **__restrict lineptr, size_t *__restrict n, @@ -14,5 +16,4 @@ ssize_t getline(char **__restrict lineptr, size_t *__restrict n, { return getdelim(lineptr, n, '\n', stream); } -libc_hidden_proto(getline) libc_hidden_def(getline) diff --git a/libc/stdio/open_memstream.c b/libc/stdio/open_memstream.c index fd0c74c48..5ba09ea7c 100644 --- a/libc/stdio/open_memstream.c +++ b/libc/stdio/open_memstream.c @@ -128,6 +128,7 @@ static const cookie_io_functions_t _oms_io_funcs = { * (ie replace the FILE buffer with the cookie buffer and update FILE bufstart, * etc. whenever we seek). */ +libc_hidden_proto(open_memstream) FILE *open_memstream(char **__restrict bufloc, size_t *__restrict sizeloc) { register __oms_cookie *cookie; @@ -164,5 +165,4 @@ FILE *open_memstream(char **__restrict bufloc, size_t *__restrict sizeloc) return NULL; } -libc_hidden_proto(open_memstream) libc_hidden_def(open_memstream) diff --git a/libc/stdio/perror.c b/libc/stdio/perror.c index f10667cbf..993fcf428 100644 --- a/libc/stdio/perror.c +++ b/libc/stdio/perror.c @@ -14,6 +14,7 @@ libc_hidden_proto(__glibc_strerror_r) #warning CONSIDER: Increase buffer size for error message (non-%m case)? #endif +libc_hidden_proto(perror) void perror(register const char *s) { /* If the program is calling perror, it's a safe bet that printf and @@ -37,5 +38,4 @@ void perror(register const char *s) } #endif } -libc_hidden_proto(perror) libc_hidden_def(perror) diff --git a/libc/stdio/printf.c b/libc/stdio/printf.c index 8c547878e..617561fec 100644 --- a/libc/stdio/printf.c +++ b/libc/stdio/printf.c @@ -10,6 +10,7 @@ libc_hidden_proto(vfprintf) +libc_hidden_proto(printf) int printf(const char * __restrict format, ...) { va_list arg; @@ -21,5 +22,4 @@ int printf(const char * __restrict format, ...) return rv; } -libc_hidden_proto(printf) libc_hidden_def(printf) diff --git a/libc/stdio/remove.c b/libc/stdio/remove.c index ad9974dff..04ab12edb 100644 --- a/libc/stdio/remove.c +++ b/libc/stdio/remove.c @@ -19,6 +19,7 @@ libc_hidden_proto(unlink) * equivalent to rmdir(path). */ +libc_hidden_proto(remove) int remove(register const char *filename) { int saved_errno = errno; @@ -30,5 +31,4 @@ int remove(register const char *filename) } return rv; } -libc_hidden_proto(remove) libc_hidden_def(remove) diff --git a/libc/stdio/rewind.c b/libc/stdio/rewind.c index 713b76ec8..e04d7a086 100644 --- a/libc/stdio/rewind.c +++ b/libc/stdio/rewind.c @@ -9,6 +9,7 @@ libc_hidden_proto(fseek) +libc_hidden_proto(rewind) void rewind(register FILE *stream) { __STDIO_AUTO_THREADLOCK_VAR; @@ -20,5 +21,4 @@ void rewind(register FILE *stream) __STDIO_AUTO_THREADUNLOCK(stream); } -libc_hidden_proto(rewind) libc_hidden_def(rewind) diff --git a/libc/stdio/scanf.c b/libc/stdio/scanf.c index 8def91c6b..0062d3c16 100644 --- a/libc/stdio/scanf.c +++ b/libc/stdio/scanf.c @@ -160,6 +160,7 @@ _stdlib_strto_l(register const char * __restrict str, /**********************************************************************/ #ifdef L_fscanf +libc_hidden_proto(fscanf) int fscanf(FILE * __restrict stream, const char * __restrict format, ...) { va_list arg; @@ -171,7 +172,6 @@ int fscanf(FILE * __restrict stream, const char * __restrict format, ...) return rv; } -libc_hidden_proto(fscanf) libc_hidden_def(fscanf) #endif @@ -196,6 +196,7 @@ int scanf(const char * __restrict format, ...) #ifdef __STDIO_HAS_VSSCANF +libc_hidden_proto(sscanf) int sscanf(const char * __restrict str, const char * __restrict format, ...) { va_list arg; @@ -207,7 +208,6 @@ int sscanf(const char * __restrict str, const char * __restrict format, ...) return rv; } -libc_hidden_proto(sscanf) libc_hidden_def(sscanf) #else /* __STDIO_HAS_VSSCANF */ @@ -218,11 +218,11 @@ libc_hidden_def(sscanf) /**********************************************************************/ #ifdef L_vscanf +libc_hidden_proto(vscanf) int vscanf(const char * __restrict format, va_list arg) { return vfscanf(stdin, format, arg); } -libc_hidden_proto(vscanf) libc_hidden_def(vscanf) #endif diff --git a/libc/stdio/setvbuf.c b/libc/stdio/setvbuf.c index 2ac258492..c1566504a 100644 --- a/libc/stdio/setvbuf.c +++ b/libc/stdio/setvbuf.c @@ -14,6 +14,7 @@ #error Assumption violated for buffering mode flags #endif +libc_hidden_proto(setvbuf) int setvbuf(register FILE * __restrict stream, register char * __restrict buf, int mode, size_t size) { @@ -104,5 +105,4 @@ int setvbuf(register FILE * __restrict stream, register char * __restrict buf, #endif } -libc_hidden_proto(setvbuf) libc_hidden_def(setvbuf) diff --git a/libc/stdio/snprintf.c b/libc/stdio/snprintf.c index 9cfe812ca..ef9c69215 100644 --- a/libc/stdio/snprintf.c +++ b/libc/stdio/snprintf.c @@ -14,6 +14,7 @@ libc_hidden_proto(vsnprintf) +libc_hidden_proto(snprintf) int snprintf(char *__restrict buf, size_t size, const char * __restrict format, ...) { @@ -25,7 +26,6 @@ int snprintf(char *__restrict buf, size_t size, va_end(arg); return rv; } -libc_hidden_proto(snprintf) libc_hidden_def(snprintf) #endif diff --git a/libc/stdio/sprintf.c b/libc/stdio/sprintf.c index bbda86bee..360245366 100644 --- a/libc/stdio/sprintf.c +++ b/libc/stdio/sprintf.c @@ -14,6 +14,7 @@ libc_hidden_proto(vsnprintf) +libc_hidden_proto(sprintf) int sprintf(char *__restrict buf, const char * __restrict format, ...) { va_list arg; @@ -25,7 +26,6 @@ int sprintf(char *__restrict buf, const char * __restrict format, ...) return rv; } -libc_hidden_proto(sprintf) libc_hidden_def(sprintf) #endif diff --git a/libc/stdio/ungetc.c b/libc/stdio/ungetc.c index 5e7db7daa..d900928b2 100644 --- a/libc/stdio/ungetc.c +++ b/libc/stdio/ungetc.c @@ -24,6 +24,7 @@ * (See section 7.19.6.2 of the C9X rationale -- WG14/N897.) */ +libc_hidden_proto(ungetc) int ungetc(int c, register FILE *stream) { __STDIO_AUTO_THREADLOCK_VAR; @@ -75,5 +76,4 @@ int ungetc(int c, register FILE *stream) return c; } -libc_hidden_proto(ungetc) libc_hidden_def(ungetc) diff --git a/libc/stdio/ungetwc.c b/libc/stdio/ungetwc.c index 082f81bd9..579022240 100644 --- a/libc/stdio/ungetwc.c +++ b/libc/stdio/ungetwc.c @@ -12,6 +12,7 @@ * as reset stream->__ungot_width[1] for use by _stdio_adjpos(). */ +libc_hidden_proto(ungetwc) wint_t ungetwc(wint_t c, register FILE *stream) { __STDIO_AUTO_THREADLOCK_VAR; @@ -46,5 +47,4 @@ wint_t ungetwc(wint_t c, register FILE *stream) return c; } -libc_hidden_proto(ungetwc) libc_hidden_def(ungetwc) diff --git a/libc/stdio/vasprintf.c b/libc/stdio/vasprintf.c index 1c184583b..f355b227f 100644 --- a/libc/stdio/vasprintf.c +++ b/libc/stdio/vasprintf.c @@ -27,6 +27,7 @@ libc_hidden_proto(vfprintf) libc_hidden_proto(vsnprintf) #endif +libc_hidden_proto(vasprintf) int vasprintf(char **__restrict buf, const char * __restrict format, va_list arg) { @@ -81,7 +82,6 @@ int vasprintf(char **__restrict buf, const char * __restrict format, #endif /* __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__ */ } -libc_hidden_proto(vasprintf) libc_hidden_def(vasprintf) #endif diff --git a/libc/stdio/vdprintf.c b/libc/stdio/vdprintf.c index f36987477..34aa47697 100644 --- a/libc/stdio/vdprintf.c +++ b/libc/stdio/vdprintf.c @@ -11,6 +11,7 @@ libc_hidden_proto(vfprintf) libc_hidden_proto(fflush_unlocked) +libc_hidden_proto(vdprintf) int vdprintf(int filedes, const char * __restrict format, va_list arg) { FILE f; @@ -63,5 +64,4 @@ int vdprintf(int filedes, const char * __restrict format, va_list arg) return rv; } -libc_hidden_proto(vdprintf) libc_hidden_def(vdprintf) diff --git a/libc/stdio/vfprintf.c b/libc/stdio/vfprintf.c index f0b402b85..f02eae02b 100644 --- a/libc/stdio/vfprintf.c +++ b/libc/stdio/vfprintf.c @@ -1855,6 +1855,7 @@ static int _do_one_spec(FILE * __restrict stream, libc_hidden_proto(fprintf) +libc_hidden_proto(VFPRINTF) int VFPRINTF (FILE * __restrict stream, register const FMT_TYPE * __restrict format, va_list arg) @@ -1932,7 +1933,6 @@ int VFPRINTF (FILE * __restrict stream, return count; } -libc_hidden_proto(VFPRINTF) libc_hidden_def(VFPRINTF) #endif /**********************************************************************/ diff --git a/libc/stdio/vsnprintf.c b/libc/stdio/vsnprintf.c index dc8cfe036..84215eb86 100644 --- a/libc/stdio/vsnprintf.c +++ b/libc/stdio/vsnprintf.c @@ -8,6 +8,8 @@ #include "_stdio.h" #include +libc_hidden_proto(vsnprintf) + libc_hidden_proto(vfprintf) #ifdef __UCLIBC_MJN3_ONLY__ @@ -68,7 +70,6 @@ int vsnprintf(char *__restrict buf, size_t size, } return rv; } -libc_hidden_proto(vsnprintf) libc_hidden_def(vsnprintf) #elif defined(__USE_OLD_VFPRINTF__) @@ -126,7 +127,6 @@ int vsnprintf(char *__restrict buf, size_t size, } return rv; } -libc_hidden_proto(vsnprintf) libc_hidden_def(vsnprintf) #elif defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__) @@ -207,7 +207,6 @@ int vsnprintf(char *__restrict buf, size_t size, return rv; } -libc_hidden_proto(vsnprintf) libc_hidden_def(vsnprintf) #else diff --git a/libc/stdio/vswprintf.c b/libc/stdio/vswprintf.c index d806c5432..d09e08ac9 100644 --- a/libc/stdio/vswprintf.c +++ b/libc/stdio/vswprintf.c @@ -9,6 +9,8 @@ #include #include +libc_hidden_proto(vswprintf) + libc_hidden_proto(vfwprintf) #ifndef __STDIO_BUFFERS @@ -68,7 +70,6 @@ int vswprintf(wchar_t *__restrict buf, size_t size, } return rv; } -libc_hidden_proto(vswprintf) libc_hidden_def(vswprintf) #endif /* __STDIO_BUFFERS */ diff --git a/libc/stdlib/erand48_r.c b/libc/stdlib/erand48_r.c index fec8b5026..3dd0dfdf0 100644 --- a/libc/stdlib/erand48_r.c +++ b/libc/stdlib/erand48_r.c @@ -24,6 +24,7 @@ extern int __drand48_iterate(unsigned short xsubi[3], struct drand48_data *buffer) attribute_hidden; +libc_hidden_proto(erand48_r) int erand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, double *result) { union ieee754_double temp; @@ -45,5 +46,4 @@ int erand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, double return 0; } -libc_hidden_proto(erand48_r) libc_hidden_def(erand48_r) diff --git a/libc/stdlib/jrand48_r.c b/libc/stdlib/jrand48_r.c index 02a082e68..912f70c4f 100644 --- a/libc/stdlib/jrand48_r.c +++ b/libc/stdlib/jrand48_r.c @@ -22,6 +22,7 @@ extern int __drand48_iterate(unsigned short xsubi[3], struct drand48_data *buffer) attribute_hidden; +libc_hidden_proto(jrand48_r) int jrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, long int *result) { /* Compute next state. */ @@ -33,5 +34,4 @@ int jrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, long in return 0; } -libc_hidden_proto(jrand48_r) libc_hidden_def(jrand48_r) diff --git a/libc/stdlib/lrand48_r.c b/libc/stdlib/lrand48_r.c index 46e99c1e6..277fb9ae3 100644 --- a/libc/stdlib/lrand48_r.c +++ b/libc/stdlib/lrand48_r.c @@ -21,6 +21,7 @@ libc_hidden_proto(nrand48_r) +libc_hidden_proto(lrand48_r) int lrand48_r (struct drand48_data *buffer, long int *result) { /* Be generous for the arguments, detect some errors. */ @@ -29,5 +30,4 @@ int lrand48_r (struct drand48_data *buffer, long int *result) return nrand48_r (buffer->__x, buffer, result); } -libc_hidden_proto(lrand48_r) libc_hidden_def(lrand48_r) diff --git a/libc/stdlib/malloc-standard/mallinfo.c b/libc/stdlib/malloc-standard/mallinfo.c index 8a09487c2..4f274ed32 100644 --- a/libc/stdlib/malloc-standard/mallinfo.c +++ b/libc/stdlib/malloc-standard/mallinfo.c @@ -19,6 +19,7 @@ libc_hidden_proto(fprintf) /* ------------------------------ mallinfo ------------------------------ */ +libc_hidden_proto(mallinfo) struct mallinfo mallinfo(void) { mstate av; @@ -79,7 +80,6 @@ struct mallinfo mallinfo(void) UNLOCK; return mi; } -libc_hidden_proto(mallinfo) libc_hidden_def(mallinfo) void malloc_stats(FILE *file) diff --git a/libc/stdlib/nrand48_r.c b/libc/stdlib/nrand48_r.c index 6f8afdb77..f45cb1132 100644 --- a/libc/stdlib/nrand48_r.c +++ b/libc/stdlib/nrand48_r.c @@ -22,6 +22,7 @@ extern int __drand48_iterate(unsigned short xsubi[3], struct drand48_data *buffer) attribute_hidden; +libc_hidden_proto(nrand48_r) int nrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, long int *result) { /* Compute next state. */ @@ -36,5 +37,4 @@ int nrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, long in return 0; } -libc_hidden_proto(nrand48_r) libc_hidden_def(nrand48_r) diff --git a/libc/stdlib/ptsname.c b/libc/stdlib/ptsname.c index 8580143b9..5184c8f82 100644 --- a/libc/stdlib/ptsname.c +++ b/libc/stdlib/ptsname.c @@ -18,6 +18,7 @@ 02111-1307 USA. */ #define _ISOC99_SOURCE +#define _GNU_SOURCE #include #include #include @@ -69,6 +70,7 @@ extern const char __libc_ptyname2[] attribute_hidden; /* Store at most BUFLEN characters of the pathname of the slave pseudo terminal associated with the master FD is open on in BUF. Return 0 on success, otherwise an error number. */ +libc_hidden_proto(ptsname_r) int ptsname_r (int fd, char *buf, size_t buflen) { int save_errno = errno; @@ -186,7 +188,6 @@ int ptsname_r (int fd, char *buf, size_t buflen) errno = save_errno; return 0; } -libc_hidden_proto(ptsname_r) libc_hidden_def(ptsname_r) /* Return the pathname of the pseudo terminal slave assoicated with diff --git a/libc/stdlib/random.c b/libc/stdlib/random.c index 115ff2162..38c3ea4d2 100644 --- a/libc/stdlib/random.c +++ b/libc/stdlib/random.c @@ -246,6 +246,7 @@ char * setstate (char *arg_state) rear pointers can't wrap on the same call by not testing the rear pointer if the front one has wrapped. Returns a 31-bit random number. */ +libc_hidden_proto(random) long int random (void) { int32_t retval; @@ -255,5 +256,4 @@ long int random (void) __pthread_mutex_unlock(&lock); return retval; } -libc_hidden_proto(random) libc_hidden_def(random) diff --git a/libc/stdlib/random_r.c b/libc/stdlib/random_r.c index 67234048b..faf5cf42e 100644 --- a/libc/stdlib/random_r.c +++ b/libc/stdlib/random_r.c @@ -134,6 +134,7 @@ static const struct random_poly_info random_poly_info = rear pointers can't wrap on the same call by not testing the rear pointer if the front one has wrapped. Returns a 31-bit random number. */ +libc_hidden_proto(random_r) int random_r(struct random_data *buf, int32_t *result) { int32_t *state; @@ -181,7 +182,6 @@ fail: __set_errno (EINVAL); return -1; } -libc_hidden_proto(random_r) libc_hidden_def(random_r) /* Initialize the random number generator based on the given seed. If the @@ -192,6 +192,7 @@ libc_hidden_def(random_r) information a given number of times to get rid of any initial dependencies introduced by the L.C.R.N.G. Note that the initialization of randtbl[] for default usage relies on values produced by this routine. */ +libc_hidden_proto(srandom_r) int srandom_r (unsigned int seed, struct random_data *buf) { int type; @@ -246,7 +247,6 @@ done: fail: return -1; } -libc_hidden_proto(srandom_r) libc_hidden_def(srandom_r) /* Initialize the state information in the given array of N bytes for @@ -260,6 +260,7 @@ libc_hidden_def(srandom_r) Note: The first thing we do is save the current state, if any, just like setstate so that it doesn't matter when initstate is called. Returns a pointer to the old state. */ +libc_hidden_proto(initstate_r) int initstate_r (unsigned int seed, char *arg_state, size_t n, struct random_data *buf) { int type; @@ -308,7 +309,6 @@ fail: __set_errno (EINVAL); return -1; } -libc_hidden_proto(initstate_r) libc_hidden_def(initstate_r) /* Restore the state from the given state array. @@ -319,6 +319,7 @@ libc_hidden_def(initstate_r) to the order in which things are done, it is OK to call setstate with the same state as the current state Returns a pointer to the old state information. */ +libc_hidden_proto(setstate_r) int setstate_r (char *arg_state, struct random_data *buf) { int32_t *new_state = 1 + (int32_t *) arg_state; @@ -362,5 +363,4 @@ fail: __set_errno (EINVAL); return -1; } -libc_hidden_proto(setstate_r) libc_hidden_def(setstate_r) diff --git a/libc/stdlib/seed48_r.c b/libc/stdlib/seed48_r.c index a6da03015..c88d0f23e 100644 --- a/libc/stdlib/seed48_r.c +++ b/libc/stdlib/seed48_r.c @@ -23,6 +23,7 @@ libc_hidden_proto(memcpy) +libc_hidden_proto(seed48_r) int seed48_r (unsigned short int seed16v[3], struct drand48_data *buffer) { /* Save old value at a private place to be used as return value. */ @@ -38,5 +39,4 @@ int seed48_r (unsigned short int seed16v[3], struct drand48_data *buffer) return 0; } -libc_hidden_proto(seed48_r) libc_hidden_def(seed48_r) diff --git a/libc/stdlib/setenv.c b/libc/stdlib/setenv.c index 5c19143d1..347718237 100644 --- a/libc/stdlib/setenv.c +++ b/libc/stdlib/setenv.c @@ -136,13 +136,14 @@ int attribute_hidden __add_to_environ (const char *name, const char *value, return 0; } +libc_hidden_proto(setenv) int setenv (const char *name, const char *value, int replace) { return __add_to_environ (name, value, NULL, replace); } -libc_hidden_proto(setenv) libc_hidden_def(setenv) +libc_hidden_proto(unsetenv) int unsetenv (const char *name) { size_t len; @@ -171,7 +172,6 @@ int unsetenv (const char *name) UNLOCK; return 0; } -libc_hidden_proto(unsetenv) libc_hidden_def(unsetenv) /* The `clearenv' was planned to be added to POSIX.1 but probably diff --git a/libc/stdlib/srand48_r.c b/libc/stdlib/srand48_r.c index 5f9cf1da3..45bb75f11 100644 --- a/libc/stdlib/srand48_r.c +++ b/libc/stdlib/srand48_r.c @@ -20,6 +20,7 @@ #include #include +libc_hidden_proto(srand48_r) int srand48_r (long int seedval, struct drand48_data *buffer) { /* The standards say we only have 32 bits. */ @@ -36,5 +37,4 @@ int srand48_r (long int seedval, struct drand48_data *buffer) return 0; } -libc_hidden_proto(srand48_r) libc_hidden_def(srand48_r) diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c index a200d8b4b..5d92d572d 100644 --- a/libc/stdlib/stdlib.c +++ b/libc/stdlib/stdlib.c @@ -263,11 +263,11 @@ strong_alias(llabs,imaxabs) libc_hidden_proto(strtol) +libc_hidden_proto(atoi) int atoi(const char *nptr) { return (int) strtol(nptr, (char **) NULL, 10); } -libc_hidden_proto(atoi) libc_hidden_def(atoi) #endif /* INT_MAX < LONG_MAX */ @@ -278,11 +278,11 @@ libc_hidden_def(atoi) libc_hidden_proto(strtol) +libc_hidden_proto(atol) long atol(const char *nptr) { return strtol(nptr, (char **) NULL, 10); } -libc_hidden_proto(atol) libc_hidden_def(atol) #if UINT_MAX == ULONG_MAX @@ -314,12 +314,12 @@ long long atoll(const char *nptr) /**********************************************************************/ #if defined(L_strtol) || defined(L_strtol_l) +libc_hidden_proto(__XL_NPP(strtol)) long __XL_NPP(strtol)(const char * __restrict str, char ** __restrict endptr, int base __LOCALE_PARAM ) { return __XL_NPP(_stdlib_strto_l)(str, endptr, base, 1 __LOCALE_ARG ); } -libc_hidden_proto(__XL_NPP(strtol)) libc_hidden_def(__XL_NPP(strtol)) #if (ULONG_MAX == UINTMAX_MAX) && !defined(L_strtol_l) @@ -338,6 +338,7 @@ libc_hidden_def(__XL_NPP(strtoll)) #if defined(ULLONG_MAX) && (LLONG_MAX > LONG_MAX) +libc_hidden_proto(__XL_NPP(strtoll)) long long __XL_NPP(strtoll)(const char * __restrict str, char ** __restrict endptr, int base __LOCALE_PARAM ) @@ -345,7 +346,6 @@ long long __XL_NPP(strtoll)(const char * __restrict str, return (long long) __XL_NPP(_stdlib_strto_ll)(str, endptr, base, 1 __LOCALE_ARG ); } -libc_hidden_proto(__XL_NPP(strtoll)) libc_hidden_def(__XL_NPP(strtoll)) #if !defined(L_strtoll_l) @@ -361,13 +361,13 @@ strong_alias(strtoll,strtoq) /**********************************************************************/ #if defined(L_strtoul) || defined(L_strtoul_l) +libc_hidden_proto(__XL_NPP(strtoul)) unsigned long __XL_NPP(strtoul)(const char * __restrict str, char ** __restrict endptr, int base __LOCALE_PARAM ) { return __XL_NPP(_stdlib_strto_l)(str, endptr, base, 0 __LOCALE_ARG ); } -libc_hidden_proto(__XL_NPP(strtoul)) libc_hidden_def(__XL_NPP(strtoul)) #if (ULONG_MAX == UINTMAX_MAX) && !defined(L_strtoul_l) @@ -387,13 +387,13 @@ libc_hidden_def(__XL_NPP(strtoull)) #if defined(ULLONG_MAX) && (LLONG_MAX > LONG_MAX) +libc_hidden_proto(__XL_NPP(strtoull)) unsigned long long __XL_NPP(strtoull)(const char * __restrict str, char ** __restrict endptr, int base __LOCALE_PARAM ) { return __XL_NPP(_stdlib_strto_ll)(str, endptr, base, 0 __LOCALE_ARG ); } -libc_hidden_proto(__XL_NPP(strtoull)) libc_hidden_def(__XL_NPP(strtoull)) #if !defined(L_strtoull_l) @@ -776,6 +776,7 @@ void *bsearch(const void *key, const void *base, size_t /* nmemb */ high, * calculation, as well as to reduce the generated code size with * bcc and gcc. */ +libc_hidden_proto(qsort) void qsort (void *base, size_t nel, size_t width, @@ -821,7 +822,6 @@ void qsort (void *base, } while (wgap); } } -libc_hidden_proto(qsort) libc_hidden_def(qsort) /* ---------- original snippets version below ---------- */ @@ -876,6 +876,7 @@ void ssort (void *base, /**********************************************************************/ #ifdef L__stdlib_mb_cur_max +libc_hidden_proto(_stdlib_mb_cur_max) size_t _stdlib_mb_cur_max(void) { #ifdef __CTYPE_HAS_UTF_8_LOCALES @@ -889,7 +890,6 @@ size_t _stdlib_mb_cur_max(void) return 1; #endif } -libc_hidden_proto(_stdlib_mb_cur_max) libc_hidden_def(_stdlib_mb_cur_max) #endif @@ -1002,12 +1002,12 @@ size_t wcstombs(char * __restrict s, const wchar_t * __restrict pwcs, size_t n) /**********************************************************************/ #if defined(L_wcstol) || defined(L_wcstol_l) +libc_hidden_proto(__XL_NPP(wcstol)) long __XL_NPP(wcstol)(const wchar_t * __restrict str, wchar_t ** __restrict endptr, int base __LOCALE_PARAM ) { return __XL_NPP(_stdlib_wcsto_l)(str, endptr, base, 1 __LOCALE_ARG ); } -libc_hidden_proto(__XL_NPP(wcstol)) libc_hidden_def(__XL_NPP(wcstol)) #if (ULONG_MAX == UINTMAX_MAX) && !defined(L_wcstol_l) @@ -1026,6 +1026,7 @@ libc_hidden_def(__XL_NPP(wcstoll)) #if defined(ULLONG_MAX) && (LLONG_MAX > LONG_MAX) +libc_hidden_proto(__XL_NPP(wcstoll)) long long __XL_NPP(wcstoll)(const wchar_t * __restrict str, wchar_t ** __restrict endptr, int base __LOCALE_PARAM ) @@ -1033,7 +1034,6 @@ long long __XL_NPP(wcstoll)(const wchar_t * __restrict str, return (long long) __XL_NPP(_stdlib_wcsto_ll)(str, endptr, base, 1 __LOCALE_ARG ); } -libc_hidden_proto(__XL_NPP(wcstoll)) libc_hidden_def(__XL_NPP(wcstoll)) #if !defined(L_wcstoll_l) @@ -1049,13 +1049,13 @@ strong_alias(wcstoll,wcstoq) /**********************************************************************/ #if defined(L_wcstoul) || defined(L_wcstoul_l) +libc_hidden_proto(__XL_NPP(wcstoul)) unsigned long __XL_NPP(wcstoul)(const wchar_t * __restrict str, wchar_t ** __restrict endptr, int base __LOCALE_PARAM ) { return __XL_NPP(_stdlib_wcsto_l)(str, endptr, base, 0 __LOCALE_ARG ); } -libc_hidden_proto(__XL_NPP(wcstoul)) libc_hidden_def(__XL_NPP(wcstoul)) #if (ULONG_MAX == UINTMAX_MAX) && !defined(L_wcstoul_l) @@ -1074,13 +1074,13 @@ libc_hidden_def(__XL_NPP(wcstoull)) #if defined(ULLONG_MAX) && (LLONG_MAX > LONG_MAX) +libc_hidden_proto(__XL_NPP(wcstoull)) unsigned long long __XL_NPP(wcstoull)(const wchar_t * __restrict str, wchar_t ** __restrict endptr, int base __LOCALE_PARAM ) { return __XL_NPP(_stdlib_wcsto_ll)(str, endptr, base, 0 __LOCALE_ARG ); } -libc_hidden_proto(__XL_NPP(wcstoull)) libc_hidden_def(__XL_NPP(wcstoull)) #if !defined(L_wcstoull_l) diff --git a/libc/stdlib/strtod.c b/libc/stdlib/strtod.c index cdb50fb75..2ea56ca04 100644 --- a/libc/stdlib/strtod.c +++ b/libc/stdlib/strtod.c @@ -518,6 +518,7 @@ void attribute_hidden __fp_range_check(__fpmax_t y, __fpmax_t x) #endif +libc_hidden_proto(__XL_NPP(strtof)) float __XL_NPP(strtof)(const Wchar *str, Wchar **endptr __LOCALE_PARAM ) { #if FPMAX_TYPE == 1 @@ -534,7 +535,6 @@ float __XL_NPP(strtof)(const Wchar *str, Wchar **endptr __LOCALE_PARAM ) return y; #endif } -libc_hidden_proto(__XL_NPP(strtof)) libc_hidden_def(__XL_NPP(strtof)) #endif @@ -553,6 +553,7 @@ libc_hidden_def(__XL_NPP(strtof)) #define Wchar char #endif +libc_hidden_proto(__XL_NPP(strtod)) double __XL_NPP(strtod)(const Wchar *__restrict str, Wchar **__restrict endptr __LOCALE_PARAM ) { @@ -570,7 +571,6 @@ double __XL_NPP(strtod)(const Wchar *__restrict str, return y; #endif } -libc_hidden_proto(__XL_NPP(strtod)) libc_hidden_def(__XL_NPP(strtod)) #endif @@ -589,6 +589,7 @@ libc_hidden_def(__XL_NPP(strtod)) #define Wchar char #endif +libc_hidden_proto(__XL_NPP(strtold)) long double __XL_NPP(strtold) (const Wchar *str, Wchar **endptr __LOCALE_PARAM ) { #if FPMAX_TYPE == 3 @@ -605,7 +606,6 @@ long double __XL_NPP(strtold) (const Wchar *str, Wchar **endptr __LOCALE_PARAM return y; #endif } -libc_hidden_proto(__XL_NPP(strtold)) libc_hidden_def(__XL_NPP(strtold)) #endif diff --git a/libc/string/_collate.c b/libc/string/_collate.c index 5a1f33b82..755a6df21 100644 --- a/libc/string/_collate.c +++ b/libc/string/_collate.c @@ -514,6 +514,7 @@ static void next_weight(col_state_t *cs, int pass __LOCALE_PARAM ) } while (1); } +libc_hidden_proto(__XL_NPP(wcscoll)) int __XL_NPP(wcscoll) (const Wchar *s0, const Wchar *s1 __LOCALE_PARAM ) { col_state_t ws[2]; @@ -547,7 +548,6 @@ int __XL_NPP(wcscoll) (const Wchar *s0, const Wchar *s1 __LOCALE_PARAM ) return 0; } -libc_hidden_proto(__XL_NPP(wcscoll)) libc_hidden_def(__XL_NPP(wcscoll)) #ifdef WANT_WIDE @@ -555,6 +555,7 @@ libc_hidden_def(__XL_NPP(wcscoll)) extern size_t __wcslcpy(wchar_t *__restrict dst, const wchar_t *__restrict src, size_t n); +libc_hidden_proto(__XL_NPP(wcsxfrm)) size_t __XL_NPP(wcsxfrm)(wchar_t *__restrict ws1, const wchar_t *__restrict ws2, size_t n __LOCALE_PARAM ) { @@ -592,7 +593,6 @@ size_t __XL_NPP(wcsxfrm)(wchar_t *__restrict ws1, const wchar_t *__restrict ws2, } return count-1; } -libc_hidden_proto(__XL_NPP(wcsxfrm)) libc_hidden_def(__XL_NPP(wcsxfrm)) #else /* WANT_WIDE */ @@ -637,6 +637,7 @@ static size_t store(unsigned char *s, size_t count, size_t n, __uwchar_t weight) return r; } +libc_hidden_proto(__XL_NPP(strxfrm)) size_t __XL_NPP(strxfrm)(char *__restrict ws1, const char *__restrict ws2, size_t n __LOCALE_PARAM ) { @@ -674,7 +675,6 @@ size_t __XL_NPP(strxfrm)(char *__restrict ws1, const char *__restrict ws2, size_ } return count-1; } -libc_hidden_proto(__XL_NPP(strxfrm)) libc_hidden_def(__XL_NPP(strxfrm)) #endif /* WANT_WIDE */ diff --git a/libc/string/generic/memchr.c b/libc/string/generic/memchr.c index 9942b609b..4bda5d758 100644 --- a/libc/string/generic/memchr.c +++ b/libc/string/generic/memchr.c @@ -25,6 +25,7 @@ #include #include +libc_hidden_proto(memchr) libc_hidden_proto(abort) #include "memcopy.h" @@ -173,5 +174,4 @@ void *memchr (const void * s, int c_in, size_t n) return 0; } -libc_hidden_proto(memchr) libc_hidden_def(memchr) diff --git a/libc/string/generic/memcmp.c b/libc/string/generic/memcmp.c index 13de370bb..41f15369d 100644 --- a/libc/string/generic/memcmp.c +++ b/libc/string/generic/memcmp.c @@ -19,9 +19,10 @@ 02111-1307 USA. */ #include - #include "memcopy.h" +libc_hidden_proto(memcmp) + #include #if __BYTE_ORDER == __BIG_ENDIAN @@ -329,6 +330,5 @@ memcmp (const __ptr_t s1, const __ptr_t s2, size_t len) return 0; } -libc_hidden_proto(memcmp) libc_hidden_def(memcmp) strong_alias(memcmp,bcmp) diff --git a/libc/string/generic/memcpy.c b/libc/string/generic/memcpy.c index 692a254f7..42e97a063 100644 --- a/libc/string/generic/memcpy.c +++ b/libc/string/generic/memcpy.c @@ -23,6 +23,8 @@ #include "memcopy.h" #include "pagecopy.h" +libc_hidden_proto(memcpy) + /* _wordcopy_fwd_aligned -- Copy block beginning at SRCP to block beginning at DSTP with LEN `op_t' words (not LEN bytes!). Both SRCP and DSTP should be aligned for memory operations on `op_t's. */ @@ -242,5 +244,4 @@ void *memcpy (void *dstpp, const void *srcpp, size_t len) return dstpp; } -libc_hidden_proto(memcpy) libc_hidden_def(memcpy) diff --git a/libc/string/generic/memmem.c b/libc/string/generic/memmem.c index e8982c078..386cb5e02 100644 --- a/libc/string/generic/memmem.c +++ b/libc/string/generic/memmem.c @@ -16,9 +16,11 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#define _GNU_SOURCE #include #include +libc_hidden_proto(memmem) libc_hidden_proto(memcmp) /* Return the first occurrence of NEEDLE in HAYSTACK. */ @@ -48,5 +50,4 @@ void *memmem (const void *haystack, size_t haystack_len, return NULL; } -libc_hidden_proto(memmem) libc_hidden_def(memmem) diff --git a/libc/string/generic/memmove.c b/libc/string/generic/memmove.c index 0157b148c..68caacd78 100644 --- a/libc/string/generic/memmove.c +++ b/libc/string/generic/memmove.c @@ -24,6 +24,7 @@ #include "memcopy.h" #include "pagecopy.h" +libc_hidden_proto(memmove) libc_hidden_proto(memcpy) static void _wordcopy_bwd_aligned (long int dstp, long int srcp, size_t len) @@ -278,5 +279,4 @@ void *memmove (void *dest, const void *src, size_t len) return (dest); } -libc_hidden_proto(memmove) libc_hidden_def(memmove) diff --git a/libc/string/generic/mempcpy.c b/libc/string/generic/mempcpy.c index ea4dec2b1..ac91541a5 100644 --- a/libc/string/generic/mempcpy.c +++ b/libc/string/generic/mempcpy.c @@ -5,8 +5,10 @@ /* Ditch the glibc version and just wrap memcpy. */ +#define _GNU_SOURCE #include +libc_hidden_proto(mempcpy) libc_hidden_proto(memcpy) void *mempcpy (void *dstpp, const void *srcpp, size_t len) @@ -14,5 +16,4 @@ void *mempcpy (void *dstpp, const void *srcpp, size_t len) memcpy(dstpp, srcpp, len); return (void *)(((char *)dstpp) + len); } -libc_hidden_proto(mempcpy) libc_hidden_def(mempcpy) diff --git a/libc/string/generic/memrchr.c b/libc/string/generic/memrchr.c index ab61eac72..7cb5b2246 100644 --- a/libc/string/generic/memrchr.c +++ b/libc/string/generic/memrchr.c @@ -22,10 +22,12 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#define _GNU_SOURCE #include #include #include +libc_hidden_proto(memrchr) libc_hidden_proto(abort) #include "memcopy.h" @@ -172,5 +174,4 @@ void *memrchr (const void * s, int c_in, size_t n) return 0; } -libc_hidden_proto(memrchr) libc_hidden_def(memrchr) diff --git a/libc/string/generic/memset.c b/libc/string/generic/memset.c index 18c065cac..1df1a450f 100644 --- a/libc/string/generic/memset.c +++ b/libc/string/generic/memset.c @@ -19,6 +19,7 @@ #include #include "memcopy.h" +libc_hidden_proto(memset) void *memset (void *dstpp, int c, size_t len) { long int dstp = (long int) dstpp; @@ -82,5 +83,4 @@ void *memset (void *dstpp, int c, size_t len) return dstpp; } -libc_hidden_proto(memset) libc_hidden_def(memset) diff --git a/libc/string/generic/rawmemchr.c b/libc/string/generic/rawmemchr.c index 3fc0e52f3..3c1cc01de 100644 --- a/libc/string/generic/rawmemchr.c +++ b/libc/string/generic/rawmemchr.c @@ -21,10 +21,12 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#define _GNU_SOURCE #include #include #include +libc_hidden_proto(rawmemchr) libc_hidden_proto(abort) #include "memcopy.h" @@ -158,5 +160,4 @@ void *rawmemchr (const void * s, int c_in) } } } -libc_hidden_proto(rawmemchr) libc_hidden_def(rawmemchr) diff --git a/libc/string/generic/strcat.c b/libc/string/generic/strcat.c index 5111a9a0f..53c4d0d9e 100644 --- a/libc/string/generic/strcat.c +++ b/libc/string/generic/strcat.c @@ -19,6 +19,7 @@ #include #include "memcopy.h" +libc_hidden_proto(strcat) /* Append SRC on the end of DEST. */ char *strcat (char *dest, const char *src) { @@ -44,5 +45,4 @@ char *strcat (char *dest, const char *src) return dest; } -libc_hidden_proto(strcat) libc_hidden_def(strcat) diff --git a/libc/string/generic/strchr.c b/libc/string/generic/strchr.c index 5675ce4ba..b1ffc7538 100644 --- a/libc/string/generic/strchr.c +++ b/libc/string/generic/strchr.c @@ -24,6 +24,7 @@ #include #include +libc_hidden_proto(strchr) libc_hidden_proto(abort) #include "memcopy.h" @@ -180,6 +181,5 @@ char *strchr (const char *s, int c_in) return NULL; } -libc_hidden_proto(strchr) libc_hidden_def(strchr) strong_alias(strchr,index) diff --git a/libc/string/generic/strchrnul.c b/libc/string/generic/strchrnul.c index eccdba247..3616341a7 100644 --- a/libc/string/generic/strchrnul.c +++ b/libc/string/generic/strchrnul.c @@ -21,9 +21,11 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#define _GNU_SOURCE #include #include +libc_hidden_proto(strchrnul) libc_hidden_proto(abort) #include "memcopy.h" @@ -163,5 +165,4 @@ char *strchrnul (const char *s, int c_in) /* This should never happen. */ return NULL; } -libc_hidden_proto(strchrnul) libc_hidden_def(strchrnul) diff --git a/libc/string/generic/strcmp.c b/libc/string/generic/strcmp.c index 1049934a8..6edb503e1 100644 --- a/libc/string/generic/strcmp.c +++ b/libc/string/generic/strcmp.c @@ -20,6 +20,7 @@ #include "memcopy.h" +libc_hidden_proto(strcmp) /* Compare S1 and S2, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or greater than S2. */ @@ -40,7 +41,6 @@ int strcmp (const char *p1, const char *p2) return c1 - c2; } -libc_hidden_proto(strcmp) libc_hidden_def(strcmp) #ifndef __UCLIBC_HAS_LOCALE__ diff --git a/libc/string/generic/strcpy.c b/libc/string/generic/strcpy.c index ab2928e55..7e558ead1 100644 --- a/libc/string/generic/strcpy.c +++ b/libc/string/generic/strcpy.c @@ -22,6 +22,7 @@ #include "memcopy.h" #include "bp-checks.h" +libc_hidden_proto(strcpy) /* Copy SRC to DEST. */ char *strcpy (char *dest, const char *src) { @@ -43,5 +44,4 @@ char *strcpy (char *dest, const char *src) return dest; } -libc_hidden_proto(strcpy) libc_hidden_def(strcpy) diff --git a/libc/string/generic/strcspn.c b/libc/string/generic/strcspn.c index 7fa49a0dc..1b5e465ea 100644 --- a/libc/string/generic/strcspn.c +++ b/libc/string/generic/strcspn.c @@ -18,6 +18,7 @@ #include +libc_hidden_proto(strcspn) libc_hidden_proto(strchr) /* Return the length of the maximum initial segment of S @@ -34,5 +35,4 @@ size_t strcspn (const char *s, const char *reject) return count; } -libc_hidden_proto(strcspn) libc_hidden_def(strcspn) diff --git a/libc/string/generic/strlen.c b/libc/string/generic/strlen.c index 08b5fa830..3528829af 100644 --- a/libc/string/generic/strlen.c +++ b/libc/string/generic/strlen.c @@ -22,6 +22,7 @@ #include #include +libc_hidden_proto(strlen) libc_hidden_proto(abort) /* Return the length of the null-terminated string STR. Scan for @@ -148,5 +149,4 @@ size_t strlen (const char *str) } } } -libc_hidden_proto(strlen) libc_hidden_def(strlen) diff --git a/libc/string/generic/strncat.c b/libc/string/generic/strncat.c index 0cdb21a7a..9e0dfcd78 100644 --- a/libc/string/generic/strncat.c +++ b/libc/string/generic/strncat.c @@ -20,6 +20,7 @@ #include "memcopy.h" +libc_hidden_proto(strncat) char *strncat (char *s1, const char *s2, size_t n) { reg_char c; @@ -73,5 +74,4 @@ char *strncat (char *s1, const char *s2, size_t n) return s; } -libc_hidden_proto(strncat) libc_hidden_def(strncat) diff --git a/libc/string/generic/strncmp.c b/libc/string/generic/strncmp.c index a6285e3a4..4c1978439 100644 --- a/libc/string/generic/strncmp.c +++ b/libc/string/generic/strncmp.c @@ -19,6 +19,7 @@ #include #include "memcopy.h" +libc_hidden_proto(strncmp) /* Compare no more than N characters of S1 and S2, returning less than, equal to or greater than zero if S1 is lexicographically less than, equal to or @@ -64,5 +65,4 @@ int strncmp (const char *s1, const char *s2, size_t n) return c1 - c2; } -libc_hidden_proto(strncmp) libc_hidden_def(strncmp) diff --git a/libc/string/generic/strncpy.c b/libc/string/generic/strncpy.c index 3c9ccb9ce..4b0b0894e 100644 --- a/libc/string/generic/strncpy.c +++ b/libc/string/generic/strncpy.c @@ -19,6 +19,7 @@ #include #include "memcopy.h" +libc_hidden_proto(strncpy) char *strncpy (char *s1, const char *s2, size_t n) { reg_char c; @@ -78,5 +79,4 @@ char *strncpy (char *s1, const char *s2, size_t n) return s; } -libc_hidden_proto(strncpy) libc_hidden_def(strncpy) diff --git a/libc/string/generic/strnlen.c b/libc/string/generic/strnlen.c index 95e8a77be..c5da906ef 100644 --- a/libc/string/generic/strnlen.c +++ b/libc/string/generic/strnlen.c @@ -21,9 +21,11 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#define _GNU_SOURCE #include #include +libc_hidden_proto(strnlen) libc_hidden_proto(abort) /* Find the length of S, but scan at most MAXLEN characters. If no @@ -158,5 +160,4 @@ size_t strnlen (const char *str, size_t maxlen) char_ptr = end_ptr; return char_ptr - str; } -libc_hidden_proto(strnlen) libc_hidden_def(strnlen) diff --git a/libc/string/generic/strrchr.c b/libc/string/generic/strrchr.c index cf4c6dd3b..b67e369fd 100644 --- a/libc/string/generic/strrchr.c +++ b/libc/string/generic/strrchr.c @@ -18,6 +18,7 @@ #include +libc_hidden_proto(strrchr) libc_hidden_proto(strchr) /* Find the last occurrence of C in S. */ @@ -41,6 +42,5 @@ char *strrchr (const char *s, int c) return (char *) found; } -libc_hidden_proto(strrchr) libc_hidden_def(strrchr) strong_alias(strrchr,rindex) diff --git a/libc/string/generic/strsep.c b/libc/string/generic/strsep.c index 5d9c8c307..7b34e2c16 100644 --- a/libc/string/generic/strsep.c +++ b/libc/string/generic/strsep.c @@ -18,6 +18,7 @@ #include +libc_hidden_proto(strsep) libc_hidden_proto(strchr) libc_hidden_proto(strpbrk) @@ -64,5 +65,4 @@ char *strsep (char **stringp, const char *delim) return begin; } -libc_hidden_proto(strsep) libc_hidden_def(strsep) diff --git a/libc/string/generic/strspn.c b/libc/string/generic/strspn.c index cd2882456..a194fdc7d 100644 --- a/libc/string/generic/strspn.c +++ b/libc/string/generic/strspn.c @@ -18,6 +18,7 @@ #include +libc_hidden_proto(strspn) /* Return the length of the maximum initial segment of S which contains only characters in ACCEPT. */ size_t strspn (const char *s, const char *accept) @@ -39,5 +40,4 @@ size_t strspn (const char *s, const char *accept) return count; } -libc_hidden_proto(strspn) libc_hidden_def(strspn) diff --git a/libc/string/generic/strstr.c b/libc/string/generic/strstr.c index a7442d614..f151a820a 100644 --- a/libc/string/generic/strstr.c +++ b/libc/string/generic/strstr.c @@ -28,6 +28,8 @@ #include +libc_hidden_proto(strstr) + typedef unsigned chartype; char *strstr (const char *phaystack, const char *pneedle) @@ -109,5 +111,4 @@ foundneedle: ret0: return 0; } -libc_hidden_proto(strstr) libc_hidden_def(strstr) diff --git a/libc/string/generic/strtok_r.c b/libc/string/generic/strtok_r.c index 3f7ed2c9f..566538fd5 100644 --- a/libc/string/generic/strtok_r.c +++ b/libc/string/generic/strtok_r.c @@ -20,6 +20,7 @@ #define _GNU_SOURCE #include +libc_hidden_proto(strtok_r) libc_hidden_proto(strspn) libc_hidden_proto(strpbrk) libc_hidden_proto(rawmemchr) @@ -63,5 +64,4 @@ char *strtok_r (char *s, const char *delim, char **save_ptr) } return token; } -libc_hidden_proto(strtok_r) libc_hidden_def(strtok_r) diff --git a/libc/string/i386/memchr.c b/libc/string/i386/memchr.c index b2fde07ad..229d42919 100644 --- a/libc/string/i386/memchr.c +++ b/libc/string/i386/memchr.c @@ -32,6 +32,7 @@ #include +libc_hidden_proto(memchr) void *memchr(const void *cs, int c, size_t count) { int d0; @@ -47,5 +48,4 @@ void *memchr(const void *cs, int c, size_t count) :"=D" (__res), "=&c" (d0) : "a" (c),"0" (cs),"1" (count)); return __res; } -libc_hidden_proto(memchr) libc_hidden_def(memchr) diff --git a/libc/string/i386/memcpy.c b/libc/string/i386/memcpy.c index 837d7d65b..a2b8d3d8c 100644 --- a/libc/string/i386/memcpy.c +++ b/libc/string/i386/memcpy.c @@ -32,6 +32,7 @@ #include +libc_hidden_proto(memcpy) void *memcpy(void * to, const void * from, size_t n) { int d0, d1, d2; @@ -49,5 +50,4 @@ void *memcpy(void * to, const void * from, size_t n) : "memory"); return (to); } -libc_hidden_proto(memcpy) libc_hidden_def(memcpy) diff --git a/libc/string/i386/memmove.c b/libc/string/i386/memmove.c index 8122803ef..a26fe2be1 100644 --- a/libc/string/i386/memmove.c +++ b/libc/string/i386/memmove.c @@ -32,6 +32,7 @@ #include +libc_hidden_proto(memmove) void *memmove(void *dest, const void *src, size_t n) { int d0, d1, d2; @@ -55,5 +56,4 @@ void *memmove(void *dest, const void *src, size_t n) :"memory"); return dest; } -libc_hidden_proto(memmove) libc_hidden_def(memmove) diff --git a/libc/string/i386/memset.c b/libc/string/i386/memset.c index bf527619a..eea48040a 100644 --- a/libc/string/i386/memset.c +++ b/libc/string/i386/memset.c @@ -32,6 +32,7 @@ #include +libc_hidden_proto(memset) void *memset(void *s, int c, size_t count) { int d0, d1; @@ -43,5 +44,4 @@ void *memset(void *s, int c, size_t count) :"memory"); return s; } -libc_hidden_proto(memset) libc_hidden_def(memset) diff --git a/libc/string/i386/strcat.c b/libc/string/i386/strcat.c index 5364c9029..e0b1f3b51 100644 --- a/libc/string/i386/strcat.c +++ b/libc/string/i386/strcat.c @@ -32,6 +32,7 @@ #include +libc_hidden_proto(strcat) char *strcat(char * dest, const char * src) { int d0, d1, d2, d3; @@ -47,5 +48,4 @@ char *strcat(char * dest, const char * src) : "0" (src), "1" (dest), "2" (0), "3" (0xffffffff):"memory"); return dest; } -libc_hidden_proto(strcat) libc_hidden_def(strcat) diff --git a/libc/string/i386/strchr.c b/libc/string/i386/strchr.c index 3f1aa7635..5ed87e816 100644 --- a/libc/string/i386/strchr.c +++ b/libc/string/i386/strchr.c @@ -32,6 +32,7 @@ #include +libc_hidden_proto(strchr) char *strchr(const char *s, int c) { int d0; @@ -49,6 +50,5 @@ char *strchr(const char *s, int c) :"=a" (__res), "=&S" (d0) : "1" (s),"0" (c)); return __res; } -libc_hidden_proto(strchr) libc_hidden_def(strchr) strong_alias(strchr,index) diff --git a/libc/string/i386/strcmp.c b/libc/string/i386/strcmp.c index 81cc16c7f..e3cf88715 100644 --- a/libc/string/i386/strcmp.c +++ b/libc/string/i386/strcmp.c @@ -32,6 +32,7 @@ #include +libc_hidden_proto(strcmp) int strcmp(const char *cs, const char *ct) { int d0, d1; @@ -51,7 +52,6 @@ int strcmp(const char *cs, const char *ct) :"1" (cs),"2" (ct)); return __res; } -libc_hidden_proto(strcmp) libc_hidden_def(strcmp) #ifndef __UCLIBC_HAS_LOCALE__ diff --git a/libc/string/i386/strcpy.c b/libc/string/i386/strcpy.c index 361dcdbb9..9e2b81009 100644 --- a/libc/string/i386/strcpy.c +++ b/libc/string/i386/strcpy.c @@ -32,6 +32,7 @@ #include +libc_hidden_proto(strcpy) char *strcpy(char * dest, const char * src) { int d0, d1, d2; @@ -44,5 +45,4 @@ char *strcpy(char * dest, const char * src) :"0" (src),"1" (dest) : "memory"); return dest; } -libc_hidden_proto(strcpy) libc_hidden_def(strcpy) diff --git a/libc/string/i386/strlen.c b/libc/string/i386/strlen.c index 2ef57e3f8..f0767b600 100644 --- a/libc/string/i386/strlen.c +++ b/libc/string/i386/strlen.c @@ -32,6 +32,7 @@ #include +libc_hidden_proto(strlen) size_t strlen(const char *s) { int d0; @@ -44,5 +45,4 @@ size_t strlen(const char *s) :"=c" (__res), "=&D" (d0) :"1" (s),"a" (0), "0" (0xffffffff)); return __res; } -libc_hidden_proto(strlen) libc_hidden_def(strlen) diff --git a/libc/string/i386/strncat.c b/libc/string/i386/strncat.c index 4a6dac31e..c1061421e 100644 --- a/libc/string/i386/strncat.c +++ b/libc/string/i386/strncat.c @@ -32,6 +32,7 @@ #include +libc_hidden_proto(strncat) char *strncat(char * dest, const char * src, size_t count) { @@ -57,5 +58,4 @@ char *strncat(char * dest, : "memory"); return dest; } -libc_hidden_proto(strncat) libc_hidden_def(strncat) diff --git a/libc/string/i386/strncmp.c b/libc/string/i386/strncmp.c index 96b966e30..0c42134e1 100644 --- a/libc/string/i386/strncmp.c +++ b/libc/string/i386/strncmp.c @@ -32,6 +32,7 @@ #include +libc_hidden_proto(strncmp) int strncmp(const char *cs, const char *ct, size_t count) { register int __res; @@ -54,5 +55,4 @@ int strncmp(const char *cs, const char *ct, size_t count) :"1" (cs),"2" (ct),"3" (count)); return __res; } -libc_hidden_proto(strncmp) libc_hidden_def(strncmp) diff --git a/libc/string/i386/strncpy.c b/libc/string/i386/strncpy.c index dde4d3ee1..c061fe37e 100644 --- a/libc/string/i386/strncpy.c +++ b/libc/string/i386/strncpy.c @@ -32,6 +32,7 @@ #include +libc_hidden_proto(strncpy) char *strncpy(char * dest, const char * src, size_t count) { int d0, d1, d2, d3; @@ -52,5 +53,4 @@ char *strncpy(char * dest, const char * src, size_t count) :"0" (src),"1" (dest),"2" (count) : "memory"); return dest; } -libc_hidden_proto(strncpy) libc_hidden_def(strncpy) diff --git a/libc/string/i386/strnlen.c b/libc/string/i386/strnlen.c index 7d9042fa4..6b565dbd8 100644 --- a/libc/string/i386/strnlen.c +++ b/libc/string/i386/strnlen.c @@ -33,6 +33,7 @@ #define _GNU_SOURCE #include +libc_hidden_proto(strnlen) size_t strnlen(const char *s, size_t count) { int d0; @@ -51,5 +52,4 @@ size_t strnlen(const char *s, size_t count) :"c" (s),"1" (count)); return __res; } -libc_hidden_proto(strnlen) libc_hidden_def(strnlen) diff --git a/libc/string/i386/strrchr.c b/libc/string/i386/strrchr.c index 094f4418e..7af990bd7 100644 --- a/libc/string/i386/strrchr.c +++ b/libc/string/i386/strrchr.c @@ -32,6 +32,7 @@ #include +libc_hidden_proto(strrchr) char *strrchr(const char *s, int c) { int d0, d1; @@ -47,6 +48,5 @@ char *strrchr(const char *s, int c) :"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c)); return __res; } -libc_hidden_proto(strrchr) libc_hidden_def(strrchr) strong_alias(strrchr,rindex) diff --git a/libc/string/powerpc/memcpy.c b/libc/string/powerpc/memcpy.c index 8ed03e526..ed8022313 100644 --- a/libc/string/powerpc/memcpy.c +++ b/libc/string/powerpc/memcpy.c @@ -21,6 +21,7 @@ #include +libc_hidden_proto(memcpy) void *memcpy(void *to, const void *from, size_t n) /* PPC can do pre increment and load/store, but not post increment and load/store. Therefore use *++ptr instead of *ptr++. */ @@ -76,5 +77,4 @@ void *memcpy(void *to, const void *from, size_t n) goto copy_chunks; goto lessthan8; } -libc_hidden_proto(memcpy) libc_hidden_def(memcpy) diff --git a/libc/string/powerpc/memmove.c b/libc/string/powerpc/memmove.c index 10e46867c..5f21f5f2f 100644 --- a/libc/string/powerpc/memmove.c +++ b/libc/string/powerpc/memmove.c @@ -21,6 +21,7 @@ #include +libc_hidden_proto(memmove) void *memmove(void *to, const void *from, size_t n) { unsigned long rem, chunks, tmp1, tmp2; @@ -72,5 +73,4 @@ void *memmove(void *to, const void *from, size_t n) goto copy_chunks; goto lessthan8; } -libc_hidden_proto(memmove) libc_hidden_def(memmove) diff --git a/libc/string/powerpc/memset.c b/libc/string/powerpc/memset.c index 47df2b607..891e0b8aa 100644 --- a/libc/string/powerpc/memset.c +++ b/libc/string/powerpc/memset.c @@ -21,6 +21,8 @@ #include +libc_hidden_proto(memset) + static inline int expand_byte_word(int c){ /* this does: c = c << 8 | c; @@ -78,5 +80,4 @@ void *memset(void *to, int c, size_t n) goto copy_chunks; goto lessthan8; } -libc_hidden_proto(memset) libc_hidden_def(memset) diff --git a/libc/string/strcasecmp.c b/libc/string/strcasecmp.c index 42d7230ae..333d3159c 100644 --- a/libc/string/strcasecmp.c +++ b/libc/string/strcasecmp.c @@ -33,15 +33,16 @@ libc_hidden_proto(tolower) libc_hidden_proto(strcasecmp_l) +libc_hidden_proto(strcasecmp) int strcasecmp(register const Wchar *s1, register const Wchar *s2) { return strcasecmp_l(s1, s2, __UCLIBC_CURLOCALE); } -libc_hidden_proto(strcasecmp) libc_hidden_def(strcasecmp) #else /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ +libc_hidden_proto(__XL_NPP(strcasecmp)) int __XL_NPP(strcasecmp)(register const Wchar *s1, register const Wchar *s2 __LOCALE_PARAM ) { @@ -66,7 +67,6 @@ int __XL_NPP(strcasecmp)(register const Wchar *s1, register const Wchar *s2 return r; #endif } -libc_hidden_proto(__XL_NPP(strcasecmp)) libc_hidden_def(__XL_NPP(strcasecmp)) #endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ diff --git a/libc/string/strlcpy.c b/libc/string/strlcpy.c index 2f3d29fff..a622d0c00 100644 --- a/libc/string/strlcpy.c +++ b/libc/string/strlcpy.c @@ -11,6 +11,7 @@ # define Wstrlcpy __wcslcpy # define Wstrxfrm wcsxfrm #else +libc_hidden_proto(strlcpy) # define Wstrlcpy strlcpy # define Wstrxfrm strxfrm #endif @@ -47,7 +48,6 @@ size_t Wstrlcpy(register Wchar *__restrict dst, return src - src0; } #ifndef WANT_WIDE -libc_hidden_proto(strlcpy) libc_hidden_def(strlcpy) #ifndef __UCLIBC_HAS_LOCALE__ strong_alias(strlcpy,strxfrm) diff --git a/libc/string/strncasecmp.c b/libc/string/strncasecmp.c index 1de214c73..2133b4ebd 100644 --- a/libc/string/strncasecmp.c +++ b/libc/string/strncasecmp.c @@ -33,15 +33,16 @@ libc_hidden_proto(tolower) libc_hidden_proto(strncasecmp_l) +libc_hidden_proto(strncasecmp) int strncasecmp(register const Wchar *s1, register const Wchar *s2, size_t n) { return strncasecmp_l(s1, s2, n, __UCLIBC_CURLOCALE); } -libc_hidden_proto(strncasecmp) libc_hidden_def(strncasecmp) #else /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ +libc_hidden_proto(__XL_NPP(strncasecmp)) int __XL_NPP(strncasecmp)(register const Wchar *s1, register const Wchar *s2, size_t n __LOCALE_PARAM ) { @@ -69,7 +70,6 @@ int __XL_NPP(strncasecmp)(register const Wchar *s1, register const Wchar *s2, return r; #endif } -libc_hidden_proto(__XL_NPP(strncasecmp)) libc_hidden_def(__XL_NPP(strncasecmp)) #endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ 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 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); @@ -46,6 +48,4 @@ int getrlimit(__rlimit_resource_t resource, struct rlimit *rlimits) return result; } #endif - -libc_hidden_proto(getrlimit) libc_hidden_def(getrlimit) diff --git a/libc/sysdeps/linux/common/getrusage.c b/libc/sysdeps/linux/common/getrusage.c index c6aa5a95e..9b87cb1b4 100644 --- a/libc/sysdeps/linux/common/getrusage.c +++ b/libc/sysdeps/linux/common/getrusage.c @@ -2,9 +2,9 @@ /* * getrusage() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/getsid.c b/libc/sysdeps/linux/common/getsid.c index 91d327098..1a574441c 100644 --- a/libc/sysdeps/linux/common/getsid.c +++ b/libc/sysdeps/linux/common/getsid.c @@ -2,14 +2,16 @@ /* * getsid() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(getsid) + #define __NR___syscall_getsid __NR_getsid static inline _syscall1(__kernel_pid_t, __syscall_getsid, __kernel_pid_t, pid); @@ -17,5 +19,4 @@ pid_t getsid(pid_t pid) { return (__syscall_getsid(pid)); } -libc_hidden_proto(getsid) libc_hidden_def(getsid) diff --git a/libc/sysdeps/linux/common/gettimeofday.c b/libc/sysdeps/linux/common/gettimeofday.c index 175691f89..2d8a6cb25 100644 --- a/libc/sysdeps/linux/common/gettimeofday.c +++ b/libc/sysdeps/linux/common/gettimeofday.c @@ -2,13 +2,15 @@ /* * gettimeofday() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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, gettimeofday, struct timeval *, tv, struct timezone *, tz); + libc_hidden_proto(gettimeofday) + +_syscall2(int, gettimeofday, struct timeval *, tv, struct timezone *, tz); libc_hidden_def(gettimeofday) diff --git a/libc/sysdeps/linux/common/getuid.c b/libc/sysdeps/linux/common/getuid.c index 610c34edc..6a06a78e4 100644 --- a/libc/sysdeps/linux/common/getuid.c +++ b/libc/sysdeps/linux/common/getuid.c @@ -2,14 +2,16 @@ /* * getuid() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(getuid) + #if defined (__alpha__) #define __NR_getuid __NR_getxuid #endif @@ -21,5 +23,4 @@ uid_t getuid(void) { return (__syscall_getuid()); } -libc_hidden_proto(getuid) libc_hidden_def(getuid) diff --git a/libc/sysdeps/linux/common/init_module.c b/libc/sysdeps/linux/common/init_module.c index 0065a74b8..558a59708 100644 --- a/libc/sysdeps/linux/common/init_module.c +++ b/libc/sysdeps/linux/common/init_module.c @@ -2,9 +2,9 @@ /* * init_module() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/ioctl.c b/libc/sysdeps/linux/common/ioctl.c index e9ea707ab..e8e3a1031 100644 --- a/libc/sysdeps/linux/common/ioctl.c +++ b/libc/sysdeps/linux/common/ioctl.c @@ -2,9 +2,9 @@ /* * ioctl() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/ioperm.c b/libc/sysdeps/linux/common/ioperm.c index 16c9eecfa..61794bb1b 100644 --- a/libc/sysdeps/linux/common/ioperm.c +++ b/libc/sysdeps/linux/common/ioperm.c @@ -2,9 +2,9 @@ /* * ioperm() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/iopl.c b/libc/sysdeps/linux/common/iopl.c index ab9513d9b..5d5cffb16 100644 --- a/libc/sysdeps/linux/common/iopl.c +++ b/libc/sysdeps/linux/common/iopl.c @@ -2,9 +2,9 @@ /* * iopl() for uClibc * - * Copyright (C) 2000-2005 by Erik Andersen + * 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/kill.c b/libc/sysdeps/linux/common/kill.c index 2a6bfce8e..7e1b330a5 100644 --- a/libc/sysdeps/linux/common/kill.c +++ b/libc/sysdeps/linux/common/kill.c @@ -2,15 +2,16 @@ /* * kill() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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 -#undef kill +libc_hidden_proto(kill) + #define __NR___syscall_kill __NR_kill static inline _syscall2(int, __syscall_kill, __kernel_pid_t, pid, int, sig); @@ -18,5 +19,4 @@ int kill(pid_t pid, int sig) { return (__syscall_kill(pid, sig)); } -libc_hidden_proto(kill) libc_hidden_def(kill) diff --git a/libc/sysdeps/linux/common/klogctl.c b/libc/sysdeps/linux/common/klogctl.c index acfeac59d..a77e4cb96 100644 --- a/libc/sysdeps/linux/common/klogctl.c +++ b/libc/sysdeps/linux/common/klogctl.c @@ -2,9 +2,9 @@ /* * klogctl() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/lchown.c b/libc/sysdeps/linux/common/lchown.c index 96fef52d0..ffee39126 100644 --- a/libc/sysdeps/linux/common/lchown.c +++ b/libc/sysdeps/linux/common/lchown.c @@ -2,9 +2,9 @@ /* * lchown() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/link.c b/libc/sysdeps/linux/common/link.c index 4035fcac6..21d1f1413 100644 --- a/libc/sysdeps/linux/common/link.c +++ b/libc/sysdeps/linux/common/link.c @@ -2,9 +2,9 @@ /* * link() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/llseek.c b/libc/sysdeps/linux/common/llseek.c index b48641a1a..7cfbce8ba 100644 --- a/libc/sysdeps/linux/common/llseek.c +++ b/libc/sysdeps/linux/common/llseek.c @@ -2,22 +2,9 @@ /* * llseek/lseek64 syscall for uClibc * - * Copyright (C) 2002 by Erik Andersen - * - * 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 @@ -35,12 +22,12 @@ #if defined __NR__llseek && defined __UCLIBC_HAS_LFS__ -#ifndef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) __syscall_llseek (args) -#define __NR___syscall_llseek __NR__llseek +# ifndef INLINE_SYSCALL +# define INLINE_SYSCALL(name, nr, args...) __syscall_llseek (args) +# define __NR___syscall_llseek __NR__llseek static inline _syscall5(int, __syscall_llseek, int, fd, off_t, offset_hi, off_t, offset_lo, loff_t *, result, int, whence); -#endif +# endif loff_t __libc_lseek64(int fd, loff_t offset, int whence) { @@ -51,6 +38,7 @@ loff_t __libc_lseek64(int fd, loff_t offset, int whence) #else extern __off_t __libc_lseek(int fildes, off_t offset, int whence); libc_hidden_proto(__libc_lseek) + loff_t __libc_lseek64(int fd, loff_t offset, int whence) { return(loff_t)(__libc_lseek(fd, (off_t) (offset), whence)); diff --git a/libc/sysdeps/linux/common/lseek.c b/libc/sysdeps/linux/common/lseek.c index 2ed5e4a14..022d2f6a0 100644 --- a/libc/sysdeps/linux/common/lseek.c +++ b/libc/sysdeps/linux/common/lseek.c @@ -2,17 +2,19 @@ /* * lseek() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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 +extern __off_t __libc_lseek (int __fd, __off_t __offset, int __whence) __THROW; +libc_hidden_proto(__libc_lseek) + #define __NR___libc_lseek __NR_lseek _syscall3(__off_t, __libc_lseek, int, fildes, __off_t, offset, int, whence); -libc_hidden_proto(__libc_lseek) libc_hidden_def(__libc_lseek) strong_alias(__libc_lseek,lseek) diff --git a/libc/sysdeps/linux/common/lstat.c b/libc/sysdeps/linux/common/lstat.c index 9509c489d..2c4a86b9d 100644 --- a/libc/sysdeps/linux/common/lstat.c +++ b/libc/sysdeps/linux/common/lstat.c @@ -2,9 +2,9 @@ /* * lstat() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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() @@ -18,8 +18,9 @@ #undef lstat64 +libc_hidden_proto(lstat) + #define __NR___syscall_lstat __NR_lstat -#undef lstat static inline _syscall2(int, __syscall_lstat, const char *, file_name, struct kernel_stat *, buf); @@ -34,7 +35,6 @@ int lstat(const char *file_name, struct stat *buf) } return result; } -libc_hidden_proto(lstat) libc_hidden_def(lstat) #if ! defined __NR_lstat64 && defined __UCLIBC_HAS_LFS__ diff --git a/libc/sysdeps/linux/common/lstat64.c b/libc/sysdeps/linux/common/lstat64.c index b56184f82..2dc06c692 100644 --- a/libc/sysdeps/linux/common/lstat64.c +++ b/libc/sysdeps/linux/common/lstat64.c @@ -2,19 +2,21 @@ /* * lstat64() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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_lstat64 -#include -#include -#include "xstatconv.h" +# include +# include +# include "xstatconv.h" -#define __NR___syscall_lstat64 __NR_lstat64 +libc_hidden_proto(lstat64) + +# define __NR___syscall_lstat64 __NR_lstat64 static inline _syscall2(int, __syscall_lstat64, const char *, file_name, struct kernel_stat64 *, buf); @@ -29,7 +31,6 @@ int lstat64(const char *file_name, struct stat64 *buf) } return result; } -libc_hidden_proto(lstat64) libc_hidden_def(lstat64) -#endif /* __UCLIBC_HAS_LFS__ */ +#endif diff --git a/libc/sysdeps/linux/common/madvise.c b/libc/sysdeps/linux/common/madvise.c index bdea24c66..fa4f38046 100644 --- a/libc/sysdeps/linux/common/madvise.c +++ b/libc/sysdeps/linux/common/madvise.c @@ -2,9 +2,9 @@ /* * madvise() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/mincore.c b/libc/sysdeps/linux/common/mincore.c index ecae441a5..530f7b67d 100644 --- a/libc/sysdeps/linux/common/mincore.c +++ b/libc/sysdeps/linux/common/mincore.c @@ -1,10 +1,9 @@ -/* - * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvs/uClibc/libc/sysdeps/linux/common/mincore.c,v 1.1 2004/12/20 00:10:51 solar Exp $ - * +/* * This file provides the mincore() system call to uClibc. - * 20041215 - + * Copyright (C) 20041215 - + * Copyright (C) 2000-2006 Erik Andersen * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #include "syscalls.h" diff --git a/libc/sysdeps/linux/common/mkdir.c b/libc/sysdeps/linux/common/mkdir.c index 819793f87..93b66ae40 100644 --- a/libc/sysdeps/linux/common/mkdir.c +++ b/libc/sysdeps/linux/common/mkdir.c @@ -2,14 +2,16 @@ /* * mkdir() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(mkdir) + #define __NR___syscall_mkdir __NR_mkdir static inline _syscall2(int, __syscall_mkdir, const char *, pathname, __kernel_mode_t, mode); @@ -18,5 +20,4 @@ int mkdir(const char *pathname, mode_t mode) { return (__syscall_mkdir(pathname, mode)); } -libc_hidden_proto(mkdir) libc_hidden_def(mkdir) diff --git a/libc/sysdeps/linux/common/mknod.c b/libc/sysdeps/linux/common/mknod.c index f914af5d7..b71541d95 100644 --- a/libc/sysdeps/linux/common/mknod.c +++ b/libc/sysdeps/linux/common/mknod.c @@ -2,15 +2,17 @@ /* * mknod() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(mknod) + #define __NR___syscall_mknod __NR_mknod static inline _syscall3(int, __syscall_mknod, const char *, path, __kernel_mode_t, mode, __kernel_dev_t, dev); @@ -23,5 +25,4 @@ int mknod(const char *path, mode_t mode, dev_t dev) k_dev = ((major(dev) & 0xff) << 8) | (minor(dev) & 0xff); return __syscall_mknod(path, mode, k_dev); } -libc_hidden_proto(mknod) libc_hidden_def(mknod) diff --git a/libc/sysdeps/linux/common/mlock.c b/libc/sysdeps/linux/common/mlock.c index aa6bbb63b..28a6e7927 100644 --- a/libc/sysdeps/linux/common/mlock.c +++ b/libc/sysdeps/linux/common/mlock.c @@ -2,9 +2,9 @@ /* * mlock() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/mlockall.c b/libc/sysdeps/linux/common/mlockall.c index 4f51bd0df..ea48811ae 100644 --- a/libc/sysdeps/linux/common/mlockall.c +++ b/libc/sysdeps/linux/common/mlockall.c @@ -2,9 +2,9 @@ /* * mlockall() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/mmap.c b/libc/sysdeps/linux/common/mmap.c index eadecfeee..29d78a712 100644 --- a/libc/sysdeps/linux/common/mmap.c +++ b/libc/sysdeps/linux/common/mmap.c @@ -1,10 +1,10 @@ /* vi: set sw=4 ts=4: */ /* - * _mmap() for uClibc + * mmap() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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,9 @@ #include #ifdef __NR_mmap + +libc_hidden_proto(mmap) + #define __NR__mmap __NR_mmap static inline _syscall1(__ptr_t, _mmap, unsigned long *, buffer); __ptr_t mmap(__ptr_t addr, size_t len, int prot, @@ -27,6 +30,5 @@ __ptr_t mmap(__ptr_t addr, size_t len, int prot, buffer[5] = (unsigned long) offset; return (__ptr_t) _mmap(buffer); } -libc_hidden_proto(mmap) libc_hidden_def(mmap) #endif diff --git a/libc/sysdeps/linux/common/mmap64.c b/libc/sysdeps/linux/common/mmap64.c index c0bc2b53a..9f7ae75f3 100644 --- a/libc/sysdeps/linux/common/mmap64.c +++ b/libc/sysdeps/linux/common/mmap64.c @@ -1,22 +1,8 @@ -/* Copyright (C) 1997, 1998, 1999, 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Daniel Jacobowitz , 1999. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ /* Massivly hacked up for uClibc by Erik Andersen */ #include @@ -24,11 +10,13 @@ #include #include -#if defined __UCLIBC_HAS_LFS__ +#ifdef __UCLIBC_HAS_LFS__ + +libc_hidden_proto(mmap) #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64 -#undef _FILE_OFFSET_BITS -#define _FILE_OFFSET_BITS 64 +# undef _FILE_OFFSET_BITS +# define _FILE_OFFSET_BITS 64 #endif #ifndef __USE_LARGEFILE64 # define __USE_LARGEFILE64 1 @@ -39,10 +27,7 @@ # undef __USE_FILE_OFFSET64 #endif - -#if ! defined __NR_mmap2 || ! defined _syscall6 - -libc_hidden_proto(mmap) +# if ! defined __NR_mmap2 || ! defined _syscall6 /* * This version is a stub that just chops off everything at the mmap 32 bit @@ -62,16 +47,16 @@ __ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t return mmap (addr, len, prot, flags, fd, (off_t) offset); } -#else +# else -#define __NR___syscall_mmap2 __NR_mmap2 +# define __NR___syscall_mmap2 __NR_mmap2 static inline _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr, size_t, len, int, prot, int, flags, int, fd, off_t, offset); /* This is always 12, even on architectures where PAGE_SHIFT != 12. */ -# ifndef MMAP2_PAGE_SHIFT -# define MMAP2_PAGE_SHIFT 12 -# endif +# ifndef MMAP2_PAGE_SHIFT +# define MMAP2_PAGE_SHIFT 12 +# endif __ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t offset) { @@ -82,5 +67,5 @@ __ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t return(__syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT))); } -#endif +# endif #endif /* __UCLIBC_HAS_LFS__ */ diff --git a/libc/sysdeps/linux/common/modify_ldt.c b/libc/sysdeps/linux/common/modify_ldt.c index 47ed7e350..3df6379b0 100644 --- a/libc/sysdeps/linux/common/modify_ldt.c +++ b/libc/sysdeps/linux/common/modify_ldt.c @@ -2,14 +2,13 @@ /* * modify_ldt() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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_modify_ldt _syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount); -/*weak_alias(modify_ldt, __modify_ldt)*/ #endif diff --git a/libc/sysdeps/linux/common/mount.c b/libc/sysdeps/linux/common/mount.c index f62c62676..9cbefe4a8 100644 --- a/libc/sysdeps/linux/common/mount.c +++ b/libc/sysdeps/linux/common/mount.c @@ -2,9 +2,9 @@ /* * mount() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/mprotect.c b/libc/sysdeps/linux/common/mprotect.c index cb6beb489..7eab338d0 100644 --- a/libc/sysdeps/linux/common/mprotect.c +++ b/libc/sysdeps/linux/common/mprotect.c @@ -2,9 +2,9 @@ /* * mprotect() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/mremap.c b/libc/sysdeps/linux/common/mremap.c index 16359193b..080d2c1c2 100644 --- a/libc/sysdeps/linux/common/mremap.c +++ b/libc/sysdeps/linux/common/mremap.c @@ -2,15 +2,17 @@ /* * mremap() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(mremap) + _syscall4(__ptr_t, mremap, __ptr_t, old_address, size_t, old_size, size_t, new_size, int, may_move); -libc_hidden_proto(mremap) libc_hidden_def(mremap) diff --git a/libc/sysdeps/linux/common/msync.c b/libc/sysdeps/linux/common/msync.c index 044652720..bede0dc60 100644 --- a/libc/sysdeps/linux/common/msync.c +++ b/libc/sysdeps/linux/common/msync.c @@ -2,9 +2,9 @@ /* * msync() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/munlock.c b/libc/sysdeps/linux/common/munlock.c index 674ae41e0..80fd898fa 100644 --- a/libc/sysdeps/linux/common/munlock.c +++ b/libc/sysdeps/linux/common/munlock.c @@ -2,9 +2,9 @@ /* * munlock() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/munlockall.c b/libc/sysdeps/linux/common/munlockall.c index c1087658f..d0a086a37 100644 --- a/libc/sysdeps/linux/common/munlockall.c +++ b/libc/sysdeps/linux/common/munlockall.c @@ -2,9 +2,9 @@ /* * munlockall() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/munmap.c b/libc/sysdeps/linux/common/munmap.c index cd76eb297..7a82df632 100644 --- a/libc/sysdeps/linux/common/munmap.c +++ b/libc/sysdeps/linux/common/munmap.c @@ -2,14 +2,16 @@ /* * munmap() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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 -_syscall2(int, munmap, void *, start, size_t, length); + libc_hidden_proto(munmap) + +_syscall2(int, munmap, void *, start, size_t, length); libc_hidden_def(munmap) diff --git a/libc/sysdeps/linux/common/nanosleep.c b/libc/sysdeps/linux/common/nanosleep.c index 0032f6623..c695e827d 100644 --- a/libc/sysdeps/linux/common/nanosleep.c +++ b/libc/sysdeps/linux/common/nanosleep.c @@ -2,14 +2,15 @@ /* * nanosleep() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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 __NR___libc_nanosleep __NR_nanosleep _syscall2(int, __libc_nanosleep, const struct timespec *, req, struct timespec *, rem); diff --git a/libc/sysdeps/linux/common/nice.c b/libc/sysdeps/linux/common/nice.c index 75e065e65..e6e80e7be 100644 --- a/libc/sysdeps/linux/common/nice.c +++ b/libc/sysdeps/linux/common/nice.c @@ -2,10 +2,10 @@ /* * nice() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen * Copyright (C) 2005 by Manuel Novoa III + * 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" @@ -16,12 +16,12 @@ libc_hidden_proto(getpriority) #ifdef __NR_nice -#define __NR___syscall_nice __NR_nice +# define __NR___syscall_nice __NR_nice static inline _syscall1(int, __syscall_nice, int, incr); #else -#include +# include libc_hidden_proto(setpriority) @@ -41,10 +41,10 @@ static inline int int_add_no_wrap(int a, int b) static inline int __syscall_nice(int incr) { int old_priority; -#if 1 +# if 1 /* This should never fail. */ old_priority = getpriority(PRIO_PROCESS, 0); -#else +# else /* But if you want to be paranoid... */ int old_errno; @@ -55,7 +55,7 @@ static inline int __syscall_nice(int incr) return -1; } __set_errno(old_errno); -#endif +# endif if (setpriority(PRIO_PROCESS, 0, int_add_no_wrap(old_priority, incr))) { __set_errno(EPERM); /* SUSv3 mandates EPERM for nice failure. */ diff --git a/libc/sysdeps/linux/common/open.c b/libc/sysdeps/linux/common/open.c index 14cf65750..1be1f2567 100644 --- a/libc/sysdeps/linux/common/open.c +++ b/libc/sysdeps/linux/common/open.c @@ -2,9 +2,9 @@ /* * open() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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" @@ -14,6 +14,9 @@ #include #include +extern int __libc_open(const char *file, int flags, ...); +libc_hidden_proto(__libc_open) + #define __NR___syscall_open __NR_open static inline _syscall3(int, __syscall_open, const char *, file, int, flags, __kernel_mode_t, mode); @@ -33,7 +36,6 @@ int __libc_open(const char *file, int flags, ...) } return __syscall_open(file, flags, mode); } -libc_hidden_proto(__libc_open) libc_hidden_def(__libc_open) strong_alias(__libc_open,open) diff --git a/libc/sysdeps/linux/common/open64.c b/libc/sysdeps/linux/common/open64.c index fbe99b0d9..97c3d2df9 100644 --- a/libc/sysdeps/linux/common/open64.c +++ b/libc/sysdeps/linux/common/open64.c @@ -1,31 +1,19 @@ -/* Copyright (C) 1991, 1995-1997, 1999, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include #include +#ifdef __UCLIBC_HAS_LFS__ + #ifndef O_LARGEFILE -#define O_LARGEFILE 0100000 +# define O_LARGEFILE 0100000 #endif -#ifdef __UCLIBC_HAS_LFS__ extern int __libc_open (__const char *__file, int __oflag, ...) __nonnull ((1)); libc_hidden_proto(__libc_open) @@ -45,7 +33,6 @@ int __libc_open64 (const char *file, int oflag, ...) return __libc_open(file, oflag | O_LARGEFILE, mode); } - strong_alias(__libc_open64,open64) libc_hidden_proto(open64) libc_hidden_def(open64) diff --git a/libc/sysdeps/linux/common/pause.c b/libc/sysdeps/linux/common/pause.c index 1028a7a63..f26dbe664 100644 --- a/libc/sysdeps/linux/common/pause.c +++ b/libc/sysdeps/linux/common/pause.c @@ -2,9 +2,9 @@ /* * pause() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/personality.c b/libc/sysdeps/linux/common/personality.c index 138909fcc..39b15007f 100644 --- a/libc/sysdeps/linux/common/personality.c +++ b/libc/sysdeps/linux/common/personality.c @@ -2,9 +2,9 @@ /* * personality() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/pipe.c b/libc/sysdeps/linux/common/pipe.c index 93d52b88f..02a6975e9 100644 --- a/libc/sysdeps/linux/common/pipe.c +++ b/libc/sysdeps/linux/common/pipe.c @@ -2,13 +2,15 @@ /* * pipe() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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, pipe, int *, filedes); + libc_hidden_proto(pipe) + +_syscall1(int, pipe, int *, filedes); libc_hidden_def(pipe) diff --git a/libc/sysdeps/linux/common/pivot_root.c b/libc/sysdeps/linux/common/pivot_root.c index c424afd13..a182df9b4 100644 --- a/libc/sysdeps/linux/common/pivot_root.c +++ b/libc/sysdeps/linux/common/pivot_root.c @@ -2,9 +2,9 @@ /* * pivot_root() for uClibc * - * Copyright (C) 2000-2005 by Erik Andersen + * 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/poll.c b/libc/sysdeps/linux/common/poll.c index c76df966f..00fd70816 100644 --- a/libc/sysdeps/linux/common/poll.c +++ b/libc/sysdeps/linux/common/poll.c @@ -20,6 +20,8 @@ #include "syscalls.h" #include +libc_hidden_proto(poll) + #ifdef __NR_poll _syscall3(int, poll, struct pollfd *, fds, unsigned long int, nfds, int, timeout); @@ -205,5 +207,4 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout) } #endif -libc_hidden_proto(poll) libc_hidden_def(poll) diff --git a/libc/sysdeps/linux/common/posix_fadvise.c b/libc/sysdeps/linux/common/posix_fadvise.c index 72419be7b..3fe15c40c 100644 --- a/libc/sysdeps/linux/common/posix_fadvise.c +++ b/libc/sysdeps/linux/common/posix_fadvise.c @@ -3,9 +3,9 @@ * posix_fadvise() for uClibc * http://www.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html * - * Copyright (C) 2000-2005 by Erik Andersen + * 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/posix_fadvise64.c b/libc/sysdeps/linux/common/posix_fadvise64.c index e5f23d509..d931aff60 100644 --- a/libc/sysdeps/linux/common/posix_fadvise64.c +++ b/libc/sysdeps/linux/common/posix_fadvise64.c @@ -3,9 +3,9 @@ * posix_fadvise64() for uClibc * http://www.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html * - * Copyright (C) 2000-2005 by Erik Andersen + * 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 diff --git a/libc/sysdeps/linux/common/prctl.c b/libc/sysdeps/linux/common/prctl.c index e908c44cd..a75ac2cf5 100644 --- a/libc/sysdeps/linux/common/prctl.c +++ b/libc/sysdeps/linux/common/prctl.c @@ -2,9 +2,9 @@ /* * prctl() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/pread_write.c b/libc/sysdeps/linux/common/pread_write.c index 090f73fd4..327a9c785 100644 --- a/libc/sysdeps/linux/common/pread_write.c +++ b/libc/sysdeps/linux/common/pread_write.c @@ -1,26 +1,16 @@ -/* vi: set sw=4 ts=4: +/* vi: set sw=4 ts=4: */ +/* + * Copyright (C) 2000-2006 Erik Andersen * - * Copyright (C) 2002 by Erik Andersen + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ +/* * Based in part on the files * ./sysdeps/unix/sysv/linux/pwrite.c, * ./sysdeps/unix/sysv/linux/pread.c, * sysdeps/posix/pread.c * sysdeps/posix/pwrite.c * from GNU libc 2.2.5, but reworked considerably... - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License - * for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define _GNU_SOURCE @@ -40,15 +30,6 @@ #include #include -libc_hidden_proto(read) -libc_hidden_proto(write) - -#ifdef __UCLIBC_HAS_LFS__ -libc_hidden_proto(lseek64) -#else -libc_hidden_proto(lseek) -#endif - #ifdef __NR_pread #define __NR___syscall_pread __NR_pread @@ -100,6 +81,11 @@ strong_alias(__libc_pwrite64,pwrite64) #if ! defined __NR_pread || ! defined __NR_pwrite +libc_hidden_proto(read) +libc_hidden_proto(write) +libc_hidden_proto(lseek) +libc_hidden_proto(lseek64) + static ssize_t __fake_pread_write(int fd, void *buf, size_t count, off_t offset, int do_pwrite) { diff --git a/libc/sysdeps/linux/common/ptrace.c b/libc/sysdeps/linux/common/ptrace.c index 1f2b35b33..fda2e9d84 100644 --- a/libc/sysdeps/linux/common/ptrace.c +++ b/libc/sysdeps/linux/common/ptrace.c @@ -1,20 +1,8 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include @@ -22,10 +10,9 @@ #include #include - #define __NR___syscall_ptrace __NR_ptrace -static _syscall4(long, __syscall_ptrace, enum __ptrace_request, request, +static inline _syscall4(long, __syscall_ptrace, enum __ptrace_request, request, __kernel_pid_t, pid, void*, addr, void*, data); long int diff --git a/libc/sysdeps/linux/common/query_module.c b/libc/sysdeps/linux/common/query_module.c index 853b9ed94..e65e32d7f 100644 --- a/libc/sysdeps/linux/common/query_module.c +++ b/libc/sysdeps/linux/common/query_module.c @@ -2,9 +2,9 @@ /* * query_module() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/quotactl.c b/libc/sysdeps/linux/common/quotactl.c index 3ac367748..2982f4956 100644 --- a/libc/sysdeps/linux/common/quotactl.c +++ b/libc/sysdeps/linux/common/quotactl.c @@ -2,9 +2,9 @@ /* * quotactl() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/read.c b/libc/sysdeps/linux/common/read.c index 912533e55..079bd0eb5 100644 --- a/libc/sysdeps/linux/common/read.c +++ b/libc/sysdeps/linux/common/read.c @@ -2,9 +2,9 @@ /* * read() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/readlink.c b/libc/sysdeps/linux/common/readlink.c index d1587154d..73d5441c0 100644 --- a/libc/sysdeps/linux/common/readlink.c +++ b/libc/sysdeps/linux/common/readlink.c @@ -2,13 +2,15 @@ /* * readlink() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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 -_syscall3(int, readlink, const char *, path, char *, buf, size_t, bufsiz); + libc_hidden_proto(readlink) + +_syscall3(int, readlink, const char *, path, char *, buf, size_t, bufsiz); libc_hidden_def(readlink) diff --git a/libc/sysdeps/linux/common/readv.c b/libc/sysdeps/linux/common/readv.c index 79ecf6f6d..040e61266 100644 --- a/libc/sysdeps/linux/common/readv.c +++ b/libc/sysdeps/linux/common/readv.c @@ -2,9 +2,9 @@ /* * readv() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/reboot.c b/libc/sysdeps/linux/common/reboot.c index 57ac2398b..8347ebfe8 100644 --- a/libc/sysdeps/linux/common/reboot.c +++ b/libc/sysdeps/linux/common/reboot.c @@ -2,9 +2,9 @@ /* * _reboot() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/rename.c b/libc/sysdeps/linux/common/rename.c index 7906cc939..55de6b1d0 100644 --- a/libc/sysdeps/linux/common/rename.c +++ b/libc/sysdeps/linux/common/rename.c @@ -2,9 +2,9 @@ /* * rename() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/rmdir.c b/libc/sysdeps/linux/common/rmdir.c index 706fa0fd3..0aadd73f2 100644 --- a/libc/sysdeps/linux/common/rmdir.c +++ b/libc/sysdeps/linux/common/rmdir.c @@ -2,13 +2,15 @@ /* * rmdir() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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, rmdir, const char *, pathname); + libc_hidden_proto(rmdir) + +_syscall1(int, rmdir, const char *, pathname); libc_hidden_def(rmdir) diff --git a/libc/sysdeps/linux/common/sbrk.c b/libc/sysdeps/linux/common/sbrk.c index bdc8c68a7..3c2d9bdc9 100644 --- a/libc/sysdeps/linux/common/sbrk.c +++ b/libc/sysdeps/linux/common/sbrk.c @@ -1,24 +1,14 @@ -/* Copyright (C) 1991, 1995, 1996, 1997, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include +libc_hidden_proto(sbrk) + libc_hidden_proto(brk) /* Defined in brk.c. */ @@ -45,5 +35,4 @@ void * sbrk (intptr_t increment) return oldbrk; } -libc_hidden_proto(sbrk) libc_hidden_def(sbrk) diff --git a/libc/sysdeps/linux/common/sched_get_priority_max.c b/libc/sysdeps/linux/common/sched_get_priority_max.c index 77da3573e..c9292ffbd 100644 --- a/libc/sysdeps/linux/common/sched_get_priority_max.c +++ b/libc/sysdeps/linux/common/sched_get_priority_max.c @@ -2,9 +2,9 @@ /* * sched_get_priority_max() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/sched_get_priority_min.c b/libc/sysdeps/linux/common/sched_get_priority_min.c index adcb6d622..317911fc1 100644 --- a/libc/sysdeps/linux/common/sched_get_priority_min.c +++ b/libc/sysdeps/linux/common/sched_get_priority_min.c @@ -2,9 +2,9 @@ /* * sched_get_priority_min() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/sched_getparam.c b/libc/sysdeps/linux/common/sched_getparam.c index 992010ddb..d9b3dcde5 100644 --- a/libc/sysdeps/linux/common/sched_getparam.c +++ b/libc/sysdeps/linux/common/sched_getparam.c @@ -2,9 +2,9 @@ /* * sched_getparam() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/sched_getscheduler.c b/libc/sysdeps/linux/common/sched_getscheduler.c index dedd5e17f..13df2aefd 100644 --- a/libc/sysdeps/linux/common/sched_getscheduler.c +++ b/libc/sysdeps/linux/common/sched_getscheduler.c @@ -2,9 +2,9 @@ /* * sched_getscheduler() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/sched_rr_get_interval.c b/libc/sysdeps/linux/common/sched_rr_get_interval.c index 8bf31dcbf..0eb25016e 100644 --- a/libc/sysdeps/linux/common/sched_rr_get_interval.c +++ b/libc/sysdeps/linux/common/sched_rr_get_interval.c @@ -2,9 +2,9 @@ /* * sched_rr_get_interval() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/sched_setparam.c b/libc/sysdeps/linux/common/sched_setparam.c index f10b5269d..a0ff56840 100644 --- a/libc/sysdeps/linux/common/sched_setparam.c +++ b/libc/sysdeps/linux/common/sched_setparam.c @@ -2,9 +2,9 @@ /* * sched_setparam() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/sched_setscheduler.c b/libc/sysdeps/linux/common/sched_setscheduler.c index ebf4b777a..14236e927 100644 --- a/libc/sysdeps/linux/common/sched_setscheduler.c +++ b/libc/sysdeps/linux/common/sched_setscheduler.c @@ -2,9 +2,9 @@ /* * sched_setscheduler() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/sched_yield.c b/libc/sysdeps/linux/common/sched_yield.c index 77674143a..3953d8d16 100644 --- a/libc/sysdeps/linux/common/sched_yield.c +++ b/libc/sysdeps/linux/common/sched_yield.c @@ -2,9 +2,9 @@ /* * sched_yield() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/select.c b/libc/sysdeps/linux/common/select.c index 19e14b99a..d5a0663fa 100644 --- a/libc/sysdeps/linux/common/select.c +++ b/libc/sysdeps/linux/common/select.c @@ -2,19 +2,20 @@ /* * select() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(select) + #ifdef __NR__newselect -#undef __NR_select -#define __NR_select __NR__newselect +# undef __NR_select +# define __NR_select __NR__newselect #endif _syscall5(int, select, int, n, fd_set *, readfds, fd_set *, writefds, fd_set *, exceptfds, struct timeval *, timeout); -libc_hidden_proto(select) libc_hidden_def(select) diff --git a/libc/sysdeps/linux/common/sendfile.c b/libc/sysdeps/linux/common/sendfile.c index cff95f579..ba3734f09 100644 --- a/libc/sysdeps/linux/common/sendfile.c +++ b/libc/sysdeps/linux/common/sendfile.c @@ -2,9 +2,9 @@ /* * sendfile() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/sendfile64.c b/libc/sysdeps/linux/common/sendfile64.c index 9c7c0ad3c..3e704770f 100644 --- a/libc/sysdeps/linux/common/sendfile64.c +++ b/libc/sysdeps/linux/common/sendfile64.c @@ -1,15 +1,13 @@ /* - * sendfile64 syscall. Copes with 64 bit and 32 bit machines + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ +/* sendfile64 syscall. Copes with 64 bit and 32 bit machines * and on 32 bit machines this sends things into the kernel as * two 32-bit arguments (high and low 32 bits of length) that * are ordered based on endianess. It turns out endian.h has * just the macro we need to order things, __LONG_LONG_PAIR. - * - * Copyright (C) 2002 Erik Andersen - * - * 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 @@ -22,19 +20,19 @@ #if defined __NR_sendfile64 -#if __WORDSIZE == 64 || (defined(__powerpc__) && defined (__UCLIBC_HAS_LFS__)) +# if __WORDSIZE == 64 || (defined(__powerpc__) && defined (__UCLIBC_HAS_LFS__)) /* For a 64 bit machine, life is simple... */ _syscall4(ssize_t,sendfile64, int, out_fd, int, in_fd, __off64_t *, offset, size_t, count); -#elif __WORDSIZE == 32 +# elif __WORDSIZE == 32 -#if defined __UCLIBC_HAS_LFS__ +# if defined __UCLIBC_HAS_LFS__ _syscall4(ssize_t,sendfile64, int, out_fd, int, in_fd, __off64_t *, offset, size_t, count); -#endif /* __UCLIBC_HAS_LFS__ */ +# endif /* __UCLIBC_HAS_LFS__ */ -#else /* __WORDSIZE */ -#error Your machine is not 64 bit or 32 bit, I am dazed and confused. -#endif /* __WORDSIZE */ +# else /* __WORDSIZE */ +# error Your machine is not 64 bit or 32 bit, I am dazed and confused. +# endif /* __WORDSIZE */ #else /* ! defined __NR_sendfile64 */ diff --git a/libc/sysdeps/linux/common/setdomainname.c b/libc/sysdeps/linux/common/setdomainname.c index a88e5a47d..138250d09 100644 --- a/libc/sysdeps/linux/common/setdomainname.c +++ b/libc/sysdeps/linux/common/setdomainname.c @@ -2,9 +2,9 @@ /* * setdomainname() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/setegid.c b/libc/sysdeps/linux/common/setegid.c index dcd207132..759c9b0f3 100644 --- a/libc/sysdeps/linux/common/setegid.c +++ b/libc/sysdeps/linux/common/setegid.c @@ -12,7 +12,9 @@ #include #include +#ifdef __NR_setresgid libc_hidden_proto(setresgid) +#endif libc_hidden_proto(setregid) int setegid(gid_t gid) diff --git a/libc/sysdeps/linux/common/seteuid.c b/libc/sysdeps/linux/common/seteuid.c index dea919c3b..dc4b82c4c 100644 --- a/libc/sysdeps/linux/common/seteuid.c +++ b/libc/sysdeps/linux/common/seteuid.c @@ -12,6 +12,8 @@ #include #include +libc_hidden_proto(seteuid) + libc_hidden_proto(setresuid) libc_hidden_proto(setreuid) @@ -35,5 +37,4 @@ int seteuid(uid_t uid) return result; } -libc_hidden_proto(seteuid) libc_hidden_def(seteuid) diff --git a/libc/sysdeps/linux/common/setfsgid.c b/libc/sysdeps/linux/common/setfsgid.c index 87e72683e..027dd11f6 100644 --- a/libc/sysdeps/linux/common/setfsgid.c +++ b/libc/sysdeps/linux/common/setfsgid.c @@ -2,9 +2,9 @@ /* * setfsgid() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/setfsuid.c b/libc/sysdeps/linux/common/setfsuid.c index a515652fe..4bbc931cf 100644 --- a/libc/sysdeps/linux/common/setfsuid.c +++ b/libc/sysdeps/linux/common/setfsuid.c @@ -2,9 +2,9 @@ /* * setfsuid() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/setgid.c b/libc/sysdeps/linux/common/setgid.c index b055b9333..d0698f517 100644 --- a/libc/sysdeps/linux/common/setgid.c +++ b/libc/sysdeps/linux/common/setgid.c @@ -2,9 +2,9 @@ /* * setgid() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/setgroups.c b/libc/sysdeps/linux/common/setgroups.c index a41578d62..b767f6aa7 100644 --- a/libc/sysdeps/linux/common/setgroups.c +++ b/libc/sysdeps/linux/common/setgroups.c @@ -2,9 +2,9 @@ /* * setgroups() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(setgroups) + libc_hidden_proto(sysconf) #define __NR___syscall_setgroups __NR_setgroups @@ -47,5 +49,4 @@ ret_error: return i; } } -libc_hidden_proto(setgroups) libc_hidden_def(setgroups) diff --git a/libc/sysdeps/linux/common/sethostname.c b/libc/sysdeps/linux/common/sethostname.c index 16d636b6f..d8e0789bb 100644 --- a/libc/sysdeps/linux/common/sethostname.c +++ b/libc/sysdeps/linux/common/sethostname.c @@ -2,9 +2,9 @@ /* * sethostname() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/setitimer.c b/libc/sysdeps/linux/common/setitimer.c index f34a9f39c..fb6c6b1e6 100644 --- a/libc/sysdeps/linux/common/setitimer.c +++ b/libc/sysdeps/linux/common/setitimer.c @@ -2,14 +2,16 @@ /* * setitimer() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(setitimer) + _syscall3(int, setitimer, __itimer_which_t, which, const struct itimerval *, new, struct itimerval *, old); -libc_hidden_proto(setitimer) libc_hidden_def(setitimer) diff --git a/libc/sysdeps/linux/common/setpgid.c b/libc/sysdeps/linux/common/setpgid.c index 0453fbdfb..98289ff72 100644 --- a/libc/sysdeps/linux/common/setpgid.c +++ b/libc/sysdeps/linux/common/setpgid.c @@ -2,14 +2,16 @@ /* * setpgid() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(setpgid) + #define __NR___syscall_setpgid __NR_setpgid static inline _syscall2(int, __syscall_setpgid, __kernel_pid_t, pid, __kernel_pid_t, pgid); @@ -18,5 +20,4 @@ int setpgid(pid_t pid, pid_t pgid) { return (__syscall_setpgid(pid, pgid)); } -libc_hidden_proto(setpgid) libc_hidden_def(setpgid) diff --git a/libc/sysdeps/linux/common/setpriority.c b/libc/sysdeps/linux/common/setpriority.c index 7347786af..d836153d5 100644 --- a/libc/sysdeps/linux/common/setpriority.c +++ b/libc/sysdeps/linux/common/setpriority.c @@ -2,13 +2,15 @@ /* * setpriority() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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 -_syscall3(int, setpriority, __priority_which_t, which, id_t, who, int, prio); + libc_hidden_proto(setpriority) + +_syscall3(int, setpriority, __priority_which_t, which, id_t, who, int, prio); libc_hidden_def(setpriority) diff --git a/libc/sysdeps/linux/common/setregid.c b/libc/sysdeps/linux/common/setregid.c index d9aca14bb..a085ed2ab 100644 --- a/libc/sysdeps/linux/common/setregid.c +++ b/libc/sysdeps/linux/common/setregid.c @@ -2,14 +2,16 @@ /* * setregid() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(setregid) + #define __NR___syscall_setregid __NR_setregid static inline _syscall2(int, __syscall_setregid, __kernel_gid_t, rgid, __kernel_gid_t, egid); @@ -23,5 +25,4 @@ int setregid(gid_t rgid, gid_t egid) } return (__syscall_setregid(rgid, egid)); } -libc_hidden_proto(setregid) libc_hidden_def(setregid) diff --git a/libc/sysdeps/linux/common/setresgid.c b/libc/sysdeps/linux/common/setresgid.c index 82087d1c1..aa331e3bb 100644 --- a/libc/sysdeps/linux/common/setresgid.c +++ b/libc/sysdeps/linux/common/setresgid.c @@ -2,14 +2,17 @@ /* * setresgid() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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 #ifdef __NR_setresgid +libc_hidden_proto(setresgid) + #define __NR___syscall_setresgid __NR_setresgid static inline _syscall3(int, __syscall_setresgid, __kernel_gid_t, rgid, __kernel_gid_t, egid, __kernel_gid_t, sgid); @@ -24,6 +27,5 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid) } return (__syscall_setresgid(rgid, egid, sgid)); } -libc_hidden_proto(setresgid) libc_hidden_def(setresgid) #endif diff --git a/libc/sysdeps/linux/common/setresuid.c b/libc/sysdeps/linux/common/setresuid.c index 7d34c4027..7e23774ac 100644 --- a/libc/sysdeps/linux/common/setresuid.c +++ b/libc/sysdeps/linux/common/setresuid.c @@ -2,14 +2,17 @@ /* * setresuid() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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 #ifdef __NR_setresuid +libc_hidden_proto(setresuid) + #define __NR___syscall_setresuid __NR_setresuid static inline _syscall3(int, __syscall_setresuid, __kernel_uid_t, rgid, __kernel_uid_t, egid, __kernel_uid_t, sgid); @@ -24,6 +27,5 @@ int setresuid(uid_t ruid, uid_t euid, uid_t suid) } return (__syscall_setresuid(ruid, euid, suid)); } -libc_hidden_proto(setresuid) libc_hidden_def(setresuid) #endif diff --git a/libc/sysdeps/linux/common/setreuid.c b/libc/sysdeps/linux/common/setreuid.c index 93684d047..dcbe4adfe 100644 --- a/libc/sysdeps/linux/common/setreuid.c +++ b/libc/sysdeps/linux/common/setreuid.c @@ -2,14 +2,16 @@ /* * setreuid() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(setreuid) + #define __NR___syscall_setreuid __NR_setreuid static inline _syscall2(int, __syscall_setreuid, __kernel_uid_t, ruid, __kernel_uid_t, euid); @@ -23,5 +25,4 @@ int setreuid(uid_t ruid, uid_t euid) } return (__syscall_setreuid(ruid, euid)); } -libc_hidden_proto(setreuid) libc_hidden_def(setreuid) diff --git a/libc/sysdeps/linux/common/setrlimit.c b/libc/sysdeps/linux/common/setrlimit.c index 08e955e05..2e62a5e1d 100644 --- a/libc/sysdeps/linux/common/setrlimit.c +++ b/libc/sysdeps/linux/common/setrlimit.c @@ -2,19 +2,21 @@ /* * setrlimit() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(setrlimit) #ifndef __NR_ugetrlimit /* Only wrap setrlimit if the new ugetrlimit is not present */ #define __NR___syscall_setrlimit __NR_setrlimit -#include -#include #define RMIN(x, y) ((x) < (y) ? (x) : (y)) static inline _syscall2(int, __syscall_setrlimit, int, resource, const struct rlimit *, rlim); @@ -34,12 +36,7 @@ int setrlimit(__rlimit_resource_t resource, const struct rlimit *rlimits) #undef RMIN #else /* We don't need to wrap setrlimit */ - -#include -struct rlimit; _syscall2(int, setrlimit, unsigned int, resource, const struct rlimit *, rlim); #endif - -libc_hidden_proto(setrlimit) libc_hidden_def(setrlimit) diff --git a/libc/sysdeps/linux/common/setsid.c b/libc/sysdeps/linux/common/setsid.c index 6b63e3a31..042ee43a4 100644 --- a/libc/sysdeps/linux/common/setsid.c +++ b/libc/sysdeps/linux/common/setsid.c @@ -2,13 +2,15 @@ /* * setsid() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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 -_syscall0(pid_t, setsid); + libc_hidden_proto(setsid) + +_syscall0(pid_t, setsid); libc_hidden_def(setsid) diff --git a/libc/sysdeps/linux/common/settimeofday.c b/libc/sysdeps/linux/common/settimeofday.c index 7f4c336a2..2dc2a6a44 100644 --- a/libc/sysdeps/linux/common/settimeofday.c +++ b/libc/sysdeps/linux/common/settimeofday.c @@ -2,14 +2,16 @@ /* * settimeofday() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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 -attribute_hidden _syscall2(int, settimeofday, const struct timeval *, tv, - const struct timezone *, tz); + libc_hidden_proto(settimeofday) + +_syscall2(int, settimeofday, const struct timeval *, tv, + const struct timezone *, tz); libc_hidden_def(settimeofday) diff --git a/libc/sysdeps/linux/common/setuid.c b/libc/sysdeps/linux/common/setuid.c index 237b986ce..b4b2e1bd1 100644 --- a/libc/sysdeps/linux/common/setuid.c +++ b/libc/sysdeps/linux/common/setuid.c @@ -2,9 +2,9 @@ /* * setuid() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/sigaltstack.c b/libc/sysdeps/linux/common/sigaltstack.c index 23ad14689..af087ae57 100644 --- a/libc/sysdeps/linux/common/sigaltstack.c +++ b/libc/sysdeps/linux/common/sigaltstack.c @@ -2,9 +2,9 @@ /* * sigaltstack() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/sigpending.c b/libc/sysdeps/linux/common/sigpending.c index 66513feb6..ea8fc40e6 100644 --- a/libc/sysdeps/linux/common/sigpending.c +++ b/libc/sysdeps/linux/common/sigpending.c @@ -2,9 +2,9 @@ /* * sigpending() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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,14 +12,13 @@ #undef sigpending #ifdef __NR_rt_sigpending -#define __NR___rt_sigpending __NR_rt_sigpending +# define __NR___rt_sigpending __NR_rt_sigpending static inline _syscall2(int, __rt_sigpending, sigset_t *, set, size_t, size); int sigpending(sigset_t * set) { return __rt_sigpending(set, _NSIG / 8); } - #else _syscall1(int, sigpending, sigset_t *, set); #endif diff --git a/libc/sysdeps/linux/common/sigprocmask.c b/libc/sysdeps/linux/common/sigprocmask.c index 6ca040c59..cbaea0f62 100644 --- a/libc/sysdeps/linux/common/sigprocmask.c +++ b/libc/sysdeps/linux/common/sigprocmask.c @@ -2,9 +2,9 @@ /* * sigprocmask() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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,9 +12,11 @@ #undef sigprocmask +libc_hidden_proto(sigprocmask) + #ifdef __NR_rt_sigprocmask -#define __NR___rt_sigprocmask __NR_rt_sigprocmask +# define __NR___rt_sigprocmask __NR_rt_sigprocmask static inline _syscall4(int, __rt_sigprocmask, int, how, const sigset_t *, set, sigset_t *, oldset, size_t, size); @@ -22,13 +24,13 @@ _syscall4(int, __rt_sigprocmask, int, how, const sigset_t *, set, int sigprocmask(int how, const sigset_t * set, sigset_t * oldset) { if (set && -#if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2) +# if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2) (((unsigned int) how) > 2) -#else -#warning "compile time assumption violated.. slow path..." +# else +# warning "compile time assumption violated.. slow path..." ((how != SIG_BLOCK) && (how != SIG_UNBLOCK) && (how != SIG_SETMASK)) -#endif +# endif ) { __set_errno(EINVAL); return -1; @@ -39,7 +41,7 @@ int sigprocmask(int how, const sigset_t * set, sigset_t * oldset) #else -#define __NR___syscall_sigprocmask __NR_sigprocmask +# define __NR___syscall_sigprocmask __NR_sigprocmask static inline _syscall3(int, __syscall_sigprocmask, int, how, const sigset_t *, set, sigset_t *, oldset); @@ -47,13 +49,13 @@ _syscall3(int, __syscall_sigprocmask, int, how, const sigset_t *, set, int sigprocmask(int how, const sigset_t * set, sigset_t * oldset) { if (set && -#if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2) +# if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2) (((unsigned int) how) > 2) -#else -#warning "compile time assumption violated.. slow path..." +# else +# warning "compile time assumption violated.. slow path..." ((how != SIG_BLOCK) && (how != SIG_UNBLOCK) && (how != SIG_SETMASK)) -#endif +# endif ) { __set_errno(EINVAL); return -1; @@ -61,6 +63,4 @@ int sigprocmask(int how, const sigset_t * set, sigset_t * oldset) return (__syscall_sigprocmask(how, set, oldset)); } #endif - -libc_hidden_proto(sigprocmask) libc_hidden_def(sigprocmask) diff --git a/libc/sysdeps/linux/common/sigsuspend.c b/libc/sysdeps/linux/common/sigsuspend.c index be90d7e87..7bc3a59c1 100644 --- a/libc/sysdeps/linux/common/sigsuspend.c +++ b/libc/sysdeps/linux/common/sigsuspend.c @@ -2,17 +2,19 @@ /* * sigsuspend() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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 #undef sigsuspend +libc_hidden_proto(sigsuspend) + #ifdef __NR_rt_sigsuspend -#define __NR___rt_sigsuspend __NR_rt_sigsuspend +# define __NR___rt_sigsuspend __NR_rt_sigsuspend static inline _syscall2(int, __rt_sigsuspend, const sigset_t *, mask, size_t, size); int sigsuspend(const sigset_t * mask) @@ -20,7 +22,7 @@ int sigsuspend(const sigset_t * mask) return __rt_sigsuspend(mask, _NSIG / 8); } #else -#define __NR___syscall_sigsuspend __NR_sigsuspend +# define __NR___syscall_sigsuspend __NR_sigsuspend static inline _syscall3(int, __syscall_sigsuspend, int, a, unsigned long int, b, unsigned long int, c); @@ -29,5 +31,4 @@ int sigsuspend(const sigset_t * set) return __syscall_sigsuspend(0, 0, set->__val[0]); } #endif -libc_hidden_proto(sigsuspend) libc_hidden_def(sigsuspend) diff --git a/libc/sysdeps/linux/common/stat.c b/libc/sysdeps/linux/common/stat.c index 51e353f96..f0fbccbf0 100644 --- a/libc/sysdeps/linux/common/stat.c +++ b/libc/sysdeps/linux/common/stat.c @@ -2,9 +2,9 @@ /* * stat() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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() @@ -18,6 +18,8 @@ #undef stat64 +libc_hidden_proto(stat) + #define __NR___syscall_stat __NR_stat #undef stat static inline _syscall2(int, __syscall_stat, @@ -34,7 +36,6 @@ int stat(const char *file_name, struct stat *buf) } return result; } -libc_hidden_proto(stat) libc_hidden_def(stat) #if ! defined __NR_stat64 && defined __UCLIBC_HAS_LFS__ diff --git a/libc/sysdeps/linux/common/stat64.c b/libc/sysdeps/linux/common/stat64.c index e46cf8a25..54e2b436e 100644 --- a/libc/sysdeps/linux/common/stat64.c +++ b/libc/sysdeps/linux/common/stat64.c @@ -2,18 +2,21 @@ /* * stat64() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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 #if defined __UCLIBC_HAS_LFS__ && defined __NR_stat64 -#define __NR___syscall_stat64 __NR_stat64 -#include -#include -#include "xstatconv.h" +libc_hidden_proto(stat64) + +# define __NR___syscall_stat64 __NR_stat64 +# include +# include +# include "xstatconv.h" static inline _syscall2(int, __syscall_stat64, const char *, file_name, struct kernel_stat64 *, buf); @@ -29,7 +32,5 @@ int stat64(const char *file_name, struct stat64 *buf) } return result; } -libc_hidden_proto(stat64) libc_hidden_def(stat64) - -#endif /* __UCLIBC_HAS_LFS__ */ +#endif diff --git a/libc/sysdeps/linux/common/statfs.c b/libc/sysdeps/linux/common/statfs.c index d931707f4..cc7425f3c 100644 --- a/libc/sysdeps/linux/common/statfs.c +++ b/libc/sysdeps/linux/common/statfs.c @@ -2,9 +2,9 @@ /* * statfs() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(statfs) + #define __NR___syscall_statfs __NR_statfs static inline _syscall2(int, __syscall_statfs, const char *, path, struct statfs *, buf); @@ -20,5 +22,4 @@ int statfs(const char *path, struct statfs * buf) { return __syscall_statfs(path, buf); } -libc_hidden_proto(statfs) libc_hidden_def(statfs) diff --git a/libc/sysdeps/linux/common/swapoff.c b/libc/sysdeps/linux/common/swapoff.c index 8ecb45f85..60df6e473 100644 --- a/libc/sysdeps/linux/common/swapoff.c +++ b/libc/sysdeps/linux/common/swapoff.c @@ -2,9 +2,9 @@ /* * swapoff() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/swapon.c b/libc/sysdeps/linux/common/swapon.c index c3c507e6b..d5a5c235a 100644 --- a/libc/sysdeps/linux/common/swapon.c +++ b/libc/sysdeps/linux/common/swapon.c @@ -2,9 +2,9 @@ /* * swapon() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/symlink.c b/libc/sysdeps/linux/common/symlink.c index efd59405b..3c8c39751 100644 --- a/libc/sysdeps/linux/common/symlink.c +++ b/libc/sysdeps/linux/common/symlink.c @@ -2,9 +2,9 @@ /* * symlink() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/sync.c b/libc/sysdeps/linux/common/sync.c index 8e9850419..7bfea0d70 100644 --- a/libc/sysdeps/linux/common/sync.c +++ b/libc/sysdeps/linux/common/sync.c @@ -2,22 +2,9 @@ /* * sync syscall for uClibc * - * Copyright (C) 2002 by Erik Andersen - * - * 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 diff --git a/libc/sysdeps/linux/common/syscalls.h b/libc/sysdeps/linux/common/syscalls.h index 743ac8a74..d3f7fea51 100644 --- a/libc/sysdeps/linux/common/syscalls.h +++ b/libc/sysdeps/linux/common/syscalls.h @@ -2,22 +2,9 @@ /* * Common header file for uClibc syscalls * - * Copyright (C) 2001-2004 by Erik Andersen + * 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 @@ -30,7 +17,7 @@ #undef __OPTIMIZE__ /* We absolutely do _NOT_ want interfaces silently - * * * renamed under us or very bad things will happen... */ + * being renamed under us or very bad things will happen... */ #ifdef __USE_FILE_OFFSET64 # undef __USE_FILE_OFFSET64 #endif diff --git a/libc/sysdeps/linux/common/sysctl.c b/libc/sysdeps/linux/common/sysctl.c index a1ab9bcc5..8359577bc 100644 --- a/libc/sysdeps/linux/common/sysctl.c +++ b/libc/sysdeps/linux/common/sysctl.c @@ -2,9 +2,9 @@ /* * _sysctl() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/sysfs.c b/libc/sysdeps/linux/common/sysfs.c index 371c08b9e..b3586afdd 100644 --- a/libc/sysdeps/linux/common/sysfs.c +++ b/libc/sysdeps/linux/common/sysfs.c @@ -2,9 +2,9 @@ /* * sysfs() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/sysinfo.c b/libc/sysdeps/linux/common/sysinfo.c index a2668d75d..67673a290 100644 --- a/libc/sysdeps/linux/common/sysinfo.c +++ b/libc/sysdeps/linux/common/sysinfo.c @@ -2,9 +2,9 @@ /* * sysinfo() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/time.c b/libc/sysdeps/linux/common/time.c index a4dc1c742..405954aa3 100644 --- a/libc/sysdeps/linux/common/time.c +++ b/libc/sysdeps/linux/common/time.c @@ -2,14 +2,17 @@ /* * time() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(time) + #ifdef __NR_time _syscall1(time_t, time, time_t *, t); #else @@ -31,5 +34,4 @@ time_t time(time_t * t) return result; } #endif -libc_hidden_proto(time) libc_hidden_def(time) diff --git a/libc/sysdeps/linux/common/times.c b/libc/sysdeps/linux/common/times.c index fa751a03b..178a73fa9 100644 --- a/libc/sysdeps/linux/common/times.c +++ b/libc/sysdeps/linux/common/times.c @@ -2,13 +2,15 @@ /* * times() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(clock_t, times, struct tms *, buf); + libc_hidden_proto(times) + +_syscall1(clock_t, times, struct tms *, buf); libc_hidden_def(times) diff --git a/libc/sysdeps/linux/common/truncate.c b/libc/sysdeps/linux/common/truncate.c index d0b04ebee..08c71fc71 100644 --- a/libc/sysdeps/linux/common/truncate.c +++ b/libc/sysdeps/linux/common/truncate.c @@ -2,13 +2,15 @@ /* * truncate() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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, truncate, const char *, path, __off_t, length); + libc_hidden_proto(truncate) + +_syscall2(int, truncate, const char *, path, __off_t, length); libc_hidden_def(truncate) diff --git a/libc/sysdeps/linux/common/truncate64.c b/libc/sysdeps/linux/common/truncate64.c index df6c9e4d5..59324fd3e 100644 --- a/libc/sysdeps/linux/common/truncate64.c +++ b/libc/sysdeps/linux/common/truncate64.c @@ -1,15 +1,13 @@ /* - * truncate64 syscall. Copes with 64 bit and 32 bit machines + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ +/* truncate64 syscall. Copes with 64 bit and 32 bit machines * and on 32 bit machines this sends things into the kernel as * two 32-bit arguments (high and low 32 bits of length) that * are ordered based on endianess. It turns out endian.h has * just the macro we need to order things, __LONG_LONG_PAIR. - * - * Copyright (C) 2002 Erik Andersen - * - * 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 diff --git a/libc/sysdeps/linux/common/ulimit.c b/libc/sysdeps/linux/common/ulimit.c index 64bb45515..523beae47 100644 --- a/libc/sysdeps/linux/common/ulimit.c +++ b/libc/sysdeps/linux/common/ulimit.c @@ -1,21 +1,8 @@ /* vi: set sw=4 ts=4: */ /* - * Copyright (C) 2003 by Erik Andersen - * - * 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 @@ -28,7 +15,6 @@ # undef __USE_FILE_OFFSET64 #endif - #ifdef __NR_ulimit #include diff --git a/libc/sysdeps/linux/common/umask.c b/libc/sysdeps/linux/common/umask.c index 4a5b33abf..20fb12385 100644 --- a/libc/sysdeps/linux/common/umask.c +++ b/libc/sysdeps/linux/common/umask.c @@ -2,9 +2,9 @@ /* * umask() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/umount.c b/libc/sysdeps/linux/common/umount.c index 158aefc5f..1480b63cd 100644 --- a/libc/sysdeps/linux/common/umount.c +++ b/libc/sysdeps/linux/common/umount.c @@ -2,25 +2,23 @@ /* * umount() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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" - /* arch provides umount() syscall */ #ifdef __NR_umount -#include +# include _syscall1(int, umount, const char *, specialfile); - /* arch provides umount2() syscall */ #elif defined __NR_umount2 -#define __NR___syscall_umount2 __NR_umount2 +# define __NR___syscall_umount2 __NR_umount2 static inline _syscall2(int, __syscall_umount2, const char *, special_file, int, flags); int umount(const char *special_file) @@ -28,7 +26,6 @@ int umount(const char *special_file) return (__syscall_umount2(special_file, 0)); } - /* arch doesn't provide any umount syscall !? */ #else diff --git a/libc/sysdeps/linux/common/umount2.c b/libc/sysdeps/linux/common/umount2.c index 467ec1dbc..b68c4da9c 100644 --- a/libc/sysdeps/linux/common/umount2.c +++ b/libc/sysdeps/linux/common/umount2.c @@ -2,9 +2,9 @@ /* * umount2() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/uname.c b/libc/sysdeps/linux/common/uname.c index 936b862c0..8c51f1f76 100644 --- a/libc/sysdeps/linux/common/uname.c +++ b/libc/sysdeps/linux/common/uname.c @@ -2,13 +2,15 @@ /* * uname() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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, uname, struct utsname *, buf); + libc_hidden_proto(uname) + +_syscall1(int, uname, struct utsname *, buf); libc_hidden_def(uname) diff --git a/libc/sysdeps/linux/common/unlink.c b/libc/sysdeps/linux/common/unlink.c index 37c145226..1ecefd70d 100644 --- a/libc/sysdeps/linux/common/unlink.c +++ b/libc/sysdeps/linux/common/unlink.c @@ -2,13 +2,15 @@ /* * unlink() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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, unlink, const char *, pathname); + libc_hidden_proto(unlink) + +_syscall1(int, unlink, const char *, pathname); libc_hidden_def(unlink) diff --git a/libc/sysdeps/linux/common/uselib.c b/libc/sysdeps/linux/common/uselib.c index b0b84a775..952169f90 100644 --- a/libc/sysdeps/linux/common/uselib.c +++ b/libc/sysdeps/linux/common/uselib.c @@ -2,9 +2,9 @@ /* * uselib() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/ustat.c b/libc/sysdeps/linux/common/ustat.c index 4ee1c41d1..73e74e8e1 100644 --- a/libc/sysdeps/linux/common/ustat.c +++ b/libc/sysdeps/linux/common/ustat.c @@ -2,9 +2,9 @@ /* * ustat() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/utime.c b/libc/sysdeps/linux/common/utime.c index a01da3697..5641cc6f0 100644 --- a/libc/sysdeps/linux/common/utime.c +++ b/libc/sysdeps/linux/common/utime.c @@ -2,13 +2,16 @@ /* * utime() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(utime) + #ifdef __NR_utime attribute_hidden _syscall2(int, utime, const char *, file, const struct utimbuf *, times); #else @@ -36,5 +39,4 @@ int utime(const char *file, const struct utimbuf *times) return utimes(file, timevals); } #endif -libc_hidden_proto(utime) libc_hidden_def(utime) diff --git a/libc/sysdeps/linux/common/utimes.c b/libc/sysdeps/linux/common/utimes.c index 4dfcfb30a..55f60d8c1 100644 --- a/libc/sysdeps/linux/common/utimes.c +++ b/libc/sysdeps/linux/common/utimes.c @@ -2,13 +2,17 @@ /* * utimes() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(utimes) + #ifdef __NR_utimes _syscall2(int, utimes, const char *, file, const struct timeval *, tvp); #else @@ -31,5 +35,4 @@ int utimes(const char *file, const struct timeval tvp[2]) return utime(file, times); } #endif -libc_hidden_proto(utimes) libc_hidden_def(utimes) diff --git a/libc/sysdeps/linux/common/vfork.c b/libc/sysdeps/linux/common/vfork.c index df00b27c3..b4dc2288f 100644 --- a/libc/sysdeps/linux/common/vfork.c +++ b/libc/sysdeps/linux/common/vfork.c @@ -2,11 +2,12 @@ #include #include +libc_hidden_proto(vfork) + libc_hidden_proto(fork) pid_t vfork(void) { return fork(); } -libc_hidden_proto(vfork) libc_hidden_def(vfork) diff --git a/libc/sysdeps/linux/common/vhangup.c b/libc/sysdeps/linux/common/vhangup.c index 5ff243916..f6dc0865f 100644 --- a/libc/sysdeps/linux/common/vhangup.c +++ b/libc/sysdeps/linux/common/vhangup.c @@ -2,9 +2,9 @@ /* * vhangup() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/wait4.c b/libc/sysdeps/linux/common/wait4.c index 9acca8ff8..9d9de58d6 100644 --- a/libc/sysdeps/linux/common/wait4.c +++ b/libc/sysdeps/linux/common/wait4.c @@ -2,14 +2,17 @@ /* * wait4() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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(wait4) + #define __NR___syscall_wait4 __NR_wait4 static inline _syscall4(int, __syscall_wait4, __kernel_pid_t, pid, int *, status, int, opts, struct rusage *, rusage); @@ -18,5 +21,4 @@ pid_t wait4(pid_t pid, int *status, int opts, struct rusage *rusage) { return (__syscall_wait4(pid, status, opts, rusage)); } -libc_hidden_proto(wait4) libc_hidden_def(wait4) diff --git a/libc/sysdeps/linux/common/write.c b/libc/sysdeps/linux/common/write.c index 814e68cc6..e27bfe06f 100644 --- a/libc/sysdeps/linux/common/write.c +++ b/libc/sysdeps/linux/common/write.c @@ -2,9 +2,9 @@ /* * write() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/writev.c b/libc/sysdeps/linux/common/writev.c index 4979fade9..4efff02fb 100644 --- a/libc/sysdeps/linux/common/writev.c +++ b/libc/sysdeps/linux/common/writev.c @@ -2,9 +2,9 @@ /* * writev() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen + * 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/xattr.c b/libc/sysdeps/linux/common/xattr.c index 556cd1a57..259ccc155 100644 --- a/libc/sysdeps/linux/common/xattr.c +++ b/libc/sysdeps/linux/common/xattr.c @@ -1,8 +1,10 @@ /* - * Distributed under the terms of the GNU General Public License v2 - * $Header: /var/cvs/uClibc/libc/sysdeps/linux/common/xattr.c,v 1.2 2004/12/22 19:53:11 andersen Exp $ + * Copyright (C) 2004 + * Copyright (C) 2000-2006 Erik Andersen * - * This file provides the following Extended Attribute system calls to uClibc. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ +/* This file provides the following Extended Attribute system calls to uClibc. * * setxattr(), lsetxattr(), fsetxattr(), * getxattr(), lgetxattr(), fgetxattr(), diff --git a/libc/sysdeps/linux/cris/__longjmp.S b/libc/sysdeps/linux/cris/__longjmp.S index 98472a673..a4a5d4994 100644 --- a/libc/sysdeps/linux/cris/__longjmp.S +++ b/libc/sysdeps/linux/cris/__longjmp.S @@ -17,6 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #define _SETJMP_H #define _ASM @@ -35,6 +36,5 @@ ENTRY (__longjmp) movem [$r10],$pc END (__longjmp) - .weak longjmp - longjmp = __longjmp - +libc_hidden_def(__longjmp) +strong_alias(__longjmp,longjmp) diff --git a/libc/sysdeps/linux/cris/brk.c b/libc/sysdeps/linux/cris/brk.c index 8b5aa680c..42a3b6de3 100644 --- a/libc/sysdeps/linux/cris/brk.c +++ b/libc/sysdeps/linux/cris/brk.c @@ -1,8 +1,16 @@ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + #include #include #include #include "sysdep.h" +libc_hidden_proto(brk) + extern void * __curbrk; extern int __init_brk (void); @@ -29,5 +37,4 @@ int brk(void * end_data_seg) return -1; } -libc_hidden_proto(brk) libc_hidden_def(brk) diff --git a/libc/sysdeps/linux/cris/fork.c b/libc/sysdeps/linux/cris/fork.c index 11b546127..53c071e5c 100644 --- a/libc/sysdeps/linux/cris/fork.c +++ b/libc/sysdeps/linux/cris/fork.c @@ -1,3 +1,9 @@ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + #include #define __NR___libc_fork __NR_fork diff --git a/libc/sysdeps/linux/cris/sbrk.c b/libc/sysdeps/linux/cris/sbrk.c index 9eb9a2a0e..04c4b5b0a 100644 --- a/libc/sysdeps/linux/cris/sbrk.c +++ b/libc/sysdeps/linux/cris/sbrk.c @@ -1,10 +1,17 @@ /* From libc-5.3.12 */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include #include #include "sysdep.h" +libc_hidden_proto(sbrk) + extern void * __curbrk; extern int __init_brk (void); @@ -34,5 +41,4 @@ sbrk(intptr_t increment) } return ((void *) -1); } -libc_hidden_proto(sbrk) libc_hidden_def(sbrk) diff --git a/libc/sysdeps/linux/e1/longjmp.c b/libc/sysdeps/linux/e1/longjmp.c index 306638937..e628bd7e0 100644 --- a/libc/sysdeps/linux/e1/longjmp.c +++ b/libc/sysdeps/linux/e1/longjmp.c @@ -1,6 +1,9 @@ -/* This file is lisenced under LGPL - * Copyright (C) 2002-2003, George Thanos - * Yannis Mitsos +/* + * Copyright (C) 2002-2003, George Thanos + * Yannis Mitsos + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #include diff --git a/libc/sysdeps/linux/e1/vfork.c b/libc/sysdeps/linux/e1/vfork.c index ec9961d62..36f176acb 100644 --- a/libc/sysdeps/linux/e1/vfork.c +++ b/libc/sysdeps/linux/e1/vfork.c @@ -1,5 +1,14 @@ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + #include #include #include +libc_hidden_proto(vfork) + _syscall0(pid_t, vfork); +libc_hidden_def(vfork) diff --git a/libc/sysdeps/linux/frv/__longjmp.S b/libc/sysdeps/linux/frv/__longjmp.S index a61f8d4e0..c3145c84f 100644 --- a/libc/sysdeps/linux/frv/__longjmp.S +++ b/libc/sysdeps/linux/frv/__longjmp.S @@ -1,3 +1,9 @@ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + #define _SETJMP_H #define _ASM #include @@ -73,3 +79,5 @@ __longjmp: ret .Lend2: .size __longjmp,.Lend2-__longjmp + +libc_hidden_def(__longjmp) diff --git a/libc/sysdeps/linux/frv/brk.c b/libc/sysdeps/linux/frv/brk.c index 443c03b25..9af08c37d 100644 --- a/libc/sysdeps/linux/frv/brk.c +++ b/libc/sysdeps/linux/frv/brk.c @@ -1,9 +1,16 @@ /* From libc-5.3.12 */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include #include +libc_hidden_proto(brk) + extern void * __curbrk; extern int __init_brk (void); @@ -20,5 +27,4 @@ int brk(void * end_data_seg) } return -1; } -libc_hidden_proto(brk) libc_hidden_def(brk) diff --git a/libc/sysdeps/linux/frv/fstat.c b/libc/sysdeps/linux/frv/fstat.c index bf031bbbc..92c8df9d2 100644 --- a/libc/sysdeps/linux/frv/fstat.c +++ b/libc/sysdeps/linux/frv/fstat.c @@ -1,24 +1,12 @@ /* * Syscalls for uClibc * - * Copyright (C) 2001-2003 by Erik Andersen - * Extracted from ../common/syscalls.c by Erik Andersen - * Adapted to FR-V by Alexandre Oliva - * - * 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. + */ +/* Extracted from ../common/syscalls.c by Erik Andersen + * Adapted to FR-V by Alexandre Oliva */ #define _GNU_SOURCE @@ -41,7 +29,7 @@ #include #define __NR___syscall_fstat __NR_fstat -attribute_hidden _syscall2(int, __syscall_fstat, int, fd, struct stat *, buf); +static inline _syscall2(int, __syscall_fstat, int, fd, struct stat *, buf); strong_alias(__syscall_fstat,fstat) libc_hidden_proto(fstat) libc_hidden_def(fstat) diff --git a/libc/sysdeps/linux/frv/fstat64.c b/libc/sysdeps/linux/frv/fstat64.c index 744c5915a..ff7f2397f 100644 --- a/libc/sysdeps/linux/frv/fstat64.c +++ b/libc/sysdeps/linux/frv/fstat64.c @@ -1,24 +1,12 @@ /* * Syscalls for uClibc * - * Copyright (C) 2001-2003 by Erik Andersen - * Extracted from ../common/syscalls.c by Erik Andersen - * Adapted to FR-V by Alexandre Oliva - * - * 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. + */ +/* Extracted from ../common/syscalls.c by Erik Andersen + * Adapted to FR-V by Alexandre Oliva */ #define _GNU_SOURCE @@ -42,7 +30,7 @@ #if defined __UCLIBC_HAS_LFS__ #define __NR___syscall_fstat64 __NR_fstat64 -attribute_hidden _syscall2(int, __syscall_fstat64, int, fd, struct stat64 *, buf); +static inline _syscall2(int, __syscall_fstat64, int, fd, struct stat64 *, buf); strong_alias(__syscall_fstat64,fstat64) libc_hidden_proto(fstat64) libc_hidden_def(fstat64) diff --git a/libc/sysdeps/linux/frv/lstat.c b/libc/sysdeps/linux/frv/lstat.c index 63c547c1b..3170e79fb 100644 --- a/libc/sysdeps/linux/frv/lstat.c +++ b/libc/sysdeps/linux/frv/lstat.c @@ -1,24 +1,12 @@ /* * Syscalls for uClibc * - * Copyright (C) 2001-2003 by Erik Andersen - * Extracted from ../common/syscalls.c by Erik Andersen - * Adapted to FR-V by Alexandre Oliva - * - * 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. + */ +/* Extracted from ../common/syscalls.c by Erik Andersen + * Adapted to FR-V by Alexandre Oliva */ #define _GNU_SOURCE @@ -41,7 +29,7 @@ #include #define __NR___syscall_lstat __NR_lstat -attribute_hidden _syscall2(int, __syscall_lstat, const char *, file_name, struct stat *, buf); +static inline _syscall2(int, __syscall_lstat, const char *, file_name, struct stat *, buf); strong_alias(__syscall_lstat,lstat) libc_hidden_proto(lstat) libc_hidden_def(lstat) diff --git a/libc/sysdeps/linux/frv/lstat64.c b/libc/sysdeps/linux/frv/lstat64.c index ea8abf892..969ef8d65 100644 --- a/libc/sysdeps/linux/frv/lstat64.c +++ b/libc/sysdeps/linux/frv/lstat64.c @@ -1,24 +1,12 @@ /* * Syscalls for uClibc * - * Copyright (C) 2001-2003 by Erik Andersen - * Extracted from ../common/syscalls.c by Erik Andersen - * Adapted to FR-V by Alexandre Oliva - * - * 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. + */ +/* Extracted from ../common/syscalls.c by Erik Andersen + * Adapted to FR-V by Alexandre Oliva */ #define _GNU_SOURCE @@ -42,7 +30,7 @@ #if defined __UCLIBC_HAS_LFS__ #define __NR___syscall_lstat64 __NR_lstat64 -attribute_hidden _syscall2(int, __syscall_lstat64, const char *, file_name, struct stat64 *, buf); +static inline _syscall2(int, __syscall_lstat64, const char *, file_name, struct stat64 *, buf); strong_alias(__syscall_lstat64,lstat64) libc_hidden_proto(lstat64) libc_hidden_def(lstat64) diff --git a/libc/sysdeps/linux/frv/mmap.c b/libc/sysdeps/linux/frv/mmap.c index 01dcfb627..d4cfcb062 100644 --- a/libc/sysdeps/linux/frv/mmap.c +++ b/libc/sysdeps/linux/frv/mmap.c @@ -29,6 +29,8 @@ #include #include +libc_hidden_proto(mmap) + #define __NR___syscall_mmap2 __NR_mmap2 static inline _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr, size_t, len, int, prot, int, flags, int, fd, off_t, offset); @@ -46,5 +48,4 @@ __ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offs } return(__syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT))); } -libc_hidden_proto(mmap) libc_hidden_def(mmap) diff --git a/libc/sysdeps/linux/frv/sbrk.c b/libc/sysdeps/linux/frv/sbrk.c index 7ccefdf58..343dc14fb 100644 --- a/libc/sysdeps/linux/frv/sbrk.c +++ b/libc/sysdeps/linux/frv/sbrk.c @@ -4,6 +4,8 @@ #include #include +libc_hidden_proto(sbrk) + extern void * __curbrk; extern int __init_brk (void); @@ -23,5 +25,4 @@ sbrk(intptr_t increment) } return ((void *) -1); } -libc_hidden_proto(sbrk) libc_hidden_def(sbrk) diff --git a/libc/sysdeps/linux/frv/stat.c b/libc/sysdeps/linux/frv/stat.c index 0d531e998..82e3cfa8b 100644 --- a/libc/sysdeps/linux/frv/stat.c +++ b/libc/sysdeps/linux/frv/stat.c @@ -1,24 +1,12 @@ /* * Syscalls for uClibc * - * Copyright (C) 2001-2003 by Erik Andersen - * Extracted from ../common/syscalls.c by Erik Andersen - * Adapted to FR-V by Alexandre Oliva - * - * 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. + */ +/* Extracted from ../common/syscalls.c by Erik Andersen + * Adapted to FR-V by Alexandre Oliva */ #define _GNU_SOURCE @@ -41,7 +29,7 @@ #include #define __NR___syscall_stat __NR_stat -attribute_hidden _syscall2(int, __syscall_stat, const char *, file_name, struct stat *, buf); +static inline _syscall2(int, __syscall_stat, const char *, file_name, struct stat *, buf); strong_alias(__syscall_stat,stat) libc_hidden_proto(stat) libc_hidden_def(stat) diff --git a/libc/sysdeps/linux/frv/stat64.c b/libc/sysdeps/linux/frv/stat64.c index 3c702d885..b10e66d8a 100644 --- a/libc/sysdeps/linux/frv/stat64.c +++ b/libc/sysdeps/linux/frv/stat64.c @@ -1,24 +1,12 @@ /* * Syscalls for uClibc * - * Copyright (C) 2001-2003 by Erik Andersen - * Extracted from ../common/syscalls.c by Erik Andersen - * Adapted to FR-V by Alexandre Oliva - * - * 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. + */ +/* Extracted from ../common/syscalls.c by Erik Andersen + * Adapted to FR-V by Alexandre Oliva */ #define _GNU_SOURCE @@ -42,7 +30,7 @@ #if defined __UCLIBC_HAS_LFS__ #define __NR___syscall_stat64 __NR_stat64 -attribute_hidden _syscall2(int, __syscall_stat64, const char *, file_name, struct stat64 *, buf); +static inline _syscall2(int, __syscall_stat64, const char *, file_name, struct stat64 *, buf); strong_alias(__syscall_stat64,stat64) libc_hidden_proto(stat64) libc_hidden_def(stat64) diff --git a/libc/sysdeps/linux/h8300/brk.c b/libc/sysdeps/linux/h8300/brk.c index 0bba5de99..0da4286e7 100644 --- a/libc/sysdeps/linux/h8300/brk.c +++ b/libc/sysdeps/linux/h8300/brk.c @@ -1,14 +1,19 @@ /* brk on H8/300 by ysato */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include #include +libc_hidden_proto(brk) /* This must be initialized data because commons can't have aliases. */ void *__curbrk = 0; - int brk (void *addr) { void *newbrk; @@ -31,5 +36,4 @@ int brk (void *addr) return 0; } -libc_hidden_proto(brk) libc_hidden_def(brk) diff --git a/libc/sysdeps/linux/h8300/vfork.S b/libc/sysdeps/linux/h8300/vfork.S index 94e946912..343bb0183 100644 --- a/libc/sysdeps/linux/h8300/vfork.S +++ b/libc/sysdeps/linux/h8300/vfork.S @@ -37,5 +37,3 @@ fix_errno: sub.l er0,er0 dec.l #1,er0 jmp @er1 /* don't return, just jmp directly */ - -libc_hidden_def(_vork) diff --git a/libc/sysdeps/linux/hppa/__syscall_error.c b/libc/sysdeps/linux/hppa/__syscall_error.c index de65a1f39..4e7a2b3a2 100644 --- a/libc/sysdeps/linux/hppa/__syscall_error.c +++ b/libc/sysdeps/linux/hppa/__syscall_error.c @@ -1,21 +1,9 @@ /* Wrapper for setting errno. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include diff --git a/libc/sysdeps/linux/hppa/brk.c b/libc/sysdeps/linux/hppa/brk.c index 0ac8236c8..a5a35050f 100644 --- a/libc/sysdeps/linux/hppa/brk.c +++ b/libc/sysdeps/linux/hppa/brk.c @@ -20,6 +20,8 @@ #include #include +libc_hidden_proto(brk) + /* This must be initialized data because commons can't have aliases. */ void *__curbrk = 0; @@ -38,5 +40,4 @@ brk (void *addr) return 0; } -libc_hidden_proto(brk) libc_hidden_def(brk) diff --git a/libc/sysdeps/linux/hppa/mmap.c b/libc/sysdeps/linux/hppa/mmap.c index b69f0a2f2..baaee6847 100644 --- a/libc/sysdeps/linux/hppa/mmap.c +++ b/libc/sysdeps/linux/hppa/mmap.c @@ -2,10 +2,10 @@ /* * mmap() for uClibc/x86_64 * - * Copyright (C) 2005 by Erik Andersen + * Copyright (C) 2000-2006 Erik Andersen * Copyright (C) 2005 by Mike Frysinger * - * 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 @@ -13,7 +13,8 @@ #include #include +libc_hidden_proto(mmap) + _syscall6(void *, mmap, void *, start, size_t, length, int, prot, int, flags, int, fd, off_t, offset); -libc_hidden_proto(mmap) libc_hidden_def(mmap) diff --git a/libc/sysdeps/linux/i386/__syscall_error.c b/libc/sysdeps/linux/i386/__syscall_error.c index 133500cb6..94302e6bd 100644 --- a/libc/sysdeps/linux/i386/__syscall_error.c +++ b/libc/sysdeps/linux/i386/__syscall_error.c @@ -1,24 +1,8 @@ /* Wrapper for setting errno. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include -#include + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ /* This routine is jumped to by all the syscall handlers, to stash * an error number into errno. */ @@ -36,6 +20,10 @@ * We have to stash the errno from %eax in a local stack var because * __set_errno will prob call a function thus clobbering %eax on us. */ + +#include +#include + int attribute_hidden __syscall_error(void) { register int edx asm("%edx"); diff --git a/libc/sysdeps/linux/i386/brk.c b/libc/sysdeps/linux/i386/brk.c index cf7e19be8..1b3128f9c 100644 --- a/libc/sysdeps/linux/i386/brk.c +++ b/libc/sysdeps/linux/i386/brk.c @@ -21,6 +21,7 @@ #include #include +libc_hidden_proto(brk) /* This must be initialized data because commons can't have aliases. */ void *__curbrk = 0; @@ -46,5 +47,4 @@ int brk (void *addr) return 0; } -libc_hidden_proto(brk) libc_hidden_def(brk) diff --git a/libc/sysdeps/linux/m68k/__syscall_error.c b/libc/sysdeps/linux/m68k/__syscall_error.c index d6ac82c12..b68298074 100644 --- a/libc/sysdeps/linux/m68k/__syscall_error.c +++ b/libc/sysdeps/linux/m68k/__syscall_error.c @@ -1,21 +1,9 @@ /* Wrapper for setting errno. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include diff --git a/libc/sysdeps/linux/m68k/brk.c b/libc/sysdeps/linux/m68k/brk.c index 5204c7493..cad5976de 100644 --- a/libc/sysdeps/linux/m68k/brk.c +++ b/libc/sysdeps/linux/m68k/brk.c @@ -1,9 +1,16 @@ /* consider this code LGPL - davidm */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include #include +libc_hidden_proto(brk) + /* This must be initialized data because commons can't have aliases. */ void * __curbrk = 0; @@ -28,5 +35,4 @@ int brk (void *addr) return 0; } -libc_hidden_proto(brk) libc_hidden_def(brk) diff --git a/libc/sysdeps/linux/m68k/ptrace.c b/libc/sysdeps/linux/m68k/ptrace.c index e595a6ecd..43487546e 100644 --- a/libc/sysdeps/linux/m68k/ptrace.c +++ b/libc/sysdeps/linux/m68k/ptrace.c @@ -1,3 +1,8 @@ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include diff --git a/libc/sysdeps/linux/m68k/vfork.S b/libc/sysdeps/linux/m68k/vfork.S index d5e26ddd2..ec319d077 100644 --- a/libc/sysdeps/linux/m68k/vfork.S +++ b/libc/sysdeps/linux/m68k/vfork.S @@ -1,3 +1,9 @@ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + #include #include diff --git a/libc/sysdeps/linux/microblaze/__longjmp.S b/libc/sysdeps/linux/microblaze/__longjmp.S index a58418ae9..e87a6f6a3 100644 --- a/libc/sysdeps/linux/microblaze/__longjmp.S +++ b/libc/sysdeps/linux/microblaze/__longjmp.S @@ -45,5 +45,3 @@ C_END(__longjmp) .weak C_SYMBOL_NAME(__sigprocmask) C_SYMBOL_NAME(__sigprocmask) = C_SYMBOL_NAME(sigprocmask) - -libc_hidden_def(__longjmp) diff --git a/libc/sysdeps/linux/microblaze/mmap.c b/libc/sysdeps/linux/microblaze/mmap.c index 592161789..cad528d17 100644 --- a/libc/sysdeps/linux/microblaze/mmap.c +++ b/libc/sysdeps/linux/microblaze/mmap.c @@ -1,11 +1,17 @@ /* Use new style mmap for microblaze */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include #include #include +libc_hidden_proto(mmap) + _syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot, int, flags, int, fd, __off_t, offset); -libc_hidden_proto(mmap) libc_hidden_def(mmap) diff --git a/libc/sysdeps/linux/microblaze/vfork.S b/libc/sysdeps/linux/microblaze/vfork.S index b641fedf1..a82fbb209 100644 --- a/libc/sysdeps/linux/microblaze/vfork.S +++ b/libc/sysdeps/linux/microblaze/vfork.S @@ -40,5 +40,3 @@ C_ENTRY (vfork): rtsd r15, 8 // error return nop C_END(vfork) - -libc_hidden_def(vfork) diff --git a/libc/sysdeps/linux/mips/__longjmp.c b/libc/sysdeps/linux/mips/__longjmp.c index fb042218b..acb8d2313 100644 --- a/libc/sysdeps/linux/mips/__longjmp.c +++ b/libc/sysdeps/linux/mips/__longjmp.c @@ -23,6 +23,8 @@ #undef __longjmp +libc_hidden_proto(__longjmp) + #ifndef __GNUC__ #error This file uses GNU C extensions; you must compile with GCC. #endif @@ -82,5 +84,4 @@ void __longjmp (__jmp_buf env, int val_arg) /* Avoid `volatile function does return' warnings. */ for (;;); } -libc_hidden_proto(__longjmp) libc_hidden_def(__longjmp) diff --git a/libc/sysdeps/linux/mips/__syscall_error.c b/libc/sysdeps/linux/mips/__syscall_error.c index de65a1f39..4e7a2b3a2 100644 --- a/libc/sysdeps/linux/mips/__syscall_error.c +++ b/libc/sysdeps/linux/mips/__syscall_error.c @@ -1,21 +1,9 @@ /* Wrapper for setting errno. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include diff --git a/libc/sysdeps/linux/mips/brk.c b/libc/sysdeps/linux/mips/brk.c index 29479f621..cf48288f4 100644 --- a/libc/sysdeps/linux/mips/brk.c +++ b/libc/sysdeps/linux/mips/brk.c @@ -21,6 +21,8 @@ #include #include +libc_hidden_proto(brk) + void *__curbrk = 0; int brk (void *addr) @@ -48,5 +50,4 @@ int brk (void *addr) return 0; } -libc_hidden_proto(brk) libc_hidden_def(brk) diff --git a/libc/sysdeps/linux/mips/cacheflush.c b/libc/sysdeps/linux/mips/cacheflush.c index 18d7e467c..cd23e98d0 100644 --- a/libc/sysdeps/linux/mips/cacheflush.c +++ b/libc/sysdeps/linux/mips/cacheflush.c @@ -21,6 +21,6 @@ #include _syscall3(int, cacheflush, void *, addr, const int, nbytes, const int, op); -weak_alias(cacheflush, _flush_cache) +strong_alias(cacheflush, _flush_cache) _syscall3(int, cachectl, void *, addr, const int, nbytes, const int, op); diff --git a/libc/sysdeps/linux/mips/mmap.c b/libc/sysdeps/linux/mips/mmap.c index 125523eef..4e0897f45 100644 --- a/libc/sysdeps/linux/mips/mmap.c +++ b/libc/sysdeps/linux/mips/mmap.c @@ -1,9 +1,17 @@ /* Use new style mmap for mips */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + #include #include #include #include +libc_hidden_proto(mmap) + #if 0 /* For now, leave mmap using mmap1 since mmap2 seems * to have issues (i.e. it doesn't work 100% properly). @@ -16,5 +24,4 @@ _syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot, int, flags, int, fd, __off_t, offset); -libc_hidden_proto(mmap) libc_hidden_def(mmap) diff --git a/libc/sysdeps/linux/mips/pipe.S b/libc/sysdeps/linux/mips/pipe.S index 093b4dddc..e58b530dc 100644 --- a/libc/sysdeps/linux/mips/pipe.S +++ b/libc/sysdeps/linux/mips/pipe.S @@ -1,4 +1,9 @@ /* pipe system call for Linux/MIPS */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ /*see uClibc's sh/pipe.c and glibc-2.2.4's mips/pipe.S */ diff --git a/libc/sysdeps/linux/mips/pipe.c b/libc/sysdeps/linux/mips/pipe.c index a4a7e9da1..bfca4b60d 100644 --- a/libc/sysdeps/linux/mips/pipe.c +++ b/libc/sysdeps/linux/mips/pipe.c @@ -1,11 +1,17 @@ /* pipe system call for Linux/MIPS */ - +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ /*see uClibc's sh/pipe.c and glibc-2.2.4's mips/pipe.S */ #include #include #include +libc_hidden_proto(pipe) + int pipe(int *fd) { register long int res __asm__ ("$2"); // v0 @@ -21,5 +27,4 @@ int pipe(int *fd) fd[1] = res2; return(0); } -libc_hidden_proto(pipe) libc_hidden_def(pipe) diff --git a/libc/sysdeps/linux/mips/pread_write.c b/libc/sysdeps/linux/mips/pread_write.c index 4ee81d4d9..3ae4a98b7 100644 --- a/libc/sysdeps/linux/mips/pread_write.c +++ b/libc/sysdeps/linux/mips/pread_write.c @@ -1,26 +1,15 @@ /* vi: set sw=4 ts=4: * - * Copyright (C) 2002 by Erik Andersen - * Based in part on the files + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ +/* Based in part on the files * ./sysdeps/unix/sysv/linux/pwrite.c, * ./sysdeps/unix/sysv/linux/pread.c, * sysdeps/posix/pread.c * sysdeps/posix/pwrite.c * from GNU libc 2.2.5, but reworked considerably... - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License - * for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define _GNU_SOURCE diff --git a/libc/sysdeps/linux/nios/brk.c b/libc/sysdeps/linux/nios/brk.c index 9c9f2d80f..2c252f90c 100644 --- a/libc/sysdeps/linux/nios/brk.c +++ b/libc/sysdeps/linux/nios/brk.c @@ -21,6 +21,7 @@ #include #include +libc_hidden_proto(brk) /* This must be initialized data because commons can't have aliases. */ void *__curbrk = 0; @@ -42,5 +43,4 @@ int brk (void *addr) return 0; } -libc_hidden_proto(brk) libc_hidden_def(brk) diff --git a/libc/sysdeps/linux/nios2/brk.c b/libc/sysdeps/linux/nios2/brk.c index 921cd771b..0e5811cee 100644 --- a/libc/sysdeps/linux/nios2/brk.c +++ b/libc/sysdeps/linux/nios2/brk.c @@ -21,6 +21,7 @@ #include #include +libc_hidden_proto(brk) /* This must be initialized data because commons can't have aliases. */ void *__curbrk = 0; @@ -44,5 +45,4 @@ int brk (void *addr) return 0; } -libc_hidden_proto(brk) libc_hidden_def(brk) diff --git a/libc/sysdeps/linux/nios2/clone.c b/libc/sysdeps/linux/nios2/clone.c index 0555658b4..6bb79ade5 100644 --- a/libc/sysdeps/linux/nios2/clone.c +++ b/libc/sysdeps/linux/nios2/clone.c @@ -1,14 +1,14 @@ /* * libc/sysdeps/linux/nios2/clone.c -- `clone' syscall for linux/nios2 + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ * * Copyright (C) 2004,05 Microtronix Datacom Ltd * Copyright (C) 2002,03 NEC Electronics Corporation * Copyright (C) 2002,03 Miles Bader * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License. See the file COPYING.LIB in the main - * directory of this archive for more details. - * * Written by Miles Bader * Nios2 port by Wentao Xu */ diff --git a/libc/sysdeps/linux/powerpc/__syscall_error.c b/libc/sysdeps/linux/powerpc/__syscall_error.c index de65a1f39..4e7a2b3a2 100644 --- a/libc/sysdeps/linux/powerpc/__syscall_error.c +++ b/libc/sysdeps/linux/powerpc/__syscall_error.c @@ -1,21 +1,9 @@ /* Wrapper for setting errno. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include diff --git a/libc/sysdeps/linux/powerpc/ioctl.c b/libc/sysdeps/linux/powerpc/ioctl.c index 211bb3b25..7f92be410 100644 --- a/libc/sysdeps/linux/powerpc/ioctl.c +++ b/libc/sysdeps/linux/powerpc/ioctl.c @@ -22,6 +22,8 @@ #include #include +libc_hidden_proto(ioctl) + libc_hidden_proto(tcsetattr) libc_hidden_proto(tcgetattr) @@ -69,5 +71,4 @@ int ioctl (int fd, unsigned long int request, ...) return result; } -libc_hidden_proto(ioctl) libc_hidden_def(ioctl) diff --git a/libc/sysdeps/linux/powerpc/mmap.c b/libc/sysdeps/linux/powerpc/mmap.c index 8003c8bbc..62c97c1c5 100644 --- a/libc/sysdeps/linux/powerpc/mmap.c +++ b/libc/sysdeps/linux/powerpc/mmap.c @@ -1,9 +1,16 @@ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include #include #include +libc_hidden_proto(mmap) + #define __syscall_clobbers \ "r9", "r10", "r11", "r12" #define __syscall_return(type) \ @@ -45,5 +52,4 @@ void * mmap(void *start, size_t length, int prot, int flags, int fd, __syscall_return (void *); } -libc_hidden_proto(mmap) libc_hidden_def(mmap) diff --git a/libc/sysdeps/linux/powerpc/pread_write.c b/libc/sysdeps/linux/powerpc/pread_write.c index 1cf7f690b..b8d0caef4 100644 --- a/libc/sysdeps/linux/powerpc/pread_write.c +++ b/libc/sysdeps/linux/powerpc/pread_write.c @@ -1,26 +1,15 @@ /* vi: set sw=4 ts=4: * - * Copyright (C) 2002 by Erik Andersen - * Based in part on the files + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ +/* Based in part on the files * ./sysdeps/unix/sysv/linux/pwrite.c, * ./sysdeps/unix/sysv/linux/pread.c, * sysdeps/posix/pread.c * sysdeps/posix/pwrite.c * from GNU libc 2.2.5, but reworked considerably... - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License - * for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define _GNU_SOURCE @@ -86,10 +75,10 @@ strong_alias(__libc_pwrite64,pwrite64) #if ! defined __NR_pread || ! defined __NR_pwrite -libc_hidden_proto(lseek) -libc_hidden_proto(lseek64) libc_hidden_proto(read) libc_hidden_proto(write) +libc_hidden_proto(lseek) +libc_hidden_proto(lseek64) static ssize_t __fake_pread_write(int fd, void *buf, size_t count, off_t offset, int do_pwrite) diff --git a/libc/sysdeps/linux/powerpc/vfork.c b/libc/sysdeps/linux/powerpc/vfork.c index 92e9f8d63..16d66bd24 100644 --- a/libc/sysdeps/linux/powerpc/vfork.c +++ b/libc/sysdeps/linux/powerpc/vfork.c @@ -3,6 +3,8 @@ #include #include +libc_hidden_proto(vfork) + #define __syscall_clobbers \ "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12" #define __syscall_return(type) \ @@ -46,5 +48,4 @@ pid_t vfork(void) __syscall_return (pid_t); } -libc_hidden_proto(vfork) libc_hidden_def(vfork) diff --git a/libc/sysdeps/linux/sh/__longjmp.S b/libc/sysdeps/linux/sh/__longjmp.S index a9a7cba8a..a3151239e 100644 --- a/libc/sysdeps/linux/sh/__longjmp.S +++ b/libc/sysdeps/linux/sh/__longjmp.S @@ -64,5 +64,7 @@ __longjmp: .size __longjmp,.-__longjmp libc_hidden_def(__longjmp) +/* sigprocmask is not defined here, why the weak then ?*/ +/* it should rather be libc_hidden_def(sigprocmask) if needed */ .weak __sigprocmask __sigprocmask = sigprocmask diff --git a/libc/sysdeps/linux/sh/brk.c b/libc/sysdeps/linux/sh/brk.c index 443c03b25..9af08c37d 100644 --- a/libc/sysdeps/linux/sh/brk.c +++ b/libc/sysdeps/linux/sh/brk.c @@ -1,9 +1,16 @@ /* From libc-5.3.12 */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include #include +libc_hidden_proto(brk) + extern void * __curbrk; extern int __init_brk (void); @@ -20,5 +27,4 @@ int brk(void * end_data_seg) } return -1; } -libc_hidden_proto(brk) libc_hidden_def(brk) diff --git a/libc/sysdeps/linux/sh/mmap.c b/libc/sysdeps/linux/sh/mmap.c index cefc532a2..6bc45e939 100644 --- a/libc/sysdeps/linux/sh/mmap.c +++ b/libc/sysdeps/linux/sh/mmap.c @@ -23,6 +23,8 @@ #include #include +libc_hidden_proto(mmap) + #ifdef HIOS # define __SH_SYSCALL6_TRAPA "0x2E" #else @@ -32,5 +34,4 @@ #include _syscall6(__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot, int, flags, int, fd, __off_t, offset); -libc_hidden_proto(mmap) libc_hidden_def(mmap) diff --git a/libc/sysdeps/linux/sh/pipe.c b/libc/sysdeps/linux/sh/pipe.c index c8540c897..e4cc0080d 100644 --- a/libc/sysdeps/linux/sh/pipe.c +++ b/libc/sysdeps/linux/sh/pipe.c @@ -1,10 +1,16 @@ - -/* Copyright (C) 2001 Lineo, */ +/* + * Copyright (C) 2001 Lineo, + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include #include +libc_hidden_proto(pipe) + int pipe(int *fd) { long __res, __res2; @@ -27,5 +33,4 @@ int pipe(int *fd) fd[1] = __res2; return(0); } -libc_hidden_proto(pipe) libc_hidden_def(pipe) diff --git a/libc/sysdeps/linux/sh/pread_write.c b/libc/sysdeps/linux/sh/pread_write.c index 23454e035..4b6d57b08 100644 --- a/libc/sysdeps/linux/sh/pread_write.c +++ b/libc/sysdeps/linux/sh/pread_write.c @@ -1,26 +1,15 @@ /* vi: set sw=4 ts=4: * - * Copyright (C) 2002 by Erik Andersen - * Based in part on the files + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ +/* Based in part on the files * ./sysdeps/unix/sysv/linux/pwrite.c, * ./sysdeps/unix/sysv/linux/pread.c, * sysdeps/posix/pread.c * sysdeps/posix/pwrite.c * from GNU libc 2.2.5, but reworked considerably... - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU Library General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License - * for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #define _GNU_SOURCE diff --git a/libc/sysdeps/linux/sh/sbrk.c b/libc/sysdeps/linux/sh/sbrk.c index 7ccefdf58..343dc14fb 100644 --- a/libc/sysdeps/linux/sh/sbrk.c +++ b/libc/sysdeps/linux/sh/sbrk.c @@ -4,6 +4,8 @@ #include #include +libc_hidden_proto(sbrk) + extern void * __curbrk; extern int __init_brk (void); @@ -23,5 +25,4 @@ sbrk(intptr_t increment) } return ((void *) -1); } -libc_hidden_proto(sbrk) libc_hidden_def(sbrk) diff --git a/libc/sysdeps/linux/sh64/brk.c b/libc/sysdeps/linux/sh64/brk.c index 443c03b25..9af08c37d 100644 --- a/libc/sysdeps/linux/sh64/brk.c +++ b/libc/sysdeps/linux/sh64/brk.c @@ -1,9 +1,16 @@ /* From libc-5.3.12 */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include #include +libc_hidden_proto(brk) + extern void * __curbrk; extern int __init_brk (void); @@ -20,5 +27,4 @@ int brk(void * end_data_seg) } return -1; } -libc_hidden_proto(brk) libc_hidden_def(brk) diff --git a/libc/sysdeps/linux/sh64/sbrk.c b/libc/sysdeps/linux/sh64/sbrk.c index e9faf7db0..343dc14fb 100644 --- a/libc/sysdeps/linux/sh64/sbrk.c +++ b/libc/sysdeps/linux/sh64/sbrk.c @@ -4,13 +4,15 @@ #include #include +libc_hidden_proto(sbrk) + extern void * __curbrk; extern int __init_brk (void); extern void *_brk(void *ptr) attribute_hidden; -void attribute_hidden * -__sbrk(intptr_t increment) +void * +sbrk(intptr_t increment) { if (__init_brk () == 0) { @@ -23,4 +25,4 @@ __sbrk(intptr_t increment) } return ((void *) -1); } -strong_alias(__sbrk,sbrk) +libc_hidden_def(sbrk) diff --git a/libc/sysdeps/linux/sparc/__syscall_error.c b/libc/sysdeps/linux/sparc/__syscall_error.c index de65a1f39..4e7a2b3a2 100644 --- a/libc/sysdeps/linux/sparc/__syscall_error.c +++ b/libc/sysdeps/linux/sparc/__syscall_error.c @@ -1,21 +1,9 @@ /* Wrapper for setting errno. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include diff --git a/libc/sysdeps/linux/sparc/brk.c b/libc/sysdeps/linux/sparc/brk.c index 21464f740..f6d5281d2 100644 --- a/libc/sysdeps/linux/sparc/brk.c +++ b/libc/sysdeps/linux/sparc/brk.c @@ -21,11 +21,11 @@ #include #include +libc_hidden_proto(brk) /* This must be initialized data because commons can't have aliases. */ void *__curbrk = 0; - int brk (void *addr) { void *newbrk; @@ -47,5 +47,4 @@ int brk (void *addr) return 0; } -libc_hidden_proto(brk) libc_hidden_def(brk) diff --git a/libc/sysdeps/linux/v850/__longjmp.S b/libc/sysdeps/linux/v850/__longjmp.S index 98d99bc1e..87a77a215 100644 --- a/libc/sysdeps/linux/v850/__longjmp.S +++ b/libc/sysdeps/linux/v850/__longjmp.S @@ -41,4 +41,3 @@ C_END(__longjmp) .weak C_SYMBOL_NAME(__sigprocmask) C_SYMBOL_NAME(__sigprocmask) = C_SYMBOL_NAME(sigprocmask) -libc_hidden_def(__longjmp) diff --git a/libc/sysdeps/linux/v850/mmap.c b/libc/sysdeps/linux/v850/mmap.c index f075ac77c..72fb37dd2 100644 --- a/libc/sysdeps/linux/v850/mmap.c +++ b/libc/sysdeps/linux/v850/mmap.c @@ -1,11 +1,17 @@ /* Use new style mmap for v850 */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include #include #include +libc_hidden_proto(mmap) + _syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot, int, flags, int, fd, __off_t, offset); -libc_hidden_proto(mmap) libc_hidden_def(mmap) diff --git a/libc/sysdeps/linux/v850/vfork.S b/libc/sysdeps/linux/v850/vfork.S index ace1bd16b..34a0ca64c 100644 --- a/libc/sysdeps/linux/v850/vfork.S +++ b/libc/sysdeps/linux/v850/vfork.S @@ -38,5 +38,3 @@ C_ENTRY (vfork): st.w r10, 0[r11] jmp [lp] // error return C_END(vfork) - -libc_hidden_def(vfork) diff --git a/libc/sysdeps/linux/x86_64/__syscall_error.c b/libc/sysdeps/linux/x86_64/__syscall_error.c index d8cf84c2b..e196ed427 100644 --- a/libc/sysdeps/linux/x86_64/__syscall_error.c +++ b/libc/sysdeps/linux/x86_64/__syscall_error.c @@ -1,21 +1,9 @@ /* Wrapper for setting errno. - Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ +/* + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include #include diff --git a/libc/sysdeps/linux/x86_64/brk.c b/libc/sysdeps/linux/x86_64/brk.c index 8d85bcb3d..09d911066 100644 --- a/libc/sysdeps/linux/x86_64/brk.c +++ b/libc/sysdeps/linux/x86_64/brk.c @@ -21,6 +21,8 @@ #include #include +libc_hidden_proto(brk) + /* This must be initialized data because commons can't have aliases. */ void *__curbrk = 0; @@ -42,5 +44,4 @@ int brk (void *addr) return 0; } -libc_hidden_proto(brk) libc_hidden_def(brk) diff --git a/libc/sysdeps/linux/x86_64/mmap.c b/libc/sysdeps/linux/x86_64/mmap.c index b69f0a2f2..baaee6847 100644 --- a/libc/sysdeps/linux/x86_64/mmap.c +++ b/libc/sysdeps/linux/x86_64/mmap.c @@ -2,10 +2,10 @@ /* * mmap() for uClibc/x86_64 * - * Copyright (C) 2005 by Erik Andersen + * Copyright (C) 2000-2006 Erik Andersen * Copyright (C) 2005 by Mike Frysinger * - * 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 @@ -13,7 +13,8 @@ #include #include +libc_hidden_proto(mmap) + _syscall6(void *, mmap, void *, start, size_t, length, int, prot, int, flags, int, fd, off_t, offset); -libc_hidden_proto(mmap) libc_hidden_def(mmap) diff --git a/libc/unistd/getlogin.c b/libc/unistd/getlogin.c index f2ee1d355..778b8f1e6 100644 --- a/libc/unistd/getlogin.c +++ b/libc/unistd/getlogin.c @@ -22,6 +22,7 @@ #include #include +#include libc_hidden_proto(strcpy) libc_hidden_proto(strncpy) @@ -33,11 +34,11 @@ libc_hidden_proto(getenv) * the user specify whatever they want via the LOGNAME environment * variable, or we return NULL if getenv() fails to find anything */ +libc_hidden_proto(getlogin) char * getlogin(void) { return (getenv("LOGNAME")); } -libc_hidden_proto(getlogin) libc_hidden_def(getlogin) int getlogin_r(char *name, size_t len) diff --git a/libc/unistd/sysconf.c b/libc/unistd/sysconf.c index 6f362819c..0dde75102 100644 --- a/libc/unistd/sysconf.c +++ b/libc/unistd/sysconf.c @@ -33,6 +33,8 @@ #include #endif +libc_hidden_proto(sysconf) + libc_hidden_proto(getpagesize) libc_hidden_proto(getdtablesize) @@ -883,5 +885,4 @@ long int sysconf(int name) #endif } } -libc_hidden_proto(sysconf) libc_hidden_def(sysconf) -- cgit v1.2.3