diff -d -urpN uClibc.5/include/uClibc_libc.h uClibc.6/include/uClibc_libc.h
--- uClibc.5/include/uClibc_libc.h	1970-01-01 01:00:00.000000000 +0100
+++ uClibc.6/include/uClibc_libc.h	2008-04-11 02:01:17.000000000 +0200
@@ -0,0 +1,876 @@
+/*
+ * Copyright (C) 2008 by Denys Vlasenko <vda.linux@googlemail.com>
+ *
+ * Licensed under GPLv2, see file LICENSE in this tarball for details.
+ */
+
+/*
+ * This file is used as a #include file in uclibc *.c files.
+ * It is not intended to be uncluded by _users_ of uclibc.
+ * 
+ * It relieves us from the need of painstakingly do "libc_hidden_proto(func)"
+ * for every libc finction we use. It also includes most of libc headers,
+ * drastically reducing number of #includes and need to add/remove them
+ * during development. Downside is that compile time is a bit longer
+ * (compiler needs to chew on ~500k lines of definitions).
+ *
+ * Included files:
+ * - all top-level *.h files
+ * - all rpc/ *.h files
+ * - all sys/ *.h files except for sys/kd.h and sys/sysctl.h
+ *   (due to breakage in kernel headers)
+ * - arpa/inet.h
+ *   (do not rely on it, include it in *.c file anyway if you need it)
+ * - net/if.h (ditto)
+ *
+ * Not included (if you need them, you have to include them
+ * in your *.c file separately):
+ * - bits/ *
+ * - arpa/ *
+ * - net/ *
+ * - netax25/ *
+ * - neteconet/ *
+ * - netinet/ *
+ * - netipx/ *
+ * - netpacket/ *
+ * - protocols/ *
+ * - scsi/ *
+ *
+ * After include directives, all libc functions/objects are marked
+ * with libc_hidden_proto(func) - conditionally if needed. This makes
+ * intra-libc calls smaller and faster if you build shared uclibc.
+ *
+ * NB: all exceptions should be documented!
+ * if a .h file cannot be included - why?
+ * if a function cannot be marked libc_hidden_proto - why?
+ */
+
+
+/* Already automatically included by -ilibc-symbols.h
+ * for each *.c file being compiled:
+ * #include <libc-symbols.h>
+ */
+
+/* Things with black magic go first */
+#include <features.h>
+#include <gnu-versions.h>
+#include <libc-internal.h>
+#include <sys/cdefs.h>
+
+/* Provided by C compiler, not libc */
+#include <stdarg.h>
+#include <stdbool.h>
+
+/* Ordinary stuff (just strictures, functions, data, macros)  */
+#include <_lfs_64.h>
+#include <a.out.h>
+#include <alloca.h>
+#include <ar.h>
+#include <assert.h>
+#include <atomic.h>
+#include <byteswap.h>
+#include <complex.h>
+#include <cpio.h>
+#include <crypt.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <dlfcn.h>
+#include <elf.h>
+#include <endian.h>
+#include <err.h>
+#include <errno.h>
+#include <error.h>
+#include <fcntl.h>
+#include <fenv.h>
+#include <fnmatch.h>
+#include <ftw.h>
+#include <getopt.h>
+#include <glob.h>
+#include <grp.h>
+#ifdef __UCLIBC_HAS_LOCALE__
+#include <iconv.h>
+#endif
+#include <ieee754.h>
+#include <inttypes.h>
+#include <langinfo.h>
+#include <lastlog.h>
+#include <libgen.h>
+#include <libintl.h>
+#include <limits.h>
+#include <link.h>
+#include <locale.h>
+#include <malloc.h>
+#include <math.h>
+#include <memory.h>
+#include <mntent.h>
+#include <mqueue.h>
+#include <netdb.h>
+#include <nl_types.h>
+#include <obstack.h>
+#include <paths.h>
+#include <poll.h>
+#include <printf.h>
+#ifdef __UCLIBC_HAS_THREADS__
+#include <pthread.h>
+#endif
+#include <pty.h>
+#include <pwd.h>
+#include <regex.h>
+/* This is a "template" include parametrized with macros */
+/* #include <regexp.h> */
+#include <resolv.h>
+#include <sched.h>
+#include <search.h>
+#include <setjmp.h>
+#include <sgtty.h>
+#include <shadow.h>
+#include <signal.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdio_ext.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <syscall.h>
+#include <sysexits.h>
+#include <syslog.h>
+#include <tar.h>
+#include <termio.h>
+#include <termios.h>
+#include <tgmath.h>
+#include <time.h>
+#include <ttyent.h>
+#include <ucontext.h>
+#include <ulimit.h>
+#include <unistd.h>
+#include <ustat.h>
+#include <utime.h>
+#include <utmp.h>
+#include <values.h>
+#include <wait.h>
+#ifdef __UCLIBC_HAS_WCHAR__
+#include <wchar.h>
+#include <wctype.h>
+#endif
+#include <wordexp.h>
+#ifdef __UCLIBC_HAS_XLOCALE__
+#include <xlocale.h>
+#endif
+
+// #include <arpa/ftp.h>
+#include <arpa/inet.h>
+// #include <arpa/nameser.h>
+// #include <arpa/nameser_compat.h>
+// #include <arpa/telnet.h>
+// #include <arpa/tftp.h>
+
+// #include <net/ethernet.h>
+#include <net/if.h>
+// #include <net/if_arp.h>
+// #include <net/if_packet.h>
+// #include <net/if_ppp.h>
+// #include <net/if_shaper.h>
+// #include <net/if_slip.h>
+// #include <net/ppp-comp.h>
+// #include <net/ppp_defs.h>
+// #include <net/route.h>
+
+// #include <netax25/ax25.h>
+
+// #include <neteconet/ec.h>
+
+/* For ether_aton_r and ether_ntoa_r.
+ * Clean up your kernel headers if you see this:
+ * In file included from $KERNEL_TREE/include/linux/if_ether.h:24,
+ *                  from ./include/netinet/if_ether.h:26,
+ *                  from ./include/netinet/ether.h:26,
+ *                  from ./include/uClibc_libc.h:127,
+ * $KERNEL_TREE/include/linux/types.h:189: error: redefinition of 'struct ustat'
+ * (cause: struct ustat definition colliding with sys/ustat.h one)
+ */
+#include <netinet/ether.h>
+// #include <netinet/icmp6.h>
+// #include <netinet/if_ether.h>
+// #include <netinet/if_fddi.h>
+// #include <netinet/if_tr.h>
+// #include <netinet/igmp.h>
+// #include <netinet/in.h>
+// #include <netinet/in_systm.h>
+// #include <netinet/ip.h>
+// #include <netinet/ip6.h>
+// #include <netinet/ip_icmp.h>
+// #include <netinet/protocols.h>
+// #include <netinet/tcp.h>
+// #include <netinet/udp.h>
+
+// #include <netipx/ipx.h>
+
+// #include <netpacket/packet.h>
+
+// #include <protocols/routed.h>
+// #include <protocols/rwhod.h>
+// #include <protocols/talkd.h>
+// #include <protocols/timed.h>
+
+#include <rpc/auth.h>
+#include <rpc/auth_des.h>
+#include <rpc/auth_unix.h>
+#include <rpc/clnt.h>
+#include <rpc/des_crypt.h>
+#include <rpc/key_prot.h>
+#include <rpc/netdb.h>
+#include <rpc/pmap_clnt.h>
+#include <rpc/pmap_prot.h>
+#include <rpc/pmap_rmt.h>
+#include <rpc/rpc.h>
+#include <rpc/rpc_des.h>
+#include <rpc/rpc_msg.h>
+#include <rpc/svc.h>
+#include <rpc/svc_auth.h>
+#include <rpc/types.h>
+#include <rpc/xdr.h>
+
+// #include <scsi/scsi.h>
+// #include <scsi/scsi_ioctl.h>
+// #include <scsi/sg.h>
+
+#include <sys/bitypes.h>
+#include <sys/dir.h>
+#include <sys/errno.h>
+#include <sys/fcntl.h>
+#include <sys/file.h>
+#include <sys/fsuid.h>
+#include <sys/ioctl.h>
+#include <sys/ipc.h>
+/* Clean up you kernel headers if you see this:
+ * In file included from ./include/sys/kd.h:28,
+ *                  from ./include/uClibc_libc.h:178,
+ * $KERNEL_TREE/include/linux/kd.h:16: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
+ * $KERNEL_TREE/include/linux/kd.h:67: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
+ * $KERNEL_TREE/include/linux/kd.h:152: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
+ * (cause: __user macros not removed properly)
+ */
+#include <sys/kd.h>
+#include <sys/kdaemon.h>
+#include <sys/klog.h>
+#include <sys/mman.h>
+#include <sys/mount.h>
+#include <sys/msg.h>
+#include <sys/mtio.h>
+#include <sys/param.h>
+#include <sys/personality.h>
+#include <sys/poll.h>
+#include <sys/queue.h>
+#include <sys/quota.h>
+#include <sys/reboot.h>
+#include <sys/resource.h>
+#include <sys/select.h>
+#include <sys/sem.h>
+#include <sys/sendfile.h>
+#include <sys/shm.h>
+#include <sys/signal.h>
+#include <sys/socket.h>
+#include <sys/socketvar.h>
+#include <sys/soundcard.h>
+#include <sys/stat.h>
+#include <sys/statfs.h>
+#include <sys/statvfs.h>
+#include <sys/swap.h>
+#include <sys/syscall.h>
+/* Clean up you kernel headers if you see this:
+ * In file included from ./include/sys/sysctl.h:44,
+ *                  from ./include/uClibc_libc.h:205,
+ * $KERNEL_TREE/include/linux/sysctl.h:34: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
+ * (cause: __user macros not removed properly)
+ */
+#include <sys/sysctl.h>
+#include <sys/sysinfo.h>
+#include <sys/syslog.h>
+#include <sys/sysmacros.h>
+#include <sys/termios.h>
+#include <sys/time.h>
+#include <sys/timeb.h>
+#include <sys/times.h>
+#include <sys/timex.h>
+#include <sys/ttydefaults.h>
+#include <sys/types.h>
+#include <sys/uio.h>
+#include <sys/un.h>
+#include <sys/unistd.h>
+#include <sys/ustat.h>
+#include <sys/utsname.h>
+#include <sys/vfs.h>
+#include <sys/vt.h>
+#include <sys/wait.h>
+#include <sys/xattr.h>
+
+#ifndef NDEBUG
+libc_hidden_proto(__assert)
+#endif
+libc_hidden_proto(__cmsg_nxthdr)
+#ifndef __UCLIBC_HAS_XLOCALE__
+libc_hidden_proto(__ctype_b)
+libc_hidden_proto(__ctype_tolower)
+libc_hidden_proto(__ctype_toupper)
+#else
+libc_hidden_proto(__ctype_b_loc)
+libc_hidden_proto(__ctype_tolower_loc)
+libc_hidden_proto(__ctype_toupper_loc)
+#endif
+//libc_hidden_proto(__cxa_atexit)
+libc_hidden_proto(__errno_location)
+libc_hidden_proto(__fgetc_unlocked)
+libc_hidden_proto(__fputc_unlocked)
+libc_hidden_proto(__fsetlocking)
+libc_hidden_proto(__glibc_strerror_r)
+libc_hidden_proto(__h_errno_location)
+// FIXME: Private data structure in libc/misc/wchar/wchar.c
+//libc_hidden_proto(__iconv_codesets)
+//libc_hidden_proto(__libc_fcntl)
+//libc_hidden_proto(__libc_fcntl64)
+//libc_hidden_proto(__libc_lseek)
+//libc_hidden_proto(__libc_lseek64)
+//libc_hidden_proto(__libc_open)
+//libc_hidden_proto(__libc_open64)
+//libc_hidden_proto(__longjmp)
+libc_hidden_proto(__rpc_thread_createerr)
+libc_hidden_proto(__rpc_thread_svc_fdset)
+libc_hidden_proto(__rpc_thread_svc_max_pollfd)
+libc_hidden_proto(__rpc_thread_svc_pollfd)
+libc_hidden_proto(__sigpause)
+// FIXME: can it be made private func?
+//libc_hidden_proto(__uClibc_fini)
+//libc_hidden_proto(__uClibc_init)
+libc_hidden_proto(__uc_malloc)
+libc_hidden_proto(__uc_malloc_failed)
+libc_hidden_proto(__xpg_strerror_r)
+libc_hidden_proto(_authenticate)
+libc_hidden_proto(_exit)
+libc_hidden_proto(_rpc_dtablesize)
+libc_hidden_proto(_seterr_reply)
+#ifdef __UCLIBC_HAS_WCHAR__
+libc_hidden_proto(_stdlib_mb_cur_max)
+#endif
+libc_hidden_proto(abort)
+libc_hidden_proto(accept)
+libc_hidden_proto(adjtimex)
+libc_hidden_proto(alarm)
+#ifdef __UCLIBC_HAS_ARC4RANDOM__
+libc_hidden_proto(arc4random_stir)
+#endif
+libc_hidden_proto(asctime)
+libc_hidden_proto(asctime_r)
+libc_hidden_proto(asprintf)
+libc_hidden_proto(atoi)
+libc_hidden_proto(atol)
+libc_hidden_proto(authnone_create)
+libc_hidden_proto(authunix_create)
+libc_hidden_proto(authunix_create_default)
+libc_hidden_proto(basename)
+libc_hidden_proto(bind)
+libc_hidden_proto(bindresvport)
+libc_hidden_proto(brk)
+libc_hidden_proto(cfsetispeed)
+libc_hidden_proto(cfsetospeed)
+libc_hidden_proto(chdir)
+libc_hidden_proto(chmod)
+libc_hidden_proto(chown)
+libc_hidden_proto(clnt_perror)
+libc_hidden_proto(clnt_spcreateerror)
+libc_hidden_proto(clnt_sperrno)
+libc_hidden_proto(clnt_sperror)
+libc_hidden_proto(clnttcp_create)
+libc_hidden_proto(clntudp_bufcreate)
+libc_hidden_proto(clntudp_create)
+libc_hidden_proto(clntunix_create)
+libc_hidden_proto(close)
+libc_hidden_proto(closedir)
+libc_hidden_proto(closelog)
+libc_hidden_proto(connect)
+libc_hidden_proto(ctime)
+libc_hidden_proto(dirfd)
+libc_hidden_proto(dup2)
+libc_hidden_proto(endmntent)
+libc_hidden_proto(endnetent)
+libc_hidden_proto(endprotoent)
+libc_hidden_proto(endrpcent)
+libc_hidden_proto(endservent)
+libc_hidden_proto(endttyent)
+libc_hidden_proto(erand48_r)
+// TODO: explain why this isn't done in !THREADS case?
+#ifdef __UCLIBC_HAS_THREADS__
+libc_hidden_proto(errno)
+#endif
+libc_hidden_proto(ether_aton_r)
+libc_hidden_proto(ether_ntoa_r)
+libc_hidden_proto(execl)
+libc_hidden_proto(execle)
+libc_hidden_proto(execlp)
+libc_hidden_proto(execv)
+libc_hidden_proto(execve)
+libc_hidden_proto(execvp)
+libc_hidden_proto(exit)
+libc_hidden_proto(fchdir)
+libc_hidden_proto(fclose)
+libc_hidden_proto(fcntl)
+libc_hidden_proto(fcntl64)
+libc_hidden_proto(fdopen)
+libc_hidden_proto(fflush)
+libc_hidden_proto(fflush_unlocked)
+libc_hidden_proto(ffs)
+libc_hidden_proto(fgetc)
+libc_hidden_proto(fgetc_unlocked)
+libc_hidden_proto(fgetgrent_r)
+libc_hidden_proto(fgetpwent_r)
+libc_hidden_proto(fgets)
+libc_hidden_proto(fgets_unlocked)
+libc_hidden_proto(fgetspent_r)
+libc_hidden_proto(fileno)
+libc_hidden_proto(fileno_unlocked)
+libc_hidden_proto(fnmatch)
+libc_hidden_proto(fopen)
+#ifdef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__
+libc_hidden_proto(fopencookie)
+#endif
+libc_hidden_proto(fork)
+libc_hidden_proto(fprintf)
+libc_hidden_proto(fputc)
+libc_hidden_proto(fputs)
+libc_hidden_proto(fputs_unlocked)
+libc_hidden_proto(fread)
+libc_hidden_proto(fread_unlocked)
+libc_hidden_proto(freeaddrinfo)
+libc_hidden_proto(fscanf)
+libc_hidden_proto(fseek)
+libc_hidden_proto(fseeko64)
+libc_hidden_proto(fstat)
+libc_hidden_proto(fstat64)
+libc_hidden_proto(fstatfs)
+libc_hidden_proto(fstatfs64)
+libc_hidden_proto(ftell)
+libc_hidden_proto(ftello64)
+libc_hidden_proto(ftruncate)
+libc_hidden_proto(ftruncate64)
+libc_hidden_proto(fwrite)
+libc_hidden_proto(fwrite_unlocked)
+libc_hidden_proto(getaddrinfo)
+libc_hidden_proto(getc_unlocked)
+libc_hidden_proto(getchar_unlocked)
+libc_hidden_proto(getcwd)
+libc_hidden_proto(getdelim)
+libc_hidden_proto(getdomainname)
+libc_hidden_proto(getdtablesize)
+libc_hidden_proto(getegid)
+libc_hidden_proto(getenv)
+libc_hidden_proto(geteuid)
+libc_hidden_proto(getgid)
+libc_hidden_proto(getgrent_r)
+libc_hidden_proto(getgrgid_r)
+libc_hidden_proto(getgrnam_r)
+libc_hidden_proto(getgroups)
+libc_hidden_proto(gethostbyaddr)
+libc_hidden_proto(gethostbyaddr_r)
+libc_hidden_proto(gethostbyname)
+libc_hidden_proto(gethostbyname2_r)
+libc_hidden_proto(gethostbyname_r)
+libc_hidden_proto(gethostent_r)
+libc_hidden_proto(gethostname)
+libc_hidden_proto(getline)
+libc_hidden_proto(getlogin)
+libc_hidden_proto(getmntent_r)
+libc_hidden_proto(getnameinfo)
+libc_hidden_proto(getnetent)
+libc_hidden_proto(getopt)
+libc_hidden_proto(getpagesize)
+libc_hidden_proto(getpid)
+libc_hidden_proto(getpriority)
+libc_hidden_proto(getprotobyname_r)
+libc_hidden_proto(getprotobynumber_r)
+libc_hidden_proto(getprotoent_r)
+libc_hidden_proto(getpwent_r)
+libc_hidden_proto(getpwnam_r)
+libc_hidden_proto(getpwuid_r)
+libc_hidden_proto(getrlimit)
+libc_hidden_proto(getrpcbyname)
+libc_hidden_proto(getrpcbynumber)
+libc_hidden_proto(getrpcent)
+libc_hidden_proto(getservbyname_r)
+libc_hidden_proto(getservbyport)
+libc_hidden_proto(getservbyport_r)
+libc_hidden_proto(getservent_r)
+libc_hidden_proto(getsid)
+libc_hidden_proto(getsockname)
+libc_hidden_proto(getspent_r)
+libc_hidden_proto(getspnam_r)
+/* libc_hidden_proto(getspuid_r) - currently is not exported to users */
+libc_hidden_proto(gettimeofday)
+libc_hidden_proto(getttyent)
+libc_hidden_proto(getuid)
+libc_hidden_proto(getutid)
+libc_hidden_proto(glob)
+libc_hidden_proto(glob64)
+#if defined __USE_GNU && defined __UCLIBC_HAS_GNU_GLOB__
+libc_hidden_proto(glob_pattern_p)
+#endif
+libc_hidden_proto(globfree)
+libc_hidden_proto(globfree64)
+// TODO: explain why this isn't done in !THREADS case?
+#ifdef __UCLIBC_HAS_THREADS__
+libc_hidden_proto(h_errno)
+#endif
+libc_hidden_proto(hcreate_r)
+libc_hidden_proto(hdestroy_r)
+libc_hidden_proto(herror)
+libc_hidden_proto(hsearch_r)
+libc_hidden_proto(if_freenameindex)
+libc_hidden_proto(if_nameindex)
+libc_hidden_proto(if_nametoindex)
+#ifdef __UCLIBC_HAS_IPV6__
+libc_hidden_proto(in6addr_loopback)
+#endif
+libc_hidden_proto(inet_addr)
+libc_hidden_proto(inet_aton)
+libc_hidden_proto(inet_makeaddr)
+libc_hidden_proto(inet_netof)
+libc_hidden_proto(inet_network)
+libc_hidden_proto(inet_ntoa)
+/* libc_hidden_proto(inet_ntoa_r) - currently is not exported to users */
+libc_hidden_proto(inet_ntop)
+libc_hidden_proto(inet_pton)
+libc_hidden_proto(initstate_r)
+libc_hidden_proto(ioctl)
+/* libc_hidden_proto(ioperm) - arch-specific function (may be declared in sys/io.h) */
+
+/* seems to work even when they are parametric macro */
+libc_hidden_proto(isascii)
+libc_hidden_proto(isspace)
+
+libc_hidden_proto(isatty)
+libc_hidden_proto(jrand48_r)
+libc_hidden_proto(kill)
+libc_hidden_proto(lfind)
+libc_hidden_proto(listen)
+libc_hidden_proto(localeconv)
+libc_hidden_proto(localtime)
+libc_hidden_proto(localtime_r)
+libc_hidden_proto(lockf)
+libc_hidden_proto(lockf64)
+libc_hidden_proto(lrand48_r)
+libc_hidden_proto(lseek)
+libc_hidden_proto(lseek64)
+libc_hidden_proto(lstat)
+libc_hidden_proto(lstat64)
+libc_hidden_proto(mallinfo)
+libc_hidden_proto(memchr)
+libc_hidden_proto(memcmp)
+libc_hidden_proto(memcpy)
+libc_hidden_proto(memmem)
+libc_hidden_proto(memmove)
+libc_hidden_proto(mempcpy)
+libc_hidden_proto(memrchr)
+libc_hidden_proto(memset)
+libc_hidden_proto(mkdir)
+libc_hidden_proto(mknod)
+libc_hidden_proto(mmap)
+libc_hidden_proto(mremap)
+libc_hidden_proto(munmap)
+libc_hidden_proto(nanosleep)
+libc_hidden_proto(nl_langinfo)
+libc_hidden_proto(nrand48_r)
+libc_hidden_proto(ns_name_ntop)
+libc_hidden_proto(ns_name_uncompress)
+libc_hidden_proto(ns_name_unpack)
+libc_hidden_proto(open)
+libc_hidden_proto(open64)
+#ifdef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__
+libc_hidden_proto(open_memstream)
+#endif
+libc_hidden_proto(opendir)
+libc_hidden_proto(openlog)
+libc_hidden_proto(perror)
+libc_hidden_proto(pipe)
+libc_hidden_proto(pmap_getport)
+libc_hidden_proto(pmap_set)
+libc_hidden_proto(pmap_unset)
+libc_hidden_proto(poll)
+libc_hidden_proto(ppoll)
+libc_hidden_proto(printf)
+libc_hidden_proto(ptsname_r)
+libc_hidden_proto(putc)
+libc_hidden_proto(putc_unlocked)
+libc_hidden_proto(qsort)
+libc_hidden_proto(raise)
+libc_hidden_proto(random)
+libc_hidden_proto(random_r)
+libc_hidden_proto(rawmemchr)
+libc_hidden_proto(read)
+libc_hidden_proto(readdir)
+libc_hidden_proto(readdir64)
+libc_hidden_proto(readdir64_r)
+libc_hidden_proto(readdir_r)
+libc_hidden_proto(readlink)
+libc_hidden_proto(recv)
+libc_hidden_proto(recvfrom)
+libc_hidden_proto(recvmsg)
+libc_hidden_proto(remove)
+libc_hidden_proto(res_init)
+libc_hidden_proto(res_query)
+libc_hidden_proto(res_querydomain)
+libc_hidden_proto(rewind)
+libc_hidden_proto(rexec_af)
+libc_hidden_proto(rmdir)
+libc_hidden_proto(rresvport)
+libc_hidden_proto(rtime)
+libc_hidden_proto(sbrk)
+libc_hidden_proto(seed48_r)
+libc_hidden_proto(select)
+libc_hidden_proto(send)
+libc_hidden_proto(sendmsg)
+libc_hidden_proto(sendto)
+libc_hidden_proto(setenv)
+libc_hidden_proto(seteuid)
+libc_hidden_proto(setgroups)
+libc_hidden_proto(setitimer)
+libc_hidden_proto(setmntent)
+libc_hidden_proto(setnetent)
+libc_hidden_proto(setpgid)
+libc_hidden_proto(setpriority)
+libc_hidden_proto(setprotoent)
+libc_hidden_proto(setregid)
+libc_hidden_proto(setresgid)
+libc_hidden_proto(setresuid)
+libc_hidden_proto(setreuid)
+libc_hidden_proto(setrlimit)
+libc_hidden_proto(setrpcent)
+libc_hidden_proto(setservent)
+libc_hidden_proto(setsid)
+libc_hidden_proto(setsockopt)
+libc_hidden_proto(setstate_r)
+libc_hidden_proto(settimeofday)
+libc_hidden_proto(setttyent)
+libc_hidden_proto(setutent)
+libc_hidden_proto(setvbuf)
+libc_hidden_proto(sgetspent_r)
+libc_hidden_proto(sigaction)
+libc_hidden_proto(sigaddset)
+#ifdef __UCLIBC_HIDE_DEPRECATED__
+libc_hidden_proto(sigblock)
+#endif
+libc_hidden_proto(sigdelset)
+libc_hidden_proto(sigemptyset)
+libc_hidden_proto(sigfillset)
+libc_hidden_proto(signal)
+#ifdef __FAVOR_BSD
+libc_hidden_proto(sigpause)
+#endif
+libc_hidden_proto(sigprocmask)
+#ifdef __UCLIBC_HIDE_DEPRECATED__
+libc_hidden_proto(sigsetmask)
+#endif
+libc_hidden_proto(sigsuspend)
+libc_hidden_proto(sigtimedwait)
+libc_hidden_proto(sigwait)
+libc_hidden_proto(sigwaitinfo)
+libc_hidden_proto(sleep)
+libc_hidden_proto(snprintf)
+libc_hidden_proto(socket)
+libc_hidden_proto(sprintf)
+libc_hidden_proto(srand48_r)
+libc_hidden_proto(srandom_r)
+libc_hidden_proto(sscanf)
+libc_hidden_proto(stat)
+libc_hidden_proto(stat64)
+libc_hidden_proto(statfs)
+libc_hidden_proto(statfs64)
+libc_hidden_proto(stpcpy)
+libc_hidden_proto(stpncpy)
+libc_hidden_proto(strcasecmp)
+libc_hidden_proto(strcat)
+libc_hidden_proto(strchr)
+libc_hidden_proto(strchrnul)
+libc_hidden_proto(strcmp)
+libc_hidden_proto(strcoll)
+libc_hidden_proto(strcpy)
+libc_hidden_proto(strcspn)
+libc_hidden_proto(strdup)
+libc_hidden_proto(strerror)
+libc_hidden_proto(strftime)
+libc_hidden_proto(strlcpy)
+libc_hidden_proto(strlen)
+libc_hidden_proto(strncasecmp)
+libc_hidden_proto(strncat)
+libc_hidden_proto(strncmp)
+libc_hidden_proto(strncpy)
+libc_hidden_proto(strndup)
+libc_hidden_proto(strnlen)
+libc_hidden_proto(strpbrk)
+libc_hidden_proto(strptime)
+libc_hidden_proto(strrchr)
+libc_hidden_proto(strsep)
+libc_hidden_proto(strsignal)
+libc_hidden_proto(strspn)
+libc_hidden_proto(strstr)
+libc_hidden_proto(strtod)
+libc_hidden_proto(strtok_r)
+libc_hidden_proto(strtol)
+libc_hidden_proto(strtoll)
+libc_hidden_proto(strtoul)
+libc_hidden_proto(strxfrm)
+libc_hidden_proto(svc_getreq)
+libc_hidden_proto(svc_getreq_common)
+libc_hidden_proto(svc_getreq_poll)
+libc_hidden_proto(svc_getreqset)
+libc_hidden_proto(svc_register)
+libc_hidden_proto(svc_sendreply)
+libc_hidden_proto(svc_unregister)
+libc_hidden_proto(svcerr_auth)
+libc_hidden_proto(svcerr_decode)
+libc_hidden_proto(svcerr_noprog)
+libc_hidden_proto(svcerr_progvers)
+libc_hidden_proto(svcudp_bufcreate)
+libc_hidden_proto(svcudp_create)
+libc_hidden_proto(sysconf)
+libc_hidden_proto(syslog)
+libc_hidden_proto(tcgetattr)
+libc_hidden_proto(tcgetpgrp)
+libc_hidden_proto(tcsetattr)
+libc_hidden_proto(tdestroy)
+libc_hidden_proto(tfind)
+libc_hidden_proto(time)
+libc_hidden_proto(times)
+libc_hidden_proto(tolower)
+libc_hidden_proto(toupper)
+libc_hidden_proto(truncate)
+libc_hidden_proto(tsearch)
+libc_hidden_proto(ttyname_r)
+libc_hidden_proto(tzset)
+libc_hidden_proto(uname)
+libc_hidden_proto(ungetc)
+libc_hidden_proto(unlink)
+libc_hidden_proto(unsetenv)
+libc_hidden_proto(updwtmp)
+libc_hidden_proto(utime)
+libc_hidden_proto(utimes)
+libc_hidden_proto(vasprintf)
+libc_hidden_proto(vdprintf)
+libc_hidden_proto(verr)
+libc_hidden_proto(verrx)
+libc_hidden_proto(vfork)
+libc_hidden_proto(vfprintf)
+libc_hidden_proto(vfscanf)
+libc_hidden_proto(vscanf)
+libc_hidden_proto(vsnprintf)
+libc_hidden_proto(vsscanf)
+libc_hidden_proto(vsyslog)
+libc_hidden_proto(vwarn)
+libc_hidden_proto(vwarnx)
+libc_hidden_proto(wait4)
+libc_hidden_proto(waitpid)
+libc_hidden_proto(wordfree)
+libc_hidden_proto(write)
+libc_hidden_proto(xdr_array)
+libc_hidden_proto(xdr_authunix_parms)
+libc_hidden_proto(xdr_bool)
+libc_hidden_proto(xdr_bytes)
+libc_hidden_proto(xdr_callhdr)
+libc_hidden_proto(xdr_callmsg)
+libc_hidden_proto(xdr_enum)
+libc_hidden_proto(xdr_hyper)
+libc_hidden_proto(xdr_int)
+libc_hidden_proto(xdr_long)
+libc_hidden_proto(xdr_opaque)
+libc_hidden_proto(xdr_opaque_auth)
+libc_hidden_proto(xdr_pmap)
+libc_hidden_proto(xdr_pmaplist)
+libc_hidden_proto(xdr_reference)
+libc_hidden_proto(xdr_replymsg)
+libc_hidden_proto(xdr_rmtcall_args)
+libc_hidden_proto(xdr_rmtcallres)
+libc_hidden_proto(xdr_short)
+libc_hidden_proto(xdr_string)
+libc_hidden_proto(xdr_u_hyper)
+libc_hidden_proto(xdr_u_int)
+libc_hidden_proto(xdr_u_long)
+libc_hidden_proto(xdr_u_short)
+libc_hidden_proto(xdr_union)
+libc_hidden_proto(xdr_void)
+libc_hidden_proto(xdrmem_create)
+libc_hidden_proto(xdrrec_create)
+libc_hidden_proto(xdrrec_endofrecord)
+libc_hidden_proto(xdrrec_eof)
+libc_hidden_proto(xdrrec_skiprecord)
+libc_hidden_proto(xprt_register)
+libc_hidden_proto(xprt_unregister)
+
+#ifdef __UCLIBC_HAS_XLOCALE__
+libc_hidden_proto(duplocale)
+libc_hidden_proto(newlocale)
+libc_hidden_proto(uselocale)
+libc_hidden_proto(isspace_l)
+libc_hidden_proto(nl_langinfo_l)
+libc_hidden_proto(strcasecmp_l)
+libc_hidden_proto(strftime_l)
+libc_hidden_proto(strncasecmp_l)
+libc_hidden_proto(strptime_l)
+libc_hidden_proto(strtol_l)
+libc_hidden_proto(strtoul_l)
+libc_hidden_proto(tolower_l)
+libc_hidden_proto(toupper_l)
+#endif
+
+#ifdef __UCLIBC_HAS_WCHAR__
+libc_hidden_proto(btowc)
+libc_hidden_proto(fgetwc)
+libc_hidden_proto(fgetwc_unlocked)
+libc_hidden_proto(fgetws_unlocked)
+libc_hidden_proto(fputwc_unlocked)
+libc_hidden_proto(fputws)
+libc_hidden_proto(fputws_unlocked)
+libc_hidden_proto(fwprintf)
+libc_hidden_proto(iswalnum)
+libc_hidden_proto(iswctype)
+libc_hidden_proto(iswlower)
+libc_hidden_proto(iswspace)
+libc_hidden_proto(mbrlen)
+libc_hidden_proto(mbrtowc)
+libc_hidden_proto(mbsinit)
+libc_hidden_proto(mbsnrtowcs)
+libc_hidden_proto(mbsrtowcs)
+libc_hidden_proto(towctrans)
+libc_hidden_proto(towlower)
+libc_hidden_proto(towupper)
+libc_hidden_proto(ungetwc)
+libc_hidden_proto(vfwprintf)
+libc_hidden_proto(vfwscanf)
+libc_hidden_proto(vswprintf)
+libc_hidden_proto(vswscanf)
+libc_hidden_proto(wcrtomb)
+libc_hidden_proto(wcscat)
+libc_hidden_proto(wcscmp)
+libc_hidden_proto(wcscoll)
+libc_hidden_proto(wcsftime)
+libc_hidden_proto(wcslen)
+libc_hidden_proto(wcsnlen)
+libc_hidden_proto(wcsnrtombs)
+libc_hidden_proto(wcspbrk)
+libc_hidden_proto(wcsrtombs)
+libc_hidden_proto(wcsspn)
+libc_hidden_proto(wcswidth)
+libc_hidden_proto(wcsxfrm)
+libc_hidden_proto(wctrans)
+libc_hidden_proto(wctype)
+libc_hidden_proto(wmemchr)
+libc_hidden_proto(wmemcpy)
+libc_hidden_proto(wmempcpy)
+#ifdef __UCLIBC_HAS_XLOCALE__
+libc_hidden_proto(iswctype_l)
+libc_hidden_proto(iswspace_l)
+libc_hidden_proto(towctrans_l)
+libc_hidden_proto(towlower_l)
+libc_hidden_proto(towupper_l)
+libc_hidden_proto(wcscoll_l)
+libc_hidden_proto(wcsftime_l)
+libc_hidden_proto(wcsxfrm_l)
+libc_hidden_proto(wctype_l)
+#endif
+#endif
diff -d -urpN uClibc.5/libc/inet/getaddrinfo.c uClibc.6/libc/inet/getaddrinfo.c
--- uClibc.5/libc/inet/getaddrinfo.c	2008-04-01 19:54:57.000000000 +0200
+++ uClibc.6/libc/inet/getaddrinfo.c	2008-04-10 02:13:51.000000000 +0200
@@ -50,46 +50,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
   If these license terms cause you a real problem, contact the author.  */
 
 #define __FORCE_GLIBC
