summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/inet/addr.c14
-rw-r--r--libc/inet/ether_addr.c4
-rw-r--r--libc/inet/getaddrinfo.c24
-rw-r--r--libc/inet/getnetbyad.c6
-rw-r--r--libc/inet/getnetbynm.c6
-rw-r--r--libc/inet/getnetent.c14
-rw-r--r--libc/inet/getproto.c18
-rw-r--r--libc/inet/getservice.c20
-rw-r--r--libc/inet/herror.c4
-rw-r--r--libc/inet/hostid.c14
-rw-r--r--libc/inet/if_index.c8
-rw-r--r--libc/inet/ifaddrs.c10
-rw-r--r--libc/inet/in6_addr.c2
-rw-r--r--libc/inet/inet_net.c2
-rw-r--r--libc/inet/ntop.c8
-rw-r--r--libc/inet/opensock.c2
-rw-r--r--libc/inet/rpc/auth_none.c6
-rw-r--r--libc/inet/rpc/auth_unix.c28
-rw-r--r--libc/inet/rpc/authunix_prot.c12
-rw-r--r--libc/inet/rpc/bindresvport.c6
-rw-r--r--libc/inet/rpc/clnt_generic.c12
-rw-r--r--libc/inet/rpc/clnt_perror.c16
-rw-r--r--libc/inet/rpc/clnt_raw.c16
-rw-r--r--libc/inet/rpc/clnt_simple.c4
-rw-r--r--libc/inet/rpc/clnt_tcp.c42
-rw-r--r--libc/inet/rpc/clnt_udp.c44
-rw-r--r--libc/inet/rpc/clnt_unix.c46
-rw-r--r--libc/inet/rpc/create_xid.c6
-rw-r--r--libc/inet/rpc/get_myaddress.c6
-rw-r--r--libc/inet/rpc/getrpcent.c18
-rw-r--r--libc/inet/rpc/getrpcport.c4
-rw-r--r--libc/inet/rpc/pm_getmaps.c10
-rw-r--r--libc/inet/rpc/pm_getport.c10
-rw-r--r--libc/inet/rpc/pmap_clnt.c18
-rw-r--r--libc/inet/rpc/pmap_prot.c4
-rw-r--r--libc/inet/rpc/pmap_prot2.c8
-rw-r--r--libc/inet/rpc/pmap_rmt.c38
-rw-r--r--libc/inet/rpc/rcmd.c68
-rw-r--r--libc/inet/rpc/rexec.c34
-rw-r--r--libc/inet/rpc/rpc_cmsg.c12
-rw-r--r--libc/inet/rpc/rpc_dtablesize.c4
-rw-r--r--libc/inet/rpc/rpc_private.h2
-rw-r--r--libc/inet/rpc/rpc_prot.c22
-rw-r--r--libc/inet/rpc/rpc_thread.c8
-rw-r--r--libc/inet/rpc/rtime.c14
-rw-r--r--libc/inet/rpc/ruserpass.c28
-rw-r--r--libc/inet/rpc/svc.c40
-rw-r--r--libc/inet/rpc/svc_auth.c2
-rw-r--r--libc/inet/rpc/svc_authux.c6
-rw-r--r--libc/inet/rpc/svc_raw.c6
-rw-r--r--libc/inet/rpc/svc_run.c10
-rw-r--r--libc/inet/rpc/svc_simple.c18
-rw-r--r--libc/inet/rpc/svc_tcp.c38
-rw-r--r--libc/inet/rpc/svc_udp.c38
-rw-r--r--libc/inet/rpc/svc_unix.c44
-rw-r--r--libc/inet/rpc/xdr.c34
-rw-r--r--libc/inet/rpc/xdr_array.c8
-rw-r--r--libc/inet/rpc/xdr_mem.c2
-rw-r--r--libc/inet/rpc/xdr_rec.c14
-rw-r--r--libc/inet/rpc/xdr_reference.c8
-rw-r--r--libc/inet/rpc/xdr_stdio.c10
-rw-r--r--libc/inet/socketcalls.c30
-rw-r--r--libc/misc/assert/__assert.c2
-rw-r--r--libc/misc/ctype/ctype.c50
-rw-r--r--libc/misc/dirent/closedir.c2
-rw-r--r--libc/misc/dirent/dirfd.c2
-rw-r--r--libc/misc/dirent/opendir.c10
-rw-r--r--libc/misc/dirent/readdir.c2
-rw-r--r--libc/misc/dirent/readdir64.c2
-rw-r--r--libc/misc/dirent/readdir64_r.c2
-rw-r--r--libc/misc/dirent/readdir_r.c2
-rw-r--r--libc/misc/dirent/rewinddir.c2
-rw-r--r--libc/misc/dirent/scandir.c8
-rw-r--r--libc/misc/dirent/scandir64.c8
-rw-r--r--libc/misc/dirent/seekdir.c2
-rw-r--r--libc/misc/elf/dl-iterate-phdr.c30
-rw-r--r--libc/misc/elf/dl-support.c37
-rw-r--r--libc/misc/error/err.c14
-rw-r--r--libc/misc/error/error.c10
-rw-r--r--libc/misc/file/lockf.c6
-rw-r--r--libc/misc/file/lockf64.c8
-rw-r--r--libc/misc/fnmatch/fnmatch.c32
-rw-r--r--libc/misc/fnmatch/fnmatch_old.c4
-rw-r--r--libc/misc/ftw/ftw.c28
-rw-r--r--libc/misc/glob/glob-susv3.c24
-rw-r--r--libc/misc/glob/glob.c30
-rw-r--r--libc/misc/internals/tempname.c16
-rw-r--r--libc/misc/locale/locale.c18
-rw-r--r--libc/misc/mntent/mntent.c14
-rw-r--r--libc/misc/regex/regcomp.c2
-rw-r--r--libc/misc/regex/regex.c32
-rw-r--r--libc/misc/regex/regex_internal.h2
-rw-r--r--libc/misc/regex/regex_old.c18
-rw-r--r--libc/misc/search/_hsearch_r.c6
-rw-r--r--libc/misc/search/_lsearch.c2
-rw-r--r--libc/misc/search/_tsearch.c6
-rw-r--r--libc/misc/search/hsearch.c6
-rw-r--r--libc/misc/statfs/fstatfs64.c3
-rw-r--r--libc/misc/statfs/fstatvfs.c15
-rw-r--r--libc/misc/statfs/fstatvfs64.c14
-rw-r--r--libc/misc/statfs/statfs64.c3
-rw-r--r--libc/misc/statfs/statvfs.c11
-rw-r--r--libc/misc/statfs/statvfs64.c12
-rw-r--r--libc/misc/syslog/syslog.c30
-rw-r--r--libc/misc/sysvipc/ftok.c2
-rw-r--r--libc/misc/sysvipc/msgq.c6
-rw-r--r--libc/misc/sysvipc/shm.c2
-rw-r--r--libc/misc/time/adjtime.c2
-rw-r--r--libc/misc/time/ftime.c2
-rw-r--r--libc/misc/time/time.c48
-rw-r--r--libc/misc/ttyent/getttyent.c18
-rw-r--r--libc/misc/utmp/utent.c14
-rw-r--r--libc/misc/utmp/wtent.c10
-rw-r--r--libc/misc/wchar/wchar.c42
-rw-r--r--libc/misc/wctype/_wctype.c30
-rw-r--r--libc/misc/wordexp/wordexp.c42
-rw-r--r--libc/pwd_grp/lckpwdf.c16
-rw-r--r--libc/pwd_grp/pwd_grp.c60
-rw-r--r--libc/signal/killpg.c2
-rw-r--r--libc/signal/raise.c6
-rw-r--r--libc/signal/sigaction.c2
-rw-r--r--libc/signal/sigaddset.c2
-rw-r--r--libc/signal/sigblock.c4
-rw-r--r--libc/signal/sigdelset.c2
-rw-r--r--libc/signal/sigempty.c2
-rw-r--r--libc/signal/sigfillset.c2
-rw-r--r--libc/signal/siggetmask.c2
-rw-r--r--libc/signal/sighold.c4
-rw-r--r--libc/signal/sigignore.c2
-rw-r--r--libc/signal/sigintr.c2
-rw-r--r--libc/signal/sigjmp.c2
-rw-r--r--libc/signal/signal.c4
-rw-r--r--libc/signal/sigpause.c10
-rw-r--r--libc/signal/sigrelse.c4
-rw-r--r--libc/signal/sigset.c4
-rw-r--r--libc/signal/sigsetmask.c4
-rw-r--r--libc/signal/sigsetops.c6
-rw-r--r--libc/signal/sysv_signal.c2
-rw-r--r--libc/stdio/_READ.c2
-rw-r--r--libc/stdio/_WRITE.c2
-rw-r--r--libc/stdio/__fsetlocking.c2
-rw-r--r--libc/stdio/_cs_funcs.c8
-rw-r--r--libc/stdio/_flushlbf.c2
-rw-r--r--libc/stdio/_fopen.c6
-rw-r--r--libc/stdio/_scanf.c34
-rw-r--r--libc/stdio/_stdio.c2
-rw-r--r--libc/stdio/_stdio.h2
-rw-r--r--libc/stdio/_trans2w.c2
-rw-r--r--libc/stdio/_vfprintf.c18
-rw-r--r--libc/stdio/_wfwrite.c4
-rw-r--r--libc/stdio/asprintf.c4
-rw-r--r--libc/stdio/dprintf.c2
-rw-r--r--libc/stdio/fclose.c2
-rw-r--r--libc/stdio/fdopen.c4
-rw-r--r--libc/stdio/fflush.c8
-rw-r--r--libc/stdio/fgetc.c12
-rw-r--r--libc/stdio/fgets.c8
-rw-r--r--libc/stdio/fgetwc.c8
-rw-r--r--libc/stdio/fgetws.c4
-rw-r--r--libc/stdio/fileno.c6
-rw-r--r--libc/stdio/fmemopen.c2
-rw-r--r--libc/stdio/fopen.c2
-rw-r--r--libc/stdio/fopencookie.c2
-rw-r--r--libc/stdio/fprintf.c2
-rw-r--r--libc/stdio/fputc.c12
-rw-r--r--libc/stdio/fputs.c8
-rw-r--r--libc/stdio/fputwc.c2
-rw-r--r--libc/stdio/fputws.c8
-rw-r--r--libc/stdio/fread.c8
-rw-r--r--libc/stdio/fseeko.c4
-rw-r--r--libc/stdio/ftello.c4
-rw-r--r--libc/stdio/fwprintf.c2
-rw-r--r--libc/stdio/fwrite.c6
-rw-r--r--libc/stdio/getchar.c4
-rw-r--r--libc/stdio/getdelim.c4
-rw-r--r--libc/stdio/getline.c4
-rw-r--r--libc/stdio/gets.c2
-rw-r--r--libc/stdio/getw.c2
-rw-r--r--libc/stdio/getwchar.c4
-rw-r--r--libc/stdio/old_vfprintf.c8
-rw-r--r--libc/stdio/open_memstream.c4
-rw-r--r--libc/stdio/perror.c4
-rw-r--r--libc/stdio/popen.c16
-rw-r--r--libc/stdio/printf.c4
-rw-r--r--libc/stdio/putchar.c2
-rw-r--r--libc/stdio/puts.c4
-rw-r--r--libc/stdio/putw.c2
-rw-r--r--libc/stdio/putwchar.c6
-rw-r--r--libc/stdio/remove.c6
-rw-r--r--libc/stdio/rewind.c4
-rw-r--r--libc/stdio/setbuf.c2
-rw-r--r--libc/stdio/setbuffer.c2
-rw-r--r--libc/stdio/setlinebuf.c2
-rw-r--r--libc/stdio/setvbuf.c2
-rw-r--r--libc/stdio/snprintf.c4
-rw-r--r--libc/stdio/sprintf.c4
-rw-r--r--libc/stdio/swprintf.c2
-rw-r--r--libc/stdio/tmpfile.c4
-rw-r--r--libc/stdio/ungetc.c2
-rw-r--r--libc/stdio/ungetwc.c2
-rw-r--r--libc/stdio/vasprintf.c8
-rw-r--r--libc/stdio/vdprintf.c6
-rw-r--r--libc/stdio/vprintf.c2
-rw-r--r--libc/stdio/vsnprintf.c4
-rw-r--r--libc/stdio/vsprintf.c2
-rw-r--r--libc/stdio/vswprintf.c2
-rw-r--r--libc/stdio/vwprintf.c2
-rw-r--r--libc/stdio/wprintf.c2
-rw-r--r--libc/stdlib/__uc_malloc.c6
-rw-r--r--libc/stdlib/_atexit.c2
-rw-r--r--libc/stdlib/_strtod.c4
-rw-r--r--libc/stdlib/abort.c8
-rw-r--r--libc/stdlib/arc4random.c8
-rw-r--r--libc/stdlib/bsd_getpt.c2
-rw-r--r--libc/stdlib/drand48.c2
-rw-r--r--libc/stdlib/drand48_r.c2
-rw-r--r--libc/stdlib/erand48.c2
-rw-r--r--libc/stdlib/erand48_r.c2
-rw-r--r--libc/stdlib/gcvt.c2
-rw-r--r--libc/stdlib/getenv.c2
-rw-r--r--libc/stdlib/getpt.c3
-rw-r--r--libc/stdlib/grantpt.c1
-rw-r--r--libc/stdlib/jrand48.c2
-rw-r--r--libc/stdlib/jrand48_r.c2
-rw-r--r--libc/stdlib/lrand48.c2
-rw-r--r--libc/stdlib/lrand48_r.c4
-rw-r--r--libc/stdlib/malloc-simple/alloc.c4
-rw-r--r--libc/stdlib/malloc-standard/free.c2
-rw-r--r--libc/stdlib/malloc-standard/mallinfo.c2
-rw-r--r--libc/stdlib/malloc-standard/malloc.h6
-rw-r--r--libc/stdlib/malloc-standard/realloc.c2
-rw-r--r--libc/stdlib/malloc/free.c4
-rw-r--r--libc/stdlib/malloc/heap_debug.c4
-rw-r--r--libc/stdlib/malloc/malloc.c4
-rw-r--r--libc/stdlib/malloc/malloc_debug.c8
-rw-r--r--libc/stdlib/mrand48.c2
-rw-r--r--libc/stdlib/mrand48_r.c2
-rw-r--r--libc/stdlib/nrand48.c2
-rw-r--r--libc/stdlib/nrand48_r.c2
-rw-r--r--libc/stdlib/ptsname.c10
-rw-r--r--libc/stdlib/rand.c2
-rw-r--r--libc/stdlib/random.c10
-rw-r--r--libc/stdlib/random_r.c8
-rw-r--r--libc/stdlib/realpath.c4
-rw-r--r--libc/stdlib/seed48.c2
-rw-r--r--libc/stdlib/seed48_r.c2
-rw-r--r--libc/stdlib/setenv.c6
-rw-r--r--libc/stdlib/srand48.c2
-rw-r--r--libc/stdlib/srand48_r.c2
-rw-r--r--libc/stdlib/stdlib.c42
-rw-r--r--libc/stdlib/system.c12
-rw-r--r--libc/stdlib/unix_grantpt.c26
-rw-r--r--libc/stdlib/unlockpt.c2
-rw-r--r--libc/stdlib/valloc.c2
-rw-r--r--libc/string/__glibc_strerror_r.c4
-rw-r--r--libc/string/__xpg_strerror_r.c2
-rw-r--r--libc/string/_collate.c12
-rw-r--r--libc/string/memchr.c2
-rw-r--r--libc/string/memcpy.c2
-rw-r--r--libc/string/mempcpy.c2
-rw-r--r--libc/string/strcasecmp.c12
-rw-r--r--libc/string/strcasestr.c2
-rw-r--r--libc/string/strcat.c2
-rw-r--r--libc/string/strchr.c2
-rw-r--r--libc/string/strchrnul.c2
-rw-r--r--libc/string/strcmp.c3
-rw-r--r--libc/string/strcpy.c9
-rw-r--r--libc/string/strdup.c2
-rw-r--r--libc/string/strerror.c2
-rw-r--r--libc/string/strlcpy.c21
-rw-r--r--libc/string/strlen.c2
-rw-r--r--libc/string/strncasecmp.c12
-rw-r--r--libc/string/strnlen.c2
-rw-r--r--libc/string/strpbrk.c2
-rw-r--r--libc/string/strspn.c2
-rw-r--r--libc/string/strtok_r.c4
-rw-r--r--libc/sysdeps/linux/common/__socketcall.c2
-rw-r--r--libc/sysdeps/linux/common/__syscall_fcntl64.c4
-rw-r--r--libc/sysdeps/linux/common/__syscall_rt_sigaction.c2
-rw-r--r--libc/sysdeps/linux/common/__syscall_sigaction.c2
-rw-r--r--libc/sysdeps/linux/common/_exit.c7
-rw-r--r--libc/sysdeps/linux/common/access.c2
-rw-r--r--libc/sysdeps/linux/common/acct.c2
-rw-r--r--libc/sysdeps/linux/common/adjtimex.c4
-rw-r--r--libc/sysdeps/linux/common/alarm.c6
-rw-r--r--libc/sysdeps/linux/common/arch_prctl.c2
-rw-r--r--libc/sysdeps/linux/common/bdflush.c2
-rw-r--r--libc/sysdeps/linux/common/bits/errno.h1
-rw-r--r--libc/sysdeps/linux/common/bits/getopt.h2
-rw-r--r--libc/sysdeps/linux/common/bits/sigset.h3
-rw-r--r--libc/sysdeps/linux/common/bits/socket.h7
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_errno.h2
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_stdio.h2
-rw-r--r--libc/sysdeps/linux/common/capget.c2
-rw-r--r--libc/sysdeps/linux/common/capset.c2
-rw-r--r--libc/sysdeps/linux/common/chdir.c4
-rw-r--r--libc/sysdeps/linux/common/chmod.c4
-rw-r--r--libc/sysdeps/linux/common/chown.c6
-rw-r--r--libc/sysdeps/linux/common/chroot.c2
-rw-r--r--libc/sysdeps/linux/common/clock_getres.c5
-rw-r--r--libc/sysdeps/linux/common/clock_gettime.c4
-rw-r--r--libc/sysdeps/linux/common/clock_settime.c4
-rw-r--r--libc/sysdeps/linux/common/cmsg_nxthdr.c2
-rw-r--r--libc/sysdeps/linux/common/creat64.c1
-rw-r--r--libc/sysdeps/linux/common/create_module.c6
-rw-r--r--libc/sysdeps/linux/common/delete_module.c8
-rw-r--r--libc/sysdeps/linux/common/dl-osinfo.h6
-rw-r--r--libc/sysdeps/linux/common/dup.c2
-rw-r--r--libc/sysdeps/linux/common/dup2.c4
-rw-r--r--libc/sysdeps/linux/common/epoll.c6
-rw-r--r--libc/sysdeps/linux/common/execve.c4
-rw-r--r--libc/sysdeps/linux/common/fchdir.c4
-rw-r--r--libc/sysdeps/linux/common/fchmod.c2
-rw-r--r--libc/sysdeps/linux/common/fchown.c4
-rw-r--r--libc/sysdeps/linux/common/fdatasync.c2
-rw-r--r--libc/sysdeps/linux/common/flock.c2
-rw-r--r--libc/sysdeps/linux/common/fork.c6
-rw-r--r--libc/sysdeps/linux/common/fstat.c6
-rw-r--r--libc/sysdeps/linux/common/fstat64.c4
-rw-r--r--libc/sysdeps/linux/common/fstatfs.c8
-rw-r--r--libc/sysdeps/linux/common/fsync.c2
-rw-r--r--libc/sysdeps/linux/common/ftruncate.c4
-rw-r--r--libc/sysdeps/linux/common/ftruncate64.c10
-rw-r--r--libc/sysdeps/linux/common/get_kernel_syms.c2
-rw-r--r--libc/sysdeps/linux/common/getcwd.c18
-rw-r--r--libc/sysdeps/linux/common/getdents.c4
-rw-r--r--libc/sysdeps/linux/common/getdents64.c4
-rw-r--r--libc/sysdeps/linux/common/getdirname.c8
-rw-r--r--libc/sysdeps/linux/common/getdomainname.c4
-rw-r--r--libc/sysdeps/linux/common/getdtablesize.c4
-rw-r--r--libc/sysdeps/linux/common/getegid.c8
-rw-r--r--libc/sysdeps/linux/common/geteuid.c8
-rw-r--r--libc/sysdeps/linux/common/getgid.c4
-rw-r--r--libc/sysdeps/linux/common/getgroups.c10
-rw-r--r--libc/sysdeps/linux/common/gethostname.c4
-rw-r--r--libc/sysdeps/linux/common/getitimer.c2
-rw-r--r--libc/sysdeps/linux/common/getpagesize.c2
-rw-r--r--libc/sysdeps/linux/common/getpgid.c2
-rw-r--r--libc/sysdeps/linux/common/getpgrp.c2
-rw-r--r--libc/sysdeps/linux/common/getpid.c4
-rw-r--r--libc/sysdeps/linux/common/getppid.c4
-rw-r--r--libc/sysdeps/linux/common/getpriority.c4
-rw-r--r--libc/sysdeps/linux/common/getresgid.c2
-rw-r--r--libc/sysdeps/linux/common/getresuid.c2
-rw-r--r--libc/sysdeps/linux/common/getrlimit.c12
-rw-r--r--libc/sysdeps/linux/common/getrlimit64.c2
-rw-r--r--libc/sysdeps/linux/common/getrusage.c2
-rw-r--r--libc/sysdeps/linux/common/getsid.c4
-rw-r--r--libc/sysdeps/linux/common/gettimeofday.c6
-rw-r--r--libc/sysdeps/linux/common/getuid.c4
-rw-r--r--libc/sysdeps/linux/common/init_module.c2
-rw-r--r--libc/sysdeps/linux/common/inotify.c6
-rw-r--r--libc/sysdeps/linux/common/ioperm.c7
-rw-r--r--libc/sysdeps/linux/common/iopl.c2
-rw-r--r--libc/sysdeps/linux/common/kill.c4
-rw-r--r--libc/sysdeps/linux/common/klogctl.c2
-rw-r--r--libc/sysdeps/linux/common/lchown.c4
-rw-r--r--libc/sysdeps/linux/common/link.c2
-rw-r--r--libc/sysdeps/linux/common/llseek.c8
-rw-r--r--libc/sysdeps/linux/common/longjmp.c2
-rw-r--r--libc/sysdeps/linux/common/lseek.c5
-rw-r--r--libc/sysdeps/linux/common/lstat.c6
-rw-r--r--libc/sysdeps/linux/common/lstat64.c4
-rw-r--r--libc/sysdeps/linux/common/madvise.c2
-rw-r--r--libc/sysdeps/linux/common/mincore.c2
-rw-r--r--libc/sysdeps/linux/common/mkdir.c4
-rw-r--r--libc/sysdeps/linux/common/mkfifo.c2
-rw-r--r--libc/sysdeps/linux/common/mlock.c2
-rw-r--r--libc/sysdeps/linux/common/mlockall.c2
-rw-r--r--libc/sysdeps/linux/common/mmap.c10
-rw-r--r--libc/sysdeps/linux/common/mmap64.c7
-rw-r--r--libc/sysdeps/linux/common/modify_ldt.c2
-rw-r--r--libc/sysdeps/linux/common/mount.c2
-rw-r--r--libc/sysdeps/linux/common/mprotect.c2
-rw-r--r--libc/sysdeps/linux/common/mremap.c6
-rw-r--r--libc/sysdeps/linux/common/munlock.c2
-rw-r--r--libc/sysdeps/linux/common/munlockall.c2
-rw-r--r--libc/sysdeps/linux/common/munmap.c4
-rw-r--r--libc/sysdeps/linux/common/nice.c6
-rw-r--r--libc/sysdeps/linux/common/ntp_gettime.c2
-rw-r--r--libc/sysdeps/linux/common/open.c4
-rw-r--r--libc/sysdeps/linux/common/open64.c2
-rw-r--r--libc/sysdeps/linux/common/personality.c2
-rw-r--r--libc/sysdeps/linux/common/pipe.c4
-rw-r--r--libc/sysdeps/linux/common/pivot_root.c2
-rw-r--r--libc/sysdeps/linux/common/posix_fadvise.c2
-rw-r--r--libc/sysdeps/linux/common/posix_fadvise64.c8
-rw-r--r--libc/sysdeps/linux/common/ppoll.c6
-rw-r--r--libc/sysdeps/linux/common/prctl.c2
-rw-r--r--libc/sysdeps/linux/common/pread_write.c12
-rw-r--r--libc/sysdeps/linux/common/ptrace.c2
-rw-r--r--libc/sysdeps/linux/common/query_module.c4
-rw-r--r--libc/sysdeps/linux/common/quotactl.c2
-rw-r--r--libc/sysdeps/linux/common/read.c4
-rw-r--r--libc/sysdeps/linux/common/readahead.c4
-rw-r--r--libc/sysdeps/linux/common/readlink.c4
-rw-r--r--libc/sysdeps/linux/common/reboot.c2
-rw-r--r--libc/sysdeps/linux/common/remap_file_pages.c2
-rw-r--r--libc/sysdeps/linux/common/rename.c2
-rw-r--r--libc/sysdeps/linux/common/rmdir.c4
-rw-r--r--libc/sysdeps/linux/common/sbrk.c4
-rw-r--r--libc/sysdeps/linux/common/sched_get_priority_max.c2
-rw-r--r--libc/sysdeps/linux/common/sched_get_priority_min.c2
-rw-r--r--libc/sysdeps/linux/common/sched_getaffinity.c14
-rw-r--r--libc/sysdeps/linux/common/sched_getparam.c2
-rw-r--r--libc/sysdeps/linux/common/sched_getscheduler.c2
-rw-r--r--libc/sysdeps/linux/common/sched_rr_get_interval.c2
-rw-r--r--libc/sysdeps/linux/common/sched_setaffinity.c20
-rw-r--r--libc/sysdeps/linux/common/sched_setparam.c2
-rw-r--r--libc/sysdeps/linux/common/sched_setscheduler.c2
-rw-r--r--libc/sysdeps/linux/common/sched_yield.c2
-rw-r--r--libc/sysdeps/linux/common/sendfile.c2
-rw-r--r--libc/sysdeps/linux/common/sendfile64.c2
-rw-r--r--libc/sysdeps/linux/common/setdomainname.c2
-rw-r--r--libc/sysdeps/linux/common/setegid.c4
-rw-r--r--libc/sysdeps/linux/common/seteuid.c6
-rw-r--r--libc/sysdeps/linux/common/setfsgid.c4
-rw-r--r--libc/sysdeps/linux/common/setfsuid.c4
-rw-r--r--libc/sysdeps/linux/common/setgid.c4
-rw-r--r--libc/sysdeps/linux/common/setgroups.c10
-rw-r--r--libc/sysdeps/linux/common/sethostname.c2
-rw-r--r--libc/sysdeps/linux/common/setitimer.c4
-rw-r--r--libc/sysdeps/linux/common/setpgid.c4
-rw-r--r--libc/sysdeps/linux/common/setpgrp.c2
-rw-r--r--libc/sysdeps/linux/common/setpriority.c4
-rw-r--r--libc/sysdeps/linux/common/setregid.c6
-rw-r--r--libc/sysdeps/linux/common/setresgid.c6
-rw-r--r--libc/sysdeps/linux/common/setresuid.c6
-rw-r--r--libc/sysdeps/linux/common/setreuid.c6
-rw-r--r--libc/sysdeps/linux/common/setrlimit.c12
-rw-r--r--libc/sysdeps/linux/common/setrlimit64.c2
-rw-r--r--libc/sysdeps/linux/common/setsid.c4
-rw-r--r--libc/sysdeps/linux/common/settimeofday.c4
-rw-r--r--libc/sysdeps/linux/common/setuid.c4
-rw-r--r--libc/sysdeps/linux/common/sigaltstack.c2
-rw-r--r--libc/sysdeps/linux/common/signalfd.c41
-rw-r--r--libc/sysdeps/linux/common/sigpending.c4
-rw-r--r--libc/sysdeps/linux/common/sigqueue.c6
-rw-r--r--libc/sysdeps/linux/common/splice.c7
-rw-r--r--libc/sysdeps/linux/common/ssp.c35
-rw-r--r--libc/sysdeps/linux/common/stat.c6
-rw-r--r--libc/sysdeps/linux/common/stat64.c5
-rw-r--r--libc/sysdeps/linux/common/statfs.c8
-rw-r--r--libc/sysdeps/linux/common/stime.c4
-rw-r--r--libc/sysdeps/linux/common/swapoff.c2
-rw-r--r--libc/sysdeps/linux/common/swapon.c2
-rw-r--r--libc/sysdeps/linux/common/symlink.c2
-rw-r--r--libc/sysdeps/linux/common/sync.c2
-rw-r--r--libc/sysdeps/linux/common/sync_file_range.c33
-rw-r--r--libc/sysdeps/linux/common/sysctl.c4
-rw-r--r--libc/sysdeps/linux/common/sysfs.c2
-rw-r--r--libc/sysdeps/linux/common/sysinfo.c2
-rw-r--r--libc/sysdeps/linux/common/tee.c2
-rw-r--r--libc/sysdeps/linux/common/time.c4
-rw-r--r--libc/sysdeps/linux/common/times.c4
-rw-r--r--libc/sysdeps/linux/common/truncate.c4
-rw-r--r--libc/sysdeps/linux/common/truncate64.c8
-rw-r--r--libc/sysdeps/linux/common/ulimit.c8
-rw-r--r--libc/sysdeps/linux/common/umask.c2
-rw-r--r--libc/sysdeps/linux/common/umount.c4
-rw-r--r--libc/sysdeps/linux/common/umount2.c2
-rw-r--r--libc/sysdeps/linux/common/uname.c4
-rw-r--r--libc/sysdeps/linux/common/unlink.c4
-rw-r--r--libc/sysdeps/linux/common/uselib.c2
-rw-r--r--libc/sysdeps/linux/common/ustat.c2
-rw-r--r--libc/sysdeps/linux/common/utime.c8
-rw-r--r--libc/sysdeps/linux/common/utimes.c7
-rw-r--r--libc/sysdeps/linux/common/vfork.c4
-rw-r--r--libc/sysdeps/linux/common/vhangup.c2
-rw-r--r--libc/sysdeps/linux/common/vmsplice.c7
-rw-r--r--libc/sysdeps/linux/common/wait3.c2
-rw-r--r--libc/sysdeps/linux/common/write.c4
-rw-r--r--libc/sysdeps/linux/common/xattr.c24
-rw-r--r--libc/termios/cfsetspeed.c4
-rw-r--r--libc/termios/isatty.c4
-rw-r--r--libc/termios/speed.c4
-rw-r--r--libc/termios/tcflow.c2
-rw-r--r--libc/termios/tcflush.c2
-rw-r--r--libc/termios/tcgetattr.c53
-rw-r--r--libc/termios/tcgetpgrp.c4
-rw-r--r--libc/termios/tcgetsid.c6
-rw-r--r--libc/termios/tcsendbrk.c2
-rw-r--r--libc/termios/tcsetattr.c4
-rw-r--r--libc/termios/tcsetpgrp.c2
-rw-r--r--libc/termios/ttyname.c14
-rw-r--r--libc/unistd/daemon.c12
-rw-r--r--libc/unistd/exec.c18
-rw-r--r--libc/unistd/fpathconf.c6
-rw-r--r--libc/unistd/getlogin.c4
-rw-r--r--libc/unistd/getopt-susv3.c2
-rw-r--r--libc/unistd/getopt.c3
-rw-r--r--libc/unistd/getopt_long-simple.c2
-rw-r--r--libc/unistd/getpass.c23
-rw-r--r--libc/unistd/pathconf.c3
-rw-r--r--libc/unistd/sleep.c12
-rw-r--r--libc/unistd/sysconf.c6
-rw-r--r--libc/unistd/ualarm.c2
-rw-r--r--libc/unistd/usershell.c10
-rw-r--r--libc/unistd/usleep.c2
499 files changed, 1886 insertions, 1824 deletions
diff --git a/libc/inet/addr.c b/libc/inet/addr.c
index ad9539e82..b371fa9ae 100644
--- a/libc/inet/addr.c
+++ b/libc/inet/addr.c
@@ -48,7 +48,7 @@
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
/* libc_hidden_proto(__ctype_b) */
#endif
-libc_hidden_proto(inet_aton)
+/* libc_hidden_proto(inet_aton) */
int inet_aton(const char *cp, struct in_addr *addrptr)
{
in_addr_t addr;
@@ -103,9 +103,9 @@ libc_hidden_def(inet_aton)
#endif
#ifdef L_inet_addr
-libc_hidden_proto(inet_aton)
+/* libc_hidden_proto(inet_aton) */
-libc_hidden_proto(inet_addr)
+/* libc_hidden_proto(inet_addr) */
in_addr_t inet_addr(const char *cp)
{
struct in_addr a;
@@ -122,7 +122,7 @@ libc_hidden_def(inet_addr)
#define INET_NTOA_MAX_LEN 16 /* max 12 digits + 3 '.'s + 1 nul */
-libc_hidden_proto(inet_ntoa_r)
+/* 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);
@@ -144,7 +144,7 @@ char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN])
}
libc_hidden_def(inet_ntoa_r)
-libc_hidden_proto(inet_ntoa)
+/* libc_hidden_proto(inet_ntoa) */
char *inet_ntoa(struct in_addr in)
{
static char buf[INET_NTOA_MAX_LEN];
@@ -162,7 +162,7 @@ libc_hidden_def(inet_ntoa)
* Formulate an Internet address from network + host. Used in
* building addresses stored in the ifnet structure.
*/
-libc_hidden_proto(inet_makeaddr)
+/* libc_hidden_proto(inet_makeaddr) */
struct in_addr inet_makeaddr(in_addr_t net, in_addr_t host)
{
in_addr_t addr;
@@ -206,7 +206,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)
+/* libc_hidden_proto(inet_netof) */
in_addr_t
inet_netof(struct in_addr in)
{
diff --git a/libc/inet/ether_addr.c b/libc/inet/ether_addr.c
index 914b77c69..82b067157 100644
--- a/libc/inet/ether_addr.c
+++ b/libc/inet/ether_addr.c
@@ -31,8 +31,8 @@
#include <netinet/ether.h>
#include <netinet/if_ether.h>
-libc_hidden_proto(ether_ntoa_r)
-libc_hidden_proto(sprintf)
+/* libc_hidden_proto(ether_ntoa_r) */
+/* libc_hidden_proto(sprintf) */
#ifdef __UCLIBC_HAS_XLOCALE__
/* libc_hidden_proto(__ctype_b_loc) */
/* libc_hidden_proto(__ctype_tolower_loc) */
diff --git a/libc/inet/getaddrinfo.c b/libc/inet/getaddrinfo.c
index 5df8d4889..c84236b19 100644
--- a/libc/inet/getaddrinfo.c
+++ b/libc/inet/getaddrinfo.c
@@ -76,19 +76,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/* Experimentally off - libc_hidden_proto(strchr) */
/* Experimentally off - libc_hidden_proto(strcpy) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(socket)
+/* libc_hidden_proto(socket) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(getservbyname_r)
-libc_hidden_proto(gethostbyname2_r)
-libc_hidden_proto(gethostbyaddr_r)
-libc_hidden_proto(inet_pton)
-libc_hidden_proto(inet_ntop)
-libc_hidden_proto(strtoul)
-libc_hidden_proto(if_nametoindex)
-libc_hidden_proto(__h_errno_location)
+/* libc_hidden_proto(getservbyname_r) */
+/* libc_hidden_proto(gethostbyname2_r) */
+/* libc_hidden_proto(gethostbyaddr_r) */
+/* libc_hidden_proto(inet_pton) */
+/* libc_hidden_proto(inet_ntop) */
+/* libc_hidden_proto(strtoul) */
+/* libc_hidden_proto(if_nametoindex) */
+/* libc_hidden_proto(__h_errno_location) */
/* libc_hidden_proto(uname) */
#ifdef __UCLIBC_HAS_IPV6__
-libc_hidden_proto(in6addr_loopback)
+/* libc_hidden_proto(in6addr_loopback) */
#endif
#define GAIH_OKIFUNSPEC 0x0100
@@ -774,7 +774,7 @@ static const struct gaih gaih[] = {
{ PF_UNSPEC, NULL }
};
-libc_hidden_proto(freeaddrinfo)
+/* libc_hidden_proto(freeaddrinfo) */
void
freeaddrinfo(struct addrinfo *ai)
{
@@ -788,7 +788,7 @@ freeaddrinfo(struct addrinfo *ai)
}
libc_hidden_def(freeaddrinfo)
-libc_hidden_proto(getaddrinfo)
+/* libc_hidden_proto(getaddrinfo) */
int
getaddrinfo(const char *name, const char *service,
const struct addrinfo *hints, struct addrinfo **pai)
diff --git a/libc/inet/getnetbyad.c b/libc/inet/getnetbyad.c
index c916a18cf..735005a62 100644
--- a/libc/inet/getnetbyad.c
+++ b/libc/inet/getnetbyad.c
@@ -20,9 +20,9 @@
#include <netdb.h>
#include <unistd.h>
-libc_hidden_proto(setnetent)
-libc_hidden_proto(getnetent)
-libc_hidden_proto(endnetent)
+/* libc_hidden_proto(setnetent) */
+/* libc_hidden_proto(getnetent) */
+/* libc_hidden_proto(endnetent) */
extern smallint _net_stayopen attribute_hidden;
diff --git a/libc/inet/getnetbynm.c b/libc/inet/getnetbynm.c
index 9f3655121..d3f283106 100644
--- a/libc/inet/getnetbynm.c
+++ b/libc/inet/getnetbynm.c
@@ -22,9 +22,9 @@
#include <unistd.h>
/* Experimentally off - libc_hidden_proto(strcmp) */
-libc_hidden_proto(setnetent)
-libc_hidden_proto(getnetent)
-libc_hidden_proto(endnetent)
+/* libc_hidden_proto(setnetent) */
+/* libc_hidden_proto(getnetent) */
+/* libc_hidden_proto(endnetent) */
extern smallint _net_stayopen attribute_hidden;
diff --git a/libc/inet/getnetent.c b/libc/inet/getnetent.c
index 5a6af1b5a..746f8b704 100644
--- a/libc/inet/getnetent.c
+++ b/libc/inet/getnetent.c
@@ -23,11 +23,11 @@
#include <arpa/inet.h>
#include <unistd.h>
-libc_hidden_proto(fopen)
+/* libc_hidden_proto(fopen) */
/* libc_hidden_proto(fclose) */
-libc_hidden_proto(inet_network)
-libc_hidden_proto(rewind)
-libc_hidden_proto(fgets)
+/* libc_hidden_proto(inet_network) */
+/* libc_hidden_proto(rewind) */
+/* libc_hidden_proto(fgets) */
/* libc_hidden_proto(abort) */
#include <bits/uClibc_mutex.h>
@@ -44,7 +44,7 @@ static char *net_aliases[MAXALIASES];
smallint _net_stayopen attribute_hidden;
-libc_hidden_proto(setnetent)
+/* libc_hidden_proto(setnetent) */
void setnetent(int f)
{
__UCLIBC_MUTEX_LOCK(mylock);
@@ -58,7 +58,7 @@ void setnetent(int f)
}
libc_hidden_def(setnetent)
-libc_hidden_proto(endnetent)
+/* libc_hidden_proto(endnetent) */
void endnetent(void)
{
__UCLIBC_MUTEX_LOCK(mylock);
@@ -84,7 +84,7 @@ static char * any(register char *cp, char *match)
return ((char *)0);
}
-libc_hidden_proto(getnetent)
+/* libc_hidden_proto(getnetent) */
struct netent *getnetent(void)
{
char *p;
diff --git a/libc/inet/getproto.c b/libc/inet/getproto.c
index 5b34d6de6..837f1315f 100644
--- a/libc/inet/getproto.c
+++ b/libc/inet/getproto.c
@@ -62,12 +62,12 @@
#include <errno.h>
#include <unistd.h>
-libc_hidden_proto(fopen)
+/* libc_hidden_proto(fopen) */
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strpbrk) */
-libc_hidden_proto(atoi)
-libc_hidden_proto(rewind)
-libc_hidden_proto(fgets)
+/* libc_hidden_proto(atoi) */
+/* libc_hidden_proto(rewind) */
+/* libc_hidden_proto(fgets) */
/* libc_hidden_proto(fclose) */
/* libc_hidden_proto(abort) */
@@ -93,7 +93,7 @@ static void __initbuf(void)
}
}
-libc_hidden_proto(setprotoent)
+/* libc_hidden_proto(setprotoent) */
void setprotoent(int f)
{
__UCLIBC_MUTEX_LOCK(mylock);
@@ -106,7 +106,7 @@ void setprotoent(int f)
}
libc_hidden_def(setprotoent)
-libc_hidden_proto(endprotoent)
+/* libc_hidden_proto(endprotoent) */
void endprotoent(void)
{
__UCLIBC_MUTEX_LOCK(mylock);
@@ -119,7 +119,7 @@ void endprotoent(void)
}
libc_hidden_def(endprotoent)
-libc_hidden_proto(getprotoent_r)
+/* libc_hidden_proto(getprotoent_r) */
int getprotoent_r(struct protoent *result_buf,
char *buf, size_t buflen,
struct protoent **result)
@@ -210,7 +210,7 @@ struct protoent * getprotoent(void)
}
-libc_hidden_proto(getprotobyname_r)
+/* libc_hidden_proto(getprotobyname_r) */
int getprotobyname_r(const char *name,
struct protoent *result_buf,
char *buf, size_t buflen,
@@ -247,7 +247,7 @@ struct protoent * getprotobyname(const char *name)
}
-libc_hidden_proto(getprotobynumber_r)
+/* libc_hidden_proto(getprotobynumber_r) */
int getprotobynumber_r (int proto_num,
struct protoent *result_buf,
char *buf, size_t buflen,
diff --git a/libc/inet/getservice.c b/libc/inet/getservice.c
index affdc622f..904f0b79c 100644
--- a/libc/inet/getservice.c
+++ b/libc/inet/getservice.c
@@ -66,11 +66,11 @@
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strpbrk) */
-libc_hidden_proto(fopen)
+/* libc_hidden_proto(fopen) */
/* libc_hidden_proto(fclose) */
-libc_hidden_proto(atoi)
-libc_hidden_proto(rewind)
-libc_hidden_proto(fgets)
+/* libc_hidden_proto(atoi) */
+/* libc_hidden_proto(rewind) */
+/* libc_hidden_proto(fgets) */
/* libc_hidden_proto(abort) */
#include <bits/uClibc_mutex.h>
@@ -96,7 +96,7 @@ static void __initbuf(void)
}
}
-libc_hidden_proto(setservent)
+/* libc_hidden_proto(setservent) */
void setservent(int f)
{
__UCLIBC_MUTEX_LOCK(mylock);
@@ -109,7 +109,7 @@ void setservent(int f)
}
libc_hidden_def(setservent)
-libc_hidden_proto(endservent)
+/* libc_hidden_proto(endservent) */
void endservent(void)
{
__UCLIBC_MUTEX_LOCK(mylock);
@@ -122,7 +122,7 @@ void endservent(void)
}
libc_hidden_def(endservent)
-libc_hidden_proto(getservent_r)
+/* libc_hidden_proto(getservent_r) */
int getservent_r(struct servent * result_buf,
char * buf, size_t buflen,
struct servent ** result)
@@ -213,7 +213,7 @@ struct servent * getservent(void)
return result;
}
-libc_hidden_proto(getservbyname_r)
+/* 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)
@@ -251,7 +251,7 @@ struct servent *getservbyname(const char *name, const char *proto)
}
-libc_hidden_proto(getservbyport_r)
+/* 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)
@@ -273,7 +273,7 @@ int getservbyport_r(int port, const char *proto,
}
libc_hidden_def(getservbyport_r)
-libc_hidden_proto(getservbyport)
+/* libc_hidden_proto(getservbyport) */
struct servent * getservbyport(int port, const char *proto)
{
struct servent *result;
diff --git a/libc/inet/herror.c b/libc/inet/herror.c
index 2c671e9e2..8f993a78c 100644
--- a/libc/inet/herror.c
+++ b/libc/inet/herror.c
@@ -24,7 +24,7 @@
#include <netdb.h>
/* libc_hidden_proto(fprintf) */
-libc_hidden_proto(__h_errno_location)
+/* libc_hidden_proto(__h_errno_location) */
static const char error_msg[] = "Resolver error";
static const char *const h_errlist[] = {
@@ -39,7 +39,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)
+/* libc_hidden_proto(herror) */
void herror(const char *s)
{
static const char colon_space[] = ": ";
diff --git a/libc/inet/hostid.c b/libc/inet/hostid.c
index c472edc4b..748589b86 100644
--- a/libc/inet/hostid.c
+++ b/libc/inet/hostid.c
@@ -19,14 +19,14 @@
#endif
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(open)
+/* libc_hidden_proto(open) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(read)
-libc_hidden_proto(write)
-libc_hidden_proto(getuid)
-libc_hidden_proto(geteuid)
-libc_hidden_proto(gethostbyname_r)
-libc_hidden_proto(gethostname)
+/* libc_hidden_proto(read) */
+/* libc_hidden_proto(write) */
+/* libc_hidden_proto(getuid) */
+/* libc_hidden_proto(geteuid) */
+/* libc_hidden_proto(gethostbyname_r) */
+/* libc_hidden_proto(gethostname) */
#define HOSTID "/etc/hostid"
diff --git a/libc/inet/if_index.c b/libc/inet/if_index.c
index a37c44a81..968cd37c1 100644
--- a/libc/inet/if_index.c
+++ b/libc/inet/if_index.c
@@ -40,7 +40,7 @@
/* Experimentally off - libc_hidden_proto(strncpy) */
/* Experimentally off - libc_hidden_proto(strdup) */
-libc_hidden_proto(ioctl)
+/* libc_hidden_proto(ioctl) */
/* libc_hidden_proto(close) */
#if __ASSUME_NETLINK_SUPPORT
/* Experimentally off - libc_hidden_proto(strndup) */
@@ -48,7 +48,7 @@ libc_hidden_proto(ioctl)
extern int __opensock(void) attribute_hidden;
-libc_hidden_proto(if_nametoindex)
+/* libc_hidden_proto(if_nametoindex) */
unsigned int
if_nametoindex(const char* ifname)
{
@@ -86,7 +86,7 @@ if_nametoindex(const char* ifname)
}
libc_hidden_def(if_nametoindex)
-libc_hidden_proto(if_freenameindex)
+/* libc_hidden_proto(if_freenameindex) */
void
if_freenameindex (struct if_nameindex *ifn)
{
@@ -100,7 +100,7 @@ if_freenameindex (struct if_nameindex *ifn)
}
libc_hidden_def(if_freenameindex)
-libc_hidden_proto(if_nameindex)
+/* libc_hidden_proto(if_nameindex) */
#if !__ASSUME_NETLINK_SUPPORT
struct if_nameindex *
if_nameindex (void)
diff --git a/libc/inet/ifaddrs.c b/libc/inet/ifaddrs.c
index c5467fcca..3afc6b923 100644
--- a/libc/inet/ifaddrs.c
+++ b/libc/inet/ifaddrs.c
@@ -39,15 +39,15 @@
#include "netlinkaccess.h"
-libc_hidden_proto(socket)
+/* libc_hidden_proto(socket) */
/* libc_hidden_proto(close) */
/* Experimentally off - libc_hidden_proto(time) */
-libc_hidden_proto(sendto)
-libc_hidden_proto(recvmsg)
-libc_hidden_proto(bind)
+/* libc_hidden_proto(sendto) */
+/* libc_hidden_proto(recvmsg) */
+/* libc_hidden_proto(bind) */
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(mempcpy) */
-libc_hidden_proto(getsockname)
+/* libc_hidden_proto(getsockname) */
/* libc_hidden_proto(fclose) */
/* libc_hidden_proto(abort) */
diff --git a/libc/inet/in6_addr.c b/libc/inet/in6_addr.c
index c2ab375e6..eb096f9e3 100644
--- a/libc/inet/in6_addr.c
+++ b/libc/inet/in6_addr.c
@@ -24,7 +24,7 @@
#ifdef __UCLIBC_HAS_IPV6__
const struct in6_addr in6addr_any =
{ { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
-libc_hidden_proto(in6addr_loopback)
+/* libc_hidden_proto(in6addr_loopback) */
const struct in6_addr in6addr_loopback =
{ { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } };
libc_hidden_data_def(in6addr_loopback)
diff --git a/libc/inet/inet_net.c b/libc/inet/inet_net.c
index 93457e7ae..477d67dc9 100644
--- a/libc/inet/inet_net.c
+++ b/libc/inet/inet_net.c
@@ -49,7 +49,7 @@
* The library routines call this routine to interpret
* network numbers.
*/
-libc_hidden_proto(inet_network)
+/* libc_hidden_proto(inet_network) */
in_addr_t
inet_network(const char *cp)
{
diff --git a/libc/inet/ntop.c b/libc/inet/ntop.c
index f19556dcd..dbc71815a 100644
--- a/libc/inet/ntop.c
+++ b/libc/inet/ntop.c
@@ -35,8 +35,8 @@
/* Experimentally off - libc_hidden_proto(strchr) */
/* Experimentally off - libc_hidden_proto(strcpy) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(sprintf)
-libc_hidden_proto(tolower)
+/* libc_hidden_proto(sprintf) */
+/* libc_hidden_proto(tolower) */
/*
* WARNING: Don't even consider trying to compile this on a system where
@@ -358,7 +358,7 @@ inet_pton6(const char *src, u_char *dst)
* author:
* Paul Vixie, 1996.
*/
-libc_hidden_proto(inet_ntop)
+/* libc_hidden_proto(inet_ntop) */
const char *
inet_ntop(int af, const void *src, char *dst, socklen_t size)
{
@@ -389,7 +389,7 @@ libc_hidden_def(inet_ntop)
* author:
* Paul Vixie, 1996.
*/
-libc_hidden_proto(inet_pton)
+/* libc_hidden_proto(inet_pton) */
int
inet_pton(int af, const char *src, void *dst)
{
diff --git a/libc/inet/opensock.c b/libc/inet/opensock.c
index a2c09dcf5..e80efb378 100644
--- a/libc/inet/opensock.c
+++ b/libc/inet/opensock.c
@@ -25,7 +25,7 @@
#include <features.h>
#include <libc-internal.h>
-libc_hidden_proto(socket)
+/* libc_hidden_proto(socket) */
/* Return a socket of any type. The socket can be used in subsequent
ioctl calls to talk to the kernel. */
diff --git a/libc/inet/rpc/auth_none.c b/libc/inet/rpc/auth_none.c
index 05851025f..478315b8f 100644
--- a/libc/inet/rpc/auth_none.c
+++ b/libc/inet/rpc/auth_none.c
@@ -39,8 +39,8 @@
#include <features.h>
#include "rpc_private.h"
-libc_hidden_proto(xdrmem_create)
-libc_hidden_proto(xdr_opaque_auth)
+/* libc_hidden_proto(xdrmem_create) */
+/* libc_hidden_proto(xdr_opaque_auth) */
#define MAX_MARSHAL_SIZE 20
@@ -74,7 +74,7 @@ struct authnone_private_s {
static struct authnone_private_s *authnone_private;
#endif
-libc_hidden_proto(authnone_create)
+/* libc_hidden_proto(authnone_create) */
AUTH *
authnone_create (void)
{
diff --git a/libc/inet/rpc/auth_unix.c b/libc/inet/rpc/auth_unix.c
index 52d9fc770..9f5d8b4d7 100644
--- a/libc/inet/rpc/auth_unix.c
+++ b/libc/inet/rpc/auth_unix.c
@@ -57,20 +57,20 @@
#endif
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(sysconf)
-libc_hidden_proto(getegid)
-libc_hidden_proto(geteuid)
-libc_hidden_proto(getgroups)
-libc_hidden_proto(gethostname)
-libc_hidden_proto(xdrmem_create)
-libc_hidden_proto(xdr_authunix_parms)
-libc_hidden_proto(xdr_opaque_auth)
-libc_hidden_proto(gettimeofday)
-libc_hidden_proto(fputs)
-libc_hidden_proto(perror)
+/* libc_hidden_proto(sysconf) */
+/* libc_hidden_proto(getegid) */
+/* libc_hidden_proto(geteuid) */
+/* libc_hidden_proto(getgroups) */
+/* libc_hidden_proto(gethostname) */
+/* libc_hidden_proto(xdrmem_create) */
+/* libc_hidden_proto(xdr_authunix_parms) */
+/* libc_hidden_proto(xdr_opaque_auth) */
+/* libc_hidden_proto(gettimeofday) */
+/* libc_hidden_proto(fputs) */
+/* libc_hidden_proto(perror) */
/* libc_hidden_proto(abort) */
#ifdef USE_IN_LIBIO
-libc_hidden_proto(fwprintf)
+/* libc_hidden_proto(fwprintf) */
#endif
/*
@@ -109,7 +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)
+/* libc_hidden_proto(authunix_create) */
AUTH *
authunix_create (char *machname, uid_t uid, gid_t gid, int len,
gid_t *aup_gids)
@@ -182,7 +182,7 @@ libc_hidden_def(authunix_create)
* Returns an auth handle with parameters determined by doing lots of
* syscalls.
*/
-libc_hidden_proto(authunix_create_default)
+/* libc_hidden_proto(authunix_create_default) */
AUTH *
authunix_create_default (void)
{
diff --git a/libc/inet/rpc/authunix_prot.c b/libc/inet/rpc/authunix_prot.c
index 62d1cb724..2739e7658 100644
--- a/libc/inet/rpc/authunix_prot.c
+++ b/libc/inet/rpc/authunix_prot.c
@@ -39,17 +39,17 @@
#include <rpc/auth.h>
#include <rpc/auth_unix.h>
-libc_hidden_proto(xdr_string)
-libc_hidden_proto(xdr_u_int)
-libc_hidden_proto(xdr_array)
-libc_hidden_proto(xdr_u_long)
-libc_hidden_proto(xdr_u_short)
+/* libc_hidden_proto(xdr_string) */
+/* libc_hidden_proto(xdr_u_int) */
+/* libc_hidden_proto(xdr_array) */
+/* libc_hidden_proto(xdr_u_long) */
+/* libc_hidden_proto(xdr_u_short) */
/*
* XDR for unix authentication parameters.
* Unfortunately, none of these can be declared const.
*/
-libc_hidden_proto(xdr_authunix_parms)
+/* libc_hidden_proto(xdr_authunix_parms) */
bool_t
xdr_authunix_parms (XDR * xdrs, struct authunix_parms *p)
{
diff --git a/libc/inet/rpc/bindresvport.c b/libc/inet/rpc/bindresvport.c
index 3f266e6cc..b9e77f3cd 100644
--- a/libc/inet/rpc/bindresvport.c
+++ b/libc/inet/rpc/bindresvport.c
@@ -41,13 +41,13 @@
#include <netinet/in.h>
/* Experimentally off - libc_hidden_proto(memset) */
-libc_hidden_proto(bind)
-libc_hidden_proto(getpid)
+/* libc_hidden_proto(bind) */
+/* libc_hidden_proto(getpid) */
/*
* Bind a socket to a privileged IP port
*/
-libc_hidden_proto(bindresvport)
+/* libc_hidden_proto(bindresvport) */
int
bindresvport (int sd, struct sockaddr_in *sin)
{
diff --git a/libc/inet/rpc/clnt_generic.c b/libc/inet/rpc/clnt_generic.c
index 54bd0e914..165f42aeb 100644
--- a/libc/inet/rpc/clnt_generic.c
+++ b/libc/inet/rpc/clnt_generic.c
@@ -44,12 +44,12 @@
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strcpy) */
-libc_hidden_proto(clnttcp_create)
-libc_hidden_proto(clntudp_create)
-libc_hidden_proto(clntunix_create)
-libc_hidden_proto(getprotobyname_r)
-libc_hidden_proto(gethostbyname_r)
-libc_hidden_proto(__rpc_thread_createerr)
+/* libc_hidden_proto(clnttcp_create) */
+/* libc_hidden_proto(clntudp_create) */
+/* libc_hidden_proto(clntunix_create) */
+/* libc_hidden_proto(getprotobyname_r) */
+/* libc_hidden_proto(gethostbyname_r) */
+/* libc_hidden_proto(__rpc_thread_createerr) */
/*
* Generic client creation: takes (hostname, program-number, protocol) and
diff --git a/libc/inet/rpc/clnt_perror.c b/libc/inet/rpc/clnt_perror.c
index 7e6c907ce..201a3a353 100644
--- a/libc/inet/rpc/clnt_perror.c
+++ b/libc/inet/rpc/clnt_perror.c
@@ -53,11 +53,11 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";
/* Experimentally off - libc_hidden_proto(strcpy) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(sprintf)
-libc_hidden_proto(__glibc_strerror_r)
-libc_hidden_proto(fputs)
+/* libc_hidden_proto(sprintf) */
+/* libc_hidden_proto(__glibc_strerror_r) */
+/* libc_hidden_proto(fputs) */
#ifdef USE_IN_LIBIO
-libc_hidden_proto(fwprintf)
+/* libc_hidden_proto(fwprintf) */
#endif
static char *auth_errmsg (enum auth_stat stat) internal_function;
@@ -186,7 +186,7 @@ static const struct rpc_errtab rpc_errlist[] =
/*
* This interface for use by clntrpc
*/
-libc_hidden_proto(clnt_sperrno)
+/* libc_hidden_proto(clnt_sperrno) */
char *
clnt_sperrno (enum clnt_stat stat)
{
@@ -217,7 +217,7 @@ clnt_perrno (enum clnt_stat num)
/*
* Print reply error info
*/
-libc_hidden_proto(clnt_sperror)
+/* libc_hidden_proto(clnt_sperror) */
char *
clnt_sperror (CLIENT * rpch, const char *msg)
{
@@ -303,7 +303,7 @@ clnt_sperror (CLIENT * rpch, const char *msg)
}
libc_hidden_def(clnt_sperror)
-libc_hidden_proto(clnt_perror)
+/* libc_hidden_proto(clnt_perror) */
void
clnt_perror (CLIENT * rpch, const char *msg)
{
@@ -316,7 +316,7 @@ clnt_perror (CLIENT * rpch, const char *msg)
}
libc_hidden_def(clnt_perror)
-libc_hidden_proto(clnt_spcreateerror)
+/* libc_hidden_proto(clnt_spcreateerror) */
char *
clnt_spcreateerror (const char *msg)
{
diff --git a/libc/inet/rpc/clnt_raw.c b/libc/inet/rpc/clnt_raw.c
index b44bd38b8..91340d85a 100644
--- a/libc/inet/rpc/clnt_raw.c
+++ b/libc/inet/rpc/clnt_raw.c
@@ -48,14 +48,14 @@ static char sccsid[] = "@(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro";
#include <rpc/svc.h>
#include <rpc/xdr.h>
-libc_hidden_proto(perror)
-libc_hidden_proto(authnone_create)
-libc_hidden_proto(xdrmem_create)
-libc_hidden_proto(xdr_callhdr)
-libc_hidden_proto(xdr_replymsg)
-libc_hidden_proto(xdr_opaque_auth)
-libc_hidden_proto(svc_getreq)
-libc_hidden_proto(_seterr_reply)
+/* libc_hidden_proto(perror) */
+/* libc_hidden_proto(authnone_create) */
+/* libc_hidden_proto(xdrmem_create) */
+/* libc_hidden_proto(xdr_callhdr) */
+/* libc_hidden_proto(xdr_replymsg) */
+/* libc_hidden_proto(xdr_opaque_auth) */
+/* libc_hidden_proto(svc_getreq) */
+/* libc_hidden_proto(_seterr_reply) */
#define MCALL_MSG_SIZE 24
diff --git a/libc/inet/rpc/clnt_simple.c b/libc/inet/rpc/clnt_simple.c
index 52fb756a0..938a4d621 100644
--- a/libc/inet/rpc/clnt_simple.c
+++ b/libc/inet/rpc/clnt_simple.c
@@ -54,8 +54,8 @@ static char sccsid[] = "@(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strncpy) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(clntudp_create)
-libc_hidden_proto(gethostbyname_r)
+/* libc_hidden_proto(clntudp_create) */
+/* libc_hidden_proto(gethostbyname_r) */
struct callrpc_private_s
{
diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c
index 473543c9c..622d44552 100644
--- a/libc/inet/rpc/clnt_tcp.c
+++ b/libc/inet/rpc/clnt_tcp.c
@@ -65,28 +65,28 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";
# include <wchar.h>
#endif
-libc_hidden_proto(socket)
-libc_hidden_proto(read)
-libc_hidden_proto(write)
+/* libc_hidden_proto(socket) */
+/* libc_hidden_proto(read) */
+/* libc_hidden_proto(write) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(authnone_create)
-libc_hidden_proto(xdrrec_create)
-libc_hidden_proto(xdrrec_endofrecord)
-libc_hidden_proto(xdrrec_skiprecord)
-libc_hidden_proto(xdr_callhdr)
-libc_hidden_proto(xdr_replymsg)
-libc_hidden_proto(xdr_opaque_auth)
-libc_hidden_proto(xdrmem_create)
-libc_hidden_proto(xdr_void)
-libc_hidden_proto(pmap_getport)
-libc_hidden_proto(_seterr_reply)
-libc_hidden_proto(connect)
-libc_hidden_proto(bindresvport)
-libc_hidden_proto(poll)
-libc_hidden_proto(fputs)
-libc_hidden_proto(__rpc_thread_createerr)
+/* libc_hidden_proto(authnone_create) */
+/* libc_hidden_proto(xdrrec_create) */
+/* libc_hidden_proto(xdrrec_endofrecord) */
+/* libc_hidden_proto(xdrrec_skiprecord) */
+/* libc_hidden_proto(xdr_callhdr) */
+/* libc_hidden_proto(xdr_replymsg) */
+/* libc_hidden_proto(xdr_opaque_auth) */
+/* libc_hidden_proto(xdrmem_create) */
+/* libc_hidden_proto(xdr_void) */
+/* libc_hidden_proto(pmap_getport) */
+/* libc_hidden_proto(_seterr_reply) */
+/* libc_hidden_proto(connect) */
+/* libc_hidden_proto(bindresvport) */
+/* libc_hidden_proto(poll) */
+/* libc_hidden_proto(fputs) */
+/* libc_hidden_proto(__rpc_thread_createerr) */
#ifdef USE_IN_LIBIO
-libc_hidden_proto(fwprintf)
+/* libc_hidden_proto(fwprintf) */
#endif
extern u_long _create_xid (void) attribute_hidden;
@@ -141,7 +141,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)
+/* 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)
diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c
index 8e6d74b5e..84eb5ed10 100644
--- a/libc/inet/rpc/clnt_udp.c
+++ b/libc/inet/rpc/clnt_udp.c
@@ -54,7 +54,7 @@ static char sccsid[] = "@(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";
#include <net/if.h>
#ifdef USE_IN_LIBIO
# include <wchar.h>
-libc_hidden_proto(fwprintf)
+/* libc_hidden_proto(fwprintf) */
#endif
#ifdef IP_RECVERR
@@ -63,27 +63,27 @@ libc_hidden_proto(fwprintf)
#endif
/* Experimentally off - libc_hidden_proto(memcmp) */
-libc_hidden_proto(ioctl)
-libc_hidden_proto(socket)
+/* libc_hidden_proto(ioctl) */
+/* libc_hidden_proto(socket) */
/* libc_hidden_proto(close) */
/* CMSG_NXTHDR is using it */
-libc_hidden_proto(__cmsg_nxthdr)
-
-libc_hidden_proto(authnone_create)
-libc_hidden_proto(xdrmem_create)
-libc_hidden_proto(xdr_callhdr)
-libc_hidden_proto(xdr_replymsg)
-libc_hidden_proto(xdr_opaque_auth)
-libc_hidden_proto(pmap_getport)
-libc_hidden_proto(_seterr_reply)
-libc_hidden_proto(setsockopt)
-libc_hidden_proto(bindresvport)
-libc_hidden_proto(recvfrom)
-libc_hidden_proto(sendto)
-libc_hidden_proto(recvmsg)
-libc_hidden_proto(poll)
-libc_hidden_proto(fputs)
-libc_hidden_proto(__rpc_thread_createerr)
+/* libc_hidden_proto(__cmsg_nxthdr) */
+
+/* libc_hidden_proto(authnone_create) */
+/* libc_hidden_proto(xdrmem_create) */
+/* libc_hidden_proto(xdr_callhdr) */
+/* libc_hidden_proto(xdr_replymsg) */
+/* libc_hidden_proto(xdr_opaque_auth) */
+/* libc_hidden_proto(pmap_getport) */
+/* libc_hidden_proto(_seterr_reply) */
+/* libc_hidden_proto(setsockopt) */
+/* libc_hidden_proto(bindresvport) */
+/* libc_hidden_proto(recvfrom) */
+/* libc_hidden_proto(sendto) */
+/* libc_hidden_proto(recvmsg) */
+/* libc_hidden_proto(poll) */
+/* libc_hidden_proto(fputs) */
+/* libc_hidden_proto(__rpc_thread_createerr) */
extern u_long _create_xid (void) attribute_hidden;
@@ -144,7 +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)
+/* 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,
@@ -245,7 +245,7 @@ fooy:
}
libc_hidden_def(clntudp_bufcreate)
-libc_hidden_proto(clntudp_create)
+/* libc_hidden_proto(clntudp_create) */
CLIENT *
clntudp_create (struct sockaddr_in *raddr, u_long program, u_long version, struct timeval wait, int *sockp)
{
diff --git a/libc/inet/rpc/clnt_unix.c b/libc/inet/rpc/clnt_unix.c
index 902e37317..b412ccb7d 100644
--- a/libc/inet/rpc/clnt_unix.c
+++ b/libc/inet/rpc/clnt_unix.c
@@ -60,33 +60,33 @@
#include <rpc/pmap_clnt.h>
#ifdef USE_IN_LIBIO
# include <wchar.h>
-libc_hidden_proto(fwprintf)
+/* libc_hidden_proto(fwprintf) */
#endif
/* Experimentally off - libc_hidden_proto(strlen) */
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(socket)
+/* libc_hidden_proto(socket) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(getpid)
-libc_hidden_proto(authnone_create)
-libc_hidden_proto(xdrrec_create)
-libc_hidden_proto(xdrrec_endofrecord)
-libc_hidden_proto(xdrrec_skiprecord)
-libc_hidden_proto(xdr_callhdr)
-libc_hidden_proto(xdr_replymsg)
-libc_hidden_proto(xdr_opaque_auth)
-libc_hidden_proto(xdrmem_create)
-libc_hidden_proto(xdr_void)
-libc_hidden_proto(getegid)
-libc_hidden_proto(geteuid)
-libc_hidden_proto(_seterr_reply)
-libc_hidden_proto(setsockopt)
-libc_hidden_proto(connect)
-libc_hidden_proto(recvmsg)
-libc_hidden_proto(sendmsg)
-libc_hidden_proto(poll)
-libc_hidden_proto(fputs)
-libc_hidden_proto(__rpc_thread_createerr)
+/* libc_hidden_proto(getpid) */
+/* libc_hidden_proto(authnone_create) */
+/* libc_hidden_proto(xdrrec_create) */
+/* libc_hidden_proto(xdrrec_endofrecord) */
+/* libc_hidden_proto(xdrrec_skiprecord) */
+/* libc_hidden_proto(xdr_callhdr) */
+/* libc_hidden_proto(xdr_replymsg) */
+/* libc_hidden_proto(xdr_opaque_auth) */
+/* libc_hidden_proto(xdrmem_create) */
+/* libc_hidden_proto(xdr_void) */
+/* libc_hidden_proto(getegid) */
+/* libc_hidden_proto(geteuid) */
+/* libc_hidden_proto(_seterr_reply) */
+/* libc_hidden_proto(setsockopt) */
+/* libc_hidden_proto(connect) */
+/* libc_hidden_proto(recvmsg) */
+/* libc_hidden_proto(sendmsg) */
+/* libc_hidden_proto(poll) */
+/* libc_hidden_proto(fputs) */
+/* libc_hidden_proto(__rpc_thread_createerr) */
extern u_long _create_xid (void) attribute_hidden;
@@ -140,7 +140,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)
+/* 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)
diff --git a/libc/inet/rpc/create_xid.c b/libc/inet/rpc/create_xid.c
index e3ee4799b..be24d660c 100644
--- a/libc/inet/rpc/create_xid.c
+++ b/libc/inet/rpc/create_xid.c
@@ -25,9 +25,9 @@
#include <sys/time.h>
#include <rpc/rpc.h>
-libc_hidden_proto(lrand48_r)
-libc_hidden_proto(srand48_r)
-libc_hidden_proto(gettimeofday)
+/* libc_hidden_proto(lrand48_r) */
+/* libc_hidden_proto(srand48_r) */
+/* libc_hidden_proto(gettimeofday) */
/* The RPC code is not threadsafe, but new code should be threadsafe. */
diff --git a/libc/inet/rpc/get_myaddress.c b/libc/inet/rpc/get_myaddress.c
index 79d48ac4b..0006be803 100644
--- a/libc/inet/rpc/get_myaddress.c
+++ b/libc/inet/rpc/get_myaddress.c
@@ -50,10 +50,10 @@ static char sccsid[] = "@(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro";
#include <netinet/in.h>
#include <arpa/inet.h>
-libc_hidden_proto(ioctl)
-libc_hidden_proto(socket)
+/* libc_hidden_proto(ioctl) */
+/* libc_hidden_proto(socket) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(perror)
+/* libc_hidden_proto(perror) */
/* libc_hidden_proto(exit) */
/*
diff --git a/libc/inet/rpc/getrpcent.c b/libc/inet/rpc/getrpcent.c
index fbf44bec2..2a98544f1 100644
--- a/libc/inet/rpc/getrpcent.c
+++ b/libc/inet/rpc/getrpcent.c
@@ -49,11 +49,11 @@
/* Experimentally off - libc_hidden_proto(strchr) */
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(fopen)
+/* libc_hidden_proto(fopen) */
/* libc_hidden_proto(fclose) */
-libc_hidden_proto(atoi)
-libc_hidden_proto(rewind)
-libc_hidden_proto(fgets)
+/* libc_hidden_proto(atoi) */
+/* libc_hidden_proto(rewind) */
+/* libc_hidden_proto(fgets) */
/*
* Internet version.
@@ -84,7 +84,7 @@ static struct rpcdata *_rpcdata(void)
return d;
}
-libc_hidden_proto(endrpcent)
+/* libc_hidden_proto(endrpcent) */
void endrpcent(void)
{
register struct rpcdata *d = _rpcdata();
@@ -102,7 +102,7 @@ void endrpcent(void)
}
libc_hidden_def(endrpcent)
-libc_hidden_proto(setrpcent)
+/* libc_hidden_proto(setrpcent) */
void setrpcent(int f)
{
register struct rpcdata *d = _rpcdata();
@@ -128,7 +128,7 @@ static struct rpcent *__get_next_rpcent(struct rpcdata *d)
return interpret(d);
}
-libc_hidden_proto(getrpcent)
+/* libc_hidden_proto(getrpcent) */
struct rpcent *getrpcent(void)
{
register struct rpcdata *d = _rpcdata();
@@ -141,7 +141,7 @@ struct rpcent *getrpcent(void)
}
libc_hidden_def(getrpcent)
-libc_hidden_proto(getrpcbynumber)
+/* libc_hidden_proto(getrpcbynumber) */
struct rpcent *getrpcbynumber(register int number)
{
register struct rpcdata *d = _rpcdata();
@@ -159,7 +159,7 @@ struct rpcent *getrpcbynumber(register int number)
}
libc_hidden_def(getrpcbynumber)
-libc_hidden_proto(getrpcbyname)
+/* libc_hidden_proto(getrpcbyname) */
struct rpcent *getrpcbyname(const char *name)
{
struct rpcent *rpc;
diff --git a/libc/inet/rpc/getrpcport.c b/libc/inet/rpc/getrpcport.c
index 0a57d1da9..d831e6719 100644
--- a/libc/inet/rpc/getrpcport.c
+++ b/libc/inet/rpc/getrpcport.c
@@ -49,8 +49,8 @@ static char sccsid[] = "@(#)getrpcport.c 1.3 87/08/11 SMI";
#include <sys/socket.h>
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(pmap_getport)
-libc_hidden_proto(gethostbyname_r)
+/* libc_hidden_proto(pmap_getport) */
+/* libc_hidden_proto(gethostbyname_r) */
int
getrpcport (const char *host, u_long prognum, u_long versnum, u_int proto)
diff --git a/libc/inet/rpc/pm_getmaps.c b/libc/inet/rpc/pm_getmaps.c
index 1760adf37..bcdbbf4e0 100644
--- a/libc/inet/rpc/pm_getmaps.c
+++ b/libc/inet/rpc/pm_getmaps.c
@@ -48,11 +48,11 @@ static char sccsid[] = "@(#)pmap_getmaps.c 1.10 87/08/11 Copyr 1984 Sun Micro";
#include <errno.h>
#include <unistd.h>
-libc_hidden_proto(clnt_perror)
-libc_hidden_proto(clnttcp_create)
-libc_hidden_proto(xdr_pmap)
-libc_hidden_proto(xdr_pmaplist)
-libc_hidden_proto(xdr_void)
+/* libc_hidden_proto(clnt_perror) */
+/* libc_hidden_proto(clnttcp_create) */
+/* libc_hidden_proto(xdr_pmap) */
+/* libc_hidden_proto(xdr_pmaplist) */
+/* libc_hidden_proto(xdr_void) */
/*
* Get a copy of the current port maps.
diff --git a/libc/inet/rpc/pm_getport.c b/libc/inet/rpc/pm_getport.c
index 327fb9101..fa9780c22 100644
--- a/libc/inet/rpc/pm_getport.c
+++ b/libc/inet/rpc/pm_getport.c
@@ -44,10 +44,10 @@ static char sccsid[] = "@(#)pmap_getport.c 1.9 87/08/11 Copyr 1984 Sun Micro";
#include <rpc/pmap_prot.h>
#include <rpc/pmap_clnt.h>
-libc_hidden_proto(clntudp_bufcreate)
-libc_hidden_proto(__rpc_thread_createerr)
-libc_hidden_proto(xdr_u_short)
-libc_hidden_proto(xdr_pmap)
+/* libc_hidden_proto(clntudp_bufcreate) */
+/* libc_hidden_proto(__rpc_thread_createerr) */
+/* libc_hidden_proto(xdr_u_short) */
+/* libc_hidden_proto(xdr_pmap) */
static const struct timeval timeout =
{5, 0};
@@ -59,7 +59,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)
+/* libc_hidden_proto(pmap_getport) */
u_short
pmap_getport (address, program, version, protocol)
struct sockaddr_in *address;
diff --git a/libc/inet/rpc/pmap_clnt.c b/libc/inet/rpc/pmap_clnt.c
index ac1b6b00d..948d9dc2e 100644
--- a/libc/inet/rpc/pmap_clnt.c
+++ b/libc/inet/rpc/pmap_clnt.c
@@ -48,15 +48,15 @@
#include <rpc/pmap_prot.h>
#include <rpc/pmap_clnt.h>
-libc_hidden_proto(ioctl)
-libc_hidden_proto(socket)
+/* libc_hidden_proto(ioctl) */
+/* libc_hidden_proto(socket) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(perror)
+/* libc_hidden_proto(perror) */
/* libc_hidden_proto(exit) */
-libc_hidden_proto(clnt_perror)
-libc_hidden_proto(clntudp_bufcreate)
-libc_hidden_proto(xdr_bool)
-libc_hidden_proto(xdr_pmap)
+/* libc_hidden_proto(clnt_perror) */
+/* libc_hidden_proto(clntudp_bufcreate) */
+/* libc_hidden_proto(xdr_bool) */
+/* libc_hidden_proto(xdr_pmap) */
/*
* Same as get_myaddress, but we try to use the loopback
@@ -122,7 +122,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)
+/* libc_hidden_proto(pmap_set) */
bool_t
pmap_set (u_long program, u_long version, int protocol, u_short port)
{
@@ -159,7 +159,7 @@ 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)
+/* libc_hidden_proto(pmap_unset) */
bool_t
pmap_unset (u_long program, u_long version)
{
diff --git a/libc/inet/rpc/pmap_prot.c b/libc/inet/rpc/pmap_prot.c
index 0ae2c88f3..a5c4d166b 100644
--- a/libc/inet/rpc/pmap_prot.c
+++ b/libc/inet/rpc/pmap_prot.c
@@ -42,9 +42,9 @@ static char sccsid[] = "@(#)pmap_prot.c 1.17 87/08/11 Copyr 1984 Sun Micro";
#include <rpc/xdr.h>
#include <rpc/pmap_prot.h>
-libc_hidden_proto(xdr_u_long)
+/* libc_hidden_proto(xdr_u_long) */
-libc_hidden_proto(xdr_pmap)
+/* libc_hidden_proto(xdr_pmap) */
bool_t
xdr_pmap (xdrs, regs)
XDR *xdrs;
diff --git a/libc/inet/rpc/pmap_prot2.c b/libc/inet/rpc/pmap_prot2.c
index 5adc4ee2e..21def3c4f 100644
--- a/libc/inet/rpc/pmap_prot2.c
+++ b/libc/inet/rpc/pmap_prot2.c
@@ -42,9 +42,9 @@ static char sccsid[] = "@(#)pmap_prot2.c 1.3 87/08/11 Copyr 1984 Sun Micro";
#include <rpc/xdr.h>
#include <rpc/pmap_prot.h>
-libc_hidden_proto(xdr_bool)
-libc_hidden_proto(xdr_reference)
-libc_hidden_proto(xdr_pmap)
+/* libc_hidden_proto(xdr_bool) */
+/* libc_hidden_proto(xdr_reference) */
+/* libc_hidden_proto(xdr_pmap) */
/*
* What is going on with linked lists? (!)
@@ -84,7 +84,7 @@ libc_hidden_proto(xdr_pmap)
* the net, yet is the data that the pointer points to which is interesting;
* this sounds like a job for xdr_reference!
*/
-libc_hidden_proto(xdr_pmaplist)
+/* libc_hidden_proto(xdr_pmaplist) */
bool_t
xdr_pmaplist (xdrs, rp)
XDR *xdrs;
diff --git a/libc/inet/rpc/pmap_rmt.c b/libc/inet/rpc/pmap_rmt.c
index 0701d8ef4..a1f8f71a8 100644
--- a/libc/inet/rpc/pmap_rmt.c
+++ b/libc/inet/rpc/pmap_rmt.c
@@ -60,26 +60,26 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";
#define MAX_BROADCAST_SIZE 1400
/* Experimentally off - libc_hidden_proto(memset) */
-libc_hidden_proto(ioctl)
-libc_hidden_proto(perror)
-libc_hidden_proto(socket)
+/* libc_hidden_proto(ioctl) */
+/* libc_hidden_proto(perror) */
+/* libc_hidden_proto(socket) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(authunix_create_default)
-libc_hidden_proto(xdrmem_create)
-libc_hidden_proto(xdr_callmsg)
-libc_hidden_proto(xdr_replymsg)
-libc_hidden_proto(xdr_reference)
-libc_hidden_proto(xdr_u_long)
-libc_hidden_proto(xdr_void)
-libc_hidden_proto(xdr_rmtcallres)
-libc_hidden_proto(xdr_rmtcall_args)
-libc_hidden_proto(inet_makeaddr)
-libc_hidden_proto(inet_netof)
-libc_hidden_proto(clntudp_create)
-libc_hidden_proto(setsockopt)
-libc_hidden_proto(recvfrom)
-libc_hidden_proto(sendto)
-libc_hidden_proto(poll)
+/* libc_hidden_proto(authunix_create_default) */
+/* libc_hidden_proto(xdrmem_create) */
+/* libc_hidden_proto(xdr_callmsg) */
+/* libc_hidden_proto(xdr_replymsg) */
+/* libc_hidden_proto(xdr_reference) */
+/* libc_hidden_proto(xdr_u_long) */
+/* libc_hidden_proto(xdr_void) */
+/* libc_hidden_proto(xdr_rmtcallres) */
+/* libc_hidden_proto(xdr_rmtcall_args) */
+/* libc_hidden_proto(inet_makeaddr) */
+/* libc_hidden_proto(inet_netof) */
+/* libc_hidden_proto(clntudp_create) */
+/* libc_hidden_proto(setsockopt) */
+/* libc_hidden_proto(recvfrom) */
+/* libc_hidden_proto(sendto) */
+/* libc_hidden_proto(poll) */
/* libc_hidden_proto(fprintf) */
diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c
index 9636f99e6..17af69ee5 100644
--- a/libc/inet/rpc/rcmd.c
+++ b/libc/inet/rpc/rcmd.c
@@ -95,42 +95,42 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94";
/* Experimentally off - libc_hidden_proto(strlen) */
/* Experimentally off - libc_hidden_proto(strncmp) */
/* Experimentally off - libc_hidden_proto(memmove) */
-libc_hidden_proto(getpid)
-libc_hidden_proto(socket)
+/* libc_hidden_proto(getpid) */
+/* libc_hidden_proto(socket) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(fcntl)
-libc_hidden_proto(read)
-libc_hidden_proto(write)
-libc_hidden_proto(perror)
-libc_hidden_proto(lstat)
-libc_hidden_proto(fstat)
-libc_hidden_proto(tolower)
-libc_hidden_proto(sysconf)
-libc_hidden_proto(getline)
-libc_hidden_proto(geteuid)
-libc_hidden_proto(seteuid)
-libc_hidden_proto(getpwnam_r)
-libc_hidden_proto(gethostbyname)
-libc_hidden_proto(gethostbyname_r)
-libc_hidden_proto(fileno)
-libc_hidden_proto(sleep)
-libc_hidden_proto(inet_addr)
-libc_hidden_proto(inet_ntoa)
-libc_hidden_proto(herror)
-libc_hidden_proto(bind)
-libc_hidden_proto(connect)
-libc_hidden_proto(sigblock)
-libc_hidden_proto(snprintf)
-libc_hidden_proto(poll)
-libc_hidden_proto(accept)
-libc_hidden_proto(listen)
-libc_hidden_proto(sigsetmask)
-libc_hidden_proto(getc_unlocked)
-libc_hidden_proto(__fgetc_unlocked)
-libc_hidden_proto(fopen)
+/* libc_hidden_proto(fcntl) */
+/* libc_hidden_proto(read) */
+/* libc_hidden_proto(write) */
+/* libc_hidden_proto(perror) */
+/* libc_hidden_proto(lstat) */
+/* libc_hidden_proto(fstat) */
+/* libc_hidden_proto(tolower) */
+/* libc_hidden_proto(sysconf) */
+/* libc_hidden_proto(getline) */
+/* libc_hidden_proto(geteuid) */
+/* libc_hidden_proto(seteuid) */
+/* libc_hidden_proto(getpwnam_r) */
+/* libc_hidden_proto(gethostbyname) */
+/* libc_hidden_proto(gethostbyname_r) */
+/* libc_hidden_proto(fileno) */
+/* libc_hidden_proto(sleep) */
+/* libc_hidden_proto(inet_addr) */
+/* libc_hidden_proto(inet_ntoa) */
+/* libc_hidden_proto(herror) */
+/* libc_hidden_proto(bind) */
+/* libc_hidden_proto(connect) */
+/* libc_hidden_proto(sigblock) */
+/* libc_hidden_proto(snprintf) */
+/* libc_hidden_proto(poll) */
+/* libc_hidden_proto(accept) */
+/* libc_hidden_proto(listen) */
+/* libc_hidden_proto(sigsetmask) */
+/* libc_hidden_proto(getc_unlocked) */
+/* libc_hidden_proto(__fgetc_unlocked) */
+/* libc_hidden_proto(fopen) */
/* libc_hidden_proto(fclose) */
/* libc_hidden_proto(fprintf) */
-libc_hidden_proto(__h_errno_location)
+/* libc_hidden_proto(__h_errno_location) */
#ifdef __UCLIBC_HAS_XLOCALE__
/* libc_hidden_proto(__ctype_b_loc) */
/* libc_hidden_proto(__ctype_tolower_loc) */
@@ -139,7 +139,7 @@ libc_hidden_proto(__h_errno_location)
/* libc_hidden_proto(__ctype_tolower) */
#endif
-libc_hidden_proto(rresvport)
+/* libc_hidden_proto(rresvport) */
/* some forward declarations */
static int __ivaliduser2(FILE *hostf, u_int32_t raddr,
diff --git a/libc/inet/rpc/rexec.c b/libc/inet/rpc/rexec.c
index d40a04f6a..12df3ab8f 100644
--- a/libc/inet/rpc/rexec.c
+++ b/libc/inet/rpc/rexec.c
@@ -45,23 +45,23 @@
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(strlen) */
/* Experimentally off - libc_hidden_proto(strncpy) */
-libc_hidden_proto(read)
-libc_hidden_proto(write)
+/* libc_hidden_proto(read) */
+/* libc_hidden_proto(write) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(socket)
-libc_hidden_proto(perror)
-libc_hidden_proto(sprintf)
-libc_hidden_proto(snprintf)
-libc_hidden_proto(getsockname)
-libc_hidden_proto(getnameinfo)
-libc_hidden_proto(getaddrinfo)
-libc_hidden_proto(freeaddrinfo)
-libc_hidden_proto(sleep)
-libc_hidden_proto(atoi)
-libc_hidden_proto(connect)
-libc_hidden_proto(accept)
-libc_hidden_proto(listen)
-libc_hidden_proto(ruserpass)
+/* libc_hidden_proto(socket) */
+/* libc_hidden_proto(perror) */
+/* libc_hidden_proto(sprintf) */
+/* libc_hidden_proto(snprintf) */
+/* libc_hidden_proto(getsockname) */
+/* libc_hidden_proto(getnameinfo) */
+/* libc_hidden_proto(getaddrinfo) */
+/* libc_hidden_proto(freeaddrinfo) */
+/* libc_hidden_proto(sleep) */
+/* libc_hidden_proto(atoi) */
+/* libc_hidden_proto(connect) */
+/* libc_hidden_proto(accept) */
+/* libc_hidden_proto(listen) */
+/* libc_hidden_proto(ruserpass) */
#define SA_LEN(_x) __libc_sa_len((_x)->sa_family)
extern int __libc_sa_len (sa_family_t __af) __THROW attribute_hidden;
@@ -69,7 +69,7 @@ extern int __libc_sa_len (sa_family_t __af) __THROW attribute_hidden;
int rexecoptions;
char ahostbuf[NI_MAXHOST] attribute_hidden;
-libc_hidden_proto(rexec_af)
+/* 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)
{
diff --git a/libc/inet/rpc/rpc_cmsg.c b/libc/inet/rpc/rpc_cmsg.c
index 3206aae55..0d8aac627 100644
--- a/libc/inet/rpc/rpc_cmsg.c
+++ b/libc/inet/rpc/rpc_cmsg.c
@@ -46,16 +46,16 @@ static char sccsid[] = "@(#)rpc_callmsg.c 1.4 87/08/11 Copyr 1984 Sun Micro";
#include <rpc/rpc.h>
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(xdr_enum)
-libc_hidden_proto(xdr_opaque)
-libc_hidden_proto(xdr_u_int)
-libc_hidden_proto(xdr_u_long)
-libc_hidden_proto(xdr_opaque_auth)
+/* libc_hidden_proto(xdr_enum) */
+/* libc_hidden_proto(xdr_opaque) */
+/* libc_hidden_proto(xdr_u_int) */
+/* libc_hidden_proto(xdr_u_long) */
+/* libc_hidden_proto(xdr_opaque_auth) */
/*
* XDR a call message
*/
-libc_hidden_proto(xdr_callmsg)
+/* libc_hidden_proto(xdr_callmsg) */
bool_t
xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
{
diff --git a/libc/inet/rpc/rpc_dtablesize.c b/libc/inet/rpc/rpc_dtablesize.c
index 11a7ad457..fe3d4a39f 100644
--- a/libc/inet/rpc/rpc_dtablesize.c
+++ b/libc/inet/rpc/rpc_dtablesize.c
@@ -38,13 +38,13 @@ static char sccsid[] = "@(#)rpc_dtablesize.c 1.2 87/08/11 Copyr 1987 Sun Micro";
#include <unistd.h>
#include <rpc/clnt.h>
-libc_hidden_proto(getdtablesize)
+/* 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)
+/* libc_hidden_proto(_rpc_dtablesize) */
int
_rpc_dtablesize(void)
{
diff --git a/libc/inet/rpc/rpc_private.h b/libc/inet/rpc/rpc_private.h
index 15250059a..24112a468 100644
--- a/libc/inet/rpc/rpc_private.h
+++ b/libc/inet/rpc/rpc_private.h
@@ -4,7 +4,7 @@
/* Now define the internal interfaces. */
extern u_long _create_xid (void) attribute_hidden;
-libc_hidden_proto(__rpc_thread_createerr)
+/* libc_hidden_proto(__rpc_thread_createerr) */
/*
* Multi-threaded support
diff --git a/libc/inet/rpc/rpc_prot.c b/libc/inet/rpc/rpc_prot.c
index 74658e654..ddfabe035 100644
--- a/libc/inet/rpc/rpc_prot.c
+++ b/libc/inet/rpc/rpc_prot.c
@@ -51,11 +51,11 @@ static char sccsid[] = "@(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro";
#include <rpc/rpc.h>
-libc_hidden_proto(xdr_bytes)
-libc_hidden_proto(xdr_union)
-libc_hidden_proto(xdr_enum)
-libc_hidden_proto(xdr_opaque)
-libc_hidden_proto(xdr_u_long)
+/* libc_hidden_proto(xdr_bytes) */
+/* libc_hidden_proto(xdr_union) */
+/* libc_hidden_proto(xdr_enum) */
+/* libc_hidden_proto(xdr_opaque) */
+/* libc_hidden_proto(xdr_u_long) */
/* * * * * * * * * * * * * * XDR Authentication * * * * * * * * * * * */
@@ -63,7 +63,7 @@ libc_hidden_proto(xdr_u_long)
* XDR an opaque authentication struct
* (see auth.h)
*/
-libc_hidden_proto(xdr_opaque_auth)
+/* libc_hidden_proto(xdr_opaque_auth) */
bool_t
xdr_opaque_auth (XDR *xdrs, struct opaque_auth *ap)
{
@@ -89,7 +89,7 @@ xdr_des_block (XDR *xdrs, des_block *blkp)
/*
* XDR the MSG_ACCEPTED part of a reply message union
*/
-libc_hidden_proto(xdr_accepted_reply)
+/* libc_hidden_proto(xdr_accepted_reply) */
bool_t
xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar)
{
@@ -116,7 +116,7 @@ libc_hidden_def(xdr_accepted_reply)
/*
* XDR the MSG_DENIED part of a reply message union
*/
-libc_hidden_proto(xdr_rejected_reply)
+/* libc_hidden_proto(xdr_rejected_reply) */
bool_t
xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr)
{
@@ -146,7 +146,7 @@ static const struct xdr_discrim reply_dscrm[3] =
/*
* XDR a reply message
*/
-libc_hidden_proto(xdr_replymsg)
+/* libc_hidden_proto(xdr_replymsg) */
bool_t
xdr_replymsg (XDR *xdrs, struct rpc_msg *rmsg)
{
@@ -166,7 +166,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)
+/* libc_hidden_proto(xdr_callhdr) */
bool_t
xdr_callhdr (XDR *xdrs, struct rpc_msg *cmsg)
{
@@ -247,7 +247,7 @@ rejected (enum reject_stat rjct_stat,
/*
* given a reply message, fills in the error
*/
-libc_hidden_proto(_seterr_reply)
+/* libc_hidden_proto(_seterr_reply) */
void
_seterr_reply (struct rpc_msg *msg,
struct rpc_err *error)
diff --git a/libc/inet/rpc/rpc_thread.c b/libc/inet/rpc/rpc_thread.c
index 441aa75a8..f95397e72 100644
--- a/libc/inet/rpc/rpc_thread.c
+++ b/libc/inet/rpc/rpc_thread.c
@@ -10,10 +10,10 @@
#include <assert.h>
#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)
+/* 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__
diff --git a/libc/inet/rpc/rtime.c b/libc/inet/rpc/rtime.c
index ab3110543..08bdf9396 100644
--- a/libc/inet/rpc/rtime.c
+++ b/libc/inet/rpc/rtime.c
@@ -58,14 +58,14 @@ static char sccsid[] = "@(#)rtime.c 2.2 88/08/10 4.0 RPCSRC; from 1.8 88/02/08 S
#include <errno.h>
#include <netinet/in.h>
-libc_hidden_proto(read)
-libc_hidden_proto(socket)
+/* libc_hidden_proto(read) */
+/* libc_hidden_proto(socket) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(connect)
-libc_hidden_proto(recvfrom)
-libc_hidden_proto(sendto)
-libc_hidden_proto(poll)
-libc_hidden_proto(rtime)
+/* libc_hidden_proto(connect) */
+/* libc_hidden_proto(recvfrom) */
+/* libc_hidden_proto(sendto) */
+/* libc_hidden_proto(poll) */
+/* libc_hidden_proto(rtime) */
#define NYEARS (u_long)(1970 - 1900)
#define TOFFSET (u_long)(60*60*24*(365*NYEARS + (NYEARS/4)))
diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c
index 47226c55f..3b0dc924a 100644
--- a/libc/inet/rpc/ruserpass.c
+++ b/libc/inet/rpc/ruserpass.c
@@ -49,20 +49,20 @@
/* Experimentally off - libc_hidden_proto(strlen) */
/* Experimentally off - libc_hidden_proto(strcasecmp) */
/* Experimentally off - libc_hidden_proto(strncasecmp) */
-libc_hidden_proto(getenv)
-libc_hidden_proto(printf)
-libc_hidden_proto(fstat)
-libc_hidden_proto(__fsetlocking)
-libc_hidden_proto(getgid)
-libc_hidden_proto(getuid)
-libc_hidden_proto(getegid)
-libc_hidden_proto(geteuid)
-libc_hidden_proto(gethostname)
-libc_hidden_proto(fileno)
-libc_hidden_proto(fopen)
+/* libc_hidden_proto(getenv) */
+/* libc_hidden_proto(printf) */
+/* libc_hidden_proto(fstat) */
+/* libc_hidden_proto(__fsetlocking) */
+/* libc_hidden_proto(getgid) */
+/* libc_hidden_proto(getuid) */
+/* libc_hidden_proto(getegid) */
+/* libc_hidden_proto(geteuid) */
+/* libc_hidden_proto(gethostname) */
+/* libc_hidden_proto(fileno) */
+/* libc_hidden_proto(fopen) */
/* libc_hidden_proto(fclose) */
-libc_hidden_proto(getc_unlocked)
-libc_hidden_proto(__fgetc_unlocked)
+/* libc_hidden_proto(getc_unlocked) */
+/* libc_hidden_proto(__fgetc_unlocked) */
#define _(X) (X)
/* #include "ftp_var.h" */
@@ -114,7 +114,7 @@ static const struct toktab {
/* ruserpass - remote password check.
This function also exists in glibc but is undocumented */
-libc_hidden_proto(ruserpass)
+/* libc_hidden_proto(ruserpass) */
int ruserpass(const char *host, const char **aname, const char **apass)
{
char *hdir, *buf, *tmp;
diff --git a/libc/inet/rpc/svc.c b/libc/inet/rpc/svc.c
index 253c06379..38811f5b7 100644
--- a/libc/inet/rpc/svc.c
+++ b/libc/inet/rpc/svc.c
@@ -47,15 +47,15 @@
#include <sys/poll.h>
/* Experimentally off - libc_hidden_proto(ffs) */
-libc_hidden_proto(pmap_set)
-libc_hidden_proto(pmap_unset)
-libc_hidden_proto(_authenticate)
-libc_hidden_proto(_rpc_dtablesize)
+/* libc_hidden_proto(pmap_set) */
+/* libc_hidden_proto(pmap_unset) */
+/* libc_hidden_proto(_authenticate) */
+/* libc_hidden_proto(_rpc_dtablesize) */
/* used by svc_[max_]pollfd */
-libc_hidden_proto(__rpc_thread_svc_pollfd)
-libc_hidden_proto(__rpc_thread_svc_max_pollfd)
+/* libc_hidden_proto(__rpc_thread_svc_pollfd) */
+/* libc_hidden_proto(__rpc_thread_svc_max_pollfd) */
/* used by svc_fdset */
-libc_hidden_proto(__rpc_thread_svc_fdset)
+/* libc_hidden_proto(__rpc_thread_svc_fdset) */
#ifdef __UCLIBC_HAS_THREADS__
#define xports (*(SVCXPRT ***)&RPC_THREAD_VARIABLE(svc_xports_s))
@@ -85,7 +85,7 @@ static struct svc_callout *svc_head;
/* *************** SVCXPRT related stuff **************** */
/* Activate a transport handle. */
-libc_hidden_proto(xprt_register)
+/* libc_hidden_proto(xprt_register) */
void
xprt_register (SVCXPRT *xprt)
{
@@ -129,7 +129,7 @@ xprt_register (SVCXPRT *xprt)
libc_hidden_def(xprt_register)
/* De-activate a transport handle. */
-libc_hidden_proto(xprt_unregister)
+/* libc_hidden_proto(xprt_unregister) */
void
xprt_unregister (SVCXPRT *xprt)
{
@@ -175,7 +175,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)
+/* libc_hidden_proto(svc_register) */
bool_t
svc_register (SVCXPRT * xprt, rpcprog_t prog, rpcvers_t vers,
void (*dispatch) (struct svc_req *, SVCXPRT *),
@@ -210,7 +210,7 @@ pmap_it:
libc_hidden_def(svc_register)
/* Remove a service program from the callout list. */
-libc_hidden_proto(svc_unregister)
+/* libc_hidden_proto(svc_unregister) */
void
svc_unregister (rpcprog_t prog, rpcvers_t vers)
{
@@ -235,7 +235,7 @@ libc_hidden_def(svc_unregister)
/* ******************* REPLY GENERATION ROUTINES ************ */
/* Send a reply to an rpc request */
-libc_hidden_proto(svc_sendreply)
+/* libc_hidden_proto(svc_sendreply) */
bool_t
svc_sendreply (register SVCXPRT *xprt, xdrproc_t xdr_results,
caddr_t xdr_location)
@@ -266,7 +266,7 @@ svcerr_noproc (register SVCXPRT *xprt)
}
/* Can't decode args error reply */
-libc_hidden_proto(svcerr_decode)
+/* libc_hidden_proto(svcerr_decode) */
void
svcerr_decode (register SVCXPRT *xprt)
{
@@ -294,7 +294,7 @@ svcerr_systemerr (register SVCXPRT *xprt)
}
/* Authentication error reply */
-libc_hidden_proto(svcerr_auth)
+/* libc_hidden_proto(svcerr_auth) */
void
svcerr_auth (SVCXPRT *xprt, enum auth_stat why)
{
@@ -316,7 +316,7 @@ svcerr_weakauth (SVCXPRT *xprt)
}
/* Program unavailable error reply */
-libc_hidden_proto(svcerr_noprog)
+/* libc_hidden_proto(svcerr_noprog) */
void
svcerr_noprog (register SVCXPRT *xprt)
{
@@ -331,7 +331,7 @@ svcerr_noprog (register SVCXPRT *xprt)
libc_hidden_def(svcerr_noprog)
/* Program version mismatch error reply */
-libc_hidden_proto(svcerr_progvers)
+/* libc_hidden_proto(svcerr_progvers) */
void
svcerr_progvers (register SVCXPRT *xprt, rpcvers_t low_vers,
rpcvers_t high_vers)
@@ -366,7 +366,7 @@ libc_hidden_def(svcerr_progvers)
* is mallocated in kernel land.
*/
-libc_hidden_proto(svc_getreq_common)
+/* libc_hidden_proto(svc_getreq_common) */
void
svc_getreq_common (const int fd)
{
@@ -458,7 +458,7 @@ svc_getreq_common (const int fd)
}
libc_hidden_def(svc_getreq_common)
-libc_hidden_proto(svc_getreqset)
+/* libc_hidden_proto(svc_getreqset) */
void
svc_getreqset (fd_set *readfds)
{
@@ -476,7 +476,7 @@ svc_getreqset (fd_set *readfds)
}
libc_hidden_def(svc_getreqset)
-libc_hidden_proto(svc_getreq)
+/* libc_hidden_proto(svc_getreq) */
void
svc_getreq (int rdfds)
{
@@ -488,7 +488,7 @@ svc_getreq (int rdfds)
}
libc_hidden_def(svc_getreq)
-libc_hidden_proto(svc_getreq_poll)
+/* libc_hidden_proto(svc_getreq_poll) */
void
svc_getreq_poll (struct pollfd *pfdp, int pollretval)
{
diff --git a/libc/inet/rpc/svc_auth.c b/libc/inet/rpc/svc_auth.c
index 1a5dcf0ca..52208c1ee 100644
--- a/libc/inet/rpc/svc_auth.c
+++ b/libc/inet/rpc/svc_auth.c
@@ -101,7 +101,7 @@ svcauthsw[] =
* There is an assumption that any flavour less than AUTH_NULL is
* invalid.
*/
-libc_hidden_proto(_authenticate)
+/* libc_hidden_proto(_authenticate) */
enum auth_stat
_authenticate (register struct svc_req *rqst, struct rpc_msg *msg)
{
diff --git a/libc/inet/rpc/svc_authux.c b/libc/inet/rpc/svc_authux.c
index 64c911f93..556cdde30 100644
--- a/libc/inet/rpc/svc_authux.c
+++ b/libc/inet/rpc/svc_authux.c
@@ -47,9 +47,9 @@
#include <rpc/svc.h>
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(printf)
-libc_hidden_proto(xdrmem_create)
-libc_hidden_proto(xdr_authunix_parms)
+/* libc_hidden_proto(printf) */
+/* libc_hidden_proto(xdrmem_create) */
+/* libc_hidden_proto(xdr_authunix_parms) */
/*
* Unix longhand authenticator
diff --git a/libc/inet/rpc/svc_raw.c b/libc/inet/rpc/svc_raw.c
index 0cdbbb89a..075fbad95 100644
--- a/libc/inet/rpc/svc_raw.c
+++ b/libc/inet/rpc/svc_raw.c
@@ -45,9 +45,9 @@ static char sccsid[] = "@(#)svc_raw.c 1.15 87/08/11 Copyr 1984 Sun Micro";
#include "rpc_private.h"
#include <rpc/svc.h>
-libc_hidden_proto(xdrmem_create)
-libc_hidden_proto(xdr_callmsg)
-libc_hidden_proto(xdr_replymsg)
+/* libc_hidden_proto(xdrmem_create) */
+/* libc_hidden_proto(xdr_callmsg) */
+/* libc_hidden_proto(xdr_replymsg) */
/*
* This is the "network" that we will be moving data over
diff --git a/libc/inet/rpc/svc_run.c b/libc/inet/rpc/svc_run.c
index 50e5fcd79..49d52d01b 100644
--- a/libc/inet/rpc/svc_run.c
+++ b/libc/inet/rpc/svc_run.c
@@ -39,12 +39,12 @@
#include <sys/poll.h>
#include <rpc/rpc.h>
-libc_hidden_proto(perror)
-libc_hidden_proto(svc_getreq_poll)
-libc_hidden_proto(poll)
+/* libc_hidden_proto(perror) */
+/* libc_hidden_proto(svc_getreq_poll) */
+/* libc_hidden_proto(poll) */
/* used by svc_[max_]pollfd */
-libc_hidden_proto(__rpc_thread_svc_pollfd)
-libc_hidden_proto(__rpc_thread_svc_max_pollfd)
+/* libc_hidden_proto(__rpc_thread_svc_pollfd) */
+/* libc_hidden_proto(__rpc_thread_svc_max_pollfd) */
/* This function can be used as a signal handler to terminate the
server loop. */
diff --git a/libc/inet/rpc/svc_simple.c b/libc/inet/rpc/svc_simple.c
index a757a281f..d50f014a8 100644
--- a/libc/inet/rpc/svc_simple.c
+++ b/libc/inet/rpc/svc_simple.c
@@ -57,16 +57,16 @@ static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro";
/* Experimentally off - libc_hidden_proto(strdup) */
/* Experimentally off - libc_hidden_proto(memset) */
-libc_hidden_proto(asprintf)
-libc_hidden_proto(fputs)
-libc_hidden_proto(write)
+/* libc_hidden_proto(asprintf) */
+/* libc_hidden_proto(fputs) */
+/* libc_hidden_proto(write) */
/* libc_hidden_proto(exit) */
-libc_hidden_proto(svc_sendreply)
-libc_hidden_proto(svc_register)
-libc_hidden_proto(svcerr_decode)
-libc_hidden_proto(svcudp_create)
-libc_hidden_proto(pmap_unset)
-libc_hidden_proto(xdr_void)
+/* libc_hidden_proto(svc_sendreply) */
+/* libc_hidden_proto(svc_register) */
+/* libc_hidden_proto(svcerr_decode) */
+/* libc_hidden_proto(svcudp_create) */
+/* libc_hidden_proto(pmap_unset) */
+/* libc_hidden_proto(xdr_void) */
struct proglst_
{
diff --git a/libc/inet/rpc/svc_tcp.c b/libc/inet/rpc/svc_tcp.c
index 51b3b764b..0e5c5c727 100644
--- a/libc/inet/rpc/svc_tcp.c
+++ b/libc/inet/rpc/svc_tcp.c
@@ -61,26 +61,26 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(socket)
+/* libc_hidden_proto(socket) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(read)
-libc_hidden_proto(write)
-libc_hidden_proto(perror)
-libc_hidden_proto(xdrrec_create)
-libc_hidden_proto(xdrrec_endofrecord)
-libc_hidden_proto(xdrrec_skiprecord)
-libc_hidden_proto(xdrrec_eof)
-libc_hidden_proto(xdr_callmsg)
-libc_hidden_proto(xdr_replymsg)
-libc_hidden_proto(xprt_register)
-libc_hidden_proto(xprt_unregister)
-libc_hidden_proto(getsockname)
-libc_hidden_proto(bind)
-libc_hidden_proto(bindresvport)
-libc_hidden_proto(poll)
-libc_hidden_proto(accept)
-libc_hidden_proto(listen)
-libc_hidden_proto(fputs)
+/* libc_hidden_proto(read) */
+/* libc_hidden_proto(write) */
+/* libc_hidden_proto(perror) */
+/* libc_hidden_proto(xdrrec_create) */
+/* libc_hidden_proto(xdrrec_endofrecord) */
+/* libc_hidden_proto(xdrrec_skiprecord) */
+/* libc_hidden_proto(xdrrec_eof) */
+/* libc_hidden_proto(xdr_callmsg) */
+/* libc_hidden_proto(xdr_replymsg) */
+/* libc_hidden_proto(xprt_register) */
+/* libc_hidden_proto(xprt_unregister) */
+/* libc_hidden_proto(getsockname) */
+/* libc_hidden_proto(bind) */
+/* libc_hidden_proto(bindresvport) */
+/* libc_hidden_proto(poll) */
+/* libc_hidden_proto(accept) */
+/* libc_hidden_proto(listen) */
+/* libc_hidden_proto(fputs) */
/* libc_hidden_proto(fclose) */
/* libc_hidden_proto(abort) */
diff --git a/libc/inet/rpc/svc_udp.c b/libc/inet/rpc/svc_udp.c
index 0e008868b..866e5275a 100644
--- a/libc/inet/rpc/svc_udp.c
+++ b/libc/inet/rpc/svc_udp.c
@@ -57,29 +57,29 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro";
# include <wchar.h>
# include <libio/iolibio.h>
# define fputs(s, f) _IO_fputs (s, f)
-libc_hidden_proto(fwprintf)
+/* libc_hidden_proto(fwprintf) */
#endif
/* Experimentally off - libc_hidden_proto(memcmp) */
/* Experimentally off - libc_hidden_proto(memcpy) */
/* Experimentally off - libc_hidden_proto(memset) */
-libc_hidden_proto(perror)
-libc_hidden_proto(socket)
+/* libc_hidden_proto(perror) */
+/* libc_hidden_proto(socket) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(xprt_register)
-libc_hidden_proto(xprt_unregister)
-libc_hidden_proto(xdrmem_create)
-libc_hidden_proto(xdr_callmsg)
-libc_hidden_proto(xdr_replymsg)
-libc_hidden_proto(getsockname)
-libc_hidden_proto(setsockopt)
-libc_hidden_proto(bind)
-libc_hidden_proto(bindresvport)
-libc_hidden_proto(recvfrom)
-libc_hidden_proto(sendto)
-libc_hidden_proto(recvmsg)
-libc_hidden_proto(sendmsg)
-libc_hidden_proto(fputs)
+/* libc_hidden_proto(xprt_register) */
+/* libc_hidden_proto(xprt_unregister) */
+/* libc_hidden_proto(xdrmem_create) */
+/* libc_hidden_proto(xdr_callmsg) */
+/* libc_hidden_proto(xdr_replymsg) */
+/* libc_hidden_proto(getsockname) */
+/* libc_hidden_proto(setsockopt) */
+/* libc_hidden_proto(bind) */
+/* libc_hidden_proto(bindresvport) */
+/* libc_hidden_proto(recvfrom) */
+/* libc_hidden_proto(sendto) */
+/* libc_hidden_proto(recvmsg) */
+/* libc_hidden_proto(sendmsg) */
+/* libc_hidden_proto(fputs) */
/* libc_hidden_proto(fprintf) */
#define rpc_buffer(xprt) ((xprt)->xp_p1)
@@ -134,7 +134,7 @@ struct svcudp_data
* see (svc.h, xprt_register).
* The routines returns NULL if a problem occurred.
*/
-libc_hidden_proto(svcudp_bufcreate)
+/* libc_hidden_proto(svcudp_bufcreate) */
SVCXPRT *
svcudp_bufcreate (int sock, u_int sendsz, u_int recvsz)
{
@@ -226,7 +226,7 @@ svcudp_bufcreate (int sock, u_int sendsz, u_int recvsz)
}
libc_hidden_def(svcudp_bufcreate)
-libc_hidden_proto(svcudp_create)
+/* libc_hidden_proto(svcudp_create) */
SVCXPRT *
svcudp_create (int sock)
{
diff --git a/libc/inet/rpc/svc_unix.c b/libc/inet/rpc/svc_unix.c
index 48fba8977..3670bb1ec 100644
--- a/libc/inet/rpc/svc_unix.c
+++ b/libc/inet/rpc/svc_unix.c
@@ -58,29 +58,29 @@
/* Experimentally off - libc_hidden_proto(memcpy) */
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(socket)
+/* libc_hidden_proto(socket) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(perror)
-libc_hidden_proto(getpid)
-libc_hidden_proto(xdrrec_create)
-libc_hidden_proto(xdrrec_endofrecord)
-libc_hidden_proto(xdrrec_skiprecord)
-libc_hidden_proto(xdrrec_eof)
-libc_hidden_proto(xdr_callmsg)
-libc_hidden_proto(xdr_replymsg)
-libc_hidden_proto(xprt_register)
-libc_hidden_proto(xprt_unregister)
-libc_hidden_proto(getegid)
-libc_hidden_proto(geteuid)
-libc_hidden_proto(getsockname)
-libc_hidden_proto(setsockopt)
-libc_hidden_proto(bind)
-libc_hidden_proto(recvmsg)
-libc_hidden_proto(sendmsg)
-libc_hidden_proto(poll)
-libc_hidden_proto(accept)
-libc_hidden_proto(listen)
-libc_hidden_proto(fputs)
+/* libc_hidden_proto(perror) */
+/* libc_hidden_proto(getpid) */
+/* libc_hidden_proto(xdrrec_create) */
+/* libc_hidden_proto(xdrrec_endofrecord) */
+/* libc_hidden_proto(xdrrec_skiprecord) */
+/* libc_hidden_proto(xdrrec_eof) */
+/* libc_hidden_proto(xdr_callmsg) */
+/* libc_hidden_proto(xdr_replymsg) */
+/* libc_hidden_proto(xprt_register) */
+/* libc_hidden_proto(xprt_unregister) */
+/* libc_hidden_proto(getegid) */
+/* libc_hidden_proto(geteuid) */
+/* libc_hidden_proto(getsockname) */
+/* libc_hidden_proto(setsockopt) */
+/* libc_hidden_proto(bind) */
+/* libc_hidden_proto(recvmsg) */
+/* libc_hidden_proto(sendmsg) */
+/* libc_hidden_proto(poll) */
+/* libc_hidden_proto(accept) */
+/* libc_hidden_proto(listen) */
+/* libc_hidden_proto(fputs) */
/* libc_hidden_proto(abort) */
/*
diff --git a/libc/inet/rpc/xdr.c b/libc/inet/rpc/xdr.c
index 54e716176..11e52136d 100644
--- a/libc/inet/rpc/xdr.c
+++ b/libc/inet/rpc/xdr.c
@@ -53,11 +53,11 @@ static char sccsid[] = "@(#)xdr.c 1.35 87/08/12";
#ifdef USE_IN_LIBIO
# include <wchar.h>
-libc_hidden_proto(fwprintf)
+/* libc_hidden_proto(fwprintf) */
#endif
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(fputs)
+/* libc_hidden_proto(fputs) */
/*
* constants specific to the xdr "protocol"
@@ -87,7 +87,7 @@ xdr_free (xdrproc_t proc, char *objp)
/*
* XDR nothing
*/
-libc_hidden_proto(xdr_void)
+/* libc_hidden_proto(xdr_void) */
bool_t
xdr_void (void)
{
@@ -100,7 +100,7 @@ libc_hidden_def(xdr_void)
* The definition of xdr_long() is kept for backward
* compatibility. Instead xdr_int() should be used.
*/
-libc_hidden_proto(xdr_long)
+/* libc_hidden_proto(xdr_long) */
bool_t
xdr_long (XDR *xdrs, long *lp)
{
@@ -123,7 +123,7 @@ libc_hidden_def(xdr_long)
/*
* XDR short integers
*/
-libc_hidden_proto(xdr_short)
+/* libc_hidden_proto(xdr_short) */
bool_t
xdr_short (XDR *xdrs, short *sp)
{
@@ -153,7 +153,7 @@ libc_hidden_def(xdr_short)
/*
* XDR integers
*/
-libc_hidden_proto(xdr_int)
+/* libc_hidden_proto(xdr_int) */
bool_t
xdr_int (XDR *xdrs, int *ip)
{
@@ -192,7 +192,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)
+/* libc_hidden_proto(xdr_u_long) */
bool_t
xdr_u_long (XDR *xdrs, u_long *ulp)
{
@@ -226,7 +226,7 @@ libc_hidden_def(xdr_u_long)
/*
* XDR unsigned integers
*/
-libc_hidden_proto(xdr_u_int)
+/* libc_hidden_proto(xdr_u_int) */
bool_t
xdr_u_int (XDR *xdrs, u_int *up)
{
@@ -263,7 +263,7 @@ 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)
+/* libc_hidden_proto(xdr_hyper) */
bool_t
xdr_hyper (XDR *xdrs, quad_t *llp)
{
@@ -298,7 +298,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)
+/* libc_hidden_proto(xdr_u_hyper) */
bool_t
xdr_u_hyper (XDR *xdrs, u_quad_t *ullp)
{
@@ -343,7 +343,7 @@ xdr_u_longlong_t (XDR *xdrs, u_quad_t *ullp)
/*
* XDR unsigned short integers
*/
-libc_hidden_proto(xdr_u_short)
+/* libc_hidden_proto(xdr_u_short) */
bool_t
xdr_u_short (XDR *xdrs, u_short *usp)
{
@@ -408,7 +408,7 @@ xdr_u_char (XDR *xdrs, u_char *cp)
/*
* XDR booleans
*/
-libc_hidden_proto(xdr_bool)
+/* libc_hidden_proto(xdr_bool) */
bool_t
xdr_bool (XDR *xdrs, bool_t *bp)
{
@@ -438,7 +438,7 @@ libc_hidden_def(xdr_bool)
/*
* XDR enumerations
*/
-libc_hidden_proto(xdr_enum)
+/* libc_hidden_proto(xdr_enum) */
bool_t
xdr_enum (XDR *xdrs, enum_t *ep)
{
@@ -492,7 +492,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)
+/* libc_hidden_proto(xdr_opaque) */
bool_t
xdr_opaque (XDR *xdrs, caddr_t cp, u_int cnt)
{
@@ -544,7 +544,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)
+/* libc_hidden_proto(xdr_bytes) */
bool_t
xdr_bytes (XDR *xdrs, char **cpp, u_int *sizep, u_int maxsize)
{
@@ -628,7 +628,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)
+/* libc_hidden_proto(xdr_union) */
bool_t
xdr_union (XDR *xdrs, enum_t *dscmp, char *unp, const struct xdr_discrim *choices, xdrproc_t dfault)
{
@@ -675,7 +675,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)
+/* libc_hidden_proto(xdr_string) */
bool_t
xdr_string (XDR *xdrs, char **cpp, u_int maxsize)
{
diff --git a/libc/inet/rpc/xdr_array.c b/libc/inet/rpc/xdr_array.c
index a2299b683..ec5c0b367 100644
--- a/libc/inet/rpc/xdr_array.c
+++ b/libc/inet/rpc/xdr_array.c
@@ -51,12 +51,12 @@ static char sccsid[] = "@(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";
#ifdef USE_IN_LIBIO
# include <wchar.h>
-libc_hidden_proto(fwprintf)
+/* libc_hidden_proto(fwprintf) */
#endif
/* Experimentally off - libc_hidden_proto(memset) */
-libc_hidden_proto(fputs)
-libc_hidden_proto(xdr_u_int)
+/* libc_hidden_proto(fputs) */
+/* libc_hidden_proto(xdr_u_int) */
#define LASTUNSIGNED ((u_int)0-1)
@@ -68,7 +68,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)
+/* 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)
{
diff --git a/libc/inet/rpc/xdr_mem.c b/libc/inet/rpc/xdr_mem.c
index b7410c404..451751e45 100644
--- a/libc/inet/rpc/xdr_mem.c
+++ b/libc/inet/rpc/xdr_mem.c
@@ -74,7 +74,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)
+/* libc_hidden_proto(xdrmem_create) */
void
xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op)
{
diff --git a/libc/inet/rpc/xdr_rec.c b/libc/inet/rpc/xdr_rec.c
index ac331c4d3..af5eb5217 100644
--- a/libc/inet/rpc/xdr_rec.c
+++ b/libc/inet/rpc/xdr_rec.c
@@ -57,12 +57,12 @@
# include <wchar.h>
# include <libio/iolibio.h>
# define fputs(s, f) _IO_fputs (s, f)
-libc_hidden_proto(fwprintf)
+/* libc_hidden_proto(fwprintf) */
#endif
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(fputs)
-libc_hidden_proto(lseek)
+/* libc_hidden_proto(fputs) */
+/* libc_hidden_proto(lseek) */
static bool_t xdrrec_getlong (XDR *, long *);
static bool_t xdrrec_putlong (XDR *, const long *);
@@ -146,7 +146,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)
+/* libc_hidden_proto(xdrrec_create) */
void
xdrrec_create (XDR *xdrs, u_int sendsize,
u_int recvsize, caddr_t tcp_handle,
@@ -481,7 +481,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)
+/* libc_hidden_proto(xdrrec_skiprecord) */
bool_t
xdrrec_skiprecord (XDR *xdrs)
{
@@ -505,7 +505,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)
+/* libc_hidden_proto(xdrrec_eof) */
bool_t
xdrrec_eof (XDR *xdrs)
{
@@ -531,7 +531,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)
+/* libc_hidden_proto(xdrrec_endofrecord) */
bool_t
xdrrec_endofrecord (XDR *xdrs, bool_t sendnow)
{
diff --git a/libc/inet/rpc/xdr_reference.c b/libc/inet/rpc/xdr_reference.c
index 6282f9cb1..9cdeed129 100644
--- a/libc/inet/rpc/xdr_reference.c
+++ b/libc/inet/rpc/xdr_reference.c
@@ -52,12 +52,12 @@ static char sccsid[] = "@(#)xdr_reference.c 1.11 87/08/11 SMI";
# include <wchar.h>
# include <libio/iolibio.h>
# define fputs(s, f) _IO_fputs (s, f)
-libc_hidden_proto(fwprintf)
+/* libc_hidden_proto(fwprintf) */
#endif
/* Experimentally off - libc_hidden_proto(memset) */
-libc_hidden_proto(xdr_bool)
-libc_hidden_proto(fputs)
+/* libc_hidden_proto(xdr_bool) */
+/* libc_hidden_proto(fputs) */
#define LASTUNSIGNED ((u_int)0-1)
@@ -70,7 +70,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)
+/* libc_hidden_proto(xdr_reference) */
bool_t
xdr_reference (XDR *xdrs, caddr_t *pp, u_int size, xdrproc_t proc)
{
diff --git a/libc/inet/rpc/xdr_stdio.c b/libc/inet/rpc/xdr_stdio.c
index 32689e132..91ce8b828 100644
--- a/libc/inet/rpc/xdr_stdio.c
+++ b/libc/inet/rpc/xdr_stdio.c
@@ -49,11 +49,11 @@
# define fwrite(p, m, n, s) _IO_fwrite (p, m, n, s)
#endif
-libc_hidden_proto(fread)
-libc_hidden_proto(fwrite)
-libc_hidden_proto(fseek)
-libc_hidden_proto(fflush)
-libc_hidden_proto(ftell)
+/* libc_hidden_proto(fread) */
+/* libc_hidden_proto(fwrite) */
+/* libc_hidden_proto(fseek) */
+/* libc_hidden_proto(fflush) */
+/* libc_hidden_proto(ftell) */
static bool_t xdrstdio_getlong (XDR *, long *);
static bool_t xdrstdio_putlong (XDR *, const long *);
diff --git a/libc/inet/socketcalls.c b/libc/inet/socketcalls.c
index 66cf8f865..483b870d0 100644
--- a/libc/inet/socketcalls.c
+++ b/libc/inet/socketcalls.c
@@ -66,13 +66,13 @@ int __libc_accept(int s, struct sockaddr *addr, socklen_t * addrlen)
}
#endif
-libc_hidden_proto(accept)
+/* libc_hidden_proto(accept) */
weak_alias(__libc_accept,accept)
libc_hidden_weak(accept)
#endif
#ifdef L_bind
-libc_hidden_proto(bind)
+/* libc_hidden_proto(bind) */
#ifdef __NR_bind
_syscall3(int, bind, int, sockfd, const struct sockaddr *, myaddr, socklen_t, addrlen)
#elif defined(__NR_socketcall)
@@ -114,7 +114,7 @@ if (SINGLE_THREAD_P)
#endif
}
#endif
-libc_hidden_proto(connect)
+/* libc_hidden_proto(connect) */
weak_alias(__libc_connect,connect)
libc_hidden_weak(connect)
#endif
@@ -136,7 +136,7 @@ int getpeername(int sockfd, struct sockaddr *addr, socklen_t * paddrlen)
#endif
#ifdef L_getsockname
-libc_hidden_proto(getsockname)
+/* libc_hidden_proto(getsockname) */
#ifdef __NR_getsockname
_syscall3(int, getsockname, int, sockfd, struct sockaddr *, addr, socklen_t *,paddrlen)
#elif defined(__NR_socketcall)
@@ -173,7 +173,7 @@ int getsockopt(int fd, int level, int optname, __ptr_t optval,
#endif
#ifdef L_listen
-libc_hidden_proto(listen)
+/* libc_hidden_proto(listen) */
#ifdef __NR_listen
_syscall2(int, listen, int, sockfd, int, backlog)
#elif defined(__NR_socketcall)
@@ -217,13 +217,13 @@ ssize_t __libc_recv(int sockfd, __ptr_t buffer, size_t len, int flags)
#endif
}
#elif defined(__NR_recvfrom)
-libc_hidden_proto(recvfrom)
+/* libc_hidden_proto(recvfrom) */
ssize_t __libc_recv(int sockfd, __ptr_t buffer, size_t len, int flags)
{
return (recvfrom(sockfd, buffer, len, flags, NULL, NULL));
}
#endif
-libc_hidden_proto(recv)
+/* libc_hidden_proto(recv) */
weak_alias(__libc_recv,recv)
libc_hidden_weak(recv)
#endif
@@ -259,7 +259,7 @@ if (SINGLE_THREAD_P)
#endif
}
#endif
-libc_hidden_proto(recvfrom)
+/* libc_hidden_proto(recvfrom) */
weak_alias(__libc_recvfrom,recvfrom)
libc_hidden_weak(recvfrom)
#endif
@@ -289,7 +289,7 @@ if (SINGLE_THREAD_P)
#endif
}
#endif
-libc_hidden_proto(recvmsg)
+/* libc_hidden_proto(recvmsg) */
weak_alias(__libc_recvmsg,recvmsg)
libc_hidden_weak(recvmsg)
#endif
@@ -321,13 +321,13 @@ if (SINGLE_THREAD_P)
#endif
}
#elif defined(__NR_sendto)
-libc_hidden_proto(sendto)
+/* libc_hidden_proto(sendto) */
ssize_t __libc_send(int sockfd, const void *buffer, size_t len, int flags)
{
return (sendto(sockfd, buffer, len, flags, NULL, 0));
}
#endif
-libc_hidden_proto(send)
+/* libc_hidden_proto(send) */
weak_alias(__libc_send,send)
libc_hidden_weak(send)
#endif
@@ -357,7 +357,7 @@ if (SINGLE_THREAD_P)
#endif
}
#endif
-libc_hidden_proto(sendmsg)
+/* libc_hidden_proto(sendmsg) */
weak_alias(__libc_sendmsg,sendmsg)
libc_hidden_weak(sendmsg)
#endif
@@ -393,13 +393,13 @@ if (SINGLE_THREAD_P)
#endif
}
#endif
-libc_hidden_proto(sendto)
+/* libc_hidden_proto(sendto) */
weak_alias(__libc_sendto,sendto)
libc_hidden_weak(sendto)
#endif
#ifdef L_setsockopt
-libc_hidden_proto(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)
@@ -437,7 +437,7 @@ int shutdown(int sockfd, int how)
#endif
#ifdef L_socket
-libc_hidden_proto(socket)
+/* libc_hidden_proto(socket) */
#ifdef __NR_socket
_syscall3(int, socket, int, family, int, type, int, protocol)
#elif defined(__NR_socketcall)
diff --git a/libc/misc/assert/__assert.c b/libc/misc/assert/__assert.c
index d00cdfac9..c6132924d 100644
--- a/libc/misc/assert/__assert.c
+++ b/libc/misc/assert/__assert.c
@@ -40,7 +40,7 @@
#include <assert.h>
#undef assert
-libc_hidden_proto(__assert)
+/* libc_hidden_proto(__assert) */
#define ASSERT_SHOW_PROGNAME 1
diff --git a/libc/misc/ctype/ctype.c b/libc/misc/ctype/ctype.c
index fc779448e..43f95429a 100644
--- a/libc/misc/ctype/ctype.c
+++ b/libc/misc/ctype/ctype.c
@@ -89,14 +89,17 @@
#undef CTYPE_NAME
#undef ISCTYPE
#undef CTYPE_ALIAS
+#undef CTYPE_DEF
#ifdef __UCLIBC_DO_XLOCALE
#define CTYPE_NAME(X) __is ## X ## _l
#define ISCTYPE(C,F) __isctype_l( C, F, locale_arg)
-#define CTYPE_ALIAS(NAME) strong_alias( __is ## NAME ## _l , is ## NAME ## _l)
+#define CTYPE_ALIAS(NAME) strong_alias( __is ## NAME ## _l , is ## NAME ## _l)
+#define CTYPE_DEF(NAME) libc_hidden_def(is ## NAME ## _l)
#else
#define CTYPE_NAME(X) is ## X
#define ISCTYPE(C,F) __isctype( C, F )
#define CTYPE_ALIAS(NAME)
+#define CTYPE_DEF(NAME) libc_hidden_def(is ## NAME)
#endif
@@ -142,9 +145,9 @@ int CTYPE_NAME(NAME) (int c __LOCALE_PARAM ) \
{ \
CTYPE_BODY(NAME,c,PASTE2(_IS,NAME)) \
} \
+CTYPE_DEF(NAME) \
CTYPE_ALIAS(NAME)
-
#else /* __UCLIBC_HAS_CTYPE_TABLES__ */
#define C_MACRO(X) PASTE2(__C_is,X)(c)
@@ -220,7 +223,7 @@ int CTYPE_NAME(digit) (int C __LOCALE_PARAM)
return __isdigit_int(C); /* C could be invalid. */
#endif
}
-
+CTYPE_DEF(digit)
CTYPE_ALIAS(digit)
#else /* __UCLIBC_HAS_CTYPE_TABLES__ */
@@ -281,7 +284,7 @@ IS_FUNC_BODY(xdigit);
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
/* libc_hidden_proto(__ctype_tolower) */
#endif
-libc_hidden_proto(tolower)
+/* libc_hidden_proto(tolower) */
#ifdef __UCLIBC_HAS_CTYPE_TABLES__
int tolower(int c)
@@ -307,7 +310,7 @@ libc_hidden_def(tolower)
#ifdef L_tolower_l
#undef tolower_l
-libc_hidden_proto(tolower_l)
+/* libc_hidden_proto(tolower_l) */
int tolower_l(int c, __locale_t l)
{
#if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
@@ -326,9 +329,9 @@ weak_alias (tolower_l, __tolower_l)
#ifdef __UCLIBC_HAS_XLOCALE__
/* libc_hidden_proto(__ctype_toupper_loc) */
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
-libc_hidden_proto(__ctype_toupper)
+/* libc_hidden_proto(__ctype_toupper) */
#endif
-libc_hidden_proto(toupper)
+/* libc_hidden_proto(toupper) */
#ifdef __UCLIBC_HAS_CTYPE_TABLES__
int toupper(int c)
@@ -354,7 +357,7 @@ libc_hidden_def(toupper)
#ifdef L_toupper_l
#undef toupper_l
-libc_hidden_proto(toupper_l)
+/* libc_hidden_proto(toupper_l) */
int toupper_l(int c, __locale_t l)
{
#if defined(__UCLIBC_HAS_CTYPE_ENFORCED__)
@@ -379,14 +382,14 @@ int __XL_NPP(isascii)(int c)
#else /* __UCLIBC_HAS_CTYPE_TABLES__ */
-libc_hidden_proto(isascii)
int isascii(int c)
{
return __isascii(c); /* locale-independent */
}
-libc_hidden_def(isascii)
#endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
+CTYPE_DEF(ascii)
+
#endif
/**********************************************************************/
@@ -468,9 +471,7 @@ libc_hidden_def(__ctype_toupper_loc)
/**********************************************************************/
#ifdef L___C_ctype_b
-extern const __ctype_mask_t __C_ctype_b_data[];
-libc_hidden_proto(__C_ctype_b_data)
-const __ctype_mask_t __C_ctype_b_data[] = {
+static const __ctype_mask_t __C_ctype_b_data[] = {
#ifdef __UCLIBC_HAS_CTYPE_SIGNED__
/* -128 M-^@ */ 0,
/* -127 M-^A */ 0,
@@ -858,7 +859,6 @@ const __ctype_mask_t __C_ctype_b_data[] = {
/* 254 M-~ */ 0,
/* 255 M-^? */ 0
};
-libc_hidden_data_def(__C_ctype_b_data)
/* libc_hidden_proto(__C_ctype_b) */
const __ctype_mask_t *__C_ctype_b = __C_ctype_b_data + __UCLIBC_CTYPE_B_TBL_OFFSET;
@@ -875,6 +875,8 @@ libc_hidden_data_def(__ctype_b)
/**********************************************************************/
#ifdef L___C_ctype_tolower
+//vda:TODO: make static
+
extern const __ctype_touplow_t __C_ctype_tolower_data[];
libc_hidden_proto(__C_ctype_tolower_data)
const __ctype_touplow_t __C_ctype_tolower_data[] = {
@@ -980,15 +982,15 @@ const __ctype_touplow_t __C_ctype_tolower_data[] = {
libc_hidden_data_def(__C_ctype_tolower_data)
/* libc_hidden_proto(__C_ctype_tolower) */
-const __ctype_touplow_t *__C_ctype_tolower = __C_ctype_tolower_data
- + __UCLIBC_CTYPE_TO_TBL_OFFSET;
+const __ctype_touplow_t *__C_ctype_tolower =
+ __C_ctype_tolower_data + __UCLIBC_CTYPE_TO_TBL_OFFSET;
libc_hidden_data_def(__C_ctype_tolower)
#ifndef __UCLIBC_HAS_XLOCALE__
/* libc_hidden_proto(__ctype_tolower) */
-const __ctype_touplow_t *__ctype_tolower = __C_ctype_tolower_data
- + __UCLIBC_CTYPE_TO_TBL_OFFSET;
+const __ctype_touplow_t *__ctype_tolower =
+ __C_ctype_tolower_data + __UCLIBC_CTYPE_TO_TBL_OFFSET;
libc_hidden_data_def(__ctype_tolower)
#endif
@@ -997,6 +999,8 @@ libc_hidden_data_def(__ctype_tolower)
/**********************************************************************/
#ifdef L___C_ctype_toupper
+//vda:TODO: make static
+
extern const __ctype_touplow_t __C_ctype_toupper_data[];
libc_hidden_proto(__C_ctype_toupper_data)
const __ctype_touplow_t __C_ctype_toupper_data[] = {
@@ -1102,15 +1106,15 @@ const __ctype_touplow_t __C_ctype_toupper_data[] = {
libc_hidden_data_def(__C_ctype_toupper_data)
/* libc_hidden_proto(__C_ctype_toupper) */
-const __ctype_touplow_t *__C_ctype_toupper = __C_ctype_toupper_data
- + __UCLIBC_CTYPE_TO_TBL_OFFSET;
+const __ctype_touplow_t *__C_ctype_toupper =
+ __C_ctype_toupper_data + __UCLIBC_CTYPE_TO_TBL_OFFSET;
libc_hidden_data_def(__C_ctype_toupper)
#ifndef __UCLIBC_HAS_XLOCALE__
-libc_hidden_proto(__ctype_toupper)
-const __ctype_touplow_t *__ctype_toupper = __C_ctype_toupper_data
- + __UCLIBC_CTYPE_TO_TBL_OFFSET;
+/* libc_hidden_proto(__ctype_toupper) */
+const __ctype_touplow_t *__ctype_toupper =
+ __C_ctype_toupper_data + __UCLIBC_CTYPE_TO_TBL_OFFSET;
libc_hidden_data_def(__ctype_toupper)
#endif
diff --git a/libc/misc/dirent/closedir.c b/libc/misc/dirent/closedir.c
index 747fea836..c1105bfc4 100644
--- a/libc/misc/dirent/closedir.c
+++ b/libc/misc/dirent/closedir.c
@@ -13,7 +13,7 @@
#include <not-cancel.h>
#endif
-libc_hidden_proto(closedir)
+/* libc_hidden_proto(closedir) */
/* libc_hidden_proto(close) */
int closedir(DIR * dir)
diff --git a/libc/misc/dirent/dirfd.c b/libc/misc/dirent/dirfd.c
index c6f46e965..e5b41bc6b 100644
--- a/libc/misc/dirent/dirfd.c
+++ b/libc/misc/dirent/dirfd.c
@@ -8,7 +8,7 @@
#include <errno.h>
#include "dirstream.h"
-libc_hidden_proto(dirfd)
+/* libc_hidden_proto(dirfd) */
int dirfd(DIR * dir)
{
diff --git a/libc/misc/dirent/opendir.c b/libc/misc/dirent/opendir.c
index e8dc85464..86d3abc71 100644
--- a/libc/misc/dirent/opendir.c
+++ b/libc/misc/dirent/opendir.c
@@ -17,12 +17,12 @@
#endif
#include "dirstream.h"
-libc_hidden_proto(opendir)
-libc_hidden_proto(open)
-libc_hidden_proto(fcntl)
+/* libc_hidden_proto(opendir) */
+/* libc_hidden_proto(open) */
+/* libc_hidden_proto(fcntl) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(stat)
-libc_hidden_proto(fstat)
+/* libc_hidden_proto(stat) */
+/* libc_hidden_proto(fstat) */
/* opendir just makes an open() call - it return NULL if it fails
* (open sets errno), otherwise it returns a DIR * pointer.
diff --git a/libc/misc/dirent/readdir.c b/libc/misc/dirent/readdir.c
index 2fb7a7246..e92c4ad58 100644
--- a/libc/misc/dirent/readdir.c
+++ b/libc/misc/dirent/readdir.c
@@ -13,7 +13,7 @@
#include <dirent.h>
#include "dirstream.h"
-libc_hidden_proto(readdir)
+/* libc_hidden_proto(readdir) */
struct dirent *readdir(DIR * dir)
{
diff --git a/libc/misc/dirent/readdir64.c b/libc/misc/dirent/readdir64.c
index e8a29da96..3aaef5139 100644
--- a/libc/misc/dirent/readdir64.c
+++ b/libc/misc/dirent/readdir64.c
@@ -13,7 +13,7 @@
#include <dirent.h>
#include "dirstream.h"
-libc_hidden_proto(readdir64)
+/* libc_hidden_proto(readdir64) */
struct dirent64 *readdir64(DIR * dir)
{
ssize_t bytes;
diff --git a/libc/misc/dirent/readdir64_r.c b/libc/misc/dirent/readdir64_r.c
index 2958b1d1a..d394fdb8f 100644
--- a/libc/misc/dirent/readdir64_r.c
+++ b/libc/misc/dirent/readdir64_r.c
@@ -15,7 +15,7 @@
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(readdir64_r)
+/* libc_hidden_proto(readdir64_r) */
int readdir64_r(DIR *dir, struct dirent64 *entry, struct dirent64 **result)
{
int ret;
diff --git a/libc/misc/dirent/readdir_r.c b/libc/misc/dirent/readdir_r.c
index 194af621f..51f483ba5 100644
--- a/libc/misc/dirent/readdir_r.c
+++ b/libc/misc/dirent/readdir_r.c
@@ -13,7 +13,7 @@
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(readdir_r)
+/* libc_hidden_proto(readdir_r) */
int readdir_r(DIR *dir, struct dirent *entry, struct dirent **result)
{
int ret;
diff --git a/libc/misc/dirent/rewinddir.c b/libc/misc/dirent/rewinddir.c
index 1bbda0809..99aa6b263 100644
--- a/libc/misc/dirent/rewinddir.c
+++ b/libc/misc/dirent/rewinddir.c
@@ -9,7 +9,7 @@
#include <unistd.h>
#include "dirstream.h"
-libc_hidden_proto(lseek)
+/* libc_hidden_proto(lseek) */
/* rewinddir() just does an lseek(fd,0,0) - see close for comments */
void rewinddir(DIR * dir)
diff --git a/libc/misc/dirent/scandir.c b/libc/misc/dirent/scandir.c
index 9b0f7385a..9f1055439 100644
--- a/libc/misc/dirent/scandir.c
+++ b/libc/misc/dirent/scandir.c
@@ -13,10 +13,10 @@
#include "dirstream.h"
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(opendir)
-libc_hidden_proto(closedir)
-libc_hidden_proto(qsort)
-libc_hidden_proto(readdir)
+/* libc_hidden_proto(opendir) */
+/* libc_hidden_proto(closedir) */
+/* libc_hidden_proto(qsort) */
+/* libc_hidden_proto(readdir) */
int scandir(const char *dir, struct dirent ***namelist,
int (*selector) (const struct dirent *),
diff --git a/libc/misc/dirent/scandir64.c b/libc/misc/dirent/scandir64.c
index de294c63a..bbd452d50 100644
--- a/libc/misc/dirent/scandir64.c
+++ b/libc/misc/dirent/scandir64.c
@@ -31,10 +31,10 @@
#include "dirstream.h"
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(opendir)
-libc_hidden_proto(closedir)
-libc_hidden_proto(qsort)
-libc_hidden_proto(readdir64)
+/* libc_hidden_proto(opendir) */
+/* libc_hidden_proto(closedir) */
+/* libc_hidden_proto(qsort) */
+/* libc_hidden_proto(readdir64) */
int scandir64(const char *dir, struct dirent64 ***namelist,
int (*selector) (const struct dirent64 *),
diff --git a/libc/misc/dirent/seekdir.c b/libc/misc/dirent/seekdir.c
index c41844856..19661509d 100644
--- a/libc/misc/dirent/seekdir.c
+++ b/libc/misc/dirent/seekdir.c
@@ -9,7 +9,7 @@
#include <unistd.h>
#include "dirstream.h"
-libc_hidden_proto(lseek)
+/* libc_hidden_proto(lseek) */
void seekdir(DIR * dir, long int offset)
{
diff --git a/libc/misc/elf/dl-iterate-phdr.c b/libc/misc/elf/dl-iterate-phdr.c
index a23ca700d..a2bb9e000 100644
--- a/libc/misc/elf/dl-iterate-phdr.c
+++ b/libc/misc/elf/dl-iterate-phdr.c
@@ -1,23 +1,15 @@
/* Get loaded objects program headers.
- Copyright (C) 2001,2002,2003,2004,2006,2007 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Jakub Jelinek <jakub@redhat.com>, 2001.
-
- 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; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
- */
+
+ Based on GNU C library (file: libc/elf/dl-iteratephdr.c)
+
+ Copyright (C) 2001,2002,2003,2004,2006,2007 Free Software Foundation, Inc.
+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2001.
+
+ Copyright (C) 2008 STMicroelectronics Ltd.
+ Author: Carmelo Amoroso <carmelo.amoroso@st.com>
+
+ Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+*/
#include <link.h>
diff --git a/libc/misc/elf/dl-support.c b/libc/misc/elf/dl-support.c
index b8f0c07a6..2f6682706 100644
--- a/libc/misc/elf/dl-support.c
+++ b/libc/misc/elf/dl-support.c
@@ -1,24 +1,15 @@
-/* Support for dynamic linking code in static libc.
- Copyright (C) 1996-2002, 2003, 2004, 2005 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. */
-
-/* This file defines some things that for the dynamic linker are defined in
- rtld.c and dl-sysdep.c in ways appropriate to bootstrap dynamic linking. */
+/*
+ * Support for dynamic linking code in static libc.
+ * Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ *
+ * Partially based on GNU C Library (file: libc/elf/dl-support.c)
+ *
+ * Copyright (C) 2008 STMicroelectronics Ltd.
+ * Author: Carmelo Amoroso <carmelo.amoroso@st.com>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ *
+ */
#include <assert.h>
#include <tls.h>
@@ -36,10 +27,10 @@ internal_function
_dl_aux_init (ElfW(auxv_t) *av)
{
/* Get the program headers base address from the aux vect */
- GL(dl_phdr) = (ElfW(Phdr) *) av[AT_PHDR].a_un.a_val;
+ _dl_phdr = (ElfW(Phdr) *) av[AT_PHDR].a_un.a_val;
/* Get the number of program headers from the aux vect */
- GL(dl_phnum) = (size_t) av[AT_PHNUM].a_un.a_val;
+ _dl_phnum = (size_t) av[AT_PHNUM].a_un.a_val;
}
/* Initialize static TLS area and DTV for current (only) thread.
diff --git a/libc/misc/error/err.c b/libc/misc/error/err.c
index 517e08630..d30efbe37 100644
--- a/libc/misc/error/err.c
+++ b/libc/misc/error/err.c
@@ -21,16 +21,16 @@
#if defined __USE_BSD
-libc_hidden_proto(vwarn)
-libc_hidden_proto(vwarnx)
-libc_hidden_proto(verr)
-libc_hidden_proto(verrx)
+/* libc_hidden_proto(vwarn) */
+/* libc_hidden_proto(vwarnx) */
+/* libc_hidden_proto(verr) */
+/* libc_hidden_proto(verrx) */
/* libc_hidden_proto(fprintf) */
-libc_hidden_proto(vfprintf)
-libc_hidden_proto(__xpg_strerror_r)
+/* libc_hidden_proto(vfprintf) */
+/* libc_hidden_proto(__xpg_strerror_r) */
/* libc_hidden_proto(exit) */
-libc_hidden_proto(vfprintf)
+/* libc_hidden_proto(vfprintf) */
static void vwarn_work(const char *format, va_list args, int showerr)
{
diff --git a/libc/misc/error/error.c b/libc/misc/error/error.c
index c0f8f8d0a..7518ff5e5 100644
--- a/libc/misc/error/error.c
+++ b/libc/misc/error/error.c
@@ -30,11 +30,11 @@
/* Experimentally off - libc_hidden_proto(strerror) */
/* libc_hidden_proto(fprintf) */
/* libc_hidden_proto(exit) */
-libc_hidden_proto(putc)
-libc_hidden_proto(vfprintf)
-libc_hidden_proto(fflush)
-libc_hidden_proto(fputc)
-libc_hidden_proto(__fputc_unlocked)
+/* libc_hidden_proto(putc) */
+/* libc_hidden_proto(vfprintf) */
+/* libc_hidden_proto(fflush) */
+/* libc_hidden_proto(fputc) */
+/* libc_hidden_proto(__fputc_unlocked) */
/* This variable is incremented each time `error' is called. */
unsigned int error_message_count = 0;
diff --git a/libc/misc/file/lockf.c b/libc/misc/file/lockf.c
index 13b56aba4..58fcdad0a 100644
--- a/libc/misc/file/lockf.c
+++ b/libc/misc/file/lockf.c
@@ -24,11 +24,11 @@
#include <errno.h>
#include <string.h>
-libc_hidden_proto(lockf)
+/* libc_hidden_proto(lockf) */
/* Experimentally off - libc_hidden_proto(memset) */
-libc_hidden_proto(fcntl)
-libc_hidden_proto(getpid)
+/* libc_hidden_proto(fcntl) */
+/* libc_hidden_proto(getpid) */
/* lockf is a simplified interface to fcntl's locking facilities. */
diff --git a/libc/misc/file/lockf64.c b/libc/misc/file/lockf64.c
index b2ffe5d8c..e4f6f5cce 100644
--- a/libc/misc/file/lockf64.c
+++ b/libc/misc/file/lockf64.c
@@ -32,17 +32,17 @@
#define F_GETLK F_GETLK64
#undef F_SETLK
#define F_SETLK F_SETLK64
-libc_hidden_proto(fcntl64)
+/* libc_hidden_proto(fcntl64) */
#else
-libc_hidden_proto(fcntl)
+/* libc_hidden_proto(fcntl) */
#endif
/* Experimentally off - libc_hidden_proto(memset) */
-libc_hidden_proto(getpid)
+/* libc_hidden_proto(getpid) */
/* lockf is a simplified interface to fcntl's locking facilities. */
-libc_hidden_proto(lockf64)
+/* libc_hidden_proto(lockf64) */
int lockf64 (int fd, int cmd, off64_t len64)
{
struct flock fl;
diff --git a/libc/misc/fnmatch/fnmatch.c b/libc/misc/fnmatch/fnmatch.c
index 351abaf73..ed86fe861 100644
--- a/libc/misc/fnmatch/fnmatch.c
+++ b/libc/misc/fnmatch/fnmatch.c
@@ -71,9 +71,9 @@
/* libc_hidden_proto(__ctype_b) */
/* libc_hidden_proto(__ctype_tolower) */
#endif
-libc_hidden_proto(tolower)
-libc_hidden_proto(fnmatch)
-libc_hidden_proto(getenv)
+/* libc_hidden_proto(tolower) */
+/* libc_hidden_proto(fnmatch) */
+/* libc_hidden_proto(getenv) */
#endif
/* For platform which support the ISO C amendement 1 functionality we
@@ -83,19 +83,19 @@ libc_hidden_proto(getenv)
# include <wchar.h>
# include <wctype.h>
# ifdef __UCLIBC__
-libc_hidden_proto(wctype)
-libc_hidden_proto(iswctype)
-libc_hidden_proto(btowc)
+/* libc_hidden_proto(wctype) */
+/* libc_hidden_proto(iswctype) */
+/* libc_hidden_proto(btowc) */
# ifdef __UCLIBC_HAS_LOCALE__
-libc_hidden_proto(wmemchr)
-libc_hidden_proto(wmempcpy)
-libc_hidden_proto(wcscat)
-/*libc_hidden_proto(wcschr)*/
-/*libc_hidden_proto(wcschrnul)*/
-libc_hidden_proto(wcslen)
-libc_hidden_proto(wcscoll)
-libc_hidden_proto(towlower)
-libc_hidden_proto(mbsrtowcs)
+/* libc_hidden_proto(wmemchr) */
+/* libc_hidden_proto(wmempcpy) */
+/* libc_hidden_proto(wcscat) */
+/* libc_hidden_proto(wcschr) */
+/* libc_hidden_proto(wcschrnul) */
+/* libc_hidden_proto(wcslen) */
+/* libc_hidden_proto(wcscoll) */
+/* libc_hidden_proto(towlower) */
+/* libc_hidden_proto(mbsrtowcs) */
# endif
# endif
#endif
@@ -369,7 +369,7 @@ is_char_class (const wchar_t *wcs)
# endif
#ifdef __UCLIBC_HAS_WCHAR__
-libc_hidden_proto(_stdlib_mb_cur_max)
+/* libc_hidden_proto(_stdlib_mb_cur_max) */
#else
#undef MB_CUR_MAX
#define MB_CUR_MAX 1
diff --git a/libc/misc/fnmatch/fnmatch_old.c b/libc/misc/fnmatch/fnmatch_old.c
index 577e35676..839c77579 100644
--- a/libc/misc/fnmatch/fnmatch_old.c
+++ b/libc/misc/fnmatch/fnmatch_old.c
@@ -23,9 +23,9 @@ Cambridge, MA 02139, USA. */
#include <fnmatch.h>
#include <ctype.h>
-libc_hidden_proto(fnmatch)
+/* libc_hidden_proto(fnmatch) */
-libc_hidden_proto(tolower)
+/* libc_hidden_proto(tolower) */
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
Library, but also included in many other GNU distributions. Compiling
diff --git a/libc/misc/ftw/ftw.c b/libc/misc/ftw/ftw.c
index c136f1e8d..afc55f88a 100644
--- a/libc/misc/ftw/ftw.c
+++ b/libc/misc/ftw/ftw.c
@@ -86,24 +86,24 @@ char *alloca ();
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(strchr) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(dirfd)
-libc_hidden_proto(tsearch)
-libc_hidden_proto(tfind)
-libc_hidden_proto(tdestroy)
-libc_hidden_proto(getcwd)
-libc_hidden_proto(chdir)
-libc_hidden_proto(fchdir)
+/* libc_hidden_proto(dirfd) */
+/* libc_hidden_proto(tsearch) */
+/* libc_hidden_proto(tfind) */
+/* libc_hidden_proto(tdestroy) */
+/* libc_hidden_proto(getcwd) */
+/* libc_hidden_proto(chdir) */
+/* libc_hidden_proto(fchdir) */
/* Experimentally off - libc_hidden_proto(mempcpy) */
-libc_hidden_proto(opendir)
+/* libc_hidden_proto(opendir) */
#ifdef __UCLIBC_HAS_LFS__
-libc_hidden_proto(readdir64)
-libc_hidden_proto(lstat64)
-libc_hidden_proto(stat64)
+/* libc_hidden_proto(readdir64) */
+/* libc_hidden_proto(lstat64) */
+/* libc_hidden_proto(stat64) */
#endif
-libc_hidden_proto(closedir)
+/* libc_hidden_proto(closedir) */
/* Experimentally off - libc_hidden_proto(stpcpy) */
-libc_hidden_proto(lstat)
-libc_hidden_proto(stat)
+/* libc_hidden_proto(lstat) */
+/* libc_hidden_proto(stat) */
#if ! _LIBC && !HAVE_DECL_STPCPY && !defined stpcpy
char *stpcpy ();
diff --git a/libc/misc/glob/glob-susv3.c b/libc/misc/glob/glob-susv3.c
index 00963c36e..8ee0f1a37 100644
--- a/libc/misc/glob/glob-susv3.c
+++ b/libc/misc/glob/glob-susv3.c
@@ -29,10 +29,10 @@
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strcpy) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(opendir)
-libc_hidden_proto(closedir)
-libc_hidden_proto(qsort)
-libc_hidden_proto(fnmatch)
+/* libc_hidden_proto(opendir) */
+/* libc_hidden_proto(closedir) */
+/* libc_hidden_proto(qsort) */
+/* libc_hidden_proto(fnmatch) */
struct match
{
@@ -53,12 +53,12 @@ extern int __glob_match_in_dir(const char *d, const char *p, int flags, int (*er
# define stat stat64
# define readdir_r readdir64_r
# define dirent dirent64
-libc_hidden_proto(readdir64_r)
-libc_hidden_proto(stat64)
+/* libc_hidden_proto(readdir64_r) */
+/* libc_hidden_proto(stat64) */
# define struct_stat struct stat64
#else
-libc_hidden_proto(readdir_r)
-libc_hidden_proto(stat)
+/* libc_hidden_proto(readdir_r) */
+/* libc_hidden_proto(stat) */
# define struct_stat struct stat
#endif
@@ -224,9 +224,9 @@ int __glob_sort(const void *a, const void *b)
#endif /* !__GLOB64 */
#ifdef __GLOB64
-libc_hidden_proto(glob64)
+/* libc_hidden_proto(glob64) */
#else
-libc_hidden_proto(glob)
+/* libc_hidden_proto(glob) */
#endif
int glob(const char *pat, int flags, int (*errfunc)(const char *path, int err), glob_t *g)
{
@@ -302,9 +302,9 @@ libc_hidden_def(glob)
#endif
#ifdef __GLOB64
-libc_hidden_proto(globfree64)
+/* libc_hidden_proto(globfree64) */
#else
-libc_hidden_proto(globfree)
+/* libc_hidden_proto(globfree) */
#endif
void globfree(glob_t *g)
{
diff --git a/libc/misc/glob/glob.c b/libc/misc/glob/glob.c
index 6ccbda4d7..5736f4981 100644
--- a/libc/misc/glob/glob.c
+++ b/libc/misc/glob/glob.c
@@ -31,13 +31,13 @@
#include <fnmatch.h>
#include <glob.h>
-libc_hidden_proto(closedir)
-libc_hidden_proto(fnmatch)
+/* libc_hidden_proto(closedir) */
+/* libc_hidden_proto(fnmatch) */
/* Experimentally off - libc_hidden_proto(memcpy) */
/* Experimentally off - libc_hidden_proto(mempcpy) */
-libc_hidden_proto(opendir)
-libc_hidden_proto(qsort)
-libc_hidden_proto(readdir)
+/* libc_hidden_proto(opendir) */
+/* libc_hidden_proto(qsort) */
+/* libc_hidden_proto(readdir) */
/* Experimentally off - libc_hidden_proto(strchr) */
/* Experimentally off - libc_hidden_proto(strcoll) */
/* Experimentally off - libc_hidden_proto(strcpy) */
@@ -48,7 +48,7 @@ libc_hidden_proto(readdir)
#ifdef ENABLE_GLOB_TILDE_EXPANSION
#include <pwd.h>
-libc_hidden_proto(getpwnam_r)
+/* libc_hidden_proto(getpwnam_r) */
#endif
#ifdef COMPILE_GLOB64
@@ -62,19 +62,19 @@ libc_hidden_proto(getpwnam_r)
#define glob_t glob64_t
#define glob(pattern, flags, errfunc, pglob) glob64 (pattern, flags, errfunc, pglob)
#define globfree(pglob) globfree64 (pglob)
-libc_hidden_proto(stat64)
-libc_hidden_proto(readdir64)
+/* libc_hidden_proto(stat64) */
+/* libc_hidden_proto(readdir64) */
#else
#define __readdir readdir
#ifdef __UCLIBC_HAS_LFS__
#define __readdir64 readdir64
-libc_hidden_proto(readdir64)
+/* libc_hidden_proto(readdir64) */
#else
#define __readdir64 readdir
#endif
#define struct_stat64 struct stat
#define __stat64(fname, buf) stat (fname, buf)
-libc_hidden_proto(stat)
+/* libc_hidden_proto(stat) */
#endif
@@ -132,7 +132,7 @@ extern int __prefix_array (const char *dirname, char **array, size_t n) attribut
extern const char *__next_brace_sub (const char *cp, int flags) attribute_hidden;
#endif
-libc_hidden_proto(glob_pattern_p)
+/* libc_hidden_proto(glob_pattern_p) */
#ifndef COMPILE_GLOB64
/* Return nonzero if PATTERN contains any metacharacters.
Metacharacters can be quoted with backslashes if QUOTE is nonzero. */
@@ -489,11 +489,11 @@ static int glob_in_dir (const char *pattern, const char *directory, int flags,
}
#ifdef COMPILE_GLOB64
-libc_hidden_proto(glob64)
-libc_hidden_proto(globfree64)
+/* libc_hidden_proto(glob64) */
+/* libc_hidden_proto(globfree64) */
#else
-libc_hidden_proto(glob)
-libc_hidden_proto(globfree)
+/* libc_hidden_proto(glob) */
+/* libc_hidden_proto(globfree) */
#endif
/* Do glob searching for PATTERN, placing results in PGLOB.
The bits defined above may be set in FLAGS.
diff --git a/libc/misc/internals/tempname.c b/libc/misc/internals/tempname.c
index 5b7b4f7f9..10d00041c 100644
--- a/libc/misc/internals/tempname.c
+++ b/libc/misc/internals/tempname.c
@@ -47,17 +47,17 @@
/* Experimentally off - libc_hidden_proto(strlen) */
/* Experimentally off - libc_hidden_proto(strcmp) */
-libc_hidden_proto(sprintf)
-libc_hidden_proto(mkdir)
-libc_hidden_proto(open)
+/* libc_hidden_proto(sprintf) */
+/* libc_hidden_proto(mkdir) */
+/* libc_hidden_proto(open) */
#ifdef __UCLIBC_HAS_LFS__
-libc_hidden_proto(open64)
+/* libc_hidden_proto(open64) */
#endif
-libc_hidden_proto(read)
+/* libc_hidden_proto(read) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(getpid)
-libc_hidden_proto(stat)
-libc_hidden_proto(gettimeofday)
+/* libc_hidden_proto(getpid) */
+/* libc_hidden_proto(stat) */
+/* libc_hidden_proto(gettimeofday) */
/* Return nonzero if DIR is an existent directory. */
static int direxists (const char *dir)
diff --git a/libc/misc/locale/locale.c b/libc/misc/locale/locale.c
index d8c539728..71bd77951 100644
--- a/libc/misc/locale/locale.c
+++ b/libc/misc/locale/locale.c
@@ -66,7 +66,7 @@
/* Experimentally off - libc_hidden_proto(strcpy) */
/* Experimentally off - libc_hidden_proto(strncmp) */
/* Experimentally off - libc_hidden_proto(strchr) */
-libc_hidden_proto(getenv)
+/* libc_hidden_proto(getenv) */
#ifdef __UCLIBC_HAS_CTYPE_TABLES__
/* libc_hidden_proto(__C_ctype_toupper) */
#endif
@@ -194,7 +194,7 @@ static const char utf8[] = "UTF-8";
static char hr_locale[(MAX_LOCALE_CATEGORY_STR * LC_ALL) + MAX_LOCALE_STR];
/* Experimentally off - libc_hidden_proto(stpcpy) */
-libc_hidden_proto(newlocale)
+/* libc_hidden_proto(newlocale) */
static void update_hr_locale(const unsigned char *spec)
{
@@ -303,7 +303,7 @@ char *setlocale(int category, const char *locale)
* placement of the fields in the struct. If necessary, we could ensure
* this usings an array of offsets but at some size cost. */
-libc_hidden_proto(localeconv)
+/* libc_hidden_proto(localeconv) */
#ifdef __LOCALE_C_ONLY
@@ -369,7 +369,7 @@ libc_hidden_def(localeconv)
#ifndef __UCLIBC_HAS_XLOCALE__
/* libc_hidden_proto(__ctype_b) */
/* libc_hidden_proto(__ctype_tolower) */
-libc_hidden_proto(__ctype_toupper)
+/* libc_hidden_proto(__ctype_toupper) */
#endif
__uclibc_locale_t __global_locale_data;
@@ -1026,7 +1026,7 @@ static const unsigned char nl_data[C_LC_ALL + 1 + 90 + 320] = {
']', '\x00', '^', '[', 'n', 'N', ']', '\x00',
};
-libc_hidden_proto(nl_langinfo)
+/* libc_hidden_proto(nl_langinfo) */
char *nl_langinfo(nl_item item)
{
unsigned int c;
@@ -1046,9 +1046,9 @@ libc_hidden_def(nl_langinfo)
#if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE)
-libc_hidden_proto(nl_langinfo)
+/* libc_hidden_proto(nl_langinfo) */
-libc_hidden_proto(nl_langinfo_l)
+/* libc_hidden_proto(nl_langinfo_l) */
char *nl_langinfo(nl_item item)
{
@@ -1085,7 +1085,7 @@ libc_hidden_def(__XL_NPP(nl_langinfo))
#ifdef L_newlocale
/* Experimentally off - libc_hidden_proto(stpcpy) */
-libc_hidden_proto(newlocale)
+/* libc_hidden_proto(newlocale) */
#ifdef __UCLIBC_MJN3_ONLY__
#warning TODO: Move posix and utf8 strings.
@@ -1330,7 +1330,7 @@ libc_hidden_def(newlocale)
/**********************************************************************/
#ifdef L_duplocale
-libc_hidden_proto(duplocale)
+/* libc_hidden_proto(duplocale) */
#ifdef __UCLIBC_MJN3_ONLY__
#warning REMINDER: When we allocate ctype tables, remember to dup them.
diff --git a/libc/misc/mntent/mntent.c b/libc/misc/mntent/mntent.c
index a81a877bf..55f672a3c 100644
--- a/libc/misc/mntent/mntent.c
+++ b/libc/misc/mntent/mntent.c
@@ -12,17 +12,17 @@
__UCLIBC_MUTEX_STATIC(mylock, PTHREAD_MUTEX_INITIALIZER);
-libc_hidden_proto(getmntent_r)
-libc_hidden_proto(setmntent)
-libc_hidden_proto(endmntent)
+/* libc_hidden_proto(getmntent_r) */
+/* libc_hidden_proto(setmntent) */
+/* libc_hidden_proto(endmntent) */
/* Experimentally off - libc_hidden_proto(strstr) */
/* Experimentally off - libc_hidden_proto(strtok_r) */
-libc_hidden_proto(atoi)
-libc_hidden_proto(fopen)
+/* libc_hidden_proto(atoi) */
+/* libc_hidden_proto(fopen) */
/* libc_hidden_proto(fclose) */
-libc_hidden_proto(fseek)
-libc_hidden_proto(fgets)
+/* libc_hidden_proto(fseek) */
+/* libc_hidden_proto(fgets) */
/* libc_hidden_proto(abort) */
/* libc_hidden_proto(fprintf) */
diff --git a/libc/misc/regex/regcomp.c b/libc/misc/regex/regcomp.c
index 210ae05ee..0b3b585ce 100644
--- a/libc/misc/regex/regcomp.c
+++ b/libc/misc/regex/regcomp.c
@@ -806,7 +806,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
as the initial length of some arrays. */
#ifdef __UCLIBC_HAS_WCHAR__
-libc_hidden_proto(_stdlib_mb_cur_max)
+/* libc_hidden_proto(_stdlib_mb_cur_max) */
#endif
static reg_errcode_t
diff --git a/libc/misc/regex/regex.c b/libc/misc/regex/regex.c
index 80c95bba1..623a3c6bb 100644
--- a/libc/misc/regex/regex.c
+++ b/libc/misc/regex/regex.c
@@ -46,17 +46,17 @@
#define __wcrtomb wcrtomb
#define __btowc btowc
#define __wctype wctype
-libc_hidden_proto(wcscoll)
-libc_hidden_proto(wcrtomb)
-libc_hidden_proto(mbrtowc)
-libc_hidden_proto(iswctype)
-libc_hidden_proto(iswlower)
-libc_hidden_proto(iswalnum)
-libc_hidden_proto(towlower)
-libc_hidden_proto(towupper)
-libc_hidden_proto(mbsinit)
-libc_hidden_proto(btowc)
-libc_hidden_proto(wctype)
+/* libc_hidden_proto(wcscoll) */
+/* libc_hidden_proto(wcrtomb) */
+/* libc_hidden_proto(mbrtowc) */
+/* libc_hidden_proto(iswctype) */
+/* libc_hidden_proto(iswlower) */
+/* libc_hidden_proto(iswalnum) */
+/* libc_hidden_proto(towlower) */
+/* libc_hidden_proto(towupper) */
+/* libc_hidden_proto(mbsinit) */
+/* libc_hidden_proto(btowc) */
+/* libc_hidden_proto(wctype) */
#endif
@@ -71,12 +71,12 @@ libc_hidden_proto(wctype)
/* libc_hidden_proto(__ctype_toupper_loc) */
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
/* libc_hidden_proto(__ctype_b) */
-libc_hidden_proto(__ctype_toupper)
+/* libc_hidden_proto(__ctype_toupper) */
#else
-libc_hidden_proto(isascii)
+/* libc_hidden_proto(isascii) */
#endif
-libc_hidden_proto(toupper)
-libc_hidden_proto(tolower)
+/* libc_hidden_proto(toupper) */
+/* libc_hidden_proto(tolower) */
/* Experimentally off - libc_hidden_proto(memcmp) */
/* Experimentally off - libc_hidden_proto(memcpy) */
/* Experimentally off - libc_hidden_proto(memmove) */
@@ -85,7 +85,7 @@ libc_hidden_proto(tolower)
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strlen) */
/* Experimentally off - libc_hidden_proto(strncpy) */
-libc_hidden_proto(getenv)
+/* libc_hidden_proto(getenv) */
/* Experimentally off - libc_hidden_proto(strcasecmp) */
/* libc_hidden_proto(abort) */
#ifdef __USE_GNU
diff --git a/libc/misc/regex/regex_internal.h b/libc/misc/regex/regex_internal.h
index 725e33a5a..f0499caf0 100644
--- a/libc/misc/regex/regex_internal.h
+++ b/libc/misc/regex/regex_internal.h
@@ -29,7 +29,7 @@
#if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC
# include <langinfo.h>
-libc_hidden_proto(nl_langinfo)
+/* libc_hidden_proto(nl_langinfo) */
#endif
#if defined HAVE_LOCALE_H || defined _LIBC
# include <locale.h>
diff --git a/libc/misc/regex/regex_old.c b/libc/misc/regex/regex_old.c
index 3aecf243f..76350fc4e 100644
--- a/libc/misc/regex/regex_old.c
+++ b/libc/misc/regex/regex_old.c
@@ -43,7 +43,7 @@
/* Experimentally off - libc_hidden_proto(memcpy) */
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(printf)
+/* libc_hidden_proto(printf) */
/* libc_hidden_proto(abort) */
#ifdef __USE_GNU
/* Experimentally off - libc_hidden_proto(mempcpy) */
@@ -75,14 +75,14 @@ libc_hidden_proto(printf)
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
# include <wchar.h>
# include <wctype.h>
-libc_hidden_proto(wcslen)
-libc_hidden_proto(mbrtowc)
-libc_hidden_proto(wcrtomb)
-libc_hidden_proto(wcscoll)
-libc_hidden_proto(wctype)
-libc_hidden_proto(iswctype)
-libc_hidden_proto(iswalnum)
-libc_hidden_proto(btowc)
+/* libc_hidden_proto(wcslen) */
+/* libc_hidden_proto(mbrtowc) */
+/* libc_hidden_proto(wcrtomb) */
+/* libc_hidden_proto(wcscoll) */
+/* libc_hidden_proto(wctype) */
+/* libc_hidden_proto(iswctype) */
+/* libc_hidden_proto(iswalnum) */
+/* libc_hidden_proto(btowc) */
# endif
diff --git a/libc/misc/search/_hsearch_r.c b/libc/misc/search/_hsearch_r.c
index c9c4a9ccf..85475cf5e 100644
--- a/libc/misc/search/_hsearch_r.c
+++ b/libc/misc/search/_hsearch_r.c
@@ -64,7 +64,7 @@ static int isprime (unsigned int number)
indexing as explained in the comment for the hsearch function.
The contents of the table is zeroed, especially the field used
becomes zero. */
-libc_hidden_proto(hcreate_r)
+/* libc_hidden_proto(hcreate_r) */
int hcreate_r (size_t nel, struct hsearch_data *htab)
{
/* Test for correct arguments. */
@@ -100,7 +100,7 @@ libc_hidden_def(hcreate_r)
#ifdef L_hdestroy_r
/* After using the hash table it has to be destroyed. The used memory can
be freed and the local static variable can be marked as not used. */
-libc_hidden_proto(hdestroy_r)
+/* libc_hidden_proto(hdestroy_r) */
void hdestroy_r (struct hsearch_data *htab)
{
/* Test for correct arguments. */
@@ -137,7 +137,7 @@ libc_hidden_def(hdestroy_r)
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(hsearch_r)
+/* libc_hidden_proto(hsearch_r) */
int hsearch_r (ENTRY item, ACTION action, ENTRY **retval,
struct hsearch_data *htab)
{
diff --git a/libc/misc/search/_lsearch.c b/libc/misc/search/_lsearch.c
index e446489ed..da737bab4 100644
--- a/libc/misc/search/_lsearch.c
+++ b/libc/misc/search/_lsearch.c
@@ -12,7 +12,7 @@
#include <stdio.h>
#include <search.h>
-libc_hidden_proto(lfind)
+/* libc_hidden_proto(lfind) */
#ifdef L_lfind
diff --git a/libc/misc/search/_tsearch.c b/libc/misc/search/_tsearch.c
index 3d43aa543..5f3706d64 100644
--- a/libc/misc/search/_tsearch.c
+++ b/libc/misc/search/_tsearch.c
@@ -50,7 +50,7 @@ register node **rootp; address of tree root
int (*compar)(); ordering function
*/
-libc_hidden_proto(tsearch)
+/* libc_hidden_proto(tsearch) */
void *tsearch(__const void *key, void **vrootp, __compar_fn_t compar)
{
register node *q;
@@ -81,7 +81,7 @@ libc_hidden_def(tsearch)
#endif
#ifdef L_tfind
-libc_hidden_proto(tfind)
+/* libc_hidden_proto(tfind) */
void *tfind(__const void *key, void * __const *vrootp, __compar_fn_t compar)
{
register node **rootp = (node **) vrootp;
@@ -208,7 +208,7 @@ tdestroy_recurse (node *root, __free_fn_t freefct)
free (root);
}
-libc_hidden_proto(tdestroy)
+/* libc_hidden_proto(tdestroy) */
void tdestroy (void *vroot, __free_fn_t freefct)
{
node *root = (node *) vroot;
diff --git a/libc/misc/search/hsearch.c b/libc/misc/search/hsearch.c
index b1228e2ee..3ecc42567 100644
--- a/libc/misc/search/hsearch.c
+++ b/libc/misc/search/hsearch.c
@@ -19,9 +19,9 @@
#include <search.h>
-libc_hidden_proto(hdestroy_r)
-libc_hidden_proto(hsearch_r)
-libc_hidden_proto(hcreate_r)
+/* libc_hidden_proto(hdestroy_r) */
+/* libc_hidden_proto(hsearch_r) */
+/* libc_hidden_proto(hcreate_r) */
/* The non-reentrant version use a global space for storing the table. */
static struct hsearch_data htab;
diff --git a/libc/misc/statfs/fstatfs64.c b/libc/misc/statfs/fstatfs64.c
index dfd027941..6bcc86540 100644
--- a/libc/misc/statfs/fstatfs64.c
+++ b/libc/misc/statfs/fstatfs64.c
@@ -27,10 +27,9 @@
/* Experimentally off - libc_hidden_proto(memcpy) */
extern __typeof(fstatfs) __libc_fstatfs;
-libc_hidden_proto(__libc_fstatfs)
/* Return information about the filesystem on which FD resides. */
-libc_hidden_proto(fstatfs64)
+/* libc_hidden_proto(fstatfs64) */
int fstatfs64 (int fd, struct statfs64 *buf)
{
struct statfs buf32;
diff --git a/libc/misc/statfs/fstatvfs.c b/libc/misc/statfs/fstatvfs.c
index 7956e014b..3f3d76a8b 100644
--- a/libc/misc/statfs/fstatvfs.c
+++ b/libc/misc/statfs/fstatvfs.c
@@ -30,10 +30,10 @@
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strsep) */
-libc_hidden_proto(setmntent)
-libc_hidden_proto(getmntent_r)
-libc_hidden_proto(endmntent)
-libc_hidden_proto(stat)
+/* libc_hidden_proto(setmntent) */
+/* libc_hidden_proto(getmntent_r) */
+/* libc_hidden_proto(endmntent) */
+/* libc_hidden_proto(stat) */
#ifndef __USE_FILE_OFFSET64
extern int fstatfs (int __fildes, struct statfs *__buf)
@@ -48,10 +48,9 @@ extern int __REDIRECT_NTH (fstatfs, (int __fildes, struct statfs *__buf),
#endif
extern __typeof(fstatfs) __libc_fstatfs;
-libc_hidden_proto(__libc_fstatfs)
-libc_hidden_proto(fstat)
-libc_hidden_proto(stat)
-libc_hidden_proto(fstatvfs)
+/* libc_hidden_proto(fstat) */
+/* libc_hidden_proto(stat) */
+/* libc_hidden_proto(fstatvfs) */
int fstatvfs (int fd, struct statvfs *buf)
{
diff --git a/libc/misc/statfs/fstatvfs64.c b/libc/misc/statfs/fstatvfs64.c
index 638a211a7..f06836265 100644
--- a/libc/misc/statfs/fstatvfs64.c
+++ b/libc/misc/statfs/fstatvfs64.c
@@ -32,19 +32,19 @@
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strsep) */
-libc_hidden_proto(setmntent)
-libc_hidden_proto(getmntent_r)
-libc_hidden_proto(endmntent)
+/* libc_hidden_proto(setmntent) */
+/* libc_hidden_proto(getmntent_r) */
+/* libc_hidden_proto(endmntent) */
#undef stat
#define stat stat64
#if !defined __UCLIBC_LINUX_SPECIFIC__
-libc_hidden_proto(fstatvfs)
+/* libc_hidden_proto(fstatvfs) */
#else
-libc_hidden_proto(fstatfs64)
+/* libc_hidden_proto(fstatfs64) */
#endif
-libc_hidden_proto(fstat64)
-libc_hidden_proto(stat)
+/* libc_hidden_proto(fstat64) */
+/* libc_hidden_proto(stat) */
int fstatvfs64 (int fd, struct statvfs64 *buf)
{
diff --git a/libc/misc/statfs/statfs64.c b/libc/misc/statfs/statfs64.c
index 6b3558b5e..8bb1ad9ed 100644
--- a/libc/misc/statfs/statfs64.c
+++ b/libc/misc/statfs/statfs64.c
@@ -25,10 +25,9 @@
/* Experimentally off - libc_hidden_proto(memcpy) */
extern __typeof(statfs) __libc_statfs;
-libc_hidden_proto(__libc_statfs)
/* Return information about the filesystem on which FILE resides. */
-libc_hidden_proto(statfs64)
+/* libc_hidden_proto(statfs64) */
int statfs64 (const char *file, struct statfs64 *buf)
{
struct statfs buf32;
diff --git a/libc/misc/statfs/statvfs.c b/libc/misc/statfs/statvfs.c
index 5085a2a9e..42d2d0d17 100644
--- a/libc/misc/statfs/statvfs.c
+++ b/libc/misc/statfs/statvfs.c
@@ -30,15 +30,14 @@
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strsep) */
-libc_hidden_proto(setmntent)
-libc_hidden_proto(getmntent_r)
-libc_hidden_proto(endmntent)
+/* libc_hidden_proto(setmntent) */
+/* libc_hidden_proto(getmntent_r) */
+/* libc_hidden_proto(endmntent) */
extern __typeof(statfs) __libc_statfs;
-libc_hidden_proto(__libc_statfs)
-libc_hidden_proto(stat)
+/* libc_hidden_proto(stat) */
-libc_hidden_proto(statvfs)
+/* libc_hidden_proto(statvfs) */
int statvfs (const char *file, struct statvfs *buf)
{
struct statfs fsbuf;
diff --git a/libc/misc/statfs/statvfs64.c b/libc/misc/statfs/statvfs64.c
index 008ba78c9..3f1defefc 100644
--- a/libc/misc/statfs/statvfs64.c
+++ b/libc/misc/statfs/statvfs64.c
@@ -31,18 +31,18 @@
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strsep) */
-libc_hidden_proto(setmntent)
-libc_hidden_proto(getmntent_r)
-libc_hidden_proto(endmntent)
+/* libc_hidden_proto(setmntent) */
+/* libc_hidden_proto(getmntent_r) */
+/* libc_hidden_proto(endmntent) */
#undef stat
#define stat stat64
#if defined __UCLIBC_LINUX_SPECIFIC__
-libc_hidden_proto(statfs64)
+/* libc_hidden_proto(statfs64) */
#else
-libc_hidden_proto(statvfs)
+/* libc_hidden_proto(statvfs) */
#endif
-libc_hidden_proto(stat64)
+/* libc_hidden_proto(stat64) */
int statvfs64 (const char *file, struct statvfs64 *buf)
{
diff --git a/libc/misc/syslog/syslog.c b/libc/misc/syslog/syslog.c
index f98a25719..ccc71ddec 100644
--- a/libc/misc/syslog/syslog.c
+++ b/libc/misc/syslog/syslog.c
@@ -79,10 +79,10 @@
#include <ctype.h>
#include <signal.h>
-libc_hidden_proto(openlog)
-libc_hidden_proto(syslog)
-libc_hidden_proto(vsyslog)
-libc_hidden_proto(closelog)
+/* libc_hidden_proto(openlog) */
+/* libc_hidden_proto(syslog) */
+/* libc_hidden_proto(vsyslog) */
+/* libc_hidden_proto(closelog) */
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(memcpy) */
@@ -90,18 +90,18 @@ libc_hidden_proto(closelog)
/* Experimentally off - libc_hidden_proto(strchr) */
/* Experimentally off - libc_hidden_proto(strlen) */
/* Experimentally off - libc_hidden_proto(strncpy) */
-libc_hidden_proto(open)
-libc_hidden_proto(fcntl)
-libc_hidden_proto(socket)
+/* libc_hidden_proto(open) */
+/* libc_hidden_proto(fcntl) */
+/* libc_hidden_proto(socket) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(write)
-libc_hidden_proto(getpid)
-libc_hidden_proto(ctime)
-libc_hidden_proto(sigaction)
-libc_hidden_proto(sigemptyset)
-libc_hidden_proto(connect)
-libc_hidden_proto(sprintf)
-libc_hidden_proto(vsnprintf)
+/* libc_hidden_proto(write) */
+/* libc_hidden_proto(getpid) */
+/* libc_hidden_proto(ctime) */
+/* libc_hidden_proto(sigaction) */
+/* libc_hidden_proto(sigemptyset) */
+/* libc_hidden_proto(connect) */
+/* libc_hidden_proto(sprintf) */
+/* libc_hidden_proto(vsnprintf) */
/* Experimentally off - libc_hidden_proto(time) */
#include <bits/uClibc_mutex.h>
diff --git a/libc/misc/sysvipc/ftok.c b/libc/misc/sysvipc/ftok.c
index 12627cad1..200d5cf90 100644
--- a/libc/misc/sysvipc/ftok.c
+++ b/libc/misc/sysvipc/ftok.c
@@ -20,7 +20,7 @@
#include <sys/ipc.h>
#include <sys/stat.h>
-libc_hidden_proto(stat)
+/* libc_hidden_proto(stat) */
key_t ftok (const char *pathname, int proj_id)
{
diff --git a/libc/misc/sysvipc/msgq.c b/libc/misc/sysvipc/msgq.c
index 34b398bb6..8271ffbef 100644
--- a/libc/misc/sysvipc/msgq.c
+++ b/libc/misc/sysvipc/msgq.c
@@ -12,7 +12,7 @@
#ifdef __NR_msgctl
#define __NR___libc_msgctl __NR_msgctl
-static __inline__ _syscall3(int, __libc_msgctl, int, msqid, int, cmd, struct msqid_ds *, buf);
+static __inline__ _syscall3(int, __libc_msgctl, int, msqid, int, cmd, struct msqid_ds *, buf)
#endif
/* Message queue control operation. */
int msgctl(int msqid, int cmd, struct msqid_ds *buf)
@@ -50,7 +50,7 @@ struct new_msg_buf{
#ifdef __NR_msgrcv
#define __NR___syscall_msgrcv __NR_msgrcv
static inline _syscall5(int, __syscall_msgrcv, int, msqid, void *, msgp,
- size_t, msgsz, long int, msgtyp, int, msgflg);
+ size_t, msgsz, long int, msgtyp, int, msgflg)
#endif
static inline int do_msgrcv (int msqid, void *msgp, size_t msgsz,
long int msgtyp, int msgflg)
@@ -85,7 +85,7 @@ int msgrcv (int msqid, void *msgp, size_t msgsz,
#ifdef __NR_msgsnd
#define __NR___syscall_msgsnd __NR_msgsnd
static inline _syscall4(int, __syscall_msgsnd, int, msqid, const void *, msgp,
- size_t, msgsz, int, msgflg);
+ size_t, msgsz, int, msgflg)
#endif
/* Send message to message queue. */
static inline int do_msgsnd (int msqid, const void *msgp, size_t msgsz,
diff --git a/libc/misc/sysvipc/shm.c b/libc/misc/sysvipc/shm.c
index 9d71161cb..164580efe 100644
--- a/libc/misc/sysvipc/shm.c
+++ b/libc/misc/sysvipc/shm.c
@@ -38,7 +38,7 @@ _syscall3(void *, shmat, int, shmid, const void *,shmaddr, int, shmflg)
#else
/* psm: don't remove this, else mips will fail */
#include <unistd.h>
-libc_hidden_proto(getpagesize)
+/* libc_hidden_proto(getpagesize) */
void * shmat (int shmid, const void *shmaddr, int shmflg)
{
diff --git a/libc/misc/time/adjtime.c b/libc/misc/time/adjtime.c
index cfa94339a..808046eef 100644
--- a/libc/misc/time/adjtime.c
+++ b/libc/misc/time/adjtime.c
@@ -9,7 +9,7 @@
#include <sys/timex.h>
#include <errno.h>
-libc_hidden_proto(adjtimex)
+/* libc_hidden_proto(adjtimex) */
#define MAX_SEC (LONG_MAX / 1000000L - 2)
#define MIN_SEC (LONG_MIN / 1000000L + 2)
diff --git a/libc/misc/time/ftime.c b/libc/misc/time/ftime.c
index 49c137ce5..867f4fd2f 100644
--- a/libc/misc/time/ftime.c
+++ b/libc/misc/time/ftime.c
@@ -19,7 +19,7 @@
#include <sys/timeb.h>
#include <sys/time.h>
-libc_hidden_proto(gettimeofday)
+/* libc_hidden_proto(gettimeofday) */
int ftime(struct timeb *timebuf)
{
diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
index 13d62ad1b..ae800e1ca 100644
--- a/libc/misc/time/time.c
+++ b/libc/misc/time/time.c
@@ -154,11 +154,11 @@
#include <xlocale.h>
#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(asctime) */
+/* libc_hidden_proto(asctime_r) */
+/* libc_hidden_proto(ctime) */
+/* libc_hidden_proto(localtime) */
+/* libc_hidden_proto(localtime_r) */
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(memcpy) */
@@ -167,22 +167,22 @@ libc_hidden_proto(localtime_r)
/* Experimentally off - libc_hidden_proto(strlen) */
/* Experimentally off - libc_hidden_proto(strncpy) */
/* libc_hidden_proto(sprintf) */
-libc_hidden_proto(open)
-libc_hidden_proto(read)
+/* libc_hidden_proto(open) */
+/* libc_hidden_proto(read) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(getenv)
-libc_hidden_proto(tzset)
-libc_hidden_proto(gettimeofday)
+/* libc_hidden_proto(getenv) */
+/* libc_hidden_proto(tzset) */
+/* libc_hidden_proto(gettimeofday) */
/* Experimentally off - libc_hidden_proto(strncasecmp) */
-libc_hidden_proto(strtol)
-libc_hidden_proto(strtoul)
-libc_hidden_proto(nl_langinfo)
+/* libc_hidden_proto(strtol) */
+/* libc_hidden_proto(strtoul) */
+/* libc_hidden_proto(nl_langinfo) */
#ifdef __UCLIBC_HAS_XLOCALE__
/* Experimentally off - libc_hidden_proto(strncasecmp_l) */
-libc_hidden_proto(strtol_l)
-libc_hidden_proto(strtoul_l)
-libc_hidden_proto(nl_langinfo_l)
+/* libc_hidden_proto(strtol_l) */
+/* libc_hidden_proto(strtoul_l) */
+/* libc_hidden_proto(nl_langinfo_l) */
/* libc_hidden_proto(__ctype_b_loc) */
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
/* libc_hidden_proto(__ctype_b) */
@@ -433,7 +433,7 @@ libc_hidden_def(asctime_r)
#include <sys/times.h>
-libc_hidden_proto(times)
+/* libc_hidden_proto(times) */
#ifndef __BCC__
#if CLOCKS_PER_SEC != 1000000L
@@ -809,9 +809,9 @@ time_t timegm(struct tm *timeptr)
#if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE)
-libc_hidden_proto(strftime)
+/* libc_hidden_proto(strftime) */
-libc_hidden_proto(strftime_l)
+/* libc_hidden_proto(strftime_l) */
size_t strftime(char *__restrict s, size_t maxsize,
const char *__restrict format,
@@ -1330,9 +1330,9 @@ libc_hidden_def(__XL_NPP(strftime))
#if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE)
-libc_hidden_proto(strptime)
+/* libc_hidden_proto(strptime) */
-libc_hidden_proto(strptime_l)
+/* libc_hidden_proto(strptime_l) */
char *strptime(const char *__restrict buf, const char *__restrict format,
struct tm *__restrict tm)
@@ -1866,7 +1866,7 @@ ERROR:
#endif /* __UCLIBC_HAS_TZ_FILE__ */
#ifndef __UCLIBC_HAS_CTYPE_TABLES__
-libc_hidden_proto(isascii)
+/* libc_hidden_proto(isascii) */
#endif
void tzset(void)
@@ -2414,9 +2414,9 @@ DONE:
#if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE)
-libc_hidden_proto(wcsftime)
+/* libc_hidden_proto(wcsftime) */
-libc_hidden_proto(wcsftime_l)
+/* libc_hidden_proto(wcsftime_l) */
size_t wcsftime(wchar_t *__restrict s, size_t maxsize,
const wchar_t *__restrict format,
diff --git a/libc/misc/ttyent/getttyent.c b/libc/misc/ttyent/getttyent.c
index 059835d2e..dd6d9ad62 100644
--- a/libc/misc/ttyent/getttyent.c
+++ b/libc/misc/ttyent/getttyent.c
@@ -41,12 +41,12 @@
/* Experimentally off - libc_hidden_proto(strchr) */
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strncmp) */
-libc_hidden_proto(__fsetlocking)
-libc_hidden_proto(rewind)
-libc_hidden_proto(fgets_unlocked)
-libc_hidden_proto(getc_unlocked)
-libc_hidden_proto(__fgetc_unlocked)
-libc_hidden_proto(fopen)
+/* libc_hidden_proto(__fsetlocking) */
+/* libc_hidden_proto(rewind) */
+/* libc_hidden_proto(fgets_unlocked) */
+/* libc_hidden_proto(getc_unlocked) */
+/* libc_hidden_proto(__fgetc_unlocked) */
+/* libc_hidden_proto(fopen) */
/* libc_hidden_proto(fclose) */
/* libc_hidden_proto(abort) */
#ifdef __UCLIBC_HAS_XLOCALE__
@@ -102,7 +102,7 @@ static char * value(register char *p)
return ((p = strchr(p, '=')) ? ++p : NULL);
}
-libc_hidden_proto(setttyent)
+/* libc_hidden_proto(setttyent) */
int setttyent(void)
{
@@ -120,7 +120,7 @@ int setttyent(void)
}
libc_hidden_def(setttyent)
-libc_hidden_proto(getttyent)
+/* libc_hidden_proto(getttyent) */
struct ttyent * getttyent(void)
{
register int c;
@@ -201,7 +201,7 @@ struct ttyent * getttyent(void)
}
libc_hidden_def(getttyent)
-libc_hidden_proto(endttyent)
+/* libc_hidden_proto(endttyent) */
int endttyent(void)
{
int rval;
diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c
index d7dfb4b66..3752a68d4 100644
--- a/libc/misc/utmp/utent.c
+++ b/libc/misc/utmp/utent.c
@@ -27,12 +27,12 @@
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strdup) */
/* Experimentally off - libc_hidden_proto(strncmp) */
-libc_hidden_proto(read)
-libc_hidden_proto(write)
-libc_hidden_proto(open)
-libc_hidden_proto(fcntl)
+/* libc_hidden_proto(read) */
+/* libc_hidden_proto(write) */
+/* libc_hidden_proto(open) */
+/* libc_hidden_proto(fcntl) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(lseek)
+/* libc_hidden_proto(lseek) */
#include <bits/uClibc_mutex.h>
__UCLIBC_MUTEX_STATIC(utmplock, PTHREAD_MUTEX_INITIALIZER);
@@ -89,7 +89,7 @@ bummer:
return;
}
-libc_hidden_proto(setutent)
+/* libc_hidden_proto(setutent) */
void setutent(void)
{
__UCLIBC_MUTEX_LOCK(utmplock);
@@ -172,7 +172,7 @@ static struct utmp *__getutid(const struct utmp *utmp_entry)
return NULL;
}
-libc_hidden_proto(getutid)
+/* libc_hidden_proto(getutid) */
struct utmp *getutid(const struct utmp *utmp_entry)
{
struct utmp *ret = NULL;
diff --git a/libc/misc/utmp/wtent.c b/libc/misc/utmp/wtent.c
index 42fc8bcac..6474114f8 100644
--- a/libc/misc/utmp/wtent.c
+++ b/libc/misc/utmp/wtent.c
@@ -21,13 +21,13 @@
#if 0
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(strncpy) */
-libc_hidden_proto(updwtmp)
+/* libc_hidden_proto(updwtmp) */
#endif
-libc_hidden_proto(open)
-libc_hidden_proto(write)
+/* libc_hidden_proto(open) */
+/* libc_hidden_proto(write) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(lockf)
-libc_hidden_proto(gettimeofday)
+/* libc_hidden_proto(lockf) */
+/* libc_hidden_proto(gettimeofday) */
#if 0
/* This is enabled in uClibc/libutil/logwtmp.c */
diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c
index 6214243e3..23638ea8f 100644
--- a/libc/misc/wchar/wchar.c
+++ b/libc/misc/wchar/wchar.c
@@ -174,9 +174,9 @@ extern size_t _wchar_wcsntoutf8s(char *__restrict s, size_t n,
/**********************************************************************/
#ifdef L_btowc
-libc_hidden_proto(mbrtowc)
+/* libc_hidden_proto(mbrtowc) */
-libc_hidden_proto(btowc)
+/* libc_hidden_proto(btowc) */
wint_t btowc(int c)
{
#ifdef __CTYPE_HAS_8_BIT_LOCALES
@@ -215,7 +215,7 @@ libc_hidden_def(btowc)
/* Note: We completely ignore ps in all currently supported conversions. */
-libc_hidden_proto(wcrtomb)
+/* libc_hidden_proto(wcrtomb) */
int wctob(wint_t c)
{
@@ -246,7 +246,7 @@ int wctob(wint_t c)
/**********************************************************************/
#ifdef L_mbsinit
-libc_hidden_proto(mbsinit)
+/* libc_hidden_proto(mbsinit) */
int mbsinit(const mbstate_t *ps)
{
return !ps || !ps->__mask;
@@ -257,9 +257,9 @@ libc_hidden_def(mbsinit)
/**********************************************************************/
#ifdef L_mbrlen
-libc_hidden_proto(mbrtowc)
+/* libc_hidden_proto(mbrtowc) */
-libc_hidden_proto(mbrlen)
+/* 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. */
@@ -272,9 +272,9 @@ libc_hidden_def(mbrlen)
/**********************************************************************/
#ifdef L_mbrtowc
-libc_hidden_proto(mbsnrtowcs)
+/* libc_hidden_proto(mbsnrtowcs) */
-libc_hidden_proto(mbrtowc)
+/* libc_hidden_proto(mbrtowc) */
size_t mbrtowc(wchar_t *__restrict pwc, const char *__restrict s,
size_t n, mbstate_t *__restrict ps)
{
@@ -338,12 +338,12 @@ libc_hidden_def(mbrtowc)
/**********************************************************************/
#ifdef L_wcrtomb
-libc_hidden_proto(wcsnrtombs)
+/* libc_hidden_proto(wcsnrtombs) */
/* Note: We completely ignore ps in all currently supported conversions. */
/* TODO: Check for valid state anyway? */
-libc_hidden_proto(wcrtomb)
+/* libc_hidden_proto(wcrtomb) */
size_t wcrtomb(register char *__restrict s, wchar_t wc,
mbstate_t *__restrict ps)
{
@@ -372,9 +372,9 @@ libc_hidden_def(wcrtomb)
/**********************************************************************/
#ifdef L_mbsrtowcs
-libc_hidden_proto(mbsnrtowcs)
+/* libc_hidden_proto(mbsnrtowcs) */
-libc_hidden_proto(mbsrtowcs)
+/* libc_hidden_proto(mbsrtowcs) */
size_t mbsrtowcs(wchar_t *__restrict dst, const char **__restrict src,
size_t len, mbstate_t *__restrict ps)
{
@@ -393,9 +393,9 @@ libc_hidden_def(mbsrtowcs)
* TODO: Check for valid state anyway? */
-libc_hidden_proto(wcsnrtombs)
+/* libc_hidden_proto(wcsnrtombs) */
-libc_hidden_proto(wcsrtombs)
+/* libc_hidden_proto(wcsrtombs) */
size_t wcsrtombs(char *__restrict dst, const wchar_t **__restrict src,
size_t len, mbstate_t *__restrict ps)
{
@@ -700,7 +700,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)
+/* 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)
{
@@ -810,7 +810,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)
+/* 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)
{
@@ -924,7 +924,7 @@ libc_hidden_def(wcsnrtombs)
/**********************************************************************/
#ifdef L_wcswidth
-libc_hidden_proto(wcswidth)
+/* libc_hidden_proto(wcswidth) */
#ifdef __UCLIBC_MJN3_ONLY__
#warning REMINDER: If we start doing translit, wcwidth and wcswidth will need updating.
@@ -1040,7 +1040,7 @@ static const signed char new_wtbl[] = {
0, 2, 1, 2, 1, 0, 1,
};
-libc_hidden_proto(wcsnrtombs)
+/* libc_hidden_proto(wcsnrtombs) */
int wcswidth(const wchar_t *pwcs, size_t n)
{
@@ -1168,7 +1168,7 @@ libc_hidden_def(wcswidth)
/**********************************************************************/
#ifdef L_wcwidth
-libc_hidden_proto(wcswidth)
+/* libc_hidden_proto(wcswidth) */
int wcwidth(wchar_t wc)
{
@@ -1238,15 +1238,17 @@ enum {
*
*/
+/* Used externally only by iconv utility */
extern const unsigned char __iconv_codesets[];
libc_hidden_proto(__iconv_codesets)
+
const unsigned char __iconv_codesets[] =
"\x0a\xe0""WCHAR_T\x00" /* superset of UCS-4 but platform-endian */
#if __BYTE_ORDER == __BIG_ENDIAN
"\x08\xec""UCS-4\x00" /* always BE */
"\x0a\xec""UCS-4BE\x00"
"\x0a\xed""UCS-4LE\x00"
- "\x09\fe4""UTF-32\x00" /* platform endian with BOM */
+ "\x09\xe4""UTF-32\x00" /* platform endian with BOM */
"\x0b\xe4""UTF-32BE\x00"
"\x0b\xe5""UTF-32LE\x00"
"\x08\xe2""UCS-2\x00" /* always BE */
diff --git a/libc/misc/wctype/_wctype.c b/libc/misc/wctype/_wctype.c
index 5dd9a0764..16bc5237a 100644
--- a/libc/misc/wctype/_wctype.c
+++ b/libc/misc/wctype/_wctype.c
@@ -38,12 +38,12 @@
#include <bits/uClibc_uwchar.h>
/* Experimentally off - libc_hidden_proto(strcmp) */
-libc_hidden_proto(tolower)
-libc_hidden_proto(toupper)
-libc_hidden_proto(towlower)
-libc_hidden_proto(towupper)
-libc_hidden_proto(towctrans)
-libc_hidden_proto(iswctype)
+/* libc_hidden_proto(tolower) */
+/* libc_hidden_proto(toupper) */
+/* libc_hidden_proto(towlower) */
+/* libc_hidden_proto(towupper) */
+/* libc_hidden_proto(towctrans) */
+/* libc_hidden_proto(iswctype) */
#if defined(__LOCALE_C_ONLY) && defined(__UCLIBC_DO_XLOCALE)
#error xlocale functionality is not supported in stub locale mode.
@@ -51,10 +51,10 @@ libc_hidden_proto(iswctype)
#ifdef __UCLIBC_HAS_XLOCALE__
#include <xlocale.h>
-libc_hidden_proto(towlower_l)
-libc_hidden_proto(towupper_l)
-libc_hidden_proto(towctrans_l)
-libc_hidden_proto(iswctype_l)
+/* libc_hidden_proto(towlower_l) */
+/* libc_hidden_proto(towupper_l) */
+/* libc_hidden_proto(towctrans_l) */
+/* libc_hidden_proto(iswctype_l) */
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
/* libc_hidden_proto(__ctype_b) */
#endif /* __UCLIBC_HAS_XLOCALE__ */
@@ -504,7 +504,7 @@ libc_hidden_def(towupper)
static const unsigned char typestring[] = __CTYPE_TYPESTRING;
/* extern const unsigned char typestring[]; */
-libc_hidden_proto(wctype)
+/* libc_hidden_proto(wctype) */
wctype_t wctype(const char *property)
{
const unsigned char *p;
@@ -533,9 +533,9 @@ libc_hidden_def(wctype)
#warning REMINDER: Currently wctype_l simply calls wctype.
#endif /* __UCLIBC_MJN3_ONLY__ */
-libc_hidden_proto(wctype)
+/* libc_hidden_proto(wctype) */
-libc_hidden_proto(wctype_l)
+/* libc_hidden_proto(wctype_l) */
wctype_t wctype_l (const char *property, __locale_t locale)
{
return wctype(property);
@@ -907,7 +907,7 @@ libc_hidden_def(towctrans)
static const char transstring[] = __CTYPE_TRANSTRING;
-libc_hidden_proto(wctrans)
+/* libc_hidden_proto(wctrans) */
wctrans_t wctrans(const char *property)
{
const unsigned char *p;
@@ -936,7 +936,7 @@ libc_hidden_def(wctrans)
#warning REMINDER: Currently wctrans_l simply calls wctrans.
#endif /* __UCLIBC_MJN3_ONLY__ */
-libc_hidden_proto(wctrans)
+/* libc_hidden_proto(wctrans) */
wctrans_t wctrans_l(const char *property, __locale_t locale)
{
diff --git a/libc/misc/wordexp/wordexp.c b/libc/misc/wordexp/wordexp.c
index 05a2f0b46..8167ed685 100644
--- a/libc/misc/wordexp/wordexp.c
+++ b/libc/misc/wordexp/wordexp.c
@@ -44,30 +44,30 @@
/* Experimentally off - libc_hidden_proto(strndup) */
/* Experimentally off - libc_hidden_proto(strspn) */
/* Experimentally off - libc_hidden_proto(strcspn) */
-libc_hidden_proto(setenv)
-libc_hidden_proto(unsetenv)
-libc_hidden_proto(waitpid)
-libc_hidden_proto(kill)
-libc_hidden_proto(getuid)
-libc_hidden_proto(getpwnam_r)
-libc_hidden_proto(getpwuid_r)
-libc_hidden_proto(execve)
-libc_hidden_proto(dup2)
-libc_hidden_proto(atoi)
-libc_hidden_proto(fnmatch)
-libc_hidden_proto(pipe)
-libc_hidden_proto(fork)
-libc_hidden_proto(open)
+/* libc_hidden_proto(setenv) */
+/* libc_hidden_proto(unsetenv) */
+/* libc_hidden_proto(waitpid) */
+/* libc_hidden_proto(kill) */
+/* libc_hidden_proto(getuid) */
+/* libc_hidden_proto(getpwnam_r) */
+/* libc_hidden_proto(getpwuid_r) */
+/* libc_hidden_proto(execve) */
+/* libc_hidden_proto(dup2) */
+/* libc_hidden_proto(atoi) */
+/* libc_hidden_proto(fnmatch) */
+/* libc_hidden_proto(pipe) */
+/* libc_hidden_proto(fork) */
+/* libc_hidden_proto(open) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(read)
-libc_hidden_proto(getenv)
-libc_hidden_proto(getpid)
-libc_hidden_proto(sprintf)
+/* libc_hidden_proto(read) */
+/* libc_hidden_proto(getenv) */
+/* libc_hidden_proto(getpid) */
+/* libc_hidden_proto(sprintf) */
/* libc_hidden_proto(fprintf) */
/* libc_hidden_proto(abort) */
-libc_hidden_proto(glob)
-libc_hidden_proto(globfree)
-libc_hidden_proto(wordfree)
+/* libc_hidden_proto(glob) */
+/* libc_hidden_proto(globfree) */
+/* libc_hidden_proto(wordfree) */
#ifdef __UCLIBC_HAS_XLOCALE__
/* libc_hidden_proto(__ctype_b_loc) */
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
diff --git a/libc/pwd_grp/lckpwdf.c b/libc/pwd_grp/lckpwdf.c
index 1d0779725..a9601d45d 100644
--- a/libc/pwd_grp/lckpwdf.c
+++ b/libc/pwd_grp/lckpwdf.c
@@ -29,15 +29,15 @@
#include <shadow.h>
/* Experimentally off - libc_hidden_proto(memset) */
-libc_hidden_proto(open)
-libc_hidden_proto(fcntl)
+/* libc_hidden_proto(open) */
+/* libc_hidden_proto(fcntl) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(sigfillset)
-libc_hidden_proto(sigaction)
-libc_hidden_proto(sigprocmask)
-libc_hidden_proto(sigaddset)
-libc_hidden_proto(sigemptyset)
-libc_hidden_proto(alarm)
+/* libc_hidden_proto(sigfillset) */
+/* libc_hidden_proto(sigaction) */
+/* libc_hidden_proto(sigprocmask) */
+/* libc_hidden_proto(sigaddset) */
+/* libc_hidden_proto(sigemptyset) */
+/* libc_hidden_proto(alarm) */
/* How long to wait for getting the lock before returning with an
error. */
diff --git a/libc/pwd_grp/pwd_grp.c b/libc/pwd_grp/pwd_grp.c
index 14c16604b..8c75afb0a 100644
--- a/libc/pwd_grp/pwd_grp.c
+++ b/libc/pwd_grp/pwd_grp.c
@@ -40,12 +40,12 @@
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strcpy) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(strtoul)
-libc_hidden_proto(rewind)
-libc_hidden_proto(fgets_unlocked)
-libc_hidden_proto(__fputc_unlocked)
-libc_hidden_proto(sprintf)
-libc_hidden_proto(fopen)
+/* libc_hidden_proto(strtoul) */
+/* libc_hidden_proto(rewind) */
+/* libc_hidden_proto(fgets_unlocked) */
+/* libc_hidden_proto(__fputc_unlocked) */
+/* libc_hidden_proto(sprintf) */
+/* libc_hidden_proto(fopen) */
/* libc_hidden_proto(fclose) */
/* libc_hidden_proto(fprintf) */
#ifdef __UCLIBC_HAS_XLOCALE__
@@ -84,7 +84,7 @@ extern gid_t* __getgrouplist_internal(const char *user, gid_t gid, int *ngroups)
#ifdef L_fgetpwent_r
#ifdef __USE_SVID
-libc_hidden_proto(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)
@@ -107,7 +107,7 @@ libc_hidden_def(fgetpwent_r)
#ifdef L_fgetgrent_r
#ifdef __USE_SVID
-libc_hidden_proto(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)
@@ -129,7 +129,7 @@ libc_hidden_def(fgetgrent_r)
/**********************************************************************/
#ifdef L_fgetspent_r
-libc_hidden_proto(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)
@@ -155,7 +155,7 @@ libc_hidden_def(fgetspent_r)
#ifdef L_fgetpwent
#ifdef __USE_SVID
-libc_hidden_proto(fgetpwent_r)
+/* libc_hidden_proto(fgetpwent_r) */
struct passwd *fgetpwent(FILE *stream)
{
@@ -173,7 +173,7 @@ struct passwd *fgetpwent(FILE *stream)
#ifdef L_fgetgrent
#ifdef __USE_SVID
-libc_hidden_proto(fgetgrent_r)
+/* libc_hidden_proto(fgetgrent_r) */
struct group *fgetgrent(FILE *stream)
{
@@ -190,7 +190,7 @@ struct group *fgetgrent(FILE *stream)
/**********************************************************************/
#ifdef L_fgetspent
-libc_hidden_proto(fgetspent_r)
+/* libc_hidden_proto(fgetspent_r) */
struct spwd *fgetspent(FILE *stream)
{
@@ -206,7 +206,7 @@ struct spwd *fgetspent(FILE *stream)
/**********************************************************************/
#ifdef L_sgetspent_r
-libc_hidden_proto(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)
{
@@ -296,7 +296,7 @@ libc_hidden_def(sgetspent_r)
/**********************************************************************/
#ifdef L_getpwuid
-libc_hidden_proto(getpwuid_r)
+/* libc_hidden_proto(getpwuid_r) */
struct passwd *getpwuid(uid_t uid)
{
@@ -312,7 +312,7 @@ struct passwd *getpwuid(uid_t uid)
/**********************************************************************/
#ifdef L_getgrgid
-libc_hidden_proto(getgrgid_r)
+/* libc_hidden_proto(getgrgid_r) */
struct group *getgrgid(gid_t gid)
{
@@ -332,8 +332,8 @@ struct group *getgrgid(gid_t gid)
* to have been created as a reentrant version of the non-standard
* functions getspuid. Why getspuid was added, I do not know. */
-libc_hidden_proto(getpwuid_r)
-libc_hidden_proto(getspnam_r)
+/* libc_hidden_proto(getpwuid_r) */
+/* libc_hidden_proto(getspnam_r) */
int getspuid_r(uid_t uid, struct spwd *__restrict resultbuf,
char *__restrict buffer, size_t buflen,
@@ -359,8 +359,6 @@ int getspuid_r(uid_t uid, struct spwd *__restrict resultbuf,
/* This function is non-standard and is currently not built.
* Why it was added, I do not know. */
-libc_hidden_proto(getspuid_r)
-
struct spwd *getspuid(uid_t uid)
{
static char buffer[__UCLIBC_PWD_BUFFER_SIZE__];
@@ -375,7 +373,7 @@ struct spwd *getspuid(uid_t uid)
/**********************************************************************/
#ifdef L_getpwnam
-libc_hidden_proto(getpwnam_r)
+/* libc_hidden_proto(getpwnam_r) */
struct passwd *getpwnam(const char *name)
{
@@ -391,7 +389,7 @@ struct passwd *getpwnam(const char *name)
/**********************************************************************/
#ifdef L_getgrnam
-libc_hidden_proto(getgrnam_r)
+/* libc_hidden_proto(getgrnam_r) */
struct group *getgrnam(const char *name)
{
@@ -407,7 +405,7 @@ struct group *getgrnam(const char *name)
/**********************************************************************/
#ifdef L_getspnam
-libc_hidden_proto(getspnam_r)
+/* libc_hidden_proto(getspnam_r) */
struct spwd *getspnam(const char *name)
{
@@ -423,7 +421,7 @@ struct spwd *getspnam(const char *name)
/**********************************************************************/
#ifdef L_getpw
-libc_hidden_proto(getpwuid_r)
+/* libc_hidden_proto(getpwuid_r) */
int getpw(uid_t uid, char *buf)
{
@@ -476,7 +474,7 @@ void endpwent(void)
}
-libc_hidden_proto(getpwent_r)
+/* libc_hidden_proto(getpwent_r) */
int getpwent_r(struct passwd *__restrict resultbuf,
char *__restrict buffer, size_t buflen,
struct passwd **__restrict result)
@@ -533,7 +531,7 @@ void endgrent(void)
__UCLIBC_MUTEX_UNLOCK(mylock);
}
-libc_hidden_proto(getgrent_r)
+/* libc_hidden_proto(getgrent_r) */
int getgrent_r(struct group *__restrict resultbuf,
char *__restrict buffer, size_t buflen,
struct group **__restrict result)
@@ -590,7 +588,7 @@ void endspent(void)
__UCLIBC_MUTEX_UNLOCK(mylock);
}
-libc_hidden_proto(getspent_r)
+/* libc_hidden_proto(getspent_r) */
int getspent_r(struct spwd *resultbuf, char *buffer,
size_t buflen, struct spwd **result)
{
@@ -624,7 +622,7 @@ libc_hidden_def(getspent_r)
/**********************************************************************/
#ifdef L_getpwent
-libc_hidden_proto(getpwent_r)
+/* libc_hidden_proto(getpwent_r) */
struct passwd *getpwent(void)
{
@@ -640,7 +638,7 @@ struct passwd *getpwent(void)
/**********************************************************************/
#ifdef L_getgrent
-libc_hidden_proto(getgrent_r)
+/* libc_hidden_proto(getgrent_r) */
struct group *getgrent(void)
{
@@ -656,7 +654,7 @@ struct group *getgrent(void)
/**********************************************************************/
#ifdef L_getspent
-libc_hidden_proto(getspent_r)
+/* libc_hidden_proto(getspent_r) */
struct spwd *getspent(void)
{
@@ -672,7 +670,7 @@ struct spwd *getspent(void)
/**********************************************************************/
#ifdef L_sgetspent
-libc_hidden_proto(sgetspent_r)
+/* libc_hidden_proto(sgetspent_r) */
struct spwd *sgetspent(const char *string)
{
@@ -775,7 +773,7 @@ int getgrouplist(const char *user, gid_t gid, gid_t *groups, int *ngroups)
#ifdef L_initgroups
#ifdef __USE_BSD
-libc_hidden_proto(setgroups)
+/* libc_hidden_proto(setgroups) */
int initgroups(const char *user, gid_t gid)
{
diff --git a/libc/signal/killpg.c b/libc/signal/killpg.c
index 46b6e4b35..0e0d8f687 100644
--- a/libc/signal/killpg.c
+++ b/libc/signal/killpg.c
@@ -19,7 +19,7 @@
#include <errno.h>
#include <signal.h>
-libc_hidden_proto(kill)
+/* libc_hidden_proto(kill) */
/* Send SIG to all processes in process group PGRP.
If PGRP is zero, send SIG to all processes in
diff --git a/libc/signal/raise.c b/libc/signal/raise.c
index 28e511635..fcd114cc4 100644
--- a/libc/signal/raise.c
+++ b/libc/signal/raise.c
@@ -8,14 +8,14 @@
#include <sys/types.h>
-libc_hidden_proto(getpid)
-libc_hidden_proto(kill)
+/* libc_hidden_proto(getpid) */
+/* libc_hidden_proto(kill) */
int __raise (int signo) attribute_hidden;
int __raise(int signo)
{
return kill(getpid(), signo);
}
-libc_hidden_proto(raise)
+/* libc_hidden_proto(raise) */
weak_alias(__raise,raise)
libc_hidden_def(raise)
diff --git a/libc/signal/sigaction.c b/libc/signal/sigaction.c
index 88fb6b7a4..221951eeb 100644
--- a/libc/signal/sigaction.c
+++ b/libc/signal/sigaction.c
@@ -109,7 +109,7 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
#endif
#ifndef LIBC_SIGACTION
-libc_hidden_proto(sigaction)
+/* libc_hidden_proto(sigaction) */
weak_alias(__libc_sigaction,sigaction)
libc_hidden_weak(sigaction)
#endif
diff --git a/libc/signal/sigaddset.c b/libc/signal/sigaddset.c
index 9840a56bf..f8b117591 100644
--- a/libc/signal/sigaddset.c
+++ b/libc/signal/sigaddset.c
@@ -19,7 +19,7 @@
#include "sigsetops.h"
/* Add SIGNO to SET. */
-libc_hidden_proto(sigaddset)
+/* libc_hidden_proto(sigaddset) */
int
sigaddset (sigset_t *set, int signo)
{
diff --git a/libc/signal/sigblock.c b/libc/signal/sigblock.c
index 1f1a9fe98..7051a94ce 100644
--- a/libc/signal/sigblock.c
+++ b/libc/signal/sigblock.c
@@ -20,12 +20,12 @@
#include <errno.h>
#include <signal.h>
-libc_hidden_proto(sigprocmask)
+/* libc_hidden_proto(sigprocmask) */
#include "sigset-cvt-mask.h"
/* Block signals in MASK, returning the old mask. */
-libc_hidden_proto(sigblock)
+/* libc_hidden_proto(sigblock) */
int sigblock (int mask)
{
sigset_t set, oset;
diff --git a/libc/signal/sigdelset.c b/libc/signal/sigdelset.c
index de988a7e8..fb5658a11 100644
--- a/libc/signal/sigdelset.c
+++ b/libc/signal/sigdelset.c
@@ -19,7 +19,7 @@
#include "sigsetops.h"
/* Add SIGNO to SET. */
-libc_hidden_proto(sigdelset)
+/* libc_hidden_proto(sigdelset) */
int sigdelset (sigset_t *set, int signo)
{
if (set == NULL || signo <= 0 || signo >= NSIG)
diff --git a/libc/signal/sigempty.c b/libc/signal/sigempty.c
index 7d8687bd1..96260fb92 100644
--- a/libc/signal/sigempty.c
+++ b/libc/signal/sigempty.c
@@ -23,7 +23,7 @@
/* Experimentally off - libc_hidden_proto(memset) */
/* Clear all signals from SET. */
-libc_hidden_proto(sigemptyset)
+/* libc_hidden_proto(sigemptyset) */
int sigemptyset (sigset_t *set)
{
if (set == NULL)
diff --git a/libc/signal/sigfillset.c b/libc/signal/sigfillset.c
index 96ab459dc..2f8fb8138 100644
--- a/libc/signal/sigfillset.c
+++ b/libc/signal/sigfillset.c
@@ -23,7 +23,7 @@
/* Experimentally off - libc_hidden_proto(memset) */
/* Set all signals in SET. */
-libc_hidden_proto(sigfillset)
+/* libc_hidden_proto(sigfillset) */
int
sigfillset (sigset_t *set)
{
diff --git a/libc/signal/siggetmask.c b/libc/signal/siggetmask.c
index d3af43a12..82d2a97bc 100644
--- a/libc/signal/siggetmask.c
+++ b/libc/signal/siggetmask.c
@@ -20,7 +20,7 @@
#define __UCLIBC_HIDE_DEPRECATED__
#include <signal.h>
-libc_hidden_proto(sigblock)
+/* libc_hidden_proto(sigblock) */
int
siggetmask (void)
diff --git a/libc/signal/sighold.c b/libc/signal/sighold.c
index da723ac86..f8003d60f 100644
--- a/libc/signal/sighold.c
+++ b/libc/signal/sighold.c
@@ -22,8 +22,8 @@
#include <stddef.h>
#include <signal.h>
-libc_hidden_proto(sigprocmask)
-libc_hidden_proto(sigaddset)
+/* libc_hidden_proto(sigprocmask) */
+/* libc_hidden_proto(sigaddset) */
int sighold (int sig)
{
diff --git a/libc/signal/sigignore.c b/libc/signal/sigignore.c
index 17d93ce19..58d1c9bfd 100644
--- a/libc/signal/sigignore.c
+++ b/libc/signal/sigignore.c
@@ -24,7 +24,7 @@
#include <signal.h>
#include <string.h> /* For the real memset prototype. */
-libc_hidden_proto(sigaction)
+/* libc_hidden_proto(sigaction) */
int sigignore (int sig)
{
diff --git a/libc/signal/sigintr.c b/libc/signal/sigintr.c
index 43136379f..351c82b75 100644
--- a/libc/signal/sigintr.c
+++ b/libc/signal/sigintr.c
@@ -20,7 +20,7 @@
#include <signal.h>
#include <errno.h>
-libc_hidden_proto(sigaction)
+/* libc_hidden_proto(sigaction) */
/* If INTERRUPT is nonzero, make signal SIG interrupt system calls
(causing them to fail with EINTR); if INTERRUPT is zero, make system
diff --git a/libc/signal/sigjmp.c b/libc/signal/sigjmp.c
index d143e9376..d83b49a0b 100644
--- a/libc/signal/sigjmp.c
+++ b/libc/signal/sigjmp.c
@@ -21,7 +21,7 @@
#include <signal.h>
#include <libc-internal.h>
-libc_hidden_proto(sigprocmask)
+/* libc_hidden_proto(sigprocmask) */
/* This function is called by the `sigsetjmp' macro
before doing a `__setjmp' on ENV[0].__jmpbuf.
diff --git a/libc/signal/signal.c b/libc/signal/signal.c
index 991a14f1b..4d379606f 100644
--- a/libc/signal/signal.c
+++ b/libc/signal/signal.c
@@ -22,7 +22,7 @@
#include <signal.h>
#include <string.h> /* For the real memset prototype. */
-libc_hidden_proto(sigaction)
+/* libc_hidden_proto(sigaction) */
sigset_t _sigintr attribute_hidden; /* Set by siginterrupt. */
@@ -52,6 +52,6 @@ __bsd_signal (int sig, __sighandler_t handler)
return oact.sa_handler;
}
strong_alias(__bsd_signal,bsd_signal)
-libc_hidden_proto(signal)
+/* libc_hidden_proto(signal) */
strong_alias(__bsd_signal,signal)
libc_hidden_def(signal)
diff --git a/libc/signal/sigpause.c b/libc/signal/sigpause.c
index ffb3595fb..8cf28ac6e 100644
--- a/libc/signal/sigpause.c
+++ b/libc/signal/sigpause.c
@@ -27,15 +27,15 @@
#include <sysdep-cancel.h>
#endif
-libc_hidden_proto(sigprocmask)
-libc_hidden_proto(sigdelset)
-libc_hidden_proto(sigsuspend)
+/* libc_hidden_proto(sigprocmask) */
+/* libc_hidden_proto(sigdelset) */
+/* libc_hidden_proto(sigsuspend) */
#include "sigset-cvt-mask.h"
/* Set the mask of blocked signals to MASK,
wait for a signal to arrive, and then restore the mask. */
-libc_hidden_proto(__sigpause)
+/* libc_hidden_proto(__sigpause) */
int __sigpause (int sig_or_mask, int is_sig)
{
sigset_t set;
@@ -63,7 +63,7 @@ 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)
+/* libc_hidden_proto(sigpause) */
int sigpause (int mask)
{
#ifdef __UCLIBC_HAS_THREADS_NATIVE__
diff --git a/libc/signal/sigrelse.c b/libc/signal/sigrelse.c
index 8532a88f3..f5ee6fedc 100644
--- a/libc/signal/sigrelse.c
+++ b/libc/signal/sigrelse.c
@@ -22,8 +22,8 @@
#include <stddef.h>
#include <signal.h>
-libc_hidden_proto(sigprocmask)
-libc_hidden_proto(sigdelset)
+/* libc_hidden_proto(sigprocmask) */
+/* libc_hidden_proto(sigdelset) */
int sigrelse (int sig)
{
diff --git a/libc/signal/sigset.c b/libc/signal/sigset.c
index db1fb7d74..f4c04dc3e 100644
--- a/libc/signal/sigset.c
+++ b/libc/signal/sigset.c
@@ -22,8 +22,8 @@
#include <signal.h>
#include <string.h> /* For the real memset prototype. */
-libc_hidden_proto(sigaction)
-libc_hidden_proto(sigprocmask)
+/* libc_hidden_proto(sigaction) */
+/* libc_hidden_proto(sigprocmask) */
/* Set the disposition for SIG. */
__sighandler_t sigset (int sig, __sighandler_t disp)
diff --git a/libc/signal/sigsetmask.c b/libc/signal/sigsetmask.c
index 2c074674d..5de4b59e4 100644
--- a/libc/signal/sigsetmask.c
+++ b/libc/signal/sigsetmask.c
@@ -20,12 +20,12 @@
#include <errno.h>
#include <signal.h>
-libc_hidden_proto(sigprocmask)
+/* 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)
+/* libc_hidden_proto(sigsetmask) */
int
sigsetmask (int mask)
{
diff --git a/libc/signal/sigsetops.c b/libc/signal/sigsetops.c
index 6f1ae5c83..c47a87b0e 100644
--- a/libc/signal/sigsetops.c
+++ b/libc/signal/sigsetops.c
@@ -9,3 +9,9 @@
#endif
#include <signal.h>
+
+/* Since we massaged signal.h into emitting non-inline function
+ * definitions, we need to finish PLT avoidance trick: */
+libc_hidden_def(__sigismember)
+libc_hidden_def(__sigaddset)
+libc_hidden_def(__sigdelset)
diff --git a/libc/signal/sysv_signal.c b/libc/signal/sysv_signal.c
index 6eebf201b..c0cd19a95 100644
--- a/libc/signal/sysv_signal.c
+++ b/libc/signal/sysv_signal.c
@@ -20,7 +20,7 @@
#include <signal.h>
#include <string.h> /* For the real memset prototype. */
-libc_hidden_proto(sigaction)
+/* libc_hidden_proto(sigaction) */
/* Tolerate non-threads versions of Posix */
#ifndef SA_ONESHOT
diff --git a/libc/stdio/_READ.c b/libc/stdio/_READ.c
index 09fca91c7..0531b2ef2 100644
--- a/libc/stdio/_READ.c
+++ b/libc/stdio/_READ.c
@@ -7,7 +7,7 @@
#include "_stdio.h"
-libc_hidden_proto(read)
+/* libc_hidden_proto(read) */
/* libc_hidden_proto(abort) */
/* Given a reading stream without its end-of-file indicator set and
diff --git a/libc/stdio/_WRITE.c b/libc/stdio/_WRITE.c
index 83714bd4c..3d6174325 100644
--- a/libc/stdio/_WRITE.c
+++ b/libc/stdio/_WRITE.c
@@ -7,7 +7,7 @@
#include "_stdio.h"
-libc_hidden_proto(write)
+/* libc_hidden_proto(write) */
/* Given a writing stream with no buffered output, write the
* data in 'buf' (which may be the stream's bufstart) of size
diff --git a/libc/stdio/__fsetlocking.c b/libc/stdio/__fsetlocking.c
index 2e8710076..2011cc78c 100644
--- a/libc/stdio/__fsetlocking.c
+++ b/libc/stdio/__fsetlocking.c
@@ -8,7 +8,7 @@
#include "_stdio.h"
#include <stdio_ext.h>
-libc_hidden_proto(__fsetlocking)
+/* libc_hidden_proto(__fsetlocking) */
/* Not threadsafe. */
diff --git a/libc/stdio/_cs_funcs.c b/libc/stdio/_cs_funcs.c
index 8f83aa229..69a04bcc8 100644
--- a/libc/stdio/_cs_funcs.c
+++ b/libc/stdio/_cs_funcs.c
@@ -7,13 +7,13 @@
#include "_stdio.h"
-libc_hidden_proto(read)
-libc_hidden_proto(write)
+/* libc_hidden_proto(read) */
+/* libc_hidden_proto(write) */
/* libc_hidden_proto(close) */
#ifdef __UCLIBC_HAS_LFS__
-libc_hidden_proto(lseek64)
+/* libc_hidden_proto(lseek64) */
#else
-libc_hidden_proto(lseek)
+/* libc_hidden_proto(lseek) */
#endif
/**********************************************************************/
diff --git a/libc/stdio/_flushlbf.c b/libc/stdio/_flushlbf.c
index 8a551a746..7146e9bc9 100644
--- a/libc/stdio/_flushlbf.c
+++ b/libc/stdio/_flushlbf.c
@@ -8,7 +8,7 @@
#include "_stdio.h"
#include <stdio_ext.h>
-libc_hidden_proto(fflush_unlocked)
+/* libc_hidden_proto(fflush_unlocked) */
/* Solaris function --
* Flush all line buffered (writing) streams.
diff --git a/libc/stdio/_fopen.c b/libc/stdio/_fopen.c
index d68f2ead1..8ed3e6592 100644
--- a/libc/stdio/_fopen.c
+++ b/libc/stdio/_fopen.c
@@ -7,9 +7,9 @@
#include "_stdio.h"
-libc_hidden_proto(isatty)
-libc_hidden_proto(open)
-libc_hidden_proto(fcntl)
+/* libc_hidden_proto(isatty) */
+/* libc_hidden_proto(open) */
+/* libc_hidden_proto(fcntl) */
/*
* Cases:
diff --git a/libc/stdio/_scanf.c b/libc/stdio/_scanf.c
index fbd35db24..da13f1fb2 100644
--- a/libc/stdio/_scanf.c
+++ b/libc/stdio/_scanf.c
@@ -81,22 +81,22 @@
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(strcpy) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(ungetc)
-libc_hidden_proto(vfscanf)
-libc_hidden_proto(vsscanf)
+/* libc_hidden_proto(ungetc) */
+/* libc_hidden_proto(vfscanf) */
+/* libc_hidden_proto(vsscanf) */
/* libc_hidden_proto(fclose) */
-libc_hidden_proto(getc_unlocked)
-libc_hidden_proto(__fgetc_unlocked)
+/* libc_hidden_proto(getc_unlocked) */
+/* libc_hidden_proto(__fgetc_unlocked) */
#ifdef __UCLIBC_HAS_WCHAR__
-libc_hidden_proto(wcslen)
-libc_hidden_proto(vfwscanf)
-libc_hidden_proto(vswscanf)
-libc_hidden_proto(mbsrtowcs)
-libc_hidden_proto(mbrtowc)
-libc_hidden_proto(wcrtomb)
-libc_hidden_proto(ungetwc)
-libc_hidden_proto(iswspace)
-libc_hidden_proto(fgetwc_unlocked)
+/* libc_hidden_proto(wcslen) */
+/* libc_hidden_proto(vfwscanf) */
+/* libc_hidden_proto(vswscanf) */
+/* libc_hidden_proto(mbsrtowcs) */
+/* libc_hidden_proto(mbrtowc) */
+/* libc_hidden_proto(wcrtomb) */
+/* libc_hidden_proto(ungetwc) */
+/* libc_hidden_proto(iswspace) */
+/* libc_hidden_proto(fgetwc_unlocked) */
#endif
#ifdef __UCLIBC_HAS_XLOCALE__
/* libc_hidden_proto(__ctype_b_loc) */
@@ -165,7 +165,7 @@ _stdlib_strto_l(register const char * __restrict str,
/**********************************************************************/
#ifdef L_fscanf
-libc_hidden_proto(fscanf)
+/* libc_hidden_proto(fscanf) */
int fscanf(FILE * __restrict stream, const char * __restrict format, ...)
{
va_list arg;
@@ -201,7 +201,7 @@ int scanf(const char * __restrict format, ...)
#ifdef __STDIO_HAS_VSSCANF
-libc_hidden_proto(sscanf)
+/* libc_hidden_proto(sscanf) */
int sscanf(const char * __restrict str, const char * __restrict format, ...)
{
va_list arg;
@@ -223,7 +223,7 @@ libc_hidden_def(sscanf)
/**********************************************************************/
#ifdef L_vscanf
-libc_hidden_proto(vscanf)
+/* libc_hidden_proto(vscanf) */
int vscanf(const char * __restrict format, va_list arg)
{
return vfscanf(stdin, format, arg);
diff --git a/libc/stdio/_stdio.c b/libc/stdio/_stdio.c
index 135995298..4707cde10 100644
--- a/libc/stdio/_stdio.c
+++ b/libc/stdio/_stdio.c
@@ -8,7 +8,7 @@
#include "_stdio.h"
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(isatty)
+/* libc_hidden_proto(isatty) */
/* This is pretty much straight from uClibc, but with one important
* difference.
diff --git a/libc/stdio/_stdio.h b/libc/stdio/_stdio.h
index e8ef08983..ec98f9e0e 100644
--- a/libc/stdio/_stdio.h
+++ b/libc/stdio/_stdio.h
@@ -46,7 +46,7 @@ do { \
__STDIO_THREADUNLOCK_OPENLIST_DEL; \
} while (0)
-extern void _stdio_openlist_dec_use(void);
+extern void _stdio_openlist_dec_use(void) attribute_hidden;
#define __STDIO_OPENLIST_DEC_USE \
_stdio_openlist_dec_use()
diff --git a/libc/stdio/_trans2w.c b/libc/stdio/_trans2w.c
index ed1a583fc..57a06d336 100644
--- a/libc/stdio/_trans2w.c
+++ b/libc/stdio/_trans2w.c
@@ -7,7 +7,7 @@
#include "_stdio.h"
-libc_hidden_proto(fseek)
+/* libc_hidden_proto(fseek) */
/* Function to handle transition to writing.
* Initialize or verify the stream's orientation (even if readonly).
diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c
index 9d7f99cad..5ce3f8a59 100644
--- a/libc/stdio/_vfprintf.c
+++ b/libc/stdio/_vfprintf.c
@@ -119,17 +119,17 @@
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(strlen) */
/* Experimentally off - libc_hidden_proto(strnlen) */
-libc_hidden_proto(__glibc_strerror_r)
-libc_hidden_proto(fputs_unlocked)
+/* libc_hidden_proto(__glibc_strerror_r) */
+/* libc_hidden_proto(fputs_unlocked) */
/* libc_hidden_proto(abort) */
#ifdef __UCLIBC_HAS_WCHAR__
-libc_hidden_proto(wcslen)
-libc_hidden_proto(wcsnlen)
-libc_hidden_proto(mbsrtowcs)
-libc_hidden_proto(wcsrtombs)
-libc_hidden_proto(btowc)
-libc_hidden_proto(wcrtomb)
-libc_hidden_proto(fputws)
+/* libc_hidden_proto(wcslen) */
+/* libc_hidden_proto(wcsnlen) */
+/* libc_hidden_proto(mbsrtowcs) */
+/* libc_hidden_proto(wcsrtombs) */
+/* libc_hidden_proto(btowc) */
+/* libc_hidden_proto(wcrtomb) */
+/* libc_hidden_proto(fputws) */
#endif
/* Some older or broken gcc toolchains define LONG_LONG_MAX but not
diff --git a/libc/stdio/_wfwrite.c b/libc/stdio/_wfwrite.c
index fb5c6b3ee..8fa59f87d 100644
--- a/libc/stdio/_wfwrite.c
+++ b/libc/stdio/_wfwrite.c
@@ -16,8 +16,8 @@
#warning TODO: Fix prototype.
#endif
-libc_hidden_proto(wmemcpy)
-libc_hidden_proto(wcsnrtombs)
+/* libc_hidden_proto(wmemcpy) */
+/* libc_hidden_proto(wcsnrtombs) */
size_t attribute_hidden _wstdio_fwrite(const wchar_t *__restrict ws, size_t n,
register FILE *__restrict stream)
diff --git a/libc/stdio/asprintf.c b/libc/stdio/asprintf.c
index 3f1992559..8c6420936 100644
--- a/libc/stdio/asprintf.c
+++ b/libc/stdio/asprintf.c
@@ -11,9 +11,9 @@
#include "_stdio.h"
#include <stdarg.h>
-libc_hidden_proto(asprintf)
+/* libc_hidden_proto(asprintf) */
-libc_hidden_proto(vasprintf)
+/* libc_hidden_proto(vasprintf) */
#ifndef __STDIO_HAS_VSNPRINTF
#warning Skipping asprintf and __asprintf since no vsnprintf!
diff --git a/libc/stdio/dprintf.c b/libc/stdio/dprintf.c
index a8b2704b2..0123c501a 100644
--- a/libc/stdio/dprintf.c
+++ b/libc/stdio/dprintf.c
@@ -11,7 +11,7 @@
#include "_stdio.h"
#include <stdarg.h>
-libc_hidden_proto(vdprintf)
+/* libc_hidden_proto(vdprintf) */
int dprintf(int filedes, const char * __restrict format, ...)
{
diff --git a/libc/stdio/fclose.c b/libc/stdio/fclose.c
index eadfe74de..7d2138130 100644
--- a/libc/stdio/fclose.c
+++ b/libc/stdio/fclose.c
@@ -9,7 +9,7 @@
/* libc_hidden_proto(fclose) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(fflush_unlocked)
+/* libc_hidden_proto(fflush_unlocked) */
int fclose(register FILE *stream)
{
diff --git a/libc/stdio/fdopen.c b/libc/stdio/fdopen.c
index 635ab803d..d47d6ea99 100644
--- a/libc/stdio/fdopen.c
+++ b/libc/stdio/fdopen.c
@@ -7,8 +7,8 @@
#include "_stdio.h"
-libc_hidden_proto(fdopen)
-libc_hidden_proto(fcntl)
+/* libc_hidden_proto(fdopen) */
+/* libc_hidden_proto(fcntl) */
FILE *fdopen(int filedes, const char *mode)
{
diff --git a/libc/stdio/fflush.c b/libc/stdio/fflush.c
index 11b837dde..0a950d511 100644
--- a/libc/stdio/fflush.c
+++ b/libc/stdio/fflush.c
@@ -7,7 +7,7 @@
#include "_stdio.h"
-libc_hidden_proto(fflush_unlocked)
+/* libc_hidden_proto(fflush_unlocked) */
#ifdef __DO_UNLOCKED
@@ -27,7 +27,7 @@ libc_hidden_proto(fflush_unlocked)
(_stdio_user_locking != 2))
#if defined(__UCLIBC_HAS_THREADS__) && defined(__STDIO_BUFFERS)
-void _stdio_openlist_dec_use(void)
+void attribute_hidden _stdio_openlist_dec_use(void)
{
__STDIO_THREADLOCK_OPENLIST_DEL;
if ((_stdio_openlist_use_count == 1) && (_stdio_openlist_del_count > 0)) {
@@ -179,14 +179,14 @@ int fflush_unlocked(register FILE *stream)
libc_hidden_def(fflush_unlocked)
#ifndef __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fflush)
+/* libc_hidden_proto(fflush) */
strong_alias(fflush_unlocked,fflush)
libc_hidden_def(fflush)
#endif
#elif defined __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fflush)
+/* libc_hidden_proto(fflush) */
int fflush(register FILE *stream)
{
int retval;
diff --git a/libc/stdio/fgetc.c b/libc/stdio/fgetc.c
index 7eb2b6ea2..89c8fe35a 100644
--- a/libc/stdio/fgetc.c
+++ b/libc/stdio/fgetc.c
@@ -13,11 +13,11 @@
#undef getc
#undef getc_unlocked
-libc_hidden_proto(__fgetc_unlocked)
+/* libc_hidden_proto(__fgetc_unlocked) */
#ifdef __DO_UNLOCKED
-libc_hidden_proto(fflush_unlocked)
+/* libc_hidden_proto(fflush_unlocked) */
int __fgetc_unlocked(FILE *stream)
{
@@ -75,7 +75,7 @@ int __fgetc_unlocked(FILE *stream)
}
libc_hidden_def(__fgetc_unlocked)
-libc_hidden_proto(fgetc_unlocked)
+/* libc_hidden_proto(fgetc_unlocked) */
strong_alias(__fgetc_unlocked,fgetc_unlocked)
libc_hidden_def(fgetc_unlocked)
@@ -83,12 +83,12 @@ libc_hidden_def(fgetc_unlocked)
//strong_alias(__fgetc_unlocked,__getc_unlocked)
//libc_hidden_def(__getc_unlocked)
-libc_hidden_proto(getc_unlocked)
+/* libc_hidden_proto(getc_unlocked) */
strong_alias(__fgetc_unlocked,getc_unlocked)
libc_hidden_def(getc_unlocked)
#ifndef __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fgetc)
+/* libc_hidden_proto(fgetc) */
strong_alias(__fgetc_unlocked,fgetc)
libc_hidden_def(fgetc)
@@ -97,7 +97,7 @@ strong_alias(__fgetc_unlocked,getc)
#elif defined __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fgetc)
+/* libc_hidden_proto(fgetc) */
int fgetc(register FILE *stream)
{
if (stream->__user_locking != 0) {
diff --git a/libc/stdio/fgets.c b/libc/stdio/fgets.c
index 5acaf91ed..0c7b97ecd 100644
--- a/libc/stdio/fgets.c
+++ b/libc/stdio/fgets.c
@@ -7,11 +7,11 @@
#include "_stdio.h"
-libc_hidden_proto(fgets_unlocked)
+/* libc_hidden_proto(fgets_unlocked) */
#ifdef __DO_UNLOCKED
-libc_hidden_proto(__fgetc_unlocked)
+/* libc_hidden_proto(__fgetc_unlocked) */
char *fgets_unlocked(char *__restrict s, int n,
register FILE * __restrict stream)
@@ -64,14 +64,14 @@ char *fgets_unlocked(char *__restrict s, int n,
libc_hidden_def(fgets_unlocked)
#ifndef __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fgets)
+/* libc_hidden_proto(fgets) */
strong_alias(fgets_unlocked,fgets)
libc_hidden_def(fgets)
#endif
#elif defined __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fgets)
+/* libc_hidden_proto(fgets) */
char *fgets(char *__restrict s, int n,
register FILE * __restrict stream)
{
diff --git a/libc/stdio/fgetwc.c b/libc/stdio/fgetwc.c
index 062d825d6..34327434c 100644
--- a/libc/stdio/fgetwc.c
+++ b/libc/stdio/fgetwc.c
@@ -7,9 +7,9 @@
#include "_stdio.h"
-libc_hidden_proto(fgetwc_unlocked)
+/* libc_hidden_proto(fgetwc_unlocked) */
-libc_hidden_proto(mbrtowc)
+/* libc_hidden_proto(mbrtowc) */
#ifdef __DO_UNLOCKED
@@ -113,7 +113,7 @@ libc_hidden_def(fgetwc_unlocked)
strong_alias(fgetwc_unlocked,getwc_unlocked)
#ifndef __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fgetwc)
+/* libc_hidden_proto(fgetwc) */
strong_alias(fgetwc_unlocked,fgetwc)
libc_hidden_def(fgetwc)
@@ -122,7 +122,7 @@ strong_alias(fgetwc_unlocked,getwc)
#elif defined __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fgetwc)
+/* libc_hidden_proto(fgetwc) */
wint_t fgetwc(register FILE *stream)
{
wint_t retval;
diff --git a/libc/stdio/fgetws.c b/libc/stdio/fgetws.c
index c7dcc7d2b..80af1a217 100644
--- a/libc/stdio/fgetws.c
+++ b/libc/stdio/fgetws.c
@@ -7,9 +7,9 @@
#include "_stdio.h"
-libc_hidden_proto(fgetws_unlocked)
+/* libc_hidden_proto(fgetws_unlocked) */
-libc_hidden_proto(fgetwc_unlocked)
+/* libc_hidden_proto(fgetwc_unlocked) */
#ifdef __DO_UNLOCKED
diff --git a/libc/stdio/fileno.c b/libc/stdio/fileno.c
index 929936bfd..faed620d8 100644
--- a/libc/stdio/fileno.c
+++ b/libc/stdio/fileno.c
@@ -7,7 +7,7 @@
#include "_stdio.h"
-libc_hidden_proto(fileno_unlocked)
+/* libc_hidden_proto(fileno_unlocked) */
#ifdef __DO_UNLOCKED
@@ -25,14 +25,14 @@ int fileno_unlocked(register FILE *stream)
libc_hidden_def(fileno_unlocked)
#ifndef __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fileno)
+/* libc_hidden_proto(fileno) */
strong_alias(fileno_unlocked,fileno)
libc_hidden_def(fileno)
#endif
#elif defined __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fileno)
+/* libc_hidden_proto(fileno) */
int fileno(register FILE *stream)
{
int retval;
diff --git a/libc/stdio/fmemopen.c b/libc/stdio/fmemopen.c
index ba194d726..269c7ec6d 100644
--- a/libc/stdio/fmemopen.c
+++ b/libc/stdio/fmemopen.c
@@ -11,7 +11,7 @@
#include "_stdio.h"
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(fopencookie)
+/* libc_hidden_proto(fopencookie) */
#ifndef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__
#error no custom streams!
diff --git a/libc/stdio/fopen.c b/libc/stdio/fopen.c
index ec14b5956..b5fc85af9 100644
--- a/libc/stdio/fopen.c
+++ b/libc/stdio/fopen.c
@@ -14,7 +14,7 @@
#undef fopen64
#endif
-libc_hidden_proto(fopen)
+/* libc_hidden_proto(fopen) */
FILE *fopen(const char * __restrict filename, const char * __restrict mode)
{
return _stdio_fopen(((intptr_t) filename), mode, NULL, FILEDES_ARG);
diff --git a/libc/stdio/fopencookie.c b/libc/stdio/fopencookie.c
index 0b7ed84b1..ac2c33483 100644
--- a/libc/stdio/fopencookie.c
+++ b/libc/stdio/fopencookie.c
@@ -31,7 +31,7 @@
/* Currently no real reentrancy issues other than a possible double close(). */
#ifndef __BCC__
-libc_hidden_proto(fopencookie)
+/* libc_hidden_proto(fopencookie) */
FILE *fopencookie(void * __restrict cookie, const char * __restrict mode,
cookie_io_functions_t io_functions)
#else
diff --git a/libc/stdio/fprintf.c b/libc/stdio/fprintf.c
index b10340f65..4e3246ec8 100644
--- a/libc/stdio/fprintf.c
+++ b/libc/stdio/fprintf.c
@@ -8,7 +8,7 @@
#include "_stdio.h"
#include <stdarg.h>
-libc_hidden_proto(vfprintf)
+/* libc_hidden_proto(vfprintf) */
/* libc_hidden_proto(fprintf) */
int fprintf(FILE * __restrict stream, const char * __restrict format, ...)
diff --git a/libc/stdio/fputc.c b/libc/stdio/fputc.c
index ac3b23ec5..09d8ee138 100644
--- a/libc/stdio/fputc.c
+++ b/libc/stdio/fputc.c
@@ -12,7 +12,7 @@
#undef putc
#undef putc_unlocked
-libc_hidden_proto(__fputc_unlocked)
+/* libc_hidden_proto(__fputc_unlocked) */
#ifdef __DO_UNLOCKED
@@ -78,22 +78,22 @@ strong_alias(__fputc_unlocked,fputc_unlocked)
/* exposing these would be fundamentally *wrong*! fix you, instead! */
/* libc_hidden_def(fputc_unlocked) */
-libc_hidden_proto(putc_unlocked)
+/* libc_hidden_proto(putc_unlocked) */
strong_alias(__fputc_unlocked,putc_unlocked)
libc_hidden_def(putc_unlocked)
#ifndef __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fputc)
+/* libc_hidden_proto(fputc) */
strong_alias(__fputc_unlocked,fputc)
libc_hidden_def(fputc)
-libc_hidden_proto(putc)
+/* libc_hidden_proto(putc) */
strong_alias(__fputc_unlocked,putc)
libc_hidden_def(putc)
#endif
#elif defined __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fputc)
+/* libc_hidden_proto(fputc) */
int fputc(int c, register FILE *stream)
{
if (stream->__user_locking != 0) {
@@ -108,7 +108,7 @@ int fputc(int c, register FILE *stream)
}
libc_hidden_def(fputc)
-libc_hidden_proto(putc)
+/* libc_hidden_proto(putc) */
strong_alias(fputc,putc)
libc_hidden_def(putc)
diff --git a/libc/stdio/fputs.c b/libc/stdio/fputs.c
index 8a5fd4087..08da59c40 100644
--- a/libc/stdio/fputs.c
+++ b/libc/stdio/fputs.c
@@ -7,10 +7,10 @@
#include "_stdio.h"
-libc_hidden_proto(fputs_unlocked)
+/* libc_hidden_proto(fputs_unlocked) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(fwrite_unlocked)
+/* libc_hidden_proto(fwrite_unlocked) */
/* Note: The standard says fputs returns a nonnegative number on
* success. In this implementation, we return the length of the
@@ -29,14 +29,14 @@ int fputs_unlocked(register const char * __restrict s,
libc_hidden_def(fputs_unlocked)
#ifndef __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fputs)
+/* libc_hidden_proto(fputs) */
strong_alias(fputs_unlocked,fputs)
libc_hidden_def(fputs)
#endif
#elif defined __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fputs)
+/* libc_hidden_proto(fputs) */
int fputs(const char * __restrict s, register FILE * __restrict stream)
{
int retval;
diff --git a/libc/stdio/fputwc.c b/libc/stdio/fputwc.c
index 240c1e9c4..6c7d6b263 100644
--- a/libc/stdio/fputwc.c
+++ b/libc/stdio/fputwc.c
@@ -7,7 +7,7 @@
#include "_stdio.h"
-libc_hidden_proto(fputwc_unlocked)
+/* libc_hidden_proto(fputwc_unlocked) */
#ifdef __DO_UNLOCKED
diff --git a/libc/stdio/fputws.c b/libc/stdio/fputws.c
index ecbc121dd..a4fadb428 100644
--- a/libc/stdio/fputws.c
+++ b/libc/stdio/fputws.c
@@ -7,9 +7,9 @@
#include "_stdio.h"
-libc_hidden_proto(fputws_unlocked)
+/* libc_hidden_proto(fputws_unlocked) */
-libc_hidden_proto(wcslen)
+/* libc_hidden_proto(wcslen) */
#ifdef __DO_UNLOCKED
@@ -23,14 +23,14 @@ int fputws_unlocked(const wchar_t *__restrict ws,
libc_hidden_def(fputws_unlocked)
#ifndef __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fputws)
+/* libc_hidden_proto(fputws) */
strong_alias(fputws_unlocked,fputws)
libc_hidden_def(fputws)
#endif
#elif defined __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fputws)
+/* libc_hidden_proto(fputws) */
int fputws(const wchar_t *__restrict ws, register FILE *__restrict stream)
{
int retval;
diff --git a/libc/stdio/fread.c b/libc/stdio/fread.c
index 4f9c98465..55d3cb2d3 100644
--- a/libc/stdio/fread.c
+++ b/libc/stdio/fread.c
@@ -7,12 +7,12 @@
#include "_stdio.h"
-libc_hidden_proto(fread_unlocked)
+/* libc_hidden_proto(fread_unlocked) */
#ifdef __DO_UNLOCKED
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(fflush_unlocked)
+/* libc_hidden_proto(fflush_unlocked) */
size_t fread_unlocked(void * __restrict ptr, size_t size, size_t nmemb,
FILE * __restrict stream)
@@ -90,14 +90,14 @@ size_t fread_unlocked(void * __restrict ptr, size_t size, size_t nmemb,
libc_hidden_def(fread_unlocked)
#ifndef __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fread)
+/* libc_hidden_proto(fread) */
strong_alias(fread_unlocked,fread)
libc_hidden_def(fread)
#endif
#elif defined __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fread)
+/* libc_hidden_proto(fread) */
size_t fread(void * __restrict ptr, size_t size, size_t nmemb,
register FILE * __restrict stream)
{
diff --git a/libc/stdio/fseeko.c b/libc/stdio/fseeko.c
index 251040231..a7f8b8dc1 100644
--- a/libc/stdio/fseeko.c
+++ b/libc/stdio/fseeko.c
@@ -17,9 +17,9 @@
#endif
#ifdef __UCLIBC_HAS_LFS__
-libc_hidden_proto(fseeko64)
+/* libc_hidden_proto(fseeko64) */
#endif
-libc_hidden_proto(fseek)
+/* libc_hidden_proto(fseek) */
int FSEEK(register FILE *stream, OFFSET_TYPE offset, int whence)
{
diff --git a/libc/stdio/ftello.c b/libc/stdio/ftello.c
index bae1d877c..f6adf3874 100644
--- a/libc/stdio/ftello.c
+++ b/libc/stdio/ftello.c
@@ -8,9 +8,9 @@
#include "_stdio.h"
#ifdef __UCLIBC_HAS_LFS__
-libc_hidden_proto(ftello64)
+/* libc_hidden_proto(ftello64) */
#endif
-libc_hidden_proto(ftell)
+/* libc_hidden_proto(ftell) */
#ifndef __DO_LARGEFILE
# define FTELL ftell
diff --git a/libc/stdio/fwprintf.c b/libc/stdio/fwprintf.c
index f2a1afbec..a5f09cd2d 100644
--- a/libc/stdio/fwprintf.c
+++ b/libc/stdio/fwprintf.c
@@ -9,7 +9,7 @@
#include <stdarg.h>
#include <wchar.h>
-libc_hidden_proto(vfwprintf)
+/* libc_hidden_proto(vfwprintf) */
int fwprintf(FILE * __restrict stream, const wchar_t * __restrict format, ...)
{
diff --git a/libc/stdio/fwrite.c b/libc/stdio/fwrite.c
index 7be794ab4..180fa9249 100644
--- a/libc/stdio/fwrite.c
+++ b/libc/stdio/fwrite.c
@@ -7,7 +7,7 @@
#include "_stdio.h"
-libc_hidden_proto(fwrite_unlocked)
+/* libc_hidden_proto(fwrite_unlocked) */
#ifdef __DO_UNLOCKED
@@ -38,14 +38,14 @@ size_t fwrite_unlocked(const void * __restrict ptr, size_t size,
libc_hidden_def(fwrite_unlocked)
#ifndef __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fwrite)
+/* libc_hidden_proto(fwrite) */
strong_alias(fwrite_unlocked,fwrite)
libc_hidden_def(fwrite)
#endif
#elif defined __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fwrite)
+/* libc_hidden_proto(fwrite) */
size_t fwrite(const void * __restrict ptr, size_t size,
size_t nmemb, register FILE * __restrict stream)
{
diff --git a/libc/stdio/getchar.c b/libc/stdio/getchar.c
index e29c426c8..2ef7220e4 100644
--- a/libc/stdio/getchar.c
+++ b/libc/stdio/getchar.c
@@ -7,14 +7,14 @@
#include "_stdio.h"
-libc_hidden_proto(__fgetc_unlocked)
+/* libc_hidden_proto(__fgetc_unlocked) */
#undef getchar
#ifdef __DO_UNLOCKED
/* the only use of the hidden getchar_unlocked is in gets.c */
#undef getchar_unlocked
-libc_hidden_proto(getchar_unlocked)
+/* libc_hidden_proto(getchar_unlocked) */
int getchar_unlocked(void)
{
register FILE *stream = stdin;
diff --git a/libc/stdio/getdelim.c b/libc/stdio/getdelim.c
index 21c86f400..30fca81d7 100644
--- a/libc/stdio/getdelim.c
+++ b/libc/stdio/getdelim.c
@@ -10,9 +10,9 @@
#ifdef __USE_GNU
#include "_stdio.h"
-libc_hidden_proto(getdelim)
+/* libc_hidden_proto(getdelim) */
-libc_hidden_proto(__fgetc_unlocked)
+/* libc_hidden_proto(__fgetc_unlocked) */
/* Note: There is a defect in this function. (size_t vs ssize_t). */
diff --git a/libc/stdio/getline.c b/libc/stdio/getline.c
index 22b67b831..8123b0c95 100644
--- a/libc/stdio/getline.c
+++ b/libc/stdio/getline.c
@@ -10,9 +10,9 @@
#ifdef __USE_GNU
#include "_stdio.h"
-libc_hidden_proto(getline)
+/* libc_hidden_proto(getline) */
-libc_hidden_proto(getdelim)
+/* libc_hidden_proto(getdelim) */
ssize_t getline(char **__restrict lineptr, size_t *__restrict n,
FILE *__restrict stream)
diff --git a/libc/stdio/gets.c b/libc/stdio/gets.c
index 85bb8475a..c8271977e 100644
--- a/libc/stdio/gets.c
+++ b/libc/stdio/gets.c
@@ -13,7 +13,7 @@ link_warning(gets, "the 'gets' function is dangerous and should not be used.")
/* disable macro, force actual function call */
#undef getchar_unlocked
-libc_hidden_proto(getchar_unlocked)
+/* libc_hidden_proto(getchar_unlocked) */
char *gets(char *s)
{
diff --git a/libc/stdio/getw.c b/libc/stdio/getw.c
index e3aeda92c..75255aae9 100644
--- a/libc/stdio/getw.c
+++ b/libc/stdio/getw.c
@@ -7,7 +7,7 @@
#include "_stdio.h"
-libc_hidden_proto(fread_unlocked)
+/* libc_hidden_proto(fread_unlocked) */
/* SUSv2 Legacy function -- need not be reentrant. */
diff --git a/libc/stdio/getwchar.c b/libc/stdio/getwchar.c
index 9c480b564..c17f0c71c 100644
--- a/libc/stdio/getwchar.c
+++ b/libc/stdio/getwchar.c
@@ -9,7 +9,7 @@
#ifdef __DO_UNLOCKED
-libc_hidden_proto(fgetwc_unlocked)
+/* libc_hidden_proto(fgetwc_unlocked) */
wint_t getwchar_unlocked(void)
{
@@ -22,7 +22,7 @@ strong_alias(getwchar_unlocked,getwchar)
#elif defined __UCLIBC_HAS_THREADS__
-libc_hidden_proto(fgetwc)
+/* libc_hidden_proto(fgetwc) */
wint_t getwchar(void)
{
diff --git a/libc/stdio/old_vfprintf.c b/libc/stdio/old_vfprintf.c
index a7ec28d8d..e3a817368 100644
--- a/libc/stdio/old_vfprintf.c
+++ b/libc/stdio/old_vfprintf.c
@@ -146,9 +146,9 @@
/* Experimentally off - libc_hidden_proto(strlen) */
/* Experimentally off - libc_hidden_proto(strnlen) */
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(putc_unlocked)
-libc_hidden_proto(__fputc_unlocked)
-libc_hidden_proto(__glibc_strerror_r)
+/* libc_hidden_proto(putc_unlocked) */
+/* libc_hidden_proto(__fputc_unlocked) */
+/* libc_hidden_proto(__glibc_strerror_r) */
/* #undef __UCLIBC_HAS_FLOATS__ */
/* #undef WANT_FLOAT_ERROR */
@@ -343,7 +343,7 @@ static const char u_spec[] = "%nbopxXudics";
/* u_radix[i] <-> u_spec[i+2] for unsigned entries only */
static const char u_radix[] = "\x02\x08\x10\x10\x10\x0a";
-libc_hidden_proto(vfprintf)
+/* libc_hidden_proto(vfprintf) */
int vfprintf(FILE * __restrict op, register const char * __restrict fmt,
va_list ap)
{
diff --git a/libc/stdio/open_memstream.c b/libc/stdio/open_memstream.c
index 5861017e4..46142a089 100644
--- a/libc/stdio/open_memstream.c
+++ b/libc/stdio/open_memstream.c
@@ -12,7 +12,7 @@
/* Experimentally off - libc_hidden_proto(memcpy) */
/* Experimentally off - libc_hidden_proto(memset) */
-libc_hidden_proto(fopencookie)
+/* libc_hidden_proto(fopencookie) */
#ifndef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__
#error no custom streams!
@@ -131,7 +131,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)
+/* libc_hidden_proto(open_memstream) */
FILE *open_memstream(char **__restrict bufloc, size_t *__restrict sizeloc)
{
register __oms_cookie *cookie;
diff --git a/libc/stdio/perror.c b/libc/stdio/perror.c
index 46881ea85..a01c4fe18 100644
--- a/libc/stdio/perror.c
+++ b/libc/stdio/perror.c
@@ -8,13 +8,13 @@
#include "_stdio.h"
/* libc_hidden_proto(fprintf) */
-libc_hidden_proto(__glibc_strerror_r)
+/* libc_hidden_proto(__glibc_strerror_r) */
#ifdef __UCLIBC_MJN3_ONLY__
#warning CONSIDER: Increase buffer size for error message (non-%m case)?
#endif
-libc_hidden_proto(perror)
+/* libc_hidden_proto(perror) */
void perror(register const char *s)
{
/* If the program is calling perror, it's a safe bet that printf and
diff --git a/libc/stdio/popen.c b/libc/stdio/popen.c
index fc6979375..e920b8d7e 100644
--- a/libc/stdio/popen.c
+++ b/libc/stdio/popen.c
@@ -27,13 +27,13 @@
#endif /* __UCLIBC_MJN3_ONLY__ */
/* libc_hidden_proto(close) */
-libc_hidden_proto(_exit)
-libc_hidden_proto(waitpid)
-libc_hidden_proto(execl)
-libc_hidden_proto(dup2)
-libc_hidden_proto(fdopen)
-libc_hidden_proto(pipe)
-libc_hidden_proto(vfork)
+/* libc_hidden_proto(_exit) */
+/* libc_hidden_proto(waitpid) */
+/* libc_hidden_proto(execl) */
+/* libc_hidden_proto(dup2) */
+/* libc_hidden_proto(fdopen) */
+/* libc_hidden_proto(pipe) */
+/* libc_hidden_proto(vfork) */
/* libc_hidden_proto(fclose) */
/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
@@ -42,7 +42,7 @@ libc_hidden_proto(vfork)
# define vfork fork
# define VFORK_LOCK ((void) 0)
# define VFORK_UNLOCK ((void) 0)
-libc_hidden_proto(fork)
+/* libc_hidden_proto(fork) */
#endif
#ifndef VFORK_LOCK
diff --git a/libc/stdio/printf.c b/libc/stdio/printf.c
index 617561fec..2f4a36e95 100644
--- a/libc/stdio/printf.c
+++ b/libc/stdio/printf.c
@@ -8,9 +8,9 @@
#include "_stdio.h"
#include <stdarg.h>
-libc_hidden_proto(vfprintf)
+/* libc_hidden_proto(vfprintf) */
-libc_hidden_proto(printf)
+/* libc_hidden_proto(printf) */
int printf(const char * __restrict format, ...)
{
va_list arg;
diff --git a/libc/stdio/putchar.c b/libc/stdio/putchar.c
index b54a7a815..65d8f64c1 100644
--- a/libc/stdio/putchar.c
+++ b/libc/stdio/putchar.c
@@ -7,7 +7,7 @@
#include "_stdio.h"
-libc_hidden_proto(__fputc_unlocked)
+/* libc_hidden_proto(__fputc_unlocked) */
#undef putchar
#ifdef __DO_UNLOCKED
diff --git a/libc/stdio/puts.c b/libc/stdio/puts.c
index 08525b2f6..3ece1ba68 100644
--- a/libc/stdio/puts.c
+++ b/libc/stdio/puts.c
@@ -7,8 +7,8 @@
#include "_stdio.h"
-libc_hidden_proto(__fputc_unlocked)
-libc_hidden_proto(fputs_unlocked)
+/* libc_hidden_proto(__fputc_unlocked) */
+/* libc_hidden_proto(fputs_unlocked) */
int puts(register const char * __restrict s)
{
diff --git a/libc/stdio/putw.c b/libc/stdio/putw.c
index 469e44aea..5074117b6 100644
--- a/libc/stdio/putw.c
+++ b/libc/stdio/putw.c
@@ -7,7 +7,7 @@
#include "_stdio.h"
-libc_hidden_proto(fwrite_unlocked)
+/* libc_hidden_proto(fwrite_unlocked) */
/* SUSv2 Legacy function -- need not be reentrant. */
diff --git a/libc/stdio/putwchar.c b/libc/stdio/putwchar.c
index 7a6501c28..aa6531988 100644
--- a/libc/stdio/putwchar.c
+++ b/libc/stdio/putwchar.c
@@ -9,7 +9,7 @@
#ifdef __DO_UNLOCKED
-libc_hidden_proto(fputwc_unlocked)
+/* libc_hidden_proto(fputwc_unlocked) */
wint_t putwchar_unlocked(wchar_t wc)
{
@@ -22,9 +22,9 @@ strong_alias(putwchar_unlocked,putwchar)
#elif defined __UCLIBC_HAS_THREADS__
-libc_hidden_proto(__fputc_unlocked)
+/* libc_hidden_proto(__fputc_unlocked) */
/* psm: should this be fputwc? */
-libc_hidden_proto(fputc)
+/* libc_hidden_proto(fputc) */
wint_t putwchar(wchar_t wc)
{
diff --git a/libc/stdio/remove.c b/libc/stdio/remove.c
index f322411e4..c186164b8 100644
--- a/libc/stdio/remove.c
+++ b/libc/stdio/remove.c
@@ -10,8 +10,8 @@
#include <unistd.h>
#include <errno.h>
-libc_hidden_proto(rmdir)
-libc_hidden_proto(unlink)
+/* libc_hidden_proto(rmdir) */
+/* libc_hidden_proto(unlink) */
/* SUSv3 states:
* If path does not name a directory, remove(path) shall be equivalent
@@ -19,7 +19,7 @@ libc_hidden_proto(unlink)
* equivalent to rmdir(path).
*/
-libc_hidden_proto(remove)
+/* libc_hidden_proto(remove) */
int remove(register const char *filename)
{
int saved_errno = errno;
diff --git a/libc/stdio/rewind.c b/libc/stdio/rewind.c
index e04d7a086..600f8cd0e 100644
--- a/libc/stdio/rewind.c
+++ b/libc/stdio/rewind.c
@@ -7,9 +7,9 @@
#include "_stdio.h"
-libc_hidden_proto(fseek)
+/* libc_hidden_proto(fseek) */
-libc_hidden_proto(rewind)
+/* libc_hidden_proto(rewind) */
void rewind(register FILE *stream)
{
__STDIO_AUTO_THREADLOCK_VAR;
diff --git a/libc/stdio/setbuf.c b/libc/stdio/setbuf.c
index 6de2c91a1..b9bdc8b5b 100644
--- a/libc/stdio/setbuf.c
+++ b/libc/stdio/setbuf.c
@@ -7,7 +7,7 @@
#include "_stdio.h"
-libc_hidden_proto(setvbuf)
+/* libc_hidden_proto(setvbuf) */
void setbuf(FILE * __restrict stream, register char * __restrict buf)
{
diff --git a/libc/stdio/setbuffer.c b/libc/stdio/setbuffer.c
index ea2421aa8..428b38936 100644
--- a/libc/stdio/setbuffer.c
+++ b/libc/stdio/setbuffer.c
@@ -9,7 +9,7 @@
#ifdef __USE_BSD
-libc_hidden_proto(setvbuf)
+/* libc_hidden_proto(setvbuf) */
/* A BSD function. The implementation matches the linux man page,
* except that we do not bother calling setvbuf if not configured
diff --git a/libc/stdio/setlinebuf.c b/libc/stdio/setlinebuf.c
index 9b4be53eb..564776989 100644
--- a/libc/stdio/setlinebuf.c
+++ b/libc/stdio/setlinebuf.c
@@ -9,7 +9,7 @@
#ifdef __USE_BSD
-libc_hidden_proto(setvbuf)
+/* libc_hidden_proto(setvbuf) */
/* A BSD function. The implementation matches the linux man page,
* except that we do not bother calling setvbuf if not configured
diff --git a/libc/stdio/setvbuf.c b/libc/stdio/setvbuf.c
index 6dbb532db..7f0c6f6f3 100644
--- a/libc/stdio/setvbuf.c
+++ b/libc/stdio/setvbuf.c
@@ -14,7 +14,7 @@
#error Assumption violated for buffering mode flags
#endif
-libc_hidden_proto(setvbuf)
+/* libc_hidden_proto(setvbuf) */
int setvbuf(register FILE * __restrict stream, register char * __restrict buf,
int mode, size_t size)
{
diff --git a/libc/stdio/snprintf.c b/libc/stdio/snprintf.c
index ef9c69215..1b1f089cd 100644
--- a/libc/stdio/snprintf.c
+++ b/libc/stdio/snprintf.c
@@ -12,9 +12,9 @@
#warning Skipping snprintf since no vsnprintf!
#else
-libc_hidden_proto(vsnprintf)
+/* libc_hidden_proto(vsnprintf) */
-libc_hidden_proto(snprintf)
+/* libc_hidden_proto(snprintf) */
int snprintf(char *__restrict buf, size_t size,
const char * __restrict format, ...)
{
diff --git a/libc/stdio/sprintf.c b/libc/stdio/sprintf.c
index 360245366..594c51b86 100644
--- a/libc/stdio/sprintf.c
+++ b/libc/stdio/sprintf.c
@@ -12,9 +12,9 @@
#warning Skipping sprintf since no vsnprintf!
#else
-libc_hidden_proto(vsnprintf)
+/* libc_hidden_proto(vsnprintf) */
-libc_hidden_proto(sprintf)
+/* libc_hidden_proto(sprintf) */
int sprintf(char *__restrict buf, const char * __restrict format, ...)
{
va_list arg;
diff --git a/libc/stdio/swprintf.c b/libc/stdio/swprintf.c
index 0c209fe4b..4af8a6b11 100644
--- a/libc/stdio/swprintf.c
+++ b/libc/stdio/swprintf.c
@@ -9,7 +9,7 @@
#include <stdarg.h>
#include <wchar.h>
-libc_hidden_proto(vswprintf)
+/* libc_hidden_proto(vswprintf) */
#ifndef __STDIO_BUFFERS
#warning Skipping swprintf since no buffering!
diff --git a/libc/stdio/tmpfile.c b/libc/stdio/tmpfile.c
index 01724b699..d6356c681 100644
--- a/libc/stdio/tmpfile.c
+++ b/libc/stdio/tmpfile.c
@@ -25,8 +25,8 @@
#include <not-cancel.h>
#endif
-libc_hidden_proto(fdopen)
-libc_hidden_proto(remove)
+/* libc_hidden_proto(fdopen) */
+/* libc_hidden_proto(remove) */
/* libc_hidden_proto(close) */
/* This returns a new stream opened on a temporary file (generated
diff --git a/libc/stdio/ungetc.c b/libc/stdio/ungetc.c
index d900928b2..dcec91904 100644
--- a/libc/stdio/ungetc.c
+++ b/libc/stdio/ungetc.c
@@ -24,7 +24,7 @@
* (See section 7.19.6.2 of the C9X rationale -- WG14/N897.)
*/
-libc_hidden_proto(ungetc)
+/* libc_hidden_proto(ungetc) */
int ungetc(int c, register FILE *stream)
{
__STDIO_AUTO_THREADLOCK_VAR;
diff --git a/libc/stdio/ungetwc.c b/libc/stdio/ungetwc.c
index 579022240..438cb7572 100644
--- a/libc/stdio/ungetwc.c
+++ b/libc/stdio/ungetwc.c
@@ -12,7 +12,7 @@
* as reset stream->__ungot_width[1] for use by _stdio_adjpos().
*/
-libc_hidden_proto(ungetwc)
+/* libc_hidden_proto(ungetwc) */
wint_t ungetwc(wint_t c, register FILE *stream)
{
__STDIO_AUTO_THREADLOCK_VAR;
diff --git a/libc/stdio/vasprintf.c b/libc/stdio/vasprintf.c
index 98ca6c2a7..02f495efb 100644
--- a/libc/stdio/vasprintf.c
+++ b/libc/stdio/vasprintf.c
@@ -23,14 +23,14 @@
#else
#ifdef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__
-libc_hidden_proto(open_memstream)
+/* libc_hidden_proto(open_memstream) */
/* libc_hidden_proto(fclose) */
-libc_hidden_proto(vfprintf)
+/* libc_hidden_proto(vfprintf) */
#else
-libc_hidden_proto(vsnprintf)
+/* libc_hidden_proto(vsnprintf) */
#endif
-libc_hidden_proto(vasprintf)
+/* libc_hidden_proto(vasprintf) */
int vasprintf(char **__restrict buf, const char * __restrict format,
va_list arg)
{
diff --git a/libc/stdio/vdprintf.c b/libc/stdio/vdprintf.c
index de54a5c7d..87a842212 100644
--- a/libc/stdio/vdprintf.c
+++ b/libc/stdio/vdprintf.c
@@ -12,11 +12,11 @@
#include <stdarg.h>
#ifdef __USE_OLD_VFPRINTF__
-libc_hidden_proto(vfprintf)
+/* libc_hidden_proto(vfprintf) */
#endif
-libc_hidden_proto(fflush_unlocked)
+/* libc_hidden_proto(fflush_unlocked) */
-libc_hidden_proto(vdprintf)
+/* libc_hidden_proto(vdprintf) */
int vdprintf(int filedes, const char * __restrict format, va_list arg)
{
FILE f;
diff --git a/libc/stdio/vprintf.c b/libc/stdio/vprintf.c
index 7848a078d..b01b2310f 100644
--- a/libc/stdio/vprintf.c
+++ b/libc/stdio/vprintf.c
@@ -8,7 +8,7 @@
#include "_stdio.h"
#include <stdarg.h>
-libc_hidden_proto(vfprintf)
+/* libc_hidden_proto(vfprintf) */
int vprintf(const char * __restrict format, va_list arg)
{
diff --git a/libc/stdio/vsnprintf.c b/libc/stdio/vsnprintf.c
index 5cdb6ebf8..5139d2a1e 100644
--- a/libc/stdio/vsnprintf.c
+++ b/libc/stdio/vsnprintf.c
@@ -8,10 +8,10 @@
#include "_stdio.h"
#include <stdarg.h>
-libc_hidden_proto(vsnprintf)
+/* libc_hidden_proto(vsnprintf) */
#ifdef __USE_OLD_VFPRINTF__
-libc_hidden_proto(vfprintf)
+/* libc_hidden_proto(vfprintf) */
#endif
#ifdef __UCLIBC_MJN3_ONLY__
diff --git a/libc/stdio/vsprintf.c b/libc/stdio/vsprintf.c
index 8e27c19d9..b44789e69 100644
--- a/libc/stdio/vsprintf.c
+++ b/libc/stdio/vsprintf.c
@@ -12,7 +12,7 @@
#warning Skipping vsprintf since no vsnprintf!
#else
-libc_hidden_proto(vsnprintf)
+/* libc_hidden_proto(vsnprintf) */
int vsprintf(char *__restrict buf, const char * __restrict format,
va_list arg)
diff --git a/libc/stdio/vswprintf.c b/libc/stdio/vswprintf.c
index cddf1d5d9..beadb8a7d 100644
--- a/libc/stdio/vswprintf.c
+++ b/libc/stdio/vswprintf.c
@@ -9,7 +9,7 @@
#include <stdarg.h>
#include <wchar.h>
-libc_hidden_proto(vswprintf)
+/* libc_hidden_proto(vswprintf) */
/* NB: this file is not used if __USE_OLD_VFPRINTF__ */
diff --git a/libc/stdio/vwprintf.c b/libc/stdio/vwprintf.c
index 1c32887a4..4e666cb54 100644
--- a/libc/stdio/vwprintf.c
+++ b/libc/stdio/vwprintf.c
@@ -9,7 +9,7 @@
#include <stdarg.h>
#include <wchar.h>
-libc_hidden_proto(vfwprintf)
+/* libc_hidden_proto(vfwprintf) */
int vwprintf(const wchar_t * __restrict format, va_list arg)
{
diff --git a/libc/stdio/wprintf.c b/libc/stdio/wprintf.c
index 9dc274aec..80d76d5bb 100644
--- a/libc/stdio/wprintf.c
+++ b/libc/stdio/wprintf.c
@@ -9,7 +9,7 @@
#include <stdarg.h>
#include <wchar.h>
-libc_hidden_proto(vfwprintf)
+/* libc_hidden_proto(vfwprintf) */
int wprintf(const wchar_t * __restrict format, ...)
{
diff --git a/libc/stdlib/__uc_malloc.c b/libc/stdlib/__uc_malloc.c
index 81eee1343..38457596f 100644
--- a/libc/stdlib/__uc_malloc.c
+++ b/libc/stdlib/__uc_malloc.c
@@ -22,9 +22,9 @@ Cambridge, MA 02139, USA.
#include <unistd.h>
#include <malloc.h>
-libc_hidden_proto(_exit)
-libc_hidden_proto(__uc_malloc)
-libc_hidden_proto(__uc_malloc_failed)
+/* libc_hidden_proto(_exit) */
+/* libc_hidden_proto(__uc_malloc) */
+/* libc_hidden_proto(__uc_malloc_failed) */
void (*__uc_malloc_failed)(size_t size) = NULL;
/* Seemingly superfluous assigment of NULL above prevents gas error
diff --git a/libc/stdlib/_atexit.c b/libc/stdlib/_atexit.c
index 38d2d78a0..884032bba 100644
--- a/libc/stdlib/_atexit.c
+++ b/libc/stdlib/_atexit.c
@@ -47,7 +47,7 @@
__UCLIBC_MUTEX_EXTERN(__atexit_lock);
/* libc_hidden_proto(exit) */
-libc_hidden_proto(_exit)
+/* libc_hidden_proto(_exit) */
typedef void (*aefuncp) (void); /* atexit function pointer */
diff --git a/libc/stdlib/_strtod.c b/libc/stdlib/_strtod.c
index 3ceadce76..aac5b811b 100644
--- a/libc/stdlib/_strtod.c
+++ b/libc/stdlib/_strtod.c
@@ -111,12 +111,12 @@
#include <wchar.h>
#include <wctype.h>
#include <bits/uClibc_uwchar.h>
-libc_hidden_proto(iswspace)
+/* libc_hidden_proto(iswspace) */
#endif
#ifdef __UCLIBC_HAS_XLOCALE__
#include <xlocale.h>
-libc_hidden_proto(iswspace_l)
+/* libc_hidden_proto(iswspace_l) */
#endif /* __UCLIBC_HAS_XLOCALE__ */
/* Handle _STRTOD_HEXADECIMAL_FLOATS via uClibc config now. */
diff --git a/libc/stdlib/abort.c b/libc/stdlib/abort.c
index 82a9a5e80..7291d0ea4 100644
--- a/libc/stdlib/abort.c
+++ b/libc/stdlib/abort.c
@@ -29,10 +29,10 @@ Cambridge, MA 02139, USA. */
/* libc_hidden_proto(abort) */
/* Experimentally off - libc_hidden_proto(memset) */
-libc_hidden_proto(sigaction)
-libc_hidden_proto(sigprocmask)
-libc_hidden_proto(raise)
-libc_hidden_proto(_exit)
+/* libc_hidden_proto(sigaction) */
+/* libc_hidden_proto(sigprocmask) */
+/* libc_hidden_proto(raise) */
+/* libc_hidden_proto(_exit) */
/* Our last ditch effort to commit suicide */
#ifdef __UCLIBC_ABORT_INSTRUCTION__
diff --git a/libc/stdlib/arc4random.c b/libc/stdlib/arc4random.c
index 5355713bf..e7d69f168 100644
--- a/libc/stdlib/arc4random.c
+++ b/libc/stdlib/arc4random.c
@@ -38,10 +38,10 @@
//libc_hidden_proto(sysctl)
#endif
-libc_hidden_proto(open)
-libc_hidden_proto(read)
+/* libc_hidden_proto(open) */
+/* libc_hidden_proto(read) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(gettimeofday)
+/* libc_hidden_proto(gettimeofday) */
struct arc4_stream {
uint8_t i;
@@ -168,7 +168,7 @@ arc4_getword(as)
return val;
}
-libc_hidden_proto(arc4random_stir)
+/* libc_hidden_proto(arc4random_stir) */
void
arc4random_stir(void)
{
diff --git a/libc/stdlib/bsd_getpt.c b/libc/stdlib/bsd_getpt.c
index 1afd57f47..c7582e855 100644
--- a/libc/stdlib/bsd_getpt.c
+++ b/libc/stdlib/bsd_getpt.c
@@ -23,7 +23,7 @@
#include <unistd.h>
#if defined __USE_BSD
-libc_hidden_proto(open)
+/* libc_hidden_proto(open) */
/* Experimentally off - libc_hidden_proto(mempcpy) */
/* Prefix for master pseudo terminal nodes. */
diff --git a/libc/stdlib/drand48.c b/libc/stdlib/drand48.c
index f96947cb2..f0d20de61 100644
--- a/libc/stdlib/drand48.c
+++ b/libc/stdlib/drand48.c
@@ -19,7 +19,7 @@
#include <stdlib.h>
-libc_hidden_proto(erand48_r)
+/* libc_hidden_proto(erand48_r) */
/* Global state for non-reentrant functions. Defined in drand48-iter.c. */
extern struct drand48_data __libc_drand48_data attribute_hidden;
diff --git a/libc/stdlib/drand48_r.c b/libc/stdlib/drand48_r.c
index 1000a3acb..96fb186f4 100644
--- a/libc/stdlib/drand48_r.c
+++ b/libc/stdlib/drand48_r.c
@@ -21,7 +21,7 @@
#include <math.h>
#include <stdlib.h>
-libc_hidden_proto(erand48_r)
+/* libc_hidden_proto(erand48_r) */
int drand48_r (struct drand48_data *buffer, double *result)
{
diff --git a/libc/stdlib/erand48.c b/libc/stdlib/erand48.c
index 853c2c35a..913d6ed84 100644
--- a/libc/stdlib/erand48.c
+++ b/libc/stdlib/erand48.c
@@ -19,7 +19,7 @@
#include <stdlib.h>
-libc_hidden_proto(erand48_r)
+/* libc_hidden_proto(erand48_r) */
/* Global state for non-reentrant functions. Defined in drand48-iter.c. */
extern struct drand48_data __libc_drand48_data attribute_hidden;
diff --git a/libc/stdlib/erand48_r.c b/libc/stdlib/erand48_r.c
index 42db6f74b..f367f8dc6 100644
--- a/libc/stdlib/erand48_r.c
+++ b/libc/stdlib/erand48_r.c
@@ -24,7 +24,7 @@
extern int __drand48_iterate(unsigned short xsubi[3],
struct drand48_data *buffer) attribute_hidden;
-libc_hidden_proto(erand48_r)
+/* libc_hidden_proto(erand48_r) */
int erand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, double *result)
{
union ieee754_double temp;
diff --git a/libc/stdlib/gcvt.c b/libc/stdlib/gcvt.c
index f1c1f4270..6c61ee1e4 100644
--- a/libc/stdlib/gcvt.c
+++ b/libc/stdlib/gcvt.c
@@ -1,7 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
-libc_hidden_proto(sprintf)
+/* libc_hidden_proto(sprintf) */
#ifdef __UCLIBC_HAS_FLOATS__
#define MAX_NDIGIT 17
diff --git a/libc/stdlib/getenv.c b/libc/stdlib/getenv.c
index 7b3df7e64..e0193e223 100644
--- a/libc/stdlib/getenv.c
+++ b/libc/stdlib/getenv.c
@@ -8,7 +8,7 @@
#include <unistd.h>
#include <stdlib.h>
-libc_hidden_proto(getenv)
+/* libc_hidden_proto(getenv) */
/* Experimentally off - libc_hidden_proto(memcmp) */
/* Experimentally off - libc_hidden_proto(strlen) */
diff --git a/libc/stdlib/getpt.c b/libc/stdlib/getpt.c
index 5fb142d4b..f39e79664 100644
--- a/libc/stdlib/getpt.c
+++ b/libc/stdlib/getpt.c
@@ -26,9 +26,8 @@
#include <sys/statfs.h>
extern __typeof(statfs) __libc_statfs;
-libc_hidden_proto(__libc_statfs)
-libc_hidden_proto(open)
+/* libc_hidden_proto(open) */
/* libc_hidden_proto(close) */
#if !defined __ASSUME_DEVPTS__
diff --git a/libc/stdlib/grantpt.c b/libc/stdlib/grantpt.c
index 8c858506b..42a64b37c 100644
--- a/libc/stdlib/grantpt.c
+++ b/libc/stdlib/grantpt.c
@@ -39,7 +39,6 @@ int __unix_grantpt (int fd);
pseudo terminal in a safe way. */
static int pts_name (int fd, char **pts, size_t buf_len);
extern __typeof(statfs) __libc_statfs;
-libc_hidden_proto(__libc_statfs)
#endif
/* Change the ownership and access permission of the slave pseudo
diff --git a/libc/stdlib/jrand48.c b/libc/stdlib/jrand48.c
index 6f812068b..7bfc9d608 100644
--- a/libc/stdlib/jrand48.c
+++ b/libc/stdlib/jrand48.c
@@ -19,7 +19,7 @@
#include <stdlib.h>
-libc_hidden_proto(jrand48_r)
+/* libc_hidden_proto(jrand48_r) */
/* Global state for non-reentrant functions. Defined in drand48-iter.c. */
extern struct drand48_data __libc_drand48_data attribute_hidden;
diff --git a/libc/stdlib/jrand48_r.c b/libc/stdlib/jrand48_r.c
index fe77c3c38..da2a1506d 100644
--- a/libc/stdlib/jrand48_r.c
+++ b/libc/stdlib/jrand48_r.c
@@ -22,7 +22,7 @@
extern int __drand48_iterate(unsigned short xsubi[3],
struct drand48_data *buffer) attribute_hidden;
-libc_hidden_proto(jrand48_r)
+/* libc_hidden_proto(jrand48_r) */
int jrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, long int *result)
{
/* Compute next state. */
diff --git a/libc/stdlib/lrand48.c b/libc/stdlib/lrand48.c
index 863951f07..33d0e91ef 100644
--- a/libc/stdlib/lrand48.c
+++ b/libc/stdlib/lrand48.c
@@ -19,7 +19,7 @@
#include <stdlib.h>
-libc_hidden_proto(nrand48_r)
+/* libc_hidden_proto(nrand48_r) */
/* Global state for non-reentrant functions. Defined in drand48-iter.c. */
extern struct drand48_data __libc_drand48_data attribute_hidden;
diff --git a/libc/stdlib/lrand48_r.c b/libc/stdlib/lrand48_r.c
index 277fb9ae3..c3aa89a24 100644
--- a/libc/stdlib/lrand48_r.c
+++ b/libc/stdlib/lrand48_r.c
@@ -19,9 +19,9 @@
#include <stdlib.h>
-libc_hidden_proto(nrand48_r)
+/* libc_hidden_proto(nrand48_r) */
-libc_hidden_proto(lrand48_r)
+/* libc_hidden_proto(lrand48_r) */
int lrand48_r (struct drand48_data *buffer, long int *result)
{
/* Be generous for the arguments, detect some errors. */
diff --git a/libc/stdlib/malloc-simple/alloc.c b/libc/stdlib/malloc-simple/alloc.c
index 45faf62db..e729494e0 100644
--- a/libc/stdlib/malloc-simple/alloc.c
+++ b/libc/stdlib/malloc-simple/alloc.c
@@ -19,8 +19,8 @@
/* Experimentally off - libc_hidden_proto(memcpy) */
/*libc_hidden_proto(memset)*/
-libc_hidden_proto(mmap)
-libc_hidden_proto(munmap)
+/* libc_hidden_proto(mmap) */
+/* libc_hidden_proto(munmap) */
#ifdef L_malloc
void *malloc(size_t size)
diff --git a/libc/stdlib/malloc-standard/free.c b/libc/stdlib/malloc-standard/free.c
index 4d24697be..9fbf563ab 100644
--- a/libc/stdlib/malloc-standard/free.c
+++ b/libc/stdlib/malloc-standard/free.c
@@ -16,7 +16,7 @@
#include "malloc.h"
-libc_hidden_proto(munmap)
+/* libc_hidden_proto(munmap) */
/* ------------------------- __malloc_trim -------------------------
__malloc_trim is an inverse of sorts to __malloc_alloc. It gives memory
diff --git a/libc/stdlib/malloc-standard/mallinfo.c b/libc/stdlib/malloc-standard/mallinfo.c
index d3b613576..4ebbe8b49 100644
--- a/libc/stdlib/malloc-standard/mallinfo.c
+++ b/libc/stdlib/malloc-standard/mallinfo.c
@@ -19,7 +19,7 @@
/* libc_hidden_proto(fprintf) */
/* ------------------------------ mallinfo ------------------------------ */
-libc_hidden_proto(mallinfo)
+/* libc_hidden_proto(mallinfo) */
struct mallinfo mallinfo(void)
{
mstate av;
diff --git a/libc/stdlib/malloc-standard/malloc.h b/libc/stdlib/malloc-standard/malloc.h
index d4259d526..524468cbe 100644
--- a/libc/stdlib/malloc-standard/malloc.h
+++ b/libc/stdlib/malloc-standard/malloc.h
@@ -24,9 +24,9 @@
#include <sys/mman.h>
#include <bits/uClibc_mutex.h>
-libc_hidden_proto(mmap)
-libc_hidden_proto(sysconf)
-libc_hidden_proto(sbrk)
+/* libc_hidden_proto(mmap) */
+/* libc_hidden_proto(sysconf) */
+/* libc_hidden_proto(sbrk) */
/* libc_hidden_proto(abort) */
diff --git a/libc/stdlib/malloc-standard/realloc.c b/libc/stdlib/malloc-standard/realloc.c
index 41cae43d1..95eb0d38a 100644
--- a/libc/stdlib/malloc-standard/realloc.c
+++ b/libc/stdlib/malloc-standard/realloc.c
@@ -16,7 +16,7 @@
#include "malloc.h"
-libc_hidden_proto(mremap)
+/* libc_hidden_proto(mremap) */
/* Experimentally off - libc_hidden_proto(memcpy) */
/* ------------------------------ realloc ------------------------------ */
diff --git a/libc/stdlib/malloc/free.c b/libc/stdlib/malloc/free.c
index 91552919e..5dd3a7625 100644
--- a/libc/stdlib/malloc/free.c
+++ b/libc/stdlib/malloc/free.c
@@ -15,8 +15,8 @@
#include <unistd.h>
#include <sys/mman.h>
-libc_hidden_proto(munmap)
-libc_hidden_proto(sbrk)
+/* libc_hidden_proto(munmap) */
+/* libc_hidden_proto(sbrk) */
#include "malloc.h"
#include "heap.h"
diff --git a/libc/stdlib/malloc/heap_debug.c b/libc/stdlib/malloc/heap_debug.c
index f51a68b57..f1ccc6f2d 100644
--- a/libc/stdlib/malloc/heap_debug.c
+++ b/libc/stdlib/malloc/heap_debug.c
@@ -17,9 +17,9 @@
#include <string.h>
#include <unistd.h>
-libc_hidden_proto(vfprintf)
+/* libc_hidden_proto(vfprintf) */
/* libc_hidden_proto(fprintf) */
-libc_hidden_proto(_exit)
+/* libc_hidden_proto(_exit) */
#include "malloc.h"
#include "heap.h"
diff --git a/libc/stdlib/malloc/malloc.c b/libc/stdlib/malloc/malloc.c
index 620a9fbcc..19877db89 100644
--- a/libc/stdlib/malloc/malloc.c
+++ b/libc/stdlib/malloc/malloc.c
@@ -16,8 +16,8 @@
#include <errno.h>
#include <sys/mman.h>
-libc_hidden_proto(mmap)
-libc_hidden_proto(sbrk)
+/* libc_hidden_proto(mmap) */
+/* libc_hidden_proto(sbrk) */
#include "malloc.h"
#include "heap.h"
diff --git a/libc/stdlib/malloc/malloc_debug.c b/libc/stdlib/malloc/malloc_debug.c
index 39c3919c5..01f9bfd6f 100644
--- a/libc/stdlib/malloc/malloc_debug.c
+++ b/libc/stdlib/malloc/malloc_debug.c
@@ -16,10 +16,10 @@
#include <unistd.h>
#include <stdarg.h>
-libc_hidden_proto(atoi)
-libc_hidden_proto(vfprintf)
-libc_hidden_proto(putc)
-libc_hidden_proto(getenv)
+/* libc_hidden_proto(atoi) */
+/* libc_hidden_proto(vfprintf) */
+/* libc_hidden_proto(putc) */
+/* libc_hidden_proto(getenv) */
#include "malloc.h"
#include "heap.h"
diff --git a/libc/stdlib/mrand48.c b/libc/stdlib/mrand48.c
index 6905545bd..131c4b991 100644
--- a/libc/stdlib/mrand48.c
+++ b/libc/stdlib/mrand48.c
@@ -19,7 +19,7 @@
#include <stdlib.h>
-libc_hidden_proto(jrand48_r)
+/* libc_hidden_proto(jrand48_r) */
/* Global state for non-reentrant functions. Defined in drand48-iter.c. */
extern struct drand48_data __libc_drand48_data attribute_hidden;
diff --git a/libc/stdlib/mrand48_r.c b/libc/stdlib/mrand48_r.c
index ca2bd7bbb..0127fddb5 100644
--- a/libc/stdlib/mrand48_r.c
+++ b/libc/stdlib/mrand48_r.c
@@ -19,7 +19,7 @@
#include <stdlib.h>
-libc_hidden_proto(jrand48_r)
+/* libc_hidden_proto(jrand48_r) */
int mrand48_r (struct drand48_data *buffer, long int *result)
{
diff --git a/libc/stdlib/nrand48.c b/libc/stdlib/nrand48.c
index 0199a30a5..e69afd78b 100644
--- a/libc/stdlib/nrand48.c
+++ b/libc/stdlib/nrand48.c
@@ -19,7 +19,7 @@
#include <stdlib.h>
-libc_hidden_proto(nrand48_r)
+/* libc_hidden_proto(nrand48_r) */
/* Global state for non-reentrant functions. Defined in drand48-iter.c. */
extern struct drand48_data __libc_drand48_data attribute_hidden;
diff --git a/libc/stdlib/nrand48_r.c b/libc/stdlib/nrand48_r.c
index 63b0ac8ef..acf813e9b 100644
--- a/libc/stdlib/nrand48_r.c
+++ b/libc/stdlib/nrand48_r.c
@@ -22,7 +22,7 @@
extern int __drand48_iterate(unsigned short xsubi[3],
struct drand48_data *buffer) attribute_hidden;
-libc_hidden_proto(nrand48_r)
+/* libc_hidden_proto(nrand48_r) */
int nrand48_r (unsigned short int xsubi[3], struct drand48_data *buffer, long int *result)
{
/* Compute next state. */
diff --git a/libc/stdlib/ptsname.c b/libc/stdlib/ptsname.c
index bd9c3cab2..3e4a1cfe1 100644
--- a/libc/stdlib/ptsname.c
+++ b/libc/stdlib/ptsname.c
@@ -32,10 +32,10 @@
/* Experimentally off - libc_hidden_proto(strcat) */
/* Experimentally off - libc_hidden_proto(strcpy) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(isatty)
-libc_hidden_proto(ioctl)
-libc_hidden_proto(fstat)
-libc_hidden_proto(stat)
+/* libc_hidden_proto(isatty) */
+/* libc_hidden_proto(ioctl) */
+/* libc_hidden_proto(fstat) */
+/* libc_hidden_proto(stat) */
#if !defined __UNIX98PTY_ONLY__
@@ -68,7 +68,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)
+/* libc_hidden_proto(ptsname_r) */
int ptsname_r (int fd, char *buf, size_t buflen)
{
int save_errno = errno;
diff --git a/libc/stdlib/rand.c b/libc/stdlib/rand.c
index 03323f501..61aaa9105 100644
--- a/libc/stdlib/rand.c
+++ b/libc/stdlib/rand.c
@@ -7,7 +7,7 @@
#include <stdlib.h>
-libc_hidden_proto(random)
+/* libc_hidden_proto(random) */
int rand (void)
{
diff --git a/libc/stdlib/random.c b/libc/stdlib/random.c
index 3eb8aed8a..6d5d06e09 100644
--- a/libc/stdlib/random.c
+++ b/libc/stdlib/random.c
@@ -27,10 +27,10 @@
#include <stddef.h>
#include <stdlib.h>
-libc_hidden_proto(random_r)
-libc_hidden_proto(srandom_r)
-libc_hidden_proto(setstate_r)
-libc_hidden_proto(initstate_r)
+/* libc_hidden_proto(random_r) */
+/* libc_hidden_proto(srandom_r) */
+/* libc_hidden_proto(setstate_r) */
+/* libc_hidden_proto(initstate_r) */
/* POSIX.1c requires that there is mutual exclusion for the `rand' and
`srand' functions to prevent concurrent calls from modifying common
@@ -244,7 +244,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)
+/* libc_hidden_proto(random) */
long int random (void)
{
int32_t retval;
diff --git a/libc/stdlib/random_r.c b/libc/stdlib/random_r.c
index ca80a7808..b6ff6afd2 100644
--- a/libc/stdlib/random_r.c
+++ b/libc/stdlib/random_r.c
@@ -133,7 +133,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)
+/* libc_hidden_proto(random_r) */
int random_r(struct random_data *buf, int32_t *result)
{
int32_t *state;
@@ -191,7 +191,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)
+/* libc_hidden_proto(srandom_r) */
int srandom_r (unsigned int seed, struct random_data *buf)
{
int type;
@@ -259,7 +259,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)
+/* libc_hidden_proto(initstate_r) */
int initstate_r (unsigned int seed, char *arg_state, size_t n, struct random_data *buf)
{
int type;
@@ -318,7 +318,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)
+/* libc_hidden_proto(setstate_r) */
int setstate_r (char *arg_state, struct random_data *buf)
{
int32_t *new_state = 1 + (int32_t *) arg_state;
diff --git a/libc/stdlib/realpath.c b/libc/stdlib/realpath.c
index e9eabdfaa..3a4789152 100644
--- a/libc/stdlib/realpath.c
+++ b/libc/stdlib/realpath.c
@@ -24,8 +24,8 @@
/* Experimentally off - libc_hidden_proto(strcat) */
/* Experimentally off - libc_hidden_proto(strcpy) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(readlink)
-libc_hidden_proto(getcwd)
+/* libc_hidden_proto(readlink) */
+/* libc_hidden_proto(getcwd) */
#ifndef PATH_MAX
#ifdef _POSIX_VERSION
diff --git a/libc/stdlib/seed48.c b/libc/stdlib/seed48.c
index f068b980d..c688c1aa6 100644
--- a/libc/stdlib/seed48.c
+++ b/libc/stdlib/seed48.c
@@ -19,7 +19,7 @@
#include <stdlib.h>
-libc_hidden_proto(seed48_r)
+/* libc_hidden_proto(seed48_r) */
/* Global state for non-reentrant functions. Defined in drand48-iter.c. */
extern struct drand48_data __libc_drand48_data attribute_hidden;
diff --git a/libc/stdlib/seed48_r.c b/libc/stdlib/seed48_r.c
index 3769e0fa7..4347383f8 100644
--- a/libc/stdlib/seed48_r.c
+++ b/libc/stdlib/seed48_r.c
@@ -23,7 +23,7 @@
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(seed48_r)
+/* 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. */
diff --git a/libc/stdlib/setenv.c b/libc/stdlib/setenv.c
index 833bd8fcd..cf10804ec 100644
--- a/libc/stdlib/setenv.c
+++ b/libc/stdlib/setenv.c
@@ -30,7 +30,7 @@
/* Experimentally off - libc_hidden_proto(strlen) */
/* Experimentally off - libc_hidden_proto(strncmp) */
/* Experimentally off - libc_hidden_proto(strndup) */
-libc_hidden_proto(unsetenv)
+/* libc_hidden_proto(unsetenv) */
#include <bits/uClibc_mutex.h>
__UCLIBC_MUTEX_STATIC(mylock, PTHREAD_MUTEX_INITIALIZER);
@@ -133,14 +133,14 @@ int __add_to_environ (const char *name, const char *value,
return rv;
}
-libc_hidden_proto(setenv)
+/* libc_hidden_proto(setenv) */
int setenv (const char *name, const char *value, int replace)
{
return __add_to_environ (name, value, NULL, replace);
}
libc_hidden_def(setenv)
-libc_hidden_proto(unsetenv)
+/* libc_hidden_proto(unsetenv) */
int unsetenv (const char *name)
{
size_t len;
diff --git a/libc/stdlib/srand48.c b/libc/stdlib/srand48.c
index 42e90c9f9..5f593223a 100644
--- a/libc/stdlib/srand48.c
+++ b/libc/stdlib/srand48.c
@@ -19,7 +19,7 @@
#include <stdlib.h>
-libc_hidden_proto(srand48_r)
+/* libc_hidden_proto(srand48_r) */
/* Global state for non-reentrant functions. Defined in drand48-iter.c. */
extern struct drand48_data __libc_drand48_data attribute_hidden;
diff --git a/libc/stdlib/srand48_r.c b/libc/stdlib/srand48_r.c
index 45bb75f11..33c241560 100644
--- a/libc/stdlib/srand48_r.c
+++ b/libc/stdlib/srand48_r.c
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <limits.h>
-libc_hidden_proto(srand48_r)
+/* libc_hidden_proto(srand48_r) */
int srand48_r (long int seedval, struct drand48_data *buffer)
{
/* The standards say we only have 32 bits. */
diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c
index aa55d12d6..7202182d9 100644
--- a/libc/stdlib/stdlib.c
+++ b/libc/stdlib/stdlib.c
@@ -197,7 +197,7 @@ _stdlib_wcsto_ll(register const wchar_t * __restrict str,
/**********************************************************************/
#ifdef L_atof
-libc_hidden_proto(strtod)
+/* libc_hidden_proto(strtod) */
double atof(const char *nptr)
{
@@ -269,9 +269,9 @@ strong_alias(llabs,imaxabs)
#if INT_MAX < LONG_MAX
-libc_hidden_proto(strtol)
+/* libc_hidden_proto(strtol) */
-libc_hidden_proto(atoi)
+/* libc_hidden_proto(atoi) */
int atoi(const char *nptr)
{
return (int) strtol(nptr, (char **) NULL, 10);
@@ -284,9 +284,9 @@ libc_hidden_def(atoi)
/**********************************************************************/
#ifdef L_atol
-libc_hidden_proto(strtol)
+/* libc_hidden_proto(strtol) */
-libc_hidden_proto(atol)
+/* libc_hidden_proto(atol) */
long atol(const char *nptr)
{
return strtol(nptr, (char **) NULL, 10);
@@ -313,7 +313,7 @@ strong_alias(atol,atoll)
#if defined(ULLONG_MAX) && (LLONG_MAX > LONG_MAX)
-libc_hidden_proto(strtoll)
+/* libc_hidden_proto(strtoll) */
long long atoll(const char *nptr)
{
@@ -465,10 +465,10 @@ strong_alias(strtoull,strtouq)
#define Wuchar __uwchar_t
#ifdef __UCLIBC_DO_XLOCALE
#define ISSPACE(C) iswspace_l((C), locale_arg)
-libc_hidden_proto(iswspace_l)
+/* libc_hidden_proto(iswspace_l) */
#else
#define ISSPACE(C) iswspace((C))
-libc_hidden_proto(iswspace)
+/* libc_hidden_proto(iswspace) */
#endif
#else /* defined(L__stdlib_wcsto_l) || defined(L__stdlib_wcsto_l_l) */
@@ -477,10 +477,10 @@ libc_hidden_proto(iswspace)
#define Wuchar unsigned char
#ifdef __UCLIBC_DO_XLOCALE
#define ISSPACE(C) isspace_l((C), locale_arg)
-libc_hidden_proto(isspace_l)
+/* libc_hidden_proto(isspace_l) */
#else
#define ISSPACE(C) isspace((C))
-libc_hidden_proto(isspace)
+/* libc_hidden_proto(isspace) */
#endif
#endif /* defined(L__stdlib_wcsto_l) || defined(L__stdlib_wcsto_l_l) */
@@ -620,10 +620,10 @@ unsigned long attribute_hidden __XL_NPP(_stdlib_strto_l)(register const Wchar *
#define Wuchar __uwchar_t
#ifdef __UCLIBC_DO_XLOCALE
#define ISSPACE(C) iswspace_l((C), locale_arg)
-libc_hidden_proto(iswspace_l)
+/* libc_hidden_proto(iswspace_l) */
#else
#define ISSPACE(C) iswspace((C))
-libc_hidden_proto(iswspace)
+/* libc_hidden_proto(iswspace) */
#endif
#else /* defined(L__stdlib_wcsto_ll) || defined(L__stdlib_wcsto_ll_l) */
@@ -632,10 +632,10 @@ libc_hidden_proto(iswspace)
#define Wuchar unsigned char
#ifdef __UCLIBC_DO_XLOCALE
#define ISSPACE(C) isspace_l((C), locale_arg)
-libc_hidden_proto(isspace_l)
+/* libc_hidden_proto(isspace_l) */
#else
#define ISSPACE(C) isspace((C))
-libc_hidden_proto(isspace)
+/* libc_hidden_proto(isspace) */
#endif
#endif /* defined(L__stdlib_wcsto_ll) || defined(L__stdlib_wcsto_ll_l) */
@@ -816,7 +816,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)
+/* libc_hidden_proto(qsort) */
void qsort(void *base,
size_t nel,
size_t width,
@@ -912,7 +912,7 @@ void ssort(void *base,
/**********************************************************************/
#ifdef L__stdlib_mb_cur_max
-libc_hidden_proto(_stdlib_mb_cur_max)
+/* libc_hidden_proto(_stdlib_mb_cur_max) */
size_t _stdlib_mb_cur_max(void)
{
#ifdef __CTYPE_HAS_UTF_8_LOCALES
@@ -956,7 +956,7 @@ static __always_inline int is_stateful(unsigned char encoding)
/**********************************************************************/
#ifdef L_mblen
-libc_hidden_proto(mbrlen)
+/* libc_hidden_proto(mbrlen) */
int mblen(register const char *s, size_t n)
{
@@ -988,7 +988,7 @@ int mblen(register const char *s, size_t n)
/**********************************************************************/
#ifdef L_mbtowc
-libc_hidden_proto(mbrtowc)
+/* libc_hidden_proto(mbrtowc) */
int mbtowc(wchar_t *__restrict pwc, register const char *__restrict s, size_t n)
{
@@ -1023,7 +1023,7 @@ int mbtowc(wchar_t *__restrict pwc, register const char *__restrict s, size_t n)
/* Note: We completely ignore state in all currently supported conversions. */
-libc_hidden_proto(wcrtomb)
+/* libc_hidden_proto(wcrtomb) */
int wctomb(register char *__restrict s, wchar_t swc)
{
@@ -1042,7 +1042,7 @@ int wctomb(register char *__restrict s, wchar_t swc)
/**********************************************************************/
#ifdef L_mbstowcs
-libc_hidden_proto(mbsrtowcs)
+/* libc_hidden_proto(mbsrtowcs) */
size_t mbstowcs(wchar_t * __restrict pwcs, const char * __restrict s, size_t n)
{
@@ -1059,7 +1059,7 @@ size_t mbstowcs(wchar_t * __restrict pwcs, const char * __restrict s, size_t n)
/* Note: We completely ignore state in all currently supported conversions. */
-libc_hidden_proto(wcsrtombs)
+/* libc_hidden_proto(wcsrtombs) */
size_t wcstombs(char * __restrict s, const wchar_t * __restrict pwcs, size_t n)
{
diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c
index 2c55e4ece..d4f12b2c8 100644
--- a/libc/stdlib/system.c
+++ b/libc/stdlib/system.c
@@ -17,18 +17,18 @@
#include <sysdep-cancel.h>
#endif
-libc_hidden_proto(_exit)
-libc_hidden_proto(wait4)
-libc_hidden_proto(execl)
-libc_hidden_proto(signal)
-libc_hidden_proto(vfork)
+/* libc_hidden_proto(_exit) */
+/* libc_hidden_proto(wait4) */
+/* libc_hidden_proto(execl) */
+/* libc_hidden_proto(signal) */
+/* libc_hidden_proto(vfork) */
#if !defined __UCLIBC_HAS_THREADS_NATIVE__
/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
#include <sys/syscall.h>
#ifndef __NR_vfork
# define vfork fork
-libc_hidden_proto(fork)
+/* libc_hidden_proto(fork) */
#endif
extern __typeof(system) __libc_system;
diff --git a/libc/stdlib/unix_grantpt.c b/libc/stdlib/unix_grantpt.c
index d1eef9efd..25c335239 100644
--- a/libc/stdlib/unix_grantpt.c
+++ b/libc/stdlib/unix_grantpt.c
@@ -31,19 +31,19 @@
#include "pty-private.h"
/* Experimentally off - libc_hidden_proto(memchr) */
-libc_hidden_proto(getgid)
-libc_hidden_proto(getuid)
-libc_hidden_proto(setrlimit)
-libc_hidden_proto(waitpid)
-libc_hidden_proto(dup2)
-libc_hidden_proto(chmod)
-libc_hidden_proto(chown)
-libc_hidden_proto(vfork)
-libc_hidden_proto(fork)
-libc_hidden_proto(stat)
-libc_hidden_proto(ptsname_r)
-libc_hidden_proto(execle)
-libc_hidden_proto(_exit)
+/* libc_hidden_proto(getgid) */
+/* libc_hidden_proto(getuid) */
+/* libc_hidden_proto(setrlimit) */
+/* libc_hidden_proto(waitpid) */
+/* libc_hidden_proto(dup2) */
+/* libc_hidden_proto(chmod) */
+/* libc_hidden_proto(chown) */
+/* libc_hidden_proto(vfork) */
+/* libc_hidden_proto(fork) */
+/* libc_hidden_proto(stat) */
+/* libc_hidden_proto(ptsname_r) */
+/* libc_hidden_proto(execle) */
+/* libc_hidden_proto(_exit) */
/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
#include <sys/syscall.h>
diff --git a/libc/stdlib/unlockpt.c b/libc/stdlib/unlockpt.c
index 8c426553c..731a11a85 100644
--- a/libc/stdlib/unlockpt.c
+++ b/libc/stdlib/unlockpt.c
@@ -22,7 +22,7 @@
#include <sys/ioctl.h>
#include <termios.h>
-libc_hidden_proto(ioctl)
+/* libc_hidden_proto(ioctl) */
/* Unlock the slave pseudo terminal associated with the master pseudo
terminal specified by FD. */
diff --git a/libc/stdlib/valloc.c b/libc/stdlib/valloc.c
index 13dbe0f67..d2aca4072 100644
--- a/libc/stdlib/valloc.c
+++ b/libc/stdlib/valloc.c
@@ -24,7 +24,7 @@ Cambridge, MA 02139, USA.
#include <unistd.h>
#include <malloc.h>
-libc_hidden_proto(getpagesize)
+/* libc_hidden_proto(getpagesize) */
static size_t pagesize;
diff --git a/libc/string/__glibc_strerror_r.c b/libc/string/__glibc_strerror_r.c
index 0f9cd16a9..2b856e9f5 100644
--- a/libc/string/__glibc_strerror_r.c
+++ b/libc/string/__glibc_strerror_r.c
@@ -8,8 +8,8 @@
#include <features.h>
#include <string.h>
-libc_hidden_proto(__glibc_strerror_r)
-libc_hidden_proto(__xpg_strerror_r)
+/* libc_hidden_proto(__glibc_strerror_r) */
+/* libc_hidden_proto(__xpg_strerror_r) */
char *__glibc_strerror_r(int errnum, char *strerrbuf, size_t buflen)
{
diff --git a/libc/string/__xpg_strerror_r.c b/libc/string/__xpg_strerror_r.c
index ff41192e5..274b6cec8 100644
--- a/libc/string/__xpg_strerror_r.c
+++ b/libc/string/__xpg_strerror_r.c
@@ -15,7 +15,7 @@
#undef strerror_r
-libc_hidden_proto(__xpg_strerror_r)
+/* libc_hidden_proto(__xpg_strerror_r) */
/* Experimentally off - libc_hidden_proto(memcpy) */
/* Experimentally off - libc_hidden_proto(strlen) */
diff --git a/libc/string/_collate.c b/libc/string/_collate.c
index 64b5d9608..3c53404ad 100644
--- a/libc/string/_collate.c
+++ b/libc/string/_collate.c
@@ -24,8 +24,8 @@
/* Experimentally off - libc_hidden_proto(strlcpy) */
/* Experimentally off - libc_hidden_proto(strcmp) */
#ifdef WANT_WIDE
-libc_hidden_proto(wcsxfrm)
-libc_hidden_proto(wcscmp)
+/* libc_hidden_proto(wcsxfrm) */
+/* libc_hidden_proto(wcscmp) */
#endif
#ifdef __UCLIBC_HAS_LOCALE__
@@ -59,18 +59,18 @@ libc_hidden_proto(wcscmp)
#if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE)
-libc_hidden_proto(wcscoll_l)
+/* libc_hidden_proto(wcscoll_l) */
-libc_hidden_proto(wcscoll)
+/* libc_hidden_proto(wcscoll) */
int wcscoll (const Wchar *s0, const Wchar *s1)
{
return wcscoll_l(s0, s1, __UCLIBC_CURLOCALE );
}
libc_hidden_def(wcscoll)
-libc_hidden_proto(wcsxfrm_l)
+/* libc_hidden_proto(wcsxfrm_l) */
-libc_hidden_proto(wcsxfrm)
+/* libc_hidden_proto(wcsxfrm) */
size_t wcsxfrm(Wchar *__restrict ws1, const Wchar *__restrict ws2, size_t n)
{
return wcsxfrm_l(ws1, ws2, n, __UCLIBC_CURLOCALE );
diff --git a/libc/string/memchr.c b/libc/string/memchr.c
index 413999722..5e60f6554 100644
--- a/libc/string/memchr.c
+++ b/libc/string/memchr.c
@@ -13,8 +13,6 @@
# define Wmemchr memchr
#endif
-libc_hidden_proto(Wmemchr)
-
Wvoid *Wmemchr(const Wvoid *s, Wint c, size_t n)
{
register const Wuchar *r = (const Wuchar *) s;
diff --git a/libc/string/memcpy.c b/libc/string/memcpy.c
index dc2986778..aa8d4ee38 100644
--- a/libc/string/memcpy.c
+++ b/libc/string/memcpy.c
@@ -13,8 +13,6 @@
# define Wmemcpy memcpy
#endif
-libc_hidden_proto(Wmemcpy)
-
Wvoid *Wmemcpy(Wvoid * __restrict s1, const Wvoid * __restrict s2, size_t n)
{
register Wchar *r1 = s1;
diff --git a/libc/string/mempcpy.c b/libc/string/mempcpy.c
index 91896434b..e7605146a 100644
--- a/libc/string/mempcpy.c
+++ b/libc/string/mempcpy.c
@@ -15,8 +15,6 @@
# define Wmempcpy mempcpy
#endif
-libc_hidden_proto(Wmempcpy)
-
Wvoid *Wmempcpy(Wvoid * __restrict s1, const Wvoid * __restrict s2, size_t n)
{
register Wchar *r1 = s1;
diff --git a/libc/string/strcasecmp.c b/libc/string/strcasecmp.c
index 5f2dc8e04..94c8ff492 100644
--- a/libc/string/strcasecmp.c
+++ b/libc/string/strcasecmp.c
@@ -12,28 +12,28 @@
#ifdef WANT_WIDE
# define strcasecmp wcscasecmp
# define strcasecmp_l wcscasecmp_l
-libc_hidden_proto(wcscasecmp)
+/* libc_hidden_proto(wcscasecmp) */
# if defined(__USE_GNU) && defined(__UCLIBC_HAS_XLOCALE__)
-libc_hidden_proto(wcscasecmp_l)
+/* libc_hidden_proto(wcscasecmp_l) */
# endif
# ifdef __UCLIBC_DO_XLOCALE
-libc_hidden_proto(towlower_l)
+/* libc_hidden_proto(towlower_l) */
# define TOLOWER(C) towlower_l((C), locale_arg)
# else
-libc_hidden_proto(towlower)
+/* libc_hidden_proto(towlower) */
# define TOLOWER(C) towlower((C))
# endif
#else
/* Experimentally off - libc_hidden_proto(strcasecmp) */
/* Experimentally off - libc_hidden_proto(strcasecmp_l) */
# ifdef __UCLIBC_DO_XLOCALE
-libc_hidden_proto(tolower_l)
+/* libc_hidden_proto(tolower_l) */
# define TOLOWER(C) tolower_l((C), locale_arg)
# else
#if !defined __UCLIBC_HAS_XLOCALE__ && defined __UCLIBC_HAS_CTYPE_TABLES__
/* libc_hidden_proto(__ctype_tolower) */
#endif
-libc_hidden_proto(tolower)
+/* libc_hidden_proto(tolower) */
# define TOLOWER(C) tolower((C))
# endif
#endif
diff --git a/libc/string/strcasestr.c b/libc/string/strcasestr.c
index 143392d3a..4804494cc 100644
--- a/libc/string/strcasestr.c
+++ b/libc/string/strcasestr.c
@@ -13,7 +13,7 @@
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
/* libc_hidden_proto(__ctype_tolower) */
#endif
-libc_hidden_proto(tolower)
+/* libc_hidden_proto(tolower) */
char *strcasestr(const char *s1, const char *s2)
{
diff --git a/libc/string/strcat.c b/libc/string/strcat.c
index 40a9be111..63619bcc8 100644
--- a/libc/string/strcat.c
+++ b/libc/string/strcat.c
@@ -13,8 +13,6 @@
# define Wstrcat strcat
#endif
-libc_hidden_proto(Wstrcat)
-
Wchar *Wstrcat(Wchar * __restrict s1, register const Wchar * __restrict s2)
{
register Wchar *s = s1;
diff --git a/libc/string/strchr.c b/libc/string/strchr.c
index 329545e9f..462b7b1f1 100644
--- a/libc/string/strchr.c
+++ b/libc/string/strchr.c
@@ -13,8 +13,6 @@
# define Wstrchr strchr
#endif
-libc_hidden_proto(Wstrchr)
-
Wchar *Wstrchr(register const Wchar *s, Wint c)
{
do {
diff --git a/libc/string/strchrnul.c b/libc/string/strchrnul.c
index 6fe7f6c3d..d2d7df307 100644
--- a/libc/string/strchrnul.c
+++ b/libc/string/strchrnul.c
@@ -15,8 +15,6 @@
# define Wstrchrnul strchrnul
#endif
-libc_hidden_proto(Wstrchrnul)
-
Wchar *Wstrchrnul(register const Wchar *s, Wint c)
{
--s;
diff --git a/libc/string/strcmp.c b/libc/string/strcmp.c
index 5477adf3a..abae61812 100644
--- a/libc/string/strcmp.c
+++ b/libc/string/strcmp.c
@@ -15,8 +15,6 @@
# define Wstrcoll strcoll
#endif
-libc_hidden_proto(Wstrcmp)
-
int Wstrcmp(register const Wchar *s1, register const Wchar *s2)
{
#ifdef WANT_WIDE
@@ -40,7 +38,6 @@ int Wstrcmp(register const Wchar *s1, register const Wchar *s2)
libc_hidden_def(Wstrcmp)
#ifndef __UCLIBC_HAS_LOCALE__
-libc_hidden_proto(Wstrcoll)
strong_alias(Wstrcmp,Wstrcoll)
libc_hidden_def(Wstrcoll)
#endif
diff --git a/libc/string/strcpy.c b/libc/string/strcpy.c
index cda4094ac..568efbf60 100644
--- a/libc/string/strcpy.c
+++ b/libc/string/strcpy.c
@@ -13,8 +13,6 @@
# define Wstrcpy strcpy
#endif
-libc_hidden_proto(Wstrcpy)
-
Wchar *Wstrcpy(Wchar * __restrict s1, const Wchar * __restrict s2)
{
register Wchar *s = s1;
@@ -29,4 +27,9 @@ Wchar *Wstrcpy(Wchar * __restrict s1, const Wchar * __restrict s2)
return s1;
}
-libc_hidden_def(Wstrcpy)
+
+#ifdef WANT_WIDE
+/* wcscpy does not need libc_hidden_def */
+#else
+libc_hidden_def(strcpy)
+#endif
diff --git a/libc/string/strdup.c b/libc/string/strdup.c
index 61fc186c8..9eb28630e 100644
--- a/libc/string/strdup.c
+++ b/libc/string/strdup.c
@@ -9,7 +9,7 @@
#include <stdlib.h>
#ifdef WANT_WIDE
-libc_hidden_proto(wcslen)
+/* libc_hidden_proto(wcslen) */
# define Wstrdup wcsdup
# define Wstrlen wcslen
#else
diff --git a/libc/string/strerror.c b/libc/string/strerror.c
index 355c7bdda..a52c407f8 100644
--- a/libc/string/strerror.c
+++ b/libc/string/strerror.c
@@ -10,7 +10,7 @@
#include "_syserrmsg.h"
/* Experimentally off - libc_hidden_proto(strerror) */
-libc_hidden_proto(__xpg_strerror_r)
+/* libc_hidden_proto(__xpg_strerror_r) */
char *strerror(int errnum)
{
diff --git a/libc/string/strlcpy.c b/libc/string/strlcpy.c
index 4bdf0daa6..0ccfc0e8a 100644
--- a/libc/string/strlcpy.c
+++ b/libc/string/strlcpy.c
@@ -9,14 +9,10 @@
#ifdef WANT_WIDE
# define Wstrlcpy __wcslcpy
-# define Wstrxfrm wcsxfrm
#else
-/* Experimentally off - libc_hidden_proto(strlcpy) */
# define Wstrlcpy strlcpy
-# define Wstrxfrm strxfrm
#endif
-
/* OpenBSD function:
* Copy at most n-1 chars from src to dst and nul-terminate dst.
* Returns strlen(src), so truncation occurred if the return value is >= n. */
@@ -49,16 +45,19 @@ size_t Wstrlcpy(register Wchar *__restrict dst,
return src - src0;
}
-#ifndef WANT_WIDE
-libc_hidden_def(strlcpy)
+#ifdef WANT_WIDE
+
#ifndef __UCLIBC_HAS_LOCALE__
-/* Experimentally off - libc_hidden_proto(strxfrm) */
-strong_alias(strlcpy,strxfrm)
-libc_hidden_def(strxfrm)
+strong_alias(__wcslcpy,wcsxfrm)
+libc_hidden_def(wcsxfrm)
#endif
+
#else
+
+libc_hidden_def(strlcpy)
#ifndef __UCLIBC_HAS_LOCALE__
-strong_alias(__wcslcpy,wcsxfrm)
-libc_hidden_def(wcsxfrm)
+strong_alias(strlcpy,strxfrm)
+libc_hidden_def(strxfrm)
#endif
+
#endif
diff --git a/libc/string/strlen.c b/libc/string/strlen.c
index 2edb6e4e8..021a8cabc 100644
--- a/libc/string/strlen.c
+++ b/libc/string/strlen.c
@@ -13,8 +13,6 @@
# define Wstrlen strlen
#endif
-libc_hidden_proto(Wstrlen)
-
size_t Wstrlen(const Wchar *s)
{
register const Wchar *p;
diff --git a/libc/string/strncasecmp.c b/libc/string/strncasecmp.c
index 83efd85a7..a9e7245a8 100644
--- a/libc/string/strncasecmp.c
+++ b/libc/string/strncasecmp.c
@@ -12,28 +12,28 @@
#ifdef WANT_WIDE
# define strncasecmp wcsncasecmp
# define strncasecmp_l wcsncasecmp_l
-libc_hidden_proto(wcsncasecmp)
+/* libc_hidden_proto(wcsncasecmp) */
# if defined(__USE_GNU) && defined(__UCLIBC_HAS_XLOCALE__)
-libc_hidden_proto(wcsncasecmp_l)
+/* libc_hidden_proto(wcsncasecmp_l) */
# endif
# ifdef __UCLIBC_DO_XLOCALE
-libc_hidden_proto(towlower_l)
+/* libc_hidden_proto(towlower_l) */
# define TOLOWER(C) towlower_l((C), locale_arg)
# else
-libc_hidden_proto(towlower)
+/* libc_hidden_proto(towlower) */
# define TOLOWER(C) towlower((C))
# endif
#else
/* Experimentally off - libc_hidden_proto(strncasecmp) */
/* Experimentally off - libc_hidden_proto(strncasecmp_l) */
# ifdef __UCLIBC_DO_XLOCALE
-libc_hidden_proto(tolower_l)
+/* libc_hidden_proto(tolower_l) */
# define TOLOWER(C) tolower_l((C), locale_arg)
# else
#if !defined __UCLIBC_HAS_XLOCALE__ && defined __UCLIBC_HAS_CTYPE_TABLES__
/* libc_hidden_proto(__ctype_tolower) */
#endif
-libc_hidden_proto(tolower)
+/* libc_hidden_proto(tolower) */
# define TOLOWER(C) tolower((C))
# endif
#endif
diff --git a/libc/string/strnlen.c b/libc/string/strnlen.c
index 8fbc25c11..98267e51b 100644
--- a/libc/string/strnlen.c
+++ b/libc/string/strnlen.c
@@ -15,8 +15,6 @@
# define Wstrnlen strnlen
#endif
-libc_hidden_proto(Wstrnlen)
-
size_t Wstrnlen(const Wchar *s, size_t max)
{
register const Wchar *p = s;
diff --git a/libc/string/strpbrk.c b/libc/string/strpbrk.c
index abeb84380..ddfc75172 100644
--- a/libc/string/strpbrk.c
+++ b/libc/string/strpbrk.c
@@ -13,8 +13,6 @@
# define Wstrpbrk strpbrk
#endif
-libc_hidden_proto(Wstrpbrk)
-
Wchar *Wstrpbrk(const Wchar *s1, const Wchar *s2)
{
register const Wchar *s;
diff --git a/libc/string/strspn.c b/libc/string/strspn.c
index ca83ef900..942b6f308 100644
--- a/libc/string/strspn.c
+++ b/libc/string/strspn.c
@@ -13,8 +13,6 @@
# define Wstrspn strspn
#endif
-libc_hidden_proto(Wstrspn)
-
size_t Wstrspn(const Wchar *s1, const Wchar *s2)
{
register const Wchar *s = s1;
diff --git a/libc/string/strtok_r.c b/libc/string/strtok_r.c
index 2ad7746b1..c81231997 100644
--- a/libc/string/strtok_r.c
+++ b/libc/string/strtok_r.c
@@ -8,8 +8,8 @@
#include "_string.h"
#ifdef WANT_WIDE
-libc_hidden_proto(wcsspn)
-libc_hidden_proto(wcspbrk)
+/* libc_hidden_proto(wcsspn) */
+/* libc_hidden_proto(wcspbrk) */
# define Wstrtok_r wcstok
# define Wstrspn wcsspn
# define Wstrpbrk wcspbrk
diff --git a/libc/sysdeps/linux/common/__socketcall.c b/libc/sysdeps/linux/common/__socketcall.c
index 5a959a63c..e49fb21bc 100644
--- a/libc/sysdeps/linux/common/__socketcall.c
+++ b/libc/sysdeps/linux/common/__socketcall.c
@@ -11,5 +11,5 @@
#ifdef __NR_socketcall
#define __NR___socketcall __NR_socketcall
int __socketcall(int __call, unsigned long *__args) attribute_hidden;
-_syscall2(int, __socketcall, int, call, unsigned long *, args);
+_syscall2(int, __socketcall, int, call, unsigned long *, args)
#endif
diff --git a/libc/sysdeps/linux/common/__syscall_fcntl64.c b/libc/sysdeps/linux/common/__syscall_fcntl64.c
index 84c2ea2bf..cd5c59bd2 100644
--- a/libc/sysdeps/linux/common/__syscall_fcntl64.c
+++ b/libc/sysdeps/linux/common/__syscall_fcntl64.c
@@ -16,7 +16,7 @@ extern __typeof(fcntl64) __libc_fcntl64;
libc_hidden_proto(__libc_fcntl64)
#define __NR___syscall_fcntl64 __NR_fcntl64
-static __inline__ _syscall3(int, __syscall_fcntl64, int, fd, int, cmd, long, arg);
+static __inline__ _syscall3(int, __syscall_fcntl64, int, fd, int, cmd, long, arg)
int __libc_fcntl64(int fd, int cmd, ...)
{
long arg;
@@ -30,7 +30,7 @@ int __libc_fcntl64(int fd, int cmd, ...)
}
libc_hidden_def(__libc_fcntl64)
-libc_hidden_proto(fcntl64)
+/* libc_hidden_proto(fcntl64) */
strong_alias(__libc_fcntl64,fcntl64)
libc_hidden_weak(fcntl64)
#endif
diff --git a/libc/sysdeps/linux/common/__syscall_rt_sigaction.c b/libc/sysdeps/linux/common/__syscall_rt_sigaction.c
index 981bb19b0..0f5329cfb 100644
--- a/libc/sysdeps/linux/common/__syscall_rt_sigaction.c
+++ b/libc/sysdeps/linux/common/__syscall_rt_sigaction.c
@@ -16,5 +16,5 @@
#define __NR___syscall_rt_sigaction __NR_rt_sigaction
_syscall4(int, __syscall_rt_sigaction, int, signum,
const struct kernel_sigaction *, act, struct kernel_sigaction *, oldact,
- size_t, size);
+ size_t, size)
#endif
diff --git a/libc/sysdeps/linux/common/__syscall_sigaction.c b/libc/sysdeps/linux/common/__syscall_sigaction.c
index c39b49d00..ae0f01e9e 100644
--- a/libc/sysdeps/linux/common/__syscall_sigaction.c
+++ b/libc/sysdeps/linux/common/__syscall_sigaction.c
@@ -14,6 +14,6 @@
#include <signal.h>
int __syscall_sigaction (int __signum, const struct sigaction *__act, struct sigaction *__oldact) attribute_hidden;
_syscall3(int, __syscall_sigaction, int, signum, const struct sigaction *,
- act, struct sigaction *, oldact);
+ act, struct sigaction *, oldact)
#endif
diff --git a/libc/sysdeps/linux/common/_exit.c b/libc/sysdeps/linux/common/_exit.c
index 7592e9b45..a0b891d25 100644
--- a/libc/sysdeps/linux/common/_exit.c
+++ b/libc/sysdeps/linux/common/_exit.c
@@ -2,8 +2,7 @@
/*
* exit syscall for uClibc
*
- * Copyright (C) 2006 by Steven J. Hill <sjhill@realitydiluted.com>
- * Copyright (C) 2002-2006 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
@@ -17,12 +16,12 @@
#include <sysdep.h>
#endif
-libc_hidden_proto(_exit)
+/* libc_hidden_proto(_exit) */
#ifndef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) __syscall_exit (args)
#define __NR___syscall_exit __NR_exit
-static __inline__ _syscall1(void, __syscall_exit, int, status);
+static __inline__ _syscall1(void, __syscall_exit, int, status)
#endif
void attribute_noreturn _exit(int status)
diff --git a/libc/sysdeps/linux/common/access.c b/libc/sysdeps/linux/common/access.c
index 85533bde6..a075d421a 100644
--- a/libc/sysdeps/linux/common/access.c
+++ b/libc/sysdeps/linux/common/access.c
@@ -9,4 +9,4 @@
#include <sys/syscall.h>
#include <unistd.h>
-_syscall2(int, access, const char *, pathname, int, mode);
+_syscall2(int, access, const char *, pathname, int, mode)
diff --git a/libc/sysdeps/linux/common/acct.c b/libc/sysdeps/linux/common/acct.c
index 74156d4de..e0a43200c 100644
--- a/libc/sysdeps/linux/common/acct.c
+++ b/libc/sysdeps/linux/common/acct.c
@@ -10,5 +10,5 @@
#include <sys/syscall.h>
#include <unistd.h>
#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
-_syscall1(int, acct, const char *, filename);
+_syscall1(int, acct, const char *, filename)
#endif
diff --git a/libc/sysdeps/linux/common/adjtimex.c b/libc/sysdeps/linux/common/adjtimex.c
index 280f90e5a..725c82994 100644
--- a/libc/sysdeps/linux/common/adjtimex.c
+++ b/libc/sysdeps/linux/common/adjtimex.c
@@ -10,9 +10,9 @@
#include <sys/syscall.h>
#include <sys/timex.h>
-libc_hidden_proto(adjtimex)
+/* libc_hidden_proto(adjtimex) */
-_syscall1(int, adjtimex, struct timex *, buf);
+_syscall1(int, adjtimex, struct timex *, buf)
libc_hidden_def(adjtimex)
#if defined __UCLIBC_NTP_LEGACY__
strong_alias(adjtimex,ntp_adjtime)
diff --git a/libc/sysdeps/linux/common/alarm.c b/libc/sysdeps/linux/common/alarm.c
index 8b499861c..6042ad270 100644
--- a/libc/sysdeps/linux/common/alarm.c
+++ b/libc/sysdeps/linux/common/alarm.c
@@ -10,15 +10,15 @@
#include <sys/syscall.h>
#include <unistd.h>
-libc_hidden_proto(alarm)
+/* libc_hidden_proto(alarm) */
#ifdef __NR_alarm
#define __NR___alarm __NR_alarm
-_syscall1(unsigned int, alarm, unsigned int, seconds);
+_syscall1(unsigned int, alarm, unsigned int, seconds)
#else
#include <sys/time.h>
-libc_hidden_proto(setitimer)
+/* libc_hidden_proto(setitimer) */
unsigned int alarm(unsigned int seconds)
{
diff --git a/libc/sysdeps/linux/common/arch_prctl.c b/libc/sysdeps/linux/common/arch_prctl.c
index 6d9927a01..5816f5394 100644
--- a/libc/sysdeps/linux/common/arch_prctl.c
+++ b/libc/sysdeps/linux/common/arch_prctl.c
@@ -11,5 +11,5 @@
#ifdef __NR_arch_prctl
extern int arch_prctl(int code, unsigned long addr);
-_syscall2(int, arch_prctl, int, code, unsigned long, addr);
+_syscall2(int, arch_prctl, int, code, unsigned long, addr)
#endif
diff --git a/libc/sysdeps/linux/common/bdflush.c b/libc/sysdeps/linux/common/bdflush.c
index 6cf007759..687a8f9a7 100644
--- a/libc/sysdeps/linux/common/bdflush.c
+++ b/libc/sysdeps/linux/common/bdflush.c
@@ -11,7 +11,7 @@
#include <sys/kdaemon.h>
#ifdef __NR_bdflush
-_syscall2(int, bdflush, int, __func, long int, __data);
+_syscall2(int, bdflush, int, __func, long int, __data)
#else
int bdflush(int __func, long int __data)
{
diff --git a/libc/sysdeps/linux/common/bits/errno.h b/libc/sysdeps/linux/common/bits/errno.h
index a5ac1a47f..92227fe73 100644
--- a/libc/sysdeps/linux/common/bits/errno.h
+++ b/libc/sysdeps/linux/common/bits/errno.h
@@ -41,6 +41,7 @@
# ifndef __ASSEMBLER__
/* Function to get address of global `errno' variable. */
extern int *__errno_location (void) __THROW __attribute__ ((__const__));
+libc_hidden_proto(__errno_location)
# ifdef __UCLIBC_HAS_THREADS__
/* When using threads, errno is a per-thread value. */
diff --git a/libc/sysdeps/linux/common/bits/getopt.h b/libc/sysdeps/linux/common/bits/getopt.h
index a28d0a40b..0307757a6 100644
--- a/libc/sysdeps/linux/common/bits/getopt.h
+++ b/libc/sysdeps/linux/common/bits/getopt.h
@@ -153,8 +153,10 @@ struct option
errors, only prototype getopt for the GNU C library. */
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
__THROW;
+libc_hidden_proto(getopt)
#else /* not __GNU_LIBRARY__ */
extern int getopt ();
+libc_hidden_proto(getopt)
#endif /* __GNU_LIBRARY__ */
#if defined __UCLIBC_HAS_GNU_GETOPT__ || defined __UCLIBC_HAS_GETOPT_LONG__
diff --git a/libc/sysdeps/linux/common/bits/sigset.h b/libc/sysdeps/linux/common/bits/sigset.h
index 7ccadda45..9a16e5cb9 100644
--- a/libc/sysdeps/linux/common/bits/sigset.h
+++ b/libc/sysdeps/linux/common/bits/sigset.h
@@ -101,8 +101,11 @@ typedef struct
checking is done in the non __ versions. */
extern int __sigismember (__const __sigset_t *, int);
+libc_hidden_proto(__sigismember)
extern int __sigaddset (__sigset_t *, int);
+libc_hidden_proto(__sigaddset)
extern int __sigdelset (__sigset_t *, int);
+libc_hidden_proto(__sigdelset)
# ifdef __USE_EXTERN_INLINES
# define __SIGSETFN(NAME, BODY, CONST) \
diff --git a/libc/sysdeps/linux/common/bits/socket.h b/libc/sysdeps/linux/common/bits/socket.h
index 2f3dc797b..ac5a4336b 100644
--- a/libc/sysdeps/linux/common/bits/socket.h
+++ b/libc/sysdeps/linux/common/bits/socket.h
@@ -269,6 +269,7 @@ struct cmsghdr
extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
struct cmsghdr *__cmsg) __THROW;
+libc_hidden_proto(__cmsg_nxthdr)
#ifdef __USE_EXTERN_INLINES
# ifndef _EXTERN_INLINE
# define _EXTERN_INLINE extern __inline
@@ -314,7 +315,13 @@ struct ucred
};
/* Get socket manipulation related informations from kernel headers. */
+#ifndef __GLIBC__
+#define __GLIBC__ 2
#include <asm/socket.h>
+#undef __GLIBC__
+#else
+#include <asm/socket.h>
+#endif
/* Structure used to manipulate the SO_LINGER option. */
diff --git a/libc/sysdeps/linux/common/bits/uClibc_errno.h b/libc/sysdeps/linux/common/bits/uClibc_errno.h
index 631e10c50..9c1561841 100644
--- a/libc/sysdeps/linux/common/bits/uClibc_errno.h
+++ b/libc/sysdeps/linux/common/bits/uClibc_errno.h
@@ -9,7 +9,7 @@
#ifdef IS_IN_rtld
# undef errno
# define errno _dl_errno
-extern int _dl_errno; // attribute_hidden;
+extern int _dl_errno; /* attribute_hidden; */
#elif defined __UCLIBC_HAS_THREADS__
# include <tls.h>
# if defined USE___THREAD && USE___THREAD
diff --git a/libc/sysdeps/linux/common/bits/uClibc_stdio.h b/libc/sysdeps/linux/common/bits/uClibc_stdio.h
index 0af2d5db5..a8cf4eb56 100644
--- a/libc/sysdeps/linux/common/bits/uClibc_stdio.h
+++ b/libc/sysdeps/linux/common/bits/uClibc_stdio.h
@@ -390,7 +390,9 @@ extern void __stdio_init_mutex(__UCLIBC_MUTEX_TYPE *m) attribute_hidden;
#endif
extern int __fgetc_unlocked(FILE *__stream);
+libc_hidden_proto(__fgetc_unlocked)
extern int __fputc_unlocked(int __c, FILE *__stream);
+libc_hidden_proto(__fputc_unlocked)
/* First define the default definitions.
They are overridden below as necessary. */
diff --git a/libc/sysdeps/linux/common/capget.c b/libc/sysdeps/linux/common/capget.c
index c8c83249c..361de845d 100644
--- a/libc/sysdeps/linux/common/capget.c
+++ b/libc/sysdeps/linux/common/capget.c
@@ -10,7 +10,7 @@
#include <sys/syscall.h>
int capget(void *header, void *data);
#ifdef __NR_capget
-_syscall2(int, capget, void *, header, void *, data);
+_syscall2(int, capget, void *, header, void *, data)
#else
int capget(void *header, void *data)
{
diff --git a/libc/sysdeps/linux/common/capset.c b/libc/sysdeps/linux/common/capset.c
index 7a28b0e16..f8936285e 100644
--- a/libc/sysdeps/linux/common/capset.c
+++ b/libc/sysdeps/linux/common/capset.c
@@ -10,7 +10,7 @@
#include <sys/syscall.h>
int capset(void *header, const void *data);
#ifdef __NR_capset
-_syscall2(int, capset, void *, header, const void *, data);
+_syscall2(int, capset, void *, header, const void *, data)
#else
int capset(void *header, const void *data)
{
diff --git a/libc/sysdeps/linux/common/chdir.c b/libc/sysdeps/linux/common/chdir.c
index 95a825eb7..05441eb82 100644
--- a/libc/sysdeps/linux/common/chdir.c
+++ b/libc/sysdeps/linux/common/chdir.c
@@ -12,10 +12,10 @@
#include <unistd.h>
#include <sys/param.h>
-libc_hidden_proto(chdir)
+/* libc_hidden_proto(chdir) */
#define __NR___syscall_chdir __NR_chdir
-static __inline__ _syscall1(int, __syscall_chdir, const char *, path);
+static __inline__ _syscall1(int, __syscall_chdir, const char *, path)
int chdir(const char *path)
{
return __syscall_chdir(path);
diff --git a/libc/sysdeps/linux/common/chmod.c b/libc/sysdeps/linux/common/chmod.c
index 34a30a4b0..a4524ba1f 100644
--- a/libc/sysdeps/linux/common/chmod.c
+++ b/libc/sysdeps/linux/common/chmod.c
@@ -10,10 +10,10 @@
#include <sys/syscall.h>
#include <sys/stat.h>
-libc_hidden_proto(chmod)
+/* libc_hidden_proto(chmod) */
#define __NR___syscall_chmod __NR_chmod
-static __inline__ _syscall2(int, __syscall_chmod, const char *, path, __kernel_mode_t, mode);
+static __inline__ _syscall2(int, __syscall_chmod, const char *, path, __kernel_mode_t, mode)
int chmod(const char *path, mode_t mode)
{
diff --git a/libc/sysdeps/linux/common/chown.c b/libc/sysdeps/linux/common/chown.c
index 27b89a3f4..2e7784a0c 100644
--- a/libc/sysdeps/linux/common/chown.c
+++ b/libc/sysdeps/linux/common/chown.c
@@ -11,7 +11,7 @@
#include <unistd.h>
#include <bits/wordsize.h>
-libc_hidden_proto(chown)
+/* libc_hidden_proto(chown) */
#if (__WORDSIZE == 32 && defined(__NR_chown32)) || __WORDSIZE == 64
# ifdef __NR_chown32
@@ -19,13 +19,13 @@ libc_hidden_proto(chown)
# define __NR_chown __NR_chown32
# endif
-_syscall3(int, chown, const char *, path, uid_t, owner, gid_t, group);
+_syscall3(int, chown, const char *, path, uid_t, owner, gid_t, group)
#else
# define __NR___syscall_chown __NR_chown
static __inline__ _syscall3(int, __syscall_chown, const char *, path,
- __kernel_uid_t, owner, __kernel_gid_t, group);
+ __kernel_uid_t, owner, __kernel_gid_t, group)
int chown(const char *path, uid_t owner, gid_t group)
{
diff --git a/libc/sysdeps/linux/common/chroot.c b/libc/sysdeps/linux/common/chroot.c
index 12d09bbbe..4c085f215 100644
--- a/libc/sysdeps/linux/common/chroot.c
+++ b/libc/sysdeps/linux/common/chroot.c
@@ -14,7 +14,7 @@
#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
#define __NR___syscall_chroot __NR_chroot
-static __inline__ _syscall1(int, __syscall_chroot, const char *, path);
+static __inline__ _syscall1(int, __syscall_chroot, const char *, path)
int chroot(const char *path)
{
diff --git a/libc/sysdeps/linux/common/clock_getres.c b/libc/sysdeps/linux/common/clock_getres.c
index 0a3e1d16f..4964ec57c 100644
--- a/libc/sysdeps/linux/common/clock_getres.c
+++ b/libc/sysdeps/linux/common/clock_getres.c
@@ -12,9 +12,9 @@
#include <unistd.h>
#ifdef __NR_clock_getres
-_syscall2(int, clock_getres, clockid_t, clock_id, struct timespec*, res);
+_syscall2(int, clock_getres, clockid_t, clock_id, struct timespec*, res)
#else
-libc_hidden_proto(sysconf)
+/* libc_hidden_proto(sysconf) */
int clock_getres(clockid_t clock_id, struct timespec* res)
{
@@ -41,3 +41,4 @@ int clock_getres(clockid_t clock_id, struct timespec* res)
return retval;
}
#endif
+libc_hidden_def(clock_getres)
diff --git a/libc/sysdeps/linux/common/clock_gettime.c b/libc/sysdeps/linux/common/clock_gettime.c
index 38f7ab7ba..f1db8ad7c 100644
--- a/libc/sysdeps/linux/common/clock_gettime.c
+++ b/libc/sysdeps/linux/common/clock_gettime.c
@@ -13,9 +13,9 @@
#include <sys/time.h>
#ifdef __NR_clock_gettime
-_syscall2(int, clock_gettime, clockid_t, clock_id, struct timespec*, tp);
+_syscall2(int, clock_gettime, clockid_t, clock_id, struct timespec*, tp)
#else
-libc_hidden_proto(gettimeofday)
+/* libc_hidden_proto(gettimeofday) */
int clock_gettime(clockid_t clock_id, struct timespec* tp)
{
diff --git a/libc/sysdeps/linux/common/clock_settime.c b/libc/sysdeps/linux/common/clock_settime.c
index 8ebec7381..f11088a37 100644
--- a/libc/sysdeps/linux/common/clock_settime.c
+++ b/libc/sysdeps/linux/common/clock_settime.c
@@ -12,9 +12,9 @@
#include <sys/time.h>
#ifdef __NR_clock_settime
-_syscall2(int, clock_settime, clockid_t, clock_id, const struct timespec*, tp);
+_syscall2(int, clock_settime, clockid_t, clock_id, const struct timespec*, tp)
#else
-libc_hidden_proto(settimeofday)
+/* libc_hidden_proto(settimeofday) */
int clock_settime(clockid_t clock_id, const struct timespec* tp)
{
diff --git a/libc/sysdeps/linux/common/cmsg_nxthdr.c b/libc/sysdeps/linux/common/cmsg_nxthdr.c
index 8350c3a4d..7dbf7bec5 100644
--- a/libc/sysdeps/linux/common/cmsg_nxthdr.c
+++ b/libc/sysdeps/linux/common/cmsg_nxthdr.c
@@ -21,7 +21,7 @@
#include <features.h>
#include <sys/socket.h>
-libc_hidden_proto(__cmsg_nxthdr)
+/* libc_hidden_proto(__cmsg_nxthdr) */
struct cmsghdr *
__cmsg_nxthdr (struct msghdr *mhdr, struct cmsghdr *cmsg)
diff --git a/libc/sysdeps/linux/common/creat64.c b/libc/sysdeps/linux/common/creat64.c
index f5f00182c..6fa010545 100644
--- a/libc/sysdeps/linux/common/creat64.c
+++ b/libc/sysdeps/linux/common/creat64.c
@@ -24,6 +24,7 @@
extern __typeof(open64) __libc_open64;
libc_hidden_proto(__libc_open64)
+
extern __typeof(creat64) __libc_creat64;
/* Create FILE with protections MODE. */
diff --git a/libc/sysdeps/linux/common/create_module.c b/libc/sysdeps/linux/common/create_module.c
index 95ff900e0..d8f24466d 100644
--- a/libc/sysdeps/linux/common/create_module.c
+++ b/libc/sysdeps/linux/common/create_module.c
@@ -19,7 +19,7 @@ unsigned long create_module(const char *name, size_t size);
#if defined(__UCLIBC_BROKEN_CREATE_MODULE__)
# define __NR___create_module __NR_create_module
-static __inline__ _syscall2(long, __create_module, const char *, name, size_t, size);
+static __inline__ _syscall2(long, __create_module, const char *, name, size_t, size)
/* By checking the value of errno, we know if we have been fooled
* by the syscall2 macro making a very high address look like a
* negative, so we we fix it up here. */
@@ -39,14 +39,14 @@ unsigned long create_module(const char *name, size_t size)
/* Alpha doesn't have the same problem, exactly, but a bug in older
kernels fails to clear the error flag. Clear it here explicitly. */
static __inline__ _syscall4(unsigned long, __create_module, const char *, name,
- size_t, size, size_t, dummy, size_t, err);
+ size_t, size, size_t, dummy, size_t, err)
unsigned long create_module(const char *name, size_t size)
{
return __create_module(name, size, 0, 0);
}
#else
/* Sparc, MIPS, etc don't mistake return values for errors. */
-_syscall2(unsigned long, create_module, const char *, name, size_t, size);
+_syscall2(unsigned long, create_module, const char *, name, size_t, size)
#endif
#else /* !__NR_create_module */
diff --git a/libc/sysdeps/linux/common/delete_module.c b/libc/sysdeps/linux/common/delete_module.c
index a93921411..44f9b30ae 100644
--- a/libc/sysdeps/linux/common/delete_module.c
+++ b/libc/sysdeps/linux/common/delete_module.c
@@ -7,11 +7,11 @@
*/
#include <sys/syscall.h>
-int delete_module(const char *name);
+int delete_module(const char *name, unsigned int flags);
#ifdef __NR_delete_module
-_syscall1(int, delete_module, const char *, name);
-#else
-int delete_module(const char *name)
+_syscall2(int, delete_module, const char *, name, unsigned int, flags)
+#elif defined __UCLIBC_HAS_STUBS__
+int delete_module(const char *name, unsigned int flags)
{
__set_errno(ENOSYS);
return -1;
diff --git a/libc/sysdeps/linux/common/dl-osinfo.h b/libc/sysdeps/linux/common/dl-osinfo.h
index a038ea31e..195c64803 100644
--- a/libc/sysdeps/linux/common/dl-osinfo.h
+++ b/libc/sysdeps/linux/common/dl-osinfo.h
@@ -21,10 +21,10 @@
# ifdef IS_IN_libc
#include <fcntl.h>
-libc_hidden_proto(open)
-libc_hidden_proto(read)
+/* libc_hidden_proto(open) */
+/* libc_hidden_proto(read) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(gettimeofday)
+/* libc_hidden_proto(gettimeofday) */
# define OPEN open
# define READ read
# define CLOSE close
diff --git a/libc/sysdeps/linux/common/dup.c b/libc/sysdeps/linux/common/dup.c
index ea7f7d0b1..d35176673 100644
--- a/libc/sysdeps/linux/common/dup.c
+++ b/libc/sysdeps/linux/common/dup.c
@@ -8,4 +8,4 @@
#include <sys/syscall.h>
#include <unistd.h>
-_syscall1(int, dup, int, oldfd);
+_syscall1(int, dup, int, oldfd)
diff --git a/libc/sysdeps/linux/common/dup2.c b/libc/sysdeps/linux/common/dup2.c
index 16bcc4221..2a315fed4 100644
--- a/libc/sysdeps/linux/common/dup2.c
+++ b/libc/sysdeps/linux/common/dup2.c
@@ -10,7 +10,7 @@
#include <sys/syscall.h>
#include <unistd.h>
-libc_hidden_proto(dup2)
+/* libc_hidden_proto(dup2) */
-_syscall2(int, dup2, int, oldfd, int, newfd);
+_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 27f5a7d61..86272d9aa 100644
--- a/libc/sysdeps/linux/common/epoll.c
+++ b/libc/sysdeps/linux/common/epoll.c
@@ -14,7 +14,7 @@
* epoll_create()
*/
#ifdef __NR_epoll_create
-_syscall1(int, epoll_create, int, size);
+_syscall1(int, epoll_create, int, size)
#else
int epoll_create(int size)
{
@@ -27,7 +27,7 @@ int epoll_create(int size)
* epoll_ctl()
*/
#ifdef __NR_epoll_ctl
-_syscall4(int,epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event *, event);
+_syscall4(int,epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event *, event)
#else
int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)
{
@@ -40,7 +40,7 @@ int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)
* epoll_wait()
*/
#ifdef __NR_epoll_wait
-_syscall4(int, epoll_wait, int, epfd, struct epoll_event *, events, int, maxevents, int, timeout);
+_syscall4(int, epoll_wait, int, epfd, struct epoll_event *, events, int, maxevents, int, timeout)
#else
int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout)
{
diff --git a/libc/sysdeps/linux/common/execve.c b/libc/sysdeps/linux/common/execve.c
index 6bc72dde9..53efd78fb 100644
--- a/libc/sysdeps/linux/common/execve.c
+++ b/libc/sysdeps/linux/common/execve.c
@@ -12,7 +12,7 @@
#include <string.h>
#include <sys/param.h>
-libc_hidden_proto(execve)
+/* libc_hidden_proto(execve) */
_syscall3(int, execve, const char *, filename,
- char *const *, argv, char *const *, envp);
+ char *const *, argv, char *const *, envp)
libc_hidden_def(execve)
diff --git a/libc/sysdeps/linux/common/fchdir.c b/libc/sysdeps/linux/common/fchdir.c
index 15c7dbd73..45236f177 100644
--- a/libc/sysdeps/linux/common/fchdir.c
+++ b/libc/sysdeps/linux/common/fchdir.c
@@ -10,7 +10,7 @@
#include <sys/syscall.h>
#include <unistd.h>
-libc_hidden_proto(fchdir)
+/* libc_hidden_proto(fchdir) */
-_syscall1(int, fchdir, int, fd);
+_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 cb0058133..791f530b6 100644
--- a/libc/sysdeps/linux/common/fchmod.c
+++ b/libc/sysdeps/linux/common/fchmod.c
@@ -12,7 +12,7 @@
#define __NR___syscall_fchmod __NR_fchmod
static __inline__ _syscall2(int, __syscall_fchmod,
- int, fildes, __kernel_mode_t, mode);
+ int, fildes, __kernel_mode_t, mode)
int fchmod(int fildes, mode_t mode)
{
diff --git a/libc/sysdeps/linux/common/fchown.c b/libc/sysdeps/linux/common/fchown.c
index 31111ca54..61618dcff 100644
--- a/libc/sysdeps/linux/common/fchown.c
+++ b/libc/sysdeps/linux/common/fchown.c
@@ -17,13 +17,13 @@
# define __NR_fchown __NR_fchown32
# endif
-_syscall3(int, fchown, int, fd, uid_t, owner, gid_t, group);
+_syscall3(int, fchown, int, fd, uid_t, owner, gid_t, group)
#else
# define __NR___syscall_fchown __NR_fchown
static __inline__ _syscall3(int, __syscall_fchown, int, fd,
- __kernel_uid_t, owner, __kernel_gid_t, group);
+ __kernel_uid_t, owner, __kernel_gid_t, group)
int fchown(int fd, uid_t owner, gid_t group)
{
diff --git a/libc/sysdeps/linux/common/fdatasync.c b/libc/sysdeps/linux/common/fdatasync.c
index 774433f17..07433bc77 100644
--- a/libc/sysdeps/linux/common/fdatasync.c
+++ b/libc/sysdeps/linux/common/fdatasync.c
@@ -14,4 +14,4 @@
# define __NR_fdatasync __NR_osf_fdatasync
#endif
-_syscall1(int, fdatasync, int, fd);
+_syscall1(int, fdatasync, int, fd)
diff --git a/libc/sysdeps/linux/common/flock.c b/libc/sysdeps/linux/common/flock.c
index 9b275d031..3dcd1aee1 100644
--- a/libc/sysdeps/linux/common/flock.c
+++ b/libc/sysdeps/linux/common/flock.c
@@ -11,7 +11,7 @@
#include <sys/file.h>
#define __NR___syscall_flock __NR_flock
-static __inline__ _syscall2(int, __syscall_flock, int, fd, int, operation);
+static __inline__ _syscall2(int, __syscall_flock, int, fd, int, operation)
int flock(int fd, int operation)
{
diff --git a/libc/sysdeps/linux/common/fork.c b/libc/sysdeps/linux/common/fork.c
index b4fa3686d..5993387f0 100644
--- a/libc/sysdeps/linux/common/fork.c
+++ b/libc/sysdeps/linux/common/fork.c
@@ -15,8 +15,8 @@
#ifdef __NR_fork
extern __typeof(fork) __libc_fork;
#define __NR___libc_fork __NR_fork
-_syscall0(pid_t, __libc_fork);
-libc_hidden_proto(fork)
+_syscall0(pid_t, __libc_fork)
+/* libc_hidden_proto(fork) */
weak_alias(__libc_fork,fork)
libc_hidden_weak(fork)
#endif
@@ -28,7 +28,7 @@ pid_t __libc_fork(void)
__set_errno(ENOSYS);
return -1;
}
-libc_hidden_proto(fork)
+/* libc_hidden_proto(fork) */
weak_alias(__libc_fork,fork)
libc_hidden_weak(fork)
link_warning(fork, "fork: this function is not implemented on no-mmu systems")
diff --git a/libc/sysdeps/linux/common/fstat.c b/libc/sysdeps/linux/common/fstat.c
index fee750aa4..6d5cf8b9f 100644
--- a/libc/sysdeps/linux/common/fstat.c
+++ b/libc/sysdeps/linux/common/fstat.c
@@ -18,10 +18,10 @@
#undef fstat64
-libc_hidden_proto(fstat)
+/* libc_hidden_proto(fstat) */
#define __NR___syscall_fstat __NR_fstat
-static __inline__ _syscall2(int, __syscall_fstat, int, fd, struct kernel_stat *, buf);
+static __inline__ _syscall2(int, __syscall_fstat, int, fd, struct kernel_stat *, buf)
int fstat(int fd, struct stat *buf)
{
@@ -38,7 +38,7 @@ libc_hidden_def(fstat)
#if ! defined __NR_fstat64 && defined __UCLIBC_HAS_LFS__
extern __typeof(fstat) fstat64;
-libc_hidden_proto(fstat64)
+/* libc_hidden_proto(fstat64) */
strong_alias(fstat,fstat64)
libc_hidden_def(fstat64)
#endif
diff --git a/libc/sysdeps/linux/common/fstat64.c b/libc/sysdeps/linux/common/fstat64.c
index 67c519a8b..a57b4f6f5 100644
--- a/libc/sysdeps/linux/common/fstat64.c
+++ b/libc/sysdeps/linux/common/fstat64.c
@@ -14,11 +14,11 @@
#include <sys/stat.h>
#include "xstatconv.h"
-libc_hidden_proto(fstat64)
+/* libc_hidden_proto(fstat64) */
#define __NR___syscall_fstat64 __NR_fstat64
static __inline__ _syscall2(int, __syscall_fstat64,
- int, filedes, struct kernel_stat64 *, buf);
+ int, filedes, struct kernel_stat64 *, buf)
int fstat64(int fd, struct stat64 *buf)
{
diff --git a/libc/sysdeps/linux/common/fstatfs.c b/libc/sysdeps/linux/common/fstatfs.c
index 8a471d36f..fa0024ad8 100644
--- a/libc/sysdeps/linux/common/fstatfs.c
+++ b/libc/sysdeps/linux/common/fstatfs.c
@@ -22,14 +22,10 @@ extern int __REDIRECT_NTH (fstatfs, (int __fildes, struct statfs *__buf),
# endif
#endif
-extern __typeof(fstatfs) __libc_fstatfs;
-libc_hidden_proto(__libc_fstatfs)
+extern __typeof(fstatfs) __libc_fstatfs attribute_hidden;
#define __NR___libc_fstatfs __NR_fstatfs
-_syscall2(int, __libc_fstatfs, int, fd, struct statfs *, buf);
-libc_hidden_def(__libc_fstatfs)
+_syscall2(int, __libc_fstatfs, int, fd, struct statfs *, buf)
#if defined __UCLIBC_LINUX_SPECIFIC__
-libc_hidden_proto(fstatfs)
weak_alias(__libc_fstatfs,fstatfs)
-libc_hidden_weak(fstatfs)
#endif
diff --git a/libc/sysdeps/linux/common/fsync.c b/libc/sysdeps/linux/common/fsync.c
index be76b2d0d..711811f23 100644
--- a/libc/sysdeps/linux/common/fsync.c
+++ b/libc/sysdeps/linux/common/fsync.c
@@ -17,7 +17,7 @@
#endif
#define __NR___syscall_fsync __NR_fsync
-static inline _syscall1(int, __syscall_fsync, int, fd);
+static inline _syscall1(int, __syscall_fsync, int, fd)
extern __typeof(fsync) __libc_fsync;
diff --git a/libc/sysdeps/linux/common/ftruncate.c b/libc/sysdeps/linux/common/ftruncate.c
index 951720ba8..a7a6ea69d 100644
--- a/libc/sysdeps/linux/common/ftruncate.c
+++ b/libc/sysdeps/linux/common/ftruncate.c
@@ -10,7 +10,7 @@
#include <sys/syscall.h>
#include <unistd.h>
-libc_hidden_proto(ftruncate)
+/* libc_hidden_proto(ftruncate) */
-_syscall2(int, ftruncate, int, fd, __off_t, length);
+_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 04cdc0a99..132789144 100644
--- a/libc/sysdeps/linux/common/ftruncate64.c
+++ b/libc/sysdeps/linux/common/ftruncate64.c
@@ -21,14 +21,14 @@
# include <sys/types.h>
# include <sys/syscall.h>
-libc_hidden_proto(ftruncate64)
+/* libc_hidden_proto(ftruncate64) */
# ifdef __NR_ftruncate64
# if __WORDSIZE == 64
/* For a 64 bit machine, life is simple... */
-_syscall2(int, ftruncate64, int, fd, __off64_t, length);
+_syscall2(int, ftruncate64, int, fd, __off64_t, length)
# elif __WORDSIZE == 32
@@ -37,10 +37,10 @@ _syscall2(int, ftruncate64, int, fd, __off64_t, length);
# define __NR___syscall_ftruncate64 __NR_ftruncate64
# if defined(__UCLIBC_TRUNCATE64_HAS_4_ARGS__)
static __inline__ _syscall4(int, __syscall_ftruncate64, int, fd, uint32_t, pad,
- unsigned long, high_length, unsigned long, low_length);
+ unsigned long, high_length, unsigned long, low_length)
# else
static __inline__ _syscall3(int, __syscall_ftruncate64, int, fd,
- unsigned long, high_length, unsigned long, low_length);
+ unsigned long, high_length, unsigned long, low_length)
# endif
# endif
@@ -64,7 +64,7 @@ int ftruncate64 (int fd, __off64_t length)
# else /* __NR_ftruncate64 */
-libc_hidden_proto(ftruncate)
+/* libc_hidden_proto(ftruncate) */
int ftruncate64 (int fd, __off64_t length)
{
diff --git a/libc/sysdeps/linux/common/get_kernel_syms.c b/libc/sysdeps/linux/common/get_kernel_syms.c
index 4f4ee5167..d6595eaf5 100644
--- a/libc/sysdeps/linux/common/get_kernel_syms.c
+++ b/libc/sysdeps/linux/common/get_kernel_syms.c
@@ -12,7 +12,7 @@
struct kernel_sym;
int get_kernel_syms(struct kernel_sym *table attribute_unused);
#ifdef __NR_get_kernel_syms
-_syscall1(int, get_kernel_syms, struct kernel_sym *, table);
+_syscall1(int, get_kernel_syms, struct kernel_sym *, table)
#else
int get_kernel_syms(struct kernel_sym *table attribute_unused)
{
diff --git a/libc/sysdeps/linux/common/getcwd.c b/libc/sysdeps/linux/common/getcwd.c
index 512a9e1ee..13619159d 100644
--- a/libc/sysdeps/linux/common/getcwd.c
+++ b/libc/sysdeps/linux/common/getcwd.c
@@ -15,23 +15,23 @@
#include <sys/param.h>
#include <sys/syscall.h>
-libc_hidden_proto(getcwd)
-libc_hidden_proto(getpagesize)
+/* libc_hidden_proto(getcwd) */
+/* libc_hidden_proto(getpagesize) */
/* Experimentally off - libc_hidden_proto(strcat) */
/* Experimentally off - libc_hidden_proto(strcpy) */
/* Experimentally off - libc_hidden_proto(strncpy) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(opendir)
-libc_hidden_proto(readdir)
-libc_hidden_proto(closedir)
-libc_hidden_proto(stat)
+/* libc_hidden_proto(opendir) */
+/* libc_hidden_proto(readdir) */
+/* libc_hidden_proto(closedir) */
+/* libc_hidden_proto(stat) */
#ifdef __NR_getcwd
# define __NR___syscall_getcwd __NR_getcwd
-static inline
-_syscall2(int, __syscall_getcwd, char *, buf, unsigned long, size);
+static __always_inline
+_syscall2(int, __syscall_getcwd, char *, buf, unsigned long, size)
#else
@@ -144,7 +144,7 @@ oops:
return 0;
}
-static inline
+static __always_inline
int __syscall_getcwd(char * buf, unsigned long size)
{
int len;
diff --git a/libc/sysdeps/linux/common/getdents.c b/libc/sysdeps/linux/common/getdents.c
index 97c6d8b06..0baf47eb4 100644
--- a/libc/sysdeps/linux/common/getdents.c
+++ b/libc/sysdeps/linux/common/getdents.c
@@ -39,7 +39,7 @@ struct kernel_dirent
ssize_t __getdents (int fd, char *buf, size_t nbytes) attribute_hidden;
#define __NR___syscall_getdents __NR_getdents
-static inline _syscall3(int, __syscall_getdents, int, fd, unsigned char *, kdirp, size_t, count);
+static __always_inline _syscall3(int, __syscall_getdents, int, fd, unsigned char *, kdirp, size_t, count)
#ifdef __ASSUME_GETDENTS32_D_TYPE
ssize_t __getdents (int fd, char *buf, size_t nbytes)
@@ -72,7 +72,7 @@ ssize_t __getdents (int fd, char *buf, size_t nbytes)
#elif ! defined __UCLIBC_HAS_LFS__ || ! defined __NR_getdents64
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(lseek)
+/* libc_hidden_proto(lseek) */
ssize_t __getdents (int fd, char *buf, size_t nbytes)
{
diff --git a/libc/sysdeps/linux/common/getdents64.c b/libc/sysdeps/linux/common/getdents64.c
index e695b969c..1864ff4fc 100644
--- a/libc/sysdeps/linux/common/getdents64.c
+++ b/libc/sysdeps/linux/common/getdents64.c
@@ -21,7 +21,7 @@
#if defined __UCLIBC_HAS_LFS__ && defined __NR_getdents64
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(lseek64)
+/* libc_hidden_proto(lseek64) */
# ifndef offsetof
# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
@@ -38,7 +38,7 @@ struct kernel_dirent64
# define __NR___syscall_getdents64 __NR_getdents64
-static __inline__ _syscall3(int, __syscall_getdents64, int, fd, unsigned char *, dirp, size_t, count);
+static __inline__ _syscall3(int, __syscall_getdents64, int, fd, unsigned char *, dirp, size_t, count)
ssize_t __getdents64 (int fd, char *buf, size_t nbytes) attribute_hidden;
ssize_t __getdents64 (int fd, char *buf, size_t nbytes)
diff --git a/libc/sysdeps/linux/common/getdirname.c b/libc/sysdeps/linux/common/getdirname.c
index 5938d7257..4b793faf0 100644
--- a/libc/sysdeps/linux/common/getdirname.c
+++ b/libc/sysdeps/linux/common/getdirname.c
@@ -26,12 +26,12 @@
#include <string.h>
/* Experimentally off - libc_hidden_proto(strdup) */
-libc_hidden_proto(getcwd)
-libc_hidden_proto(getenv)
+/* libc_hidden_proto(getcwd) */
+/* libc_hidden_proto(getenv) */
#ifdef __UCLIBC_HAS_LFS__
-libc_hidden_proto(stat64)
+/* libc_hidden_proto(stat64) */
#else
-libc_hidden_proto(stat)
+/* libc_hidden_proto(stat) */
#endif
/* Return a malloc'd string containing the current directory name.
diff --git a/libc/sysdeps/linux/common/getdomainname.c b/libc/sysdeps/linux/common/getdomainname.c
index 86f6dfd32..c561aa305 100644
--- a/libc/sysdeps/linux/common/getdomainname.c
+++ b/libc/sysdeps/linux/common/getdomainname.c
@@ -14,7 +14,7 @@
#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
/* Experimentally off - libc_hidden_proto(strlen) */
/* Experimentally off - libc_hidden_proto(strcpy) */
-libc_hidden_proto(uname)
+/* libc_hidden_proto(uname) */
#if !defined __UCLIBC_BSD_SPECIFIC__
extern int getdomainname (char *__name, size_t __len)
@@ -50,7 +50,7 @@ int __libc_getdomainname(char *name, size_t len)
}
libc_hidden_def(__libc_getdomainname)
#if defined __UCLIBC_BSD_SPECIFIC__
-libc_hidden_proto(getdomainname)
+/* libc_hidden_proto(getdomainname) */
weak_alias(__libc_getdomainname,getdomainname)
libc_hidden_weak(getdomainname)
#endif /* __UCLIBC_BSD_SPECIFIC__ */
diff --git a/libc/sysdeps/linux/common/getdtablesize.c b/libc/sysdeps/linux/common/getdtablesize.c
index 44d21862f..183c09e1f 100644
--- a/libc/sysdeps/linux/common/getdtablesize.c
+++ b/libc/sysdeps/linux/common/getdtablesize.c
@@ -11,9 +11,9 @@
/* XXX: _BSD || _XOPEN_SOURCE >= 500 */
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
-libc_hidden_proto(getdtablesize)
+/* libc_hidden_proto(getdtablesize) */
-libc_hidden_proto(getrlimit)
+/* libc_hidden_proto(getrlimit) */
#define __LOCAL_OPEN_MAX 256
diff --git a/libc/sysdeps/linux/common/getegid.c b/libc/sysdeps/linux/common/getegid.c
index eaa708f15..20a679156 100644
--- a/libc/sysdeps/linux/common/getegid.c
+++ b/libc/sysdeps/linux/common/getegid.c
@@ -10,22 +10,22 @@
#include <sys/syscall.h>
#include <unistd.h>
-libc_hidden_proto(getegid)
+/* libc_hidden_proto(getegid) */
#if defined(__NR_getegid32)
# undef __NR_getegid
# define __NR_getegid __NR_getegid32
-_syscall0(gid_t, getegid);
+_syscall0(gid_t, getegid)
#elif defined(__NR_getegid)
# define __NR___syscall_getegid __NR_getegid
-static __inline__ _syscall0(int, __syscall_getegid);
+static __inline__ _syscall0(int, __syscall_getegid)
gid_t getegid(void)
{
return (__syscall_getegid());
}
#else
-libc_hidden_proto(getgid)
+/* libc_hidden_proto(getgid) */
gid_t getegid(void)
{
diff --git a/libc/sysdeps/linux/common/geteuid.c b/libc/sysdeps/linux/common/geteuid.c
index 60151214d..b9332a9f2 100644
--- a/libc/sysdeps/linux/common/geteuid.c
+++ b/libc/sysdeps/linux/common/geteuid.c
@@ -10,23 +10,23 @@
#include <sys/syscall.h>
#include <unistd.h>
-libc_hidden_proto(geteuid)
+/* libc_hidden_proto(geteuid) */
#if defined(__NR_geteuid32)
# undef __NR_geteuid
# define __NR_geteuid __NR_geteuid32
-_syscall0(uid_t, geteuid);
+_syscall0(uid_t, geteuid)
#elif defined(__NR_geteuid)
# define __NR___syscall_geteuid __NR_geteuid
-static __inline__ _syscall0(int, __syscall_geteuid);
+static __inline__ _syscall0(int, __syscall_geteuid)
uid_t geteuid(void)
{
return (__syscall_geteuid());
}
#else
-libc_hidden_proto(getuid)
+/* libc_hidden_proto(getuid) */
uid_t geteuid(void)
{
return (getuid());
diff --git a/libc/sysdeps/linux/common/getgid.c b/libc/sysdeps/linux/common/getgid.c
index 820ebf0e2..f42a1731c 100644
--- a/libc/sysdeps/linux/common/getgid.c
+++ b/libc/sysdeps/linux/common/getgid.c
@@ -19,6 +19,6 @@
# define __NR_getgid __NR_getgid32
#endif
-libc_hidden_proto(getgid)
-_syscall0(gid_t, getgid);
+/* libc_hidden_proto(getgid) */
+_syscall0(gid_t, getgid)
libc_hidden_def(getgid)
diff --git a/libc/sysdeps/linux/common/getgroups.c b/libc/sysdeps/linux/common/getgroups.c
index 7e1604294..67d2f4faa 100644
--- a/libc/sysdeps/linux/common/getgroups.c
+++ b/libc/sysdeps/linux/common/getgroups.c
@@ -12,24 +12,24 @@
#include <unistd.h>
#include <grp.h>
-libc_hidden_proto(getgroups)
+/* libc_hidden_proto(getgroups) */
#if defined(__NR_getgroups32)
# undef __NR_getgroups
# define __NR_getgroups __NR_getgroups32
-_syscall2(int, getgroups, int, size, gid_t *, list);
+_syscall2(int, getgroups, int, size, gid_t *, list)
#elif __WORDSIZE == 64
-_syscall2(int, getgroups, int, size, gid_t *, list);
+_syscall2(int, getgroups, int, size, gid_t *, list)
#else
-libc_hidden_proto(sysconf)
+/* libc_hidden_proto(sysconf) */
#define MIN(a,b) (((a)<(b))?(a):(b))
#define __NR___syscall_getgroups __NR_getgroups
static __inline__ _syscall2(int, __syscall_getgroups,
- int, size, __kernel_gid_t *, list);
+ int, size, __kernel_gid_t *, list)
int getgroups(int size, gid_t groups[])
{
diff --git a/libc/sysdeps/linux/common/gethostname.c b/libc/sysdeps/linux/common/gethostname.c
index 8fc14ff32..e06fee98d 100644
--- a/libc/sysdeps/linux/common/gethostname.c
+++ b/libc/sysdeps/linux/common/gethostname.c
@@ -9,11 +9,11 @@
#include <sys/utsname.h>
#include <errno.h>
-libc_hidden_proto(gethostname)
+/* libc_hidden_proto(gethostname) */
/* Experimentally off - libc_hidden_proto(strlen) */
/* Experimentally off - libc_hidden_proto(strcpy) */
-libc_hidden_proto(uname)
+/* libc_hidden_proto(uname) */
int
gethostname(char *name, size_t len)
diff --git a/libc/sysdeps/linux/common/getitimer.c b/libc/sysdeps/linux/common/getitimer.c
index b240f1c6e..b324233a4 100644
--- a/libc/sysdeps/linux/common/getitimer.c
+++ b/libc/sysdeps/linux/common/getitimer.c
@@ -9,4 +9,4 @@
#include <sys/syscall.h>
#include <sys/time.h>
-_syscall2(int, getitimer, __itimer_which_t, which, struct itimerval *, value);
+_syscall2(int, getitimer, __itimer_which_t, which, struct itimerval *, value)
diff --git a/libc/sysdeps/linux/common/getpagesize.c b/libc/sysdeps/linux/common/getpagesize.c
index efb5fcb7f..96ed17b04 100644
--- a/libc/sysdeps/linux/common/getpagesize.c
+++ b/libc/sysdeps/linux/common/getpagesize.c
@@ -43,6 +43,6 @@ int __getpagesize(void)
#endif /* NBPG. */
#endif /* EXEC_PAGESIZE. */
}
-libc_hidden_proto(getpagesize)
+/* libc_hidden_proto(getpagesize) */
strong_alias(__getpagesize,getpagesize)
libc_hidden_def(getpagesize)
diff --git a/libc/sysdeps/linux/common/getpgid.c b/libc/sysdeps/linux/common/getpgid.c
index 25ff12907..cf1c0fc6e 100644
--- a/libc/sysdeps/linux/common/getpgid.c
+++ b/libc/sysdeps/linux/common/getpgid.c
@@ -13,7 +13,7 @@
#include <unistd.h>
#define __NR___syscall_getpgid __NR_getpgid
-static __inline__ _syscall1(__kernel_pid_t, __syscall_getpgid, __kernel_pid_t, pid);
+static __inline__ _syscall1(__kernel_pid_t, __syscall_getpgid, __kernel_pid_t, pid)
pid_t getpgid(pid_t pid)
{
diff --git a/libc/sysdeps/linux/common/getpgrp.c b/libc/sysdeps/linux/common/getpgrp.c
index a2fe44560..c9de68cd3 100644
--- a/libc/sysdeps/linux/common/getpgrp.c
+++ b/libc/sysdeps/linux/common/getpgrp.c
@@ -12,5 +12,5 @@
#ifdef __NR_getpgrp
/* According to the manpage the POSIX.1 version is favoured */
-_syscall0(pid_t, getpgrp);
+_syscall0(pid_t, getpgrp)
#endif
diff --git a/libc/sysdeps/linux/common/getpid.c b/libc/sysdeps/linux/common/getpid.c
index 56f1ddd66..d78c6e906 100644
--- a/libc/sysdeps/linux/common/getpid.c
+++ b/libc/sysdeps/linux/common/getpid.c
@@ -15,7 +15,7 @@ extern __typeof(getpid) __libc_getpid;
# define __NR_getpid __NR_getxpid
#endif
#define __NR___libc_getpid __NR_getpid
-_syscall0(pid_t, __libc_getpid);
-libc_hidden_proto(getpid)
+_syscall0(pid_t, __libc_getpid)
+/* libc_hidden_proto(getpid) */
weak_alias(__libc_getpid, getpid)
libc_hidden_weak(getpid)
diff --git a/libc/sysdeps/linux/common/getppid.c b/libc/sysdeps/linux/common/getppid.c
index 1630234cc..7adeb2f8b 100644
--- a/libc/sysdeps/linux/common/getppid.c
+++ b/libc/sysdeps/linux/common/getppid.c
@@ -10,9 +10,9 @@
#include <sys/syscall.h>
#include <unistd.h>
#ifdef __NR_getppid
-_syscall0(pid_t, getppid);
+_syscall0(pid_t, getppid)
#else
-libc_hidden_proto(getpid)
+/* libc_hidden_proto(getpid) */
pid_t getppid(void)
{
return getpid();
diff --git a/libc/sysdeps/linux/common/getpriority.c b/libc/sysdeps/linux/common/getpriority.c
index bdfc723e6..58fb2b31f 100644
--- a/libc/sysdeps/linux/common/getpriority.c
+++ b/libc/sysdeps/linux/common/getpriority.c
@@ -10,11 +10,11 @@
#include <sys/syscall.h>
#include <sys/resource.h>
-libc_hidden_proto(getpriority)
+/* libc_hidden_proto(getpriority) */
#define __NR___syscall_getpriority __NR_getpriority
static __inline__ _syscall2(int, __syscall_getpriority,
- __priority_which_t, which, id_t, who);
+ __priority_which_t, which, id_t, who)
/* The return value of __syscall_getpriority is biased by this value
* to avoid returning negative values. */
diff --git a/libc/sysdeps/linux/common/getresgid.c b/libc/sysdeps/linux/common/getresgid.c
index 922874a3d..425263e7e 100644
--- a/libc/sysdeps/linux/common/getresgid.c
+++ b/libc/sysdeps/linux/common/getresgid.c
@@ -19,7 +19,7 @@ _syscall3(int, getresgid, gid_t *, rgid, gid_t *, egid, gid_t *, sgid)
#elif defined(__NR_getresgid)
# define __NR___syscall_getresgid __NR_getresgid
static __inline__ _syscall3(int, __syscall_getresgid, __kernel_gid_t *, rgid,
- __kernel_gid_t *, egid, __kernel_gid_t *, sgid);
+ __kernel_gid_t *, egid, __kernel_gid_t *, sgid)
int getresgid(gid_t * rgid, gid_t * egid, gid_t * sgid)
{
diff --git a/libc/sysdeps/linux/common/getresuid.c b/libc/sysdeps/linux/common/getresuid.c
index 5a070cc42..87cf6d6d8 100644
--- a/libc/sysdeps/linux/common/getresuid.c
+++ b/libc/sysdeps/linux/common/getresuid.c
@@ -19,7 +19,7 @@ _syscall3(int, getresuid, uid_t *, ruid, uid_t *, euid, uid_t *, suid)
#elif defined(__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);
+ __kernel_uid_t *, euid, __kernel_uid_t *, suid)
int getresuid(uid_t * ruid, uid_t * euid, uid_t * suid)
{
diff --git a/libc/sysdeps/linux/common/getrlimit.c b/libc/sysdeps/linux/common/getrlimit.c
index ecb09d1e2..6297516f0 100644
--- a/libc/sysdeps/linux/common/getrlimit.c
+++ b/libc/sysdeps/linux/common/getrlimit.c
@@ -13,7 +13,7 @@
#include <sys/resource.h>
#undef getrlimit64
-libc_hidden_proto(getrlimit)
+/* libc_hidden_proto(getrlimit) */
/* Only wrap getrlimit if the new ugetrlimit is not present and getrlimit sucks */
@@ -21,9 +21,9 @@ libc_hidden_proto(getrlimit)
/* just call ugetrlimit() */
# define __NR___syscall_ugetrlimit __NR_ugetrlimit
-static inline
+static __always_inline
_syscall2(int, __syscall_ugetrlimit, enum __rlimit_resource, resource,
- struct rlimit *, rlim);
+ struct rlimit *, rlim)
int getrlimit(__rlimit_resource_t resource, struct rlimit *rlimits)
{
return (__syscall_ugetrlimit(resource, rlimits));
@@ -33,14 +33,14 @@ int getrlimit(__rlimit_resource_t resource, struct rlimit *rlimits)
/* We don't need to wrap getrlimit() */
_syscall2(int, getrlimit, __rlimit_resource_t, resource,
- struct rlimit *, rlim);
+ struct rlimit *, rlim)
#else
/* we have to handle old style getrlimit() */
# define __NR___syscall_getrlimit __NR_getrlimit
-static inline
-_syscall2(int, __syscall_getrlimit, int, resource, struct rlimit *, rlim);
+static __always_inline
+_syscall2(int, __syscall_getrlimit, int, resource, struct rlimit *, rlim)
int getrlimit(__rlimit_resource_t resource, struct rlimit *rlimits)
{
diff --git a/libc/sysdeps/linux/common/getrlimit64.c b/libc/sysdeps/linux/common/getrlimit64.c
index ca7aa7310..14335778c 100644
--- a/libc/sysdeps/linux/common/getrlimit64.c
+++ b/libc/sysdeps/linux/common/getrlimit64.c
@@ -26,7 +26,7 @@
#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 32
-libc_hidden_proto(getrlimit)
+/* libc_hidden_proto(getrlimit) */
/* Put the soft and hard limits for RESOURCE in *RLIMITS.
Returns 0 if successful, -1 if not (and sets errno). */
diff --git a/libc/sysdeps/linux/common/getrusage.c b/libc/sysdeps/linux/common/getrusage.c
index 03f524dff..3e719f294 100644
--- a/libc/sysdeps/linux/common/getrusage.c
+++ b/libc/sysdeps/linux/common/getrusage.c
@@ -10,4 +10,4 @@
#include <sys/syscall.h>
#include <unistd.h>
#include <wait.h>
-_syscall2(int, getrusage, __rusage_who_t, who, struct rusage *, usage);
+_syscall2(int, getrusage, __rusage_who_t, who, struct rusage *, usage)
diff --git a/libc/sysdeps/linux/common/getsid.c b/libc/sysdeps/linux/common/getsid.c
index 9743a976f..1b22451f8 100644
--- a/libc/sysdeps/linux/common/getsid.c
+++ b/libc/sysdeps/linux/common/getsid.c
@@ -11,10 +11,10 @@
#include <unistd.h>
#ifdef __USE_XOPEN_EXTENDED
-libc_hidden_proto(getsid)
+/* libc_hidden_proto(getsid) */
#define __NR___syscall_getsid __NR_getsid
-static __inline__ _syscall1(__kernel_pid_t, __syscall_getsid, __kernel_pid_t, pid);
+static __inline__ _syscall1(__kernel_pid_t, __syscall_getsid, __kernel_pid_t, pid)
pid_t getsid(pid_t pid)
{
diff --git a/libc/sysdeps/linux/common/gettimeofday.c b/libc/sysdeps/linux/common/gettimeofday.c
index 697b2dd6c..663cc3b50 100644
--- a/libc/sysdeps/linux/common/gettimeofday.c
+++ b/libc/sysdeps/linux/common/gettimeofday.c
@@ -10,10 +10,10 @@
#include <sys/syscall.h>
#include <sys/time.h>
-libc_hidden_proto(gettimeofday)
+/* libc_hidden_proto(gettimeofday) */
#ifdef __USE_BSD
-_syscall2(int, gettimeofday, struct timeval *, tv, struct timezone *, tz);
+_syscall2(int, gettimeofday, struct timeval *, tv, struct timezone *, tz)
#else
-_syscall2(int, gettimeofday, struct timeval *, tv, void *, tz);
+_syscall2(int, gettimeofday, struct timeval *, tv, void *, tz)
#endif
libc_hidden_def(gettimeofday)
diff --git a/libc/sysdeps/linux/common/getuid.c b/libc/sysdeps/linux/common/getuid.c
index 7d5a02bc6..ab0ea150b 100644
--- a/libc/sysdeps/linux/common/getuid.c
+++ b/libc/sysdeps/linux/common/getuid.c
@@ -19,6 +19,6 @@
# define __NR_getuid __NR_getuid32
#endif
-libc_hidden_proto(getuid)
-_syscall0(uid_t, getuid);
+/* libc_hidden_proto(getuid) */
+_syscall0(uid_t, getuid)
libc_hidden_def(getuid)
diff --git a/libc/sysdeps/linux/common/init_module.c b/libc/sysdeps/linux/common/init_module.c
index 45f1fff23..8a6e94199 100644
--- a/libc/sysdeps/linux/common/init_module.c
+++ b/libc/sysdeps/linux/common/init_module.c
@@ -14,7 +14,7 @@ int init_module(void *first, void *second, void *third, void *fourth, void *fift
* (for 2.2 and 2.4 kernels). Use the greatest common denominator,
* and let the kernel cope with whatever it gets. It's good at that. */
_syscall5(int, init_module, void *, first, void *, second, void *, third,
- void *, fourth, void *, fifth);
+ void *, fourth, void *, fifth)
#else
int init_module(void *first, void *second, void *third, void *fourth, void *fifth)
{
diff --git a/libc/sysdeps/linux/common/inotify.c b/libc/sysdeps/linux/common/inotify.c
index 31bfb0c3b..e5a612076 100644
--- a/libc/sysdeps/linux/common/inotify.c
+++ b/libc/sysdeps/linux/common/inotify.c
@@ -12,13 +12,13 @@
#include <sys/inotify.h>
#ifdef __NR_inotify_init
-_syscall0(int, inotify_init);
+_syscall0(int, inotify_init)
#endif
#ifdef __NR_inotify_add_watch
-_syscall3(int, inotify_add_watch, int, fd, const char *, path, uint32_t, mask);
+_syscall3(int, inotify_add_watch, int, fd, const char *, path, uint32_t, mask)
#endif
#ifdef __NR_inotify_rm_watch
-_syscall2(int, inotify_rm_watch, int, fd, uint32_t, wd);
+_syscall2(int, inotify_rm_watch, int, fd, uint32_t, wd)
#endif
diff --git a/libc/sysdeps/linux/common/ioperm.c b/libc/sysdeps/linux/common/ioperm.c
index 880842d97..64fc6470f 100644
--- a/libc/sysdeps/linux/common/ioperm.c
+++ b/libc/sysdeps/linux/common/ioperm.c
@@ -8,8 +8,13 @@
*/
#include <sys/syscall.h>
+
#if defined __ARCH_USE_MMU__ && defined __NR_ioperm
+
/* psm: can't #include <sys/io.h>, some archs miss it */
extern int ioperm(unsigned long __from, unsigned long __num, int __turn_on) __THROW;
-_syscall3(int, ioperm, unsigned long, from, unsigned long, num, int, turn_on);
+libc_hidden_proto(ioperm)
+
+_syscall3(int, ioperm, unsigned long, from, unsigned long, num, int, turn_on)
+
#endif
diff --git a/libc/sysdeps/linux/common/iopl.c b/libc/sysdeps/linux/common/iopl.c
index 510e1a4f6..4d9c4587f 100644
--- a/libc/sysdeps/linux/common/iopl.c
+++ b/libc/sysdeps/linux/common/iopl.c
@@ -11,5 +11,5 @@
#if defined __ARCH_USE_MMU__ && defined __NR_iopl
/* psm: can't #include <sys/io.h>, some archs miss it */
extern int iopl(int __level) __THROW;
-_syscall1(int, iopl, int, level);
+_syscall1(int, iopl, int, level)
#endif
diff --git a/libc/sysdeps/linux/common/kill.c b/libc/sysdeps/linux/common/kill.c
index c7729113b..3578673b8 100644
--- a/libc/sysdeps/linux/common/kill.c
+++ b/libc/sysdeps/linux/common/kill.c
@@ -10,10 +10,10 @@
#include <sys/syscall.h>
#include <signal.h>
-libc_hidden_proto(kill)
+/* libc_hidden_proto(kill) */
#define __NR___syscall_kill __NR_kill
-static __inline__ _syscall2(int, __syscall_kill, __kernel_pid_t, pid, int, sig);
+static __inline__ _syscall2(int, __syscall_kill, __kernel_pid_t, pid, int, sig)
int kill(pid_t pid, int sig)
{
diff --git a/libc/sysdeps/linux/common/klogctl.c b/libc/sysdeps/linux/common/klogctl.c
index e378e3e67..58467dfa3 100644
--- a/libc/sysdeps/linux/common/klogctl.c
+++ b/libc/sysdeps/linux/common/klogctl.c
@@ -11,7 +11,7 @@
#include <unistd.h>
#include <sys/klog.h>
#define __NR__syslog __NR_syslog
-static __inline__ _syscall3(int, _syslog, int, type, char *, buf, int, len);
+static __inline__ _syscall3(int, _syslog, int, type, char *, buf, int, len)
int klogctl(int type, char *buf, int len)
{
return (_syslog(type, buf, len));
diff --git a/libc/sysdeps/linux/common/lchown.c b/libc/sysdeps/linux/common/lchown.c
index 08c686fd6..c0f8ce763 100644
--- a/libc/sysdeps/linux/common/lchown.c
+++ b/libc/sysdeps/linux/common/lchown.c
@@ -17,13 +17,13 @@
# define __NR_lchown __NR_lchown32
# endif
-_syscall3(int, lchown, const char *, path, uid_t, owner, gid_t, group);
+_syscall3(int, lchown, const char *, path, uid_t, owner, gid_t, group)
#else
# define __NR___syscall_lchown __NR_lchown
static __inline__ _syscall3(int, __syscall_lchown, const char *, path,
- __kernel_uid_t, owner, __kernel_gid_t, group);
+ __kernel_uid_t, owner, __kernel_gid_t, group)
int lchown(const char *path, uid_t owner, gid_t group)
{
diff --git a/libc/sysdeps/linux/common/link.c b/libc/sysdeps/linux/common/link.c
index a012cc2c3..b5e5536d5 100644
--- a/libc/sysdeps/linux/common/link.c
+++ b/libc/sysdeps/linux/common/link.c
@@ -9,4 +9,4 @@
#include <sys/syscall.h>
#include <unistd.h>
-_syscall2(int, link, const char *, oldpath, const char *, newpath);
+_syscall2(int, link, const char *, oldpath, const char *, newpath)
diff --git a/libc/sysdeps/linux/common/llseek.c b/libc/sysdeps/linux/common/llseek.c
index 35365d8ae..1879464f7 100644
--- a/libc/sysdeps/linux/common/llseek.c
+++ b/libc/sysdeps/linux/common/llseek.c
@@ -19,7 +19,7 @@ extern __typeof(lseek64) __libc_lseek64;
# 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);
+ off_t, offset_lo, loff_t *, result, int, whence)
# endif
loff_t __libc_lseek64(int fd, loff_t offset, int whence)
@@ -30,14 +30,14 @@ loff_t __libc_lseek64(int fd, loff_t offset, int whence)
}
#else
extern __typeof(lseek) __libc_lseek;
-libc_hidden_proto(__libc_lseek)
+/* 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));
}
#endif
-libc_hidden_proto(lseek64)
+/* libc_hidden_proto(lseek64) */
weak_alias(__libc_lseek64,lseek64)
libc_hidden_weak(lseek64)
-//strong_alias(__libc_lseek64,_llseek)
+/*strong_alias(__libc_lseek64,_llseek) */
diff --git a/libc/sysdeps/linux/common/longjmp.c b/libc/sysdeps/linux/common/longjmp.c
index a54f01f48..672754a73 100644
--- a/libc/sysdeps/linux/common/longjmp.c
+++ b/libc/sysdeps/linux/common/longjmp.c
@@ -20,7 +20,7 @@
#include <setjmp.h>
#include <signal.h>
-libc_hidden_proto(sigprocmask)
+/* libc_hidden_proto(sigprocmask) */
extern void __longjmp (__jmp_buf __env, int __val) attribute_noreturn;
libc_hidden_proto(__longjmp)
diff --git a/libc/sysdeps/linux/common/lseek.c b/libc/sysdeps/linux/common/lseek.c
index 5ba5ad9c8..ee49c9f25 100644
--- a/libc/sysdeps/linux/common/lseek.c
+++ b/libc/sysdeps/linux/common/lseek.c
@@ -15,10 +15,11 @@ libc_hidden_proto(__libc_lseek)
#ifdef __NR_lseek
#define __NR___libc_lseek __NR_lseek
-_syscall3(__off_t, __libc_lseek, int, fildes, __off_t, offset, int, whence);
+_syscall3(__off_t, __libc_lseek, int, fildes, __off_t, offset, int, whence)
#else
extern __typeof(lseek64) __libc_lseek64;
libc_hidden_proto(__libc_lseek64)
+
__off_t __libc_lseek(int fildes, __off_t offset, int whence)
{
return __libc_lseek64(fildes, offset, whence);
@@ -26,6 +27,6 @@ __off_t __libc_lseek(int fildes, __off_t offset, int whence)
#endif
libc_hidden_def(__libc_lseek)
-libc_hidden_proto(lseek)
+/* libc_hidden_proto(lseek) */
weak_alias(__libc_lseek,lseek)
libc_hidden_weak(lseek)
diff --git a/libc/sysdeps/linux/common/lstat.c b/libc/sysdeps/linux/common/lstat.c
index 4707dfc7c..1adbdcf87 100644
--- a/libc/sysdeps/linux/common/lstat.c
+++ b/libc/sysdeps/linux/common/lstat.c
@@ -18,11 +18,11 @@
#undef lstat64
-libc_hidden_proto(lstat)
+/* libc_hidden_proto(lstat) */
#define __NR___syscall_lstat __NR_lstat
static __inline__ _syscall2(int, __syscall_lstat,
- const char *, file_name, struct kernel_stat *, buf);
+ const char *, file_name, struct kernel_stat *, buf)
int lstat(const char *file_name, struct stat *buf)
{
@@ -39,7 +39,7 @@ libc_hidden_def(lstat)
#if ! defined __NR_lstat64 && defined __UCLIBC_HAS_LFS__
extern __typeof(lstat) lstat64;
-libc_hidden_proto(lstat64)
+/* libc_hidden_proto(lstat64) */
strong_alias(lstat,lstat64)
libc_hidden_def(lstat64)
#endif
diff --git a/libc/sysdeps/linux/common/lstat64.c b/libc/sysdeps/linux/common/lstat64.c
index 6777dff6a..8d7ce1921 100644
--- a/libc/sysdeps/linux/common/lstat64.c
+++ b/libc/sysdeps/linux/common/lstat64.c
@@ -14,11 +14,11 @@
# include <sys/stat.h>
# include "xstatconv.h"
-libc_hidden_proto(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);
+ struct kernel_stat64 *, buf)
int lstat64(const char *file_name, struct stat64 *buf)
{
diff --git a/libc/sysdeps/linux/common/madvise.c b/libc/sysdeps/linux/common/madvise.c
index 627bcdc59..e953d7b92 100644
--- a/libc/sysdeps/linux/common/madvise.c
+++ b/libc/sysdeps/linux/common/madvise.c
@@ -10,5 +10,5 @@
#include <sys/syscall.h>
#include <sys/mman.h>
#if defined __NR_madvise && defined __USE_BSD
-_syscall3(int, madvise, void *, __addr, size_t, __len, int, __advice);
+_syscall3(int, madvise, void *, __addr, size_t, __len, int, __advice)
#endif
diff --git a/libc/sysdeps/linux/common/mincore.c b/libc/sysdeps/linux/common/mincore.c
index 1dc9a9a1a..f1f3557c6 100644
--- a/libc/sysdeps/linux/common/mincore.c
+++ b/libc/sysdeps/linux/common/mincore.c
@@ -11,5 +11,5 @@
#if defined __NR_mincore && (defined __USE_BSD || defined __USE_SVID)
#include <unistd.h>
#include <sys/mman.h>
-_syscall3(int, mincore, void *, start, size_t, length, unsigned char *, vec);
+_syscall3(int, mincore, void *, start, size_t, length, unsigned char *, vec)
#endif
diff --git a/libc/sysdeps/linux/common/mkdir.c b/libc/sysdeps/linux/common/mkdir.c
index ab3cbfee5..73234f287 100644
--- a/libc/sysdeps/linux/common/mkdir.c
+++ b/libc/sysdeps/linux/common/mkdir.c
@@ -10,11 +10,11 @@
#include <sys/syscall.h>
#include <sys/stat.h>
-libc_hidden_proto(mkdir)
+/* libc_hidden_proto(mkdir) */
#define __NR___syscall_mkdir __NR_mkdir
static __inline__ _syscall2(int, __syscall_mkdir, const char *, pathname,
- __kernel_mode_t, mode);
+ __kernel_mode_t, mode)
int mkdir(const char *pathname, mode_t mode)
{
diff --git a/libc/sysdeps/linux/common/mkfifo.c b/libc/sysdeps/linux/common/mkfifo.c
index cbde71e04..f6f03a746 100644
--- a/libc/sysdeps/linux/common/mkfifo.c
+++ b/libc/sysdeps/linux/common/mkfifo.c
@@ -21,7 +21,7 @@
#include <sys/stat.h>
#include <sys/types.h>
-libc_hidden_proto(mknod)
+/* libc_hidden_proto(mknod) */
/* Create a named pipe (FIFO) named PATH with protections MODE. */
int
diff --git a/libc/sysdeps/linux/common/mlock.c b/libc/sysdeps/linux/common/mlock.c
index 55b77a5d5..12120d8e5 100644
--- a/libc/sysdeps/linux/common/mlock.c
+++ b/libc/sysdeps/linux/common/mlock.c
@@ -10,5 +10,5 @@
#include <sys/syscall.h>
#include <sys/mman.h>
#if defined __ARCH_USE_MMU__ && defined __NR_mlock
-_syscall2(int, mlock, const void *, addr, size_t, len);
+_syscall2(int, mlock, const void *, addr, size_t, len)
#endif
diff --git a/libc/sysdeps/linux/common/mlockall.c b/libc/sysdeps/linux/common/mlockall.c
index d75e30fe7..99f72018a 100644
--- a/libc/sysdeps/linux/common/mlockall.c
+++ b/libc/sysdeps/linux/common/mlockall.c
@@ -10,5 +10,5 @@
#include <sys/syscall.h>
#include <sys/mman.h>
#if defined __ARCH_USE_MMU__ && defined __NR_mlockall
-_syscall1(int, mlockall, int, flags);
+_syscall1(int, mlockall, int, flags)
#endif
diff --git a/libc/sysdeps/linux/common/mmap.c b/libc/sysdeps/linux/common/mmap.c
index 7645565a2..d5b0b85df 100644
--- a/libc/sysdeps/linux/common/mmap.c
+++ b/libc/sysdeps/linux/common/mmap.c
@@ -14,17 +14,17 @@
#ifdef __NR_mmap
-libc_hidden_proto(mmap)
+/* libc_hidden_proto(mmap) */
#ifdef __UCLIBC_MMAP_HAS_6_ARGS__
_syscall6(void *, mmap, void *, start, size_t, length,
- int, prot, int, flags, int, fd, off_t, offset);
+ int, prot, int, flags, int, fd, off_t, offset)
#else
# define __NR__mmap __NR_mmap
-static __inline__ _syscall1(__ptr_t, _mmap, unsigned long *, buffer);
+static __inline__ _syscall1(__ptr_t, _mmap, unsigned long *, buffer)
__ptr_t mmap(__ptr_t addr, size_t len, int prot,
int flags, int fd, __off_t offset)
{
@@ -45,11 +45,11 @@ libc_hidden_def(mmap)
#elif defined(__NR_mmap2)
-libc_hidden_proto(mmap)
+/* 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);
+ size_t, len, int, prot, int, flags, int, fd, off_t, offset)
/* Some architectures always use 12 as page shift for mmap2() eventhough the
* real PAGE_SHIFT != 12. Other architectures use the same value as
diff --git a/libc/sysdeps/linux/common/mmap64.c b/libc/sysdeps/linux/common/mmap64.c
index a1aa19fb8..2b10e5710 100644
--- a/libc/sysdeps/linux/common/mmap64.c
+++ b/libc/sysdeps/linux/common/mmap64.c
@@ -15,7 +15,7 @@
#include <sys/syscall.h>
#include <bits/uClibc_page.h>
-libc_hidden_proto(mmap)
+/* libc_hidden_proto(mmap) */
# if !defined __NR_mmap2 || !defined _syscall6
@@ -41,8 +41,9 @@ __ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t
# else
# 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);
+static __inline__ _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr,
+ size_t, len, int, prot, int, flags, int, fd,
+ off_t, offset)
/* Some architectures always use 12 as page shift for mmap2() eventhough the
* real PAGE_SHIFT != 12. Other architectures use the same value as
diff --git a/libc/sysdeps/linux/common/modify_ldt.c b/libc/sysdeps/linux/common/modify_ldt.c
index d5f0105dd..d70bd40b0 100644
--- a/libc/sysdeps/linux/common/modify_ldt.c
+++ b/libc/sysdeps/linux/common/modify_ldt.c
@@ -11,5 +11,5 @@
int modify_ldt (int func, void *ptr, unsigned long bytecount);
#ifdef __NR_modify_ldt
-_syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount);
+_syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount)
#endif
diff --git a/libc/sysdeps/linux/common/mount.c b/libc/sysdeps/linux/common/mount.c
index a5a2c7fec..39e5db1c2 100644
--- a/libc/sysdeps/linux/common/mount.c
+++ b/libc/sysdeps/linux/common/mount.c
@@ -11,4 +11,4 @@
#include <sys/mount.h>
_syscall5(int, mount, const char *, specialfile, const char *, dir,
const char *, filesystemtype, unsigned long, rwflag,
- const void *, data);
+ const void *, data)
diff --git a/libc/sysdeps/linux/common/mprotect.c b/libc/sysdeps/linux/common/mprotect.c
index 7122f0f2f..a0e7610fd 100644
--- a/libc/sysdeps/linux/common/mprotect.c
+++ b/libc/sysdeps/linux/common/mprotect.c
@@ -11,5 +11,5 @@
#include <sys/mman.h>
#if defined __ARCH_USE_MMU__ && defined __NR_mprotect
-_syscall3(int, mprotect, void *, addr, size_t, len, int, prot);
+_syscall3(int, mprotect, void *, addr, size_t, len, int, prot)
#endif
diff --git a/libc/sysdeps/linux/common/mremap.c b/libc/sysdeps/linux/common/mremap.c
index 04548d5ec..0295a25da 100644
--- a/libc/sysdeps/linux/common/mremap.c
+++ b/libc/sysdeps/linux/common/mremap.c
@@ -12,15 +12,17 @@
#ifdef __NR_mremap
+/* Why do we do this?! */
+
#define mremap _hidemremap
#include <sys/mman.h>
#undef mremap
void *mremap(void *, size_t, size_t, int, void *);
-
libc_hidden_proto(mremap)
+
_syscall5(void *, mremap, void *, old_address, size_t, old_size, size_t,
- new_size, int, may_move, void *, new_address);
+ new_size, int, may_move, void *, new_address)
libc_hidden_def(mremap)
#endif
diff --git a/libc/sysdeps/linux/common/munlock.c b/libc/sysdeps/linux/common/munlock.c
index e901cc00a..07f93760f 100644
--- a/libc/sysdeps/linux/common/munlock.c
+++ b/libc/sysdeps/linux/common/munlock.c
@@ -10,5 +10,5 @@
#include <sys/syscall.h>
#include <sys/mman.h>
#if defined __ARCH_USE_MMU__ && defined __NR_munlock
-_syscall2(int, munlock, const void *, addr, size_t, len);
+_syscall2(int, munlock, const void *, addr, size_t, len)
#endif
diff --git a/libc/sysdeps/linux/common/munlockall.c b/libc/sysdeps/linux/common/munlockall.c
index 39507715a..cc1526451 100644
--- a/libc/sysdeps/linux/common/munlockall.c
+++ b/libc/sysdeps/linux/common/munlockall.c
@@ -12,5 +12,5 @@
#if defined __NR_munlockall && defined __ARCH_USE_MMU__
#include <sys/mman.h>
-_syscall0(int, munlockall);
+_syscall0(int, munlockall)
#endif
diff --git a/libc/sysdeps/linux/common/munmap.c b/libc/sysdeps/linux/common/munmap.c
index 5c948abfd..37b939993 100644
--- a/libc/sysdeps/linux/common/munmap.c
+++ b/libc/sysdeps/linux/common/munmap.c
@@ -11,7 +11,7 @@
#include <unistd.h>
#include <sys/mman.h>
-libc_hidden_proto(munmap)
+/* libc_hidden_proto(munmap) */
-_syscall2(int, munmap, void *, start, size_t, length);
+_syscall2(int, munmap, void *, start, size_t, length)
libc_hidden_def(munmap)
diff --git a/libc/sysdeps/linux/common/nice.c b/libc/sysdeps/linux/common/nice.c
index 8ced60915..51997ca13 100644
--- a/libc/sysdeps/linux/common/nice.c
+++ b/libc/sysdeps/linux/common/nice.c
@@ -12,18 +12,18 @@
#include <unistd.h>
#include <sys/resource.h>
-libc_hidden_proto(getpriority)
+/* libc_hidden_proto(getpriority) */
#ifdef __NR_nice
# define __NR___syscall_nice __NR_nice
-static __inline__ _syscall1(int, __syscall_nice, int, incr);
+static __inline__ _syscall1(int, __syscall_nice, int, incr)
#else
# include <limits.h>
-libc_hidden_proto(setpriority)
+/* libc_hidden_proto(setpriority) */
static __inline__ int int_add_no_wrap(int a, int b)
{
diff --git a/libc/sysdeps/linux/common/ntp_gettime.c b/libc/sysdeps/linux/common/ntp_gettime.c
index f32e05444..ff933fed4 100644
--- a/libc/sysdeps/linux/common/ntp_gettime.c
+++ b/libc/sysdeps/linux/common/ntp_gettime.c
@@ -18,7 +18,7 @@
#include <sys/timex.h>
-libc_hidden_proto(adjtimex)
+/* libc_hidden_proto(adjtimex) */
int ntp_gettime(struct ntptimeval *ntv)
{
diff --git a/libc/sysdeps/linux/common/open.c b/libc/sysdeps/linux/common/open.c
index 7c0566b46..a39093bd1 100644
--- a/libc/sysdeps/linux/common/open.c
+++ b/libc/sysdeps/linux/common/open.c
@@ -19,7 +19,7 @@ extern __typeof(creat) __libc_creat;
#define __NR___syscall_open __NR_open
static __inline__ _syscall3(int, __syscall_open, const char *, file,
- int, flags, __kernel_mode_t, mode);
+ int, flags, __kernel_mode_t, mode)
libc_hidden_proto(__libc_open)
int __libc_open(const char *file, int oflag, ...)
@@ -37,7 +37,7 @@ int __libc_open(const char *file, int oflag, ...)
}
libc_hidden_def(__libc_open)
-libc_hidden_proto(open)
+/* libc_hidden_proto(open) */
weak_alias(__libc_open,open)
libc_hidden_weak(open)
diff --git a/libc/sysdeps/linux/common/open64.c b/libc/sysdeps/linux/common/open64.c
index 3f2ea344e..2d8a3c692 100644
--- a/libc/sysdeps/linux/common/open64.c
+++ b/libc/sysdeps/linux/common/open64.c
@@ -54,7 +54,7 @@ int __libc_open64 (const char *file, int oflag, ...)
}
libc_hidden_def(__libc_open64)
-libc_hidden_proto(open64)
+/* libc_hidden_proto(open64) */
weak_alias(__libc_open64,open64)
libc_hidden_weak(open64)
#endif /* __UCLIBC_HAS_LFS__ */
diff --git a/libc/sysdeps/linux/common/personality.c b/libc/sysdeps/linux/common/personality.c
index 149fb5f08..fa304de09 100644
--- a/libc/sysdeps/linux/common/personality.c
+++ b/libc/sysdeps/linux/common/personality.c
@@ -9,4 +9,4 @@
#include <sys/syscall.h>
#include <sys/personality.h>
-_syscall1(int, personality, unsigned long int, __persona);
+_syscall1(int, personality, unsigned long int, __persona)
diff --git a/libc/sysdeps/linux/common/pipe.c b/libc/sysdeps/linux/common/pipe.c
index 789b23c40..02b173853 100644
--- a/libc/sysdeps/linux/common/pipe.c
+++ b/libc/sysdeps/linux/common/pipe.c
@@ -10,7 +10,7 @@
#include <sys/syscall.h>
#include <unistd.h>
-libc_hidden_proto(pipe)
+/* libc_hidden_proto(pipe) */
-_syscall1(int, pipe, int *, filedes);
+_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 154a37e2d..3e9705903 100644
--- a/libc/sysdeps/linux/common/pivot_root.c
+++ b/libc/sysdeps/linux/common/pivot_root.c
@@ -11,7 +11,7 @@
int pivot_root(const char *new_root, const char *put_old);
#ifdef __NR_pivot_root
-_syscall2(int, pivot_root, const char *, new_root, const char *, put_old);
+_syscall2(int, pivot_root, const char *, new_root, const char *, put_old)
#else
int pivot_root(const char *new_root, const char *put_old)
{
diff --git a/libc/sysdeps/linux/common/posix_fadvise.c b/libc/sysdeps/linux/common/posix_fadvise.c
index 95aa4d27b..a3f9c7653 100644
--- a/libc/sysdeps/linux/common/posix_fadvise.c
+++ b/libc/sysdeps/linux/common/posix_fadvise.c
@@ -36,7 +36,7 @@ int posix_fadvise(int fd, off_t offset, off_t len, int advice)
static __inline__ int syscall_posix_fadvise(int fd, off_t offset1, off_t offset2, off_t len, int advice);
#define __NR_syscall_posix_fadvise __NR_fadvise64
_syscall5(int, syscall_posix_fadvise, int, fd, off_t, offset1,
- off_t, offset2, off_t, len, int, advice);
+ off_t, offset2, off_t, len, int, advice)
int posix_fadvise(int fd, off_t offset, off_t len, int advice)
{
diff --git a/libc/sysdeps/linux/common/posix_fadvise64.c b/libc/sysdeps/linux/common/posix_fadvise64.c
index 03e25ed93..6b1325db3 100644
--- a/libc/sysdeps/linux/common/posix_fadvise64.c
+++ b/libc/sysdeps/linux/common/posix_fadvise64.c
@@ -25,7 +25,7 @@
#define __NR_posix_fadvise64 __NR_fadvise64_64
-#ifdef INTERNAL_SYSCALL
+#if defined INTERNAL_SYSCALL && ! defined __TARGET_powerpc__
int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
{
if (len != (off_t) len)
@@ -43,7 +43,7 @@ int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
static __inline__ int syscall_posix_fadvise(int fd, off_t offset1, off_t offset2, off_t len, int advice);
#define __NR_syscall_posix_fadvise64 __NR_posix_fadvise64
_syscall4(int, syscall_posix_fadvise64, int, fd, __off64_t, offset,
- __off64_t, len, int, advice);
+ __off64_t, len, int, advice)
int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
{
int ret = syscall_posix_fadvise64(fd, offset, len, advice);
@@ -56,7 +56,7 @@ int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
/* 32 bit implementation is kind of a pita */
#elif __WORDSIZE == 32
-#ifdef INTERNAL_SYSCALL
+#if defined INTERNAL_SYSCALL && ! defined __TARGET_powerpc__
int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
{
INTERNAL_SYSCALL_DECL (err);
@@ -73,7 +73,7 @@ int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
static __inline__ _syscall6(int, __syscall_fadvise64_64, int, fd,
unsigned long, high_offset, unsigned long, low_offset,
unsigned long, high_len, unsigned long, low_len,
- int, advice);
+ int, advice)
int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
{
int ret = __syscall_fadvise64_64(fd,
diff --git a/libc/sysdeps/linux/common/ppoll.c b/libc/sysdeps/linux/common/ppoll.c
index 90b3517b2..edcb1dc66 100644
--- a/libc/sysdeps/linux/common/ppoll.c
+++ b/libc/sysdeps/linux/common/ppoll.c
@@ -22,13 +22,13 @@
#if defined __NR_ppoll && defined __UCLIBC_LINUX_SPECIFIC__
-libc_hidden_proto(ppoll)
+/* libc_hidden_proto(ppoll) */
# define __NR___libc_ppoll __NR_ppoll
-static inline
+static __always_inline
_syscall4(int, __libc_ppoll, struct pollfd *, fds,
nfds_t, nfds, const struct timespec *, timeout,
- const __sigset_t *, sigmask);
+ const __sigset_t *, sigmask)
int
ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
diff --git a/libc/sysdeps/linux/common/prctl.c b/libc/sysdeps/linux/common/prctl.c
index 485386727..a6764c532 100644
--- a/libc/sysdeps/linux/common/prctl.c
+++ b/libc/sysdeps/linux/common/prctl.c
@@ -13,5 +13,5 @@
#ifdef __NR_prctl
extern int prctl (int, long, long, long, long);
-_syscall5(int, prctl, int, option, long, arg2, long, arg3, long, arg4, long, arg5);
+_syscall5(int, prctl, int, option, long, arg2, long, arg3, long, arg4, long, arg5)
#endif
diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c
index b2aaa2a1d..cb1d83820 100644
--- a/libc/sysdeps/linux/common/pread_write.c
+++ b/libc/sysdeps/linux/common/pread_write.c
@@ -31,7 +31,7 @@ extern __typeof(pwrite64) __libc_pwrite64;
# define __NR___syscall_pread __NR_pread
static __inline__ _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
- size_t, count, off_t, offset_hi, off_t, offset_lo);
+ size_t, count, off_t, offset_hi, off_t, offset_lo)
ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
{
@@ -55,7 +55,7 @@ weak_alias(__libc_pread64,pread64)
# define __NR___syscall_pwrite __NR_pwrite
static __inline__ _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
- size_t, count, off_t, offset_hi, off_t, offset_lo);
+ size_t, count, off_t, offset_hi, off_t, offset_lo)
ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
{
@@ -75,9 +75,9 @@ weak_alias(__libc_pwrite64,pwrite64)
#endif /* __NR_pwrite */
#if ! defined __NR_pread || ! defined __NR_pwrite
-libc_hidden_proto(read)
-libc_hidden_proto(write)
-libc_hidden_proto(lseek)
+/* libc_hidden_proto(read) */
+/* libc_hidden_proto(write) */
+/* libc_hidden_proto(lseek) */
static ssize_t __fake_pread_write(int fd, void *buf,
size_t count, off_t offset, int do_pwrite)
@@ -117,7 +117,7 @@ static ssize_t __fake_pread_write(int fd, void *buf,
}
# ifdef __UCLIBC_HAS_LFS__
-libc_hidden_proto(lseek64)
+/* libc_hidden_proto(lseek64) */
static ssize_t __fake_pread_write64(int fd, void *buf,
size_t count, off64_t offset, int do_pwrite)
diff --git a/libc/sysdeps/linux/common/ptrace.c b/libc/sysdeps/linux/common/ptrace.c
index 4f11260b8..8b8ebf086 100644
--- a/libc/sysdeps/linux/common/ptrace.c
+++ b/libc/sysdeps/linux/common/ptrace.c
@@ -13,7 +13,7 @@
#define __NR___syscall_ptrace __NR_ptrace
static __inline__ _syscall4(long, __syscall_ptrace, enum __ptrace_request, request,
- __kernel_pid_t, pid, void*, addr, void*, data);
+ __kernel_pid_t, pid, void*, addr, void*, data)
long int
ptrace (enum __ptrace_request request, ...)
diff --git a/libc/sysdeps/linux/common/query_module.c b/libc/sysdeps/linux/common/query_module.c
index b0b72dea9..0f3d4700c 100644
--- a/libc/sysdeps/linux/common/query_module.c
+++ b/libc/sysdeps/linux/common/query_module.c
@@ -12,8 +12,8 @@ int query_module(const char *name attribute_unused, int which attribute_unused,
void *buf attribute_unused, size_t bufsize attribute_unused, size_t * ret attribute_unused);
#ifdef __NR_query_module
_syscall5(int, query_module, const char *, name, int, which,
- void *, buf, size_t, bufsize, size_t *, ret);
-#else
+ void *, buf, size_t, bufsize, size_t *, ret)
+#elif defined __UCLIBC_HAS_STUBS__
int query_module(const char *name attribute_unused, int which attribute_unused,
void *buf attribute_unused, size_t bufsize attribute_unused, size_t * ret attribute_unused)
{
diff --git a/libc/sysdeps/linux/common/quotactl.c b/libc/sysdeps/linux/common/quotactl.c
index cb044a4e8..edd509256 100644
--- a/libc/sysdeps/linux/common/quotactl.c
+++ b/libc/sysdeps/linux/common/quotactl.c
@@ -12,5 +12,5 @@
#if defined __USE_BSD
#include <sys/quota.h>
_syscall4(int, quotactl, int, cmd, const char *, special,
- int, id, caddr_t, addr);
+ int, id, caddr_t, addr)
#endif
diff --git a/libc/sysdeps/linux/common/read.c b/libc/sysdeps/linux/common/read.c
index f837e9f07..cfa857319 100644
--- a/libc/sysdeps/linux/common/read.c
+++ b/libc/sysdeps/linux/common/read.c
@@ -12,7 +12,7 @@
extern __typeof(read) __libc_read;
#define __NR___libc_read __NR_read
-_syscall3(ssize_t, __libc_read, int, fd, __ptr_t, buf, size_t, count);
-libc_hidden_proto(read)
+_syscall3(ssize_t, __libc_read, int, fd, __ptr_t, buf, size_t, count)
+/* libc_hidden_proto(read) */
weak_alias(__libc_read,read)
libc_hidden_weak(read)
diff --git a/libc/sysdeps/linux/common/readahead.c b/libc/sysdeps/linux/common/readahead.c
index 94e2481cf..cd40352d5 100644
--- a/libc/sysdeps/linux/common/readahead.c
+++ b/libc/sysdeps/linux/common/readahead.c
@@ -34,7 +34,7 @@
# if __WORDSIZE == 64
static __inline__ _syscall3(ssize_t, __readahead, int, fd,
- off_t, offset, size_t, count);
+ off_t, offset, size_t, count)
ssize_t readahead(int fd, off_t offset, size_t count)
{
@@ -44,7 +44,7 @@ ssize_t readahead(int fd, off_t offset, size_t count)
# else
static __inline__ _syscall4(ssize_t, __readahead, int, fd,
- off_t, high_offset, off_t, low_offset, size_t, count);
+ off_t, high_offset, off_t, low_offset, size_t, count)
ssize_t readahead(int fd, off64_t offset, size_t count)
{
diff --git a/libc/sysdeps/linux/common/readlink.c b/libc/sysdeps/linux/common/readlink.c
index d68391302..36e0f8942 100644
--- a/libc/sysdeps/linux/common/readlink.c
+++ b/libc/sysdeps/linux/common/readlink.c
@@ -10,6 +10,6 @@
#include <sys/syscall.h>
#include <unistd.h>
-libc_hidden_proto(readlink)
-_syscall3(ssize_t, readlink, const char *, path, char *, buf, size_t, bufsiz);
+/* libc_hidden_proto(readlink) */
+_syscall3(ssize_t, readlink, const char *, path, char *, buf, size_t, bufsiz)
libc_hidden_def(readlink)
diff --git a/libc/sysdeps/linux/common/reboot.c b/libc/sysdeps/linux/common/reboot.c
index 9ce57b1ec..ec271b179 100644
--- a/libc/sysdeps/linux/common/reboot.c
+++ b/libc/sysdeps/linux/common/reboot.c
@@ -10,7 +10,7 @@
#include <sys/syscall.h>
#include <sys/reboot.h>
#define __NR__reboot __NR_reboot
-static __inline__ _syscall3(int, _reboot, int, magic, int, magic2, int, flag);
+static __inline__ _syscall3(int, _reboot, int, magic, int, magic2, int, flag)
int reboot(int flag)
{
return (_reboot((int) 0xfee1dead, 672274793, flag));
diff --git a/libc/sysdeps/linux/common/remap_file_pages.c b/libc/sysdeps/linux/common/remap_file_pages.c
index 2af53a32e..0512b8837 100644
--- a/libc/sysdeps/linux/common/remap_file_pages.c
+++ b/libc/sysdeps/linux/common/remap_file_pages.c
@@ -11,6 +11,6 @@
#ifdef __NR_remap_file_pages
_syscall5(int, remap_file_pages, void *, __start, size_t, __size,
- int, __prot, size_t, __pgoff, int, __flags);
+ int, __prot, size_t, __pgoff, int, __flags)
#endif
diff --git a/libc/sysdeps/linux/common/rename.c b/libc/sysdeps/linux/common/rename.c
index fd7318f02..9d8397a8f 100644
--- a/libc/sysdeps/linux/common/rename.c
+++ b/libc/sysdeps/linux/common/rename.c
@@ -15,7 +15,7 @@
#define __NR___syscall_rename __NR_rename
static __inline__ _syscall2(int, __syscall_rename, const char *, oldpath,
- const char *, newpath);
+ const char *, newpath)
int rename(const char * oldpath, const char * newpath)
{
diff --git a/libc/sysdeps/linux/common/rmdir.c b/libc/sysdeps/linux/common/rmdir.c
index 845b3e371..221c29f46 100644
--- a/libc/sysdeps/linux/common/rmdir.c
+++ b/libc/sysdeps/linux/common/rmdir.c
@@ -10,7 +10,7 @@
#include <sys/syscall.h>
#include <unistd.h>
-libc_hidden_proto(rmdir)
+/* libc_hidden_proto(rmdir) */
-_syscall1(int, rmdir, const char *, pathname);
+_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 734a4ce01..9ec1db3db 100644
--- a/libc/sysdeps/linux/common/sbrk.c
+++ b/libc/sysdeps/linux/common/sbrk.c
@@ -7,7 +7,7 @@
#include <unistd.h>
#include <errno.h>
-libc_hidden_proto(brk)
+/* libc_hidden_proto(brk) */
/* Defined in brk.c. */
extern void *__curbrk attribute_hidden;
@@ -15,7 +15,7 @@ extern void *__curbrk attribute_hidden;
/* Extend the process's data space by INCREMENT.
If INCREMENT is negative, shrink data space by - INCREMENT.
Return start of new space allocated, or -1 for errors. */
-libc_hidden_proto(sbrk)
+/* libc_hidden_proto(sbrk) */
void * sbrk (intptr_t increment)
{
void *oldbrk;
diff --git a/libc/sysdeps/linux/common/sched_get_priority_max.c b/libc/sysdeps/linux/common/sched_get_priority_max.c
index a9ab24639..cf5447ca7 100644
--- a/libc/sysdeps/linux/common/sched_get_priority_max.c
+++ b/libc/sysdeps/linux/common/sched_get_priority_max.c
@@ -9,4 +9,4 @@
#include <sys/syscall.h>
#include <sched.h>
-_syscall1(int, sched_get_priority_max, int, policy);
+_syscall1(int, sched_get_priority_max, int, policy)
diff --git a/libc/sysdeps/linux/common/sched_get_priority_min.c b/libc/sysdeps/linux/common/sched_get_priority_min.c
index 5a78f9393..884efed60 100644
--- a/libc/sysdeps/linux/common/sched_get_priority_min.c
+++ b/libc/sysdeps/linux/common/sched_get_priority_min.c
@@ -9,4 +9,4 @@
#include <sys/syscall.h>
#include <sched.h>
-_syscall1(int, sched_get_priority_min, int, policy);
+_syscall1(int, sched_get_priority_min, int, policy)
diff --git a/libc/sysdeps/linux/common/sched_getaffinity.c b/libc/sysdeps/linux/common/sched_getaffinity.c
index 5c801c68f..5d5e5b2c4 100644
--- a/libc/sysdeps/linux/common/sched_getaffinity.c
+++ b/libc/sysdeps/linux/common/sched_getaffinity.c
@@ -25,13 +25,11 @@
#include <string.h>
#include <sys/param.h>
-#include <sys/types.h>
-
-/* Experimentally off - libc_hidden_proto(memset) */
+#if defined __NR_sched_getaffinity
#define __NR___syscall_sched_getaffinity __NR_sched_getaffinity
static __inline__ _syscall3(int, __syscall_sched_getaffinity, __kernel_pid_t, pid,
- size_t, cpusetsize, cpu_set_t *, cpuset);
+ size_t, cpusetsize, cpu_set_t *, cpuset)
int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
{
@@ -46,5 +44,11 @@ int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
}
return res;
}
-
+#elif defined __UCLIBC_HAS_STUBS__
+int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
+{
+ __set_errno(ENOSYS);
+ return -1;
+}
+#endif
#endif
diff --git a/libc/sysdeps/linux/common/sched_getparam.c b/libc/sysdeps/linux/common/sched_getparam.c
index af5ba6071..eb17e255e 100644
--- a/libc/sysdeps/linux/common/sched_getparam.c
+++ b/libc/sysdeps/linux/common/sched_getparam.c
@@ -13,7 +13,7 @@
#define __NR___syscall_sched_getparam __NR_sched_getparam
static __inline__ _syscall2(int, __syscall_sched_getparam,
- __kernel_pid_t, pid, struct sched_param *, p);
+ __kernel_pid_t, pid, struct sched_param *, p)
int sched_getparam(pid_t pid, struct sched_param *p)
{
diff --git a/libc/sysdeps/linux/common/sched_getscheduler.c b/libc/sysdeps/linux/common/sched_getscheduler.c
index 9564da7fd..e657abd77 100644
--- a/libc/sysdeps/linux/common/sched_getscheduler.c
+++ b/libc/sysdeps/linux/common/sched_getscheduler.c
@@ -12,7 +12,7 @@
#include <sys/syscall.h>
#define __NR___syscall_sched_getscheduler __NR_sched_getscheduler
-static __inline__ _syscall1(int, __syscall_sched_getscheduler, __kernel_pid_t, pid);
+static __inline__ _syscall1(int, __syscall_sched_getscheduler, __kernel_pid_t, pid)
int sched_getscheduler(pid_t pid)
{
diff --git a/libc/sysdeps/linux/common/sched_rr_get_interval.c b/libc/sysdeps/linux/common/sched_rr_get_interval.c
index c59812d94..31d620fd3 100644
--- a/libc/sysdeps/linux/common/sched_rr_get_interval.c
+++ b/libc/sysdeps/linux/common/sched_rr_get_interval.c
@@ -13,7 +13,7 @@
#define __NR___syscall_sched_rr_get_interval __NR_sched_rr_get_interval
static __inline__ _syscall2(int, __syscall_sched_rr_get_interval,
- __kernel_pid_t, pid, struct timespec *, tp);
+ __kernel_pid_t, pid, struct timespec *, tp)
int sched_rr_get_interval(pid_t pid, struct timespec *tp)
{
diff --git a/libc/sysdeps/linux/common/sched_setaffinity.c b/libc/sysdeps/linux/common/sched_setaffinity.c
index c687970f1..aec032eab 100644
--- a/libc/sysdeps/linux/common/sched_setaffinity.c
+++ b/libc/sysdeps/linux/common/sched_setaffinity.c
@@ -28,14 +28,14 @@
#include <string.h>
#include <unistd.h>
#include <sys/param.h>
-#include <sys/types.h>
#include <alloca.h>
-libc_hidden_proto(getpid)
+#if defined __NR_sched_setaffinity
+/* libc_hidden_proto(getpid) */
#define __NR___syscall_sched_setaffinity __NR_sched_setaffinity
static __inline__ _syscall3(int, __syscall_sched_setaffinity, __kernel_pid_t, pid,
- size_t, cpusetsize, cpu_set_t *, cpuset);
+ size_t, cpusetsize, cpu_set_t *, cpuset)
static size_t __kernel_cpumask_size;
@@ -74,5 +74,19 @@ int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset)
return INLINE_SYSCALL (sched_setaffinity, 3, pid, cpusetsize, cpuset);
}
+#else
+#define ___HAVE_NO_sched_setaffinity
#endif
+#else
+#define ___HAVE_NO_sched_setaffinity
#endif
+
+#if defined ___HAVE_NO_sched_setaffinity && defined __UCLIBC_HAS_STUBS__
+int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset)
+{
+ __set_errno(ENOSYS);
+ return -1;
+}
+#endif
+
+#endif /* __USE_GNU */
diff --git a/libc/sysdeps/linux/common/sched_setparam.c b/libc/sysdeps/linux/common/sched_setparam.c
index 1e1f8cf2d..0f5f74f0d 100644
--- a/libc/sysdeps/linux/common/sched_setparam.c
+++ b/libc/sysdeps/linux/common/sched_setparam.c
@@ -13,7 +13,7 @@
#define __NR___syscall_sched_setparam __NR_sched_setparam
static __inline__ _syscall2(int, __syscall_sched_setparam,
- __kernel_pid_t, pid, const struct sched_param *, p);
+ __kernel_pid_t, pid, const struct sched_param *, p)
int sched_setparam(pid_t pid, const struct sched_param *p)
{
diff --git a/libc/sysdeps/linux/common/sched_setscheduler.c b/libc/sysdeps/linux/common/sched_setscheduler.c
index fe2630871..0af498fc2 100644
--- a/libc/sysdeps/linux/common/sched_setscheduler.c
+++ b/libc/sysdeps/linux/common/sched_setscheduler.c
@@ -13,7 +13,7 @@
#define __NR___syscall_sched_setscheduler __NR_sched_setscheduler
static __inline__ _syscall3(int, __syscall_sched_setscheduler,
- __kernel_pid_t, pid, int, policy, const struct sched_param *, p);
+ __kernel_pid_t, pid, int, policy, const struct sched_param *, p)
int sched_setscheduler(pid_t pid, int policy, const struct sched_param *p)
{
diff --git a/libc/sysdeps/linux/common/sched_yield.c b/libc/sysdeps/linux/common/sched_yield.c
index 2ae5396c9..2d584bdc7 100644
--- a/libc/sysdeps/linux/common/sched_yield.c
+++ b/libc/sysdeps/linux/common/sched_yield.c
@@ -9,4 +9,4 @@
#include <sys/syscall.h>
#include <sched.h>
-_syscall0(int, sched_yield);
+_syscall0(int, sched_yield)
diff --git a/libc/sysdeps/linux/common/sendfile.c b/libc/sysdeps/linux/common/sendfile.c
index 18427e85b..0d2ebaaf6 100644
--- a/libc/sysdeps/linux/common/sendfile.c
+++ b/libc/sysdeps/linux/common/sendfile.c
@@ -20,7 +20,7 @@
#ifdef __NR_sendfile
_syscall4(ssize_t, sendfile, int, out_fd, int, in_fd, __off_t *, offset,
- size_t, count);
+ size_t, count)
#if ! defined __NR_sendfile64 && defined __UCLIBC_HAS_LFS__
strong_alias(sendfile,sendfile64)
diff --git a/libc/sysdeps/linux/common/sendfile64.c b/libc/sysdeps/linux/common/sendfile64.c
index 29cff5ec5..fc5155fd2 100644
--- a/libc/sysdeps/linux/common/sendfile64.c
+++ b/libc/sysdeps/linux/common/sendfile64.c
@@ -20,5 +20,5 @@
#include <bits/wordsize.h>
#if defined __UCLIBC_HAS_LFS__ && defined __NR_sendfile64
-_syscall4(ssize_t,sendfile64, int, out_fd, int, in_fd, __off64_t *, offset, size_t, count);
+_syscall4(ssize_t,sendfile64, int, out_fd, int, in_fd, __off64_t *, offset, size_t, count)
#endif
diff --git a/libc/sysdeps/linux/common/setdomainname.c b/libc/sysdeps/linux/common/setdomainname.c
index e134b0d45..6b768b7f7 100644
--- a/libc/sysdeps/linux/common/setdomainname.c
+++ b/libc/sysdeps/linux/common/setdomainname.c
@@ -10,5 +10,5 @@
#include <sys/syscall.h>
#include <unistd.h>
#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
-_syscall2(int, setdomainname, const char *, name, size_t, len);
+_syscall2(int, setdomainname, const char *, name, size_t, len)
#endif
diff --git a/libc/sysdeps/linux/common/setegid.c b/libc/sysdeps/linux/common/setegid.c
index 33c627c51..30921a8b3 100644
--- a/libc/sysdeps/linux/common/setegid.c
+++ b/libc/sysdeps/linux/common/setegid.c
@@ -12,9 +12,9 @@
#include <sys/syscall.h>
#if (defined __NR_setresgid || defined __NR_setresgid32) && defined __USE_GNU
-libc_hidden_proto(setresgid)
+/* libc_hidden_proto(setresgid) */
#endif
-libc_hidden_proto(setregid)
+/* 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 5a6e9a25a..6f2c5e92a 100644
--- a/libc/sysdeps/linux/common/seteuid.c
+++ b/libc/sysdeps/linux/common/seteuid.c
@@ -16,12 +16,12 @@
#undef __NR_setresuid32
#endif
-libc_hidden_proto(seteuid)
+/* libc_hidden_proto(seteuid) */
#if (defined __NR_setresuid || defined __NR_setresuid32) && defined __USE_GNU
-libc_hidden_proto(setresuid)
+/* libc_hidden_proto(setresuid) */
#endif
-libc_hidden_proto(setreuid)
+/* libc_hidden_proto(setreuid) */
int seteuid(uid_t uid)
{
diff --git a/libc/sysdeps/linux/common/setfsgid.c b/libc/sysdeps/linux/common/setfsgid.c
index de005e28d..78d35dd5a 100644
--- a/libc/sysdeps/linux/common/setfsgid.c
+++ b/libc/sysdeps/linux/common/setfsgid.c
@@ -17,12 +17,12 @@
# define __NR_setfsgid __NR_setfsgid32
# endif
-_syscall1(int, setfsgid, gid_t, gid);
+_syscall1(int, setfsgid, gid_t, gid)
#else
# define __NR___syscall_setfsgid __NR_setfsgid
-static __inline__ _syscall1(int, __syscall_setfsgid, __kernel_gid_t, gid);
+static __inline__ _syscall1(int, __syscall_setfsgid, __kernel_gid_t, gid)
int setfsgid(gid_t gid)
{
diff --git a/libc/sysdeps/linux/common/setfsuid.c b/libc/sysdeps/linux/common/setfsuid.c
index 698117a1a..a7372bd29 100644
--- a/libc/sysdeps/linux/common/setfsuid.c
+++ b/libc/sysdeps/linux/common/setfsuid.c
@@ -17,12 +17,12 @@
# define __NR_setfsuid __NR_setfsuid32
# endif
-_syscall1(int, setfsuid, uid_t, uid);
+_syscall1(int, setfsuid, uid_t, uid)
#else
# define __NR___syscall_setfsuid __NR_setfsuid
-static __inline__ _syscall1(int, __syscall_setfsuid, __kernel_uid_t, uid);
+static __inline__ _syscall1(int, __syscall_setfsuid, __kernel_uid_t, uid)
int setfsuid(uid_t uid)
{
diff --git a/libc/sysdeps/linux/common/setgid.c b/libc/sysdeps/linux/common/setgid.c
index 37175cd7c..88341ba86 100644
--- a/libc/sysdeps/linux/common/setgid.c
+++ b/libc/sysdeps/linux/common/setgid.c
@@ -17,12 +17,12 @@
# define __NR_setgid __NR_setgid32
# endif
-_syscall1(int, setgid, gid_t, gid);
+_syscall1(int, setgid, gid_t, gid)
#else
# define __NR___syscall_setgid __NR_setgid
-static __inline__ _syscall1(int, __syscall_setgid, __kernel_gid_t, gid);
+static __inline__ _syscall1(int, __syscall_setgid, __kernel_gid_t, gid)
int setgid(gid_t gid)
{
diff --git a/libc/sysdeps/linux/common/setgroups.c b/libc/sysdeps/linux/common/setgroups.c
index 3c77250d0..d7a94944c 100644
--- a/libc/sysdeps/linux/common/setgroups.c
+++ b/libc/sysdeps/linux/common/setgroups.c
@@ -14,23 +14,23 @@
#ifdef __USE_BSD
-libc_hidden_proto(setgroups)
+/* libc_hidden_proto(setgroups) */
#if defined(__NR_setgroups32)
# undef __NR_setgroups
# define __NR_setgroups __NR_setgroups32
-_syscall2(int, setgroups, size_t, size, const gid_t *, list);
+_syscall2(int, setgroups, size_t, size, const gid_t *, list)
#elif __WORDSIZE == 64
-_syscall2(int, setgroups, size_t, size, const gid_t *, list);
+_syscall2(int, setgroups, size_t, size, const gid_t *, list)
#else
-libc_hidden_proto(sysconf)
+/* libc_hidden_proto(sysconf) */
#define __NR___syscall_setgroups __NR_setgroups
static __inline__ _syscall2(int, __syscall_setgroups,
- size_t, size, const __kernel_gid_t *, list);
+ size_t, size, const __kernel_gid_t *, list)
int setgroups(size_t size, const gid_t *groups)
{
diff --git a/libc/sysdeps/linux/common/sethostname.c b/libc/sysdeps/linux/common/sethostname.c
index 6bd4c2362..1ceb2a089 100644
--- a/libc/sysdeps/linux/common/sethostname.c
+++ b/libc/sysdeps/linux/common/sethostname.c
@@ -10,5 +10,5 @@
#include <sys/syscall.h>
#include <unistd.h>
#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
-_syscall2(int, sethostname, const char *, name, size_t, len);
+_syscall2(int, sethostname, const char *, name, size_t, len)
#endif
diff --git a/libc/sysdeps/linux/common/setitimer.c b/libc/sysdeps/linux/common/setitimer.c
index ca9db82d2..df65808d2 100644
--- a/libc/sysdeps/linux/common/setitimer.c
+++ b/libc/sysdeps/linux/common/setitimer.c
@@ -10,8 +10,8 @@
#include <sys/syscall.h>
#include <sys/time.h>
-libc_hidden_proto(setitimer)
+/* libc_hidden_proto(setitimer) */
_syscall3(int, setitimer, __itimer_which_t, which,
- const struct itimerval *, new, struct itimerval *, old);
+ const struct itimerval *, new, struct itimerval *, old)
libc_hidden_def(setitimer)
diff --git a/libc/sysdeps/linux/common/setpgid.c b/libc/sysdeps/linux/common/setpgid.c
index f91908ded..664da1ad2 100644
--- a/libc/sysdeps/linux/common/setpgid.c
+++ b/libc/sysdeps/linux/common/setpgid.c
@@ -12,11 +12,11 @@
#if defined __USE_UNIX98 || defined __USE_SVID
#include <unistd.h>
-libc_hidden_proto(setpgid)
+/* libc_hidden_proto(setpgid) */
#define __NR___syscall_setpgid __NR_setpgid
static __inline__ _syscall2(int, __syscall_setpgid,
- __kernel_pid_t, pid, __kernel_pid_t, pgid);
+ __kernel_pid_t, pid, __kernel_pid_t, pgid)
int setpgid(pid_t pid, pid_t pgid)
{
diff --git a/libc/sysdeps/linux/common/setpgrp.c b/libc/sysdeps/linux/common/setpgrp.c
index 38300dc2e..9f71aa26f 100644
--- a/libc/sysdeps/linux/common/setpgrp.c
+++ b/libc/sysdeps/linux/common/setpgrp.c
@@ -7,7 +7,7 @@
#include <syscall.h>
#include <unistd.h>
-libc_hidden_proto(setpgid)
+/* libc_hidden_proto(setpgid) */
int setpgrp(void)
{
diff --git a/libc/sysdeps/linux/common/setpriority.c b/libc/sysdeps/linux/common/setpriority.c
index 6674494ab..3b98c3f58 100644
--- a/libc/sysdeps/linux/common/setpriority.c
+++ b/libc/sysdeps/linux/common/setpriority.c
@@ -10,7 +10,7 @@
#include <sys/syscall.h>
#include <sys/resource.h>
-libc_hidden_proto(setpriority)
+/* libc_hidden_proto(setpriority) */
-_syscall3(int, setpriority, __priority_which_t, which, id_t, who, int, prio);
+_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 3fe95d9d0..332599431 100644
--- a/libc/sysdeps/linux/common/setregid.c
+++ b/libc/sysdeps/linux/common/setregid.c
@@ -11,7 +11,7 @@
#include <unistd.h>
#include <bits/wordsize.h>
-libc_hidden_proto(setregid)
+/* libc_hidden_proto(setregid) */
#if (__WORDSIZE == 32 && defined(__NR_setregid32)) || __WORDSIZE == 64
# ifdef __NR_setregid32
@@ -19,13 +19,13 @@ libc_hidden_proto(setregid)
# define __NR_setregid __NR_setregid32
# endif
-_syscall2(int, setregid, gid_t, rgid, gid_t, egid);
+_syscall2(int, setregid, gid_t, rgid, gid_t, egid)
#else
# define __NR___syscall_setregid __NR_setregid
static __inline__ _syscall2(int, __syscall_setregid,
- __kernel_gid_t, rgid, __kernel_gid_t, egid);
+ __kernel_gid_t, rgid, __kernel_gid_t, egid)
int setregid(gid_t rgid, gid_t egid)
{
diff --git a/libc/sysdeps/linux/common/setresgid.c b/libc/sysdeps/linux/common/setresgid.c
index 13e4b1d6d..e99708e0d 100644
--- a/libc/sysdeps/linux/common/setresgid.c
+++ b/libc/sysdeps/linux/common/setresgid.c
@@ -15,7 +15,7 @@
# undef __NR_setresgid
# define __NR_setresgid __NR_setresgid32
-libc_hidden_proto(setresgid)
+/* libc_hidden_proto(setresgid) */
_syscall3(int, setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid)
libc_hidden_def(setresgid)
@@ -23,9 +23,9 @@ libc_hidden_def(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);
+ __kernel_gid_t, rgid, __kernel_gid_t, egid, __kernel_gid_t, sgid)
-libc_hidden_proto(setresgid)
+/* libc_hidden_proto(setresgid) */
int setresgid(gid_t rgid, gid_t egid, gid_t sgid)
{
if (((rgid + 1) > (gid_t) ((__kernel_gid_t) - 1U))
diff --git a/libc/sysdeps/linux/common/setresuid.c b/libc/sysdeps/linux/common/setresuid.c
index 764b90523..c1e395a40 100644
--- a/libc/sysdeps/linux/common/setresuid.c
+++ b/libc/sysdeps/linux/common/setresuid.c
@@ -15,7 +15,7 @@
# undef __NR_setresuid
# define __NR_setresuid __NR_setresuid32
-libc_hidden_proto(setresuid)
+/* libc_hidden_proto(setresuid) */
_syscall3(int, setresuid, uid_t, ruid, uid_t, euid, uid_t, suid)
libc_hidden_def(setresuid)
@@ -23,9 +23,9 @@ libc_hidden_def(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);
+ __kernel_uid_t, rgid, __kernel_uid_t, egid, __kernel_uid_t, sgid)
-libc_hidden_proto(setresuid)
+/* libc_hidden_proto(setresuid) */
int setresuid(uid_t ruid, uid_t euid, uid_t suid)
{
if (((ruid + 1) > (uid_t) ((__kernel_uid_t) - 1U))
diff --git a/libc/sysdeps/linux/common/setreuid.c b/libc/sysdeps/linux/common/setreuid.c
index bca7f8f43..bb7b6a9c5 100644
--- a/libc/sysdeps/linux/common/setreuid.c
+++ b/libc/sysdeps/linux/common/setreuid.c
@@ -11,7 +11,7 @@
#include <unistd.h>
#include <bits/wordsize.h>
-libc_hidden_proto(setreuid)
+/* libc_hidden_proto(setreuid) */
#if (__WORDSIZE == 32 && defined(__NR_setreuid32)) || __WORDSIZE == 64
# ifdef __NR_setreuid32
@@ -19,13 +19,13 @@ libc_hidden_proto(setreuid)
# define __NR_setreuid __NR_setreuid32
# endif
-_syscall2(int, setreuid, uid_t, ruid, uid_t, euid);
+_syscall2(int, setreuid, uid_t, ruid, uid_t, euid)
#else
# define __NR___syscall_setreuid __NR_setreuid
static __inline__ _syscall2(int, __syscall_setreuid,
- __kernel_uid_t, ruid, __kernel_uid_t, euid);
+ __kernel_uid_t, ruid, __kernel_uid_t, euid)
int setreuid(uid_t ruid, uid_t euid)
{
diff --git a/libc/sysdeps/linux/common/setrlimit.c b/libc/sysdeps/linux/common/setrlimit.c
index ce9fe2275..87f96cb21 100644
--- a/libc/sysdeps/linux/common/setrlimit.c
+++ b/libc/sysdeps/linux/common/setrlimit.c
@@ -13,7 +13,7 @@
#include <sys/resource.h>
#undef setrlimit64
-libc_hidden_proto(setrlimit)
+/* libc_hidden_proto(setrlimit) */
/* Only wrap setrlimit if the new usetrlimit is not present and setrlimit sucks */
@@ -21,9 +21,9 @@ libc_hidden_proto(setrlimit)
/* just call usetrlimit() */
# define __NR___syscall_usetrlimit __NR_usetrlimit
-static inline
+static __always_inline
_syscall2(int, __syscall_usetrlimit, enum __rlimit_resource, resource,
- const struct rlimit *, rlim);
+ const struct rlimit *, rlim)
int setrlimit(__rlimit_resource_t resource, struct rlimit *rlimits)
{
return (__syscall_usetrlimit(resource, rlimits));
@@ -33,14 +33,14 @@ int setrlimit(__rlimit_resource_t resource, struct rlimit *rlimits)
/* We don't need to wrap setrlimit() */
_syscall2(int, setrlimit, __rlimit_resource_t, resource,
- const struct rlimit *, rlim);
+ const struct rlimit *, rlim)
#else
/* we have to handle old style setrlimit() */
# define __NR___syscall_setrlimit __NR_setrlimit
-static inline
-_syscall2(int, __syscall_setrlimit, int, resource, const struct rlimit *, rlim);
+static __always_inline
+_syscall2(int, __syscall_setrlimit, int, resource, const struct rlimit *, rlim)
int setrlimit(__rlimit_resource_t resource, const struct rlimit *rlimits)
{
diff --git a/libc/sysdeps/linux/common/setrlimit64.c b/libc/sysdeps/linux/common/setrlimit64.c
index 90b8eebd7..3233ed696 100644
--- a/libc/sysdeps/linux/common/setrlimit64.c
+++ b/libc/sysdeps/linux/common/setrlimit64.c
@@ -26,7 +26,7 @@
#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 32
-libc_hidden_proto(setrlimit)
+/* libc_hidden_proto(setrlimit) */
/* Set the soft and hard limits for RESOURCE to *RLIMITS.
Only the super-user can increase hard limits.
diff --git a/libc/sysdeps/linux/common/setsid.c b/libc/sysdeps/linux/common/setsid.c
index 7e5bd33a4..d0fc9b010 100644
--- a/libc/sysdeps/linux/common/setsid.c
+++ b/libc/sysdeps/linux/common/setsid.c
@@ -10,7 +10,7 @@
#include <sys/syscall.h>
#include <unistd.h>
-libc_hidden_proto(setsid)
+/* libc_hidden_proto(setsid) */
-_syscall0(pid_t, 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 7f7c24d26..361eb3532 100644
--- a/libc/sysdeps/linux/common/settimeofday.c
+++ b/libc/sysdeps/linux/common/settimeofday.c
@@ -12,9 +12,9 @@
#ifdef __USE_BSD
-libc_hidden_proto(settimeofday)
+/* libc_hidden_proto(settimeofday) */
_syscall2(int, settimeofday, const struct timeval *, tv,
- const struct timezone *, tz);
+ const struct timezone *, tz)
libc_hidden_def(settimeofday)
#endif
diff --git a/libc/sysdeps/linux/common/setuid.c b/libc/sysdeps/linux/common/setuid.c
index 32a4cd79e..7fd8c65e6 100644
--- a/libc/sysdeps/linux/common/setuid.c
+++ b/libc/sysdeps/linux/common/setuid.c
@@ -17,12 +17,12 @@
# define __NR_setuid __NR_setuid32
# endif
-_syscall1(int, setuid, uid_t, uid);
+_syscall1(int, setuid, uid_t, uid)
#else
# define __NR___syscall_setuid __NR_setuid
-static __inline__ _syscall1(int, __syscall_setuid, __kernel_uid_t, uid);
+static __inline__ _syscall1(int, __syscall_setuid, __kernel_uid_t, uid)
int setuid(uid_t uid)
{
diff --git a/libc/sysdeps/linux/common/sigaltstack.c b/libc/sysdeps/linux/common/sigaltstack.c
index 0c9308408..964e16f99 100644
--- a/libc/sysdeps/linux/common/sigaltstack.c
+++ b/libc/sysdeps/linux/common/sigaltstack.c
@@ -13,5 +13,5 @@
#if defined __NR_sigaltstack && (defined __USE_BSD || defined __USE_UNIX98)
_syscall2(int, sigaltstack, const struct sigaltstack *, ss,
- struct sigaltstack *, oss);
+ struct sigaltstack *, oss)
#endif
diff --git a/libc/sysdeps/linux/common/signalfd.c b/libc/sysdeps/linux/common/signalfd.c
new file mode 100644
index 000000000..3d76e04c4
--- /dev/null
+++ b/libc/sysdeps/linux/common/signalfd.c
@@ -0,0 +1,41 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * signalfd() for uClibc
+ *
+ * Copyright (C) 2008 Bernhard Reutner-Fischer <uclibc@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#include <sys/syscall.h>
+#include <signal.h>
+#include <sys/signalfd.h>
+
+#if defined __NR_signalfd4
+#define __NR___syscall_signalfd4 __NR_signalfd4
+static __inline__ _syscall4(int, __syscall_signalfd4, int, fd,
+ const sigset_t *, mask, size_t, sizemask, int, flags)
+#elif defined __NR_signalfd
+#define __NR___syscall_signalfd __NR_signalfd
+static __inline__ _syscall3(int, __syscall_signalfd, int, fd,
+ const sigset_t *, mask, size_t, sizemask)
+#endif
+
+#if defined __NR_signalfd4 || defined __NR_signalfd \
+ || defined __UCLIBC_HAS_STUBS__
+int signalfd (int fd, const sigset_t *mask, int flags)
+{
+#if defined __NR___syscall_signalfd4
+ return __syscall_signalfd4(fd, mask, _NSIG / 8, flags);
+#elif defined __NR___syscall_signalfd
+ if (flags != 0) {
+ __set_errno(EINVAL);
+ return -1;
+ }
+ return __syscall_signalfd(fd, mask, _NSIG / 8);
+#elif defined __UCLIBC_HAS_STUBS__
+ __set_errno(ENOSYS);
+ return -1;
+#endif
+}
+#endif
diff --git a/libc/sysdeps/linux/common/sigpending.c b/libc/sysdeps/linux/common/sigpending.c
index 0a74afaa4..8fa2a5125 100644
--- a/libc/sysdeps/linux/common/sigpending.c
+++ b/libc/sysdeps/linux/common/sigpending.c
@@ -15,13 +15,13 @@
#ifdef __NR_rt_sigpending
# define __NR___rt_sigpending __NR_rt_sigpending
-static __inline__ _syscall2(int, __rt_sigpending, sigset_t *, set, size_t, size);
+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);
+_syscall1(int, sigpending, sigset_t *, set)
#endif
#endif
diff --git a/libc/sysdeps/linux/common/sigqueue.c b/libc/sysdeps/linux/common/sigqueue.c
index 2bff597c1..d610e8f6a 100644
--- a/libc/sysdeps/linux/common/sigqueue.c
+++ b/libc/sysdeps/linux/common/sigqueue.c
@@ -24,14 +24,14 @@
#include <sys/syscall.h>
#if defined __USE_POSIX199309
-libc_hidden_proto(getpid)
-libc_hidden_proto(getuid)
+/* libc_hidden_proto(getpid) */
+/* libc_hidden_proto(getuid) */
/* Experimentally off - libc_hidden_proto(memset) */
#ifdef __NR_rt_sigqueueinfo
# define __NR___libc_rt_sigqueueinfo __NR_rt_sigqueueinfo
-static __inline__ _syscall3(int, __libc_rt_sigqueueinfo, pid_t, pid, int, sig, void*, value);
+static __inline__ _syscall3(int, __libc_rt_sigqueueinfo, pid_t, pid, int, sig, void*, value)
/* Return any pending signal or wait for one for the given time. */
int sigqueue (pid_t pid, int sig, const union sigval val)
diff --git a/libc/sysdeps/linux/common/splice.c b/libc/sysdeps/linux/common/splice.c
index 7e8f4e3e0..b21d10336 100644
--- a/libc/sysdeps/linux/common/splice.c
+++ b/libc/sysdeps/linux/common/splice.c
@@ -10,11 +10,9 @@
#include <sys/syscall.h>
#include <fcntl.h>
-libc_hidden_proto(splice)
-
#ifdef __NR_splice
_syscall6(ssize_t, splice, int, __fdin, __off64_t *, __offin, int, __fdout,
- __off64_t *, __offout, size_t, __len, unsigned int, __flags);
+ __off64_t *, __offout, size_t, __len, unsigned int, __flags)
#else
ssize_t splice(int __fdin, __off64_t *__offin, int __fdout,
__off64_t *__offout, size_t __len, unsigned int __flags)
@@ -23,6 +21,3 @@ ssize_t splice(int __fdin, __off64_t *__offin, int __fdout,
return -1;
}
#endif
-
-libc_hidden_def(splice)
-
diff --git a/libc/sysdeps/linux/common/ssp.c b/libc/sysdeps/linux/common/ssp.c
index d8088ef60..73d7113b8 100644
--- a/libc/sysdeps/linux/common/ssp.c
+++ b/libc/sysdeps/linux/common/ssp.c
@@ -29,21 +29,22 @@
#include <string.h>
#include <unistd.h>
#include <signal.h>
+#if defined __UCLIBC_HAS_SYSLOG__
#include <sys/syslog.h>
-/* Experimentally off - libc_hidden_proto(memset) */
-/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(sigaction)
-libc_hidden_proto(sigfillset)
-libc_hidden_proto(sigdelset)
-libc_hidden_proto(sigprocmask)
-libc_hidden_proto(write)
-libc_hidden_proto(openlog)
-libc_hidden_proto(syslog)
-libc_hidden_proto(closelog)
-libc_hidden_proto(kill)
-libc_hidden_proto(getpid)
-libc_hidden_proto(_exit)
+/* libc_hidden_proto(openlog) */
+/* libc_hidden_proto(syslog) */
+/* libc_hidden_proto(closelog) */
+#endif
+
+/* libc_hidden_proto(sigaction) */
+/* libc_hidden_proto(sigfillset) */
+/* libc_hidden_proto(sigdelset) */
+/* libc_hidden_proto(sigprocmask) */
+/* libc_hidden_proto(write) */
+/* libc_hidden_proto(kill) */
+/* libc_hidden_proto(getpid) */
+/* libc_hidden_proto(_exit) */
static void block_signals(void)
{
@@ -63,15 +64,17 @@ static void block_signals(void)
sigaction(SSP_SIGTYPE, &sa, NULL);
}
-static void ssp_write(int fd, const char *msg1, const char *msg2, const char *msg3)
+static void ssp_write(int fd, const char *msg1, const char *msg2, const char *msg3) __cold
{
write(fd, msg1, strlen(msg1));
write(fd, msg2, strlen(msg2));
write(fd, msg3, strlen(msg3));
write(fd, "()\n", 3);
+#if defined __UCLIBC_HAS_SYSLOG__
openlog("ssp", LOG_CONS | LOG_PID, LOG_USER);
syslog(LOG_INFO, "%s%s%s()", msg1, msg2, msg3);
closelog();
+#endif
}
static attribute_noreturn void terminate(void)
@@ -80,7 +83,7 @@ static attribute_noreturn void terminate(void)
_exit(127);
}
-void __stack_smash_handler(char func[], int damaged __attribute__ ((unused))) attribute_noreturn;
+void __stack_smash_handler(char func[], int damaged __attribute__ ((unused))) attribute_noreturn __cold;
void __stack_smash_handler(char func[], int damaged)
{
static const char message[] = ": stack smashing attack in function ";
@@ -94,7 +97,7 @@ void __stack_smash_handler(char func[], int damaged)
terminate();
}
-void __stack_chk_fail(void) attribute_noreturn;
+void __stack_chk_fail(void) attribute_noreturn __cold;
void __stack_chk_fail(void)
{
static const char msg1[] = "stack smashing detected: ";
diff --git a/libc/sysdeps/linux/common/stat.c b/libc/sysdeps/linux/common/stat.c
index 78211334e..d563bcd88 100644
--- a/libc/sysdeps/linux/common/stat.c
+++ b/libc/sysdeps/linux/common/stat.c
@@ -18,12 +18,12 @@
#undef stat64
-libc_hidden_proto(stat)
+/* libc_hidden_proto(stat) */
#define __NR___syscall_stat __NR_stat
#undef stat
static __inline__ _syscall2(int, __syscall_stat,
- const char *, file_name, struct kernel_stat *, buf);
+ const char *, file_name, struct kernel_stat *, buf)
int stat(const char *file_name, struct stat *buf)
{
@@ -40,7 +40,7 @@ libc_hidden_def(stat)
#if ! defined __NR_stat64 && defined __UCLIBC_HAS_LFS__
extern __typeof(stat) stat64;
-libc_hidden_proto(stat64)
+/* libc_hidden_proto(stat64) */
strong_alias(stat,stat64)
libc_hidden_def(stat64)
#endif
diff --git a/libc/sysdeps/linux/common/stat64.c b/libc/sysdeps/linux/common/stat64.c
index 1a0865686..11f836bac 100644
--- a/libc/sysdeps/linux/common/stat64.c
+++ b/libc/sysdeps/linux/common/stat64.c
@@ -11,15 +11,14 @@
#include <sys/stat.h>
#if defined __UCLIBC_HAS_LFS__ && defined __NR_stat64
-libc_hidden_proto(stat64)
+/* libc_hidden_proto(stat64) */
# define __NR___syscall_stat64 __NR_stat64
# include <unistd.h>
-# include <sys/stat.h>
# include "xstatconv.h"
static __inline__ _syscall2(int, __syscall_stat64,
- const char *, file_name, struct kernel_stat64 *, buf);
+ const char *, file_name, struct kernel_stat64 *, buf)
int stat64(const char *file_name, struct stat64 *buf)
{
diff --git a/libc/sysdeps/linux/common/statfs.c b/libc/sysdeps/linux/common/statfs.c
index 38c277fad..2f8548d0d 100644
--- a/libc/sysdeps/linux/common/statfs.c
+++ b/libc/sysdeps/linux/common/statfs.c
@@ -12,14 +12,10 @@
#include <sys/param.h>
#include <sys/vfs.h>
-extern __typeof(statfs) __libc_statfs;
-libc_hidden_proto(__libc_statfs)
+extern __typeof(statfs) __libc_statfs attribute_hidden;
#define __NR___libc_statfs __NR_statfs
-_syscall2(int, __libc_statfs, const char *, path, struct statfs *, buf);
-libc_hidden_def(__libc_statfs)
+_syscall2(int, __libc_statfs, const char *, path, struct statfs *, buf)
#if defined __UCLIBC_LINUX_SPECIFIC__
-libc_hidden_proto(statfs)
weak_alias(__libc_statfs,statfs)
-libc_hidden_weak(statfs)
#endif
diff --git a/libc/sysdeps/linux/common/stime.c b/libc/sysdeps/linux/common/stime.c
index af8595533..de060c8a2 100644
--- a/libc/sysdeps/linux/common/stime.c
+++ b/libc/sysdeps/linux/common/stime.c
@@ -13,9 +13,9 @@
#ifdef __USE_SVID
#ifdef __NR_stime
-_syscall1(int, stime, const time_t *, t);
+_syscall1(int, stime, const time_t *, t)
#else
-libc_hidden_proto(settimeofday)
+/* libc_hidden_proto(settimeofday) */
int stime(const time_t * when)
{
diff --git a/libc/sysdeps/linux/common/swapoff.c b/libc/sysdeps/linux/common/swapoff.c
index a0de283ed..db0b9befc 100644
--- a/libc/sysdeps/linux/common/swapoff.c
+++ b/libc/sysdeps/linux/common/swapoff.c
@@ -12,6 +12,6 @@
#ifdef __NR_swapoff
#include <sys/swap.h>
-_syscall1(int, swapoff, const char *, path);
+_syscall1(int, swapoff, const char *, path)
#endif
diff --git a/libc/sysdeps/linux/common/swapon.c b/libc/sysdeps/linux/common/swapon.c
index e9ffb6347..5d6b6e2de 100644
--- a/libc/sysdeps/linux/common/swapon.c
+++ b/libc/sysdeps/linux/common/swapon.c
@@ -12,6 +12,6 @@
#ifdef __NR_swapon
#include <sys/swap.h>
-_syscall2(int, swapon, const char *, path, int, swapflags);
+_syscall2(int, swapon, const char *, path, int, swapflags)
#endif
diff --git a/libc/sysdeps/linux/common/symlink.c b/libc/sysdeps/linux/common/symlink.c
index 97f34eb8f..e53e8d413 100644
--- a/libc/sysdeps/linux/common/symlink.c
+++ b/libc/sysdeps/linux/common/symlink.c
@@ -10,5 +10,5 @@
#include <sys/syscall.h>
#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K
#include <unistd.h>
-_syscall2(int, symlink, const char *, oldpath, const char *, newpath);
+_syscall2(int, symlink, const char *, oldpath, const char *, newpath)
#endif
diff --git a/libc/sysdeps/linux/common/sync.c b/libc/sysdeps/linux/common/sync.c
index d2f81229c..e663c5886 100644
--- a/libc/sysdeps/linux/common/sync.c
+++ b/libc/sysdeps/linux/common/sync.c
@@ -15,7 +15,7 @@
#ifndef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) __syscall_sync (args)
#define __NR___syscall_sync __NR_sync
-static __inline__ _syscall0(void, __syscall_sync);
+static __inline__ _syscall0(void, __syscall_sync)
#endif
void sync(void)
diff --git a/libc/sysdeps/linux/common/sync_file_range.c b/libc/sysdeps/linux/common/sync_file_range.c
new file mode 100644
index 000000000..7e2deff41
--- /dev/null
+++ b/libc/sysdeps/linux/common/sync_file_range.c
@@ -0,0 +1,33 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * sync_file_range() for uClibc
+ *
+ * Copyright (C) 2008 Bernhard Reutner-Fischer <uclibc@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#include <sys/syscall.h>
+#if defined __USE_GNU
+#include <fcntl.h>
+
+#if defined __NR_sync_file_range && defined __UCLIBC_HAS_LFS__
+#define __NR___syscall_sync_file_range __NR_sync_file_range
+static __inline__ _syscall6(int, __syscall_sync_file_range, int, fd,
+ off_t, offset_hi, off_t, offset_lo,
+ off_t, nbytes_hi, off_t, nbytes_lo, unsigned int, flags)
+int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags)
+{
+ return __syscall_sync_file_range(fd,
+ __LONG_LONG_PAIR((long)(offset >> 32), (long)(offset & 0xffffffff)),
+ __LONG_LONG_PAIR((long)(nbytes >> 32), (long)(nbytes & 0xffffffff)),
+ flags);
+}
+#elif defined __UCLIBC_HAS_STUBS__
+int sync_file_range(int fd, __off64_t offset, __off64_t nbytes, unsigned int flags)
+{
+ __set_errno(ENOSYS);
+ return -1;
+}
+#endif
+#endif
diff --git a/libc/sysdeps/linux/common/sysctl.c b/libc/sysdeps/linux/common/sysctl.c
index adee22837..11d53cd8e 100644
--- a/libc/sysdeps/linux/common/sysctl.c
+++ b/libc/sysdeps/linux/common/sysctl.c
@@ -24,8 +24,8 @@ struct __sysctl_args {
unsigned long __unused[4];
};
-static inline
-_syscall1(int, _sysctl, struct __sysctl_args *, args);
+static __always_inline
+_syscall1(int, _sysctl, struct __sysctl_args *, args)
int sysctl(int *name, int nlen, void *oldval, size_t * oldlenp,
void *newval, size_t newlen)
diff --git a/libc/sysdeps/linux/common/sysfs.c b/libc/sysdeps/linux/common/sysfs.c
index a4292f768..02f37d78d 100644
--- a/libc/sysdeps/linux/common/sysfs.c
+++ b/libc/sysdeps/linux/common/sysfs.c
@@ -12,6 +12,6 @@
#include <sys/syscall.h>
#if defined __USE_SVID
-_syscall3(int, sysfs, int, option, unsigned int, index, char, addr);
+_syscall3(int, sysfs, int, option, unsigned int, index, char, addr)
#endif
#endif
diff --git a/libc/sysdeps/linux/common/sysinfo.c b/libc/sysdeps/linux/common/sysinfo.c
index 78bf75150..fc37aaff6 100644
--- a/libc/sysdeps/linux/common/sysinfo.c
+++ b/libc/sysdeps/linux/common/sysinfo.c
@@ -9,4 +9,4 @@
#include <sys/syscall.h>
#include <sys/sysinfo.h>
-_syscall1(int, sysinfo, struct sysinfo *, info);
+_syscall1(int, sysinfo, struct sysinfo *, info)
diff --git a/libc/sysdeps/linux/common/tee.c b/libc/sysdeps/linux/common/tee.c
index 6725e82bb..504776716 100644
--- a/libc/sysdeps/linux/common/tee.c
+++ b/libc/sysdeps/linux/common/tee.c
@@ -12,5 +12,5 @@
#ifdef __NR_tee
_syscall4(ssize_t, tee, int, __fdin, int, __fdout, size_t, __len,
- unsigned int, __flags);
+ unsigned int, __flags)
#endif
diff --git a/libc/sysdeps/linux/common/time.c b/libc/sysdeps/linux/common/time.c
index a7aa153d4..a40d8fc53 100644
--- a/libc/sysdeps/linux/common/time.c
+++ b/libc/sysdeps/linux/common/time.c
@@ -14,9 +14,9 @@
/* Experimentally off - libc_hidden_proto(time) */
#ifdef __NR_time
-_syscall1(time_t, time, time_t *, t);
+_syscall1(time_t, time, time_t *, t)
#else
-libc_hidden_proto(gettimeofday)
+/* libc_hidden_proto(gettimeofday) */
time_t time(time_t * t)
{
diff --git a/libc/sysdeps/linux/common/times.c b/libc/sysdeps/linux/common/times.c
index a68a2981f..a0644ef1f 100644
--- a/libc/sysdeps/linux/common/times.c
+++ b/libc/sysdeps/linux/common/times.c
@@ -10,7 +10,7 @@
#include <sys/syscall.h>
#include <sys/times.h>
-libc_hidden_proto(times)
+/* libc_hidden_proto(times) */
-_syscall1(clock_t, times, struct tms *, buf);
+_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 5ae8749ed..22da552da 100644
--- a/libc/sysdeps/linux/common/truncate.c
+++ b/libc/sysdeps/linux/common/truncate.c
@@ -10,7 +10,7 @@
#include <sys/syscall.h>
#include <unistd.h>
-libc_hidden_proto(truncate)
+/* libc_hidden_proto(truncate) */
-_syscall2(int, truncate, const char *, path, __off_t, length);
+_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 d4a1798fe..40989334f 100644
--- a/libc/sysdeps/linux/common/truncate64.c
+++ b/libc/sysdeps/linux/common/truncate64.c
@@ -25,7 +25,7 @@
#if __WORDSIZE == 64
/* For a 64 bit machine, life is simple... */
-_syscall2(int, truncate64, const char *, path, __off64_t, length);
+_syscall2(int, truncate64, const char *, path, __off64_t, length)
#elif __WORDSIZE == 32
@@ -34,10 +34,10 @@ _syscall2(int, truncate64, const char *, path, __off64_t, length);
#define __NR___syscall_truncate64 __NR_truncate64
#if defined(__UCLIBC_TRUNCATE64_HAS_4_ARGS__)
static __inline__ _syscall4(int, __syscall_truncate64, const char *, path,
- uint32_t, pad, unsigned long, high_length, unsigned long, low_length);
+ uint32_t, pad, unsigned long, high_length, unsigned long, low_length)
#else
static __inline__ _syscall3(int, __syscall_truncate64, const char *, path,
- unsigned long, high_length, unsigned long, low_length);
+ unsigned long, high_length, unsigned long, low_length)
#endif
#endif
@@ -62,7 +62,7 @@ int truncate64 (const char * path, __off64_t length)
#else /* __NR_truncate64 */
-libc_hidden_proto(truncate)
+/* libc_hidden_proto(truncate) */
int truncate64 (const char * path, __off64_t length)
{
diff --git a/libc/sysdeps/linux/common/ulimit.c b/libc/sysdeps/linux/common/ulimit.c
index 2a1c88081..3c1a0cc1c 100644
--- a/libc/sysdeps/linux/common/ulimit.c
+++ b/libc/sysdeps/linux/common/ulimit.c
@@ -10,7 +10,7 @@
#ifdef __NR_ulimit
extern long int ulimit(int cmd, long arg);
-_syscall2(long, ulimit, int, cmd, long, arg);
+_syscall2(long, ulimit, int, cmd, long, arg)
#else
@@ -19,9 +19,9 @@ _syscall2(long, ulimit, int, cmd, long, arg);
#include <ulimit.h>
#include <sys/resource.h>
-libc_hidden_proto(sysconf)
-libc_hidden_proto(getrlimit)
-libc_hidden_proto(setrlimit)
+/* libc_hidden_proto(sysconf) */
+/* libc_hidden_proto(getrlimit) */
+/* libc_hidden_proto(setrlimit) */
long int ulimit(int cmd, ...)
{
diff --git a/libc/sysdeps/linux/common/umask.c b/libc/sysdeps/linux/common/umask.c
index 01a7b9eb3..ef9860e31 100644
--- a/libc/sysdeps/linux/common/umask.c
+++ b/libc/sysdeps/linux/common/umask.c
@@ -11,7 +11,7 @@
#include <sys/stat.h>
#define __NR___syscall_umask __NR_umask
-static __inline__ _syscall1(__kernel_mode_t, __syscall_umask, __kernel_mode_t, mode);
+static __inline__ _syscall1(__kernel_mode_t, __syscall_umask, __kernel_mode_t, mode)
mode_t umask(mode_t mode)
{
diff --git a/libc/sysdeps/linux/common/umount.c b/libc/sysdeps/linux/common/umount.c
index 9090696d5..453ecd27b 100644
--- a/libc/sysdeps/linux/common/umount.c
+++ b/libc/sysdeps/linux/common/umount.c
@@ -15,13 +15,13 @@
/* arch provides umount() syscall */
#ifdef __NR_umount
-_syscall1(int, umount, const char *, specialfile);
+_syscall1(int, umount, const char *, specialfile)
/* arch provides umount2() syscall */
#elif defined __NR_umount2
# define __NR___syscall_umount2 __NR_umount2
-static __inline__ _syscall2(int, __syscall_umount2, const char *, special_file, int, flags);
+static __inline__ _syscall2(int, __syscall_umount2, const char *, special_file, int, flags)
int umount(const char *special_file)
{
diff --git a/libc/sysdeps/linux/common/umount2.c b/libc/sysdeps/linux/common/umount2.c
index 25c24d450..bd44717d4 100644
--- a/libc/sysdeps/linux/common/umount2.c
+++ b/libc/sysdeps/linux/common/umount2.c
@@ -12,7 +12,7 @@
#if defined __USE_GNU
#include <sys/mount.h>
#ifdef __NR_umount2 /* Old kernels don't have umount2 */
-_syscall2(int, umount2, const char *, special_file, int, flags);
+_syscall2(int, umount2, const char *, special_file, int, flags)
#else
int umount2(const char *special_file, int flags)
{
diff --git a/libc/sysdeps/linux/common/uname.c b/libc/sysdeps/linux/common/uname.c
index 22b870370..1e29b9f23 100644
--- a/libc/sysdeps/linux/common/uname.c
+++ b/libc/sysdeps/linux/common/uname.c
@@ -10,7 +10,7 @@
#include <sys/syscall.h>
#include <sys/utsname.h>
-libc_hidden_proto(uname)
+/* libc_hidden_proto(uname) */
-_syscall1(int, uname, struct utsname *, buf);
+_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 313be9e0b..1ad1f2c6d 100644
--- a/libc/sysdeps/linux/common/unlink.c
+++ b/libc/sysdeps/linux/common/unlink.c
@@ -10,7 +10,7 @@
#include <sys/syscall.h>
#include <unistd.h>
-libc_hidden_proto(unlink)
+/* libc_hidden_proto(unlink) */
-_syscall1(int, unlink, const char *, pathname);
+_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 ffc5d77a1..b2b806f39 100644
--- a/libc/sysdeps/linux/common/uselib.c
+++ b/libc/sysdeps/linux/common/uselib.c
@@ -13,6 +13,6 @@ linux specific and we do not use it in uClibc.
#include <unistd.h>
#ifdef __NR_uselib
int uselib (const char *library);
-_syscall1(int, uselib, const char *, library);
+_syscall1(int, uselib, const char *, library)
#endif
#endif
diff --git a/libc/sysdeps/linux/common/ustat.c b/libc/sysdeps/linux/common/ustat.c
index 578763cb5..09edaa369 100644
--- a/libc/sysdeps/linux/common/ustat.c
+++ b/libc/sysdeps/linux/common/ustat.c
@@ -13,7 +13,7 @@
#define __NR___syscall_ustat __NR_ustat
static __inline__ _syscall2(int, __syscall_ustat,
- unsigned short int, kdev_t, struct ustat *, ubuf);
+ unsigned short int, kdev_t, struct ustat *, ubuf)
int ustat(dev_t dev, struct ustat *ubuf)
{
diff --git a/libc/sysdeps/linux/common/utime.c b/libc/sysdeps/linux/common/utime.c
index 6e35be2c1..f87afcfc4 100644
--- a/libc/sysdeps/linux/common/utime.c
+++ b/libc/sysdeps/linux/common/utime.c
@@ -10,16 +10,16 @@
#include <sys/syscall.h>
#include <utime.h>
-libc_hidden_proto(utime)
+/* libc_hidden_proto(utime) */
#ifdef __NR_utime
-_syscall2(int, utime, const char *, file, const struct utimbuf *, times);
+_syscall2(int, utime, const char *, file, const struct utimbuf *, times)
#else
#include <stdlib.h>
#include <sys/time.h>
-libc_hidden_proto(utimes)
-libc_hidden_proto(gettimeofday)
+/* libc_hidden_proto(utimes) */
+/* libc_hidden_proto(gettimeofday) */
int utime(const char *file, const struct utimbuf *times)
{
diff --git a/libc/sysdeps/linux/common/utimes.c b/libc/sysdeps/linux/common/utimes.c
index 83ddb7381..191b1afd8 100644
--- a/libc/sysdeps/linux/common/utimes.c
+++ b/libc/sysdeps/linux/common/utimes.c
@@ -11,15 +11,14 @@
#include <utime.h>
#include <sys/time.h>
-libc_hidden_proto(utimes)
+/* libc_hidden_proto(utimes) */
#ifdef __NR_utimes
-_syscall2(int, utimes, const char *, file, const struct timeval *, tvp);
+_syscall2(int, utimes, const char *, file, const struct timeval *, tvp)
#else
#include <stdlib.h>
-#include <sys/time.h>
-libc_hidden_proto(utime)
+/* libc_hidden_proto(utime) */
int utimes(const char *file, const struct timeval tvp[2])
{
diff --git a/libc/sysdeps/linux/common/vfork.c b/libc/sysdeps/linux/common/vfork.c
index f9634cd5c..eda76aeac 100644
--- a/libc/sysdeps/linux/common/vfork.c
+++ b/libc/sysdeps/linux/common/vfork.c
@@ -12,14 +12,14 @@
#ifdef __ARCH_USE_MMU__
#ifdef __NR_fork
-libc_hidden_proto(fork)
+/* libc_hidden_proto(fork) */
extern __typeof(vfork) __vfork attribute_hidden;
pid_t __vfork(void)
{
return fork();
}
-libc_hidden_proto(vfork)
+/* libc_hidden_proto(vfork) */
weak_alias(__vfork,vfork)
libc_hidden_weak(vfork)
#endif
diff --git a/libc/sysdeps/linux/common/vhangup.c b/libc/sysdeps/linux/common/vhangup.c
index 8989a69d6..77910e68f 100644
--- a/libc/sysdeps/linux/common/vhangup.c
+++ b/libc/sysdeps/linux/common/vhangup.c
@@ -10,5 +10,5 @@
#include <sys/syscall.h>
#include <unistd.h>
#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
-_syscall0(int, vhangup);
+_syscall0(int, vhangup)
#endif
diff --git a/libc/sysdeps/linux/common/vmsplice.c b/libc/sysdeps/linux/common/vmsplice.c
index a0156d772..c5fd6c7ed 100644
--- a/libc/sysdeps/linux/common/vmsplice.c
+++ b/libc/sysdeps/linux/common/vmsplice.c
@@ -10,11 +10,9 @@
#include <sys/syscall.h>
#include <fcntl.h>
-libc_hidden_proto(vmsplice)
-
#ifdef __NR_vmsplice
_syscall4(ssize_t, vmsplice, int, __fdout, const struct iovec *, __iov,
- size_t, __count, unsigned int, __flags);
+ size_t, __count, unsigned int, __flags)
#else
ssize_t vmsplice(int __fdout, const struct iovec *__iov, size_t __count,
unsigned int __flags)
@@ -23,6 +21,3 @@ ssize_t vmsplice(int __fdout, const struct iovec *__iov, size_t __count,
return -1;
}
#endif
-
-libc_hidden_def(vmsplice)
-
diff --git a/libc/sysdeps/linux/common/wait3.c b/libc/sysdeps/linux/common/wait3.c
index 8a2d43f7a..11985e3db 100644
--- a/libc/sysdeps/linux/common/wait3.c
+++ b/libc/sysdeps/linux/common/wait3.c
@@ -11,7 +11,7 @@
#if defined __USE_BSD
-libc_hidden_proto(wait4)
+/* libc_hidden_proto(wait4) */
/* Wait for a child to exit. When one does, put its status in *STAT_LOC and
* return its process ID. For errors return (pid_t) -1. If USAGE is not nil,
diff --git a/libc/sysdeps/linux/common/write.c b/libc/sysdeps/linux/common/write.c
index dbe5c12e6..7776ec955 100644
--- a/libc/sysdeps/linux/common/write.c
+++ b/libc/sysdeps/linux/common/write.c
@@ -12,8 +12,8 @@
extern __typeof(write) __libc_write;
#define __NR___libc_write __NR_write
-_syscall3(ssize_t, __libc_write, int, fd, const __ptr_t, buf, size_t, count);
-libc_hidden_proto(write)
+_syscall3(ssize_t, __libc_write, int, fd, const __ptr_t, buf, size_t, count)
+/* libc_hidden_proto(write) */
weak_alias(__libc_write,write)
libc_hidden_weak(write)
#if 0
diff --git a/libc/sysdeps/linux/common/xattr.c b/libc/sysdeps/linux/common/xattr.c
index 5b4c2f5bf..8a4e3be29 100644
--- a/libc/sysdeps/linux/common/xattr.c
+++ b/libc/sysdeps/linux/common/xattr.c
@@ -28,7 +28,7 @@
/* sets */
#ifdef __NR_setxattr
_syscall5(int, setxattr, const char *, path, const char *, name,
- const void *, value, size_t, size, int, flags);
+ const void *, value, size_t, size, int, flags)
#else
int setxattr(__const char *__path, __const char *__name,
__const void *__value, size_t __size, int __flags)
@@ -40,7 +40,7 @@ int setxattr(__const char *__path, __const char *__name,
#ifdef __NR_lsetxattr
_syscall5(int, lsetxattr, const char *, path, const char *, name,
- const void *, value, size_t, size, int, flags);
+ const void *, value, size_t, size, int, flags)
#else
int lsetxattr(__const char *__path, __const char *__name,
__const void *__value, size_t __size, int __flags)
@@ -52,7 +52,7 @@ int lsetxattr(__const char *__path, __const char *__name,
#ifdef __NR_fsetxattr
_syscall5(int, fsetxattr, int, filedes, const char *, name, const void *,
- value, size_t, size, int, flags);
+ value, size_t, size, int, flags)
#else
int fsetxattr(int __fd, __const char *__name, __const void *__value,
size_t __size, int __flags)
@@ -65,7 +65,7 @@ int fsetxattr(int __fd, __const char *__name, __const void *__value,
/* gets */
#ifdef __NR_getxattr
_syscall4(ssize_t, getxattr, const char *, path, const char *, name,
- void *, value, size_t, size);
+ void *, value, size_t, size)
#else
ssize_t getxattr(__const char *__path, __const char *__name, void *__value,
size_t __size)
@@ -77,7 +77,7 @@ ssize_t getxattr(__const char *__path, __const char *__name, void *__value,
#ifdef __NR_lgetxattr
_syscall4(ssize_t, lgetxattr, const char *, path, const char *, name,
- void *, value, size_t, size);
+ void *, value, size_t, size)
#else
ssize_t lgetxattr(__const char *__path, __const char *__name,
void *__value, size_t __size)
@@ -89,7 +89,7 @@ ssize_t lgetxattr(__const char *__path, __const char *__name,
#ifdef __NR_fgetxattr
_syscall4(ssize_t, fgetxattr, int, filedes, const char *, name, void *,
- value, size_t, size);
+ value, size_t, size)
#else
ssize_t fgetxattr(int __fd, __const char *__name, void *__value,
size_t __size)
@@ -102,7 +102,7 @@ ssize_t fgetxattr(int __fd, __const char *__name, void *__value,
/* list */
#ifdef __NR_listxattr
_syscall3(ssize_t, listxattr, const char *, path, char *, list, size_t,
- size);
+ size)
#else
ssize_t listxattr(__const char *__path, char *__list, size_t __size)
{
@@ -113,7 +113,7 @@ ssize_t listxattr(__const char *__path, char *__list, size_t __size)
#ifdef __NR_llistxattr
_syscall3(ssize_t, llistxattr, const char *, path, char *, list, size_t,
- size);
+ size)
#else
ssize_t llistxattr(__const char *__path, char *__list, size_t __size)
{
@@ -123,7 +123,7 @@ ssize_t llistxattr(__const char *__path, char *__list, size_t __size)
#endif
#ifdef __NR_flistxattr
-_syscall3(ssize_t, flistxattr, int, filedes, char *, list, size_t, size);
+_syscall3(ssize_t, flistxattr, int, filedes, char *, list, size_t, size)
#else
ssize_t flistxattr(int __fd, char *__list, size_t __size)
{
@@ -134,7 +134,7 @@ ssize_t flistxattr(int __fd, char *__list, size_t __size)
/* remove */
#ifdef __NR_removexattr
-_syscall2(int, removexattr, const char *, path, const char *, name);
+_syscall2(int, removexattr, const char *, path, const char *, name)
#else
int removexattr(__const char *__path, __const char *__name)
{
@@ -144,7 +144,7 @@ int removexattr(__const char *__path, __const char *__name)
#endif
#ifdef __NR_lremovexattr
-_syscall2(int, lremovexattr, const char *, path, const char *, name);
+_syscall2(int, lremovexattr, const char *, path, const char *, name)
#else
int lremovexattr(__const char *__path, __const char *__name)
{
@@ -154,7 +154,7 @@ int lremovexattr(__const char *__path, __const char *__name)
#endif
#ifdef __NR_fremovexattr
-_syscall2(int, fremovexattr, int, filedes, const char *, name);
+_syscall2(int, fremovexattr, int, filedes, const char *, name)
#else
int fremovexattr(int __fd, __const char *__name)
{
diff --git a/libc/termios/cfsetspeed.c b/libc/termios/cfsetspeed.c
index 5d5eb8cda..bbafda0af 100644
--- a/libc/termios/cfsetspeed.c
+++ b/libc/termios/cfsetspeed.c
@@ -22,8 +22,8 @@
#ifdef __USE_BSD
-libc_hidden_proto(cfsetispeed)
-libc_hidden_proto(cfsetospeed)
+/* libc_hidden_proto(cfsetispeed) */
+/* libc_hidden_proto(cfsetospeed) */
struct speed_struct
{
diff --git a/libc/termios/isatty.c b/libc/termios/isatty.c
index 7532f334b..071bb35d9 100644
--- a/libc/termios/isatty.c
+++ b/libc/termios/isatty.c
@@ -19,8 +19,8 @@
#include <unistd.h>
#include <termios.h>
-libc_hidden_proto(isatty)
-libc_hidden_proto(tcgetattr)
+/* libc_hidden_proto(isatty) */
+/* libc_hidden_proto(tcgetattr) */
/* Return 1 if FD is a terminal, 0 if not. */
int isatty (int fd)
diff --git a/libc/termios/speed.c b/libc/termios/speed.c
index 52647b9cc..d4eabd9a1 100644
--- a/libc/termios/speed.c
+++ b/libc/termios/speed.c
@@ -22,8 +22,8 @@
#include <errno.h>
#include <termios.h>
-libc_hidden_proto(cfsetispeed)
-libc_hidden_proto(cfsetospeed)
+/* libc_hidden_proto(cfsetispeed) */
+/* libc_hidden_proto(cfsetospeed) */
/* This is a gross hack around a kernel bug. If the cfsetispeed functions
is called with the SPEED argument set to zero this means use the same
diff --git a/libc/termios/tcflow.c b/libc/termios/tcflow.c
index 63f96a860..6a1bf12f6 100644
--- a/libc/termios/tcflow.c
+++ b/libc/termios/tcflow.c
@@ -21,7 +21,7 @@
#include <termios.h>
#include <sys/ioctl.h>
-libc_hidden_proto(ioctl)
+/* libc_hidden_proto(ioctl) */
/* Suspend or restart transmission on FD. */
int tcflow (int fd, int action)
diff --git a/libc/termios/tcflush.c b/libc/termios/tcflush.c
index 159231fb1..28e88c854 100644
--- a/libc/termios/tcflush.c
+++ b/libc/termios/tcflush.c
@@ -21,7 +21,7 @@
#include <termios.h>
#include <sys/ioctl.h>
-libc_hidden_proto(ioctl)
+/* libc_hidden_proto(ioctl) */
/* Flush pending data on FD. */
int
diff --git a/libc/termios/tcgetattr.c b/libc/termios/tcgetattr.c
index 26554b6e5..47b885800 100644
--- a/libc/termios/tcgetattr.c
+++ b/libc/termios/tcgetattr.c
@@ -23,11 +23,11 @@
#include <sys/ioctl.h>
#include <sys/types.h>
-libc_hidden_proto(ioctl)
+/* libc_hidden_proto(ioctl) */
/* Experimentally off - libc_hidden_proto(memset) */
/* Experimentally off - libc_hidden_proto(memcpy) */
/* Experimentally off - libc_hidden_proto(mempcpy) */
-libc_hidden_proto(tcgetattr)
+/* libc_hidden_proto(tcgetattr) */
/* The difference here is that the termios structure used in the
kernel is not the same as we use in the libc. Therefore we must
@@ -41,40 +41,41 @@ int tcgetattr (int fd, struct termios *termios_p)
int retval;
retval = ioctl (fd, TCGETS, &k_termios);
-
- termios_p->c_iflag = k_termios.c_iflag;
- termios_p->c_oflag = k_termios.c_oflag;
- termios_p->c_cflag = k_termios.c_cflag;
- termios_p->c_lflag = k_termios.c_lflag;
- termios_p->c_line = k_termios.c_line;
+ if(likely(retval == 0)) {
+ termios_p->c_iflag = k_termios.c_iflag;
+ termios_p->c_oflag = k_termios.c_oflag;
+ termios_p->c_cflag = k_termios.c_cflag;
+ termios_p->c_lflag = k_termios.c_lflag;
+ termios_p->c_line = k_termios.c_line;
#ifdef _HAVE_C_ISPEED
- termios_p->c_ispeed = k_termios.c_ispeed;
+ termios_p->c_ispeed = k_termios.c_ispeed;
#endif
#ifdef _HAVE_C_OSPEED
- termios_p->c_ospeed = k_termios.c_ospeed;
+ termios_p->c_ospeed = k_termios.c_ospeed;
#endif
- if (sizeof (cc_t) == 1 || _POSIX_VDISABLE == 0
- || (unsigned char) _POSIX_VDISABLE == (unsigned char) -1)
- {
- memset (mempcpy (&termios_p->c_cc[0], &k_termios.c_cc[0],
- __KERNEL_NCCS * sizeof (cc_t)),
- _POSIX_VDISABLE, (NCCS - __KERNEL_NCCS) * sizeof (cc_t));
+ if (sizeof (cc_t) == 1 || _POSIX_VDISABLE == 0
+ || (unsigned char) _POSIX_VDISABLE == (unsigned char) -1)
+ {
+ memset (mempcpy (&termios_p->c_cc[0], &k_termios.c_cc[0],
+ __KERNEL_NCCS * sizeof (cc_t)),
+ _POSIX_VDISABLE, (NCCS - __KERNEL_NCCS) * sizeof (cc_t));
#if 0
- memset ( (memcpy (&termios_p->c_cc[0], &k_termios.c_cc[0],
- __KERNEL_NCCS * sizeof (cc_t)) + (__KERNEL_NCCS * sizeof (cc_t))) ,
- _POSIX_VDISABLE, (NCCS - __KERNEL_NCCS) * sizeof (cc_t));
+ memset ( (memcpy (&termios_p->c_cc[0], &k_termios.c_cc[0],
+ __KERNEL_NCCS * sizeof (cc_t)) + (__KERNEL_NCCS * sizeof (cc_t))) ,
+ _POSIX_VDISABLE, (NCCS - __KERNEL_NCCS) * sizeof (cc_t));
#endif
- } else {
- size_t cnt;
+ } else {
+ size_t cnt;
- memcpy (&termios_p->c_cc[0], &k_termios.c_cc[0],
- __KERNEL_NCCS * sizeof (cc_t));
+ memcpy (&termios_p->c_cc[0], &k_termios.c_cc[0],
+ __KERNEL_NCCS * sizeof (cc_t));
- for (cnt = __KERNEL_NCCS; cnt < NCCS; ++cnt)
- termios_p->c_cc[cnt] = _POSIX_VDISABLE;
- }
+ for (cnt = __KERNEL_NCCS; cnt < NCCS; ++cnt)
+ termios_p->c_cc[cnt] = _POSIX_VDISABLE;
+ }
+ }
return retval;
}
diff --git a/libc/termios/tcgetpgrp.c b/libc/termios/tcgetpgrp.c
index 1ad317139..677e8b4dc 100644
--- a/libc/termios/tcgetpgrp.c
+++ b/libc/termios/tcgetpgrp.c
@@ -21,8 +21,8 @@
#include <unistd.h>
#include <sys/types.h>
-libc_hidden_proto(tcgetpgrp)
-libc_hidden_proto(ioctl)
+/* libc_hidden_proto(tcgetpgrp) */
+/* libc_hidden_proto(ioctl) */
/* Return the foreground process group ID of FD. */
pid_t tcgetpgrp (int fd)
diff --git a/libc/termios/tcgetsid.c b/libc/termios/tcgetsid.c
index 8d3a40242..b5d7cb697 100644
--- a/libc/termios/tcgetsid.c
+++ b/libc/termios/tcgetsid.c
@@ -22,9 +22,9 @@
#include <sys/types.h>
#include <unistd.h>
-libc_hidden_proto(ioctl)
-libc_hidden_proto(getsid)
-libc_hidden_proto(tcgetpgrp)
+/* libc_hidden_proto(ioctl) */
+/* libc_hidden_proto(getsid) */
+/* libc_hidden_proto(tcgetpgrp) */
/* Return the session ID of FD. */
pid_t
diff --git a/libc/termios/tcsendbrk.c b/libc/termios/tcsendbrk.c
index ae04cb947..53ea662a7 100644
--- a/libc/termios/tcsendbrk.c
+++ b/libc/termios/tcsendbrk.c
@@ -22,7 +22,7 @@
#include <termios.h>
#include <sys/ioctl.h>
-libc_hidden_proto(ioctl)
+/* libc_hidden_proto(ioctl) */
/* Send zero bits on FD. */
int
diff --git a/libc/termios/tcsetattr.c b/libc/termios/tcsetattr.c
index d0d82c2ac..9f5533e08 100644
--- a/libc/termios/tcsetattr.c
+++ b/libc/termios/tcsetattr.c
@@ -22,9 +22,9 @@
#include <sys/ioctl.h>
#include <sys/types.h>
-libc_hidden_proto(tcsetattr)
+/* libc_hidden_proto(tcsetattr) */
/* Experimentally off - libc_hidden_proto(memcpy) */
-libc_hidden_proto(ioctl)
+/* libc_hidden_proto(ioctl) */
/* The difference here is that the termios structure used in the
kernel is not the same as we use in the libc. Therefore we must
diff --git a/libc/termios/tcsetpgrp.c b/libc/termios/tcsetpgrp.c
index 9bf1cdaef..dbf07f216 100644
--- a/libc/termios/tcsetpgrp.c
+++ b/libc/termios/tcsetpgrp.c
@@ -21,7 +21,7 @@
#include <errno.h>
#include <unistd.h>
-libc_hidden_proto(ioctl)
+/* libc_hidden_proto(ioctl) */
/* Set the foreground process group ID of FD set PGRP_ID. */
int tcsetpgrp (int fd, pid_t pgrp_id)
diff --git a/libc/termios/ttyname.c b/libc/termios/ttyname.c
index 9d6a8ce36..ac25c7658 100644
--- a/libc/termios/ttyname.c
+++ b/libc/termios/ttyname.c
@@ -31,15 +31,15 @@
#include <dirent.h>
#include <sys/stat.h>
-libc_hidden_proto(ttyname_r)
-libc_hidden_proto(fstat)
-libc_hidden_proto(lstat)
+/* libc_hidden_proto(ttyname_r) */
+/* libc_hidden_proto(fstat) */
+/* libc_hidden_proto(lstat) */
/* Experimentally off - libc_hidden_proto(strcpy) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(opendir)
-libc_hidden_proto(closedir)
-libc_hidden_proto(readdir)
-libc_hidden_proto(isatty)
+/* libc_hidden_proto(opendir) */
+/* libc_hidden_proto(closedir) */
+/* libc_hidden_proto(readdir) */
+/* libc_hidden_proto(isatty) */
#define TTYNAME_BUFLEN 32
diff --git a/libc/unistd/daemon.c b/libc/unistd/daemon.c
index 88ed5154f..f5b9f44f6 100644
--- a/libc/unistd/daemon.c
+++ b/libc/unistd/daemon.c
@@ -53,13 +53,13 @@
#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
-libc_hidden_proto(open)
+/* libc_hidden_proto(open) */
/* libc_hidden_proto(close) */
-libc_hidden_proto(_exit)
-libc_hidden_proto(dup2)
-libc_hidden_proto(setsid)
-libc_hidden_proto(chdir)
-libc_hidden_proto(fork)
+/* libc_hidden_proto(_exit) */
+/* libc_hidden_proto(dup2) */
+/* libc_hidden_proto(setsid) */
+/* libc_hidden_proto(chdir) */
+/* libc_hidden_proto(fork) */
int daemon( int nochdir, int noclose )
{
diff --git a/libc/unistd/exec.c b/libc/unistd/exec.c
index 9134e4370..91ba7bba8 100644
--- a/libc/unistd/exec.c
+++ b/libc/unistd/exec.c
@@ -27,19 +27,19 @@
#include <unistd.h>
#include <sys/mman.h>
-libc_hidden_proto(execl)
-libc_hidden_proto(execle)
-libc_hidden_proto(execlp)
-libc_hidden_proto(execv)
-libc_hidden_proto(execvp)
+/* libc_hidden_proto(execl) */
+/* libc_hidden_proto(execle) */
+/* libc_hidden_proto(execlp) */
+/* libc_hidden_proto(execv) */
+/* libc_hidden_proto(execvp) */
/* Experimentally off - libc_hidden_proto(memcpy) */
/* Experimentally off - libc_hidden_proto(strchr) */
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(execve)
-libc_hidden_proto(mmap)
-libc_hidden_proto(munmap)
-libc_hidden_proto(getenv)
+/* libc_hidden_proto(execve) */
+/* libc_hidden_proto(mmap) */
+/* libc_hidden_proto(munmap) */
+/* libc_hidden_proto(getenv) */
/**********************************************************************/
#define EXEC_FUNC_COMMON 0
diff --git a/libc/unistd/fpathconf.c b/libc/unistd/fpathconf.c
index d7378630d..439525a2a 100644
--- a/libc/unistd/fpathconf.c
+++ b/libc/unistd/fpathconf.c
@@ -20,10 +20,7 @@
#include <errno.h>
#include <unistd.h>
#include <limits.h>
-#include <sys/statfs.h>
-#include <errno.h>
#include <stddef.h>
-#include <limits.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/statfs.h>
@@ -31,7 +28,7 @@
//#include "linux_fsinfo.h"
-libc_hidden_proto(fstat)
+/* libc_hidden_proto(fstat) */
#ifndef __USE_FILE_OFFSET64
extern int fstatfs (int __fildes, struct statfs *__buf)
@@ -46,7 +43,6 @@ extern int fstatfs (int __fildes, struct statfs *__buf)
#endif
extern __typeof(fstatfs) __libc_fstatfs;
-libc_hidden_proto(__libc_fstatfs)
/* The Linux kernel headers mention this as a kind of generic value. */
#define LINUX_LINK_MAX 127
diff --git a/libc/unistd/getlogin.c b/libc/unistd/getlogin.c
index 1998a7fc8..e97b662f1 100644
--- a/libc/unistd/getlogin.c
+++ b/libc/unistd/getlogin.c
@@ -12,7 +12,7 @@
/* Experimentally off - libc_hidden_proto(strcpy) */
/* Experimentally off - libc_hidden_proto(strncpy) */
-libc_hidden_proto(getenv)
+/* libc_hidden_proto(getenv) */
/* uClibc makes it policy to not mess with the utmp file whenever
* possible, since I consider utmp a complete waste of time. Since
@@ -20,7 +20,7 @@ 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)
+/* libc_hidden_proto(getlogin) */
char * getlogin(void)
{
return (getenv("LOGNAME"));
diff --git a/libc/unistd/getopt-susv3.c b/libc/unistd/getopt-susv3.c
index fc8e32111..00c08d114 100644
--- a/libc/unistd/getopt-susv3.c
+++ b/libc/unistd/getopt-susv3.c
@@ -46,7 +46,7 @@ int optind = 1;
int optopt = 0;
char *optarg = NULL;
-libc_hidden_proto(getopt)
+/* libc_hidden_proto(getopt) */
int getopt(int argc, char * const argv[], const char *optstring)
{
static const char *o; /* multi opt position */
diff --git a/libc/unistd/getopt.c b/libc/unistd/getopt.c
index cdd0c2029..d2020fe03 100644
--- a/libc/unistd/getopt.c
+++ b/libc/unistd/getopt.c
@@ -125,7 +125,7 @@
/* Experimentally off - libc_hidden_proto(strcmp) */
/* Experimentally off - libc_hidden_proto(strlen) */
/* Experimentally off - libc_hidden_proto(strncmp) */
-libc_hidden_proto(getenv)
+/* libc_hidden_proto(getenv) */
/* libc_hidden_proto(fprintf) */
/* For communication from `getopt' to the caller.
@@ -1180,6 +1180,7 @@ getopt (int argc, char *const *argv, const char *optstring)
(int *) 0,
0);
}
+libc_hidden_def(getopt)
int
getopt_long (int argc, char *const *argv, const char *options,
diff --git a/libc/unistd/getopt_long-simple.c b/libc/unistd/getopt_long-simple.c
index 2dae341a3..233884438 100644
--- a/libc/unistd/getopt_long-simple.c
+++ b/libc/unistd/getopt_long-simple.c
@@ -8,7 +8,7 @@
#include <getopt.h>
#include <stdio.h>
-libc_hidden_proto(getopt)
+/* libc_hidden_proto(getopt) */
static int __getopt_long(int argc, char *const *argv, const char *optstring, const struct option *longopts, int *idx, int longonly)
{
diff --git a/libc/unistd/getpass.c b/libc/unistd/getpass.c
index d3b41e95e..ee54429a0 100644
--- a/libc/unistd/getpass.c
+++ b/libc/unistd/getpass.c
@@ -20,23 +20,22 @@
#include <string.h>
#include <termios.h>
#include <unistd.h>
-#include <string.h>
#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
/* Experimentally off - libc_hidden_proto(strlen) */
-libc_hidden_proto(tcsetattr)
-libc_hidden_proto(tcgetattr)
-libc_hidden_proto(setvbuf)
-libc_hidden_proto(fopen)
+/* libc_hidden_proto(tcsetattr) */
+/* libc_hidden_proto(tcgetattr) */
+/* libc_hidden_proto(setvbuf) */
+/* libc_hidden_proto(fopen) */
/* libc_hidden_proto(fclose) */
-libc_hidden_proto(fileno)
-libc_hidden_proto(fflush)
-libc_hidden_proto(fgets)
-libc_hidden_proto(fputs)
-libc_hidden_proto(fputc)
-libc_hidden_proto(putc)
-libc_hidden_proto(__fputc_unlocked)
+/* libc_hidden_proto(fileno) */
+/* libc_hidden_proto(fflush) */
+/* libc_hidden_proto(fgets) */
+/* libc_hidden_proto(fputs) */
+/* libc_hidden_proto(fputc) */
+/* libc_hidden_proto(putc) */
+/* libc_hidden_proto(__fputc_unlocked) */
/* It is desirable to use this bit on systems that have it.
The only bit of terminal state we want to twiddle is echoing, which is
diff --git a/libc/unistd/pathconf.c b/libc/unistd/pathconf.c
index 7f7efbb7f..9895e028a 100644
--- a/libc/unistd/pathconf.c
+++ b/libc/unistd/pathconf.c
@@ -32,8 +32,7 @@
//#include <sys/statvfs.h>
extern __typeof(statfs) __libc_statfs;
-libc_hidden_proto(__libc_statfs)
-libc_hidden_proto(stat)
+/* libc_hidden_proto(stat) */
/* The Linux kernel headers mention this as a kind of generic value. */
diff --git a/libc/unistd/sleep.c b/libc/unistd/sleep.c
index c5c9cdd21..e7152c46b 100644
--- a/libc/unistd/sleep.c
+++ b/libc/unistd/sleep.c
@@ -23,10 +23,10 @@
#include <signal.h>
#include <unistd.h>
-libc_hidden_proto(sleep)
+/* libc_hidden_proto(sleep) */
-libc_hidden_proto(sigaction)
-libc_hidden_proto(sigprocmask)
+/* libc_hidden_proto(sigaction) */
+/* libc_hidden_proto(sigprocmask) */
/* version perusing nanosleep */
#if defined __UCLIBC_HAS_REALTIME__
@@ -118,7 +118,7 @@ unsigned int sleep (unsigned int seconds)
}
#endif
#else /* __UCLIBC_HAS_REALTIME__ */
-libc_hidden_proto(sigaction)
+/* libc_hidden_proto(sigaction) */
/* no nanosleep, use signals and alarm() */
static void sleep_alarm_handler(int attribute_unused sig)
{
@@ -145,12 +145,12 @@ unsigned int sleep (unsigned int seconds)
act.sa_flags = 0;
act.sa_mask = oset;
if (sigaction(SIGALRM, &act, &oact) < 0)
- return seconds;
+ return seconds;
before = time(NULL);
remaining = alarm(seconds);
if (remaining && remaining > seconds) {
- /* restore user's alarm */
+ /* restore user's alarm */
(void) sigaction(SIGALRM, &oact, (struct sigaction *) NULL);
alarm(remaining); /* restore old alarm */
sigsuspend(&oset);
diff --git a/libc/unistd/sysconf.c b/libc/unistd/sysconf.c
index c1644eaa1..3d30ccea5 100644
--- a/libc/unistd/sysconf.c
+++ b/libc/unistd/sysconf.c
@@ -37,10 +37,10 @@
#include <sysdep.h>
#endif
-libc_hidden_proto(sysconf)
+/* libc_hidden_proto(sysconf) */
-libc_hidden_proto(getpagesize)
-libc_hidden_proto(getdtablesize)
+/* libc_hidden_proto(getpagesize) */
+/* libc_hidden_proto(getdtablesize) */
#ifndef __UCLIBC_CLK_TCK_CONST
#error __UCLIBC_CLK_TCK_CONST not defined!
diff --git a/libc/unistd/ualarm.c b/libc/unistd/ualarm.c
index 07bea2a50..191f996b5 100644
--- a/libc/unistd/ualarm.c
+++ b/libc/unistd/ualarm.c
@@ -9,7 +9,7 @@
#include <sys/types.h>
#include <unistd.h>
-libc_hidden_proto(setitimer)
+/* libc_hidden_proto(setitimer) */
useconds_t ualarm(useconds_t value, useconds_t interval)
{
diff --git a/libc/unistd/usershell.c b/libc/unistd/usershell.c
index 219e3fdc8..9896bd3ef 100644
--- a/libc/unistd/usershell.c
+++ b/libc/unistd/usershell.c
@@ -42,12 +42,12 @@
#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
-libc_hidden_proto(fstat)
-libc_hidden_proto(fopen)
+/* libc_hidden_proto(fstat) */
+/* libc_hidden_proto(fopen) */
/* libc_hidden_proto(fclose) */
-libc_hidden_proto(__fsetlocking)
-libc_hidden_proto(fileno)
-libc_hidden_proto(fgets_unlocked)
+/* libc_hidden_proto(__fsetlocking) */
+/* libc_hidden_proto(fileno) */
+/* libc_hidden_proto(fgets_unlocked) */
#ifdef __UCLIBC_HAS_XLOCALE__
/* libc_hidden_proto(__ctype_b_loc) */
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
diff --git a/libc/unistd/usleep.c b/libc/unistd/usleep.c
index 8a27f900a..daeda0982 100644
--- a/libc/unistd/usleep.c
+++ b/libc/unistd/usleep.c
@@ -22,7 +22,7 @@ int usleep (__useconds_t usec)
return(nanosleep(&ts, NULL));
}
#else /* __UCLIBC_HAS_REALTIME__ */
-libc_hidden_proto(select)
+/* libc_hidden_proto(select) */
int usleep (__useconds_t usec)
{
struct timeval tv;