From af0172162f7c653cad6a11ed1c1a5459bc154465 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 14 Jan 2006 00:58:03 +0000 Subject: hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed --- libc/inet/addr.c | 45 ++-- libc/inet/ether_addr.c | 19 +- libc/inet/getaddrinfo.c | 114 +++++---- libc/inet/getnetbyad.c | 8 +- libc/inet/getnetbynm.c | 13 +- libc/inet/getnetent.c | 25 +- libc/inet/getproto.c | 60 +++-- libc/inet/getservice.c | 69 +++--- libc/inet/herror.c | 7 +- libc/inet/hostid.c | 32 ++- libc/inet/if_index.c | 57 +++-- libc/inet/ifaddrs.c | 31 ++- libc/inet/in6_addr.c | 6 +- libc/inet/inet_net.c | 7 +- libc/inet/ntop.c | 37 +-- libc/inet/opensock.c | 6 +- libc/inet/resolv.c | 315 ++++++++++++------------- libc/inet/rpc/auth_none.c | 13 +- libc/inet/rpc/auth_unix.c | 50 ++-- libc/inet/rpc/authunix_prot.c | 18 +- libc/inet/rpc/bindresvport.c | 17 +- libc/inet/rpc/clnt_generic.c | 30 +-- libc/inet/rpc/clnt_perror.c | 101 ++++---- libc/inet/rpc/clnt_raw.c | 19 +- libc/inet/rpc/clnt_simple.c | 18 +- libc/inet/rpc/clnt_tcp.c | 64 ++--- libc/inet/rpc/clnt_udp.c | 79 ++++--- libc/inet/rpc/clnt_unix.c | 71 +++--- libc/inet/rpc/create_xid.c | 8 +- libc/inet/rpc/get_myaddress.c | 28 ++- libc/inet/rpc/getrpcent.c | 96 ++++---- libc/inet/rpc/getrpcport.c | 9 +- libc/inet/rpc/pmap_clnt.c | 53 +++-- libc/inet/rpc/pmap_getmaps.c | 6 +- libc/inet/rpc/pmap_getport.c | 15 +- libc/inet/rpc/pmap_prot.c | 3 +- libc/inet/rpc/pmap_prot2.c | 5 +- libc/inet/rpc/pmap_rmt.c | 74 +++--- libc/inet/rpc/rcmd.c | 159 +++++++------ libc/inet/rpc/rexec.c | 95 ++++---- libc/inet/rpc/rpc_callmsg.c | 28 ++- libc/inet/rpc/rpc_dtablesize.c | 11 +- libc/inet/rpc/rpc_private.h | 5 +- libc/inet/rpc/rpc_prot.c | 52 ++-- libc/inet/rpc/rpc_thread.c | 48 ++-- libc/inet/rpc/rtime.c | 19 +- libc/inet/rpc/ruserpass.c | 123 +++++----- libc/inet/rpc/svc.c | 131 ++++++----- libc/inet/rpc/svc_auth.c | 7 +- libc/inet/rpc/svc_auth_unix.c | 12 +- libc/inet/rpc/svc_raw.c | 8 +- libc/inet/rpc/svc_run.c | 16 +- libc/inet/rpc/svc_simple.c | 34 +-- libc/inet/rpc/svc_tcp.c | 59 +++-- libc/inet/rpc/svc_udp.c | 78 +++--- libc/inet/rpc/svc_unix.c | 72 +++--- libc/inet/rpc/xdr.c | 137 ++++++----- libc/inet/rpc/xdr_array.c | 19 +- libc/inet/rpc/xdr_mem.c | 13 +- libc/inet/rpc/xdr_rec.c | 43 ++-- libc/inet/rpc/xdr_reference.c | 21 +- libc/inet/rpc/xdr_stdio.c | 12 +- libc/inet/socketcalls.c | 98 ++++---- libc/misc/assert/__assert.c | 3 + libc/misc/ctype/ctype.c | 34 +-- libc/misc/dirent/alphasort.c | 4 +- libc/misc/dirent/alphasort64.c | 3 +- libc/misc/dirent/closedir.c | 9 +- libc/misc/dirent/dirfd.c | 11 +- libc/misc/dirent/dirstream.h | 4 +- libc/misc/dirent/opendir.c | 19 +- libc/misc/dirent/readdir.c | 6 +- libc/misc/dirent/readdir64.c | 6 +- libc/misc/dirent/readdir64_r.c | 4 +- libc/misc/dirent/readdir_r.c | 4 +- libc/misc/dirent/rewinddir.c | 3 +- libc/misc/dirent/scandir.c | 40 +--- libc/misc/dirent/scandir64.c | 13 +- libc/misc/dirent/seekdir.c | 4 +- libc/misc/error/err.c | 48 ++-- libc/misc/error/error.c | 24 +- libc/misc/file/lockf.c | 20 +- libc/misc/file/lockf64.c | 21 +- libc/misc/fnmatch/fnmatch.c | 118 +++++----- libc/misc/fnmatch/fnmatch_loop.c | 6 +- libc/misc/fnmatch/fnmatch_old.c | 11 +- libc/misc/ftw/ftw.c | 65 ++--- libc/misc/ftw/ftw64.c | 4 +- libc/misc/glob/glob.c | 57 +++-- libc/misc/glob/glob64.c | 6 +- libc/misc/gnu/obstack.c | 23 +- libc/misc/internals/__uClibc_main.c | 45 ++-- libc/misc/internals/tempname.c | 43 ++-- libc/misc/locale/locale.c | 119 +++++----- libc/misc/mntent/mntent.c | 37 ++- libc/misc/regex/regcomp.c | 5 +- libc/misc/regex/regex.c | 69 +++--- libc/misc/regex/regex_old.c | 49 ++-- libc/misc/search/hsearch.c | 8 +- libc/misc/search/hsearch_r.c | 25 +- libc/misc/search/lsearch.c | 13 +- libc/misc/search/tsearch.c | 16 +- libc/misc/statfs/fstatfs64.c | 19 +- libc/misc/statfs/fstatvfs.c | 8 +- libc/misc/statfs/fstatvfs64.c | 9 +- libc/misc/statfs/internal_statvfs.c | 48 ++-- libc/misc/statfs/statfs64.c | 18 +- libc/misc/statfs/statvfs.c | 7 +- libc/misc/statfs/statvfs64.c | 6 +- libc/misc/syslog/syslog.c | 108 +++++---- libc/misc/sysvipc/ftok.c | 4 +- libc/misc/sysvipc/shm.c | 4 +- libc/misc/time/adjtime.c | 8 +- libc/misc/time/ftime.c | 4 +- libc/misc/time/time.c | 235 +++++++++--------- libc/misc/ttyent/getttyent.c | 30 ++- libc/misc/utmp/utent.c | 51 ++-- libc/misc/utmp/wtent.c | 54 ++--- libc/misc/wchar/Makefile.in | 2 +- libc/misc/wchar/wchar.c | 115 +++++---- libc/misc/wchar/wstdio.c | 27 ++- libc/misc/wctype/wctype.c | 175 +++++++------- libc/misc/wordexp/wordexp.c | 136 ++++++----- libc/pwd_grp/lckpwdf.c | 45 ++-- libc/pwd_grp/pwd_grp.c | 179 +++++++------- libc/pwd_grp/pwd_grp_internal.c | 5 +- libc/signal/killpg.c | 3 +- libc/signal/raise.c | 16 +- libc/signal/sigaction.c | 14 +- libc/signal/sigaddset.c | 2 + libc/signal/sigblock.c | 10 +- libc/signal/sigdelset.c | 6 +- libc/signal/sigempty.c | 6 +- libc/signal/sigfillset.c | 12 +- libc/signal/siggetmask.c | 5 +- libc/signal/sighold.c | 7 +- libc/signal/sigignore.c | 3 +- libc/signal/sigintr.c | 4 +- libc/signal/sigjmp.c | 4 +- libc/signal/signal.c | 10 +- libc/signal/sigpause.c | 18 +- libc/signal/sigrelse.c | 9 +- libc/signal/sigset.c | 8 +- libc/signal/sigsetmask.c | 11 +- libc/signal/sigwait.c | 12 +- libc/signal/sysv_signal.c | 3 +- libc/stdio/_READ.c | 5 +- libc/stdio/__fsetlocking.c | 5 +- libc/stdio/_cs_funcs.c | 23 +- libc/stdio/_flushlbf.c | 2 + libc/stdio/_fopen.c | 10 +- libc/stdio/_fpmaxtostr.c | 4 +- libc/stdio/_fwrite.c | 11 +- libc/stdio/_stdio.c | 7 +- libc/stdio/_stdio.h | 70 +----- libc/stdio/_trans2w.c | 4 +- libc/stdio/_uintmaxtostr.c | 10 +- libc/stdio/_wfwrite.c | 10 +- libc/stdio/asprintf.c | 9 +- libc/stdio/clearerr.c | 7 +- libc/stdio/ctermid.c | 4 +- libc/stdio/dprintf.c | 4 +- libc/stdio/fclose.c | 11 +- libc/stdio/fcloseall.c | 2 + libc/stdio/fdopen.c | 9 +- libc/stdio/feof.c | 7 +- libc/stdio/ferror.c | 7 +- libc/stdio/fflush.c | 20 +- libc/stdio/fgetc.c | 41 +++- libc/stdio/fgetpos.c | 4 +- libc/stdio/fgetpos64.c | 2 +- libc/stdio/fgets.c | 23 +- libc/stdio/fgetwc.c | 28 ++- libc/stdio/fgetws.c | 15 +- libc/stdio/fileno.c | 19 +- libc/stdio/fmemopen.c | 9 +- libc/stdio/fopen.c | 7 +- libc/stdio/fopen64.c | 1 - libc/stdio/fopencookie.c | 5 +- libc/stdio/fprintf.c | 10 +- libc/stdio/fputc.c | 34 ++- libc/stdio/fputs.c | 25 +- libc/stdio/fputwc.c | 16 +- libc/stdio/fputws.c | 25 +- libc/stdio/fread.c | 23 +- libc/stdio/freopen.c | 2 + libc/stdio/fseeko.c | 18 +- libc/stdio/fseeko64.c | 2 +- libc/stdio/fsetpos.c | 4 +- libc/stdio/fsetpos64.c | 2 +- libc/stdio/ftello.c | 18 +- libc/stdio/ftello64.c | 2 +- libc/stdio/fwprintf.c | 4 +- libc/stdio/fwrite.c | 18 +- libc/stdio/getchar.c | 10 +- libc/stdio/getdelim.c | 8 +- libc/stdio/getline.c | 9 +- libc/stdio/gets.c | 5 +- libc/stdio/getw.c | 4 +- libc/stdio/getwchar.c | 13 +- libc/stdio/old_vfprintf.c | 23 +- libc/stdio/open_memstream.c | 17 +- libc/stdio/perror.c | 10 +- libc/stdio/popen.c | 36 +-- libc/stdio/printf.c | 9 +- libc/stdio/putchar.c | 10 +- libc/stdio/puts.c | 7 +- libc/stdio/putw.c | 6 +- libc/stdio/putwchar.c | 14 +- libc/stdio/remove.c | 11 +- libc/stdio/rewind.c | 9 +- libc/stdio/scanf.c | 114 +++++---- libc/stdio/setbuf.c | 4 +- libc/stdio/setbuffer.c | 4 +- libc/stdio/setlinebuf.c | 4 +- libc/stdio/setvbuf.c | 5 +- libc/stdio/snprintf.c | 9 +- libc/stdio/sprintf.c | 9 +- libc/stdio/swprintf.c | 4 +- libc/stdio/tempnam.c | 4 +- libc/stdio/tmpfile.c | 11 +- libc/stdio/tmpnam.c | 4 +- libc/stdio/ungetc.c | 5 +- libc/stdio/ungetwc.c | 5 +- libc/stdio/vasprintf.c | 22 +- libc/stdio/vdprintf.c | 12 +- libc/stdio/vfprintf.c | 51 ++-- libc/stdio/vprintf.c | 4 +- libc/stdio/vsnprintf.c | 23 +- libc/stdio/vsprintf.c | 4 +- libc/stdio/vswprintf.c | 9 +- libc/stdio/vwprintf.c | 4 +- libc/stdio/wprintf.c | 4 +- libc/stdlib/abort.c | 25 +- libc/stdlib/atexit.c | 11 +- libc/stdlib/drand48.c | 4 +- libc/stdlib/drand48_r.c | 4 +- libc/stdlib/erand48.c | 3 +- libc/stdlib/erand48_r.c | 5 +- libc/stdlib/gcvt.c | 4 +- libc/stdlib/getenv.c | 35 +-- libc/stdlib/getpt.c | 7 +- libc/stdlib/jrand48.c | 4 +- libc/stdlib/jrand48_r.c | 5 +- libc/stdlib/ldiv.c | 2 +- libc/stdlib/lldiv.c | 2 +- libc/stdlib/lrand48.c | 4 +- libc/stdlib/lrand48_r.c | 9 +- libc/stdlib/malloc-simple/alloc.c | 11 +- libc/stdlib/malloc-standard/calloc.c | 5 +- libc/stdlib/malloc-standard/free.c | 3 +- libc/stdlib/malloc-standard/mallinfo.c | 8 +- libc/stdlib/malloc-standard/malloc.h | 9 +- libc/stdlib/malloc-standard/realloc.c | 9 +- libc/stdlib/malloc/calloc.c | 4 +- libc/stdlib/malloc/free.c | 7 +- libc/stdlib/malloc/heap_debug.c | 5 +- libc/stdlib/malloc/malloc.c | 6 +- libc/stdlib/malloc/malloc.h | 1 + libc/stdlib/malloc/malloc_debug.c | 14 +- libc/stdlib/malloc/realloc.c | 4 +- libc/stdlib/mrand48.c | 4 +- libc/stdlib/mrand48_r.c | 4 +- libc/stdlib/nrand48.c | 4 +- libc/stdlib/nrand48_r.c | 5 +- libc/stdlib/ptsname.c | 34 +-- libc/stdlib/rand.c | 4 +- libc/stdlib/random.c | 17 +- libc/stdlib/random_r.c | 24 +- libc/stdlib/realpath.c | 36 ++- libc/stdlib/seed48.c | 4 +- libc/stdlib/seed48_r.c | 9 +- libc/stdlib/setenv.c | 46 ++-- libc/stdlib/srand48.c | 4 +- libc/stdlib/srand48_r.c | 5 +- libc/stdlib/stdlib.c | 162 +++++++------ libc/stdlib/strtod.c | 33 +-- libc/stdlib/strtof.c | 4 +- libc/stdlib/strtold.c | 4 +- libc/stdlib/system.c | 21 +- libc/stdlib/unix_grantpt.c | 34 +-- libc/stdlib/unlockpt.c | 3 +- libc/stdlib/valloc.c | 4 +- libc/string/__glibc_strerror_r.c | 11 +- libc/string/__xpg_strerror_r.c | 23 +- libc/string/_collate.c | 73 +++--- libc/string/arm/bcopy.S | 13 +- libc/string/arm/bzero.S | 13 +- libc/string/arm/memcmp.S | 13 +- libc/string/arm/memcpy.S | 11 +- libc/string/arm/memmove.S | 11 +- libc/string/arm/memset.S | 11 +- libc/string/arm/strcmp.S | 15 +- libc/string/arm/strlen.S | 11 +- libc/string/arm/strncmp.S | 11 +- libc/string/basename.c | 7 +- libc/string/bcopy.c | 10 +- libc/string/bzero.c | 8 +- libc/string/ffs.c | 7 +- libc/string/frv/memcpy.S | 11 +- libc/string/frv/memset.S | 11 +- libc/string/generic/memchr.c | 8 +- libc/string/generic/memcmp.c | 9 +- libc/string/generic/memcpy.c | 6 +- libc/string/generic/memmem.c | 10 +- libc/string/generic/memmove.c | 10 +- libc/string/generic/mempcpy.c | 10 +- libc/string/generic/memrchr.c | 8 +- libc/string/generic/memset.c | 6 +- libc/string/generic/rawmemchr.c | 8 +- libc/string/generic/strcat.c | 6 +- libc/string/generic/strchr.c | 11 +- libc/string/generic/strchrnul.c | 8 +- libc/string/generic/strcmp.c | 11 +- libc/string/generic/strcpy.c | 6 +- libc/string/generic/strcspn.c | 10 +- libc/string/generic/strlen.c | 8 +- libc/string/generic/strncat.c | 6 +- libc/string/generic/strncmp.c | 6 +- libc/string/generic/strncpy.c | 6 +- libc/string/generic/strnlen.c | 8 +- libc/string/generic/strrchr.c | 15 +- libc/string/generic/strsep.c | 13 +- libc/string/generic/strspn.c | 6 +- libc/string/generic/strstr.c | 6 +- libc/string/generic/strtok_r.c | 16 +- libc/string/i386/memchr.c | 6 +- libc/string/i386/memcpy.c | 6 +- libc/string/i386/memmove.c | 6 +- libc/string/i386/memset.c | 6 +- libc/string/i386/strcat.c | 6 +- libc/string/i386/strchr.c | 9 +- libc/string/i386/strcmp.c | 11 +- libc/string/i386/strcpy.c | 6 +- libc/string/i386/strlen.c | 6 +- libc/string/i386/strncat.c | 6 +- libc/string/i386/strncmp.c | 6 +- libc/string/i386/strncpy.c | 6 +- libc/string/i386/strnlen.c | 6 +- libc/string/i386/strrchr.c | 9 +- libc/string/memccpy.c | 4 +- libc/string/memchr.c | 8 +- libc/string/memcmp.c | 9 +- libc/string/memcpy.c | 9 +- libc/string/memmem.c | 4 +- libc/string/memmove.c | 9 +- libc/string/mempcpy.c | 8 +- libc/string/memrchr.c | 6 +- libc/string/memset.c | 9 +- libc/string/mips/memcpy.S | 6 +- libc/string/mips/memset.S | 6 +- libc/string/mips/sysdep.h | 1 - libc/string/powerpc/memcpy.c | 6 +- libc/string/powerpc/memmove.c | 6 +- libc/string/powerpc/memset.c | 6 +- libc/string/psignal.c | 6 +- libc/string/rawmemchr.c | 7 +- libc/string/sh64/memcpy.S | 11 +- libc/string/sh64/memset.S | 11 +- libc/string/sh64/strcpy.S | 11 +- libc/string/sh64/strlen.S | 11 +- libc/string/sparc/_glibc_inc.h | 1 - libc/string/sparc/sparc32/memchr.S | 8 +- libc/string/sparc/sparc32/memcpy.S | 18 +- libc/string/sparc/sparc32/memset.S | 12 +- libc/string/sparc/sparc32/stpcpy.S | 6 +- libc/string/sparc/sparc32/strcat.S | 6 +- libc/string/sparc/sparc32/strchr.S | 16 +- libc/string/sparc/sparc32/strcmp.S | 7 +- libc/string/sparc/sparc32/strcpy.S | 7 +- libc/string/sparc/sparc32/strlen.S | 7 +- libc/string/sparc/sparc64/memchr.S | 8 +- libc/string/sparc/sparc64/memcpy.S | 22 +- libc/string/sparc/sparc64/memset.S | 12 +- libc/string/sparc/sparc64/sparcv9b/memcpy.S | 18 +- libc/string/sparc/sparc64/stpcpy.S | 7 +- libc/string/sparc/sparc64/strcat.S | 7 +- libc/string/sparc/sparc64/strchr.S | 16 +- libc/string/sparc/sparc64/strcmp.S | 7 +- libc/string/sparc/sparc64/strcpy.S | 6 +- libc/string/sparc/sparc64/strlen.S | 7 +- libc/string/stpcpy.c | 9 +- libc/string/stpncpy.c | 9 +- libc/string/strcasecmp.c | 37 ++- libc/string/strcasestr.c | 10 +- libc/string/strcat.c | 9 +- libc/string/strchr.c | 11 +- libc/string/strchrnul.c | 9 +- libc/string/strcmp.c | 21 +- libc/string/strcpy.c | 9 +- libc/string/strcspn.c | 9 +- libc/string/strdup.c | 21 +- libc/string/strerror.c | 10 +- libc/string/strlcpy.c | 31 ++- libc/string/strlen.c | 9 +- libc/string/strncasecmp.c | 37 ++- libc/string/strncat.c | 9 +- libc/string/strncmp.c | 8 +- libc/string/strncpy.c | 8 +- libc/string/strndup.c | 13 +- libc/string/strnlen.c | 8 +- libc/string/strpbrk.c | 9 +- libc/string/strrchr.c | 10 +- libc/string/strsep.c | 13 +- libc/string/strsignal.c | 13 +- libc/string/strspn.c | 9 +- libc/string/strstr.c | 13 +- libc/string/strtok.c | 6 +- libc/string/strtok_r.c | 21 +- libc/string/x86_64/_glibc_inc.h | 1 - libc/string/x86_64/bzero.S | 4 +- libc/string/x86_64/memcpy.S | 8 +- libc/string/x86_64/mempcpy.S | 4 +- libc/string/x86_64/memset.S | 8 +- libc/string/x86_64/stpcpy.S | 4 +- libc/string/x86_64/strcat.S | 6 +- libc/string/x86_64/strchr.S | 8 +- libc/string/x86_64/strcmp.S | 10 +- libc/string/x86_64/strcpy.S | 4 +- libc/string/x86_64/strcspn.S | 8 +- libc/string/x86_64/strlen.S | 6 +- libc/string/x86_64/strpbrk.S | 4 +- libc/string/x86_64/strspn.S | 6 +- libc/sysdeps/linux/alpha/__longjmp.S | 1 + libc/sysdeps/linux/alpha/brk.S | 12 +- libc/sysdeps/linux/alpha/clone.S | 14 +- libc/sysdeps/linux/arm/__longjmp.S | 1 + libc/sysdeps/linux/arm/brk.c | 4 +- libc/sysdeps/linux/arm/clone.S | 13 +- libc/sysdeps/linux/arm/ioperm.c | 26 +- libc/sysdeps/linux/arm/iopl.c | 2 + libc/sysdeps/linux/arm/mmap64.S | 2 +- libc/sysdeps/linux/arm/sigaction.c | 14 +- libc/sysdeps/linux/arm/vfork.S | 11 +- libc/sysdeps/linux/bfin/brk.c | 10 +- libc/sysdeps/linux/bfin/vfork.S | 3 +- libc/sysdeps/linux/common/__rt_sigtimedwait.c | 15 +- libc/sysdeps/linux/common/__syscall_fcntl.c | 25 +- libc/sysdeps/linux/common/__syscall_fcntl64.c | 11 +- libc/sysdeps/linux/common/_exit.c | 7 +- libc/sysdeps/linux/common/adjtimex.c | 9 +- libc/sysdeps/linux/common/alarm.c | 12 +- libc/sysdeps/linux/common/chdir.c | 5 +- libc/sysdeps/linux/common/chmod.c | 5 +- libc/sysdeps/linux/common/clock_getres.c | 4 +- libc/sysdeps/linux/common/clock_gettime.c | 4 +- libc/sysdeps/linux/common/clock_settime.c | 4 +- libc/sysdeps/linux/common/close.c | 9 +- libc/sysdeps/linux/common/cmsg_nxthdr.c | 7 +- libc/sysdeps/linux/common/creat64.c | 4 +- libc/sysdeps/linux/common/dl-osinfo.h | 13 +- libc/sysdeps/linux/common/dup2.c | 6 +- libc/sysdeps/linux/common/execve.c | 5 +- libc/sysdeps/linux/common/fchdir.c | 6 +- libc/sysdeps/linux/common/fork.c | 9 +- libc/sysdeps/linux/common/fstat.c | 13 +- libc/sysdeps/linux/common/fstat64.c | 6 +- libc/sysdeps/linux/common/fstatfs.c | 6 +- libc/sysdeps/linux/common/fsync.c | 2 +- libc/sysdeps/linux/common/ftruncate.c | 3 +- libc/sysdeps/linux/common/ftruncate64.c | 4 +- libc/sysdeps/linux/common/getcwd.c | 50 ++-- libc/sysdeps/linux/common/getdents.c | 7 +- libc/sysdeps/linux/common/getdents64.c | 7 +- libc/sysdeps/linux/common/getdirname.c | 20 +- libc/sysdeps/linux/common/getdnnm.c | 20 +- libc/sysdeps/linux/common/getdtablesize.c | 9 +- libc/sysdeps/linux/common/getegid.c | 11 +- libc/sysdeps/linux/common/geteuid.c | 11 +- libc/sysdeps/linux/common/getgid.c | 5 +- libc/sysdeps/linux/common/getgroups.c | 9 +- libc/sysdeps/linux/common/gethstnm.c | 21 +- libc/sysdeps/linux/common/getpagesize.c | 16 +- libc/sysdeps/linux/common/getpgid.c | 3 +- libc/sysdeps/linux/common/getpid.c | 12 +- libc/sysdeps/linux/common/getpriority.c | 5 +- libc/sysdeps/linux/common/getrlimit.c | 7 +- libc/sysdeps/linux/common/getrlimit64.c | 4 +- libc/sysdeps/linux/common/getsid.c | 5 +- libc/sysdeps/linux/common/gettimeofday.c | 6 +- libc/sysdeps/linux/common/getuid.c | 5 +- libc/sysdeps/linux/common/ioctl.c | 6 +- libc/sysdeps/linux/common/kill.c | 5 +- libc/sysdeps/linux/common/llseek.c | 18 +- libc/sysdeps/linux/common/longjmp.c | 13 +- libc/sysdeps/linux/common/lseek.c | 14 +- libc/sysdeps/linux/common/lstat.c | 13 +- libc/sysdeps/linux/common/lstat64.c | 6 +- libc/sysdeps/linux/common/mkdir.c | 5 +- libc/sysdeps/linux/common/mkfifo.c | 4 +- libc/sysdeps/linux/common/mknod.c | 5 +- libc/sysdeps/linux/common/mmap.c | 5 +- libc/sysdeps/linux/common/mmap64.c | 5 +- libc/sysdeps/linux/common/modify_ldt.c | 2 +- libc/sysdeps/linux/common/mremap.c | 6 +- libc/sysdeps/linux/common/msync.c | 2 +- libc/sysdeps/linux/common/munmap.c | 6 +- libc/sysdeps/linux/common/nanosleep.c | 5 +- libc/sysdeps/linux/common/nice.c | 7 +- libc/sysdeps/linux/common/ntp_gettime.c | 6 +- libc/sysdeps/linux/common/open.c | 14 +- libc/sysdeps/linux/common/open64.c | 14 +- libc/sysdeps/linux/common/pause.c | 8 +- libc/sysdeps/linux/common/pipe.c | 6 +- libc/sysdeps/linux/common/poll.c | 46 ++-- libc/sysdeps/linux/common/posix_fadvise.c | 6 +- libc/sysdeps/linux/common/posix_fadvise64.c | 2 +- libc/sysdeps/linux/common/pread_write.c | 35 +-- libc/sysdeps/linux/common/read.c | 9 +- libc/sysdeps/linux/common/readlink.c | 6 +- libc/sysdeps/linux/common/rmdir.c | 6 +- libc/sysdeps/linux/common/sbrk.c | 12 +- libc/sysdeps/linux/common/select.c | 10 +- libc/sysdeps/linux/common/setegid.c | 10 +- libc/sysdeps/linux/common/seteuid.c | 14 +- libc/sysdeps/linux/common/setgroups.c | 9 +- libc/sysdeps/linux/common/setitimer.c | 6 +- libc/sysdeps/linux/common/setpgid.c | 5 +- libc/sysdeps/linux/common/setpgrp.c | 8 +- libc/sysdeps/linux/common/setpriority.c | 6 +- libc/sysdeps/linux/common/setregid.c | 4 +- libc/sysdeps/linux/common/setresgid.c | 5 +- libc/sysdeps/linux/common/setresuid.c | 5 +- libc/sysdeps/linux/common/setreuid.c | 5 +- libc/sysdeps/linux/common/setrlimit.c | 8 +- libc/sysdeps/linux/common/setrlimit64.c | 4 +- libc/sysdeps/linux/common/setsid.c | 6 +- libc/sysdeps/linux/common/settimeofday.c | 6 +- libc/sysdeps/linux/common/sigprocmask.c | 7 +- libc/sysdeps/linux/common/sigsuspend.c | 7 +- libc/sysdeps/linux/common/ssp.c | 38 +-- libc/sysdeps/linux/common/stat.c | 13 +- libc/sysdeps/linux/common/stat64.c | 6 +- libc/sysdeps/linux/common/statfs.c | 5 +- libc/sysdeps/linux/common/time.c | 12 +- libc/sysdeps/linux/common/times.c | 6 +- libc/sysdeps/linux/common/truncate.c | 3 +- libc/sysdeps/linux/common/truncate64.c | 5 +- libc/sysdeps/linux/common/ulimit.c | 8 +- libc/sysdeps/linux/common/uname.c | 6 +- libc/sysdeps/linux/common/unlink.c | 6 +- libc/sysdeps/linux/common/utime.c | 15 +- libc/sysdeps/linux/common/utimes.c | 13 +- libc/sysdeps/linux/common/vfork.c | 9 +- libc/sysdeps/linux/common/wait.c | 14 +- libc/sysdeps/linux/common/wait3.c | 7 +- libc/sysdeps/linux/common/wait4.c | 5 +- libc/sysdeps/linux/common/waitpid.c | 17 +- libc/sysdeps/linux/common/write.c | 11 +- libc/sysdeps/linux/cris/brk.c | 5 +- libc/sysdeps/linux/cris/clone.S | 9 +- libc/sysdeps/linux/cris/fork.c | 4 +- libc/sysdeps/linux/cris/sbrk.c | 7 +- libc/sysdeps/linux/cris/setjmp.S | 9 - libc/sysdeps/linux/e1/longjmp.c | 4 +- libc/sysdeps/linux/frv/brk.c | 5 +- libc/sysdeps/linux/frv/clone.S | 13 +- libc/sysdeps/linux/frv/fstat.c | 6 +- libc/sysdeps/linux/frv/fstat64.c | 6 +- libc/sysdeps/linux/frv/lstat.c | 6 +- libc/sysdeps/linux/frv/lstat64.c | 6 +- libc/sysdeps/linux/frv/mmap.c | 5 +- libc/sysdeps/linux/frv/sbrk.c | 7 +- libc/sysdeps/linux/frv/stat.c | 6 +- libc/sysdeps/linux/frv/stat64.c | 6 +- libc/sysdeps/linux/frv/vfork.S | 11 +- libc/sysdeps/linux/h8300/brk.c | 5 +- libc/sysdeps/linux/h8300/clone.S | 10 - libc/sysdeps/linux/h8300/vfork.S | 1 + libc/sysdeps/linux/hppa/__longjmp.S | 3 + libc/sysdeps/linux/hppa/brk.c | 7 +- libc/sysdeps/linux/hppa/clone.S | 13 +- libc/sysdeps/linux/hppa/mmap.c | 6 +- libc/sysdeps/linux/i386/__longjmp.S | 3 + libc/sysdeps/linux/i386/brk.c | 5 +- libc/sysdeps/linux/i386/clone.S | 11 +- libc/sysdeps/linux/i386/mmap.S | 13 +- libc/sysdeps/linux/i386/sigaction.c | 11 +- libc/sysdeps/linux/i386/vfork.S | 15 +- libc/sysdeps/linux/m68k/__longjmp.S | 1 + libc/sysdeps/linux/m68k/brk.c | 5 +- libc/sysdeps/linux/m68k/clone.S | 13 +- libc/sysdeps/linux/m68k/vfork.S | 11 +- libc/sysdeps/linux/microblaze/__longjmp.S | 2 + libc/sysdeps/linux/microblaze/longjmp.S | 2 + libc/sysdeps/linux/microblaze/mmap.c | 2 + libc/sysdeps/linux/microblaze/vfork.S | 7 +- libc/sysdeps/linux/mips/__longjmp.c | 2 + libc/sysdeps/linux/mips/brk.c | 5 +- libc/sysdeps/linux/mips/clone.S | 13 +- libc/sysdeps/linux/mips/mmap.c | 6 +- libc/sysdeps/linux/mips/pipe.S | 11 +- libc/sysdeps/linux/mips/pipe.c | 3 +- libc/sysdeps/linux/mips/pread_write.c | 8 +- libc/sysdeps/linux/mips/sigaction.c | 11 +- libc/sysdeps/linux/nios/__longjmp.S | 8 +- libc/sysdeps/linux/nios/brk.c | 5 +- libc/sysdeps/linux/nios/clone.S | 11 +- libc/sysdeps/linux/nios/vfork.S | 10 +- libc/sysdeps/linux/nios2/__longjmp.S | 1 + libc/sysdeps/linux/nios2/brk.c | 5 +- libc/sysdeps/linux/nios2/clone.S | 11 +- libc/sysdeps/linux/nios2/vfork.S | 11 +- libc/sysdeps/linux/powerpc/__longjmp.S | 2 + libc/sysdeps/linux/powerpc/brk.S | 13 +- libc/sysdeps/linux/powerpc/clone.S | 12 +- libc/sysdeps/linux/powerpc/ioctl.c | 11 +- libc/sysdeps/linux/powerpc/mmap.c | 5 +- libc/sysdeps/linux/powerpc/pread_write.c | 35 +-- libc/sysdeps/linux/powerpc/vfork.S | 15 +- libc/sysdeps/linux/powerpc/vfork.c | 5 +- libc/sysdeps/linux/sh/__longjmp.S | 3 +- libc/sysdeps/linux/sh/brk.c | 5 +- libc/sysdeps/linux/sh/clone.S | 13 +- libc/sysdeps/linux/sh/longjmp.c | 1 + libc/sysdeps/linux/sh/mmap.c | 6 +- libc/sysdeps/linux/sh/pipe.c | 3 +- libc/sysdeps/linux/sh/pread_write.c | 8 +- libc/sysdeps/linux/sh/sbrk.c | 7 +- libc/sysdeps/linux/sh/vfork.S | 12 +- libc/sysdeps/linux/sh64/brk.c | 5 +- libc/sysdeps/linux/sparc/__longjmp.S | 3 + libc/sysdeps/linux/sparc/brk.c | 5 +- libc/sysdeps/linux/sparc/clone.S | 14 +- libc/sysdeps/linux/sparc/fork.S | 13 +- libc/sysdeps/linux/sparc/vfork.S | 15 +- libc/sysdeps/linux/v850/__longjmp.S | 2 + libc/sysdeps/linux/v850/mmap.c | 2 + libc/sysdeps/linux/v850/vfork.S | 8 +- libc/sysdeps/linux/x86_64/__longjmp.S | 2 + libc/sysdeps/linux/x86_64/brk.c | 5 +- libc/sysdeps/linux/x86_64/clone.S | 13 +- libc/sysdeps/linux/x86_64/mmap.c | 6 +- libc/sysdeps/linux/x86_64/sigaction.c | 14 +- libc/sysdeps/linux/x86_64/vfork.S | 15 +- libc/termios/Makefile.in | 30 +-- libc/termios/cfmakeraw.c | 31 +++ libc/termios/cfsetspeed.c | 164 +++++++++++++ libc/termios/isatty.c | 32 +++ libc/termios/speed.c | 97 ++++++++ libc/termios/tcdrain.c | 30 +++ libc/termios/tcflow.c | 30 +++ libc/termios/tcflush.c | 31 +++ libc/termios/tcgetattr.c | 20 +- libc/termios/tcgetpgrp.c | 36 +++ libc/termios/tcgetsid.c | 24 +- libc/termios/tcsendbrk.c | 48 ++++ libc/termios/tcsetattr.c | 14 +- libc/termios/tcsetpgrp.c | 30 +++ libc/termios/termios.c | 327 -------------------------- libc/termios/ttyname.c | 58 +++-- libc/unistd/confstr.c | 6 +- libc/unistd/daemon.c | 100 ++++---- libc/unistd/exec.c | 50 ++-- libc/unistd/fpathconf.c | 8 +- libc/unistd/getlogin.c | 19 +- libc/unistd/getopt-susv3.c | 2 + libc/unistd/getopt.c | 37 +-- libc/unistd/getpass.c | 26 +- libc/unistd/getsubopt.c | 11 +- libc/unistd/pathconf.c | 8 +- libc/unistd/sleep.c | 26 +- libc/unistd/sysconf.c | 11 +- libc/unistd/ualarm.c | 8 +- libc/unistd/usershell.c | 13 +- libc/unistd/usleep.c | 8 +- 666 files changed, 6433 insertions(+), 5295 deletions(-) create mode 100644 libc/termios/cfmakeraw.c create mode 100644 libc/termios/cfsetspeed.c create mode 100644 libc/termios/isatty.c create mode 100644 libc/termios/speed.c create mode 100644 libc/termios/tcdrain.c create mode 100644 libc/termios/tcflow.c create mode 100644 libc/termios/tcflush.c create mode 100644 libc/termios/tcgetpgrp.c create mode 100644 libc/termios/tcsendbrk.c create mode 100644 libc/termios/tcsetpgrp.c delete mode 100644 libc/termios/termios.c (limited to 'libc') diff --git a/libc/inet/addr.c b/libc/inet/addr.c index 6be41f81d..7c73e2a88 100644 --- a/libc/inet/addr.c +++ b/libc/inet/addr.c @@ -42,7 +42,7 @@ * leading 0 -> octal * all else -> decimal */ -int attribute_hidden __inet_aton(const char *cp, struct in_addr *addrptr) +int inet_aton(const char *cp, struct in_addr *addrptr) { in_addr_t addr; int value; @@ -88,29 +88,32 @@ int attribute_hidden __inet_aton(const char *cp, struct in_addr *addrptr) return 1; } -strong_alias(__inet_aton,inet_aton) +libc_hidden_proto(inet_aton) +libc_hidden_def(inet_aton) #endif #ifdef L_inet_addr -extern int __inet_aton (__const char *__cp, struct in_addr *__inp) __THROW attribute_hidden; +#include +libc_hidden_proto(inet_aton) -in_addr_t attribute_hidden __inet_addr(const char *cp) +in_addr_t inet_addr(const char *cp) { struct in_addr a; - if (!__inet_aton(cp, &a)) + if (!inet_aton(cp, &a)) return INADDR_NONE; else return a.s_addr; } -strong_alias(__inet_addr,inet_addr) +libc_hidden_proto(inet_addr) +libc_hidden_def(inet_addr) #endif #ifdef L_inet_ntoa #define INET_NTOA_MAX_LEN 16 /* max 12 digits + 3 '.'s + 1 nul */ -char attribute_hidden *__inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN]) +char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN]) { in_addr_t addr = ntohl(in.s_addr); int i; @@ -129,22 +132,28 @@ char attribute_hidden *__inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_L return p+1; } -strong_alias(__inet_ntoa_r,inet_ntoa_r) +libc_hidden_proto(inet_ntoa_r) +libc_hidden_def(inet_ntoa_r) -char attribute_hidden *__inet_ntoa(struct in_addr in) +char *inet_ntoa(struct in_addr in) { static char buf[INET_NTOA_MAX_LEN]; - return(__inet_ntoa_r(in, buf)); + return(inet_ntoa_r(in, buf)); } -strong_alias(__inet_ntoa,inet_ntoa) +libc_hidden_proto(inet_ntoa) +libc_hidden_def(inet_ntoa) #endif #ifdef L_inet_makeaddr + +/* for some reason it does not remove the jump relocation */ +libc_hidden_proto(memmove) + /* * Formulate an Internet address from network + host. Used in * building addresses stored in the ifnet structure. */ -struct in_addr attribute_hidden __inet_makeaddr(in_addr_t net, in_addr_t host) +struct in_addr inet_makeaddr(in_addr_t net, in_addr_t host) { in_addr_t addr; @@ -159,8 +168,8 @@ struct in_addr attribute_hidden __inet_makeaddr(in_addr_t net, in_addr_t host) addr = htonl(addr); return (*(struct in_addr *)&addr); } -strong_alias(__inet_makeaddr,inet_makeaddr) - +libc_hidden_proto(inet_makeaddr) +libc_hidden_def(inet_makeaddr) #endif #ifdef L_inet_lnaof @@ -188,8 +197,8 @@ in_addr_t inet_lnaof(struct in_addr in) * Return the network number from an internet * address; handles class a/b/c network #'s. */ -in_addr_t attribute_hidden -__inet_netof(struct in_addr in) +in_addr_t +inet_netof(struct in_addr in) { in_addr_t i = ntohl(in.s_addr); @@ -200,6 +209,6 @@ __inet_netof(struct in_addr in) else return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT); } -strong_alias(__inet_netof,inet_netof) - +libc_hidden_proto(inet_netof) +libc_hidden_def(inet_netof) #endif diff --git a/libc/inet/ether_addr.c b/libc/inet/ether_addr.c index 0a1e2aede..8be160a0d 100644 --- a/libc/inet/ether_addr.c +++ b/libc/inet/ether_addr.c @@ -23,7 +23,6 @@ * - initial uClibc port */ - #define __FORCE_GLIBC #include #include @@ -32,7 +31,11 @@ #include #include -struct ether_addr attribute_hidden *__ether_aton_r(const char *asc, struct ether_addr *addr) +libc_hidden_proto(ether_aton_r) +libc_hidden_proto(ether_ntoa_r) +libc_hidden_proto(sprintf) + +struct ether_addr *ether_aton_r(const char *asc, struct ether_addr *addr) { size_t cnt; @@ -68,28 +71,28 @@ struct ether_addr attribute_hidden *__ether_aton_r(const char *asc, struct ether return addr; } -strong_alias(__ether_aton_r,ether_aton_r) +libc_hidden_def(ether_aton_r) struct ether_addr *ether_aton(const char *asc) { static struct ether_addr result; - return __ether_aton_r(asc, &result); + return ether_aton_r(asc, &result); } -char attribute_hidden *__ether_ntoa_r(const struct ether_addr *addr, char *buf) +char *ether_ntoa_r(const struct ether_addr *addr, char *buf) { - __sprintf(buf, "%x:%x:%x:%x:%x:%x", + sprintf(buf, "%x:%x:%x:%x:%x:%x", addr->ether_addr_octet[0], addr->ether_addr_octet[1], addr->ether_addr_octet[2], addr->ether_addr_octet[3], addr->ether_addr_octet[4], addr->ether_addr_octet[5]); return buf; } -strong_alias(__ether_ntoa_r,ether_ntoa_r) +libc_hidden_def(ether_ntoa_r) char *ether_ntoa(const struct ether_addr *addr) { static char asc[18]; - return __ether_ntoa_r(addr, asc); + return ether_ntoa_r(addr, asc); } diff --git a/libc/inet/getaddrinfo.c b/libc/inet/getaddrinfo.c index cc348661a..225bc75c6 100644 --- a/libc/inet/getaddrinfo.c +++ b/libc/inet/getaddrinfo.c @@ -1,3 +1,10 @@ +/* + * Copyright 1996 by Craig Metz + * Copyright (C) 2000-2006 Erik Andersen + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ + /* $USAGI: getaddrinfo.c,v 1.16 2001/10/04 09:52:03 sekiya Exp $ */ /* The Inner Net License, Version 2.00 @@ -42,24 +49,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. If these license terms cause you a real problem, contact the author. */ -/* This software is Copyright 1996 by Craig Metz, All Rights Reserved. */ - -#define getservbyname_r __getservbyname_r -#define gethostbyname_r __gethostbyname_r -#define gethostbyname2_r __gethostbyname2_r -#define gethostbyaddr_r __gethostbyaddr_r -#define inet_pton __inet_pton -#define inet_ntop __inet_ntop -#define strtoul __strtoul -#define if_nametoindex __if_nametoindex -#if 0 -#define uname __uname -#define stpcpy __stpcpy -/* strdupa is using these */ -#define memcpy __memcpy -#define strlen __strlen -#endif - #define _GNU_SOURCE #define __FORCE_GLIBC #include @@ -79,6 +68,28 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +libc_hidden_proto(memcpy) +libc_hidden_proto(memset) +/* libc_hidden_proto(strcmp) */ +/* libc_hidden_proto(stpcpy) */ +libc_hidden_proto(strchr) +libc_hidden_proto(strcpy) +libc_hidden_proto(strlen) +libc_hidden_proto(socket) +libc_hidden_proto(close) +libc_hidden_proto(getservbyname_r) +libc_hidden_proto(gethostbyname_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(uname) */ +#ifdef __UCLIBC_HAS_IPV6__ +libc_hidden_proto(in6addr_loopback) +#endif + /* The following declarations and definitions have been removed from * the public header since we don't want people to use them. */ #define AI_V4MAPPED 0x0008 /* IPv4-mapped addresses are acceptable. */ @@ -160,12 +171,12 @@ static int addrconfig (sa_family_t af) int s; int ret; int saved_errno = errno; - s = __socket(af, SOCK_DGRAM, 0); + s = socket(af, SOCK_DGRAM, 0); if (s < 0) ret = (errno == EMFILE) ? 1 : 0; else { - __close(s); + close(s); ret = 1; } __set_errno (saved_errno); @@ -189,10 +200,10 @@ gaih_local (const char *name, const struct gaih_service *service, if (name != NULL) { - if (__strcmp(name, "localhost") && - __strcmp(name, "local") && - __strcmp(name, "unix") && - __strcmp(name, utsname.nodename)) + if (strcmp(name, "localhost") && + strcmp(name, "local") && + strcmp(name, "unix") && + strcmp(name, utsname.nodename)) return GAIH_OKIFUNSPEC | -EAI_NONAME; } @@ -219,7 +230,7 @@ gaih_local (const char *name, const struct gaih_service *service, *pai = malloc (sizeof (struct addrinfo) + sizeof (struct sockaddr_un) + ((req->ai_flags & AI_CANONNAME) - ? (__strlen(utsname.nodename) + 1): 0)); + ? (strlen(utsname.nodename) + 1): 0)); if (*pai == NULL) return -EAI_MEMORY; @@ -237,22 +248,22 @@ gaih_local (const char *name, const struct gaih_service *service, #endif /* SALEN */ ((struct sockaddr_un *)(*pai)->ai_addr)->sun_family = AF_LOCAL; - __memset(((struct sockaddr_un *)(*pai)->ai_addr)->sun_path, 0, UNIX_PATH_MAX); + memset(((struct sockaddr_un *)(*pai)->ai_addr)->sun_path, 0, UNIX_PATH_MAX); if (service) { struct sockaddr_un *sunp = (struct sockaddr_un *) (*pai)->ai_addr; - if (__strchr (service->name, '/') != NULL) + if (strchr (service->name, '/') != NULL) { - if (__strlen (service->name) >= sizeof (sunp->sun_path)) + if (strlen (service->name) >= sizeof (sunp->sun_path)) return GAIH_OKIFUNSPEC | -EAI_SERVICE; - __strcpy (sunp->sun_path, service->name); + strcpy (sunp->sun_path, service->name); } else { - if (__strlen (P_tmpdir "/") + 1 + __strlen (service->name) >= + if (strlen (P_tmpdir "/") + 1 + strlen (service->name) >= sizeof (sunp->sun_path)) return GAIH_OKIFUNSPEC | -EAI_SERVICE; @@ -274,7 +285,7 @@ gaih_local (const char *name, const struct gaih_service *service, } if (req->ai_flags & AI_CANONNAME) - (*pai)->ai_canonname = __strcpy ((char *) *pai + sizeof (struct addrinfo) + (*pai)->ai_canonname = strcpy ((char *) *pai + sizeof (struct addrinfo) + sizeof (struct sockaddr_un), utsname.nodename); else @@ -354,7 +365,7 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp, } \ (*pat)->next = NULL; \ (*pat)->family = _family; \ - __memcpy ((*pat)->addr, h->h_addr_list[i], \ + memcpy ((*pat)->addr, h->h_addr_list[i], \ sizeof(_type)); \ pat = &((*pat)->next); \ } \ @@ -505,7 +516,7 @@ gaih_inet (const char *name, const struct gaih_service *service, char *namebuf = strdupa (name); char *scope_delim; - scope_delim = __strchr (namebuf, SCOPE_DELIMITER); + scope_delim = strchr (namebuf, SCOPE_DELIMITER); if (scope_delim != NULL) *scope_delim = '\0'; @@ -588,21 +599,20 @@ gaih_inet (const char *name, const struct gaih_service *service, { struct gaih_addrtuple *atr; atr = at = alloca (sizeof (struct gaih_addrtuple)); - __memset (at, '\0', sizeof (struct gaih_addrtuple)); + memset (at, '\0', sizeof (struct gaih_addrtuple)); if (req->ai_family == 0) { at->next = alloca (sizeof (struct gaih_addrtuple)); - __memset (at->next, '\0', sizeof (struct gaih_addrtuple)); + memset (at->next, '\0', sizeof (struct gaih_addrtuple)); } #if __UCLIBC_HAS_IPV6__ if (req->ai_family == 0 || req->ai_family == AF_INET6) { - extern const struct in6_addr __in6addr_loopback attribute_hidden; at->family = AF_INET6; if ((req->ai_flags & AI_PASSIVE) == 0) - __memcpy (at->addr, &__in6addr_loopback, sizeof (struct in6_addr)); + memcpy (at->addr, &in6addr_loopback, sizeof (struct in6_addr)); atr = at->next; } #endif @@ -674,7 +684,7 @@ gaih_inet (const char *name, const struct gaih_service *service, if (c == NULL) return GAIH_OKIFUNSPEC | -EAI_NONAME; - namelen = __strlen (c) + 1; + namelen = strlen (c) + 1; } else namelen = 0; @@ -718,7 +728,7 @@ gaih_inet (const char *name, const struct gaih_service *service, sin6p->sin6_flowinfo = 0; if (at2->family == AF_INET6) { - __memcpy (&sin6p->sin6_addr, + memcpy (&sin6p->sin6_addr, at2->addr, sizeof (struct in6_addr)); } else @@ -726,7 +736,7 @@ gaih_inet (const char *name, const struct gaih_service *service, sin6p->sin6_addr.s6_addr32[0] = 0; sin6p->sin6_addr.s6_addr32[1] = 0; sin6p->sin6_addr.s6_addr32[2] = htonl(0x0000ffff); - __memcpy(&sin6p->sin6_addr.s6_addr32[3], + memcpy(&sin6p->sin6_addr.s6_addr32[3], at2->addr, sizeof (sin6p->sin6_addr.s6_addr32[3])); } sin6p->sin6_port = st2->port; @@ -738,17 +748,17 @@ gaih_inet (const char *name, const struct gaih_service *service, struct sockaddr_in *sinp = (struct sockaddr_in *) (*pai)->ai_addr; - __memcpy (&sinp->sin_addr, + memcpy (&sinp->sin_addr, at2->addr, sizeof (struct in_addr)); sinp->sin_port = st2->port; - __memset (sinp->sin_zero, '\0', sizeof (sinp->sin_zero)); + memset (sinp->sin_zero, '\0', sizeof (sinp->sin_zero)); } if (c) { (*pai)->ai_canonname = ((void *) (*pai) + sizeof (struct addrinfo) + socklen); - __strcpy ((*pai)->ai_canonname, c); + strcpy ((*pai)->ai_canonname, c); } else (*pai)->ai_canonname = NULL; @@ -775,8 +785,8 @@ static struct gaih gaih[] = { PF_UNSPEC, NULL } }; -void attribute_hidden -__freeaddrinfo (struct addrinfo *ai) +void +freeaddrinfo (struct addrinfo *ai) { struct addrinfo *p; @@ -787,10 +797,11 @@ __freeaddrinfo (struct addrinfo *ai) free (p); } } -strong_alias(__freeaddrinfo,freeaddrinfo) +libc_hidden_proto(freeaddrinfo) +libc_hidden_def(freeaddrinfo) -int attribute_hidden -__getaddrinfo (const char *name, const char *service, +int +getaddrinfo (const char *name, const char *service, const struct addrinfo *hints, struct addrinfo **pai) { int i = 0, j = 0, last_i = 0; @@ -860,7 +871,7 @@ __getaddrinfo (const char *name, const char *service, continue; if (p) - __freeaddrinfo (p); + freeaddrinfo (p); return -(i & GAIH_EAI); } @@ -884,8 +895,9 @@ __getaddrinfo (const char *name, const char *service, return 0; if (p) - __freeaddrinfo (p); + freeaddrinfo (p); return last_i ? -(last_i & GAIH_EAI) : EAI_NONAME; } -strong_alias(__getaddrinfo,getaddrinfo) +libc_hidden_proto(getaddrinfo) +libc_hidden_def(getaddrinfo) diff --git a/libc/inet/getnetbyad.c b/libc/inet/getnetbyad.c index f0c661faa..e353f245b 100644 --- a/libc/inet/getnetbyad.c +++ b/libc/inet/getnetbyad.c @@ -15,14 +15,14 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define setnetent __setnetent -#define getnetent __getnetent -#define endnetent __endnetent - #define __FORCE_GLIBC #include #include +libc_hidden_proto(setnetent) +libc_hidden_proto(getnetent) +libc_hidden_proto(endnetent) + extern int _net_stayopen attribute_hidden; struct netent *getnetbyaddr (uint32_t net, int type) diff --git a/libc/inet/getnetbynm.c b/libc/inet/getnetbynm.c index ef3d06137..97d5cb85f 100644 --- a/libc/inet/getnetbynm.c +++ b/libc/inet/getnetbynm.c @@ -15,15 +15,16 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define setnetent __setnetent -#define getnetent __getnetent -#define endnetent __endnetent - #define __FORCE_GLIBC #include #include #include +libc_hidden_proto(strcmp) +libc_hidden_proto(setnetent) +libc_hidden_proto(getnetent) +libc_hidden_proto(endnetent) + extern int _net_stayopen attribute_hidden; struct netent * @@ -34,10 +35,10 @@ getnetbyname(const char *name) setnetent(_net_stayopen); while ((p = getnetent())) { - if (__strcmp(p->n_name, name) == 0) + if (strcmp(p->n_name, name) == 0) break; for (cp = p->n_aliases; *cp != 0; cp++) - if (__strcmp(*cp, name) == 0) + if (strcmp(*cp, name) == 0) goto found; } found: diff --git a/libc/inet/getnetent.c b/libc/inet/getnetent.c index 77ecc4275..4413811a3 100644 --- a/libc/inet/getnetent.c +++ b/libc/inet/getnetent.c @@ -15,10 +15,6 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define inet_network __inet_network -#define rewind __rewind -#define fgets __fgets - #define __FORCE_GLIBC #include #include @@ -26,6 +22,12 @@ #include #include +libc_hidden_proto(fopen) +libc_hidden_proto(fclose) +libc_hidden_proto(inet_network) +libc_hidden_proto(rewind) +libc_hidden_proto(fgets) +libc_hidden_proto(abort) #ifdef __UCLIBC_HAS_THREADS__ # include @@ -45,7 +47,7 @@ static char *net_aliases[MAXALIASES]; int _net_stayopen attribute_hidden; -void attribute_hidden __setnetent(int f) +void setnetent(int f) { LOCK; if (netf == NULL) @@ -56,9 +58,10 @@ void attribute_hidden __setnetent(int f) UNLOCK; return; } -strong_alias(__setnetent,setnetent) +libc_hidden_proto(setnetent) +libc_hidden_def(setnetent) -void attribute_hidden __endnetent(void) +void endnetent(void) { LOCK; if (netf) { @@ -68,7 +71,8 @@ void attribute_hidden __endnetent(void) _net_stayopen = 0; UNLOCK; } -strong_alias(__endnetent,endnetent) +libc_hidden_proto(endnetent) +libc_hidden_def(endnetent) static char * any(register char *cp, char *match) { @@ -83,7 +87,7 @@ static char * any(register char *cp, char *match) return ((char *)0); } -struct netent attribute_hidden * __getnetent(void) +struct netent *getnetent(void) { char *p; register char *cp, **q; @@ -142,4 +146,5 @@ again: UNLOCK; return (&net); } -strong_alias(__getnetent,getnetent) +libc_hidden_proto(getnetent) +libc_hidden_def(getnetent) diff --git a/libc/inet/getproto.c b/libc/inet/getproto.c index 008b0d606..e5a11d2c7 100644 --- a/libc/inet/getproto.c +++ b/libc/inet/getproto.c @@ -51,11 +51,6 @@ ** SUCH DAMAGE. */ -#define strpbrk __strpbrk -#define atoi __atoi -#define rewind __rewind -#define fgets __fgets - #define __FORCE_GLIBC #define _GNU_SOURCE #include @@ -67,6 +62,14 @@ #include #include +libc_hidden_proto(fopen) +libc_hidden_proto(strcmp) +libc_hidden_proto(strpbrk) +libc_hidden_proto(atoi) +libc_hidden_proto(rewind) +libc_hidden_proto(fgets) +libc_hidden_proto(fclose) +libc_hidden_proto(abort) #ifdef __UCLIBC_HAS_THREADS__ # include @@ -94,7 +97,7 @@ static void __initbuf(void) } } -void attribute_hidden __setprotoent(int f) +void setprotoent(int f) { LOCK; if (protof == NULL) @@ -104,9 +107,10 @@ void attribute_hidden __setprotoent(int f) proto_stayopen |= f; UNLOCK; } -strong_alias(__setprotoent,setprotoent) +libc_hidden_proto(setprotoent) +libc_hidden_def(setprotoent) -void attribute_hidden __endprotoent(void) +void endprotoent(void) { LOCK; if (protof) { @@ -116,9 +120,10 @@ void attribute_hidden __endprotoent(void) proto_stayopen = 0; UNLOCK; } -strong_alias(__endprotoent,endprotoent) +libc_hidden_proto(endprotoent) +libc_hidden_def(endprotoent) -int attribute_hidden __getprotoent_r(struct protoent *result_buf, +int getprotoent_r(struct protoent *result_buf, char *buf, size_t buflen, struct protoent **result) { @@ -194,19 +199,20 @@ again: UNLOCK; return 0; } -strong_alias(__getprotoent_r,getprotoent_r) +libc_hidden_proto(getprotoent_r) +libc_hidden_def(getprotoent_r) struct protoent * getprotoent(void) { struct protoent *result; __initbuf(); - __getprotoent_r(&proto, static_aliases, SBUFSIZE, &result); + getprotoent_r(&proto, static_aliases, SBUFSIZE, &result); return result; } -int attribute_hidden __getprotobyname_r(const char *name, +int getprotobyname_r(const char *name, struct protoent *result_buf, char *buf, size_t buflen, struct protoent **result) @@ -215,21 +221,22 @@ int attribute_hidden __getprotobyname_r(const char *name, int ret; LOCK; - __setprotoent(proto_stayopen); - while (!(ret=__getprotoent_r(result_buf, buf, buflen, result))) { - if (__strcmp(result_buf->p_name, name) == 0) + setprotoent(proto_stayopen); + while (!(ret=getprotoent_r(result_buf, buf, buflen, result))) { + if (strcmp(result_buf->p_name, name) == 0) break; for (cp = result_buf->p_aliases; *cp != 0; cp++) - if (__strcmp(*cp, name) == 0) + if (strcmp(*cp, name) == 0) goto found; } found: if (!proto_stayopen) - __endprotoent(); + endprotoent(); UNLOCK; return *result?0:ret; } -strong_alias(__getprotobyname_r,getprotobyname_r) +libc_hidden_proto(getprotobyname_r) +libc_hidden_def(getprotobyname_r) struct protoent * getprotobyname(const char *name) @@ -237,12 +244,12 @@ struct protoent * getprotobyname(const char *name) struct protoent *result; __initbuf(); - __getprotobyname_r(name, &proto, static_aliases, SBUFSIZE, &result); + getprotobyname_r(name, &proto, static_aliases, SBUFSIZE, &result); return result; } -int attribute_hidden __getprotobynumber_r (int proto_num, +int getprotobynumber_r (int proto_num, struct protoent *result_buf, char *buf, size_t buflen, struct protoent **result) @@ -250,23 +257,24 @@ int attribute_hidden __getprotobynumber_r (int proto_num, int ret; LOCK; - __setprotoent(proto_stayopen); - while (!(ret=__getprotoent_r(result_buf, buf, buflen, result))) + setprotoent(proto_stayopen); + while (!(ret=getprotoent_r(result_buf, buf, buflen, result))) if (result_buf->p_proto == proto_num) break; if (!proto_stayopen) - __endprotoent(); + endprotoent(); UNLOCK; return *result?0:ret; } -strong_alias(__getprotobynumber_r,getprotobynumber_r) +libc_hidden_proto(getprotobynumber_r) +libc_hidden_def(getprotobynumber_r) struct protoent * getprotobynumber(int proto_num) { struct protoent *result; __initbuf(); - __getprotobynumber_r(proto_num, &proto, static_aliases, + getprotobynumber_r(proto_num, &proto, static_aliases, SBUFSIZE, &result); return result; } diff --git a/libc/inet/getservice.c b/libc/inet/getservice.c index f3916de86..254f638f2 100644 --- a/libc/inet/getservice.c +++ b/libc/inet/getservice.c @@ -51,11 +51,6 @@ ** SUCH DAMAGE. */ -#define strpbrk __strpbrk -#define atoi __atoi -#define rewind __rewind -#define fgets __fgets - #define __FORCE_GLIBC #define _GNU_SOURCE #include @@ -69,6 +64,14 @@ #include #include +libc_hidden_proto(strcmp) +libc_hidden_proto(strpbrk) +libc_hidden_proto(fopen) +libc_hidden_proto(fclose) +libc_hidden_proto(atoi) +libc_hidden_proto(rewind) +libc_hidden_proto(fgets) +libc_hidden_proto(abort) #ifdef __UCLIBC_HAS_THREADS__ # include @@ -97,7 +100,7 @@ static void __initbuf(void) } } -extern void attribute_hidden __setservent(int f) +void setservent(int f) { LOCK; if (servf == NULL) @@ -107,9 +110,10 @@ extern void attribute_hidden __setservent(int f) serv_stayopen |= f; UNLOCK; } -strong_alias(__setservent,setservent) +libc_hidden_proto(setservent) +libc_hidden_def(setservent) -extern void attribute_hidden __endservent(void) +void endservent(void) { LOCK; if (servf) { @@ -119,9 +123,10 @@ extern void attribute_hidden __endservent(void) serv_stayopen = 0; UNLOCK; } -strong_alias(__endservent,endservent) +libc_hidden_proto(endservent) +libc_hidden_def(endservent) -extern int attribute_hidden __getservent_r(struct servent * result_buf, +int getservent_r(struct servent * result_buf, char * buf, size_t buflen, struct servent ** result) { @@ -200,18 +205,19 @@ again: UNLOCK; return 0; } -strong_alias(__getservent_r,getservent_r) +libc_hidden_proto(getservent_r) +libc_hidden_def(getservent_r) struct servent * getservent(void) { struct servent *result; __initbuf(); - __getservent_r(&serv, servbuf, SBUFSIZE, &result); + getservent_r(&serv, servbuf, SBUFSIZE, &result); return result; } -extern int attribute_hidden __getservbyname_r(const char *name, const char *proto, +int getservbyname_r(const char *name, const char *proto, struct servent * result_buf, char * buf, size_t buflen, struct servent ** result) { @@ -219,62 +225,65 @@ extern int attribute_hidden __getservbyname_r(const char *name, const char *prot int ret; LOCK; - __setservent(serv_stayopen); - while (!(ret=__getservent_r(result_buf, buf, buflen, result))) { - if (__strcmp(name, result_buf->s_name) == 0) + setservent(serv_stayopen); + while (!(ret=getservent_r(result_buf, buf, buflen, result))) { + if (strcmp(name, result_buf->s_name) == 0) goto gotname; for (cp = result_buf->s_aliases; *cp; cp++) - if (__strcmp(name, *cp) == 0) + if (strcmp(name, *cp) == 0) goto gotname; continue; gotname: - if (proto == 0 || __strcmp(result_buf->s_proto, proto) == 0) + if (proto == 0 || strcmp(result_buf->s_proto, proto) == 0) break; } if (!serv_stayopen) - __endservent(); + endservent(); UNLOCK; return *result?0:ret; } -strong_alias(__getservbyname_r,getservbyname_r) +libc_hidden_proto(getservbyname_r) +libc_hidden_def(getservbyname_r) struct servent *getservbyname(const char *name, const char *proto) { struct servent *result; __initbuf(); - __getservbyname_r(name, proto, &serv, servbuf, SBUFSIZE, &result); + getservbyname_r(name, proto, &serv, servbuf, SBUFSIZE, &result); return result; } -extern int attribute_hidden __getservbyport_r(int port, const char *proto, +int getservbyport_r(int port, const char *proto, struct servent * result_buf, char * buf, size_t buflen, struct servent ** result) { int ret; LOCK; - __setservent(serv_stayopen); - while (!(ret=__getservent_r(result_buf, buf, buflen, result))) { + setservent(serv_stayopen); + while (!(ret=getservent_r(result_buf, buf, buflen, result))) { if (result_buf->s_port != port) continue; - if (proto == 0 || __strcmp(result_buf->s_proto, proto) == 0) + if (proto == 0 || strcmp(result_buf->s_proto, proto) == 0) break; } if (!serv_stayopen) - __endservent(); + endservent(); UNLOCK; return *result?0:ret; } -strong_alias(__getservbyport_r,getservbyport_r) +libc_hidden_proto(getservbyport_r) +libc_hidden_def(getservbyport_r) -struct servent attribute_hidden * __getservbyport(int port, const char *proto) +struct servent * getservbyport(int port, const char *proto) { struct servent *result; __initbuf(); - __getservbyport_r(port, proto, &serv, servbuf, SBUFSIZE, &result); + getservbyport_r(port, proto, &serv, servbuf, SBUFSIZE, &result); return result; } -strong_alias(__getservbyport,getservbyport) +libc_hidden_proto(getservbyport) +libc_hidden_def(getservbyport) diff --git a/libc/inet/herror.c b/libc/inet/herror.c index 2f0797b91..6efbc2f93 100644 --- a/libc/inet/herror.c +++ b/libc/inet/herror.c @@ -23,6 +23,8 @@ #include #include +libc_hidden_proto(fprintf) + static const char *error_msg = "Resolver error"; static const char *const h_errlist[] =