-#include <features.h>
-#include <assert.h>
-#include <errno.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
+#include <uClibc_libc.h>
 #include <arpa/inet.h>
-#include <sys/socket.h>
 #include <netinet/in.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <sys/utsname.h>
 #include <net/if.h>
 
-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(__h_errno_location)
-/* libc_hidden_proto(uname) */
-#ifdef __UCLIBC_HAS_IPV6__
-libc_hidden_proto(in6addr_loopback)
-#endif
-
 #define GAIH_OKIFUNSPEC 0x0100
 #define GAIH_EAI        ~(GAIH_OKIFUNSPEC)
 
@@ -776,7 +741,6 @@ static struct gaih gaih[] =
     { PF_UNSPEC, NULL }
 };
 
-libc_hidden_proto(freeaddrinfo)
 void
 freeaddrinfo (struct addrinfo *ai)
 {
@@ -791,7 +755,6 @@ freeaddrinfo (struct addrinfo *ai)
 }
 libc_hidden_def(freeaddrinfo)
 
-libc_hidden_proto(getaddrinfo)
 int
 getaddrinfo (const char *name, const char *service,
 	     const struct addrinfo *hints, struct addrinfo **pai)
diff -d -urpN uClibc.5/libc/inet/ifaddrs.c uClibc.6/libc/inet/ifaddrs.c
--- uClibc.5/libc/inet/ifaddrs.c	2008-02-12 15:43:54.000000000 +0100
+++ uClibc.6/libc/inet/ifaddrs.c	2008-04-10 02:12:11.000000000 +0200
@@ -18,39 +18,14 @@
    02111-1307 USA.  */
 
 #define __FORCE_GLIBC
-#include <features.h>
-#include <alloca.h>
-#include <assert.h>
-#include <errno.h>
-/*#include <ifaddrs.h>*/
+
+#include <uClibc_libc.h>
 #include <net/if.h>
 #include <netinet/in.h>
 #include <netpacket/packet.h>
-#include <stdbool.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <libc-internal.h>
-#include <time.h>
-#include <unistd.h>
 
 #include "netlinkaccess.h"
 
-libc_hidden_proto(socket)
-libc_hidden_proto(close)
-libc_hidden_proto(time)
-libc_hidden_proto(sendto)
-libc_hidden_proto(recvmsg)
-libc_hidden_proto(bind)
-libc_hidden_proto(memset)
-libc_hidden_proto(mempcpy)
-libc_hidden_proto(getsockname)
-libc_hidden_proto(fclose)
-libc_hidden_proto(abort)
-
 #ifndef __libc_use_alloca
 # define __libc_use_alloca(x) (x < __MAX_ALLOCA_CUTOFF)
 #endif
diff -d -urpN uClibc.5/libc/inet/netlinkaccess.h uClibc.6/libc/inet/netlinkaccess.h
--- uClibc.5/libc/inet/netlinkaccess.h	2008-02-12 15:43:54.000000000 +0100
+++ uClibc.6/libc/inet/netlinkaccess.h	2008-04-10 14:22:18.000000000 +0200
@@ -23,12 +23,15 @@
 #include <stdint.h>
 #include <sys/types.h>
 
-#define _LINUX_TYPES_H
-typedef uint8_t __u8;
-typedef uint16_t __u16;
-typedef uint32_t __u32;
-typedef uint64_t __u64;
-typedef int32_t __s32;
+//#define _LINUX_TYPES_H
+#include <linux/types.h>
+/* Must be declared in linux/types.h:
+ * typedef uint8_t __u8;
+ * typedef uint16_t __u16;
+ * typedef uint32_t __u32;
+ * typedef uint64_t __u64;
+ * typedef int32_t __s32;
+ */
 #include <linux/rtnetlink.h>
 #include <linux/netlink.h>
 
diff -d -urpN uClibc.5/libc/inet/resolv.c uClibc.6/libc/inet/resolv.c
--- uClibc.5/libc/inet/resolv.c	2008-02-12 20:29:29.000000000 +0100
+++ uClibc.6/libc/inet/resolv.c	2008-04-10 01:52:55.000000000 +0200
@@ -134,97 +134,18 @@
  */
 
 #define __FORCE_GLIBC
-#include <features.h>
-#include <string.h>
-#include <strings.h>
-#include <stdio.h>
-#include <signal.h>
-#include <errno.h>
-#include <sys/poll.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <stdlib.h>
-#include <malloc.h>
-#include <unistd.h>
-#include <resolv.h>
-#include <netdb.h>
-#include <ctype.h>
-#include <stdbool.h>
-#include <arpa/nameser.h>
-#include <sys/utsname.h>
-#include <sys/un.h>
+#include <uClibc_libc.h>
 #include <bits/uClibc_mutex.h>
 
 /* poll() is not supported in kernel <= 2.0, therefore if __NR_poll is
  * not available, we assume an old Linux kernel is in use and we will
  * use select() instead. */
-#include <sys/syscall.h>
 #ifndef __NR_poll
 # define USE_SELECT
 #endif
 
 __UCLIBC_MUTEX_EXTERN(__resolv_lock);
 
-libc_hidden_proto(memcpy)
-libc_hidden_proto(memset)
-libc_hidden_proto(memmove)
-libc_hidden_proto(strchr)
-libc_hidden_proto(strcmp)
-libc_hidden_proto(strcpy)
-libc_hidden_proto(strdup)
-libc_hidden_proto(strlen)
-libc_hidden_proto(strncat)
-libc_hidden_proto(strncpy)
-/* libc_hidden_proto(strnlen) */
-libc_hidden_proto(strstr)
-libc_hidden_proto(strcasecmp)
-libc_hidden_proto(socket)
-libc_hidden_proto(close)
-libc_hidden_proto(fopen)
-libc_hidden_proto(fclose)
-libc_hidden_proto(random)
-libc_hidden_proto(getservbyport)
-libc_hidden_proto(getdomainname)
-libc_hidden_proto(uname)
-libc_hidden_proto(inet_addr)
-libc_hidden_proto(inet_aton)
-libc_hidden_proto(inet_pton)
-libc_hidden_proto(inet_ntop)
-libc_hidden_proto(connect)
-libc_hidden_proto(poll)
-libc_hidden_proto(select)
-libc_hidden_proto(recv)
-libc_hidden_proto(send)
-libc_hidden_proto(printf)
-libc_hidden_proto(sprintf)
-libc_hidden_proto(snprintf)
-libc_hidden_proto(fgets)
-libc_hidden_proto(gethostbyname)
-libc_hidden_proto(gethostbyname_r)
-libc_hidden_proto(gethostbyname2_r)
-libc_hidden_proto(gethostbyaddr)
-libc_hidden_proto(gethostbyaddr_r)
-libc_hidden_proto(ns_name_uncompress)
-libc_hidden_proto(ns_name_unpack)
-libc_hidden_proto(ns_name_ntop)
-libc_hidden_proto(res_init)
-libc_hidden_proto(res_query)
-libc_hidden_proto(res_querydomain)
-libc_hidden_proto(gethostent_r)
-libc_hidden_proto(fprintf)
-libc_hidden_proto(__h_errno_location)
-#ifdef __UCLIBC_HAS_XLOCALE__
-libc_hidden_proto(__ctype_b_loc)
-#elif __UCLIBC_HAS_CTYPE_TABLES__
-libc_hidden_proto(__ctype_b)
-#endif
-libc_hidden_proto(__uc_malloc)
-
-
-
 #define MAX_RECURSE 5
 #define REPLY_TIMEOUT 10
 #define MAX_RETRIES 3
diff -d -urpN uClibc.5/libc/inet/rpc/pmap_rmt.c uClibc.6/libc/inet/rpc/pmap_rmt.c
--- uClibc.5/libc/inet/rpc/pmap_rmt.c	2008-02-12 15:43:53.000000000 +0100
+++ uClibc.6/libc/inet/rpc/pmap_rmt.c	2008-04-10 02:15:17.000000000 +0200
@@ -40,49 +40,15 @@ static char sccsid[] = "@(#)pmap_rmt.c 1
  */
 
 #define __FORCE_GLIBC
-#include <features.h>
-
-#include <unistd.h>
-#include <string.h>
+#include <uClibc_libc.h>
 #include <rpc/rpc.h>
 #include <rpc/pmap_prot.h>
 #include <rpc/pmap_clnt.h>
 #include <rpc/pmap_rmt.h>
-#include <sys/poll.h>
-#include <sys/socket.h>
-#include <stdio.h>
-#include <errno.h>
-#undef	 _POSIX_SOURCE		/* Ultrix <sys/param.h> needs --roland@gnu */
-#include <sys/param.h>		/* Ultrix needs before net/if --roland@gnu */
 #include <net/if.h>
-#include <sys/ioctl.h>
 #include <arpa/inet.h>
 #define MAX_BROADCAST_SIZE 1400
 
-libc_hidden_proto(memset)
-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(fprintf)
-
-
 extern u_long _create_xid (void) attribute_hidden;
 
 static const struct timeval timeout = {3, 0};
diff -d -urpN uClibc.5/libc/inet/rpc/rcmd.c uClibc.6/libc/inet/rpc/rcmd.c
--- uClibc.5/libc/inet/rpc/rcmd.c	2008-02-12 15:43:53.000000000 +0100
+++ uClibc.6/libc/inet/rpc/rcmd.c	2008-04-10 02:08:55.000000000 +0200
@@ -60,87 +60,11 @@ static char sccsid[] = "@(#)rcmd.c	8.3 (
 #endif /* LIBC_SCCS and not lint */
 
 #define __UCLIBC_HIDE_DEPRECATED__
-#include <features.h>
-#include <sys/param.h>
-#include <sys/poll.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
+#include <uClibc_libc.h>
 
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#include <alloca.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdio_ext.h>
-#include <ctype.h>
-#include <string.h>
-#include <libintl.h>
-#include <stdlib.h>
-#ifdef __UCLIBC_HAS_WCHAR__
-#include <wchar.h>
-#endif
-#include <sys/uio.h>
-
-libc_hidden_proto(memcmp)
-libc_hidden_proto(strcat)
-libc_hidden_proto(strchr)
-libc_hidden_proto(strcmp)
-libc_hidden_proto(strcpy)
-libc_hidden_proto(strlen)
-libc_hidden_proto(strncmp)
-libc_hidden_proto(memmove)
-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(fclose)
-libc_hidden_proto(fprintf)
-libc_hidden_proto(__h_errno_location)
-#ifdef __UCLIBC_HAS_XLOCALE__
-libc_hidden_proto(__ctype_b_loc)
-libc_hidden_proto(__ctype_tolower_loc)
-#elif __UCLIBC_HAS_CTYPE_TABLES__
-libc_hidden_proto(__ctype_b)
-libc_hidden_proto(__ctype_tolower)
-#endif
-
-libc_hidden_proto(rresvport)
-
 /* some forward declarations */
 static int __ivaliduser2(FILE *hostf, u_int32_t raddr,
 			 const char *luser, const char *ruser, const char *rhost);
diff -d -urpN uClibc.5/libc/misc/locale/locale.c uClibc.6/libc/misc/locale/locale.c
--- uClibc.5/libc/misc/locale/locale.c	2008-02-12 15:44:08.000000000 +0100
+++ uClibc.6/libc/misc/locale/locale.c	2008-04-10 04:00:47.000000000 +0200
@@ -48,29 +48,7 @@
 
 #define __CTYPE_HAS_8_BIT_LOCALES 1
 
-#include <string.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <limits.h>
-#include <stdint.h>
-#include <assert.h>
-#include <errno.h>
-#include <ctype.h>
-#include <stdio.h>
-
-libc_hidden_proto(memcpy)
-libc_hidden_proto(memset)
-libc_hidden_proto(strtok_r)
-libc_hidden_proto(strlen)
-libc_hidden_proto(strcmp)
-libc_hidden_proto(strcpy)
-libc_hidden_proto(strncmp)
-libc_hidden_proto(strchr)
-libc_hidden_proto(getenv)
-#ifdef __UCLIBC_HAS_CTYPE_TABLES__
-libc_hidden_proto(__C_ctype_toupper)
-#endif
-/*libc_hidden_proto(fflush)*/
+#include <features.h> /* __UCLIBC_HAS_LOCALE__ or not? */
 
 #ifdef __UCLIBC_MJN3_ONLY__
 #ifdef L_setlocale
@@ -85,12 +63,16 @@ libc_hidden_proto(__C_ctype_toupper)
 #define __LOCALE_C_ONLY
 #endif /* __UCLIBC_HAS_LOCALE__ */
 
+/* Need to include this before locale.h and xlocale.h! */
+#include <bits/uClibc_locale.h>
+
 
 #ifdef __LOCALE_C_ONLY
 
-#include <locale.h>
+#include <uClibc_libc.h>
+
+#else
 
-#else  /* __LOCALE_C_ONLY */
 
 #ifdef __UCLIBC_MJN3_ONLY__
 #ifdef L_setlocale
@@ -99,24 +81,21 @@ libc_hidden_proto(__C_ctype_toupper)
 #endif
 #endif
 
-/* Need to include this before locale.h and xlocale.h! */
-#include <bits/uClibc_locale.h>
-
 #undef CODESET_LIST
 #define CODESET_LIST			(__locale_mmap->codeset_list)
 
-#ifdef __UCLIBC_HAS_XLOCALE__
-#include <xlocale.h>
-#include <locale.h>
-#else  /* __UCLIBC_HAS_XLOCALE__ */
+#ifndef __UCLIBC_HAS_XLOCALE__
 /* We need this internally... */
 #define __UCLIBC_HAS_XLOCALE__ 1
 #include <xlocale.h>
 #include <locale.h>
+libc_hidden_proto(duplocale)
+libc_hidden_proto(newlocale)
+libc_hidden_proto(uselocale)
 #undef __UCLIBC_HAS_XLOCALE__
-#endif /* __UCLIBC_HAS_XLOCALE__ */
+#endif
 
-#include <wchar.h>
+#include <uClibc_libc.h>
 
 #define LOCALE_NAMES			(__locale_mmap->locale_names5)
 #define LOCALES					(__locale_mmap->locales)
@@ -133,8 +112,10 @@ libc_hidden_proto(__C_ctype_toupper)
 extern int _locale_set_l(const unsigned char *p, __locale_t base) attribute_hidden;
 extern void _locale_init_l(__locale_t base) attribute_hidden;
 
+
 #endif /* __LOCALE_C_ONLY */
 
+
 #undef LOCALE_STRING_SIZE
 #define LOCALE_SELECTOR_SIZE (2 * __LC_ALL + 2)
 
@@ -146,9 +127,6 @@ extern void _locale_init_l(__locale_t ba
 #define C_LOCALE_SELECTOR "\x23\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80"
 
 
-#include <langinfo.h>
-#include <nl_types.h>
-
 /**********************************************************************/
 #ifdef L_setlocale
 
@@ -193,9 +171,6 @@ static const char utf8[] = "UTF-8";
  */
 static char hr_locale[(MAX_LOCALE_CATEGORY_STR * LC_ALL) + MAX_LOCALE_STR];
 
-libc_hidden_proto(stpcpy)
-libc_hidden_proto(newlocale)
-
 static void update_hr_locale(const unsigned char *spec)
 {
 	const unsigned char *loc;
@@ -303,8 +278,6 @@ char *setlocale(int category, const char
  * 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)
-
 #ifdef __LOCALE_C_ONLY
 
 link_warning(localeconv,"REMINDER: The 'localeconv' function is hardwired for C/POSIX locale only.")
@@ -364,14 +337,6 @@ libc_hidden_def(localeconv)
 /**********************************************************************/
 #if defined(L__locale_init) && !defined(__LOCALE_C_ONLY)
 
-libc_hidden_proto(__C_ctype_b)
-libc_hidden_proto(__C_ctype_tolower)
-#ifndef __UCLIBC_HAS_XLOCALE__
-libc_hidden_proto(__ctype_b)
-libc_hidden_proto(__ctype_tolower)
-libc_hidden_proto(__ctype_toupper)
-#endif
-
 __uclibc_locale_t __global_locale_data;
 
 __locale_t __global_locale = &__global_locale_data;
@@ -1026,7 +991,6 @@ static const unsigned char nl_data[C_LC_
 	   ']', '\x00',    '^',    '[',    'n',    'N',    ']', '\x00', 
 };
 
-libc_hidden_proto(nl_langinfo)
 char *nl_langinfo(nl_item item)
 {
 	unsigned int c;
@@ -1046,10 +1010,6 @@ libc_hidden_def(nl_langinfo)
 
 #if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE)
 
-libc_hidden_proto(nl_langinfo)
-
-libc_hidden_proto(nl_langinfo_l)
-
 char *nl_langinfo(nl_item item)
 {
 	return nl_langinfo_l(item, __UCLIBC_CURLOCALE);
@@ -1058,8 +1018,6 @@ libc_hidden_def(nl_langinfo)
 
 #else  /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
 
-libc_hidden_proto(__XL_NPP(nl_langinfo))
-
 static const char empty[] = "";
 
 char *__XL_NPP(nl_langinfo)(nl_item item   __LOCALE_PARAM )
@@ -1084,9 +1042,6 @@ libc_hidden_def(__XL_NPP(nl_langinfo))
 /**********************************************************************/
 #ifdef L_newlocale
 
-libc_hidden_proto(stpcpy)
-libc_hidden_proto(newlocale)
-
 #ifdef __UCLIBC_MJN3_ONLY__
 #warning TODO: Move posix and utf8 strings.
 #endif
@@ -1330,8 +1285,6 @@ libc_hidden_def(newlocale)
 /**********************************************************************/
 #ifdef L_duplocale
 
-libc_hidden_proto(duplocale)
-
 #ifdef __UCLIBC_MJN3_ONLY__
 #warning REMINDER: When we allocate ctype tables, remember to dup them.
 #endif
@@ -1382,7 +1335,6 @@ void freelocale(__locale_t dataset)
 /**********************************************************************/
 #ifdef L_uselocale
 
-libc_hidden_proto(uselocale)
 __locale_t uselocale(__locale_t dataset)
 {
 	__locale_t old;
diff -d -urpN uClibc.5/libc/misc/syslog/syslog.c uClibc.6/libc/misc/syslog/syslog.c
--- uClibc.5/libc/misc/syslog/syslog.c	2008-02-12 15:44:08.000000000 +0100
+++ uClibc.6/libc/misc/syslog/syslog.c	2008-04-10 02:04:21.000000000 +0200
@@ -59,50 +59,7 @@
  */
 
 #define __FORCE_GLIBC
-#include <features.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/file.h>
-#include <sys/signal.h>
-#include <sys/syslog.h>
-
-#include <sys/uio.h>
-#include <sys/wait.h>
-#include <netdb.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <paths.h>
-#include <stdio.h>
-#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(memset)
-libc_hidden_proto(memcpy)
-libc_hidden_proto(memmove)
-libc_hidden_proto(strchr)
-libc_hidden_proto(strlen)
-libc_hidden_proto(strncpy)
-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(time)
+#include <uClibc_libc.h>
 
 #include <bits/uClibc_mutex.h>
 __UCLIBC_MUTEX_STATIC(mylock, PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP);
diff -d -urpN uClibc.5/libc/misc/time/time.c uClibc.6/libc/misc/time/time.c
--- uClibc.5/libc/misc/time/time.c	2008-04-10 13:37:29.000000000 +0200
+++ uClibc.6/libc/misc/time/time.c	2008-04-10 13:50:33.000000000 +0200
@@ -129,66 +129,10 @@
  *            differs (intentionally) from glibc's behavior.
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-#include <strings.h>
-#include <time.h>
-#include <sys/time.h>
-#include <limits.h>
-#include <assert.h>
-#include <errno.h>
-#include <ctype.h>
-#include <langinfo.h>
-#include <locale.h>
-#include <fcntl.h>
-#include <unistd.h>
+#include <uClibc_libc.h>
 #include <bits/uClibc_uintmaxtostr.h>
 #include <bits/uClibc_mutex.h>
 
-
-#ifdef __UCLIBC_HAS_WCHAR__
-#include <wchar.h>
-#endif
-#ifdef __UCLIBC_HAS_XLOCALE__
-#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(memset)
-libc_hidden_proto(memcpy)
-libc_hidden_proto(strcmp)
-libc_hidden_proto(strcpy)
-libc_hidden_proto(strlen)
-libc_hidden_proto(strncpy)
-/* libc_hidden_proto(sprintf) */
-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(strncasecmp)
-libc_hidden_proto(strtol)
-libc_hidden_proto(strtoul)
-libc_hidden_proto(nl_langinfo)
-
-#ifdef __UCLIBC_HAS_XLOCALE__
-libc_hidden_proto(strncasecmp_l)
-libc_hidden_proto(strtol_l)
-libc_hidden_proto(strtoul_l)
-libc_hidden_proto(nl_langinfo_l)
-libc_hidden_proto(__ctype_b_loc)
-#elif __UCLIBC_HAS_CTYPE_TABLES__
-libc_hidden_proto(__ctype_b)
-#endif
-
 #ifndef __isleap
 #define __isleap(y) ( !((y) % 4) && ( ((y) % 100) || !((y) % 400) ) )
 #endif
@@ -202,7 +146,7 @@ libc_hidden_proto(__ctype_b)
     ((defined(L_strftime) || defined(L_strftime_l)) && \
     defined(__UCLIBC_HAS_XLOCALE__))
 
-void _time_tzset(int use_old_rules) attribute_hidden;
+extern void _time_tzset(int use_old_rules) attribute_hidden;
 
 #ifndef L__time_mktime
 
@@ -434,8 +378,6 @@ libc_hidden_def(asctime_r)
 
 #include <sys/times.h>
 
-libc_hidden_proto(times)
-
 #ifndef __BCC__
 #if CLOCKS_PER_SEC != 1000000L
 #error unexpected value for CLOCKS_PER_SEC!
@@ -619,8 +561,6 @@ libc_hidden_def(localtime_r)
 
 #ifdef __UCLIBC_HAS_TM_EXTENSIONS__
 
-libc_hidden_proto(strnlen)
-
 struct ll_tzname_item;
 
 typedef struct ll_tzname_item {
@@ -810,10 +750,6 @@ time_t timegm(struct tm *timeptr)
 
 #if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE)
 
-libc_hidden_proto(strftime)
-
-libc_hidden_proto(strftime_l)
-
 size_t strftime(char *__restrict s, size_t maxsize,
 				const char *__restrict format,
 				const struct tm *__restrict timeptr)
@@ -1020,7 +956,6 @@ static int load_field(int k, const struc
 #warning TODO: Check multibyte format string validity.
 #endif
 
-libc_hidden_proto(__XL_NPP(strftime))
 size_t __XL_NPP(strftime)(char *__restrict s, size_t maxsize,
 					  const char *__restrict format,
 					  const struct tm *__restrict timeptr   __LOCALE_PARAM )
@@ -1331,10 +1266,6 @@ libc_hidden_def(__XL_NPP(strftime))
 
 #if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE)
 
-libc_hidden_proto(strptime)
-
-libc_hidden_proto(strptime_l)
-
 char *strptime(const char *__restrict buf, const char *__restrict format,
 			   struct tm *__restrict tm)
 {
@@ -1486,7 +1417,6 @@ static const unsigned char spec[] = {
 
 #define MAX_PUSH 4
 
-libc_hidden_proto(__XL_NPP(strptime))
 char *__XL_NPP(strptime)(const char *__restrict buf, const char *__restrict format,
 					 struct tm *__restrict tm   __LOCALE_PARAM)
 {
@@ -1866,10 +1796,6 @@ ERROR:
 
 #endif /* __UCLIBC_HAS_TZ_FILE__ */
 
-#ifndef __UCLIBC_HAS_CTYPE_TABLES__
-libc_hidden_proto(isascii)
-#endif
-
 void tzset(void)
 {
     _time_tzset((time(NULL)) < new_rule_starts);
@@ -2416,10 +2342,6 @@ DONE:
 
 #if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE)
 
-libc_hidden_proto(wcsftime)
-
-libc_hidden_proto(wcsftime_l)
-
 size_t wcsftime(wchar_t *__restrict s, size_t maxsize,
 				const wchar_t *__restrict format,
 				const struct tm *__restrict timeptr)
@@ -2430,7 +2352,6 @@ libc_hidden_def(wcsftime)
 
 #else  /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */
 
-libc_hidden_proto(__XL_NPP(wcsftime))
 size_t __XL_NPP(wcsftime)(wchar_t *__restrict s, size_t maxsize,
 					  const wchar_t *__restrict format,
 					  const struct tm *__restrict timeptr   __LOCALE_PARAM )
diff -d -urpN uClibc.5/libc/misc/wchar/wchar.c uClibc.6/libc/misc/wchar/wchar.c
--- uClibc.5/libc/misc/wchar/wchar.c	2008-02-12 15:44:09.000000000 +0100
+++ uClibc.6/libc/misc/wchar/wchar.c	2008-04-10 01:56:06.000000000 +0200
@@ -98,16 +98,7 @@
  * Manuel
  */
 
-#include <errno.h>
-#include <stddef.h>
-#include <limits.h>
-#include <stdint.h>
-#include <inttypes.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <assert.h>
-#include <locale.h>
-#include <wchar.h>
+#include <uClibc_libc.h>
 #include <bits/uClibc_uwchar.h>
 
 /**********************************************************************/
@@ -174,9 +165,6 @@ extern size_t _wchar_wcsntoutf8s(char *_
 /**********************************************************************/
 #ifdef L_btowc
 
-libc_hidden_proto(mbrtowc)
-
-libc_hidden_proto(btowc)
 wint_t btowc(int c)
 {
 #ifdef __CTYPE_HAS_8_BIT_LOCALES
@@ -215,8 +203,6 @@ libc_hidden_def(btowc)
 
 /* Note: We completely ignore ps in all currently supported conversions. */
 
-libc_hidden_proto(wcrtomb)
-
 int wctob(wint_t c)
 {
 #ifdef __CTYPE_HAS_8_BIT_LOCALES
@@ -246,7 +232,6 @@ int wctob(wint_t c)
 /**********************************************************************/
 #ifdef L_mbsinit
 
-libc_hidden_proto(mbsinit)
 int mbsinit(const mbstate_t *ps)
 {
 	return !ps || !ps->__mask;
@@ -257,9 +242,6 @@ libc_hidden_def(mbsinit)
 /**********************************************************************/
 #ifdef L_mbrlen
 
-libc_hidden_proto(mbrtowc)
-
-libc_hidden_proto(mbrlen)
 size_t mbrlen(const char *__restrict s, size_t n, mbstate_t *__restrict ps)
 {
 	static mbstate_t mbstate;	/* Rely on bss 0-init. */
@@ -272,9 +254,6 @@ libc_hidden_def(mbrlen)
 /**********************************************************************/
 #ifdef L_mbrtowc
 
-libc_hidden_proto(mbsnrtowcs)
-
-libc_hidden_proto(mbrtowc)
 size_t mbrtowc(wchar_t *__restrict pwc, const char *__restrict s,
 			   size_t n, mbstate_t *__restrict ps)
 {
@@ -331,12 +310,9 @@ libc_hidden_def(mbrtowc)
 /**********************************************************************/
 #ifdef L_wcrtomb
 
-libc_hidden_proto(wcsnrtombs)
-
 /* Note: We completely ignore ps in all currently supported conversions. */
 /* TODO: Check for valid state anyway? */
 
-libc_hidden_proto(wcrtomb)
 size_t wcrtomb(register char *__restrict s, wchar_t wc,
 			   mbstate_t *__restrict ps)
 {
@@ -365,9 +341,6 @@ libc_hidden_def(wcrtomb)
 /**********************************************************************/
 #ifdef L_mbsrtowcs
 
-libc_hidden_proto(mbsnrtowcs)
-
-libc_hidden_proto(mbsrtowcs)
 size_t mbsrtowcs(wchar_t *__restrict dst, const char **__restrict src,
 				 size_t len, mbstate_t *__restrict ps)
 {
@@ -386,9 +359,6 @@ libc_hidden_def(mbsrtowcs)
 
  * TODO: Check for valid state anyway? */
 
-libc_hidden_proto(wcsnrtombs)
-
-libc_hidden_proto(wcsrtombs)
 size_t wcsrtombs(char *__restrict dst, const wchar_t **__restrict src,
 				 size_t len, mbstate_t *__restrict ps)
 {
@@ -692,7 +662,6 @@ size_t attribute_hidden _wchar_wcsntoutf
 
 /* WARNING: We treat len as SIZE_MAX when dst is NULL! */
 
-libc_hidden_proto(mbsnrtowcs)
 size_t mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src,
 					size_t NMC, size_t len, mbstate_t *__restrict ps)
 {
@@ -802,7 +771,6 @@ libc_hidden_def(mbsnrtowcs)
 /* Note: We completely ignore ps in all currently supported conversions.
  * TODO: Check for valid state anyway? */
 
-libc_hidden_proto(wcsnrtombs)
 size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src,
 					size_t NWC, size_t len, mbstate_t *__restrict ps)
 {
@@ -917,8 +885,6 @@ libc_hidden_def(wcsnrtombs)
 /**********************************************************************/
 #ifdef L_wcswidth
 
-libc_hidden_proto(wcswidth)
-
 #ifdef __UCLIBC_MJN3_ONLY__
 #warning REMINDER: If we start doing translit, wcwidth and wcswidth will need updating.
 #warning TODO: Update wcwidth to match latest by Kuhn.
@@ -1033,8 +999,6 @@ static const signed char new_wtbl[] = {
 	0,    2,    1,    2,    1,    0,    1, 
 };
 
-libc_hidden_proto(wcsnrtombs)
-
 int wcswidth(const wchar_t *pwcs, size_t n)
 {
     int h, l, m, count;
@@ -1161,8 +1125,6 @@ libc_hidden_def(wcswidth)
 /**********************************************************************/
 #ifdef L_wcwidth
 
-libc_hidden_proto(wcswidth)
-
 int wcwidth(wchar_t wc)
 {
     return wcswidth(&wc, 1);
@@ -1232,6 +1194,7 @@ enum {
  *
  */
 
+// TODO: change to attribute_hidden?
 extern const unsigned char __iconv_codesets[];
 libc_hidden_proto(__iconv_codesets)
 const unsigned char __iconv_codesets[] =
@@ -1268,8 +1231,6 @@ const unsigned char __iconv_codesets[] =
 	"\x07\x01""ASCII";			/* Must be last! (special case to save a nul) */
 libc_hidden_data_def(__iconv_codesets)
 
-libc_hidden_proto(strcasecmp)
-
 static int find_codeset(const char *name)
 {
 	const unsigned char *s;
diff -d -urpN uClibc.5/libc/misc/wordexp/wordexp.c uClibc.6/libc/misc/wordexp/wordexp.c
--- uClibc.5/libc/misc/wordexp/wordexp.c	2008-02-12 15:44:08.000000000 +0100
+++ uClibc.6/libc/misc/wordexp/wordexp.c	2008-04-10 02:07:23.000000000 +0200
@@ -19,60 +19,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include <features.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <fcntl.h>
-#include <paths.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <errno.h>
-#include <assert.h>
-#include <fnmatch.h>
-#include <glob.h>
-#include <wordexp.h>
-
-libc_hidden_proto(mempcpy)
-libc_hidden_proto(stpcpy)
-libc_hidden_proto(strchr)
-libc_hidden_proto(strcpy)
-libc_hidden_proto(strdup)
-libc_hidden_proto(strlen)
-libc_hidden_proto(strndup)
-libc_hidden_proto(strspn)
-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(close)
-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)
-#ifdef __UCLIBC_HAS_XLOCALE__
-libc_hidden_proto(__ctype_b_loc)
-#elif __UCLIBC_HAS_CTYPE_TABLES__
-libc_hidden_proto(__ctype_b)
-#endif
+#include <uClibc_libc.h>
 
 #define __WORDEXP_FULL
 //#undef __WORDEXP_FULL
diff -d -urpN uClibc.5/libc/stdio/_scanf.c uClibc.6/libc/stdio/_scanf.c
--- uClibc.5/libc/stdio/_scanf.c	2008-02-12 15:43:56.000000000 +0100
+++ uClibc.6/libc/stdio/_scanf.c	2008-04-10 02:03:36.000000000 +0200
@@ -44,66 +44,17 @@
  */
 
 #define _ISOC99_SOURCE			/* for LLONG_MAX primarily... */
-#include <features.h>
+#include <uClibc_libc.h>
 #include "_stdio.h"
-#include <stdlib.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdint.h>
-#include <errno.h>
-#include <printf.h>
 
 #ifdef __UCLIBC_HAS_WCHAR__
 #include <bits/uClibc_uwchar.h>
-#include <wchar.h>
-#include <wctype.h>
 #endif /* __UCLIBC_HAS_WCHAR__ */
 
-#include <langinfo.h>
-#include <locale.h>
-
-#include <assert.h>
-#include <limits.h>
-
-#ifdef __UCLIBC_HAS_THREADS__
-#include <stdio_ext.h>
-#include <pthread.h>
-#endif /* __UCLIBC_HAS_THREADS__ */
-
 #ifdef __UCLIBC_HAS_FLOATS__
-#include <float.h>
 #include <bits/uClibc_fpmax.h>
 #endif /* __UCLIBC_HAS_FLOATS__ */
 
-libc_hidden_proto(memcmp)
-libc_hidden_proto(memset)
-libc_hidden_proto(strcpy)
-libc_hidden_proto(strlen)
-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)
-#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)
-#endif
-#ifdef __UCLIBC_HAS_XLOCALE__
-libc_hidden_proto(__ctype_b_loc)
-#elif __UCLIBC_HAS_CTYPE_TABLES__
-libc_hidden_proto(__ctype_b)
-#endif
-
 #ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__
 #ifdef L_vfscanf
 /* only emit this once */
@@ -165,7 +116,6 @@ _stdlib_strto_l(register const char * __
 /**********************************************************************/
 #ifdef L_fscanf
 
-libc_hidden_proto(fscanf)
 int fscanf(FILE * __restrict stream, const char * __restrict format, ...)
 {
 	va_list arg;
@@ -201,7 +151,6 @@ int scanf(const char * __restrict format
 
 #ifdef __STDIO_HAS_VSSCANF
 
-libc_hidden_proto(sscanf)
 int sscanf(const char * __restrict str, const char * __restrict format, ...)
 {
 	va_list arg;
@@ -223,7 +172,6 @@ libc_hidden_def(sscanf)
 /**********************************************************************/
 #ifdef L_vscanf
 
-libc_hidden_proto(vscanf)
 int vscanf(const char * __restrict format, va_list arg)
 {
 	return vfscanf(stdin, format, arg);
diff -d -urpN uClibc.5/libc/stdio/_vfprintf.c uClibc.6/libc/stdio/_vfprintf.c
--- uClibc.5/libc/stdio/_vfprintf.c	2008-04-01 23:05:57.000000000 +0200
+++ uClibc.6/libc/stdio/_vfprintf.c	2008-04-10 02:01:34.000000000 +0200
@@ -89,51 +89,15 @@
  */
 
 #define _ISOC99_SOURCE			/* for ULLONG primarily... */
-#include <features.h>
-#include "_stdio.h"
-#include <stdlib.h>
-#include <string.h>
-#include <stddef.h>
-#include <ctype.h>
-#include <limits.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <stdint.h>
-#include <errno.h>
-#include <locale.h>
 
 #define __PRINTF_INFO_NO_BITFIELD
-#include <printf.h>
 
-#ifdef __UCLIBC_HAS_THREADS__
-#include <stdio_ext.h>
-#include <pthread.h>
-#endif /* __UCLIBC_HAS_THREADS__ */
-
-#ifdef __UCLIBC_HAS_WCHAR__
-#include <wchar.h>
-#endif /* __UCLIBC_HAS_WCHAR__ */
+#include <uClibc_libc.h>
+#include "_stdio.h"
 
 #include <bits/uClibc_uintmaxtostr.h>
 #include <bits/uClibc_va_copy.h>
 
-libc_hidden_proto(memcpy)
-libc_hidden_proto(memset)
-libc_hidden_proto(strlen)
-libc_hidden_proto(strnlen)
-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)
-#endif
-
 /* Some older or broken gcc toolchains define LONG_LONG_MAX but not
  * LLONG_MAX.  Since LLONG_MAX is part of the standard, that's what
  * we use.  So complain if we do not have it but should.
@@ -163,7 +127,6 @@ libc_hidden_proto(fputws)
 #endif
 
 #ifdef __STDIO_PRINTF_FLOAT
-#include <float.h>
 #include <bits/uClibc_fpmax.h>
 #else  /* __STDIO_PRINTF_FLOAT */
 #undef L__fpmaxtostr
@@ -730,12 +693,6 @@ void attribute_hidden _ppfs_setargs(regi
 /**********************************************************************/
 #ifdef L__ppfs_parsespec
 
-#ifdef __UCLIBC_HAS_XLOCALE__
-libc_hidden_proto(__ctype_b_loc)
-#elif __UCLIBC_HAS_CTYPE_TABLES__
-libc_hidden_proto(__ctype_b)
-#endif
-
 /* Notes: argtype differs from glibc for the following:
  *         mine              glibc
  *  lc     PA_WCHAR          PA_CHAR       the standard says %lc means %C
@@ -1863,8 +1820,6 @@ static int _do_one_spec(FILE * __restric
 	return 0;
 }
 
-libc_hidden_proto(fprintf)
-
 int VFPRINTF_internal (FILE * __restrict stream,
 			  register const FMT_TYPE * __restrict format,
 			  va_list arg)
@@ -1952,7 +1907,6 @@ int VFPRINTF_internal (FILE * __restrict
 #define FMT_TYPE wchar_t
 #endif
 
-libc_hidden_proto(VFPRINTF)
 int VFPRINTF (FILE * __restrict stream,
 			  register const FMT_TYPE * __restrict format,
 			  va_list arg)
diff -d -urpN uClibc.5/Makefile.in uClibc.6/Makefile.in
--- uClibc.5/Makefile.in	2008-04-01 19:54:59.000000000 +0200
+++ uClibc.6/Makefile.in	2008-04-09 22:21:50.000000000 +0200
@@ -54,6 +54,10 @@ export header_extra_args = -n
 endif
 HEADERS_BITS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/bits/*.h))
 HEADERS_BITS_ARCH   := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/*.h))
+# FIXME: if TARGET_SUBARCH == "", duplicates HEADERS_BITS_ARCH! Result:
+# $ ls -l stackinfo.h
+# lrwxrwxrwx 1 root root 47 Apr 9 22:00 stackinfo.h -> ../../libc/sysdeps/linux/i386/bits//stackinfo.h
+# (note double slash!)
 HEADERS_BITS_SUBARCH   := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/*.h))
 HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH) $(HEADERS_BITS_SUBARCH),$(HEADERS_BITS_COMMON))
 headers: include/bits/uClibc_config.h
