--- eglibc-2.13.orig/debian/libc6.symbols.powerpc
+++ eglibc-2.13/debian/libc6.symbols.powerpc
@@ -0,0 +1,12 @@
+#include "libc6.symbols.common"
+ld.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+### TLS support enabled in Debian upload 2.3.5
+ __tls_get_addr@GLIBC_2.3 2.3.5
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+###
+### Override headers already defined in libc6.symbols.common
+###
+libpthread.so.0 #PACKAGE# (>= 2.3.5), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/shlibs-add-udebs
+++ eglibc-2.13/debian/shlibs-add-udebs
@@ -0,0 +1,51 @@
+#! /bin/sh
+set -e
+
+# This script adds "udeb lines" to shlibs files which allows other udebs
+# to get correct dependencies when built against glibc libraries.
+# The script was written by Frans Pop <fjp@debian.org>.
+
+package="$1"
+shlibs_file="debian/$package/DEBIAN/shlibs"
+
+# Skip packages that don't have an shlibs file.
+# The "cross-subarch" library packages have an shlibs file, but should
+# not have udeb lines, so skip those as well.
+if [ ! -r "$shlibs_file" ] || \
+   echo "$package" | grep -Eq "^libc[0-9.]+-"; then
+	exit 0
+fi
+
+# $1: regexp to select libraries for which lines should be duplicated
+# $2: name of the udeb the new line should point to
+add_udeb_line() {
+	local regexp udeb line lib soname package rest
+	regexp="$1"
+	udeb="$2"
+
+	if line="$(grep "^$regexp[[:space:]]" $shlibs_file)"; then
+		echo "$line" | while read lib soname package rest; do
+			echo "udeb: $lib $soname $udeb $rest" >>$shlibs_file
+		done
+	fi
+}
+
+
+W="[^[:space:]]*"
+
+# The following lists should match the ones in the *-udeb.install files
+# in debian/debhelper.in; $W replaces any "*" wildcards there.
+expr_libc1="ld$W libm-$W libm libdl$W libresolv$W libc-$W libc"
+expr_libc2="libutil$W libcrypt$W librt$W libpthread$W"
+expr_nss_dns="libnss_dns$W"
+expr_nss_files="libnss_files$W"
+
+for expr in $expr_libc1 $expr_libc2; do
+	add_udeb_line "$expr" $package-udeb
+done
+for expr in $expr_nss_dns; do
+	add_udeb_line "$expr" libnss-dns-udeb
+done
+for expr in $expr_nss_files; do
+	add_udeb_line "$expr" libnss-files-udeb
+done
--- eglibc-2.13.orig/debian/libc0.1.symbols.kfreebsd-amd64
+++ eglibc-2.13/debian/libc0.1.symbols.kfreebsd-amd64
@@ -0,0 +1,3 @@
+#include "libc0.1.symbols.common"
+ld-kfreebsd-x86-64.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/shlibver
+++ eglibc-2.13/debian/shlibver
@@ -0,0 +1 @@
+shlib_dep_ver = 2.13
--- eglibc-2.13.orig/debian/libc6.symbols.amd64
+++ eglibc-2.13/debian/libc6.symbols.amd64
@@ -0,0 +1,5 @@
+#include "libc6.symbols.common"
+ld-linux-x86-64.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/changelog
+++ eglibc-2.13/debian/changelog
@@ -0,0 +1,11008 @@
+eglibc (2.13-38+deb7u8) wheezy-security; urgency=medium
+
+  * debian/patches/any/cvs-wscanf.diff: new patch from upstream to fix a
+    heap buffer overflow in wscanf (CVE-2015-1472, CVE-2015-1473). Closes:
+    #777197.
+  * debian/patches/any/cvs-vfprintf.diff: new patch from ustream to fix a
+    stack overflow in vfprintf (CVE-2012-3406). Closes: #681888.
+  * debian/patches/any/cvs-posix_spawn_file_actions_addopen.diff: new patch
+    from upstream to fix a vulnerability in posix_spawn_file_actions_addopen
+    (CVE-2014-4043). Closes: #751774.
+  * debian/patches/any/cvs-getnetbyname.diff: new patch from upstream to fix
+    an infinite loop in getnetbyname (CVE-2014-9402). Closes: #775572.
+  * debian/patches/any/cvs-getaddrinfo-idn.diff: new patch from upstream to
+    fix a invalid-free when using getaddrinfo with IDN (CVE-2013-7424).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 22 Feb 2015 09:49:50 +0100
+
+eglibc (2.13-38+deb7u7) wheezy-security; urgency=medium
+
+  * debian/patches/any/cvs-gethostbyname.diff: new patch from upstream
+    to fix a buffer overflow in gethostbyname (CVE-2015-0235).
+  * debian/patches/any/cvs-iconvdata-ibm930.diff: new patch from upstream to
+    fix a possible crash when using the iconv function to convert IBM930
+    encoded data (CVE-2012-6656).
+  * debian/patches/any/cvs-iconvdata-ibm.diff: new patch from upstream to fix
+    fix a possible crash when using the iconv function to convert IBM933, 
+    IBM935, IBM937, IBM939, IBM1364 encoded data (CVE-2014-6040).
+  * debian/patches/any/cvs-wordexp.diff: new patch from upstream to fix a
+    command execution in wordexp() with WRDE_NOCMD specified (CVS-2014-7817).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 27 Jan 2015 00:38:49 +0100
+
+eglibc (2.13-38+deb7u6) wheezy; urgency=medium
+
+  * Update 2.13-38+deb7u5 changelog to mention that some lost glibc-doc
+    files have been re-added in this version.
+  * debian/patches/any/cvs-CVE-2013-4357.diff: update patch with upstream
+    commit c8fc0c91 to fix segmentation faults when nscd is in use.
+    Closes: #765506, #765526, #765562.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 16 Oct 2014 15:29:00 +0200
+
+eglibc (2.13-38+deb7u5) wheezy; urgency=medium
+
+  * debian/patches/any/cvs-resolv-reuse-fd.diff: new patch from upstream
+    to fix invalid file descriptor reuse while sending DNS query.  Closes:
+    #722075, #756343.
+  * debian/patches/any/cvs-CVE-2013-4357.diff: new patch from upstream to
+    fix stack overflow issues. Closes: #742925.
+  * debian/patches/any/submitted-CVE-2014-0475.diff: update from upstream
+    to fix a localplt regression introduced in version 2.13-38+deb7u3.
+  * patches/any/cvs-dlopen-tls-memleak.patch: new patch from upstream to
+    fix a memory leak with dlopen() and thread-local storage variables.
+    Closes: #763559.
+  * debian/TODO, debian/debhelper.in/glibc-doc.{install,links,manpage}:
+    re-add files lost in the deb7u3 and deb7u4 security upgrades, causing
+    the glibc-doc package to be almost empty.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 08 Oct 2014 22:50:01 +0200
+
+eglibc (2.13-38+deb7u4) wheezy-security; urgency=high
+
+  * Apply upstream patch to fix buffer overflow in __gconv_translit_find.
+    (CVE-2014-5119)
+
+ -- Florian Weimer <fw@deneb.enyo.de>  Tue, 26 Aug 2014 20:39:59 +0200
+
+eglibc (2.13-38+deb7u3) wheezy-security; urgency=high
+
+  * debian/patches/any/submitted-CVE-2014-0475.diff: setlocale security fix.
+  * debian/patches/any/submitted-setlocale-alloca: Additional setlocale
+    hardening.
+
+ -- Florian Weimer <fw@deneb.enyo.de>  Tue, 08 Jul 2014 20:59:10 +0200
+
+eglibc (2.13-38+deb7u2) wheezy; urgency=medium
+
+  [ Aurelien Jarno ]
+  * debian/patches/localedata/cvs-de_AT-Februar.diff: new patch from
+    upstream to fix February month name in de_AT locale.  Closes: #738544.
+  * debian/patches/mips/cvs-backtrace.diff: new patch from upstream to
+    fix backtrace() on mips.  Closes: #741354.
+  * any/local-ldconfig-ignore-ld.so.diff: new patch to ignore the dynamic
+    linker in ldconfig.  Closes: #699206, #707185, #727786, #736097,
+    #739734, #739758.
+  * debian/debhelper.in/libc.preinst: Disable ldconfig when a potentially
+    broken dynamic loader symlink is found and when a fixed version hasn't
+    already been unpacked. This happens when a biarch package of the same
+    architecture than the native one has been installed (e.g.: 
+    libc6-amd64:i386 on amd64) and ldconfig is run afterwards. Don't fail
+    if the dynamic loader symlink is dangling or missing.  Closes: #740158,
+    #740196.
+  * debian/debhelper.in/libc.postrm: generalize the dynamic linker
+    symlink creation to all biarch packages.
+  * debian/debhelper.in/libc-alt.postrm: generalize the dynamic linker
+    symlink removal to all biarch packages.
+  * patches/any/submitted-nl_langinfo-static.diff: new patch from upstream
+    to fix nl_langinfo() when used in static binaries.  Closes: #747103.
+  * debian/patches/any/cvs-CVE-2013-4458.diff: backport a new part from
+    upstream to fix a regression introduced in 2.13-38+deb7u1 in IPv6 name
+    resolution.  Closes: #738652.
+  * patches/any/cvs-socketcall-syscall.diff: new patch from upstream to fix
+    socketcall multiplex syscall features detection.  Closes: #730744.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 25 May 2014 20:01:05 +0200
+
+eglibc (2.13-38+deb7u1) wheezy; urgency=low
+
+  [ Aurelien Jarno ]
+  * debian/testsuite-checking/compare.sh: disable failing the build on test
+    regressions to ease the pain of ongoing stable/security maintenance.
+  * patches/any/cvs-CVE-2012-44xx.diff: backport overflow fixes in strcoll,
+    addressing CVE-2012-4412 and CVE-2012-4424 (Closes: #687530, #689423).
+  * patches/any/CVE-2013-0242.diff: backport buffer overrun fix in regexp
+    matcher, addressing CVE-2013-0242 (Closes: #699399).
+  * patches/cvs-CVE-2013-1914.diff: backport stack overflow fixes in
+    getaddrinfo(), addressing CVE-2013-1914 (Closes: #704623).
+  * patches/any/cvs-CVE-2013-4237.diff: backport buffer overwrite fix in
+    readdir_r for file systems returning file names longer than NAME_MAX
+    characters, addressing CVE-2013-4237 (Closes: #719558).
+    patches/kfreebsd/local-readdir_r.diff: remove superseded by the CVE
+    patch.
+  * patches/any/cvs-CVE-2013-4332.diff: backport integer overflow fixes
+    in pvalloc, valloc, posix_memalign, memalign and aligned_alloc functions,
+    addressing CVE-2013-4332 (Closes: #722536).
+  * patches/any/cvs-CVE-2013-4458.diff: backport stack (frame) overflow fixes
+    in getaddrinfo() when called with AF_INET6, addressing CVE-2013-4458
+    (Closes: #727181).
+  * patches/any/cvs-CVE-2013-4788.diff: backport patch to fix PTR_MANGLE
+    ineffectivity for statically linked binaries, addressing CVE-2013-4788
+    (Closes: #717178). *** Note that static binaries need to be recompiled
+    to take advantage of the fix ***.
+  * patches/any/cvs-findlocale-div-by-zero.diff: patch from upstream to fix
+    a SIGFPE when locale-archive has been corrupted to all zeros (Closes:
+    #718890, #730336).
+  * patches/mips/cvs-prlimit64.diff: patch from upstream to fix getrlimit64
+    and setrlimit64 with recent 64-bit kernels (Closes: #665897).
+
+  [ Petr Salinger ]
+  * patches/kfreebsd/local-initgroups-order.diff: always put supplied extra
+    gid as the first entry of group list in setgroups(). Closes: #699593.
+  * inline is not keyword in c89 mode, use __inline. Closes: #704598.
+  * sys_ktimer_settime have 4 parameters. Closes: #712196.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 05 Dec 2013 23:19:48 +0100
+
+eglibc (2.13-38) unstable; urgency=low
+
+  [ Adam Conrad ]
+  * debian/patches/arm/cvs-ldconfig-cache-abi.diff: Backport upstream
+    patch to re-enable ldconfig cache tagging for armhf binaries again.
+  * debian/patches/arm/unsubmitted-ldconfig-cache-abi.diff: Re-enable
+    and adjust to account for changes in cvs-ldconfig-cache-abi.diff.
+  * debian/debhelper.in/libc.preinst: Remove old ld.so.cache on upgrade.
+  * debian/control.in/amd64: Move libc6-amd64 from standard to optional.
+
+  [ Jonathan Nieder ]
+  * control.in/opt: correct misspelling of "Ezra" in descriptions of
+    *-i686 variants.  Thanks to Thorsten Glaser.
+  * patches/any/local-tst-eintr1-eagain.diff: new patch to work around
+    a race that lets pthread_create hit resource limits when the kernel
+    takes too long to clean up after joined threads.  (closes: #673596)
+
+  [ Samuel Thibault ]
+  * patches/any/local-fhs-linux-paths.diff: Patch vardb path on !linux too.
+  * Add patches/hurd-i386/libpthread_hurd_cond_wait.diff: New patch to add
+    support for translators with pthread.
+  * Add patches/hurd-i386/submitted-fork_port_leak.diff: New patch to fix port
+    leak on fork.
+  * libc0.3.symbols.hurd-i386: Add libpthread.so.0.3 symbols.
+  * Add patches/hurd-i386/tg-hurdsig-boot-fix.diff to fix
+    sigstate_is_global_rcv at boot in libpthread-based translators.
+  * patches/hurd-i386/tg-hurdsig-global-dispositions.diff: Update with Thomas'
+    fork deadlock fix.
+  * patches/hurd-i386/unsubmitted-single-hurdselect-timeout.diff: Temporarily
+    fix double select timeout on single fd.
+  * patches/hurd-i386/unsubmitted-setitimer_fix.diff: Fix Hurd implementation
+    of setitimer.
+
+ -- Adam Conrad <adconrad@0c3.net>  Sun, 30 Dec 2012 06:06:32 -0700
+
+eglibc (2.13-37) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * debhelper.in/locales.postinst: correctly lookup for the locales-all
+    package.  Closes: #692777.
+  * patches/kfreebsd/local-getaddrinfo-freebsd-kernel.diff: update to 
+    fix uninitialised bytes access in getaddrinfo().  Closes: #692433.
+  * patches/localedata/locale-C.diff: update to fix strftime('%X') return
+    a 24-hour time format.  Closes: #693446.
+
+  [ Jonathan Nieder ]
+  * control.in/opt: remove outdated reference to 2.6 kernel from
+    description of i686 variant.  Thanks to Regid Ichira.  Closes:
+    #692154.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/tg-tls-support.diff: Re-fix port leak in fork(). The
+    change was lost while synchronizing with the topgit repository.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 18 Nov 2012 22:53:04 +0100
+
+eglibc (2.13-36) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * patches/any/cvs-strtod-overflow.diff: new patch from upstream to fix
+    an integer/buffer overflow in strtod() (CVE-2012-3480).  Closes: 
+    #684889.
+  * patches/kfreebsd/local-getaddrinfo-freebsd-kernel.diff: new patch to
+    fix getaddrinfo() when service = 0 on a FreeBSD kernel with DNS
+    server returning IPv6, but without IPv6 connection.  Closes: #690021.
+  * sysdeps/linux.mk: fix kernel version parsing with only two numbers.
+  * patches/any/cvs-arch-lowlevellock.diff: new patch from upstream to
+    fix futexes atomic issue on ARM and SPARC.  Closes: #691173.
+  * local/manpages/ldconfig.8: fix wrong description of ld.so.conf format.
+    Closes: #684682.
+
+  [ Samuel Thibault ]
+  * libc0.3.symbols.hurd-i386: Add missing *_exec_file_name symbols.
+  * patches/hurd-i386/unsubmitted-gnumach.defs.diff: New patch to build stubs
+    for new gnumach.defs.
+  * libc0.3.symbols.hurd-i386: Add new gnumach.defs stubs symbols.
+  * control: build-depend on gnumach-dev that provides gnumach.defs.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Fri, 26 Oct 2012 14:28:06 +0000
+
+eglibc (2.13-35) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * patches/arm/unsubmitted-ldconfig-cache-abi.diff: disable, as it will 
+    conflict with upstream x32 support.
+  * Update Czech debconf translation, by Miroslav Kure.  Closes: #681708.
+  * local/manpages/ld.so.8: fix LD_VERBOSE description after manpage
+    rework.  Closes: #681688.
+  * patches/any/cvs-vfprintf-positional.diff: new patch from upstream to
+    fix a stack corruption in vfprintf with positional parameters 
+    (CVE-2012-3404). patches/any/cvs-vfprintf-many-format-strings.diff: new
+    patch from upstream to fix a FORTIFY_SOURCE format string protection
+    bypass (CVE-2012-3405).  Closes: #681473.
+
+  [ Petr Salinger ]
+  * fixup kfreebsd/local-use-thr-primitives.diff. Closes: #681113.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 22 Jul 2012 17:36:20 +0200
+
+eglibc (2.13-34) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * patches/any/cvs-pthread-builtin-expect.diff: new patch from upstream to
+    use __builtin_expect in public headers only on GCC compilers.  Closes:
+    #674412.
+  * patches/localedata/submitted-es_MX-decimal_point.diff: fix thousand
+    separator, use a space instead of a comma.
+  * Update Slovak debconf translation, by Ivan Masár.  Closes: #677919.
+  * control.in/main: switch multiarch-support to priority: required.  Closes:
+    #677624.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/libpthread_librt-link.diff: Remove patch, having
+    libpthread bringing librt also brings issues.
+  * patches/hurd-i386/libpthread_nort.diff: Add patch to revert upstream librt
+    usage.
+  * patches/hurd-i386/submitted-AF_LINK.diff: New hurd-only patch to comment
+    AF_LINK values, unimplemented on the Hurd (Closes: #678358).
+  * patches/hurd-i386/unsubmitted-mremap.diff: New hurd-only patch to comment
+    MREMAP flags, unimplemented on the Hurd.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 30 Jun 2012 01:44:32 +0200
+
+eglibc (2.13-33) unstable; urgency=medium
+
+  [ Clint Adams ]
+  * patches/localedata/cvs-rupeesign.diff: use new rupee symbol
+    in Indian locales, thanks to Prema.  closes: #671299.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/tg-{IPV6_PKTINFO,SOL_IP,____longjmp_chk,catch-signal,
+    critical-sections,dl-sysdep.c_SHARED,dup3,ioctl-decode-argument,
+    itimer-lock,libc_stack_end,mach-nanosleep,mkdir_root,mlock,null-pathname,
+    posix2008,posix_opt.h,readlinkat,hurd-recvfrom,sbrk,select-inputcheck,
+    setresid,hurd_socket_server_indexcheck,strtoul_PLT,struct_stat,
+    dup3-lock}.diff: Refresh with upstream version and rename to cvs.
+  * patches/hurd-i386/cvs-O_CLOEXEC.diff: New patch to accept use of O_CLOEXEC
+    in rtld.
+  * patches/hurd-i386/submitted-getgroups.diff: New patch from Pino to reject
+    some out of range values.
+  * patches/hurd-i386/submitted-getlogin_r.diff: New patch from Pino to fix
+    re-entrancy of getlogin_r and return ERANGE when the provided buffer is
+    too small.
+  * patches/hurd-i386/submitted-ptsname.diff: New patch from Pino to fix
+    buffer checks in ptsname.
+  * patches/hurd-i386/tg-hooks.diff: Add rules to sort _hurd_fork_locks.
+  * patches/hurd-i386/submitted-sendto.diff: New patch from Pino to fix
+    sendto() calls with NULL addr.
+  * control/{main,libc}: Remove libpthread-stubs-dev dependency on hurd-i386.
+  * patches/hurd-i386/libpthread.diff: Add -lrt in libpthread.a to fix static
+    linking.
+  * patches/hurd-i386/tg-chflags.diff: New patch to fix and add f?chflags
+    prototype.
+  * patches/hurd-i386/submitted-exec_filename.diff: New patch to pass argv[0]
+    through exec, to fix some shell scripts, e.g. glib testsuite.
+  * control.in/main: build-depend on newer hurd package to be able to pass
+    argv[0] through exec.
+  * libc0.3.symbols.hurd-i386: Add symbols for RPCs for argv[0] through exec.
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 4286 (from glibc-bsd).
+  * fixup any/local-linuxthreads-setclock.diff. Closes: #673711.
+
+  [ Aurelien Jarno ]
+  * debian/control.in/main: set glibc-doc as Multiarch: foreign. 
+    Closes: #674645.
+  * Update Portuguese debconf translation, by Pedro Ribeiro.  Closes: #674954.
+  * patches/arm/unsubmitted-ldso-abi-check.diff: fix broken armhf specific 
+    hack.  Closes: #674602.
+  * patches/any/cvs-regex.diff: fix access after end of search string in regex
+    matcher.  Closes: #672688.
+  * patches/any/cvs-getpwuid-nsswitch.diff: fix a memory leak in
+    getpwuid/nsswitch.c.  Closes: #674072.
+  * patches/localedata/submitted-es_MX-decimal_point.diff: fix
+    decimal_point and thousands_sep.  Closes: #673339.
+  * patches/any/local-sunrpc-dos.diff: fix a DoS in RPC implementation
+    (CVE-2011-4609).  Closes: #671478.
+  * patches/kfreebsd/local-use-thr-primitives.diff: bump LinuxThreads 
+    version.  Closes: #675606.
+  * Take-over nsswitch.conf installation from base-files.  Closes: 
+    #673271.
+  * Set libc*-dev "Multi-Arch: same". Add conflicts betwwen libc*-dev
+    packages. Move a.out.h and ieee754.h to the arch qualified path.
+    Thanks to Thibaut Girka for the help.  Closes: #666760.
+  * Add patches/any/cvs-ld.so-rpath-origin.diff to fix an insecure handling
+    of privileged programs' RPATHs with $ORIGIN (CVE-2011-1658).  Closes:
+    #672119.
+  * Refresh all patches to loose the "diff --git" headers.  Closes: 
+    #673933.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 03 Jun 2012 21:38:54 +0200
+
+eglibc (2.13-32) unstable; urgency=medium
+
+  * Fix kfreebsd symbols files.  Closes: #667687.
+  * local/manpages/ld.so.8: fixes after previous rework.  Closes: 
+    #670883.
+  * patches/any/local-ld-multiarch.diff: update to correctly compute
+    $ORIGIN with two level slibdir directories.  Closes: #632281.
+  * debian/control.in/libc: update description.  Closes: #671036.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 01 May 2012 16:08:11 +0200
+
+eglibc (2.13-31) unstable; urgency=low
+
+  [ Petr Salinger ]
+  * alter kfreebsd/local-use-thr-primitives.diff. Closes: #654783.
+  * kfreebsd/local-sysdeps.diff: update to revision 4222 (from glibc-bsd).
+    Closes: #642112, #662018, #669424.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/tg-hooks.diff: New patch to fix Hurd hooks order.
+  * patches/hurd-i386/libpthread.diff: New patch to import Hurd libpthread as
+    an add-on.
+  * patches/hurd-i386/libpthread_version.diff: New patch to mark when
+    libpthread was moved to glibc.
+  * libc0.3.symbols.hurd-i386: Add version dependency for libpthread forward
+    stubs in libc.
+  * patches/hurd-i386/libpthread_clean.diff: New patch to remove useless parts
+    of Hurd libpthread which come in the way.
+  * patches/hurd-i386/tg-libpthread_depend.diff: New patch to add add-on
+    dependencies on libpthread.
+  * patches/hurd-i386/libpthread_fix.diff: New patch to fix libpthread
+    allocation.
+  * patches/hurd-i386/libpthread_globsigdisp.diff: New patch to implement
+    global signal dispatch.
+  * patches/hurd-i386/libpthread_sigmask.diff: New patch to fix per-thread
+    sigmask.
+  * patches/hurd-i386/libpthread_stubs.diff: New patch to add mark ENOSYS
+    stubs.
+  * patches/hurd-i386/libpthread_librt-link.diff: New patch to fix librt link.
+  * patches/hurd-i386/{tg-pthread_types.diff,local-pthread_stubs.diff,
+    unsubmitted-pthread-unsupported-stubs.diff}: Remove patches, now useless.
+  * patches/hurd-i386/unsubmitted-pthread_posix-option.diff: Remove fake
+    libpthread rules.
+  * sysdeps/hurd.mk: Enable libpthread add-on. Remove useless redefinition of
+    standard-add-ons.
+  * sysdeps/hurd-i386.mk: Use the libpthread add-on for i686 and xen variants.
+  * debhelper.in/libc-udeb.install.hurd-i386: Remove, hurd-i386 now has
+    libpthread too.
+  * debhelper.in/libc-dev.install.hurd-i386: Add libpthread.a and
+    libpthread2.a.
+  * control.in/libc,control: Make libc-dev replace the hurd package.
+  * patches/hurd-i386/tg-symlink_dealloc.diff: Replace with...
+  * patches/hurd-i386/cvs-symlink_dealloc.diff: ... upstream version.
+
+  [ Aurelien Jarno ]
+  * patches/localedata/locale-C.diff: add an LC_TIME section.  Closes:
+    #661878. 
+  * patches/arm/cvs-make-get-set-swap-context.diff: backport 
+    make/get/set/swapcontext from upstream.  Closes: #369453, #663150.
+  * patches/arm/unsubmitted-soname-hack.diff: rename into 
+    patches/arm/local-soname-hack.diff to fix non-policy compliant patch
+    name.
+  * Don't install getent(1).  Closes: #665303.
+  * Add patches/any/cvs-getaddrinfo-AI_V4MAPPED.diff to correctly handle
+    AI_V4MAPPED flag in getaddrinfo().  Closes: #663752.
+  * Add patches/any/local-linuxthreads-setclock.diff from Robert Millan to
+    add pthread_condattr_setclock() support to linuxthreads.  Closes: 
+    #667687.
+  * patches/any/local-disable-nscd-host-caching.diff: remove, as the host
+    caching issue has been fixed in the meanwhile.  Closes: #669304.
+  * patches/any/cvs-FORTIFY_SOURCE-format-strings.diff: new patch from
+    upstream to fix FORTIFY_SOURCE format string protection bypass.  Closes:
+    #660611.
+  * patches/kfreebsd/local-sys_queue_h.diff: fix STAILQ_FOREACH_SAFE.  
+    Closes: #669960.
+  * local/manpages/locale.1: fix warnings from "groff".  Closes: #661041.
+  * patches/hppa/*: update hppa patchset from a mix of CVS, submitted and
+    unknown sources patches.  Closes: #666774.
+  * local/manpages/ld.so.8: update from various sources to document missing
+    environment variables.  Closes: #669179.
+  * patches/locatedata/cvs-es-lc_numeric.diff: new patch from upstream to
+    fix LC_NUMERIC for Spanish locales.  Closes: #668674.
+  * patches/localedata/submitted-de_AT-mon.diff: fix month names in de_AT
+    locale.  Closes: #661760.
+  * patches/localedata/submitted-en_AU-date_fmt.diff: fix date_fmt for
+    en_AU locale.  Closes: #663203.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 29 Apr 2012 17:45:45 +0200
+
+eglibc (2.13-30) unstable; urgency=low
+
+  * Guard DPKG_MAINTSCRIPT_ARCH usage with dpkg --assert-multi-arch,
+    since squeeze's dpkg has a half-implementation (closes: #669172)
+
+ -- Adam Conrad <adconrad@0c3.net>  Wed, 18 Apr 2012 05:08:21 -0600
+
+eglibc (2.13-29) unstable; urgency=low
+
+  * debian/debhelper.in/libc.{preinst,postinst}: Make use of dpkg's
+    DPKG_MAINTSCRIPT_ARCH variable and guard it so it doesn't make
+    older non-multi-arch dpkg versions have a sad (closes: #669172)
+
+ -- Adam Conrad <adconrad@0c3.net>  Mon, 16 Apr 2012 22:28:06 -0600
+
+eglibc (2.13-28) unstable; urgency=low
+
+  [ Adam Conrad ]
+  * debian/rules.d/debhelper.mk: Fix RTLD_SO replacement regex for sanity.
+  * debian/debhelper.in/libc{,-alt}.postrm: If we remove libc6:i386 before
+    libc6-i386:amd64, maintain sanity of /lib/ld-linux.so.2 (LP: #852101)
+  * debian/patches/arm/unsubmitted-armhf-linker.diff: Add the new armhf
+    linker to the triplet/LDSO table in ports/sysdeps/arm/shlib-versions
+  * debian/sysdeps/arm{el,hf}.mk: Stop installing armhf linker to its
+    multiarch path, the new standard path is /lib/ld-linux-armhf.so.3
+  * debian/sysdeps/arm{el,hf}.mk: Define configure targets for alt libs
+  * debian/sysdeps/arm{el,hf}.mk: Provide compat symlinks in armhf builds
+    so that old binaries continue to work without needing rebuilding
+  * debian/rules.d/build.mk: Change ldd to use the new armhf linker path
+  * debian/libc6.symbols.armhf: ld-linux-armhf.so.3 depends on having a
+    new enough version of libc6 installed to make the linker available
+  * debian/patches/arm/unsubmitted-soname-hack.diff: Apply unfortunate
+    hack to elf/dl-load.c to allow our old binaries keep running with the
+    new linker, by spoofing the SONAME of the new as if it were the old
+  * debian/debhelper.in/libc-udeb.install.armhf: No longer required
+  * debian/sysdeps/armhf.mk: Create symlink in the udeb for legacy linker
+  * debian/debhelper.in/libc.preinst: When we upgrade from older versions,
+    our linker doesn't exist before unpack, so create a temporary one.
+  * debian/sysdeps/armhf.mk: Drop the obsolete armel/armhf compat symlink
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/tg-symlink_dealloc.diff: New patch from Ludovic Courtès
+    to fix port deallocation on symlink creation failure.
+  * patches/hurd-i386/tg-unwind-resume.diff: Remove patch, fixed upstream.
+  * patches/hurd-i386/unsubmitted-pthread_posix-option.diff: Refresh.
+  * patches/hurd-i386/submitted-net.diff: Refresh.
+
+ -- Adam Conrad <adconrad@0c3.net>  Mon, 16 Apr 2012 10:11:05 -0600
+
+eglibc (2.13-27) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/local-select.diff: Do not apply the select(0) hack to
+    vim, as it hurts its performance badly.
+  * patches/hurd-i386/submitted-hurdsig-SA_SIGINFO.diff: merge
+    submitted-posix2008.diff fix.
+  * patches/hurd-i386/{submitted,unsubmitted}-*: Rename to tg-* according to
+    integration in upstream tg repository.
+
+  [ Aurelien Jarno ]
+  * kfreebsd/local-sysdeps.diff: update to revision 4080 (from glibc-bsd).
+    Closes: #653380, #660397, #660401.
+  * patches/localedata/first_weekday.diff: change first day of week to 
+    Sunday for es_AR locale.  Closes: #657064.
+  * local/manpages/gai.conf.5: update from latest RedHat version.  Closes:
+    #659504.
+  * testsuite-checking/expected-results-arm-linux-gnueabihf-libc: new
+    file using the latest build as a reference.
+  * patches/mips/cvs-dlopen-lazy.diff: new patch from upstream to resolve
+    race between dlopen and lazy binding on MIPS.
+  * patches/sparc/cvs-fcntl_h.diff: new patch from upstream to define 
+    O_FSYNC on sparc.  Closes: #577577.
+  * testsuite-checking/expected-results-mipsel-linux-gnu-libc, 
+    testsuite-checking/expected-results-mips32el-linux-gnu-mipsn32,
+    testsuite-checking/expected-results-mips64el-linux-gnu-mips64: add 
+    test-fenv.out to the list of known failures, it fails on loongson 2
+    machines due to a CPU bug.
+  * Bump to Standards-Version 3.9.3 (no changes).
+  * Don't provide debug files for biarch packages to make libc6-dbg 
+    co-installable.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 26 Feb 2012 18:50:40 +0100
+
+eglibc (2.13-26) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * sysdeps/kfreebsd.mk: also symlink x86 directory.
+  * kfreebsd/local-sysdeps.diff: update to revision 4053 (from glibc-bsd).
+  * patches/any/submitted-resolv-first-query-failure.diff: new patch to fix
+    resolving issues with broken servers returning NOTIMP or FORMERR to AAAA
+    queries.  Closes: #658171.
+  * patches/localedata/locale-nb_NO.diff: new patch to add Norwegian
+    transliteration.  Closes: #657511.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 02 Feb 2012 20:32:10 +0100
+
+eglibc (2.13-25) unstable; urgency=medium
+
+  [ Aurelien Jarno ]
+  * patches/s390/cvs-libm-ulps.diff: new patch to fix FTBFS on s390 with
+    gcc-4.6.
+  * Update Swedish debconf translation, by Martin Bagge.  Closes: #653559.
+  * Update Norwegian bokmål debconf translation, by Bjørn Steensrud.  Closes:
+    #653566.
+  * Add port 783 (spamd) to /etc/bindresvport.blacklist.  Closes: #629984.
+  * patches/any/cvs-vfscanf.diff: new patch from upstream to fix segfault in
+    sscanf for large decimal input string.  Closes: #553206.
+  * local/manpages/ld.so.8: add a missing new line.  Closes: #654582. 
+  * debhelper.in/libc.NEWS: suggest environment variables as an
+    alternative, thanks to Jonathan Nieder for the idea.  Closes: #654835.
+  * Update Polish debconf translation, by Michał Kułach.  Closes: #657748.
+  * Update Spanish debconf translation, by Omar Campagne.  Closes: #655850.
+  * Danish debconf translation update from Joe Hansen.  Closes: #656681.
+  * patches/alpha/submitted-epoll_create1.diff: new patch from Mike 
+    Frysinger to fix epoll_create1() on alpha.  Closes: #653441.
+  * debian/control.in/main: bump build-depends on libc-linux-dev to
+    (>= 3.2.1-1) to get accept4 defined on ia64. 
+    debian/libc6.1.symbols.ia64: force accept4 version to 2.13-25~.
+  * debian/control.in/main: use architecture aliases in build-depends.
+  * patches/amd64/cvs-avx-osxsave.diff: new patch from upstream to disable
+    AVX support if the kernel doesn't support it.
+  * patches/any/cvs-fmtmsg-lock.diff: new patch from upstream to fix a 
+    locking issue in fmtmsg.
+  * patches/any/cvs-reloc-sort.diff: new patch from upstream to fix 
+    relocation issues with dlopen().
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/submitted-mmap.diff: New patch to fix iceweasel hang.
+  * patches/hurd-i386/submitted-hurd-socket-EAFNOSUPPORT.diff: New patch to
+    fix error value.
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 4024 (from glibc-bsd).
+    Closes: #630203, #654712.
+  * fixup kfreebsd/local-use-thr-primitives.diff. Closes: #657687.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 29 Jan 2012 23:35:12 +0100
+
+eglibc (2.13-24) unstable; urgency=low
+
+  * patches/m68k/cvs-byteswap.diff: fix m68k optimized version of 
+    <bits/byteswap.h>.  Closes: #652356.
+  * Add m68k expected tests results.
+  * Update Russian debconf translation, by Yuri Kozlov.  Closes: #652428.
+  * Update German debconf translation, by Helge Kreutzman.  Closes: #652556.
+  * patches/any/cvs-tzfile.diff: fix integer overflow in timezone code
+    (CVE-2009-5029).  Closes: #650790.
+  * Don't provide debugging symbols for libc-bin, libc-dev-bin and nscd 
+    packages to avoid conflicts with multiarch.
+  * sysdeps/armel.mk, sysdeps/armhf.mk: fix cross compiling.
+  * Update Dutch debconf translation, by Jeroen Schot.  Closes: #652632.
+  * patches/hurd/tg-struct_stat.diff: fix #ifdef typos.
+  * kfreebsd/local-sysdeps.diff: update to revision 3952 (from glibc-bsd).
+  * patches/m68k/local-pthread_lock.diff: remove, obsolete.
+  * patches/arm/cvs-ucontext.diff: fix namespace pollution from 
+    <sys/ucontext.h> on arm.  Closes: #652844.
+  * Update French debconf translation, by Christian Perrier.  Closes: 
+    #652860.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 24 Dec 2011 18:23:25 +0100
+
+eglibc (2.13-23) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * patches/arm/cvs-syscall-mcount.diff: new patch from upstream to fix
+    build on armel.
+  * patches/amd64/cvs-pthread_cond_wait.diff: remove as it seems to cause
+    some issue with some kernels.  Closes: #651746.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/submitted-mach-nanosleep.diff: New patch from Pino to
+    reject some nanosleep parameters values.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 13 Dec 2011 23:40:48 +0100
+
+eglibc (2.13-22) unstable; urgency=low
+
+  [ Adam Conrad ]
+  * patches/arm/unsubmitted-ldconfig-cache-abi.diff: New patch from
+    Steve McIntyre that adds tagging to armhf libraries in ld.so.cache
+  * patches/arm/unsubmitted-ldso-abi-check.diff: Another patch from
+    Steve McIntyre, giving ld.so the ability to differentiate between
+    soft and hard-float ABIs and provide sane exits when required.
+  * Merge armel/armhf bi-arch support from Ubuntu, but disable until
+    the armhf bootstrap in Debian has removed /lib/ld-linux.so.3:
+    - Fix install locations for libc6-dev-armel in sysdeps.
+    - Change armel_rtlddir (for libc6-armel) to /lib, as required.
+    - Install /lib/ld-linux.so.3 symlink in libc6-armel.
+    - Install ld.so.conf.d file for the multilib ARM targets.
+  * Add dynamic linker name for the non-default multilib in ARM ldd.
+  * debian/debhelper.in/libc-udeb.install.armhf: Install ld-linux.so.3
+    to the correct location in the udeb, so binaries can find it.
+  * Install /lib/ld-linux.so.3 symlink in libc6:armhf, this will need
+    to be reverted once the rebuild/rebootstrap is completed.
+  * Fix chmod regex in udeb pass to match the one used for others.
+
+  [ Aurelien Jarno ]
+  * patches/i386/local-cpuid-level2.diff: fix a typo.  Closes: #609389.
+  * Don't ship /usr/share/doc/locales/README.  Closes: #643885, #643887.
+  * Ignore tst-cancelx17.out error on amd64.  Closes: #643567.
+  * patches/any/cvs-nptl-pthread-race.diff: fix a race in NPTL code that
+    sometimes causes a deadlock when calling fork() from a thread.
+  * debhelper/libc.NEWS: replace $arch by <triplet> and explain how to get
+    it.  Closes: #644990.
+  * Add patches/alpha/submitted-fallocated.diff to define fallocate() in
+    <fcntl.h> on alpha.  Closes: #641868.
+  * debian/rules: don't build locales-all when cross-compiling.  Closes:
+    #644771.
+  * patches/amd64/cvs-avx-detection.diff: do not use AVX if hardware support
+    is present, but not enabled in the kernel.  Closes: #646549.
+  * patches/amd64/cvs-dl_trampoline-cfi.diff: fix CFI in dl_trampoline code.
+  * patches/mips/submitted-dl-platform.diff: fix a typo preventing loongson2f
+    platform directory to be used.  Closes: #646610.
+  * Update Dutch debconf translation, by Vincent Zweije.  Closes: #649605.
+  * Update expected-results-x86_64-kfreebsd-gnu-libc to allow tst-clock1.out
+    to fail, as it seems to happen when there is other load than glibc on the
+    building machine.  Closes: #649185.
+  * patches/any/local-linuxthreads-XPG7.diff: fix XPG7 compliance in
+    linuxthreads version of pthread.h.  Closes: #647823.
+  * Update from the latest SVN, branch eglibc-2_13.
+  * Add patches/amd64/cvs-pthread_cond_wait.diff to correctly handle EAGAIN
+    from FUTEX_WAIT_REQUEUE_PI.
+  * debian/rules.d/tarball.mk: ignore manual/ directory.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/submitted-setresid.diff: New patch to fix -1 passed to
+    setres[ug]id.  Closes: #645285.
+  * patches/hurd-i386/{unsubmitted-gscope.diff,unsubmitted-_dl_random.diff,
+    submitted-ECANCELED.diff, submitted-dl-sysdep.diff,
+    unsubmitted-check_native.diff, submitted-extern_inline.diff,
+    submitted-ptr-mangle.diff, submitted-stat.diff,
+    unsubmitted-tls-support.diff, unsubmitted-longjmp_chk.diff,
+    unsubmitted-ptsname.diff, submitted-strtoul.diff,
+    unsubmitted-atomic-no-multiple_threads.diff, unsubmitted-i686.diff,
+    submitted-ldsodefs.h.diff, submitted-libc_once.diff}:
+    Update to topgit version, and rename to 
+    {tg-tlsdesc.sym.diff, tg-struct_stat.diff, tg-gscope.diff,
+    tg-_dl_random.diff, tg-bits_atomic.h_multiple_threads.diff,
+    tg-dl-sysdep.c_SHARED.diff, tg-__i686_defined.diff,
+    tg-regenerate_errno.h.diff, tg-ptrmangle.diff, tg-strtoul_PLT.diff,
+    tg-tls.diff, tg-extern_inline.diff, tg-grantpt.diff, tg-check_native.diff,
+    tg-____longjmp_chk.diff, tg-elfosabi_gnu.diff, tg-libc_once.diff}.
+  * patches/hurd-i386/submitted-libc_once.diff: Move kfreebsd part to
+    patches/kfreebsd/submitted-libc_once.diff.
+  * patches/hurd-i386/submitted-ldsodefs.h.diff: Move committed part to
+    patches/hurd-i386/cvs-ldsodefs.h.diff
+  * patches/hurd-i386/cvs-sgttyb.diff: New patch to fix sgttyb ioctls values.
+  * patches/hurd-i386/tg-dup3.diff: New patch from Hurd topgit to implement
+    dup3.
+  * patches/hurd-i386/submitted-dup2-fix.diff: Trivially port to dup3.
+  * patches/hurd-i386/local-clock_gettime_MONOTONIC.diff: New patch to
+    brown-tape fix iceweasel.
+  * patches/hurd-i386/submitted-_hurd_socket_server-indexcheck.diff: New patch
+    from Pino Toscano to fix crash or spurious deallocation on bogus input.
+  * libc0.3.symbols.hurd-i386: Drop removed unused xxx_ and yyy_ RPCs.
+  * patches/hurd-i386/submitted-hurd-recvfrom.diff: New patch from Pino
+    Toscano to fix recvfrom on socketpair. Closes: #650095.
+  * patches/hurd-i386/local-select.diff: New patch to fix select with a zero
+    timeout. Closes: #79358.
+  * patches/hurd-i386/tg-struct_stat.diff: Add POSIX 2008 visibility.
+  * patches/hurd-i386/submitted-posix2008.diff: Add POSIX 2008 visibility.
+  * patches/hurd-i386/submitted-select-inputcheck.diff: Add select input check.
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 3763 (from glibc-bsd).
+  * add kfreebsd/local-use-thr-primitives.diff to use kernel thr*
+    primitives inside linuxthreads. Closes: #639658.
+  * debian/sysdeps/sysdeps/kfreebsd.mk, debhelper.in/libc.preinst:
+    bump minimal FreeBSD kernel version to 8.1.
+
+  [ Steve Langasek ]
+  * Add a new debconf template, libraries/restart-without-asking, shared
+    with pam (and eventually hopefully openssl) which allows users to opt in
+    to silent restarts of services affected by NSS upgrades.  This fixes the
+    longstanding nuisance that a user may be prompted as many as three times
+    during an upgrade between releases to ask whether it's ok to restart a
+    service that will be restarted anyway when the package itself gets
+    upgraded.
+  * Name our biarch compat ld.so.conf.d files on arm* consistently with the
+    ones on other archs.
+
+  [ Kyle Moffett ]
+  * Add support for stage1 builds.  Closes: #644546.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 10 Dec 2011 21:49:03 +0100
+
+eglibc (2.13-21) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/unsubmitted-tls-support.diff: Fix port leak in fork().
+  * patches/hurd-i386/submitted-ttyname_ERANGE.diff: Really add to the series.
+  * mv patches/hurd-i386/{submitted,cvs}-DEV_BSIZE.diff, and really add to the
+    series.
+  * Add patches/hurd-i386/cvs-fork_ports.diff to fix uninitialized reference
+    count.
+
+  [ Aurelien Jarno ]
+  * Add debian/patches/cvs-dl_close-scope-handling.diff from upstream to
+    fix issues with dl_close() when resolving locally-defined symbols.
+    Closes: #625250.
+  * debian/patches/localedata/locale-C.diff: define strict numerical ordering
+    for the whole unicode range.  Define the "blank", "cntrl" and "space" as 
+    defined by POSIX. Closes: #641309.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 13 Sep 2011 23:58:01 +0200
+
+eglibc (2.13-20) unstable; urgency=low
+
+  * debian/debhelper.in/libc.preinst: call /bin/mv with --version so 
+    that it doesn't return an error.  Closes: #640872.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 08 Sep 2011 10:23:00 +0200
+
+eglibc (2.13-19) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Change libc_rtlddir to /lib on s390x.
+  * Add debian/patches/submitted-glob_h-ifdef.diff to fix an undefined
+    preprocessor symbol in some rare conditions.  Closes: #639213.
+  * debian/sysdeps/sparc64.mk: re-enable multiarch similarly to what 
+    has been done on sparc.
+  * debian/control.in/libc: remove Breaks: on perl.  Closes: #640300.
+  * debian/patches/localedata/locale-C.diff: Don't include ISO14651
+    collation rules in C.UTF-8 locale.
+  * Update debian/patches/svn-updates to revision 15228:
+    - Drop debian/patches/any/cvs-dl-deps.diff (merged upstream).
+    - Drop debian/patches/arm/cvs-align-constant-pool.diff (merged upstream).
+  * debian/debhelper.in/libc.preinst: get the dynamic linker from /bin/mv
+    instead of /bin/true.  Closes: #640753.
+
+  [ Jeremie Koenig ]
+  * New patches to improve the signal code on Hurd:
+    patches/hurd-i386/submitted-hurdsig-fixes.diff,
+    patches/hurd-i386/submitted-hurdsig-global-dispositions.diff,
+    patches/hurd-i386/submitted-hurdsig-SA_SIGINFO.diff,
+    patches/hurd-i386/submitted-hurdsig-fixes-2.diff.
+  * Update testsuite accordingly.
+  * Remove patches/hurd-i386/submitted-PTRACE_CONTINUE.diff, now covered by
+    submitted-hurdsig-fixes.diff.
+  * libc0.3.symbols.hurd-i386: Add version for global-disposition functions.
+
+  [ Samuel Thibault ]
+  * Add patches/hurd-i386/submitted-libc_stack_end.diff to fix ruby1.9.1 stack
+    detection.
+  * Add patches/hurd-i386/submitted-ttyname_ERANGE.diff to fix ttyname error
+    value.
+  * Add patches/hurd-i386/submitted-DEV_BSIZE.diff to add DEV_BSIZE.
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 3697 (from glibc-bsd).
+    - fixes ld.so location used inside ldd on kfreebsd-amd64. Closes: #640156.
+    - wrap faccessat() X_OK testing for superuser. Closes: #640325.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 07 Sep 2011 22:51:11 +0200
+
+eglibc (2.13-18) unstable; urgency=low
+
+  * On s390x the PI is /lib/ld64.so.1, so we don't need to move 
+    ld64.so.1 from /lib to /lib64.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 24 Aug 2011 10:09:17 +0200
+
+eglibc (2.13-17) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Improve libc.NEWS to also include headers.
+  * Add debian/patches/cvs-dlopen-tls.diff to fix handling of static TLS in
+    dlopen'ed objects.  Closes: #637239.
+  * Provide locales in locales-all as separated files instead of adding them
+    to locale-archive. Use symlinks between identical files to limit the 
+    unpacked size.  Closes: #537743, #636694, #638173.
+  * Compress libc*-dbg and locales-all to using xz. 
+  * Add patches/localedata/cvs-rupee.diff from upstream to add support for
+    Rupee symbol (U20B9).
+  * Add patches/sparc/cvs-rlimits.diff from upstream to fix issues with 
+    rlimits on sparc.  Closes: #637767.
+  * Add patches/amd64/cvs-pthread-stack-alignment.diff from upstream to fix
+    stack alignment issues on amd64.
+  * Add patches/s390/cvs-vsyscalls.diff from upstream to fix wrong register
+    usage in the INTERNAL_VSYSCALL_NCS macro.
+  * Add patches/arm/cvs-clone-cantunwind.diff from upstream to fix unwinding
+    issues with openjdk on armhf.
+  * Add patches arm/cvs-align-constant-pool.diff from upstream to fix 
+    alignement issues on armhf.
+  * debian/control.in/libc: add Breaks: lsb-core (<= 3.2-27) to make sure the
+    lsb symlink is still valid.
+  * Remove patches/any/cvs-dl-missing-deps.diff, the original problem has 
+    been solved through other ways, so it is not needed any more. Fixes 
+    symbols resolution with issues with icedove/iceweasel/iceape.  Closes: 
+    #617759.
+
+  [ Samuel Thibault ]
+  * debian/patches/hurd-i386/submitted-ioctl-unsigned-size_t.diff: Add
+    u?int{8,16,32,64} ioctl types.
+  * debian/patches/hurd-i386/submitted-init-first.diff: Fix stack switching
+    compilation with newer gcc.
+
+  [ Steve Langasek ]
+  * Install ld*.so to RTLDDIR (/lib64 or /lib), as appropriate, and convert
+    /lib64 from a symlink to a directory on upgrade (with appropriate
+    downgrade and error-unwind handling), so that multiarch and biarch
+    packages will play nicely together on the filesystem..  Thanks to
+    Sven Joachim <svenjoac@gmx.de> for preliminary patches.  Closes: #632682.
+  * Restore multiarch support on all architectures.
+  * Bump the multiarch-support minimum dependency for armhf, which settled
+    its triplet only at the time i386 did.
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 3689 (from glibc-bsd).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 22 Aug 2011 21:51:07 +0200
+
+eglibc (2.13-16) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * The "multiarch starts to piss me off" upload.
+  * On i386, install i386 specific headers in the multiarch include
+    path, the common and the x86-64 ones in the default include path.
+    Closes: #637141.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 08 Aug 2011 21:52:47 +0200
+
+eglibc (2.13-15) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Add testsuite results for s390x.
+  * Install x86-64 version of ldd in libc-bin:i386.  Closes: #636947.
+  * Add a Breaks: perl (<< 5.12.4-2) to libc0.1/6/6.1.  Closes: #636686.
+  * Install x86-64 headers on i386 instead of the i386 ones.  Closes: 
+    #637000.
+  * debhelper.in/libc-dev-alt.preinst: test if not a symlink instead of
+    testing if a directory. Fixes triarch includes on mips/mipsel.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 08 Aug 2011 14:39:41 +0200
+
+eglibc (2.13-14) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Remove amd64 biarch includes from libc6-dev:i386.  Closes: #636115,
+    #636116.
+  * Fix the biarch symlinks on mipsel, pointing them to the right multiarch
+    directory.
+  * Include a symlink for fpu_control in biarch packages.  Closes: #635685.
+  * Update conflicts to libc6-dev in biarch packages to (<< 2.13-14) so that
+    the directory to symlink conversion is done correctly.
+  * On mips/mipsel, only ship the includes symlinks in libc6-dev-mips64. Add
+    a dependency to libc6-dev-mips64 in libc6-dev-mipsn32.
+  * Build with gcc-4.6/g++-4.6 on armhf to get correct atomic operations in 
+    thumb-2 mode.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/submitted-sysvshm.diff: Fix shm creation: do not create
+    file on first lookup.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 04 Aug 2011 09:41:41 +0200
+
+eglibc (2.13-13) unstable; urgency=low
+
+  * sysdeps/*.mk: install the biarch includes in /usr/include instead
+    of the multiarch path. Fix FTBFS on some architectures.
+  * sysdeps/mips.*mk: fix triarch includes on mips and mipsel.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 31 Jul 2011 02:42:58 +0200
+
+eglibc (2.13-12) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * rules.d/debhelper.mk: Fix a typo about kfreebsd-amd64.
+  * Change include directory on i386 from i486-linux-gnu to i386-linux-gnu
+    and on kfreebsd-i386 from i486-kfreebsd-gnu to i386-kfreebsd-gnu.
+  * Fix installation of biarch headers (Closes: #635685):
+    - Use a symlink for bits/ and gnu/ directories
+    - Use symlinked files for sys/ directory
+    - Add a preinst script to do the directory <-> symlink conversion.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 30 Jul 2011 13:33:39 +0200
+
+eglibc (2.13-11) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * control.in/main: fix nscd description.  Closes: #633370.
+  * Update patches/svn-updates to revision 14511 to fix build on 
+    powerpcspe. Add corresponding symbols file and expected testsuite 
+    results.  Closes: #632863.
+  * Add patches/localedata/locale-os_RU.diff from upstream to add Ossetian
+    locale.  Closes: #634508.
+  * kfreebsd/local-sysdeps.diff, update to revision 3618 (from glibc-bsd).
+    - fixes LD_PRELOAD with a kfreebsd-9 kernel. Closes: #630695.
+    - fixes tst-atime when build in a noatime filesystem.  Closes: #634152.
+    - uses upstream RFTSIGZMB for exit signal selection when available.
+  * Disable multiarch support on amd64, kfreebsd-amd64, ppc64, sparc64 until
+    we fix the /lib64 -> /lib symlink issue. Closes: #632176.
+  * Re-enable patches/any/cvs-resolv-different-nameserver.diff. Add 
+    patches/any/submitted-resolv-assert.diff to fix assertion triggered by the
+    previous patch.  Closes: #535504, #602291.
+  * Add support for s390x.
+  * Fix debhelper.in/libc.NEWS with the right option to pass to gcc. Closes: 
+    #629819.
+  * Add any/submitted-resolv-init.diff to fix issue with the resolver when 
+    RES_ROTATE is enabled.  Closes: #593571.
+
+  [ Jeremie Koenig ]
+  * Add debian/libc0.3.symbols.hurd-i386.
+
+  [ Steve Langasek ]
+  * Try again to make libc6-dev multiarch-same.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 26 Jul 2011 03:00:33 +0200
+
+eglibc (2.13-10) unstable; urgency=low
+
+  * control.in/main: tag libc-bin Essential: yes.
+  * Revert patch to make libc6-dev multiarch.  Closes: #632667.
+  * Add patches/alpha/submitted-statfs64.patch to fix statvfs() on alpha.
+    Closes: #324051.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 04 Jul 2011 22:02:35 +0200
+
+eglibc (2.13-9) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * patches/README: Add "unsubmitted" category.
+  * Rename most local hurd-i386 patches into unsubmitted.
+  * patches/hurd-i386/submitted-PTRACE_CONTINUE.diff: New patch from Jeremy
+    Koenig, to fix initialized value.
+  * patches/hurd-i386/submitted-ldsodefs.h.diff: Update to latest submitted
+    version, enable. Closes: #630180.
+
+  [ Aurelien Jarno ]
+  * debhelper.in/libc.preinst: replace unbreakable space by normal space.
+    Closes: #632453.
+  * Disable patches/any/cvs-resolv-different-nameserver.diff. Closes: #632273, 
+    #632252. Reopen: #535504, #602291.
+  * kfreebsd/local-sysdeps.diff: update to revision 3530 (from glibc-bsd).
+    Closes: #632452.
+  * debhelper.in/libc.preinst: only check for already unpacked versions of the
+    libc during upgrades.  Closes: #632190, #632509.
+  * Install arch dependent headers in the multiarch include directory, patch by
+    Marcin Juszkiewicz. Tag libc*-dev as Multi-Arch: same.
+  * Add patches/powerpc/submitted-ifunc.diff to fix build on powerpc.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 04 Jul 2011 01:50:25 +0200
+
+eglibc (2.13-8) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * Add patches/hurd-i386/submitted-ldsodefs.h.diff to fix loading binaries
+    with GNU/Hurd-specific extensions, disabled for now.
+  * patches/hurd-i386/local-sendmsg-SCM_RIGHTS.diff: Do not call getauth(),
+    use the __USEPORT() cache macro instead. This should fix zsh FTBFS with
+    duplicate getproc() symbol.
+
+  [ Aurelien Jarno ]
+  * Add patches/any/cvs-addmntent.diff to correctly report errors status in 
+    addmntent().  Closes: #630699 / CVE-2011-1089.
+  * Add patches/any/cvs-resolv-different-nameserver.diff to try a different
+    nameserver if the first one returns REFUSED.  Closes: #535504, #602291.
+  * Update patches/svn-updates to revision 14337:
+    - Remove any/cvs-glro_dl_debug_mask.diff (merged). 
+    - Remove i386/cvs-memmove-static.diff (merged).
+  * debian/control: clean-up Uploaders: .
+  * Add patches/any/cvs-fnmatch.diff to fix an integer overflow in 
+    fnmatch() (CVE-2011-1659).  Closes: #626370.
+  * Add an entry to NEWS.Debian about multiarch and passing flags to the 
+    compiler on pre-multiarch toolchains.
+  * Replace sparc/submitted-ifunc2.diff by upstream version 
+    any/cvs-ifunc.diff.
+  * Fix patches/hppa/submitted-nptl-carlos.diff to correctly pass 
+    --as-needed and --no-as-needed to the linker.
+  * Update breaks on pre-multiarch packages.  Closes: #631907.
+  * libc.preinst: improve and simplify search for old libraries, detect
+    broken LD_LIBRARY_PATH.  Closes: #630608.
+  * libc.postrm: remove support code from Sarge.
+  * rules.d/debhelper.mk: install bug files using dh_bugfiles.
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 3501 (from glibc-bsd).
+    to fix <bits/siginfo.h>.  Closes: #631867.
+  * Drop kfreebsd/local-ftw.diff, needed only for pre 8.0 kernels.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 30 Jun 2011 07:41:52 +0200
+
+eglibc (2.13-7) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Update paths to the memcpy wrapper in NEWS.Debian.gz.  Closes: 
+    #630138.
+  * Fix preinst script wrt 3.0 kernel. Patch by Colin Watson.  Closes: 
+    #630077.
+  * debian/sysdeps/linux.mk: correctly check from multiarch asm/ include 
+    directory.
+  * Add patches/sparc/cvs-ifunc1.diff and patches/sparc/submitted-ifunc2.diff
+    to fix multi-arch support on sparc. Update sysdeps/sparc.mk and 
+    sysdeps/sparc64.mk to re-enable multi-arch support on sparc and sparc64.
+    Closes: #625607.
+  * debhelper.in/libc.preinst: improve error message when an old copy of ld.so
+    is found.  Closes: #629983.
+  * debhelper.in/libc.preinst: automatically remove leftovers from libc5 to 
+    libc6 transition (upgrade from Bo to Hamm).  Closes: #629534.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 12 Jun 2011 20:33:19 +0200
+
+eglibc (2.13-6) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * kfreebsd/local-sysdeps.diff, update to revision 3406 (from glibc-bsd),
+    to fix <sys/mount.h>.  Closes: #629289, #629426.
+  * debian/sysdeps/linux.mk: remove obsolete comment and code about 
+    asm-sparc64. Use the multiarch asm directory if present.
+  * debian/copyright: update.
+  * Update breaks on pre-multiarch packages.
+  * Allow tst-writev to fail due to changes on recent kernels.  Closes: 
+    #629862.
+
+  [ Samuel Thibault ]
+  * Update "expected" hurd-i386 failures.
+
+  [ Clint Adams ]
+  * Remove spurious exclamation point in architecture dependency.
+  * Add lintian overrides for eglibc-source, from Marcin Juszkiewicz.
+
+  [ Steve Langasek ]
+  * debian/debhelper.in/libc.preinst: additional check for extra copies of
+    /lib/ld-2.*.so not known to dpkg, as these cause problems when the real
+    linker moves to /lib/<triplet> for multiarch and ldconfig leaves
+    /lib/ld-linux.so.N pointing at an old glibc.  Closes: #629534.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 09 Jun 2011 14:30:19 +0200
+
+eglibc (2.13-5) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Update from stable branch:
+    - Remove any/cvs-rtld-prelink.diff (merged upstream).
+  * debhelper.in/libc.preinst: require a 8.0 kernel on GNU/kFreeBSD.
+    Closes: #626422.
+  * Bump to Standards-Version 3.9.2 (no changes).
+  * Revert changes to patches/any/local-no-pagesize.diff, instead make
+    sure PAGE_SIZE is not used internally.  Closes: #627273.
+  * Add Swahili, Fulah and Bemba locales, backport from HEAD.
+  * locale-gen: don't remove /usr/lib/locale/* in locale-gen. Closes: 
+    #626575.
+  * Add patches/any/cvs-setlocale.diff from upstream fixing reset to
+    C locale issue in setlocale().  Closes: #627355.
+  * Add patches/amd64/cvs-powl.diff from upstream to fix corner cases
+    in powl() on amd64.
+  * Add patches/localedata/locale-sv_FI.diff from upstream to fix date
+    format.  Closes: #577988.
+  * Add patches/any/submitted-rlimit-rttime.diff to fix missing 
+    RLIMIT_RTTIME entry in <bits/resource.h>.  Closes: #627619.
+  * patches/any/local-ld-multiarch.diff: add the multiarch compat dir
+    instead of the multiarch dir.
+  * Use the multiarch path for the native version and optimized flavors.
+  * kfreebsd/local-sysdeps.diff, update to revision 3303 (from glibc-bsd),
+    to fix brk(), semctl() and if_nameindex() bugs.
+  * Add patches/any/local-tst-writev.diff to fix compilation of tst-writev.c.
+  * Add breaks on packages which don't support multiarch paths.
+  * Add patches/any/cvs-regex-oom.diff to fix an oom issue triggerable with 
+    some regexes.
+  * Add patches/any/cvs-getaddrinfo-single-lookup.diff to fix fallback to
+    single lookup dns requests.  Closes: #541167.
+  * Add patches/any/cvs-unique_sym_table-corruptions.diff to fix 
+    unique_sym_table corruptions when doing STB_GNU_UNIQUE or 
+    ELF_RTYPE_CLASS_COPY lookups.
+  * Replace patches/any/local-dl-deps.diff by upstream version 
+    patches/any/cvs-dl-deps.diff.
+  * Add patches/mips/submitted-dl-platform.diff from Robert Millan to 
+    add dl-platform support for MIPS.
+  * Add a loongson2f optimized library. Closes: #601419. 
+  * Update local/manpages/ld.so.8 with hardware capabilities documentation.
+    Closes: #622385.
+  * Update patches/localedata/submitted-bz9725-locale-sv_SE.diff to fix time
+    format in sv_SE locale. Closes: #604125.
+  * Add patches/mips/submitted-wordsize-clang.diff to make clang usable on
+    mips/mipsel.  Closes: #601645.
+  * Add patches/any/submitted-mqueue-throw.diff to fix different declarations
+    of mq_open(). Closes: #595380.
+
+  [ Steve Langasek ]
+  * Tighten the dependency on dpkg to a multiarch aware version.
+  * Simplify the creation of /etc/ld.so.conf.d/<triplet>.conf.
+  * Add multiarch fields to debian/control.
+  * debian/debhelper.in/libc.preinst, debian/debhelper.in/libc.prerm:
+    remove the ld.so.cache when upgrading from or downgrading to a
+    pre-multiarch version; otherwise maintainer scripts start segfaulting
+    immediately, and dpkg will entertainingly roll back the libc upgrade.
+  * debian/control.in/libc: make the main multiarch main libc replace the
+    biarch or triarch libc-foo package of the *corresponding* architecture;
+    this gives us a libc6:i386 package that Replaces libc6-i386, since both
+    packages contain the same linker and we want multiarch to take
+    precedence.
+
+  [ Clint Adams ]
+  * Patch from Marcin Juszkiewicz to provide the debian/ directory in
+    eglibc-source.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/local-madvise_warn.diff: Drop "unimplemented" warning
+    for madvise.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 04 Jun 2011 22:30:47 +0200
+
+eglibc (2.13-4) unstable; urgency=low
+
+  * debian/sysdeps/amd64.mk: don't redefine libc6_extra_pkg_install.  
+    Closes: #626447, #626449, #626450.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 12 May 2011 07:16:55 +0200
+
+eglibc (2.13-3) unstable; urgency=low
+
+  * patches/any/local-no-pagesize.diff: use __sysconf() instead of 
+    sysconf().
+  * patches/any/local-bindresvport_blacklist.diff: use feof_unlocked()
+    instead of feof().
+  * Add patches/any/cvs-resolv-tld.diff from upstream to fix resolution
+    of unqualified domain names.
+  * Add patches/any/cvs-sys-param-ARG_MAX.diff from upstream to fix
+    bassackwards tests for ARG_MAX in sys/param.h.  Closes: #583433.
+  * Add support for the new armhf triplet (Closes: #625846):
+    - Update patches/any/submitted-autotools.diff to detect the new triplet. 
+    - Add patches/arm/submitted-armhf-triplet.diff to support the 
+      new triplet.
+  * Add patches/any/submitted-at-pagesize.diff from Fedora to fix 
+    getpagesize() on static binaries.  Closes: #626379.
+  * sysdeps/sparc.mk, sysdeps/sparc64.mk: disable multiarch support. 
+    Workarounds: #625607.
+  * debian/local/memcpy-wrapper/*: on amd64, provide and build two wrappers
+    to workaround and debug memcpy() issues. Explain how to use them in 
+    debian/debhelper.in/libc.NEWS.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 11 May 2011 23:03:15 +0200
+
+eglibc (2.13-2) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * kfreebsd/local-sysdeps.diff, update to revision 3299 (from glibc-bsd),
+    fix libc.so linking on kfreebsd after recent linker changes.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 02 May 2011 06:11:16 +0200
+
+eglibc (2.13-1) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * New upstream release:
+    - Fix spurious warning in bswap_16() with -Wconversion.  Closes: 
+      #561249.
+    - Add back support for m68k.  Closes: #446503, #601126.
+    - Add support for NTP API 4.  Closes: #558314.
+    - Fix memchr() on alpha.  Closes: #521737.
+    - Add optimized string functions via STT_GNU_IFUNC on PowerPC. Closes: 
+      #408959.
+    - Provide POSIX2008 compliant futimens().  Closes: #563724.
+    - Fix auxilary cache file creation.  Closes: 588218.
+    - Fix POSIX2008 compliance.  Closes: #610824.
+    - Implement accurate fma() (according to C99).  Closes: #372544.
+    - Build correctly with --no-add-needed.  Closes: #616298.
+    - Fix SOCK_CLOEXEC value on hppa.  Closes: #617973.
+    - Add inotify support on alpha.  Closes: #614099.
+    - Update patches/locale/locale-print-LANGUAGE.diff.
+    - Update patches/localedata/sort-UTF8-first.diff.
+    - Remove patches/localedata/submitted-pt_BR.diff (merged upstream).
+    - Update patches/localedata/locale-et_EE.diff (partially merged upstream).
+    - Remove patches/localedata/locale-es_CR.diff (merged upstream).
+    - Update patches/localedata/locales-fr.diff.
+    - Update patches/localedata/tailor-iso14651_t1.diff.
+    - Remove patches/localedata/fr_BE-first_weekday.diff (merged upstream).
+    - Update localedata/first_weekday.diff.
+    - Remove patches/alpha/submitted-dl-procinfo.diff (merged upstream).
+    - Remove patches/alpha/submitted-fpu-round.diff (merged upstream).
+    - Remove patches/alpha/submitted-asm-memchr.diff (merged upstream).
+    - Remove patches/alpha/submitted-sock_nonblock.diff (merged upstream).
+    - Remove patcheS/alpha/submitted-epoll.diff (merged upstream).
+    - Remove patches/alpha/cvs-timer_settime.diff (merged upstream).
+    - Remove patches/alpha/submitted-PTR_MANGLE.diff (obsolete).
+    - Remove patches/alpha/local-fcntl_h.diff (obsolete).
+    - Remove patches/alpha/local-longjmp-chk.diff (obsolete).
+    - Remove patches/alpha/submitted-fdatasync.diff (obsolete).
+    - Remove patches/amd64/cvs-avx-tcb-alignment.diff (merged upstream).
+    - Remove patches/arm/local-no-hwcap.diff (merged upstream).
+    - Remove patches/arm/local-hwcap-updates.diff (merged upstream).
+    - Remove patches/hppa/cvs-nptl-compat.diff (merged upstream).
+    - Update patches/hppa/local-stack-grows-up.diff.
+    - Remove patches/hppa/cvs-vfork.diff (merged upstream).
+    - Remove patches/hurd-i386/submitted-rtld_lock_recursive.diff (merged 
+      upstream).
+    - Remove patches/hurd-i386/cvs-getcwd.diff (merged upstream).
+    - Remove patches/hurd-i386/cvs-setsid.diff (merged upstream).
+    - Remove patches/hurd-i386/cvs-linkat.diff (merged upstream).
+    - Remove patches/hurd-i386/cvs-ttyname.diff (merged upstream).
+    - Remove patches/hurd-i386/cvs-getnprocs.diff (merged upstream).
+    - Remove patches/hurd-i386/cvs-select.diff (merged upstream).
+    - Remove patches/hurd-i386/cvs-sched_param.diff (merged upstream).
+    - Remove patches/hurd-i386/cvs-sendmsg-leak.diff (merged upstream).
+    - Update patches/i386/local-pthread_cond_wait.diff.
+    - Remove patches/m68k/cvs-define-m68k-tls-relocations.patch (merged 
+      upstream).
+    - Remove patches/m68k/cvs-tls-support.patch (merged upstream).
+    - Remove patches/m68k/cvs-versions-def-2-12.patch (merged upstream).
+    - Remove patches/mips/cvs-mips-atomic_h.diff (merged upstream).
+    - Remove patches/mips/cvs-non-pic-n32-64-syscall.diff (merged upstream).
+    - Remove patches/s390/cvs-makecontext.diff (merged upstream).
+    - Update patches/s390/submitted-nexttowardf.diff.
+    - Remove patches/sh4/local-fpscr_values.diff (merged upstream).
+    - Remove patches/sh4/submitted-set_fpscr.diff (merged upstream).
+    - Remove patches/sparc/cvs-sparcv9-memchr.diff (merged upstream).
+    - Remove patches/sparc/submitted-epoll.diff (merged upstream).
+    - Remove patches/sparc/submitted-msgrcv.diff (merged upstream).
+    - Update patches/any/local-ldso-disable-hwcap.diff.
+    - Remove patches/any/local-ntp-update.diff (obsolete).
+    - Update patches/any/local-no-pagesize.diff.
+    - Update patches/any/submitted-longdouble.diff.
+    - Remove patches/any/cvs-resolv-bindv6only.diff (merged upstream).
+    - Remove patches/any/cvs-futimens.diff (merged upstream).
+    - Remove patches/any/cvs-malloc_info-init.diff (merged upstream).
+    - Remove patches/any/cvs-stat-issock.diff (merged upstream).
+    - Remove patches/any/cvs-remove.diff (merged upstream).
+    - Remove patches/any/cvs-getaddrinfo.diff (merged upstream).
+    - Remove patches/any/cvs-umount-nofollow.diff (merged upstream).
+    - Remove patches/any/cvs-glob.diff (merged upstream).
+    - Remove patches/any/cvs-flush-cache-textrels.diff (merged upstream).
+    - Remove patches/any/submitted-group_member.diff (merged upstream).
+    - Remove patches/any/cvs-redirect-throw.diff (merged upstream).
+    - Remove patches/any/cvs-__block.diff (merged upstream).
+    - Remove patches/any/cvs-sunrpc-license.diff (merged upstream).
+    - Remove patches/any/submitted-resolv.conf-thread.diff (merged upstream).
+    - Remove patches/any/cvs-audit-suid.diff (merged upstream).
+    - Remove patches/any/cvs-dont-expand-dst-twice.diff (merged upstream).
+    - Remove patches/any/cvs-ignore-origin-privileged.diff (merged upstream).
+    - Remove patches/any/cvs-fnmatch-alloca.diff (merged upstream).
+    - Remove patches/any/cvs-qsort-race.diff from upstream (merged upstream).
+    - Remove patches/any/submitted-etc-resolv.conf.diff (obsolete).
+    - Update patches/any/submitted-bits-fcntl_h-at.diff.
+    - Remove patches/any/submitted-nis-shadow.diff (obsolete).
+    - Remove patches/any/submitted-futex_robust_pi.diff (obsolete).
+    - Update patches/kfreebsd/local-readdir_r.diff.
+  * debian/sysdeps/*.mk, debhelper.in/libc.preinst: bump minimal Linux
+    kernel version to 2.6.26, and minimal FreeBSD kernel version to 
+    8.0.0.  Closes: #610475.
+  * Add /etc/default/nss.
+  * Add patches/all/local-nis-shadow.diff to change default value of
+    ADJUNCT_AS_SHADOW to TRUE. This avoid NIS password leakage 
+    (CVE-2010-0015), but can be changed to FALSE to accomomdate some
+    NIS installations.  Closes: #566297, #566844.
+  * kfreebsd/local-sysdeps.diff, kfreebsd/local-linuxthreads29.diff: 
+    update to revision 3286 (from glibc-bsd)  Closes: #602776.
+  * debian/rules: split build-indep and build-arch targets.  Closes: 
+    #611926.
+  * sysdeps/sparc.mk, sysdeps/sparc64.mk: build with --enable-multi-arch.
+  * sysdeps/powerpc.mk, sysdeps/ppc64.mk: build with --enable-multi-arch.
+  * Drop libc6-sparcv9b package on sparc/sparc64, optimizations are now
+    done through multi-arch (STT_GNU_IFUNC).
+  * Add patches/localedata/locale-C.diff to create a C locale.
+  * Build and install the C locales in libc-bin.  Closes: #609306.
+  * Bump to Standards-Version 3.9.1 (no changes).
+  * Add patches/submitted-rwlock-stack-imbalance.diff to fix regression 
+    in pthread_rwlock_timedrdlock() and pthread_rwlock_timedwrlock().
+  * Whitelist tst-makecontext3.out test on ia64, as it is new and can't 
+    succeed on this architecture.
+  * Build depends on binutils (>= 2.21) on sparc and sparc64 to gain 
+    STT_GNU_IFUNC support.
+  * Add patches/any/submitted-ldsodefs_rtld_debug.diff to fix 
+    EGLIBC_RTLD_DEBUG support on non NPTL systems.
+  * Add patches/any/local-relro-mprotect.patch to not crash with PaX 
+    kernels.  Closes: #611195.
+  * Add patches/any/cvs-dl-missing-deps.diff to output an early error
+    when dependencies are missing.  Closes: #612792.
+  * Add patches/any/cvs-rtld-prelink.diff to fix segfault on prelinked
+    binaries.
+  * Add patches/sparc/submitted-bzero.diff to fix bzero() on sparc.
+  * Add patches/powerpc/local-libgcc_eh-ld.so.diff to fix bug-atexit3
+    test on PowerPC.
+  * Add patches/alpha/submitted-fcntl_h.diff, submitted-stackinfo.diff,
+    submitted-libm-hidden.diff, submitted-statfs.diff and 
+    submitted-fxstatat.patch to fix FTBFS on alpha.
+  * Add patches/any/local-linuxthreads-deps.diff to fix testsuite issues
+    on GNU/kFreeBSD.
+  * Add patches/s390/cvs-iconv-z9-109.diff to fix FTBFS on s390 with
+    recent binutils.
+  * Add patches/hppa/submitted-fcntl_h.diff, hppa/submitted-stackinfo.diff
+    and hppa/submitted-libm-hidden.diff to fix FTBFS on hppa.
+  * Add patches/alpha/submitted-____longjmp_chk.diff to fix longjmp() with
+    FORTIFY on alpha.
+  * Add patches/alpha/submitted-PTR_MANGLE.diff to fix exceptions on alpha.
+  * Add patches/i386/cvs-cacheinfo.diff to fix empty LEVEL*CACHE* getconf()
+    entries for some CPU.  Closes: #609389.
+  * Add patches/any/local-ldconfig-multiarch.diff from Steve Langasek to
+    add multiarch support to ldconfig.
+  * Add patches/alpha/local-strncmp.diff to remove broken alpha specific
+    implementation of strncmp().
+  * Add patches/alpha/submitted-sysconf-cache.diff to fix sysconf() 
+    LEVEL*CACHE* entries.  Closes: #620203.
+  * Add patches/i386/cvs-memmove-static.diff to fix static linking
+    with FORTIFY.
+  * Add patches/amd64/cvs-getcontext.diff to fix getcontext() on amd64.
+  * Add patches/any/cvs-fopen.diff to fix fopen() with 7 bytes string.
+  * Add patches/amd64/cvs-memset.diff to fix memset() on amd64 for
+    misaligned blocks larger than 144 Bytes.
+  * Add patches/any/local-dl-deps.diff to workaround assert triggered by 
+    some binaries.  Closes: #624515.
+  * Add patches/any/submitted-fwrite-wur.diff to not warn about unused 
+    result for fwrite().  Closes: #616627.
+
+  [ Samuel Thibault ]
+  * Add patches/any/cvs-glro_dl_debug_mask.diff to fix build without
+    EGLIBC_RTLD_DEBUG support.
+  * Add patches/hurd-i386/cvs-header-prot.diff,
+    patches/hurd-i386/cvs-psiginfo.diff, and
+    patches/hurd-i386/local-ptsname.diff to fix hurd-i386 build.
+  * Update expected hurd-i386 failures with new tests.
+  * Add patches/hurd-i386/submitted-add-needed.diff to fix getting functions
+    from libmachuser and libhurduser with gold linking.
+  * Add patches/hurd-i386/local-ED.diff to avoid letting the
+    (standard-compliant!) prank bring FTBFSes.
+  * Add defining LIBPTHREAD_VERSION to
+    patches/hurd-i386/local-pthread_posix-option.diff
+
+  [ Steve Langasek ]
+  * Set Multi-Arch: foreign on the appropriate packages.
+  * debian/rules.d/debhelper.mk: set $rtlddir in the debhelper substitution
+    rules, so we don't substitute an empty string.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 01 May 2011 19:53:41 +0200
+
+eglibc (2.11.2-13) unstable; urgency=low
+
+  * Fix a typo in debian/patches/any/local-rtld.diff.  Closes: #615806.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 28 Feb 2011 07:09:56 +0100
+
+eglibc (2.11.2-12) unstable; urgency=medium
+
+  [ Aurelien Jarno ]
+  * Re-enable build failure in case of testsuite regressions.
+  * Add patches/any/cvs-fnmatch-alloca.patch from upstream to fix a 
+    memory corruption in fnmatch() that can lead to code execution.  
+    Closes: #615120.
+  * Add patches/any/cvs-qsort-race.diff from upstream to fix race in
+    qsort_r().  Closes: #614892.
+
+  [ Samuel Thibault ]
+  * patches/any/submitted-sched_h.diff: Synchronize bits/sched.h with
+    sysdeps/unix/sysv/linux/bits/sched.h (Closes: #527589), rename to
+    cvs-sched_h.diff.
+  * patches/hurd-i386/cvs-if_freereq.diff: Fix crash when siocgifconf
+    actually succeeds.
+
+  [ Clint Adams ]
+  * Patch from Nobuhiro Iwamatsu to cope with the removal of
+    patch --unified-reject-files.  closes: #612540.
+
+  [ Steve Langasek ]
+  * Merge parts of multiarch patch:
+    - Use the correct path in the ldd script as well
+    - Set default rtlddir to /lib and override it when needed.
+    - Install xen library in $(libdir)/xen instead of /usr/lib/xen.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 26 Feb 2011 18:28:26 +0100
+
+eglibc (2.11.2-11) unstable; urgency=low
+
+  * patches/kfreebsd/local-sysdeps.diff: remove stub marks for at* 
+    syscalls as we don't support FreeBSD 7.x kernels anyway.  Closes: 
+    #610749.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 31 Jan 2011 21:02:31 +0100
+
+eglibc (2.11.2-10) unstable; urgency=low
+
+  * Add patches/amd64/cvs-avx-tcb-alignment.diff from upstream to fix 
+    alignement issues on CPU supporting the AVX instruction set. Closes:
+    #610657.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 23 Jan 2011 19:54:44 +0100
+
+eglibc (2.11.2-9) unstable; urgency=low
+
+  * Disable build failure in case of testsuite regressions, will be 
+    re-enabled after squeeze release.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 20 Jan 2011 12:44:11 +0100
+
+eglibc (2.11.2-8) unstable; urgency=low
+
+  [ Clint Adams ]
+  * Japanese debconf translation update from Nobuhiro Iwamatsu.
+    closes: #604752.
+
+  [ Samuel Thibault ]
+  * Add expected gettext failure on hurd-i386.
+
+  [ Aurelien Jarno ]
+  * Update patches/localedata/locale-et_EE.diff to switch Estonian currency
+    to euro. Closes: #608803.
+  * Revert incorrect upstream patch for CVE-2010-3847 and use the correct
+    set of patches:
+    - Remove patches/any/submitted-origin.diff
+    - Add patches/any/cvs-dont-expand-dst-twice.diff
+    - Add debian/patches/any/cvs-ignore-origin-privileged.diff
+    - Keep debian/patches/any/cvs-audit-suid.diff
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 12 Jan 2011 15:32:15 +0100
+
+eglibc (2.11.2-7) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/cvs-sendmsg-leak.diff: New upstream patch from Emilio
+    Pozuelo Monfort to fix a memory leak on the error path of sendmsg.
+  * patches/hurd-i386/local-sendmsg-SCM_RIGHTS.diff: New patch from Emilio
+    Pozuelo Monfort to implement SCM_RIGHTS in sendmsg().
+
+  [ Aurelien Jarno ]
+  * Update Portuguese debconf translation, by Pedro Ribeiro.  Closes: #597348.
+  * Add any/submitted-origin.diff from Andreas Schwab to forbid the use
+    of $ORIGIN in privileged programs. Add any/cvs-audit-suid.diff to
+    only load SUID audit objects in SUID binaries. Fix CVE-2010-3847.
+    Closes: #600667.
+  * Update Catalan debconf translation, by Jordi Mallach. Closes: #601085.
+  * Update Vietnamese debconf translation, by Clytie Siddall.  Closes:
+    #601531.
+  * Add arm/local-sigaction.diff to match sigaction with SA_RESTORER
+    behaviour with other architectures.  Closes: #595403.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 30 Oct 2010 18:15:54 +0200
+
+eglibc (2.11.2-6) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Update Arabic debconf translation, by Ossama Khayat.  Closes: #596161.
+  * libc6-i386: remplace <= breaks by << breaks now that the transitioned
+    version of the packages is known.  Closes: #566720.
+  * kfreebsd/local-linuxthreads29.diff: correctly disable SO_CLOEXEC
+    support when it is not available.  Closes: #596367.
+  * update-locale: if LANGUAGE is not compatible with the selected default
+    locale, emit a warning and disable it instead of failing.
+    Closes: #596695.
+  * Add armhf support.  Closes: #596804.
+  * any/submitted-resolv.conf-thread.diff: new patch to correctly reload
+    resolv.conf for all threads.  Closes: #596499.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/submitted-catch-signal.diff: New patch to fix
+    signal-catching functions.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 15 Sep 2010 01:53:09 +0200
+
+eglibc (2.11.2-5) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * mv patches/hurd-i386/{submitted,cvs}-sched_param.diff.
+
+  [ Aurelien Jarno ]
+  * Replace any/cvs-etc-resolv.conf.diff by my previous version
+    any/submitted-etc-resolv.conf.diff. At least it really fixes the
+    original issue.  Closes: bug#595269.
+  * testsuite/alpha: allow tst-timer4.out to fail as it fails on one of
+    the build daemon.
+  * Update any/cvs-sunrpc-license.diff from upstream.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Fri, 03 Sep 2010 19:16:09 +0200
+
+eglibc (2.11.2-4) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/submitted-sched_param.diff: New patch to permit other
+    headers to get a __sched_param structure.
+
+  [ Aurelien Jarno ]
+  * Remove manpages now provided by manpages-dev (closes: bug#595194):
+    - pthread_kill_other_threads_np (3)
+    - pthread_sigmask (3)
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 01 Sep 2010 23:15:05 +0200
+
+eglibc (2.11.2-3) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * testsuite-checking/expected-results-i486-gnu-libc: update.
+  * patches/hurd-i386/cvs-select.diff: New patch to fix select timeout
+    value.
+  * patches/hurd-i386/local-locarchive.diff: Extend to permit generating several
+    locales.
+  * mv patches/hurd-i386/{submitted,cvs}-ttyname.diff.
+  * mv patches/hurd-i386/{submitted,cvs}-getnprocs.diff.
+  * patches/hurd-i386/local-i686.diff: New patch to fix i686 build.
+  * patches/hurd-i386/local-no-hp-timing.diff: New patch to disable i686 HP
+    timing support.
+  * testsuite-checking/expected-results-i686-{i386,i686,xen}: New
+    expected results.
+  * debian/control, debian/control.in/libc, debian/control/opt,
+    debian/sysdeps/hurd-i386.mk: Add lib0.3-{i686,xen} variants.
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 3156 (from glibc-bsd).
+    Closes: #522698.
+  * Add kfreebsd/local-grantpt.diff to handle EINTR returned by waitpid.
+    It fixes konsole blank (terminal) display on kfreebsd-*. Closes: #573063.
+
+  [ Clint Adams ]
+  * Reflect EGLIBC in binary package short descriptions.  closes: #587586.
+
+  [ Finn Thain ]
+  * Backport m68k TLS from version 2.12.  Closes: #586005.
+
+  [ Aurelien Jarno ]
+  * Always try to restart init when needed, and ignore the possible errors.
+    Closes: #588922, 590175.
+  * Look for apache2.2-common instead of apache2-common in nsscheck.
+    Closes: #586527.
+  * Update Galician debconf translation, by Jorge Barreiro.  Closes: #592807.
+  * Replace any/submitted-etc-resolv.conf.diff by upstream version
+    patches/any/cvs-etc-resolv.conf.diff.
+  * Add mips/cvs-non-pic-n32-64-syscall.diff from upstream to fix non-PIC
+    syscall on MIPS n32 and 64 ABI.
+  * debian/control.in/libc: conflicts with prelink (<= 0.0.20090311-1).
+    Earlier versions corrupts libc 2.11 libraries.  Closes: #593966.
+  * Add alpha/submitted-epoll.diff and sparc/submitted-epoll.diff to fix
+    epoll_create1() on Alpha and SPARC.  Closes: #576826.
+  * Remove patches/alpha/cvs-longjmp-chk.diff and restore
+    patches/alpha/local-longjmp-chk.diff as the upstream version causes
+    regressions.
+  * Add localedata/locale-tt_RU.diff from upstream to fix the name of the
+    tt_RU.UTF-8@iqtelif locale.  Closes: #588478.
+  * Add any/cvs-sunrpc-license.diff from upstream to fix the license of
+    Sun RPC: contrary to what Simon Phipps announced on his blog, and
+    according to the lawyers, the copy in glibc wasn't contained in the
+    agreement from February, 2009. In August, 2010, Oracle confirmed that
+    the code has been relicensed under BSD. Update debian/copyright
+    accordingly.
+  * Disable any/cvs-flush-cache-textrels.diff to workaround a possible
+    CPU or kernel bug.  Closes: #594807.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 01 Sep 2010 11:46:14 +0200
+
+eglibc (2.11.2-2) unstable; urgency=medium
+
+  [ Aurelien Jarno ]
+  * control.in/libc: update the Conflicts on binutils to (<< 2.20.1-1)
+    and add a Conflicts on binutils-gold (<< 2.20.1-11). Closes: #585937.
+  * Replace patches/alpha/local-longjmp-chk.diff by upstream version
+    patches/alpha/cvs-longjmp-chk.diff.
+  * Add patches/any/cvs-redirect-throw.diff to fix some header files
+    with regard to C++.
+  * Add patches/any/cvs-flush-cache-textrels.diff to fix random crashes
+    on ARM, if the executable or shared library has TEXTREL.
+  * Add patches/any/cvs-__block.diff from upstream to not conflict with
+    clang.
+  * script.in/nohwcap.sh: consider all packages not in status "n" (not
+    installed) and not in status "c" (conf-files) as installed.  Closes:
+    bug#586241.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/local-pthread_posix-option.diff: Avoid letting glibc try
+    to install its own headers for libpthread.
+
+  [ Carlos O'Donell]
+  * Add patches/hppa/cvs-vfork.diff to fix stack frame creating during
+    vfork in multithreaded environments.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 24 Jun 2010 21:03:55 +0200
+
+eglibc (2.11.2-1) unstable; urgency=low
+
+  * New upstream stable release:
+    - Remove debian/patches/amd64/submitted-cpuid.diff (merged).
+    - Remove debian/patches/sh4/cvs-register_dump.diff (merged).
+
+  [ Samuel Thibault ]
+  * Add patches/hurd-i386/local-mkdir_root.diff to fix busybox' mkdir -p.
+
+  [ Aurelien Jarno ]
+  * Danish debconf translation update from Joe Hansen.  Closes: #585548.
+  * Add patches/localedata/submitted-translit-colon.diff to add
+    transliteration support for ₡ sign.  Closes: #585727.
+  * control.in/libc: add a Breaks: on locales (<< 2.11), locales-all
+    (<< 2.11).  Closes: bug#585737.
+  * Add patches/any/submitted-group_member.diff to fix an off-by-one error
+    in group_member().  Closes: bug#570047.
+  * Update local/manpages/getconf.1.  Closes: bug#576691.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 13 Jun 2010 23:22:29 +0200
+
+eglibc (2.11.1-3) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * Add patches/hurd-i386/cvs-linkat.diff to fix new coreutils' ln.
+  * Add patches/hurd-i386/submitted-ttyname.diff to fix io/tst-ttyname_r,
+    marked as such in testsuite-checking/expected-results-i486-gnu-libc.
+  * Restore patches/hurd-i386/submitted-getnprocs.diff which got lost during
+    the 2.11 merge.
+
+  [ Aurelien Jarno ]
+  * Add patches/i386/local-cpuid-level2.diff to not trigger an abort
+    when an i586 Intel CPU is running the i686 library, as valgrind does.
+    Closes: bug#584748.
+  * mips testsuite: allow failure of tst-tls3 as it is not a regression.
+  * Add patches/any/submitted-string2-strcmp.diff to fix warnings in the
+    testsuite on armel.
+  * Add patches/alpha/submitted-syscall.diff from Mike Hommey to add support
+    for 6th argument system calls on alpha.  Closes: bug#583911.
+  * Temporarily add patches/i386/local-pthread_cond_wait.diff to use the C
+    version of pthread_cond_wait() which uses cleanup functions to reacquire
+    the mutex on cancellation (instead of unwinding for the assembly
+    version).  Closes: bug#551903.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 08 Jun 2010 10:05:49 +0200
+
+eglibc (2.11.1-2) unstable; urgency=low
+
+  [ Aurelien Jarno]
+  * nscd.init: don't use and absolute path to call start-stop-daemon, the
+    PATH variable already take care of that.
+  * check-execstack.out is a new test, therefore not a regression. Mark it
+    as failing in expected-results-powerpc64-linux-gnu-ppc64.
+  * Update tst-ttyname_r.out error value in expected-results-i486-gnu-libc
+    as part of the test is now passing.
+  * Add patches/mips/cvs-mips-atomic_h.diff to fix atomic issues on MIPS.
+  * Add patches/amd64/submitted-cpuid.diff to fix properly check CPU
+    family and model.
+  * sysdeps/i386.mk, control.in/main: switch i386 to gcc-4.4.  Closes:
+    bug#583858.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 01 Jun 2010 05:50:51 +0200
+
+eglibc (2.11.1-1) unstable; urgency=low
+
+  [ Clint Adams ]
+  * New upstream release:
+    - Fixes a house of mind attack.  Closes: bug#568488.
+    - Add the fallocate64() syscall.  Closes: bug#568924.
+    - Add RES_USE_DNSSEC support.  Closes: bug#569592.
+    - Don't abort in getifaddrs.  Closes: bug#582383.
+    - Update debian/patches/all/local-pthread-manpages.diff
+    - Remove debian/patches/alpha/submitted-getsysstats.diff (merged)
+    - Remove debian/patches/alpha/submitted-includes.diff (merged)
+    - Remove debian/patches/alpha/submitted-lowlevellock.diff (merged)
+    - Remove debian/patches/alpha/submitted-procfs_h.diff (merged)
+    - Remove debian/patches/any/cvs-broken-dns.diff (merged)
+    - Remove debian/patches/any/cvs-getutmpx-compat.diff (merged)
+    - Remove debian/patches/any/cvs-ksm.diff (merged)
+    - Remove debian/patches/any/cvs-malloc_info-output.diff (merged)
+    - Remove debian/patches/any/cvs-nis-not-configured.diff (merged)
+    - Remove debian/patches/any/cvs-nptl-init.diff (merged)
+    - Remove debian/patches/any/cvs-resolv-edns0.diff (merged)
+    - Remove debian/patches/any/cvs-resolv-init.diff (merged)
+    - Remove debian/patches/any/cvs-resolv-uninitialized.diff (merged)
+    - Remove debian/patches/any/cvs-resolv-v6mapped.diff (merged)
+    - Remove debian/patches/any/cvs-sched_h.diff (merged)
+    - Remove debian/patches/any/local-dynamic-resolvconf.diff (merged)
+    - Update debian/patches/any/local-libgcc-compat-main.diff
+    - Remove debian/patches/any/submitted-confname.h.diff (merged)
+    - Remove debian/patches/any/submitted-getent-gshadow.diff (merged)
+    - Remove debian/patches/any/submitted-getaddrinfo-nodata.diff (merged)
+    - Remove debian/patches/any/submitted-gethostbyname3.diff (merged)
+    - Update debian/patches/any/submitted-missing-etc-hosts.diff.
+    - Remove debian/patches/arm/cvs-setjmp-longjmp-fpu.diff (merged)
+    - Update debian/patches/hppa/cvs-nptl-compat.diff.
+    - Update debian/patches/hppa/local-stack-grows-up.diff from
+      Carlos O'Donell.
+    - Remove debian/patches/hppa/submitted-pie.diff (merged)
+    - Remove debian/patches/hppa/submitted-sock_nonblock.diff (merged)
+    - Update debian/patches/hurd-i386/cvs-setsid.diff.
+    - Remove debian/patches/hurd-i386/cvs-termios-IXANY.patch (merged)
+    - Remove debian/patches/hurd-i386/submitted-getnprocs.diff (merged)
+    - Update debian/patches/hurd-i386/submitted-readlinkat.diff
+    - Remove debian/patches/ia64/cvs-memchr.diff (merged)
+    - Remove debian/patches/ia64/submitted-memchr.diff (merged)
+    - Remove debian/patches/ia64/submitted-siginfo.diff (merged)
+    - Update debian/patches/kfreebsd/local-readdir_r.diff.
+    - Remove debian/patches/locale/cvs-C-first_weekday.diff (merged)
+    - Update debian/patches/localedata/first_weekday.diff
+    - Update debian/patches/localedata/tailor-iso14651_t1.diff
+    - Remove debian/patches/mips/local-lazy-eval.diff (obsolete)
+    - Remove debian/patches/s390/submitted-siginfo.diff (merged)
+    - testsuite-checking/expected-results-ia64-linux-gnu-libc: update
+    - Update testsuite-checking/expected-results-sparc-linux-gnu-libc
+    - Update testsuite-checking/expected-results-sparcv9b-linux-gnu-sparcv9b
+
+  * Add debian/patches/alpha/local-fcntl_h.diff.
+  * Add debian/patches/ia64/local-dlfptr.diff and
+    debian/patches/hppa/local-dlfptr.diff from Carlos O'Donnell.
+  * Add debian/patches/localedata/locale-hsb_DE.diff
+
+  [ Aurelien Jarno ]
+  * Enable multi-arch.
+  * kfreebsd/local-sysdeps.diff: update to revision 3039 (from glibc-bsd).
+  * Add debian/patches/alpha/local-longjmp-chk.diff and
+    debian/patches/alpha/cvs-timer_settime.diff to fix FTBFS on alpha, and
+    debian/patches/alpha/local-lowlevellock.diff to fix the testsuite.
+  * Add debian/patches/mips/local-lowlevellock.diff to fix the testsuite
+    on mips.
+  * Re-enable the testsuite on mips/mipsel build daemons.
+  * Add debian/patches/arm/local-atomic.diff and
+    debian/patches/arm/local-lowlevellock.diff to fix the testsuite on arm.
+  * Add debian/patches/hppa/local-longjmp-chk.diff to fix FTBFS on hppa.
+  * Add debian/patches/hppa/local-lowlevellock.diff to fix the testsuite
+    on hppa.
+  * Add debian/patches/s390/cvs-makecontext.diff from upstream to fix
+    makecontext() on s390.
+  * Replace debian/patches/submitted/cvs-stat-issock.diff by the upstream patch
+    debian/patches/any/cvs-stat-issock.diff.
+  * Explictely call /sbin/start-stop-daemon in nscd.init.  Closes: bug#575404.
+  * Add debian/patches/any/cvs-getaddrinfo.diff from upstream to not abort
+    the getaddrinfo loop on the first successful.
+  * Add debian/patches/any/cvs-umount-nofollow.diff from upstream to define
+    UMOUNT_NOFOLLOW.
+  * Add debian/patches/any/cvs-glob.diff from upstream to fix glob() with empty
+    pattern.
+  * Add debian/patches/submitted-tst-audit6-avx.diff to skip AVX tests if if
+    AVX is not available.
+  * Allow failures of the testsuite on HPPA until bugs are fixed:
+    - tstdiomisc.out (due to bug #582787 on gcc-4.4)
+    - tst-fork1.out (due to bug #561203 on linux-2.6)
+  * Add debian/patches/sh4/cvs-register_dump.diff from upstream to fix
+    iov[] size register-dump.h.
+  * Add debian/patches/hurd-i386/submitted-regex_internal.diff to fix FTBFS on
+    hurd-i386.
+
+  [ Samuel Thibault ]
+  * debian/patches/hurd-i386/submitted-rtld_lock_recursive.diff: New patch to
+    fix elf/ build on hurd-i386.
+  * debian/patches/hurd-i386/local-longjmp_chk.diff: New patch to fix
+    debug/____longjmp_chk.S build on hurd-i386.
+  * Update debian/patches/hurd-i386/local-pthread.diff.
+  * Update debian/testsuite-checking/expected-results-i486-gnu-libc.
+
+  [ Petr Salinger]
+  * define __rtld_lock_initialize also in linuxthreads <bits/libc-lock.h>
+    variant (enhance local-linuxthreads-weak.diff).
+  * allow failure of tst-longjmp_chk.out on GNU/kFreeBSD
+  * Add kfreebsd/local-dosavesse.diff, which does not work,
+    so rather use also added kfreebsd/local-nosavesse.diff
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 29 May 2010 14:31:50 +0200
+
+eglibc (2.10.2-9) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Add powerpcspe port support. Closes: #579778.
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 3038 (from glibc-bsd).
+    Closes: #581545.
+
+  [ Aurelien Jarno ]
+  * debian/control.in/libc: don't make libc0.1/0.3/6/6.1 depends on
+    ${misc:Depends} as suggested by lintian, as it is turned out into a
+    debconf depends.  Closes: #581835.
+  * debian/debhelper.in/nscd.init: stop supporting the reload argument.
+    Closes: #578870.
+  * debian/script.in/nsscheck.sh: correctly detect stopped and running
+    services. Closes: #573247, #575868.
+  * debian/patches/mips/submitted-rld_map.diff: don't segfault for MIPS
+    binaries with RLD_MAP set to 0. Closes: #579917.
+  * Add debian/source/format and debian/source/lintian-overrides files.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 20 May 2010 12:09:58 +0200
+
+eglibc (2.10.2-8) unstable; urgency=low
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 3036 (from glibc-bsd).
+
+  [ Clint Adams ]
+  * Spanish debconf translation update from Omar Campagne Polaino.
+    closes: #579351.
+  * Add patches/arm/cvs-setjmp-longjmp-fpu.diff.  closes: #580529
+    ("setjmp/longjmp broken on ARM w/ FPU").
+
+ -- Clint Adams <schizo@debian.org>  Tue, 27 Apr 2010 20:33:40 -0400
+
+eglibc (2.10.2-7) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/local-pthread.diff: Refresh patch.
+  * Update debian/testsuite-checking/expected-results-i486-gnu-libc.
+  * patches/hurd-i386/cvs-setsid.diff: Update to git version.
+  * patches/hurd-i386/local-locarchive.diff: New patch to fix installation of
+    locales-all.
+  * patches/hurd-i386/cvs-remove.diff: New upstream patch to fix remove()
+    on directory on non-Linux ports.
+
+  [ Aurelien Jarno ]
+  * debian/control.in/*: add ${misc:Depends} to all binary packages.
+  * debian/*symbols*: simplify symbol files by using the new #PACKAGE#
+    feature.
+  * Bump to Standards-Version 3.8.4.
+  * Update patches/alpha/submitted-sock_nonblock.diff to also fix
+    SOCK_CLOEXEC.  Closes: #569646.
+  * Update patches/hppa/submitted-sock_nonblock.diff to also fix
+    SOCK_CLOEXEC.
+  * Add patches/any/submitted-stat-issock.diff to define the S_ISSOCK
+    macro starting with POSIX 2001.  Closes: #569517.
+  * scripts.in/nsscheck.sh: remove non-breaking space.  Closes: #569701.
+  * rules.d/debhelper.mk: remove obsolete comment.  Closes: #570946.
+  * Replace patches/sparc/local-sparcv9-memchr.diff by
+    patches/sparc/cvs-sparcv9-memchr.diff.
+  * Add patches/sparc/submitted-msgrcv.diff to fix msgrcv() on sparc64,
+    and with it fakeroot.
+  * Add patches/any/submitted-nptl-invalid-td.patch to also catch
+    uninitialized thread descriptors in INVALID_TD_P macro.  Closes:
+    #571639.
+  * Fix lang_ab field in es_CR locales.  Closes: #571755.
+
+  [ Petr Salinger]
+  * kfreebsd/local-sysdeps.diff: update to revision 3034 (from glibc-bsd).
+  * any/local-linuxthreads-stacksize.diff: New patch to restrict
+    max stack size in threads
+
+  [ Clint Adams ]
+  * Add any/local-gai-rfc1918-scope-global.patch.  closes: #468801.
+
+ -- Clint Adams <schizo@debian.org>  Thu, 22 Apr 2010 09:38:27 -0400
+
+eglibc (2.10.2-6) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * kfreebsd/local-sysdeps.diff: update to revision 2957 (from glibc-bsd).
+  * Don't run the testsuite in parallel, as it sometimes causes some failures
+    in some tests.
+  * Add patches/any/cvs-malloc_info-init.diff to fix malloc_info() with no
+    malloc() done.  Closes: #562679.
+  * Add patches/sh4/submitted-set_fpscr.diff to add __set_fpscr() prototype.
+    Closes: #565369.
+  * debian/rules.d/build.mk: Add --with-pkgversion and --with-bugurl
+    arguments.
+  * Add patches/ia64/submitted-memchr.diff to fix memchr() overshoot on ia64.
+    Closes: #563882
+  * Add patches/any/submitted-leading-zero-stack-guard.diff and
+    patches/any/submitted-stack-guard-quick-randomization.diff from Ubuntu and
+    Fedora to improve stack randomisation.  Closes: #568488.
+  * Update es_CR locale from Marcelo Magallon.  Closes: #567351.
+  * debian/script.in/nsscheck.sh: Only restart services that are currently
+    running.  Closes: #528755.
+  * Move locales and locales-all to section localization.  Closes: #568753.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/local-pthread.diff: New hurd-only patch to provide
+    LIBPTHREAD_SO and disable nscd.
+  * patches/hurd-i386/local-pthread_posix-option.diff: Tell glibc Makefiles that
+    we have a libpthread.
+  * testsuite-checking/expected-results-i486-linux-gnu-libc: Update results.
+  * patches/hurd-i386/submitted-posix_opt.h.diff: Update.
+  * patches/hurd-i386/submitted-sysvshm.diff: Resync.
+  * patches/hurd-i386/submitted-net.diff: New patch to factorize net/ files
+    between Linux and Hurd.
+  * patches/hurd-i386/submitted-getnprocs.diff: New patch to add get_nprocs()
+    and such weak aliases.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 07 Feb 2010 16:54:24 +0100
+
+eglibc (2.10.2-5) unstable; urgency=low
+
+  [ Petr Salinger]
+  * Update kfreebsd/local-no-SOCK_NONBLOCK.diff to cvs-resolv-* changes.
+    Move it into any/local-no-SOCK_NONBLOCK.diff, as it is used also on hurd.
+    Closes: #564008.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/submitted-posix_opt.h.diff: New patch to update standard
+    macros in posix_opt.h.
+  * patches/hurd-i386/local-pthread_posix-option.diff: Refresh and update
+    standard macros in posix_opt.h.
+  * patches/hurd-i386/submitted-sysvshm.diff: Add standard macro _XOPEN_SHM in
+    posix_opt.h.
+  * patches/hurd-i386/local-tls-support.diff: Use kern_return_t instead of
+    error_t to avoid a dependency on a GNU-specific type.
+  * patches/hurd-i386/submitted-getcwd.diff: renamed to cvs-getcwd.diff since
+    merged upstream.
+  * patches/hurd-i386/submitted-setsid.diff: renamed to cvs-setsid.diff since
+    merged upstream.
+
+  [ Aurelien Jarno ]
+  * Fix sparc64 build.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 07 Jan 2010 20:57:49 +0100
+
+eglibc (2.10.2-4) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * testsuite-checking/expected-results-i486-linux-gnu-libc: Add
+    tst-atime.out failure.
+
+  [ Aurelien Jarno ]
+  * Also build a libc6-sparcv9b package on sparc64.
+  * Disable debian/patches/any/cvs-futimens.diff. Addresses: #563726,
+    #563754.
+  * Add debian/patches/localedata/locale-et_EE.diff to change weekday
+    and workday to Monday.  Closes: #563636.
+  * Add debian/patches/any/cvs-resolv-init.diff to fix mixing IPv4 and
+    IPv6 name server in resolv.conf.
+  * Add debian/patches/any/cvs-resolv-uninitialized.diff to fix an
+    uninitialized variable in resolv code.
+  * Add debian/patches/any/cvs-resolv-bindv6only.diff to not use
+    IPV4-mapped addresses in the resolver code.  Closes: #563552.
+  * Add debian/patches/any/cvs-resolv-edns0.diff to handle overly large
+    answer buffers in resolver.
+  * Add debian/patches/any/cvs-resolv-v6mapped.diff to fix lookup failure
+    with IPv6 mapping enabled and big answers.  Closes: #558984.
+  * Add debian/patches/any/submitted-nis-shadow.diff to remove encrypted
+    passwords from passwd entries, and add them in shadow entries.
+    Closes: #560333.
+
+  [ Petr Salinger]
+  * kfreebsd/local-sysdeps.diff: update to revision 2907 (from glibc-bsd).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 06 Jan 2010 22:18:19 +0100
+
+eglibc (2.10.2-3) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Update from the latest SVN, branch eglibc-2_11:
+    - Remove any/cvs-malloc-check.diff (merged upstream).
+  * debhelper.in/libc.postinst: also restart incron on upgrade.  Closes:
+    #557801.
+  * debhelper.in/libc.postinst: restart the services instead of stopping
+    them and then starting them again.  Closes: #211784.
+  * Use gcc/g++-4.4 on hppa, hurd-i386, mips and mipsel.
+  * Mention EGLIBC in packages description.  Closes: #559121.
+  * Add support for sparc64 architecture.
+  * debian/sysdeps/mips.mk, debian/sysdeps/mipsel.mk: remove hack to support
+    buildds kernels now that they have been upgraded.
+  * debian/control.in/main: add a Homepage: pseudo header.  Closes: #561034.
+  * debian/local/manpages/gai.conf.5: fix a typo.  Closes: #560144.
+  * Replace debian/any/submitted-nis-not-configured.diff by upstream patch
+    debian/any/cvs-nis-not-configured.diff.
+  * Add debian/patches/any/local-ntp-update.diff to partially update the NTP
+    API, backported from upstream.  Closes: #559482.
+  * Add debian/patches/any/cvs-malloc_info-output.diff from upstream to fix
+    malloc_info() output.  Closes: #562678.
+  * Add debian/patches/any/cvs-futimens.diff from upstream to correctly handle
+    AT_FDCWD in futimens().
+
+  [ Samuel Thibault ]
+  * testsuite-checking/expected-results-i486-linux-gnu-libc: Add hurd-i386
+    testsuite results.
+  * sysdeps/hurd.mk: Enable testsuite.
+  * patches/hurd-i386/submitted-getcwd.diff: Add patch to fix duplicate port
+    deallocation.
+  * patches/hurd-i386/submitted-setsid.diff: Add patch to fix bogus port
+    deallocation.
+
+  [ Petr Salinger]
+  * kfreebsd/local-sysdeps.diff: update to revision 2904 (from glibc-bsd).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 02 Jan 2010 13:07:44 +0100
+
+eglibc (2.10.2-2) unstable; urgency=low
+
+  [ Carlos O'Donell]
+  * debian/patches/hppa/cvs-nptl-compat.diff: new version to fix
+    pthread structures alignment on hppa.
+
+  [ Aurelien Jarno ]
+  * debian/control: bump libc-bin breaks on libc0.1/0.3/6/6.1 to (<< 2.10).
+    Closes: #556945.
+  * patches/localedata/submitted-pt_BR.diff: new patch to fix the thousand
+    separator on pt_BR locale.  Closes: #474479.
+  * debhelper.in/locales.postinst: if an selected entry is present more than
+    once, only uncomment the first one.  Closes: #529368.
+  * patches/any/submitted-gethostbyname3.diff: return an error if the
+    nameserver timeouts.  Closes: #499781.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 24 Nov 2009 06:12:57 +0100
+
+eglibc (2.10.2-1) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * New upstream minor release.
+    - fix build timeout on SH4.  Closes: #552407.
+    - disabled patches/svn-updates.diff.
+    - remove patches/powerpc/cvs-readahead.diff (merged).
+    - remove patches/any/submitted-libgcc_s.so.diff (merged).
+    - remove patches/any/cvs-preadv-pwritev.diff (merged).
+    - remove patches/any/cvs-getaddrinfo-nss-notfound.diff (merged).
+  * patches/ia64/cvs-memchr.diff: new patch from upstream replacing
+    patches/ia64/submitted-memchr.diff.
+  * patches/any/cvs-malloc-check.diff: new patch from upstream to fix bugs
+    with MALLOC_CHECK.  Closes: #557158.
+  * patches/any/cvs-ksm.diff: add support to KSM, define MADV_MERGEABLE and
+    MADV_UNMERGEABLE. Closes: #556631.
+  * Replace patches/locale/fix-C-first_weekday.diff by upstream version
+    patches/locale/cvs-C-first_weekday.diff.  Closes: #556884.
+  * rules.d/debhelper.mk: don't use --strip-unneeded when stripping .o
+    objects.  Closes: #556951.
+  * patches/any/submitted-bits-fcntl_h-at.diff: new patch to move AT_*
+    constants from <fcntl.h> to <bits/fcntl.h>. Closes: #555303.
+  * Replace patches/any/submitted-sched_h.2.diff by upstream version
+    patches/any/cvs-sched_h.diff.
+  * Use gcc/g++-4.4 on sparc.
+  * patches/any/submitted-nis-not-configured.diff: fix getaddrinfo() if
+    NIS is not configured. Fixes CVE-2010-0015.  Closes: #556600.
+  * patches/any/submitted-getaddrinfo-nodata.diff: new patch from Michael
+    Stone to fix getaddrinfo() if a plugin returns TRY_AGAIN or NO_DATA.
+    Closes: #557596.
+
+  [ Carlos O'Donell]
+  * patches/hppa/local-stack-grows-up.diff: new version.
+
+  [ Petr Salinger]
+  * kfreebsd/local-sysdeps.diff: update to revision 2859 (from glibc-bsd).
+    Closes: #557248.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 23 Nov 2009 09:46:23 +0100
+
+eglibc (2.10.1-7) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * patches/all/local-ldd.diff: new patch to handle the case where ld.so is
+    not executable (wrong architecture), and always trace dynamic library
+    dependencies through the dynamic linker.  Closes: #502189,
+    #552518, #499016.
+  * Strip *.o files manually (dh_strip does not do it) to prevent
+    leakage of the build directory (has been lost in a merge).
+  * script.in/nsscheck.sh: fix call to invoke-rc.d.  Closes: #555463.
+  * patches/ia64/submitted-memchr.diff: fix memchr() when data is shorter
+    than software pipeline.
+  * Bump to Standards-Version 3.8.3.
+  * Re-enable PIE on mips and build-depends on binutils (>= 2.20-3).
+  * Build-depends on g++-4.4 (>= 4.4.2-2) and use gcc-4.4 on armel.
+  * libc-bin-dev: recommends manpages-dev.  Closes: #485608.
+  * Generate /usr/lib{,32,64}/gconv/gconv-modules.cache at build time
+    instead of during package installation. Closes: #548042.
+  * debhelper.in/locales-all.prerm: remove /usr/lib/locale on removal, to
+    make puiparts happy.
+
+  [ Carlos O'Donell]
+  * patches/hppa/local-stack-grows-up.diff: fix pthread stack related
+    functions when the stack grows up.  Closes: #553722.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 12 Nov 2009 12:53:04 +0100
+
+eglibc (2.10.1-6) unstable; urgency=high
+
+  [ Aurelien Jarno ]
+  * Don't ask to stop gdm before an upgrade, but run reload in the postint
+    Closes: #553362.
+  * patches/powerpc/cvs-readahead.diff: fix readahead on PowerPC.
+  * patches/any/cvs-preadv-pwritev.diff: fix preadv, pwritev and fallocate
+    for-D_FILE_OFFSET_BITS=64.  Closes: #554608.
+  * patches/any/submitted-sched_h.2.diff: allow const argument to CPU_ISSET()
+    Closes: #554901.
+  * kfreebsd/local-sysdeps.diff: update to revision 2819 (from glibc-bsd).
+  * patches/any/submitted-etc-resolv.conf.diff: also handle case when the file
+    is present, but a nameserver entry is missing.  Closes: #552010.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 08 Nov 2009 18:56:15 +0100
+
+eglibc (2.10.1-5) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/local-disable-ioctls.diff: New patch to disable some
+    non-working ioctls.
+  * patches/hurd-i386/local-pthread_types.diff: Fix path typo.
+
+  [ Aurelien Jarno ]
+  * Move xz-utils to Build-Depends from Build-Depends-Indep.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 01 Nov 2009 17:19:00 +0100
+
+eglibc (2.10.1-4) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * patches/any/submitted-localedef-mmap.diff: new patch to cope with
+    different mmap alignment restrictions between MMAP_SHARED and
+    MMAP_PRIVATE. On SPARC64, MMAP_SHARED implies a 16kB alignment (L1
+    D-Cache size), while MMAP_PRIVATE implies a 8kB alignment (page
+    size).  Closes: #552233.
+  * patches/any/submitted-confname.h.diff: new patch to fix build of
+    bits/confname.h with -pedantic-errors.  Closes: #552819.
+  * kfreebsd/local-sysdeps.diff: update to revision 2817 (from glibc-bsd).
+    Fixes <netinet/icmp6.h>.  Closes: #552138.
+  * Disable PIE on MIPS/MIPSEL.
+  * Replace patches/s390/submitted-getutmpx.diff by upstream version
+    (patches/any/cvs-getutmpx-compat.diff).
+  * Don't include debian/ and stamp-dir/ in eglibc source tarball.  Closes:
+    #553053.
+  * Switch to the more common xz format from lzma for eglibc-source
+    tarball.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Fri, 30 Oct 2009 09:48:09 +0100
+
+eglibc (2.10.1-3) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/local-bigmem.diff: Fix patch.
+
+  [ Aurelien Jarno ]
+  * patches/s390/submitted-getutmpx.diff: new patch to fix getutmpx() on
+    s390.  Closes: #544838.
+  * patches/any/submitted-missing-etc-resolv.conf.diff: new patch to fix
+    name resolution with empty or missing /etc/resolv.conf.  Closes:
+    #552453.
+  * debian/sysdeps/i386.mk: build with gcc-4.3 on i386.  Closes: #551903.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 26 Oct 2009 19:40:34 +0100
+
+eglibc (2.10.1-2) unstable; urgency=low
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 2806 (from glibc-bsd).
+  * Drop kfreebsd/local-sysdeps-2.10.diff (merged in local-sysdeps.diff).
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/local-bigmem.diff: New patch to fix dl.so crash when
+    running on GNU Mach with VM_MAX_ADDRESS < 0xc0000000.
+
+  [ Aurelien Jarno ]
+  * patches/any/submitted-missing-etc-hosts.diff: return HOST_NOT_FOUND
+    instead of NO_DATA.  Closes: #551622, #551760, #551879, #552010.
+  * Restart NSS related services after upgrade. Closes: #551971, #551885.
+  * testsuite-checking/*kfreebsd*: the *at syscalls emulation is not
+    working under all conditions, allow failure of related tests. That
+    should be removed after switching to kernel 8.0.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Fri, 23 Oct 2009 08:48:29 +0200
+
+eglibc (2.10.1-1) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * New upstream release.
+    - Fix C++ declaration of string functions.  Closes: #496763.
+    - Add Handling for group shadow files.  Closes: #519479.
+    - Use AT_RANDOM for randomized stack protector value.  Closes:
+      #533077.
+    - don't trigger assertion on __pthread_mutex_lock anymore.  Closes:
+      #479952.
+    - Fix week specifier in en_GB.  Closes: #511474.
+    - Update sys/timex.h.  Closes: #550857.
+    - debian/copyright, debian/*symbols*, debian/shlibver,
+      debian/locales-depver, debian/debhelper.in/*.lintian: upgrade
+      to 2.10.
+    - alpha has been moved to ports, update debian/sysdeps/alpha.mk and
+      debian/patches/alpha/* accordingly.
+    - Remove debian/patches/arm/submitted-setjmp.diff (merged).
+    - Remove debian/patches/arm/submitted-fpu_control_h.diff (merged).
+    - Remove debian/patches/hppa/cvs-tsd.diff (merged).
+    - Remove debian/patches/hppa/cvs-nptl.diff (merged).
+    - Remove debian/patches/hurd-i386/cvs-resource-prio.diff (merged).
+    - Remove debian/patches/hurd-i386/cvs-hurdsig-fix.diff (merged).
+    - Remove debian/patches/hurd-i386/cvs-net-headers.diff (merged).
+    - Remove debian/patches/hurd-i386/cvs-report-wait-fix.diff (merged).
+    - Remove debian/patches/hurd-i386/cvs-get_pc_thunk.diff (merged).
+    - Remove debian/patches/hurd-i386/cvs-strerror_l.diff (merged).
+    - Remove debian/patches/hurd-i386/cvs-rtld.diff (merged).
+    - Update debian/patches/hurd-i386/local-tls-support.diff.
+    - Update debian/patches/hurd-i386/submitted-extern_inline.diff.
+    - Update debian/patches/hurd-i386/local-atomic-no-multiple_threads.diff.
+    - Remove debian/patches/mips/cvs-context.diff (merged).
+    - Remove debian/patches/sparc/cvs-siginfo.diff (merged).
+    - Remove debian/patches/all/submitted-readme-version.diff (merged).
+    - Remove debian/patches/any/submitted-install-map-files.diff (merged).
+    - Remove debian/patches/any/cvs-pthread_h.diff (merged).
+    - Remove debian/patches/any/local-bashisms.diff (merged).
+    - Remove debian/patches/any/cvs-bz7058-nss_nss-nis.diff (merged).
+    - Remove debian/patches/any/cvs-iconv-utf16.diff (merged).
+    - Remove debian/patches/any/submitted-cross-zic.diff (merged).
+    - Remove debian/patches/any/cvs-binutils_2.20.diff (merged).
+    - Remove debian/patches/any/submitted-nss-nsswitch.diff (merged).
+    - Remove debian/patches/any/cvs-bz9706-nss_nss-files_files-parse.diff
+      (merged).
+    - Update debian/patches/any/cvs-broken-dns.diff.
+    - Remove debian/patches/any/cvs-bz9697-posix-regcomp.diff (merged).
+    - Remove debian/patches/any/cvs-bz697-posix-regexec.diff (merged).
+    - Remove debian/patches/any/submitted-broken-dns.diff (merged).
+    - Remove debian/patches/any/submitted-mount_h.diff (merged).
+    - Update debian/patches/any/submitted-futex_robust_pi.diff.
+    - Update debian/patches/any/local-dynamic-resolvconf.diff.
+    - Update debian/patches/any/local-libgcc-compat-main.diff.
+    - Update debian/patches/any/local-libgcc-compat-ports.diff.
+    - Update debian/patches/any/local-no-pagesize.diff.
+    - Remove debian/patches/any/submitted-date-and-unknown-tz.diff (merged).
+    - Remove debian/patches/any/cvs-sunrpc-license.diff (merged).
+    - Remove debian/patches/any/submitted-tst-cpucount.diff (merged).
+    - Remove debian/patches/any/submitted-signalfd-eventfd.diff (merged).
+    - Remove debian/patches/any/cvs-unsetenv.diff (merged).
+    - Remove debian/patches/localedata/mt_MT_euro.diff (merged).
+    - Remove debian/patches/localedata/submitted-bz9731-el_CY_euro.diff
+      (merged).
+    - Remove debian/patches/localedata/sk_SK_euro.diff (merged).
+    - Remove debian/patches/localedata/submitted-bz9730-locale-sv_FI.diff
+      (merged).
+    - Remove debian/patches/localedata/cvs-el_CY-el_GR-frac_digits.diff
+      (merged).
+    - Update debian/patches/localedata/sort-UTF8-first.diff.
+    - Update debian/patches/localedata/fr_CA-first_weekday.diff
+    - Update debian/patches/localedata/fr_BE-first_weekday.diff
+    - Update debian/patches/localedata/cy_GB-first_weekday.diff
+    - Remove debian/patches/localedata/submitted-bz9835-en_GB-first_day.diff
+      (merged).
+    - Update debian/patches/localedata/first_weekday.diff
+    - Update debian/patches/localedata/fr_LU-first_weekday.diff
+    - Update debian/patches/localedata/fr_CH-first_weekday.diff
+    - Remove debian/patches/sh4/cvs-headers-update.diff (merged).
+    - Remove debian/patches/any/local-revert-3270.diff (fixed upstream).
+  * Remove localedata/locale-fr_FR.diff as coreutils has been fixed.
+  * Add debian/patches/any/submitted-autotools.diff to update config.guess
+    and config.sub.
+  * Remove debian/patches/powerpc/local-sysconf.diff, as it only concerns
+    kernel that are not supported anymore.
+  * Add debian/patches/ia64/submitted-sysconf.diff to fix sysconf() on ia64.
+  * Add debian/patches/alpha/submitted-getsysstats.diff,
+    debian/patches/alpha/submitted-includes.diff and
+    debian/patches/alpha/submitted-lowlevellock.diff to partially fix FTBFS
+    on alpha.
+  * Add debian/patches/any/local-linuxthreads-unwind.diff to fix exception
+    handling with linuxthreads.
+  * Add debian/patches/any/cvs-nptl-init.diff to allow overwriting
+    architectures init.c in csu and nptl individually.
+  * Add debian/patches/any/submitted-accept4-hidden.diff to fix build
+    on non Linux architectures.
+  * Add debian/patches/kfreebsd/local-sysdeps-2.10.diff to update sysdeps
+    for glibc 2.10 on GNU/kFreeBSD.
+  * Add debian/patches/alpha/submitted-rtld-fPIC.diff to fix build on alpha.
+  * Add debian/patches/any/submitted-getent-gshadow.diff to add gshadow
+    support to getent.
+  * debian/rules.d/tarball.mk: store the checkout revision in the tarball
+    (file .svn-revision).
+  * debian/rules.d/tarball.mk: add an "update-from-upstream-svn" rule to
+    automatically update debian/patches/svn-updates.diff.
+  * patches/ia64/submitted-libm.diff: new patch to fix errors in the
+    math testsuite on ia64.
+  * Use gcc 4.4 by default, except on armel, hppa, mips, mipsel, sparc and
+    hurd-i386.
+  * Update to upstream revision 8758.
+  * patches/any/submitted-missing-etc-hosts.diff: new patch from Steve
+    Langasek to treat a missing /etc/hosts as a simple "not found", not as
+    an internal error.  Closes: bug#539950.
+  * libc.postinst: only call telinit on Linux as originally.
+  * Fix package name in alpha/ia64 private symbols versioning.
+  * Add patches/sparc/local-sparcv9-memchr.diff to fix test-memchr.
+
+  [ Petr Salinger ]
+  * Add kfreebsd/local-no-SOCK_NONBLOCK.diff to fix build on GNU/kFreeBSD.
+
+  [ Samuel Thibault ]
+  * Add debian/patches/hurd-i386/local-_dl_random.diff to fix build on
+    hurd-i386.
+  * Add debian/patches/hurd-i386/local-unwind-resume.diff to fix build on
+    hurd-i386.
+  * Fix debian/patches/hurd-i386/local-tls-support.diff to align up includes
+    on Linux, to fix build.
+
+  [ Carlos O'Donell ]
+  * Add hppa/cvs-nptl-compat.diff to keep ABI compatibility between
+    linuxthreads and NPTL on HPPA.
+  * sysdeps/hppa.mk: switch to NPTL. Closes: bug#538513.
+  * testsuite-checking/expected-results-hppa-linux-gnu-libc: update.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 18 Oct 2009 18:35:20 +0200
+
+eglibc (2.9-27) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Extend description of libc-bin, patch by Christoph Berg. Closes:
+    bug#544389.
+  * Strip *.o files manually (dh_strip does not do it) to prevent
+    leakage of the build directory.
+  * libc.postinst: re-add "telinit u", removed by accident in version
+    2.9-24. Closes: bug#545179.
+  * nscd.init: set PATH to "/sbin:/usr/sbin:/bin:/usr/bin". Closes:
+    bug#544942.
+  * nscd.conf.5: add documentation for max-db-size and auto-propagate
+    options. Closes: bug#544544.
+  * Merge from the multiarch branch:
+    - allow to specify libdir and slibdir also for the main flavor.
+    - use real dependencies between the build_* and binaryinst_*
+      targets.
+    - simplify clean target.
+  * Set the minimum kernel version to 6.0.0 for biarch library on
+    kfreebsd-amd64 to match the main library.
+  * alpha/submitted-sock_nonblock.diff: adjust patch location (alpha is
+    still a main architecture in glibc 2.9). Closes: bug#540871.
+
+  [ Samuel Thibault ]
+  * debian/debhelper.in/libc.install: Install libc/*-gnu*/ instead of
+    libc/*-*-gnu*/, to fix FTBFS on hurd-i386 due to it now being i486-gnu/.
+  * debian/patches/hurd-i386/submitted-null-pathname.diff: New patch to fix
+    chdir("") and chroot("") into returning ENOENT.
+  * debian/patches/hurd-i386/submitted-sbrk.diff: New patch to fix sbrk beyond
+    128MB.
+  * debian/patches/hurd-i386/local-thread-cancel.diff: New patch to fix ext2fs
+    crash.
+  * debian/patches/hurd-i386/submitted-readlinkat.diff: New patch to add
+    support for readlinkat(), to fix insserv build.
+  * debian/patches/hurd-i386/cvs-termios-IXANY.patch: New patch to
+    define IXANY in XOpen environment too, to fix libgphoto2 build.
+  * debian/patches/hurd-i386/submitted-SOL_IP.patch: New patch to add SOL_IP
+    definition, to fix directfb build.
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 2779 (from glibc-bsd).
+
+  [ Clint Adams ]
+  * debian/rules.d/debhelper.mk: make sure that snippets are included
+    before doing CURRENT_VER substitution; fix thanks to Steve
+    Langasek.
+  * Bump to Standards-Version 3.8.3.
+
+ -- Clint Adams <schizo@debian.org>  Wed, 30 Sep 2009 16:24:56 -0400
+
+eglibc (2.9-26) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * alpha/submitted-sock_nonblock.diff, hppa/submitted-sock_nonblock.diff:
+    create the files at the correct location. Closes: bug#540871.
+  * Use the full triplet for optimized and biarch packages.
+  * cvs-unsetenv.diff: new patch to not segfault in unsetenv() if run after
+    clearenv().
+
+  [ Samuel Thibault ]
+  * Convert config_os' gnu-gnu into gnu to fix multiarch paths.
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 2744 (from glibc-bsd).
+  * any/local-linuxthreads-kill_other.diff, fixes ruby 1.9 testsuite failure
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 31 Aug 2009 07:05:00 +0200
+
+eglibc (2.9-25) unstable; urgency=low
+
+  * Remove Ben Collins <bcollins@debian.org> from the uploaders (Closes:
+    bug#540901).
+  * Recommends libc6-i686 on i386 and libc0.1-i686 on kfreebsd-i386
+    (instead of amd64 and kfreebsd-amd64). Closes: bug#455603.
+  * rules.d/debheper.in: fix a one letter typo causing libc6-udeb to be
+    empty. Closes: bug#541725.
+  * alpha/submitted-sock_nonblock.diff, hppa/submitted-sock_nonblock.diff:
+    new patches to accommodate SOCK_NONBLOCK != O_NONBLOCK on these
+    architectures. Closes: bug#540871.
+  * Add dependency on $syslog in /etc/init.d/nscd. Closes: bug#541492.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 16 Aug 2009 13:43:11 +0200
+
+eglibc (2.9-24) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Remove any/cvs-pthread_mutex_lock.diff following upstream decision.
+  * Replace debian/sysdeps/depflags.{mk,pl} by entries in debian/control
+    using the "new" dpkg-dev features. Clean-out some very old entries.
+  * Recommends libc6-i686 on amd64 and libc0.1-i686 on kfreebsd-amd64
+    (Closes: bug#455603).
+  * Don't access dpkg files directly in libc6.preinst.
+  * patches/any/local-ld-multiarch.diff: convert i586 and i686 into i486
+    (Closes: bug#540646).
+  * debian/rules.d/debhelper.mk: use dh_lintian instead doing the work
+    manually.
+  * Split out libc-bin from libc6 and libc-dev-bin from libc6-dev.
+    (Closes: #330735).
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 2696 (from glibc-bsd).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 10 Aug 2009 14:32:35 +0200
+
+eglibc (2.9-23) unstable; urgency=low
+
+  * debhelper.in/libc.postinst, sysdeps/depflags.pl: remove upgrade code
+    for pre-etch installations.
+  * Don't ship /etc/init.d/glibc.sh anymore: the GNU libc is now smart
+    enough to print "FATAL: kernel too old" alone. This also speed up
+    the boot a bit.
+  * Don't ship /usr/share/doc/libc6/TODO, but keep the file in the
+    sources.
+  * Don't ship /usr/share/doc/libc6/{README,PROJECT}.gz, they are
+    irrelevant for an already built GNU libc.
+  * Move /usr/share/doc/libc6/{CONFORMANCE,NAMESPACE,NOTES}.gz to
+    libc6-dev.
+  * Move all upstream changelogs in glibc-docs, and install a small
+    changelog file explaining the reason.
+  * Ship README.libm in libc6-dev.
+  * Update any/cvs-broken-dns.diff from upstream.
+  * any/cvs-pthread_mutex_lock.diff: new patch from upstream to fix
+    a memory ordering problem in pthread_mutex_{,timed}lock.
+  * Replace any/submitted-signalfd-eventfd.diff by upstream version
+    any/cvs-signalfd-eventfd.diff.
+  * alpha/submitted-asm-memchr.diff: new patch to fix broken prefetching
+    in memchr() on alpha.
+  * control.in/i386: replace the Pre-Depends by a Conflicts.  Closes:
+    #538807. Update the breaks version of the packages not yet
+    transitioned.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 27 Jul 2009 15:37:54 +0200
+
+eglibc (2.9-22) unstable; urgency=low
+
+  * kfreebsd/local-sysdeps.diff: update to revision 2670 (from glibc-bsd).
+  * any/submitted-signalfd-eventfd.diff: new patch to support < 2.6.27
+    kernels in eventfd/signalfd.  Closes: #537509.
+  * alpha/submitted-fdatasync.diff: update to keep fdatasync() as a
+    cancellation point.  Closes: #537586.
+  * sparc/cvs-siginfo.diff, s390/submitted-siginfo.diff,
+    ia64/submitted-siginfo.diff: new patches to get "struct sigevent"
+    from bits/siginfo.h in sync with the kernel version. Closes: #534548.
+  * debhelper.in/libc-alt.preinst: also clear old /lib32 and /usr/lib32
+    symlinks on install, as they might have been left by a previous
+    installation of the package.
+  * patches/any/cvs-getaddrinfo-nss-notfound.diff: new patch to correctly
+    handle missing NSS modules.  Closes: #535106, #298290.
+  * Add X-Interactive: true to /etc/init.d/glibc.sh.  Closes: #538435.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 26 Jul 2009 10:16:30 +0200
+
+eglibc (2.9-21) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Re-add /usr/include/scsi/scsi.h.  Closes: #537354.
+  * libc6-dev-i386: pre-depends on libc6-i386.  Closes: #535313.
+  * /etc/bindresvport.blacklist: add rsync (port 873). Closes: #537289.
+  * any/local-bindresvport_blacklist.diff: update from latest openSUSE
+    version.
+  * kfreebsd/local-sysdeps.diff: update to revision 2643 (from glibc-bsd).
+    Closes: #537492.
+  * debian/local/etc_init.d/glibc.sh: add support for start/stop/restart/
+    force-reload options.
+  * debian/debhelper.in/libc-alt.preinst: add set -e.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 19 Jul 2009 21:09:38 +0200
+
+eglibc (2.9-20) unstable; urgency=low
+
+  [ Clint Adams ]
+  * Bump to Standards-Version 3.8.2.
+
+  [ Aurelien Jarno ]
+  * Don't ship /usr/include/scsi/scsi.h anymore.  Closes: #535809.
+  * Add sysdeps/sh4.mk.  Closes: #536199.
+  * debian/control.in/main: Build-Depends on dpkg-dev (>= 1.15.3.1).
+    Closes: #536482.
+  * kfreebsd/local-sysdeps.diff: update to revision 2624 (from glibc-bsd).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 12 Jul 2009 14:39:01 +0200
+
+eglibc (2.9-19) unstable; urgency=low
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 2611 (from glibc-bsd).
+    Closes: #534115. Thanks to Javier Mendez Gomez.
+
+  [ Aurelien Jarno ]
+  * libc6-i386/presubj: remove.  Closes: #533768.
+  * eu.po update from Piarres Beobide.  closes: #534283.
+  * arm/local-hwcap-updates.diff, arm/local-no-hwcap.diff: update ARM
+    hwcaps to support NEON and VFP.  Closes: #534126.
+  * control.in/i386: add a breaks nvidia-glx-ia32 (<= 185.18.14-1) and
+    nvidia-libvdpau-ia32 (<= 185.18.14-1).  Closes: #534874.
+  * Merge any/submitted-broken-dns.diff into any/cvs-broken-dns.diff and
+    update from upstream.
+
+  [ Clint Adams ]
+  * ru.po update from Yuri Kozlov.  closes: #534781.
+  * cs.po update from Miroslav Kure.  closes: #534787.
+
+ -- Clint Adams <schizo@debian.org>  Sun, 05 Jul 2009 11:49:39 -0400
+
+eglibc (2.9-18) unstable; urgency=low
+
+  * Remove /lib32 and /usr/lib32 in the libc6-i386 preinst.  closes: #533773.
+
+ -- Clint Adams <schizo@debian.org>  Sun, 21 Jun 2009 03:17:50 -0400
+
+eglibc (2.9-17) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Fix the versionned conflict of libc6-i386 with libc6-i386-dev. Closes:
+    #533482.
+
+  [ Clint Adams ]
+  * Use Breaks instead of Conflicts for the /emul/ia32-linux transition.
+    closes: #533503.
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 2599 (from glibc-bsd).
+
+ -- Clint Adams <schizo@debian.org>  Thu, 18 Jun 2009 18:36:51 -0400
+
+eglibc (2.9-16) unstable; urgency=low
+
+  * Restore /lib/ld-linux.so.2 symlink. Closes: #533364.
+  * control.in/i386: tighten a bit the conflicts given the recent uploads.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 17 Jun 2009 07:32:47 +0200
+
+eglibc (2.9-15) unstable; urgency=low
+
+  * kfreebsd/local-sysdeps.diff: update to revision 2587 (from glibc-bsd).
+    Update expected testsuite results accordingly.
+  * any/cvs-broken-dns.diff: backport more parts from upstream.
+  * Update Italian debconf translation, by Luca Monducci.  Closes: #531431.
+  * sh4/cvs-headers-update.diff: new patch from upstream to fix build failure
+    on SH4.  Closes: #532385.
+  * sysdeps/amd64.mk: fix i386_slibdir.
+  * control.in/i386: remove duplicate entries.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 13 Jun 2009 22:25:41 +0200
+
+eglibc (2.9-14) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * debian/debhelper.in/locales.postrm: remove /etc/default/locale on
+    purge.  Closes: #530902.
+
+  [ Clint Adams ]
+  * Move /emul/ia32-linux libraries to /usr/lib32.
+
+ -- Clint Adams <schizo@debian.org>  Sat, 13 Jun 2009 09:51:12 -0400
+
+eglibc (2.9-13) unstable; urgency=low
+
+  * debian/debhelper.in/nscd.init: fix return code when querying status
+    and nscd is not running to comply with LSB.  Closes: #527883.
+  * debian/debhelper.in/locales.config: don't use "echo -e".  Closes:
+    #527945, #529173.
+  * debian/patches/localedata/supported.diff: add kk_KZ.RK1048 locale.
+    Closes: #528177.
+  * debian/debhelper.in/locales.config: use previous debconf settings if
+    /etc/environment and /etc/default/locale do not exist.
+  * debian/bug/locales/presubj: fix a typo.  Closes: #528353.
+  * debian/local/manpages/validlocale.8: fix a typo.  Closes: #528658.
+  * debian/patches/any/cvs-sunrpc-license.diff: new patch from upstream
+    to change the SUNRPC license into BSD one. Update debian/copyright
+    accordingly.  Closes: #382175.
+  * debian/patches/any/submitted-tst-cpucount.diff: new patch to fix
+    tst-cpucount test on non Linux kernels.
+  * kfreebsd/local-sysdeps.diff: update to revision 2545 (from glibc-bsd).
+  * debian/patches/kfreebsd/local-config_h_in.patch: new patch to correctly
+    define __KFREEBSD_KERNEL_VERSION.
+  * debian/sysdeps/kfreebsd.mk: bump minimal kernel version to 6.0.
+  * debian/debhelper.in/libc.NEWS: detail the exact line that has to be
+    added to /etc/resolv.conf.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 26 May 2009 13:45:58 +0200
+
+eglibc (2.9-12) unstable; urgency=low
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 2503 (from glibc-bsd).
+
+  [ Aurelien Jarno ]
+  * any/local-revert-3270.diff: new patch to revert fix for PR nptl/3270.
+    (closes: bug#527541).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Fri, 08 May 2009 11:57:16 +0200
+
+eglibc (2.9-11) unstable; urgency=low
+
+  * Switch to Embedded GLIBC (EGLIBC), sources taken from the 2.9
+    branch.
+    - Update all/submitted-readme-version.diff.
+    - Update any/local-bashisms.diff.
+    - Update any/cvs-bz9697-posix-regcomp.diff.
+    - Update any/cvs-binutils_2.20.diff.
+    - Drop any/local-makeconfig.diff.
+    - Drop any/submitted-getcwd-sys_param_h.diff (merged in eglibc).
+    - Add any/submitted-cross-zic.diff to fix biarch builds.
+    - Add any/submitted-nss-nsswitch.diff to fix linuxthreads builds.
+    - Add any/submitted-install-map-files.diff to fix GNU/Hurd builds.
+    - More tests of flavour/biarch builds are run, update the expected
+      testsuite results accordingly.
+    - Rename glibc-source package into eglibc-source.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 05 May 2009 09:54:14 +0200
+
+glibc (2.9-10) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * hurd-i386/local-pthread_posix-option.diff: Set _POSIX_TIMEOUTS to 200112
+    too, to fix gthread compilation in gcc-4.4
+
+  [ Petr Salinger ]
+  * fix up GNU/kFreeBSD specific macro LIST_FOREACH_SAFE.
+
+  [ Aurelien Jarno ]
+  * any/cvs-broken-dns.diff: backport more parts from upstream.
+  * any/submitted-broken-dns.diff: new patch to not raise an error if one
+    query returns NOTIMP or FORMERR and the other NOERROR.  Closes: #526823.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 05 May 2009 01:39:50 +0200
+
+glibc (2.9-9) unstable; urgency=low
+
+  * mips/cvs-context.diff: add missing part from upstream.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 28 Apr 2009 23:11:30 +0200
+
+glibc (2.9-8) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Update Swedish debconf translation, by Martin Bagge.  Closes: #522982.
+  * mips/cvs-context.diff: new patch from upstream to add getcontext,
+    setcontext, makecontext, swapcontext.
+  * any/submitted-mount_h.diff: new patch to add MNT_DETACH and MNT_EXPIRE to
+    sys/mount.h.  Closes: #523952.
+  * arm/submitted-fpu_control_h.diff: new patch to disable macros from
+    <fpu_control.h> on EABI.  Closes: #525261.
+  * any/cvs-iconv-utf16.diff: new patch from upstream to reject UTF-8-encoded
+    UTF-16 surrogates in iconv.  Closes: #525299.
+  * any/local-getaddrinfo-interface.diff: ignore addresses with no interface
+    assigned while sorting with rule 7.  Closes: #521439.
+  * any/cvs-broken-dns.diff: new patch from CVS to provide a fallback for
+    broken DNS server while doing unified IPv4/IPv6 requests. The first lookup
+    will be slow, but subsequent requests will fallback to the previous
+    behaviour. This can be enabled by default by setting 'single-request' in
+    /etc/resolv.conf.
+  * debhelper.in/libc.NEWS: add entry explaining the new behaviour and the new
+    option.
+  * any/local-disable-gethostbyname4.diff: disabled this patch to re-enable
+    unified IPv4/IPv6 requests.  Closes: bug#343140, bug#435646.
+  * localedata/cvs-el_CY-el_GR-frac_digits.diff: new patch from CVS to fix
+    frac_digits and int_frac_digits on el_CY ad el_GR locales.  Closes:
+    bug#511621.
+  * mips_asm_unistd.h, sysdeps/mipsel.mk, sysdeps/mips.mk: use our own version
+    of unistd.h corresponding to the one of a 2.6.24 kernel to workaround kernel
+    bugs on the build daemons.
+  * any/cvs-binutils_2.20.diff: new patch from upstream to fix build failure
+    with binutils 2.20.
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 2482 (from glibc-bsd).
+    Closes: #522686. Thanks to Jan Christoph Nordholz.
+
+  [ Samuel Thibault ]
+  * hurd-i386/cvs-rtld.diff: new patch, fixes boot of glibc built with
+    binutils >= 2.19.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 27 Apr 2009 00:44:59 +0200
+
+glibc (2.9-7) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Update German debconf translation, by Helge Kreutzman.  Closes: #519992.
+  * Update testsuite results on alpha, tst-timer.out exits with SIGILL on
+    some machines, it was already the case with glibc 2.7 on the same
+    machines.
+  * Update testsuite results on hppa, tst-posix_fallocate.out and
+    tst-makecontext.out are known to fail with a 32-bit kernel.
+  * debian/script.in/nsscheck.sh: fix a typo.  Closes: #520455.
+  * kfreebsd/local-sysdeps.diff: update to revision 2390 (from glibc-bsd).
+  * libc6.1.symbols.alpha: fix package name for private symbols.
+
+  [ Samuel Thibault ]
+  * debian/rules.d/debhelper.mk: let grep libpthread.so fail because on
+    hurd-i386 glibc does not provide it.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 07 Apr 2009 07:58:50 +0200
+
+glibc (2.9-6) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * debian/patches/hurd-i386/local-tls-support.diff: fix typo in tlsdesc.sym.
+
+  [ Aurelien Jarno ]
+  * debian/po/de.po: fix German translation.  Closes: bug#519612.
+  * Update French debconf translation, by Christian Perrier.  Closes: #519662.
+  * any/local-disable-gethostbyname4.diff: disable unified lookup for
+    getaddrinfo(). While unified lookup fix the problem of DNS servers simply
+    dropping AAAA requests, it breaks lookup with even more broken DNS servers
+    only returning a broken AAAA answer. As it seems the second type of broken
+    DNS concerns more users, let's revert to the old behaviour.  Closes:
+    #516218.
+  * any/submitted-getaddrinfo-lo.diff: correctly handle the lo interface and
+    associated addresses when checking for native connection.  Closes:
+    bug#519545.
+  * debian/control.in/libc: change -dbg packages to section debug.
+  * debian/control.in/main: update Standards-Version to 3.8.1:
+    - debian/local/etc_init.d/glibc.sh: move set -e out from the shebang line.
+    - debian/debhelper.in/nscd.init: exit successfully if the daemon was
+      already running.
+  * debian/debhelper.in/nscd.dirs: remove /var/run/nscd directory.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 15 Mar 2009 21:22:48 +0100
+
+glibc (2.9-5) unstable; urgency=low
+
+  [ Clint Adams ]
+  * Change first day of the week in ru_UA locale to Monday.  closes:
+    #517386.
+
+  [ Aurelien Jarno ]
+  * testsuite-checking/expected-results-i486-linux-gnu-libc,
+    testsuite-checking/expected-results-i686-linux-i686: remove
+    testgrp.out from the ignore list, it was due to a misconfiguration
+    of the build daemon.
+  * debhelper.in/libc.{preinst,postint}: bump the version triggering the
+    restart of NSS related services to 2.9-5.
+  * debhelper.in/libc.postint: change cupsys into cups.
+  * script.in/nsscheck.sh: convert mysql-server into mysql. Closes:
+    bug#172123.
+  * merge lost patch from lenny:
+    - debhelper.in/locales.config: use previous debconf settings if
+      /etc/locales does not exists. Closes: bug#517884.
+  * debian/local/manpages/ld.so.8: fix a typo.  Closes: bug#518394.
+  * debhelper.in/libc.preinst, debhelper.in/libc.templates: warn users
+    about the need to disable xscreensaver and xlockmore before libc6
+    is unpacked.  Closes: bug#517795.
+
+  [ Samuel Thibault ]
+  * debian/patches/hurd-i386/cvs-ECANCELED.diff: rename into
+    submitted-ECANCELED.diff
+  * debian/patches/hurd-i386/local-net-headers.diff: rename into
+    cvs-net-headers.diff
+  * debian/patches/hurd-i386/local-pthread_types.diff: make it create a new
+    sysdep/mach/hurd/bits/pthreadtypes.h instead of modifying
+    bits/pthreadtypes.h.  Move from series.hurd-i386 to series.
+  * debian/patches/hurd-i386/local-tls-dtv-offset.diff: remove patch, make
+    local-tls-support.diff create tlsdesc.sym instead.
+  * debian/patches/hurd-i386/local-no-strerror_l.diff: remove patch, replaced
+    by...
+  * debian/patches/hurd-i386/cvs-strerror_l.diff: new patch from Thomas
+    Schwinge.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 12 Mar 2009 00:13:02 +0100
+
+glibc (2.9-4) unstable; urgency=low
+
+  * testsuite-checking/expected-results-ia64-linux-gnu-libc: ignore
+    result of tst-oddstacklimit.out, it is known to fail with old
+    kernels, just like in glibc 2.7.
+  * debian/debhelper.in/libc{-alt,-otherbuild,}.lintian: remove outdated
+    overrides.
+  * debhelper.in/libc.postinst: restart NSS services on upgrades from
+    versions prior to 2.9-1.
+  * testsuite-checking/expected-results-arm-linux-gnueabi-libc: ignore
+    result of test-fenv.out and test-fpucw.out, as they were already
+    failing with glibc 2.7.
+  * patches/any/submitted-futex_robust_pi.diff: new patch to correctly
+    define when PI futexes and robust mutexes have been introduced
+    in the kernel, on a per architecture basis.
+  * testsuite-checking/expected-results-{alpha,ia64}-linux-gnu-libc:
+    remove PI futexes failures.
+  * patches/all/submitted-readme-version.diff: fix the upstream version
+    number in upstream README.  Closes: bug#516908.
+  * debian/rules.d/build.mk: disable the testsuite on ball/mayr/mayer/rem
+    build daemons.
+  * debian/rules.d/info.mk: new file to dump useful info in the build log.
+  * debian/rules: always define and export SHELL as "/bin/bash -e".
+    Closes: bug#517077.
+  * patches/any/cvs-bz7058-nss_nss-nis.diff: new patch to fix crash when
+    doing host lookup with nss-nis.  Closes: bug#517094.
+  * Add debian/libc6-mips{n32,64}.symbols.mips{el,} symbol files.
+  * debian/debhelper.in/glibc-source.install, debian/rules.d/build.mk:
+    switch the format of glibc-source to lzma, sparing 6MB.
+  * debian/libc6.1.symbols.{alpha,ia64}: fix symbols.
+  * debian/*symbols*: rename symbols.common into libc6.symbols.common.
+  * rules.d/debhelper.mk: don't strip debugging symbols. Remove
+    debhelper.in/libc-dbg.{install,lintian} and wrapper/objcopy.
+    control.in/libc: update description of libc-dbg.  Closes: bug#516516.
+  * patches/kfreebsd/local-scripts.diff: correctly define the soname of
+    libthread_db.
+  * libc0.1.symbols.common, libc0.1.symbols.kfreebsd-{amd64,i386],
+    libc0.1-i386.symbols.kfreebsd-amd64: new files.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Fri, 27 Feb 2009 19:01:26 +0100
+
+glibc (2.9-3) unstable; urgency=low
+
+  * debhelper.in/nscd.init: fix the for loop.  Closes: bug#516509.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 21 Feb 2009 11:40:24 +0100
+
+glibc (2.9-2) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * testsuite-checking/*: ignore tst-cpuclock2 test, as it fails on
+    machines using cpufreq.
+  * Rename submitted/cvs-tsd.diff into hppa/cvs-tsd.diff.
+  * patches/any/local-bashisms.diff: fix more bashisms in the testsuite.
+  * rules.d/build.mk: define SHELL as /bin/bash.
+  * patches/any/cvs-pthread_h.diff: patch from upstream to fix warning
+    in pthread.h.
+  * debhelper.in/libc.preinst: restart NSS services on upgrades from
+    versions prior to 2.9-1.
+  * debhelper.in/*symbols*, rules.d/debhelper.mk: allow linking against
+    private symbols again, but with a strict dependency on the upstream
+    version.
+  * debhelper.in/nscd.init: fix cache flushing on restart/reload.  Closes:
+    bug#516212.
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 2370 (from glibc-bsd).
+  * drop kfreebsd/local-sysdeps28.diff (merged into local-sysdeps.diff).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Fri, 20 Feb 2009 22:25:19 +0100
+
+glibc (2.9-1) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * New upstream release.
+    - This version has been tagged in the CVS, update debian/rules and
+      debian/rules.d/tarball.mk accordingly.
+    - shs_CA locale is enabled.  Closes: #504663.
+    - fix snprintf with low-memory.  Closes: #481543.
+    - fix mtrace warning message.  Closes: #507488.
+    - Disable m68k/local-mathinline_h.diff.
+    - Update any/local-bashisms.diff.
+    - Update hurd-i386/local-tls-support.diff.
+    - Update localedata/locale-en_DK.diff.
+    - Update localedata/sort-UTF8-first.diff.
+    - Update localedata/supported.diff.
+    - Update localedata/first_weekday.diff.
+    - Remove all/submitted-iconv-latin9.diff (merged).
+    - Remove any/submitted-user_h.diff (merged).
+    - Remove any/cvs-bug-iconv6_tst-iconv7.diff (merged).
+    - Remove any/cvs-getaddrinfo.diff (merged).
+    - Remove any/cvs-iconv-braces.diff (merged).
+    - Remove any/cvs-nscd-getservbyport.diff (merged).
+    - Remove any/cvs-regex_anchor.diff (merged).
+    - Remove any/cvs-tst-regex.diff (merged).
+    - Remove any/submitted-rpcgen-makefile.diff (merged).
+    - Remove hppa/cvs-context.diff (merged).
+    - Remove hppa/submitted-atomic_h.diff (merged).
+    - Remove hppa/submitted-fesetenv.diff (merged).
+    - Remove hurd-i386/cvs-lock-memory-clobber.diff (merged).
+    - Remove hurd-i386/cvs-mig-init.diff (merged).
+    - Remove hurd-i386/cvs-MSG_NOSIGNAL.diff (merged).
+    - Remove hurd-i386/cvs-open_2.diff (merged).
+    - Remove hurd-i386/cvs-signal-werror.diff (merged).
+    - Remove hurd-i386/cvs-termios.diff (merged).
+    - Remove hurd-i386/cvs-fcntl-types.diff (merged).
+    - Remove mips/local-setjmp.diff (merged).
+    - Remove sparc/cvs-context.diff (merged).
+    - Remove localedata/locale-ks_IN.diff (replaced upstream by
+      ks_IN@devanagari).
+    - debian/shlibver: bump to 2.9.
+    - debian/locales-depver: bump to 2.9.
+    - debian/sysdeps/depflags.pl: add a conflict on nscd (<< 2.9) to libc.
+    - Finnish (fi_FI) time format is fixed.  closes: #468849.
+  * debhelper.in/locales.config: convert ks_IN into ks_IN@devanagari.
+  * symbols.wildcards: update for glibc 2.9.
+  * debhelper.in/*.lintian: update for glibc 2.9.
+  * testsuite-checking/compare.sh: don't assume expected and current
+    testsuite results in same order.  Closes: bug#504031.
+  * testsuite-checking/expected-results-powerpc64-linux-ppc64: update.
+  * debian/local/etc_init.d/glibc.sh: add Description and Short-Description.
+    Closes: bug#510083.
+  * Remove manpage that will be provided by manpages-dev.  Closes: bug#506515,
+    bug#505784.
+  * debian/copyright: update.  Closes: bug#506881.
+  * any/submitted-popen.diff: new patch from Gentoo to fix popen() on >= 2.6.27
+    kernels.  Closes: bug#512238.
+  * arm/submitted-setjmp.diff: new patch to fix build on arm.
+  * debian/rules: set BUILD_CC (host compiler) to gcc, and set CC (target
+    compiler) to gcc-4.3. The later can be override on a per target basis.
+  * debian/rules.d/build.mk: enable stackguard randomization.  Closes:
+    bug#511811.
+  * expected-results-i486-linux-gnu-libc, expected-results-i686-linux-i686:
+    Add tests that fail on a Xen machine. Sigh.
+  * any/local-linuxthreads-thread_self.diff: new patch to fix a warning on
+    linuxthreads builds.
+  * rules.d/build.mk: unset LANG to make sure testsuite errors are not
+    localized.
+  * debian/rules: remove *.mo file in the clean target.
+  * sysdeps/alpha.mk, control.in/main: use gcc-4.3 on alpha.
+  * debhelper.in/locales.postinst: make sure /etc/default/locale is always
+    created.  Closes: bug#515099.
+  * debian/wrapper/objcopy: apply special strip to libraries only.  Closes:
+    bug#513882.
+  * debian/localedata/locale-fr_FR.diff: revert change of week of day and
+    month abbreviations in fr_FR locale.  Closes: bug#509191.
+
+  [ Clint Adams ]
+  * patches/any/cvs-bz697-posix-regexec.diff: regex fix from Paolo Bonzini.
+  * patches/any/cvs-bz9697-posix-regcomp.diff: regex fix from Paolo Bonzini,
+    closes: #510219.
+  * patches/localedata/submitted-bz9725-locale-sv_SE.diff: fix from David
+    Weinehall for incorrect sv_SE date format.  closes: #489960.
+  * patches/any/cvs-bz9706-nss_nss-files_files-parse.diff: unify NSS
+    behavior between 32-bit and 64-bit platforms.  addresses: #483645.
+  * localedata/submitted-bz9730-locale-sv_FI.diff: make sv_FI time format
+    conform to that of fi_FI.  closes: #489946.
+  * Rename patches/localedata/el_CY_euro.diff to
+    patches/localedata/submitted-bz9731-el_CY_euro.diff.
+  * Rename patches/localedata/dz_BT-collation.diff to
+    patches/localedata/submitted-bz9732-dz_BT-collation.diff.
+  * patches/localedata/submitted-bz9835-en_GB-first_day.diff: new patch to
+    fix first_weekday and first_workday for en_GB.  closes: #512343.
+
+  [ Arthur Loiret ]
+  * patches/any/local-nss-overflow.diff: new patch to ignore uids and gids
+    greater than UINT_MAX.  Closes: #483645.
+  * patches/hppa/submitted-tsd.diff: new patch from to fix build on hppa.
+    Closes: #511430.
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 2352 (from glibc-bsd).
+  * add kfreebsd/local-linuxthreads29.diff:
+    update to fix build on kfreebsd architectures.
+
+  [ Samuel Thibault ]
+  * hurd-i386/cvs-resource-prio.diff: new patch to fix detection of PRIO_*
+    values in some packages
+  * hurd-i386/cvs-hurdsig-fix.diff: new patch to fix hurd signal FD locking.
+  * hurd-i386/cvs-report-wait-fix.diff: patch from CVS instead of
+    hurd-i386/submitted-report-wait.diff.
+  * hurd-i386/submitted-critical-sections.diff: new patch to fix some missing
+    critical sections.
+  * hurd-i386/submitted-dup2-fix.diff: new patch to fix dup2 FD locking.
+  * hurd-i386/local-net-headers.diff: new patch to install net/*.h headers.
+  * hurd-i386/local-tls-dtv-offset.diff: new patch to fix DTV_OFFSET macro.
+  * hurd-i386/local-pthread_posix-option.diff: put back to series.
+  * hurd-i386/local-check_native.diff: new patch to provide a dummy
+    __check_native() function.
+  * hurd-i386/cvs-get_pc_thunk.diff: new patch to fix missing
+    __i686.get_pc_thunk.bx reference.
+  * hurd-i386/submitted-dl-sysdep.diff: new patch to fix static linking.
+  * hurd-i386/submitted-stat.diff: clean up patch.
+  * hurd-i386/submitted-itimer-lock.diff: new patch fixing itimer unlocking.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 17 Feb 2009 22:49:15 +0100
+
+glibc (2.8+20080809-3) experimental; urgency=low
+
+  [ Aurelien Jarno ]
+  * New upstream release.
+    - Fix conversions to ISO-2022-JP.  Closes: #466340.
+    - "Tarballs are a completely outdated concept":
+      + use a flat .orig.tar.gz
+      + rules.d/tarball.mk: remove all, add a get-orig-source target
+      + rules.d/quilt.mk: fix the unpatch target
+    - Update any/cvs-getaddrinfo.diff.
+    - Update any/submitted-i686-timing.diff.
+    - Update hurd-i386/cvs-lock-memory-clobber.diff.
+    - Update kfreebsd/local-sys_queue_h.diff
+    - Update locale/preprocessor-collate-uli-sucks.diff
+    - Update localedata/tailor-iso14651_t1.diff.
+    - Update localedata/locales-fr.diff.
+    - Update localedata/cy_GB-first_weekday.diff.
+    - Update localedata/fr_BE-first_weekday.diff.
+    - Update localedata/fr_CA-first_weekday.diff.
+    - Update localedata/fr_CH-first_weekday.diff.
+    - Update localedata/fr_LU-first_weekday.diff.
+    - Remove alpha/submitted-xstat.diff (outdated).
+    - Remove amd64/cvs-vdso_clock_gettime.diff (merged).
+    - Remove arm/cvs-ioperm.diff (merged).
+    - Remove arm/cvs-gcc4-inline.diff (merged).
+    - Remove arm/local-args6.diff (merged).
+    - Remove arm/submitted-RTLD_SINGLE_THREAD_P.diff (merged).
+    - Remove hppa/cvs-atomic.diff (merged).
+    - Remove hppa/cvs-lowlevellock.diff (merged).
+    - Remove hurd-i386/cvs-kernel-features.diff (merged).
+    - Remove hurd-i386/cvs-O_CLOEXEC_fix.diff (merged).
+    - Remove hurd-i386/cvs-epfnosupport.diff (merged).
+    - Remove hurd-i386/cvs-df.diff (merged).
+    - Remove hurd-i386/cvs-blocked-exceptions.diff (merged).
+    - Remove i386/cvs-short-for-fnstsw.diff (merged).
+    - Remove mips/cvs-memory-barriers.diff (merged).
+    - Remove mips/cvs-mknod.diff (merged).
+    - Remove mips/cvs-fcsr.diff (merged).
+    - Remove mips/cvs-mipsn32.diff (merged).
+    - Remove sh4/cvs-nptl-private-futexes.diff (merged).
+    - Remove all/cvs-gai_conf.diff (merged).
+    - Remove any/cvs-epoll_h.diff (merged).
+    - Remove any/cvs-ether_line.diff (merged).
+    - Remove any/cvs-ethertype.diff (merged).
+    - Remove any/cvs-fchmodat.diff (merged).
+    - Remove any/cvs-gcc-4.3.diff (merged).
+    - Remove any/cvs-iconv-iso2022jp-loop-bug.diff (merged).
+    - Remove any/cvs-isoc99_vscanf.diff (merged).
+    - Remove any/cvs-rfc3484.diff (merged).
+    - Remove any/cvs-sched_h.diff (merged).
+    - Remove any/cvs-strerror_r.diff (merged).
+    - Remove any/local-strfry.diff (merged).
+    - Remove any/cvs-strtod.diff (merged).
+    - Remove any/cvs-tzfile.diff (merged).
+    - Remove any/cvs-vfscanf.diff (merged).
+    - Remove any/cvs-sunrpc_rpc_thread.diff (merged).
+    - Remove any/cvs-wchar_h.diff (merged).
+    - Remove any/local-dl-execstack.diff (outdated).
+    - Remove any/local-gcc4-wcstol_l.diff (outdated).
+    - Remove any/local-ip6-localhost.diff (fixed differently).
+    - Remove any/local-notls.diff (outdated).
+    - Remove any/submitted-ieee754_h.diff (merged).
+    - Remove any/submitted-link-local_resolver.diff (merged).
+    - Remove localedata/cvs-locale-ig_NG.diff (merged).
+    - Remove localedata/cvs-locale-lo_LA.diff (merged).
+    - Remove localedata/cvs-locale-ug_CN.diff (merged).
+    - Remove localedata/locale-es_CR.diff (merged).
+    - Remove localedata/locale-pt_PT.diff (merged).
+    - Add patches/alpha/submitted-creat64.diff from Gentoo.
+    - Add patches/alpha/submitted-dl-support.diff from Gentoo.
+    - debian/shlibver: bump to 2.8.
+    - debian/locales-depver: bump to 2.8.
+  * Convert all patch to patchlevel -p1.  Closes: #485165.
+  * debian/rules.d/quilt.mk: add a refresh target.
+  * local/manpages/*: fix comments to make lintian happy.
+  * locale/check-unknown-symbols.diff: changes errors to warnings.
+  * debian/control.in/main: update Standards-Version to 3.8.0:
+    - Add debian/README.source.
+  * debian/rules, debian/rules.d/build.mk, debian/testsuite-checking/*:
+    implement regression check, based on a patch from Carlos O'Donell.
+  * testsuite-checking/expected-results-alpha-linux-gnu-libc: new file.
+  * testsuite-checking/expected-results-alphaev67-linux-alphaev67: new file.
+  * testsuite-checking/expected-results-arm-linux-gnueabi-libc: new file.
+  * testsuite-checking/expected-results-hppa-linux-gnu-libc: new file.
+  * testsuite-checking/expected-results-i486-kfreebsd-gnu-libc: new file.
+  * testsuite-checking/expected-results-i486-linux-gnu-libc: new file.
+  * testsuite-checking/expected-results-i686-kfreebsd-i386: new file.
+  * testsuite-checking/expected-results-i686-kfreebsd-i686: new file.
+  * testsuite-checking/expected-results-i686-linux-i386: new file.
+  * testsuite-checking/expected-results-i686-linux-i686: new file.
+  * testsuite-checking/expected-results-i686-linux-xen: new file.
+  * testsuite-checking/expected-results-ia64-linux-gnu-libc: new file.
+  * testsuite-checking/expected-results-mips-linux-gnu-libc: new file
+  * testsuite-checking/expected-results-mips32-linux-mipsn32: new file.
+  * testsuite-checking/expected-results-mips64-linux-mips64: new file.
+  * testsuite-checking/expected-results-mips32el-linux-mipsn32: new file.
+  * testsuite-checking/expected-results-mips64el-linux-mips64: new file.
+  * testsuite-checking/expected-results-mipsel-linux-gnu-libc: new file.
+  * testsuite-checking/expected-results-powerpc-linux-gnu-libc: new file.
+  * testsuite-checking/expected-results-powerpc64-linux-ppc64: new file.
+  * testsuite-checking/expected-results-s390-linux-gnu-libc: new file.
+  * testsuite-checking/expected-results-s390x-linux-s390x: new file.
+  * testsuite-checking/expected-results-sparc64-linux-sparc64: new file.
+  * testsuite-checking/expected-results-sparc-linux-gnu-libc: new file.
+  * testsuite-checking/expected-results-sparcv9b-linux-sparcv9b: new file.
+  * testsuite-checking/expected-results-x86_64-kfreebsd-gnu-libc: new file.
+  * testsuite-checking/expected-results-x86_64-linux-amd64: new file.
+  * testsuite-checking/expected-results-x86_64-linux-gnu-libc: new file.
+  * control.in/main: build-depends on dpkg (>= 1.14.17).
+  * Add symbols files for the various libraries, based on a patch by
+    Raphaël Hertzog.  Closes: #462444.
+  * localedata/supported.diff: sort locales by alphabetical order.  Closes:
+    #493231.
+  * debian/rules, debian/rules.d/build.mk, debian/sysdeps.mk/*: use a common
+    huge TIMEOUTFACTOR for all architectures.
+  * debian/sysdeps/mipsel.mk: use the correct triplet for mipsn32 and mips64
+    builds.
+  * debian/sysdeps/kfreebsd-amd64.mk: remove wrong symlink /lib32/lib32.
+  * debian/sysdeps/amd64.mk,kfreebsd-amd64.mk: enable i686 optimizations.
+  * debhelper.in/locales-all.prerm, debhelper.in/locales.postinst: remove
+    prepended path.
+  * debian/sysdeps/hppa.mk: use relative symlinks for hppa64 include
+    directories.
+  * patches/all/submitted-iconv-latin9.diff: add latin9 as an alias to
+    latin-9 for consistency with other charsets.  Closes: #497449.
+  * rules, rules.d/build.mk, debhelper.in/glibc-doc.manpages: install
+    preprocessed manpages instead of raw ones.
+  * debian/sysdeps/*.mk, script.in/kernelcheck.sh: bump minimal kernel
+    version to 2.6.18.  Closes: #499689.
+  * debian/control.in/main: add Vcs-Svn and Vcs-Browser field.  Closes:
+    #499769.
+  * debian/sysdeps/depflags.pl: add a conflict on nscd (<< 2.8) to libc
+    Closes: #498516).
+  * rules, rules.d/build.mk, debhelper.in/glibc-doc.manpages: install the
+    generated manpages.
+  * any/cvs-bug-iconv6_tst-iconv7.diff: new patch from upstream to fix
+    bug-iconv6 and tst-iconv7 when the locales package is not installed.
+
+  [ Petr Salinger ]
+  * add any/local-linuxthreads-ptw.diff. Closes: #494908.
+  * add kfreebsd/local-sysdeps28.diff, glibc 2.8 specific kfreebsd sysdeps.
+
+  [ Samuel Thibault ]
+  * Add hurd-i386/submitted-report-wait.diff.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 25 Oct 2008 21:22:39 +0200
+
+glibc (2.7-18) unstable; urgency=low
+
+  * patches/localedata/mt_MT_euro.diff, patches/localedata/el_CY_euro.diff:
+    new patches to switch Cyprus and Malta currency to Euro.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 04 Jan 2009 11:28:23 +0100
+
+glibc (2.7-17) unstable; urgency=low
+
+  * patches/localedata/sk_SK_euro.diff: new patch to switch Slovakia
+    currency to Euro.  Closes: bug#510423.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Fri, 02 Jan 2009 22:49:53 +0100
+
+glibc (2.7-16) unstable; urgency=low
+
+  * patches/any/submitted-rpcgen-makefile.diff: new patch to fix fancy
+    Makefile filename when using rpcgen -a.  Closes: bug#503182.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 23 Oct 2008 15:39:04 +0200
+
+glibc (2.7-15) unstable; urgency=low
+
+  * debhelper.in/locales.config, debhelper.in/locales.postinst: modify
+    /etc/locale.gen instead of regenerating it.  Closes: bug#494468.
+  * any/cvs-nscd-getservbyport.diff: new patch from upstream to fix getservbyport()
+    when nscd is used.  Closes: bug#500055.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 12 Oct 2008 23:04:27 +0200
+
+glibc (2.7-14) unstable; urgency=low
+
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 2322 (from glibc-bsd).
+  * extend kfreebsd/local-ftw.diff: do not use *at functions also in glob.c,
+    this patch is applied only on kfreebsd, fixes globtest.out failure.
+  * any/local-linuxthreads-weak.diff: new patch to pass
+    stdio-common/scanf15.out test on linuxthreads platforms,
+    although it seems to be rather gcc 4.x bug, see GCC Bugzilla Bug 37266.
+
+  [ Aurelien Jarno ]
+  * patches/mips/cvs-mknod.diff: new patch from upstream to allow > 255 minors
+    on mips.  Closes: #493751.
+  * patches/sparc/cvs-context.diff: new patch from upstream to add
+    getcontext(), setcontext(), makecontext() on Sparc.  Closes: #295173.
+  * patches/hppa/cvs-context.diff: new patch from upstream to add
+    getcontext(), setcontext(), makecontext() on PARISC.  Closes: #492778.
+  * any/local-ip6-localhost.diff: new patch from upstream BTS, to remove the
+    ::1 -> 127.0.0.1 mapping.
+  * any/cvs-isoc99_vscanf.diff: new patch from upstream to fix vscanf on
+    non-GNU compilers.
+  * Fix nosegneg pseudo hwcap.  Closes: #499366.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/cvs-lock-memory-clobber.diff: new patch from upstream
+    to fix safety of locks.
+  * patches/hurd-i386/local-pthread_posix-option.diff: new patch to advertise
+    the libpthread from the hurd packages.
+  * patches/hurd-i386/cvs-signal-werror.diff: new patch to fix gdb compilation.
+  * patches/hurd-i386/local-tls-support.diff: fix cthread compilation.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 20 Sep 2008 10:00:36 +0200
+
+glibc (2.7-13) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Update Brazilian Portuguese debconf translation, by Felipe Augusto van de
+    Wiel.  Closes: #485381.
+  * patches/any/cvs-getaddrinfo.diff: new patch from CVS to correctly
+    initialize internal resolver structures in getaddrinfo().  Closes:
+    #489586.
+  * Update Romanian debconf translation, by Eddy Petrişor.  Closes: #488734.
+  * any/cvs-tst-regex.diff: new patch from CVS to add a timeout to tst-regex.
+    Closes: #489856.
+  * control.in/main: build depends on gcc-4.3 (>= 4.3.0-7), remove
+    mips/local-gcc-ice.diff.
+  * Update Swedish debconf translation, by Martin Bagge.  Closes: #492191.
+  * Revert the changes to patches/hppa/cvs-atomic.diff, it was not the cause
+    of the "tst-regex problem".
+  * hppa/cvs-lowlevellock.diff: new patch from upstream to fix build of NPTL
+    glibc on hppa.  Closes: #486589.
+
+  [ Petr Salinger]
+  * debian/sysdeps/kfreebsd.mk: also use the bsm/ directory from kernel
+    headers.
+  * kfreebsd/local-sysdeps.diff: update to revision 2265 (from glibc-bsd).
+  * Disable call to "GL(dl_wait_lookup_done)" in linuxthreads builds. Proper
+    solution still have to be created. Stop crashes in mean time. See #489066.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/cvs-MSG_NOSIGNAL.diff: New patch to implement
+    MSG_NOSIGNAL.
+  * patches/hurd-i386/local-msg-nosignal.diff: Forcibly set MSG_NOSIGNAL to 0
+    until pfinet gets recompiled.  Only apply on hurd-i386.
+  * Use gcc-4.3 on hurd-i386.
+  * patches/hurd-i386/cvs-open_2.diff: New patch to implement __open_2
+    and __openat_2. Together with kfreebsd update closes: #489357.
+  * patches/hurd-i386/local-pthread_types.diff: New patch to drag pthread
+    types from hurd headers.  Bump the hurd-dev dependency version
+    accordingly.
+  * patches/hurd-i386/cvs-fcntl-types.diff: New patch to include
+    <sys/type.h> from <bits/fcntl.h> like on Linux.  Fixes a lot of FTBFS on
+    hurd.
+  * patches/hurd-i386/local-tls.diff: Resync with upstream.
+  * patches/hurd-i386/local-tls-support.diff: Make tls.h also include
+    <stdint.h> and <bits/libc-lock.h> include <tls.h>, like on Linux.
+  * patches/hurd-i386/submitted-trivial.diff: Remove, thanks to updated tls.h.
+
+  [ Pierre Habouzit ]
+  * Cherry-pick upstream fixes with respect to locale rwlocks, merge them into
+    patches/any/cvs-strerror_r.diff. Closes: #489906.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 29 Jul 2008 03:09:20 +0200
+
+glibc (2.7-12) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * patches/alpha/submitted-procfs_h.diff: don't include elf/asm.h on alpha,
+    as it has been removed from linux-libc-dev.
+  * patch/arm/cvs-ioperm.diff: don't include asm/page.h as it has been removed
+    from linux-libc-dev.  Closes: #480892.
+  * patches/hppa/cvs-atomic.diff: don't remove "memory" asm constraint. Fixes
+    FTBFS on hppa.
+  * Update Swedish debconf translation, by Martin Bagge.  Closes: #482467.
+  * sysdeps/amd64.mk, sysdeps/i386.mk, control.in/main: bump g++-4.3 build-depends
+    to (>= 4.3.0-2) to make sure the cld fix is applied. Use gcc-4.3 on amd64
+    and i386.
+  * patches/any/cvs-iconv-braces.diff: new patch from upstream to fix various
+    iconv bugs.
+  * local/manpages/nscd.conf.5: update nscd.conf manpage.  Closes: #482505.
+
+  [ Clint Adams ]
+  * Add any/cvs-regex_anchor.diff to fix performance anomaly with ^$.
+    closes: #475474.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/cvs-termios.diff: update patch, fixes compilation of jove.
+  * patches/hurd-i386/local-pthread-unsupported-stubs.diff: new patch to
+    declare the unsupported function stubs, fixes compilation of pike.  Also
+    bump the dependency on hurd-dev to get <gnu/stubs-pthread.h>.
+  * patches/hurd-i386/local-unlockpt-chroot.diff: new patch to fix ptys in
+    chroots.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 02 Jun 2008 19:14:35 +0200
+
+glibc (2.7-11) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Re-enable testsuite on MIPS SB1 platforms.
+  * mips/cvs-memory-barriers.diff: new patch from CVS to fix test_and_set.
+  * mips/cvs-fcsr.diff: new patch from CVS to fix floating point control
+    register accesses.
+  * local/manpages/ld.so.8: fix libraries search order.  Closes: #473458.
+  * Update Finish debconf translation, by Esko Arajärvi.  Closes: #473802.
+  * Replace patches/mips/submitted-mipsn32.diff by the version merged
+    upstream.
+  * patches/hppa/cvs-atomic.diff: new patch from upstream to fix atomic
+    locks witch gcc-4.3.
+  * patches/any/cvs-rfc3484.diff: update tests from CVS.  Closes: #474226.
+  * patches/localedata/locale-shs_CA.diff: add Secwepemctsín from CVS.
+  * debhelper.in/libc-prof.README.Debian: new file to explain how to use
+    libc-prof.  Closes: #442858.
+  * patches/any/cvs-ethertype.diff: new patch to add new ETHERTYPE_*
+    definitions.  Closes: #474171.
+  * sysdeps/depflags.pl: conflicts with tzdata-etch.
+  * kfreebsd/local-sysdeps.diff: update to revision 2163 (from glibc-bsd).
+  * patches/s390/submitted-nexttowardf.diff: fix IEEE exceptions raising in
+    nexttowardf() on s390 with gcc-4.3.
+  * patches/i386/cvs-short-for-fnstsw.diff: patch for upstream to fix build
+    with latest binutils.
+  * patches/any/local-no-pagesize.diff: don't include asm/page.h from
+    sys/user.h on alpha.  Closes: #480295.
+  * patches/any/submitted-user_h.diff: don't include linux/user.h from
+    sys/user.h.  Closes: #480093.
+  * patches/hppa/submitted-fesetenv.diff: fix fesetenv() on hppa with
+    gcc-4.3.
+  * sysdeps/arm.mk, sysdeps/hppa.mk, sysdeps/s390.mk, control.in/main: use
+    gcc-4.3 on arm, hppa and s390.
+  * debian/shlibs-add-udebs: new script from Frans Pop to correctly compute
+    the udev dependencies.  Closes: #474293.
+  * rules.d/debhelper.mk: remove linda overrides installation.
+  * debhelper.in/*lintian: update.
+  * control.in/main: relax a few dependencies.
+  * rules.d/debhelper.mk: avoid creating empty directories when building
+    libc6-dbg.
+
+  [ Pierre Habouzit ]
+  * Add any/cvs-strerror_r.diff to make strerror_r actually thread safe.
+    Closes: #456531.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/cvs-termios.diff: new patch to revamp ioctls/termios
+  bits.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 11 May 2008 12:13:59 +0200
+
+glibc (2.7-10) unstable; urgency=low
+
+  * Update Chinese debconf translation, by LI Daobing.
+  * Update Dutch debconf translation, by Bart Cornelis.  Closes: #468300.
+  * Update Polish debconf translation, by Emilian Nowak.
+  * Update Vietnamese debconf translation, by Clytie Siddall.  Closes: #468453.
+  * Update Basque debconf translation, by Piarres Beobide.  Closes: #468463.
+  * Update Romanian debconf translation, by Stan Ioan-Eugen.  Closes: #468671.
+  * Update Czech debconf translation, by Miroslav Kure.  Closes: #468910.
+  * Update Russian debconf translation, by Sergey Alyoshin.  Closes: #469037.
+  * Update Korean debconf translation, by Sunjae Park.  Closes: #469097.
+  * Update French debconf translation, by Christian Perrier.  Closes: #469249.
+  * patches/localedata/locale-es_CR.diff: chane AM/PM format to "a.m./p.m."
+    from "A.M/P.M.".
+  * Remove uk_UA from patches/localedata/first_weekday.diff: merged upstream
+    in a different way.  Closes: bug#469439.
+  * patches/any/cvs-rfc3484.diff: update from CVS to allow the definition of
+    IPv4 scopes in /etc/gai.conf.
+  * patches/all/cvs-gai_conf.diff: update gai.conf from CVS to also mention
+    Teredo tunnels and scopev4 defaults.
+  * sysdeps/mips.mk, sysdeps/mipsel.mk: define TIMEOUTFACTOR.
+  * patches/any/cvs-strtod.diff: new patch from CVS to fix strtod().  Closes:
+    #465769.
+  * Update Italian debconf translation, by Luca Monducci.  Closes: #469985.
+  * control.in/main, sysdeps/*.mk, rules: build with gcc-4.3 by default,
+    except on alpha, arm, hppa, s390 and hurd-i386.
+  * rules, rules.d/build.mk: fix parallel build.
+  * control.in/main: build witch gcc-4.2 on i386 and amd64, as gcc-4.3 does
+    not emit cld instructions in the prologue of the functions anymore.
+    Closes: #469568.
+  * debian/rules.d/build.mk: disable testsuite on ARM machines running a
+    2.6.21 to 2.6.24 kernel.
+  * Replace any/submitted-gcc-4.3.diff by any/cvs-gcc-4.3.diff.
+  * debhelper.in/libc.preinst, debhelper.in/libc.postinst: remove support for
+    upgrade from Potato, and misc fixes.
+  * control.in/main, rules.d/control.mk: remove @threads_arches@, as all
+    architectures now support threads.
+  * control.in/main, debhelper.in/glibc-source.install: build a glibc-source
+    package.
+  * sysdeps/mips.mk, sysdeps/mipsel.mk, control.in/main: enable n32 and 64
+    flavours.  Closes: #341884.
+  * Update Arabic debconf translation, by Ossama Khayat.  Closes: #471472.
+  * rules.d/build.mk: reset LDFLAGS, as dpkg now defines it to a default
+    value which breaks the glibc.
+  * patches/mips/local-gcc-ice.diff: decrease optimisations on a few files
+    to workaround gcc ICE on mips/mipsel n32/64.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/cvs-blocked-exceptions.diff: new patch to dump
+    core when a blocked exception arises.
+  * patches/hurd-i386/cvs-df.diff: new patch to clear DF for signal
+    handlers (Closes: #470021).
+  * patches/hurd-i386/local-gcc-4.1-init-first.diff: update and actually
+    apply.
+  * patches/hurd-i386/submitted-mig-init.diff: new patch to fix uninitialized
+    local variables.
+  * patches/hurd-i386/local-pthread_stubs.diff: new patch to use libpthread
+    stubs from libpthread-stubs.  Add libpthread-stubs0-dev dependency on
+    hurd-i386.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 27 Mar 2008 23:09:00 +0100
+
+glibc (2.7-9) unstable; urgency=low
+
+  * patches/any/local-ldso-disable-hwcap.diff: revert previous changes
+    as they break etch -> lenny upgrades.  Closes: #465753.
+  * kfreebsd/local-sysdeps.diff: update to revision 2137 (from glibc-bsd).
+  * any/submitted-link-local_resolver.diff: kernel 2.6.24 is out, don't wait
+    indefinitely for upstream. This patch from Pierre Ynard adds support for
+    link-local addresses in /etc/resolv.conf.
+  * Factorize NSS detection code:
+    - debhelper.in/libc.preinst, debhelper.in/libc.postinst: move NSS code
+      to...
+    - script.in/nsscheck.sh: ... this file.
+    - rules.d/debhelper.mk: Replace NSS_CHECK with code from
+      script.in/nsscheck.sh.
+  * debhelper.in/libc.preinst, debhelper.in/libc.templates: debconfize preinst
+    script.
+  * patches/localedata/locale-es_CR.diff: new patch to default to am/pm format
+    for es_CR locale.  Closes: #466482.
+  * control.in/main, sysdeps/amd64.mk, sysdeps/i386.mk,
+    sysdeps/kfreebsd-amd64.mk, sysdeps/kfreebsd-i386.mk, sysdeps/sparc.mk : use
+    gcc-4.3 on amd64, i386, kfreebsd-i386, kfreebsd-amd64 and sparc.
+  * sysdeps/i386.mk, sysdeps/kfreebsd-i386.mk: use default gcc optimizations
+    on i386 and kfreebsd-i386 (-march=i486 -mtune=generic).
+  * debian/local/manpages/ldconfig.8: describe --ignore-aux-cache option.
+    Closes: #467509.
+  * Update Lithuanian debconf translation, by Gintautas Miliauskas.
+  * Update Catalan debconf translation, by Jordi Mallach.
+  * Update Spanish debconf translation, by Carlos Valdivia Yagüe.
+  * Update German debconf translation, by Helge Kreutzman.  Closes: #468072.
+  * Update Galician debconf translation, by Jacobo Tarrio.  Closes: #468080.
+  * Update Slovak debconf translation, by Ivan Masár.  Closes: #468082.
+  * Update Portuguese debconf translation, by Ricardo Silva.  Closes: #468091.
+  * update Japanese debconf translation, by Kenshi Muto.  Closes: #468099.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 27 Feb 2008 19:14:37 +0100
+
+glibc (2.7-8) unstable; urgency=low
+
+  * any/cvs/rfc3484.diff: patch from CVS to fix recognition of interface
+    family.  Closes: #465583.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 13 Feb 2008 17:12:18 +0100
+
+glibc (2.7-7) unstable; urgency=low
+
+  [ Arthur Loiret ]
+  * patches/sh4/cvs-nptl-private-futexes.diff: new patch from CVS to fix
+    FTBFS on sh4.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/cvs-epfnosupport.diff: new patch to fix socket()
+    error for IPV6.
+
+  [ Aurelien Jarno ]
+  * patches/any/local-ldso-disable-hwcap.diff: enable tls/ directory even
+    when hardware capabilities are disabled. This workarounds a bug in
+    nvidia-glx.  Closes: #453480.
+  * patches/mips/local-r10k.diff: new patch from Florian Lohoff to
+    workaround LL/SC bug on R10k.  Closes: #462112.
+  * patches/mips/submitted-mipsn32.diff: new patch to fix truncate64()
+    on MIPS n32.
+  * kfreebsd/local-sysdeps.diff: update to revision 2129 (from glibc-bsd).
+  * patches/any/cvs-epoll_h.diff: new patch from CVS to define EPOLLRDHUP
+    in /usr/include/sys/epoll.h. Closes: #463342.
+  * patches/any/submitted-gcc-4.3.diff: pass -isystem option for GCC's
+    include-fixed/ directory. Fixes build with gcc-4.3.
+  * debian/control.in/main: bump to Standards-Version 3.7.3.
+  * debian/sysdeps/*.mk: build main flavours with -O2 instead of -O3 (risks to
+    trigger a bug in the compiler are higher with -O3). Remove -g from cflags,
+    as it is automatically added by the glibc scripts.
+  * debhelper.in/nscd.init: depends on $remote_fs instead of $local_fs.
+    Closes: #464022.
+  * patches/any/submitted-ieee754_h.diff: use __BIG_ENDIAN instead of
+    BIG_ENDIAN. Closes: #464594.
+  * local/manpages/ld.so.8: Add missing options to manpage. Closes:
+    #464395.
+  * rules.d/build.mk: build the locales in the build target instead of the
+    install one to workaround a bug in fakeroot.  Closes: #464924.
+  * patches/alpha/local-dl-procinfo.diff: fix _dl_string_platform() to accept
+    NULL pointers, which happens on statically linked binaries.  Closes:
+    bug#456260.
+  * local/manpages/gai.conf.5: new manpage.
+  * any/submitted-rfc3484-sortv4.diff: Drop. Replaced by ...
+  * ... any/cvs/rfc3484.diff: patch from upstream to fix various RFC3484
+    issues:
+    - Fix source IPv4 source address length computation.  Closes: bug#456779.
+    - Only apply rule 9 for IPv4 if source and destination addresses are on
+      the same subnet.  Closes: bug#438179.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 12 Feb 2008 22:29:56 +0100
+
+glibc (2.7-6) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * patches/localedata/locale-ks_IN.diff: new locale contributed by Rakesh
+    Pandit.  Closes: #457351.
+  * patches/series: enable patches/any/cvs-vfscanf.diff.  Closes: #453408.
+  * Support dpkg-buildpackage -j, but only debian/rules is actually run in
+    parallel.
+  * patches/any/cvs-iconv-iso2022jp-loop-bug.diff: patch from CVS to fix
+    iconv hang when converting to ISO-2022-JP. Thanks to Bryan Donlan for
+    the patch.  Closes: #458579.
+  * kfreebsd/local-sysdeps.diff: update to revision 2094 (from glibc-bsd).
+  * patches/amd64/cvs-vdso_clock_gettime.diff: new patch from CVS to fix
+    static linking on amd64.
+  * patches/any/local-linuxthreads-fd.diff: new patch to make sure
+    linuxthreads doesn't use stdin, stdout or stderr for its internal
+    use.
+  * debhelper.in/libc.preinst: also check for libc6-xen in non-dpkg-owned
+    files test.  Closes: #459523.
+  * patches/any/submitted-rfc3484-labels.diff: remove, this patch is actually
+    broken, and the observed behaviour conforms with the RFC.
+  * patches/any/submitted-fileops-and-signals.diff: disabled as it breaks too
+    much programs.  Closes: #459643.
+  * patches/localedata/locale-pt_PT.diff: new patch from Flávio Martins to
+    fix mon_decimal_point for pt_PT.  Closes: #459217.
+  * debian/debhelper.in/locales.postinst: don't update /etc/default/locale
+    if it already exists and DEBCONF_RECONFIGURE is not empty.  Closes:
+    #458914.
+  * debian/sysdeps/depflags.pl: bump conflict against tzdata to (<< 2007k-1).
+
+  [ Clint Adams ]
+  * debhelper.in/nscd.init: use lsb output functions.  Closes: #457661.
+  * patches/any/cvs-sunrpc_rpc_thread.diff: patch by André Cruz to fix
+    sunrpc memory leak.  closes: #460226.
+
+  [ Samuel Thibault ]
+  * patches/hurd-i386/submitted-extern_inline.diff: new patch to fix extern
+    inline declarations for c++.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 12 Jan 2008 15:33:10 +0100
+
+glibc (2.7-5) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Moved merged parts of patches/any/submitted-sched_h.diff into
+    patches/any/cvs-sched_h.diff.
+  * patches/any/cvs-ether_line.diff: new patch from upstream to fix
+    ether_line().  Closes: bug#453899.
+  * patches/any/cvs-vfscanf.diff: new patch from upstream to fix
+    crash when %as is used with sscanf().  Closes: bug#453408.
+  * debian/rules: also set CXX when cross-compiling.
+  * patches/any/submitted-malloc_h.diff: removed, replaced by
+    patches/any/cvs-wchar_h.diff.
+  * debian/sysdeps/depflags.pl: conflict against tzdata (<< 2007j-2) as
+    etch now have version 2007j-1etch1.  Closes: bug#455783.
+  * debian/sysdeps/depflags.pl: suggests libc6-i686 on i386 architecture.
+    Closes: bug#455603.
+  * any/submitted-rfc3484-labels.diff: new patch to fix RFC 3484 default
+    label ordering.  Closes: bug#456779.
+  * patches/alpha/local-dl-procinfo.diff: add missing part.  Closes:
+    bug#456260.
+
+  [ Petr Salinger]
+  * kfreebsd/local-sysdeps.diff: update to revision 2082 (from glibc-bsd).
+  * any/cvs-fchmodat.diff: properly declare as stub - needed by GNU/kFreeBSD.
+
+  [ Samuel Thibault]
+  * patches/hurd-i386/submitted-ioctl-unsigned-size_t.diff: update to also
+    handle unsigned char/int/short/long and ssize_t.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 19 Dec 2007 01:22:06 +0100
+
+glibc (2.7-4) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * patches/localedata/locale-de_LI.diff: fix locale.  Closes: bug#453860.
+  * debian/debhelper.in/locales.NEWS: fix location of the README file.
+    Closes: bug#453515.
+  * debian/debhelper.in/locales.README: rename into locales.README.Debian.
+  * debian/debhelper/in/locales.NEWS: fix a typo.  Closes: bug#453613.
+  * Update any/submitted-sched_h.diff: allow compilation of <sched.h> with
+    -pedantic.  Closes: bug#453687.
+  * Fix a typo in debian/sysdeps/alpha.mk.  Closes: bug#452890.
+  * Disable amd64/local-x86_64_bits_sigcontext.diff.  Closes: #454598.
+  * debhelper.in/libc.preinst: check for non-dpkg owned versions of
+    libc6-i686 before upgrade.  Closes: #454557.
+  * Load debconf frontend after the optimized libraries have been
+    re-enabled.  Closes: #453480.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Fri, 07 Dec 2007 00:49:02 +0100
+
+glibc (2.7-3) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Remove cs_CZ-first_weekday.diff: merged upstream in a different way.
+    Closes: bug#344470.
+  * Remove da_DK-first_weekday.diff: likewise.
+  * Remove de_DE-first_weekday.diff: likewise.
+  * Remove en_GB-first_weekday.diff: likewise.
+  * Remove et_EE-first_weekday.diff: likewise.
+  * Remove en_US-first_weekday.diff: likewise.
+  * Remove fr_FR-first_weekday.diff: likewise.
+  * Remove hu_HU-first_weekday.diff: likewise.
+  * Remove nb_NO-first_weekday.diff: likewise.
+  * Remove nn_NO-first_weekday.diff: likewise.
+  * Remove pl_PL-first_weekday.diff: likewise.
+  * Remove sk_SK-first_weekday.diff: likewise.
+  * amd64, i386/local-clone.diff: restore patch to fix gij running out of
+    memory, as it has been lost upstream.
+  * debian/sysdeps/alpha.mk: fix alphaev67_rltddir.  Closes: #452890.
+  * patches/localedata/locale-de_LI.diff: new locale contributed by Giacomo
+    Catenazzi.  Closes: #453041.
+  * debian/debhelper.in/locales-all.postinst: honor TMPDIR.  Closes: #453326.
+  * patches/any/submitted-malloc_h.diff: defines __need_ptrdiff_t,
+    __need_size_t and __need_NULL in malloc.h.  Closes: #453264.
+  * support user defined locales in /usr/local/share/i18n.  Closes: #453131.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 29 Nov 2007 18:01:03 +0100
+
+glibc (2.7-2) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * sysdeps/alpha.mk: define alphaev67_MIN_KERNEL_SUPPORTED to 2.6.9.
+    Closes: #452890.
+  * alpha/submitted-fdatasync.diff: new patch to fix fdatasync() on alpha.
+    Closes: #452081.
+  * debian/script.in/nohwcap.sh: add libc6-alphaev67 to the list of optimized
+    packages.
+  * any/cvs-tzfile.diff: new patch from CVS to fix reading version 0 timezone
+    data files.  Closes: #451892.
+  * debhelper.in/locales.config, debhelper.in/locales.postinst,
+    rules.d/debhelper.mk: rework the maintainer scripts of locales to handle
+    locales addition or removal.
+  * debhelper.in/locales.config: convert no_NO into nb_NO while upgrading.
+    Closes: #452788.
+  * debhelper.in/locales-all.NEWS, debhlper/locales-all.NEWS: add a note
+    about no_NO locale.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 26 Nov 2007 19:03:17 +0100
+
+glibc (2.7-1) unstable; urgency=low
+
+  [ Clint Adams ]
+  * New upstream release with linuxthreads snapshot.
+    - Fixes an ABBA deadlock in ld.so.  Closes: #443460.
+    - Render dgettext" thread safe.  Closes: #443660.
+    - Fixes CVE-2007-4840 (multiple errors in iconv
+      function).  Closes: #442250.
+    - Fixes strtod("-0", 0).  Closes: #448723.
+    - Remove localedata/locale-de_CH.diff (merged).
+    - Update locale/fix-LC_COLLATE-rules.diff.
+    - Update locale/LC_COLLATE-keywords-ordering.diff.
+    - Update locale/fix-C-first_weekday.diff.
+    - Update locale/preprocessor-collate.diff.
+    - Update localedata/locales-fr.diff.
+    - Remove localedata/locale-sa_IN.diff (merged).
+    - Remove localedata/locale-wo_SN.diff (merged).
+    - Update localedata/tailor-iso14651_t1.diff.
+    - Add localedata/tailor-iso14651_t1-common.diff.
+    - Remove localedata/fix-unknown-symbols.diff (merged).
+    - Update localedata/first_weekday.diff.
+    - Add localedata/cs_CZ-first_weekday.diff.
+    - Add localedata/da_DK-first_weekday.diff.
+    - Add localedata/pl_PL-first_weekday.diff.
+    - Add localedata/de_DE-first_weekday.diff.
+    - Add localedata/en_GB-first_weekday.diff.
+    - Add localedata/en_US-first_weekday.diff.
+    - Add localedata/et_EE-first_weekday.diff.
+    - Add localedata/fr_BE-first_weekday.diff.
+    - Add localedata/fr_CA-first_weekday.diff.
+    - Add localedata/fr_CH-first_weekday.diff.
+    - Add localedata/fr_FR-first_weekday.diff.
+    - Add localedata/fr_LU-first_weekday.diff.
+    - Add localedata/hu_HU-first_weekday.diff.
+    - Add localedata/nb_NO-first_weekday.diff.
+    - Add localedata/nn_NO-first_weekday.diff.
+    - Add localedata/sk_SK-first_weekday.diff.
+    - Add localedata/cy_GB-first_weekday.diff.
+    - Update localedata/sort-UTF8-first.diff.
+    - Remove localedata/submitted-as_IN.diff (merged).
+    - Remove hppa/submitted-multiple-threads.diff (merged).
+    - Remove hppa/submitted-ustat.diff (merged).
+    - Remove hurd-i386/cvs-sigsuspend-nocancel.diff (merged).
+    - Remove hurd-i386/cvs-lock-intern.diff (merged).
+    - Remove sparc/local-undefined-registers.diff (obsolete).
+    - Remove all/local-pt_BR.diff (merged).
+    - Remove any/cvs-ld_library_path.diff (merged).
+    - Remove any/cvs-initfini.diff (merged).
+    - Remove any/cvs-posix-glob.diff (merged).
+    - Update any/local-bashisms.diff.
+    - Remove any/local-forward-backward-collation.diff (merged).
+    - Remove any/local-version-sanity.diff (merged).
+    - Remove any/submitted-strtok.diff (merged).
+    - Remove any/submitted-regex-collate.diff (merged).
+    - Remove localedata/locale-no_NO.diff (obsolete).
+    - Update localedata/supported.diff.
+  * Bump shlib version to 2.7-1.
+  * Add localedata/cvs-locale-ig_NG.diff BZ#5224, missing collation symbols
+    for ig_NG.
+  * Add localedata/cvs-locale-lo_LA.diff BZ#5237, missing collation symbols
+    for lo_LA.
+  * Add localedata/cvs-locale-ug_CN.diff BZ#5238, missing collation symbols
+    for ug_CN.
+
+  [ Aurelien Jarno ]
+  * any/submitted-longdouble.diff: update.
+  * Improve any/submitted-rfc3484-sortv4.diff.
+  * Update hurd-i386/submitted-trivial.diff.
+  * any/local-strfry.diff: new patch to fix strfry(), as Ulrich Drepper
+    has still not managed to commit a correct version.
+  * Remove hppa/submitted-threaddb.diff (merged).
+  * Update hppa/submitted-nptl-carlos.diff.
+  * Update hurd-i386/submitted-libc_once.diff.
+  * Remove hurd-i386/cvs-ioctl-delay.diff (merged).
+  * Update hurd-i386/local-tls-support.diff.
+  * Add hurd-i386/cvs-kernel-features.diff: provide almost empty
+    kernel-features.h for files that include it.
+  * Add arm/local-args6.diff: provide DOCARGS_6 and UNDOCARGS_5 for
+    arm old-abi.
+  * Add arm/local-lowlevellock.diff: new patch to fix build on arm.
+  * debian/rules, debian/rules.d/build.mk: allow per architecture
+    TIMEOUTFACTOR.
+  * sysdeps/arm.mk, sysdeps/armel.mk, sysdeps/hppa.mk, sysdeps/s390.mk,
+    sysdeps/sh4.mk: define TIMEOUTFACTOR.
+  * locales-depver: tighten locales dependencies.
+  * any/local-disable-test-tgmath2.diff: new patch to disable test-tgmath2,
+    which take too much resources during compilation.
+  * Add hurd-i386/submitted-strtoul.diff: new patch to use
+    __strtoul_internal() instead of strtoul() in internal functions.
+  * Add hurd-i386/submitted-ptr-mangle.diff: new patch to define PTR_MANGLE
+    and PTR_DEMANGLE.
+  * Update Galician debconf translation, by Jacobo Tarrio.  Closes: #447928.
+  * Update Dutch debconf translation, by Bart Cornelis.  Closes: #448928.
+  * Add sh4/local-fpscr_values.diff and any/local-allocalim-header.diff
+    from Arthur Loiret.  Closes: #448248.
+  * Fix encoding of Japanese translation.  Closes: #447221.
+  * Add any/submitted-sched_h.diff: new patch to define `__CPU_ALLOC_SIZE.
+  * Add mips/local-setjmp.diff: new patch to fix g++ tests on mips/mipsel.
+  * Add any/local-fhs-nscd.diff: move nscd directory to /var/cache/nscd from
+    /var/db/nscd.  Closes: #449198.
+  * debhelper.in/nscd.postrm: remove /var/cache/nscd on purge.  Closes:
+    #449193.
+  * script.in/kernelcheck.sh, sysdeps/alpha.mk: bump minimum kernel version to
+    2.6.9 for alpha.
+  * script.in/kernelcheck.sh, sysdeps/sh4.mk: bump minimum kernel version to
+    2.6.11 for sh4.
+  * debian/patches/arm/local-eabi-wchar.diff: new patch from Riku Voipio to
+    fiw WCHAR_MIN and WCHAR_MAX definitions on armel.  Closes: #444580.
+  * debian/po/zh_CN.po: update from LI Daobing. Closes: #447866.
+  * debhelper.in/locales-all.postinst: trap exit signal and remove temporary
+    directory.  Closes: #447328.
+  * debhelper.in/libc.NEWS: mention that the tzconfig script has been replaced
+    by the maintainer scripts of tzdata.  Closes: bug#448796.
+  * patches/all/local-alias-et_EE.diff: switch estonian locales alias to
+    ISO-8859-15.
+  * patches/alpha/submitted-fpu-round.diff: restore the old version of
+    ceil/floor/rint functions.  Closes: #442568.
+  * patches/alpha/local-dl-procinfo.diff: new patch to add platform
+    capabilities support on alpha.
+  * Add an ev67 flavour on alpha:  Closes: #229251
+    - control.in/opt: add libc6-alphaev67 packages.
+    - sysdeps/alpha.mk: add a new pass for ev67 flavour.
+  * debian/local/manpages/iconv.1: document //translit and //ignore
+    options.  Closes: #451304.
+  * debian/local/manpages/getent.1: document exit codes.  Closes:
+    #445631.
+  * debian/local/manpages/ld.so.8: document $ORIGIN, $PLATFORM and $LIB
+    features.  Closes: #444145.
+  * local/manpages/ldconfig.8: remove --force option from the manpage
+    to be consistent with the binary.  Closes: #451958.
+  * kfreebsd/local-sysdeps.diff: update to revision 2046 (from glibc-bsd).
+
+  [ Petr Salinger]
+  * any/local-stdio-lock.diff: make _IO_*_lock linuxthreads compliant.
+  * any/local-o_cloexec.diff: don't assume O_CLOEXEC is always defined.
+  * any/local-linuxthreads-signals.diff: always use non-RT signal handler
+    on GNU/kFreeBSD.
+
+  [ Pierre Habouzit ]
+  * Remove any/local-iconv-fix-trampoline.diff (obsolete).
+  * Remove any/submitted-strfry.diff (merged).
+  * Update any/submitted-rfc3484-sortv4.diff.
+  * Update localedata/*first_weekday.diff.
+  * Remove localedata/fix-am_ET.diff (obsolete).
+  * Add locale/preprocessor-collate-uli-sucks.diff to revert Ulrich's
+    preprocessor that isn't enough for Debian.
+  * Update patches/locale/preprocessor-collate.diff.
+  * Add alpha/submitted-PTR_MANGLE.diff (Closes: #448508).
+
+  [ Samuel Thibault ]
+  * hurd-i386/submitted-ptr-mangle.diff: Define PTR_MANGLE for assembly.
+  * hurd-i386/cvs-O_CLOEXEC_fix.diff: New patch to fix conflicting O_CLOEXEC
+    value.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Fri, 23 Nov 2007 10:46:24 +0100
+
+glibc (2.6.1-6) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Update Spanish debconf translation, by Carlos Valdivia Yagüe.
+
+  [ Clint Adams ]
+  * debian/po/de.po: update from Helge Kreutzmann. closes: #442888.
+  * debian/po/cs.po: update from Miroslav Kure. closes: #442904.
+  * debian/po/it.po: update from Luca Monducci. closes: #443497.
+  * debian/po/ja.po: update from Kenshi Muto. closes: #446577.
+  * Add any/cvs-posix-glob.diff, fixing improper of treatment of \
+    in glob(). closes: #445210
+
+ -- Clint Adams <schizo@debian.org>  Sun, 14 Oct 2007 10:02:35 -0400
+
+glibc (2.6.1-5) unstable; urgency=low
+
+  [ Pierre Habouzit ]
+  * remove any/local-sysmacros.diff: sorry for bug #439859 but it makes gimp
+    (and presumably other software) FTBFS, it's too dispruptive.
+    Closes: #442427.
+
+  [ Clint Adams ]
+  * amd64/local-x86_64_bits_sigcontext.diff: use a copy of the generic header
+    for x86_64.  closes: #442418.
+
+ -- Clint Adams <schizo@debian.org>  Sun, 16 Sep 2007 14:42:17 -0400
+
+glibc (2.6.1-4) unstable; urgency=low
+
+  * Disable any/local-ipv6-lookup.diff as it is causing breakages.
+    Closes: bug#441857.
+  * any/local-sysmacros.diff: use __inline instead of inline for
+    compatibility with ANSI.  Closes: #441959.
+  * patches/localedata/tailor-iso14651_t1.diff: correctly fix fi_FI
+    locale.  Closes: bug#441026.
+  * debian/rules.d/debhelper.mk: fix regex.  Closes: #441824.
+  * Update French debconf translation, by Christian Perrier.  Closes:
+    #442101.
+  * any/submitted-regex-collate.diff: fix regex engine for multibyte
+    characters and C collation.  Closes: #441355.
+  * debian/local/manpages/locale-gen.8: fix manpage.  Closes: #442104.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 13 Sep 2007 17:05:17 +0200
+
+glibc (2.6.1-3) unstable; urgency=low
+
+  * sysdeps/amd64.mk: uses x86_64 headers also for the i486 flavour now
+    that they are compatible.
+  * sysdeps/i386.mk: uses x86_64 headers also for the main flavour.
+  * debian/local/etc_default/locale: remove.  Closes: bug#441360.
+  * sysdeps/*.mk: don't provide include symlink for bi-arch, but only
+    an empty directory.
+  * debian/rules.d/debhelper.mk: modify nscd/DEBIAN/control during build
+    to workaround a dpkg-shlibdeps bug.  Closes: bug#433723.
+  * debian/local/manpages/nscd.conf.5: document the persistent and shared
+    cache options.  Closes: bug#338504.
+  * patches/all/local-alias-UTF-8.diff: encode locales.alias in UTF-8.
+    Closes: bug#404433.
+  * debhelper.in/locales.links, debhelper.in/locales.install: move
+    locales.alias into /etc and provide a symlink in
+    /usr/share/locale/locale.alias.
+  * patches/localedata/tailor-iso14651_t1.diff: fix fi_FI locale.  Closes:
+    bug#441026.
+  * kfreebsd/local-sysdeps.diff: update to revision 1998 (from glibc-bsd).
+  * sysdeps/kfreebsd-amd64.mk: uses x86_64 headers also for the i486 flavour
+    now that they are compatible.
+  * any/local-sysmacros.diff: new patch to declare "major", "minor" and
+    "makedev" as inline function instead of macros.  Closes: #439859.
+  * debhelper.in/libc.postinst, debhelper.in/libc.templates: prompt user
+    with debconf if it is available.  Closes: #440964.
+  * debian/control.in/libc: suggests debconf | debconf-2.0.
+  * Update Brazilian Portuguese debconf translation, by Felipe Augusto van de
+    Wiel.
+  * Update Vietnamese debconf translation, by Clytie Siddall.
+  * Update Basque debconf translation, by Piarres Beobide.
+  * Update Swedish debconf translation, by Daniel Nylander.
+  * Update Slovak debconf translation, by Ivan Masár.
+  * Update Lithuanian debconf translation, by Gintautas Miliauskas.
+  * Update Russian debconf translation, by Sergey Alyoshin.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 11 Sep 2007 04:42:20 +0200
+
+glibc (2.6.1-2) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * Rename hurd-i386/submitted-lock-intern.diff into
+    hurd-i386/cvs-lock-intern.diff, hurd-i386/submitted-ECANCELED.diff
+    into hurd-i386/cvs-ECANCELED.diff and
+    hurd-i386/submitted-sigsuspend-nocancel.diff into
+    hurd-i386/cvs-sigsuspend-nocancel.diff as the patches have been accepted
+    upstream.
+  * hurd-i386/local-tls-support.diff: update to fix TLS leak in /hurd/exec
+    server.
+  * hurd-i386/cvs-ioctl-delay.diff: new patch to add standard *DLY ioctl macros.
+  * hurd-i386/submitted-IPV6_PKTINFO.diff: new patch to add standard
+    IPV6_PKTINFO macro.
+
+  [ Aurelien Jarno ]
+  * debian/rules.d/build.mk: disable testsuite on ARM machines running a
+    2.6.21 or 2.6.22 kernel.
+  * debian/debhelper.in/locales.{prerm,postinst}: look for supported.tar.lzma
+    instead of supported.tar.gz.
+  * debian/local/etc_default/devpts: remove.
+  * debian/local/etc_default/locale: new file.  Closes: bug#437404.
+  * debhelper.in/locales.install: install it.
+  * debian/local/manpages/locale.1: fix a typo.  Closes: bug#438114.
+  * kfreebsd/local-sysdeps.diff: update to revision 1995 (from glibc-bsd).
+  * any/submitted-rfc3484-sortv4.diff: new patch to allow bypassing RFC3484
+    rule 9 for IPv4 adresses.  Closes: bug#438179
+  * debian/debhelper.in/libc.preinst: change version check for NSS services to
+    (<< 2.6-1).
+  * debian/debhelper.in/libc.preinst: add proftpd to the list of services to
+    restart.  Closes: bug#435640.
+  * Bump shlibdeps version to 2.6.1-1 due to SPARC v9 transition.
+  * New Slovak debconf translation, by Ivan Masár.  Closes: bug#438576.
+  * any/local-ipv6-lookup.diff: new patch to do IPv6 lookups only when an
+    IPv6 address is configured. Patch by Tollef Fog Heen and Andrew McMillan.
+    Closes: #435646.
+
+  [ Pierre Habouzit ]
+  * Document new libc.conf in ld.so.conf.d that puts /usr/local/lib front.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon,  3 Sep 2007 18:15:37 +0200
+
+glibc (2.6.1-1) unstable; urgency=low
+
+  * New upstream version:
+    - Workaround bug in java's unwinder.  Closes: #434484.
+
+  [ Aurelien Jarno ]
+  * debian/copyright: update.
+  * Remove any/cvs-glibc-2_6-branch.diff (merged upstream).
+  * Remove any/cvs-printf_fp.c.diff (merged upstream).
+  * Remove sparc/submitted-gscope_flag.diff (merged upstream).
+  * Remove arm/cvs-gscope_flag.diff (merged upstream).
+  * Remove hppa/submitted-gscope_flag.diff (merged upstream).
+  * Remove mips/cvs-gscope_flag.diff (merged upstream).
+  * any/local-bindresvport_blacklist.diff: patch from openSUSE to
+    add support for /etc/bindresvport.blacklist.
+  * debian/local/etc/bindresvport.blacklist: new default configuration
+    file.
+  * debian/debhelper.in/libc.install: install it!
+  * debian/rules.d/debhelper.mk: fix arguments order when calling find.
+  * kfreebsd/local-sysdeps.diff: update to revision 1992 (from glibc-bsd).
+  * any/local-linuxthreads-gscope.diff: update for kfreebsd futexes.
+  * i386/local-linuxthreads-gscope.diff: update for kfreebsd futexes.
+  * amd64/local-linuxthreads-gscope.diff update for kfreebsd futexes.
+
+  [ Samuel Thibault ]
+  * hurd-i386/local-gscope.diff: resync, mostly merged upstream.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 07 Aug 2007 13:34:26 +0200
+
+glibc (2.6-5) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * mips/cvs-gscope_flag.diff: new patch to fix build on mips/mipsel.
+  * arm/cvs-gscope_flag.diff: new patch to fix build on arm/armel.
+  * any/cvs-initfini.diff: new patch from upstream to fix crti.o on
+    ppc64.  Closes: #434626.
+  * debian/sysdeps/powerpc.mk: build libc6-ppc64 with gcc-4.2.
+  * debian/sysdeps/alpha.mk: build with gcc-4.2.
+  * debian/control: Remove build-depend on gcc-4.1 on powerpc and alpha.
+  * sparc/submitted-gscope_flag.diff: update from upstream.
+  * hppa/submitted-gscope_flag.diff : new patch to fix build on hppa
+    with NPTL.
+  * any/local-linuxthreads-gscope.diff: new patch to add gscope support
+    to linuxthreads.
+  * hppa/local-linuxthreads-gscope.diff: new patch to fix build on hppa
+    with linuxthreads.  Closes: #434799.
+  * cvs-printf_fp.c.diff: new patch to print the correct number of digits
+    with %#g.
+  * amd64/local-linuxthreads-gscope.diff: new patch to fix build on *amd64
+    with linuxthreads.
+  * i386/local-linuxthreads-gscope.diff: new patch to fix build on *i386
+    with linuxthreads.
+  * kfreebsd/local-sysdeps.diff: update to revision 1989 (from glibc-bsd).
+  * any/submitted-longdouble.diff: patch from Carlos O'Donell to fix long
+    double tests.
+  * any/submitted-libgcc_s.so.diff: patch from Carlos O'Donell to allow
+    differents libgcc_s.so SONAME on architecture basis.
+  * hppa/submitted-fadvise64_64.diff: patch from Carlos O'Donell to add
+    support for fadvise64_64 syscall.
+  * debian/control: Simplify build-dependencies.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 29 Jul 2007 17:25:52 +0200
+
+glibc (2.6-4) unstable; urgency=low
+
+  [ Samuel Thibault ]
+  * sysdeps/hurd.mk (CC, BUILD_CC): Remove.
+  * control: Build-depend on gcc-4.2 on hurd-i386.
+
+  [ Pierre Habouzit ]
+  * any/cvs-glibc-2_6-branch.diff: upstream branch pull, includes:
+    + any/cvs-ld-integer-overflow.diff
+    + any/cvs-malloc.diff
+    + any/cvs-nis-nss-default.diff
+    + any/cvs-nscd-short-replies.diff
+    + any/cvs-vfscanf.diff
+
+  [ Aurelien Jarno ]
+  * debian/sysdeps/powerpc.mk: build libc6-ppc64 with gcc-4.1 as gcc-4.2
+    produces broken binaries.
+  * debian/control: Build-depend on gcc-4.1 on powerpc
+  * debian/control: Build-depend on g++-4.1/g++-4.2 and
+    g++-4.1-multilib/g++-4.2-multilib.
+  * debian/*.NEWS: move to debian/debhelper.in/*.NEWS.
+  * rules.d/debhelper.mk: remove debian/*.NEWS on clean.
+  * sparc/submitted-gscope_flag.diff: new patch to fix build on sparc.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 26 Jul 2007 08:57:48 +0200
+
+glibc (2.6-3) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * script.in/kernelcheck.sh: s/kernel_compare_version/linux_compare_versions/
+    for arm.
+  * script.in/kernelcheck.sh: the minimum kernel version is now 2.6.8 and not
+    2.6.1.  Closes: bug#432721.
+  * hppa/submitted-threaddb.diff: new patch from Randolph Chung to fix
+    debugging interface for NPTL on hppa.
+  * Drop SPARC V8 support:
+    - control.in/opt: drop libc6-sparcv9.
+    - sysdeps/sparc.mk: drop libc6-sparcv9.
+    - script.in/kernelcheck.sh: add check for SPARC V8 or earlier CPU.
+    - patches/series: disable sparc/submitted-timing.diff.
+    - patches/sparc/local-sparcv8-target.diff: rename to
+      local-sparcv9-target.diff and default to v9.
+  * Build with gcc-4.2 except on alpha (untested).
+  * patches/any/cvs-ld_library_path.diff: new patch from CVS to fix segfaults
+    with empty LD_LIBRARY_PATH variable.
+  * rules.d/build.mk: create /etc/ld.so.conf.d/libc.conf to add
+    /usr/local/lib as a default search path.  Closes: #395177.
+  * Honor parallel= option in DEB_BUILD_OPTIONS.  Closes: #413744.
+
+  [ Pierre Habouzit ]
+  * rules.d/debhelper.mk: add some magic to copy debian/bug/$pkg/ files into
+    /usr/share/bug/.
+  * add libc6-i386/presubj to document /usr/lib32 issues not being a
+    libc6-i386 problem.
+  * add locales/presubj about locales depends that are correct, and tell bug
+    reporters how to look for their package being built or not.
+  * add patches/any/local-missing-linux_types.h.diff to add missing
+    #include <linux/types.h> due to migration to linux-libc-dev.
+    Closes: #433962.
+
+  [ Samuel Thibault ]
+  * hurd-i386/local-tls-support.diff: new patch to support TLS.
+  * debian/sysdeps/hurd.mk (libc_extra_config_options): Removed
+    --without-__thread, --without-tls and libc_cv_z_relro=no.
+  * hurd-i386/local-atomic-no-multiple_threads.diff: new patch, hurd-i386
+    doesn't need the multiple_threads field.
+  * hurd-i386/local-gscope.diff: new patch, backport of the CVS global scope.
+  * hurd-i386/local-no-strerror_l.diff: new patch to disable non-implemented
+    strerror_l().
+  * hurd-i386/submitted-lock-intern.diff: new patch to fix a header inclusion.
+  * sysdeps/depflags.pl: make libc0.3 depend on TLS-enabled hurd packages.
+  * hurd-i386/local-sigsuspend-nocancel.diff: renamed into
+    submitted-sigsuspend-nocancel.diff.
+  * hurd-i386/submitted-ECANCELED.diff: new patch to fix ECANCELED value.
+    Closes: #396135.
+  * hurd-i386/local-gcc-4.1-init-first.diff: New patch by Thomas
+    Schwinge to fix building with gcc-4.1.
+  * sysdeps/hurd.mk (CC, BUILD_CC): Change to gcc-4.1.
+  * control: Depend on gcc-4.1 on hurd-i386.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 23 Jul 2007 08:01:26 +0200
+
+glibc (2.6-2) unstable; urgency=low
+
+  [ Clint Adams ]
+  * Add any/cvs-nis-nss-default.diff: preserve errno.
+  * Add any/cvs-vfscanf.diff: add additional test for EOF
+    in loop to look for conversion specifier to avoid testing of
+    wrong errno value.
+
+  [ Aurelien Jarno ]
+  * Add any/cvs-ld-integer-overflow.diff: fix an integer
+    overflow in ld.so.  Closes: bug#431858.
+  * hppa/submitted-multiple-threads.diff: new patch to fix an FTBFS on
+    hppa.  Closes: bug#428509, bug#429487.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 10 Jul 2007 09:17:49 +0200
+
+glibc (2.6-1) unstable; urgency=low
+
+  [ Pierre Habouzit ]
+  [ Clint Adams]
+  * New upstream version.
+   - Remove locale/iso3166-RS.diff (obsolete).
+   - Remove locale/fix-exhausted-memory.diff (merged upstream).
+   - Update locale/LC_COLLATE-keywords-ordering.diff.
+   - Remove localedata/locale-hy_AM.diff (obsolete).
+   - Remove localedata/locale-pl_PL.diff (merged upstream).
+   - Remove localedata/locales-sr.diff (obsolete).
+   - Update localedata/tailor-iso14651_t1.diff.
+   - Update localedata/first_weekday.diff.
+   - Remove alpha/cvs-cfi.diff (merged upstream).
+   - Remove arm/cvs-check_pf.c (merged upstream).
+   - Remove hppa/cvs-hppa-update.diff (obsolete).
+   - Update hppa/submitted-nptl-carlos.diff from "upstream".
+   - Remove hppa/submitted-nptl-carlos2.diff (merged upstream).
+   - Remove hppa/local-r19use.diff (merged upstream).
+   - Remove hurd-i386/cvs-futimes.diff (merged upstream).
+   - Remove m68k/cvs-m68k-update.diff (obsolete).
+   - Update m68k/local-mathinline_h.diff.
+   - Remove mips/cvs-ldsodefs_h.diff (merged upstream).
+   - Remove mips/submitted-msq.diff (merged upstream).
+   - Remove all/cvs-iconv-E13B.diff (obsolete).
+   - Remove all/submitted-new-brf-encoding.diff (merged upstream).
+   - Remove any/cvs-2.5-branch-update.diff (obsolete).
+   - Remove any/cvs-pow.diff (obsolete).
+   - Remove any/cvs-printf_fp-c.diff (obsolete).
+   - Remove any/cvs-ftw-c.diff (obsolete).
+   - Remove any/cvs-bits_in_h-ipv6.diff (obsolete).
+   - Remove any/cvs-itoa-c.diff (obsolete).
+   - Remove any/cvs-lt-update.diff (obsolete).
+   - Remove any/cvs-realpath.diff (obsolete).
+   - Remove any/cvs-vfprintf-stack-smashing.diff (obsolete).
+   - Remove any/cvs-zdump-64-bit.diff (obsolete).
+   - Update any/local-ldso-disable-hwcap.diff.
+   - Remove any/submitted-gethostbyname_r.diff (obsolete).
+   - Remove any/submitted-iconv-colon.diff (merged upstream).
+   - Update any/submitted-strfry.diff.
+   - Remove any/submitted-unistd_XOPEN_VERSION.diff (obsolete).
+   - Remove any/cvs-glob-c.diff (obsolete).
+   - Remove any/cvs-scanf_hexfloat.diff (obsolete).
+   - Remove alpha/submitted-sigsuspend.diff (merged upstream).
+   - Remove arm/cvs-procinfo-eabi.diff (obsolete).
+  * debian/sysdeps/depflags.pl: Clean out relationships for packages
+    that do not exist in sarge or later.
+  * debian/debhelper.in/libc.install: do not hardcode the glibc
+    version number in the path to gai.conf.
+  * debian/control.in/main, debian/sysdeps/depflags.pl:
+    use linux-libc-dev on all linux architectures, and
+    remove all references to linux-kernel-headers.
+  * Bump shlibdeps version to 2.6-1 due to sync_file_range, futimens,
+    utimensat, __sched_cpucount, sched_getcpu, strerror_l, and
+    epoll_pwait symbols.
+  * debian/rules.d/build.mk: pass --enable-profile to configure.
+
+  [ Aurelien Jarno ]
+  * patches/sparc/local-undefined-registers.diff: new file to ignore
+    global registers while looking for undefined symbols.
+  * debian/script.in/kernelcheck.sh: add a warning for FreeBSD kernels
+    5.X.
+  * local/etc_init.d/glibc.sh, debhelper.in/libc.preinst: don't check for
+    linux kernel, it is now done in script.in/kernelcheck.sh.
+  * patches/any/cvs-malloc.diff: new patch from upstream to fix malloc ABI.
+  * patches/any/local-linuxthreads-lowlevellock.diff: new patch to support
+    low level locking on linuxthreads.
+  * patches/any/local-linuxthreads-fatalprepare.diff: new patch to support
+    FATAL_PREPARE on linuxthreads, by not using __libc_pthread_functions_init
+    and PTHFCT_CALL.
+  * patches/hppa/local-linuxthreads.diff: new patch to get glibc buildable on
+    hppa with linuxthreads.
+  * patches/arm/submitted-RTLD_SINGLE_THREAD_P.diff: fix a missing #defined
+    on arm.
+  * patches/localedata/submitted-as_IN.diff: new patch to fix a not anymore
+    unassigned unicode code.
+  * locales-depver: tighten locales dependencies.
+  * debian/sysdeps/linux.mk, debian/script.in/kernelcheck.sh: bump minimum
+    kernel requirement to 2.6.8.
+  * debian/rules, debian/rules.d/build.mk, debian/sysdeps/*.mk: also defines
+    CXX as g++ is used in the testsuite.
+
+  [ Petr Salinger]
+  * kfreebsd/local-sysdeps.diff: update to revision 1949 (from glibc-bsd).
+  * any/local-linuxthreads-defines.diff: new patch to restore a few defines
+    in config.make.in still needed by linuxthreads.
+  * patches/local-tst-mktime2.diff: fix time/tst-mktime2.c.
+
+  [ Pierre Habouzit ]
+  * kernelchecks.sh: Make the warning about kernel 2.6 more explicit so that
+    people can deal with it without adding yet-another critical bug on the
+    glibc.
+  * kernelchecks.sh: add some quotes to unconfuse syntax hilighting a bit.
+  * nscd.init: ksh is confused if you call functions start or stop.
+    Closes: 428884.
+  * patches/locale/preprocessor-collate.diff: update it to work (with
+    restrictions) with depth >= 2 copies. The patch is scurvy and make locale
+    parsing completely non reentrant.
+  * debian/control: ${Source-Version} -> ${binary:Version}.
+  * debian/debhelper.in/nscd.lintian: yes, /var/db for lintian is ok.
+  * patches/any/submitted-fileops-and-signals.diff: fixes libio file
+    operations in presence of recoverable errors.
+    Closes: 429021.
+  * patches/localedata/fix-am_ET.diff: fix am_ET using our preprocessor
+    extensions.
+
+  [ Samuel Thibault ]
+  * Remove patches/hurd-i386/cvs-getsid.diff (merged upstream).
+  * patches/hurd-i386/submitted-ioctl-unsigned-size_t.diff: new patch to fix
+    some packages that use unsigned or size_t in ioctls.
+    Closes: 431365.
+
+ -- Clint Adams <schizo@debian.org>  Sat, 07 Jul 2007 09:43:02 -0400
+
+glibc (2.5-11) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * patches/hppa/submitted-pie.diff: new patch to fix PIE on hppa. Patch by
+    Sébastien Bernard and John David Anglin.  Closes: #427990.
+  * debian/debhelper.in/libc.preinst: use -e instead of -f to canonicalize
+    links.  Closes: #427416.
+
+  [ Pierre Habouzit ]
+  * pass -X/usr/lib/debug to dh_makeshlibs so that libc6-dbg gets no useless
+    shlibs.  Closes: #427637.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 11 Jun 2007 15:06:21 +0200
+
+glibc (2.5-10) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * kfreebsd/local-sysdeps.diff: update to revision 1942 (from glibc-bsd).
+    Thanks to Petr Salinger.
+  * arm/cvs-procinfo-eabi.diff: patch from CVS to not include asm/procinfo.h.
+  * any/submitted-strtok.diff: new patch to fix a typo in strings/strtok.c.
+    Closes: #426118.
+  * debian/sysdeps/depflags.pl: depends on libgcc1/libgcc2/libgcc4.
+  * any/cvs-nscd-short-replies.diff: new patch from CVS to fix crash on
+    short replies.
+  * sysdeps/depflags.mk, sysdeps/depflags.pl: use DEB_HOST_ARCH_OS and
+    DEB_HOST_ARCH instead of DEB_HOST_GNU_SYSTEM and DEB_HOST_GNU_TYPE.
+  * debian/sysdeps/arm.mk, debian/script.in/kernelcheck.sh: bump minimum
+    kernel requirement to 2.6.12 on arm to get __ARM_NR_set_tls syscall.
+    Closes: #421037.
+  * debian/sysdeps/armel.mk: bump minimum kernel requirement to 2.6.14
+    on armel.
+  * patches/series: disable any/local-ldconfig-timestamps.diff as this
+    patch does not take into account sub-directories.
+
+  [ Clint Adams ]
+  * debian/local/manpages/ld.so.8: quote accepted values for LD_DEBUG.
+    closes: #426101.
+  * New Malayalam debconf translation, by Sajeev പിആര്‍.
+    closes: #426203.
+  * Update Vietnamese debconf translation, by Clytie Siddall.
+    closes: #426824.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 03 Jun 2007 19:01:50 +0200
+
+glibc (2.5-9) unstable; urgency=low
+
+  * debian/patches/arm/local-ioperm.diff: Remove the check
+    involving LINUX_VERSION_CODE.
+  * debian/patches/hppa/submitted-atomic_h.diff: update to loop again
+    when the kernel returns -EDEADLOCK.  Workaround: #425567.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 22 May 2007 17:03:23 +0200
+
+glibc (2.5-8) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * debian/sysdeps/depflags.pl: Add a conflicts on binutils
+    (<< 2.17cvs20070426-1) for libc-dev.  Closes: #422625.
+
+  [ Clint Adams ]
+  * debian/sysdeps/depflags.pl: Clean out relationships for packages
+    that do not exist in sarge or later.
+  * debian/debhelper.in/libc.install: do not hardcode the glibc
+    version number in the path to gai.conf.
+  * debian/control.in/main, debian/sysdeps/depflags.pl:
+    use linux-libc-dev to build on all linux architectures.
+    (retain Depends alternative on linux-kernel-headers)
+
+  [ Aurelien Jarno ]
+  * debian/local/etc_init.d/glibc.sh: fix a typo.  Closes: #423870.
+  * debian/patches/hppa/submitted-atomic_h.diff: new patch to fix the
+    atomic CAS function on hppa.  Closes: #424057.
+  * debian/control.in/main: unify the gcc-4.1 depends to (>= 4.1.2-6).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 20 May 2007 03:43:09 +0200
+
+glibc (2.5-7) unstable; urgency=low
+
+  * debian/sysdeps/i386.mk: switch from --includir= to amd64_includedir.
+  * debian/local/etc_init.d/glibc.sh: fix the broken comment.  Closes:
+    #422587.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 07 May 2007 11:45:41 +0200
+
+glibc (2.5-6) unstable; urgency=low
+
+  * patches/any/cvs-vfprintf-stack-smashing.diff: new patch from
+    upstream (fix enormous alloca triggered with %-X.Ys like formats
+    specifier, with Y big, and in multi-byte locales). Closes: #380195,
+    #421555.
+  * patches/hppa/cvs-hppa-update.diff: update from CVS to fix
+    bits/pthreadtypes.h on hppa.
+  * patches/any/local-disable-nscd-host-caching.diff: the comment lines
+    should have the '#' on the first column.  Closes: #421882.
+  * Remove patches/any/local-Rminkernel.diff (not needed anymore).
+  * debian/patches/hppa/submitted-ustat.diff: new patch from Jeff Bailey
+    to makes glibc build with exported kernel headers.
+  * debian/patches/hppa/submitted-nptl-carlos2.diff: new patch to add
+    STACK_GROWS_UP case to NPTL.
+  * debian/patches/hppa/local-r19use.diff: new patch from Carlos O'Donell
+    (specify r19 as input to asms that save/restore).
+  * debian/patches/alpha/cvs-cfi.diff: new patch from CVS (fix
+    cfi instructions in sysdep-cancel.h).  Closes: #422067.
+  * debian/sysdeps/kfreebsd-i386.mk: tune for i686.
+  * debian/sysdeps/i386.mk: drop i386-linux-gnu compat symlinks, all the
+    toolchain is now using i486-linux-gnu.
+  * Merge from multiarch tree:
+    - debian/rules: define localedir, sysconfdir and rootsbindir.
+    - debian/rules.d/build.mk: use $(localedir), $(sysconfdir) and
+      $(rootsbindir) instead of hardcoded values. Make includedir
+      flavour specific.
+    - debian/sysdeps/amd64.mk: define i386_includedir.
+    - debian/sysdeps/powerpc.mk: define ppc64_includedir.
+    - debian/sysdeps/ppc64.mk: define powerpc_includedir.
+    - debian/sysdeps/s390.mk: define s390x_includedir.
+    - debian/sysdeps/kfreebsd-amd64.mk: define i386_includedir.
+    - debian/sysdeps/sparc.mk: define sparc64_includedir.
+  * debian/control.in/main: build-depends on gcc-4.1.2 (>= 4.1.2-6) on
+    hppa.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 07 May 2007 03:27:10 +0200
+
+glibc (2.5-5) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Rename patches/all/submitted-iconv-E13B.diff into
+    patches/all/cvs-iconv-E13B.diff as the patch has been accepted
+    upstream.
+  * debian/debhelper.in/libc.NEWS: new file to warn user to upgrade
+    to a 2.6.1 or later kernel before upgrading the glibc.
+  * debian/script.in/kernelcheck.sh: improve the kernel error message.
+  * New Tamil debconf translation, by Tirumurti Vasudevan.  Closes:
+    #420755.
+  * script.in/nohwcap.sh: use sed instead of awk.  Closes: #420799.
+  * Update Catalan debconf translation, by Jordà Polo.  Closes: #420835.
+  * Add support for n32 and 64 ABIs on mips and mipsel, but keep it
+    disabled for now:
+    - control.in/main: add libc6-dev-mipsn32, libc6-dev-mips64 to the
+      build-dependencies.
+    - control.in/mips64: add libc6-mips64 and libc6-dev-mips64 packages.
+    - control.in/mipsn32: add libc6-mipsn32 and libc6-dev-mipsn32 packages.
+    - rules.d/control.mk: use control.in/mips64 and control.in/mipsn32.
+    - sysdeps/mips.mk: add two new passes for n32 and 64 ABIs.
+    - sysdeps/mipsel.mk: likewise.
+  * debian/control.in/main: drop build-depends on libssp32 and libssp64,
+    build-depends on gcc-4.1 (>= 4.1.2-5) instead. Drop build-conflicts
+    on gcc-4.1 (= 4.1.1-14). Closes: #413370.
+  * debian/sysdeps/hppa.mk: switch back to gcc-4.1.
+  * debian/debhelper.in/libc.preinst: add a check for silly users having
+    LD_ASSUME_KERNEL=2.4.1 in their /etc/profile, ~/.bashrc or shell
+    init script.
+  * debian/control.in/main: build depends on binutils (>= 2.17cvs20070426-1).
+    Closes: #405738.
+  * debian/shlibver: bump shlib to 2.5-5 for the transition to
+    hash-style=gnu.
+  * debian/control.in/main: build depends on gcc-4.1-multilib on bi-arch
+    architectures.
+  * control.in/amd64, control.in/i386, control.in/kfreebsd-i386,
+    control.in/mipsn32, control.in/mips64, control.in/powerpc,
+    control.in/ppc64,  control.in/s390x, control.in/sparc64: drop the
+    depends on lib32gcc1/lib64gcc1. Recommends gcc-multilib.
+  * debhelper.in/libc.postint: remove the version check when creating
+    ld.so.conf.  Closes: #420726.
+
+  [ Michael Banck ]
+  * patches/hurd-i386/local-dl-dynamic-weak.diff: new patch (turn
+    _dl_dynamic_weak on by default for hurd-i386).
+
+  [ Pierre Habouzit ]
+  * nscd.init:
+     + use nscd --shutdown rather than start-stop-daemon to stop nscd more
+       gracefuly. Closes: #338507.
+     + also invalidate hosts on reload.
+     + drop oldies (nscd_nischeck things, does not exists anymore).
+  * patches/any/cvs-scanf_hexfloat.diff: fix a bug when parsing a float in
+    hexadicimal form with no exponent. Closes: #166403.
+  * disable hosts caching in nscd by default as it breaks gethostby* calls
+    (does not respect DNS TTLs, see #335476):
+     + document it in nscd.NEWS.Debian.
+     + patches/any/local-disable-nscd-host-caching.diff: update nscd.conf.
+
+  [ Clint Adams ]
+  * Switch from linux-kernel-headers to linux-libc-dev | linux-kernel-headers.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 30 Apr 2007 21:55:09 +0200
+
+glibc (2.5-4) unstable; urgency=low
+
+  * debian/rules.d/build.mk: fix the testsuite workaround on the MIPS SB1
+    platform.
+  * debian/locales-all.README.Debian: Remove again, it is useless now.
+    (Closes: #378191)
+  * debhelper.in/libc.preinst: use dpkg-query instead of looking into
+    /var/lib/dpkg/info. Thanks to Guillem Jover for the hint.
+  * patches/mips/cvs-ldsodefs_h.diff: new patch (correct multiple
+    inclusion guard in sysdeps/mips/ldsodefs.h) from CVS.
+  * patches/any/cvs-printf_fp-c.diff: update patch from CVS (fix exponent
+    -4 special case handling when wcp == wstartp + 1).  Closes: #419225.
+  * patches/any/cvs-bits_in_h-ipv6.diff: new patch from CVS (defines
+    IPV6_V6ONLY in bits/in.h).  Closes: #420188.
+  * debhelper.in/libc.preinst: check the library files instead of links
+    while checking for a non-dpkg owned libc6 in /lib/tls. Links are
+    recreated by ldconfig.
+  * patches/any/cvs-realpath.diff: new patch (fix wrong comment about
+    realpath() in /usr/include/stdlib) from CVS.  Closes: #239427.
+  * debian/local/manpages/iconv.1: mention that -t is optional.  Closes:
+    #354292.
+  * debian/local/manpages/iconv.1: mention that multiple fils could be
+    specified on the command line.  Closes: #340911.
+  * debian/patches/any/submitted-strfry.diff: new patch (fix strfry()
+    distribution) by Steinar H. Gunderson.  Closes: #341903.
+  * patches/all/submitted-iconv-E13B.diff: new patch to fix wrong E13B
+    charset alias. patches/any/submitted-iconv-colon.diff: new patch to
+    allow colons in charset names.  Closes: #91935.
+  * New Hungarian debconf translation, by Attila Szervác.  Closes: #420420.
+  * debian/patches/any/local-ldd.diff: update to discard the error message
+    that appears if one of the dynamic loader is not supported by the
+    kernel.  Closes: #263494.
+  * debian/patches/arm/cvs-check_pf.c: new patch (fix assertion in
+    check_pf.c) from CVS.  Closes: #420552.
+  * debian/debhelper.in/glibc-doc.links: add missing manpages links for
+    functions documented with others.  Closes: #413989.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 23 Apr 2007 11:41:18 +0200
+
+glibc (2.5-3) unstable; urgency=low
+
+  [ Pierre Habouzit ]
+  * patches/any/submitted-unistd_XOPEN_VERSION.diff: set _XOPEN_VERSION to 600
+    when __USE_XOPEN2K is set. Closes: #203412.
+  * patches/any/cvs-glob-c.diff: fixes glob wrt \/ escapes (among other
+    fixes). Closes: #234880.
+
+  [ Aurelien Jarno ]
+  * Update Italian debconf translation, by Luca Monducci.  Closes: #419399.
+  * Put back ld.so into optimized packages, it can be useful in some cases.
+  * Update French debconf translation, by Christian Perrier.  Closes: #419445.
+  * Switch from gzip to lzma for compressing the locales in the locales-all
+    package. The unpacked size is decreased by 10 and the packed size by 4 for
+    no measurable difference on the unpacking time.
+  * patches/any/submitted-gethostbyname_r.diff: new patch to fix unaligned
+    memory access in gethostbyname_r.diff().  Closes: #419459.
+  * Rewrite from scratch /etc/ld.so.nohwcap handling.  Closes: #419036
+    - script.in/nohwcap.sh: new snipplet to check dpkg and handle
+      /etc/ld.so.nohwcap
+    - rules.d/debhelper.mk: replace NOHWCAP with nohwcap.sh in debhelper
+      scripts
+    - debhelper.in/libc.preinst: only touch /etc/ld.so.nohwcap
+    - debhelper.in/libc.postinst: replace the old code with NOHWCAP,
+      add code to remove /etc/ld.so.hwcappkgs file on upgrade
+    - debhelper.in/libc-otherbuild.postrm: replace the old code with NOHWCAP
+    - debhelper.in/libc-otherbuild.postinst: ditto
+    - debhelper.in/libc-otherbuild.preinst: remove
+  * debhelper.in/libc.install: remove /usr/bin/lddlibc4 from the libc6
+    package.
+  * debhelper.in/libc.preinst: check for a non-dpkg owned libc6 in /lib/tls.
+    Closes: #419189.
+  * Update Dutch debconf translation, by Bart Cornelis.  Closes: #419729.
+  * debhelper.in/libc.postinst: fix the chroot detection, code taken from
+    udev scripts.
+  * debian/rules.d/build.mk: disable testsuite on the MIPS SB1 platform.
+  * patches/localedata/first_weekday.diff: Add first_workday for *_NO
+    and *_DK. Closes: #379100.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 19 Apr 2007 07:55:58 +0200
+
+glibc (2.5-2) unstable; urgency=low
+
+  * Update Portuguese debconf translation, by Ricardo Silva.  Closes: #418301,
+    #418472.
+  * Update Brazilian Portuguese debconf translation, by Felipe Augusto van de
+    Wiel.  Closes: #418332.
+  * Update Romanian debconf translation, by Stan Ioan-Eugen.  Closes: #418337.
+  * Update Turkish debconf translation, by Erçin Eker.  Closes: #418340.
+  * Update Galician debconf translation, by Jacobo Tarrio.  Closes: #418365.
+  * Update Arabic debconf translation, by Ossama Khayat.  Closes: #418378.
+  * Update German debconf translation, by Helge Kreutzmann.  Closes: #418426.
+  * Update Basque debconf translation, by Piarres Beobide.  Closes: #418521.
+  * Update Swedish debconf translation, by Daniel Nylander.  Closes: #418545.
+  * Update Spanish debconf translation, by Carlos Valdivia Yagüe.  Closes:
+    #418720.
+  * Update Russian debconf translation, by Yuri Kozlov.  Closes: #418748.
+  * Update Czech debconf translation, by Miroslav Kure.  Closes: #418767.
+  * debian/locales-depver: remove exp from the locales version.
+  * Replace patches/alpha/submitted-sigsuspend.diff by
+    patches/alpha/cvs-sigsuspend.diff from upstream.
+  * patches/any/local-ldconfig-fsync.diff: call fsync() before closing
+    /etc/ld.so.cache.  Closes: #416716.
+  * Update Korean debconf translation, by Sunjae Park.  Closes: #418872.
+  * patches/any/local-notls.diff: also include pthread.h from
+    linuxthreads/sysdeps/pthread/gai_misc.h.
+    m68k/cvs-m68k-update.diff: update from CVS.  Closes: #418881.
+  * debian/local/usr_sbin/tzconfig: removed.
+  * debian/local/manpages/tzconfig.8: removed.
+  * debian/sysdeps/depflags.pl: conflict with tzdata (<< 2007e-2). Older
+    versions need tzconfig.
+  * patches/any/cvs-printf_fp-c.diff: update patch from CVS (fix exponent
+    -4 special case handling when wcp == wstartp + 1).  Closes: #419225.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 14 Apr 2007 17:23:17 +0200
+
+glibc (2.5-1) unstable; urgency=low
+
+  * New upstream version 2.5.
+    - Adds support of POSIX_MADV_* on mips, mipsel, arm and hppa.  Closes:
+      #381294.
+    - Fixes a pointer-to-long overflow in sunrpc code. Closes: #389084.
+    - Fixes getent wrt ipv4 hosts lookups. Closes: #347358.
+    - Fixes strtod wrt hex floats with negative exponent. Closes: #172562.
+    - Fixes nice() errno when called without appropriate privileges.  Closes:
+      #286825.
+    - Provides sys/inotify.h. Closes: #369402.
+    - Fixes strtod("INF") with some locales. Closes: #415417.
+
+  [ Aurelien Jarno ]
+  * debian/shlibver: Bump up to 2.5.
+  * debian/copyright: update.
+  * Remove locale/cvs-iso3166.diff (merged upstream).
+  * Remove localedata/locale-ro_RO.diff (merged upstream).
+  * Remove arm/cvs-portshead.patch (merged upstream).
+  * Remove arm/local-dwarf2-buildfix.diff (merged upstream).
+  * Remove hppa/cvs-clone.patch (merged upstream).
+  * Remove hppa/cvs-portshead.diff (merged upstream).
+  * Remove hppa/submitted-drop-utimes.diff (merged upstream).
+  * Remove hurd-i386/cvs-machrules-make.diff (merged upstream).
+  * Remove mips/cvs-fork.diff (merged upstream).
+  * Remove mips/cvs-resource.diff (merged upstream).
+  * Remove powerpc/cvs-procfs.diff (merged upstream).
+  * Remove any/cvs-argp_h.diff (merged upstream).
+  * Remove any/cvs-getcwd_c.diff (merged upstream).
+  * Remove any/cvs-sysctl.diff (merged upstream).
+  * Remove any/cvs-thread_signals.diff (merged upstream).
+  * Remove any/cvs-uio_h.diff (merged upstream).
+  * Remove any/cvs-sunrpc-xdrmem_setpos.diff (merged upstream).
+  * Remove any/cvs-getent-wrong-struct-size.diff (merged upstream).
+  * Remove any/submitted-strfmon.diff (merged upstream).
+  * Remove all/submitted-uninitialized-byte-LC_CTYPE.diff (merged upstream).
+  * Remove any/local-ttyname-devfs.diff (devfs is not supported anymore).
+  * Update arm/local-no-hwcap.diff.
+  * Update any/local-ldso-disable-hwcap.diff.
+  * Update all/submitted-new-brf-encoding.diff.
+  * debhelper.in/libc.docs: remove INTERFACE as it has been removed upstream.
+  * sysdeps/depflags.pl: don't make libc6 depends on tzdata, as this package
+    is of priority required. Should help to debconfize tzdata.
+  * sysdeps/i386.mk: put the static Xen libc flavour in /usr/lib/xen.  Closes:
+    #391372.
+  * sysdeps/powerpc.mk: install 64-bit headers (actually gnu/stubs-64.h)
+    directly into /usr/include and provide /usr/include/powerpc64-linux-gnu as
+    a symlink to /usr/include for compatibility reasons.  Closes: #391858.
+  * sysdeps/ppc64.mk: install 32-bit headers (actually gnu/stubs-32.h)
+    directly into /usr/include and provide /usr/include/powerpc-linux-gnu as
+    a symlink to /usr/include for compatibility reasons.
+  * kfreebsd/local-scripts.diff: update.
+  * kfreebsd/local-sys_queue_h.diff: update.
+  * kfreebsd/local-sysdeps.diff: update to revision 1689 (from glibc-bsd).
+  * kfreebsd/local-sysdeps-2.4.diff: remove.
+  * sysdeps/kfreebsd: enable the ports add-on.
+  * sysdeps/kfreebsd-i386.mk: ditto.
+  * any/local-stubs_h.diff: new patch to fix a warning in stubs.h.  Closes:
+    #394128.
+  * alpha/submitted-sigsuspend.diff: new patch (fix the build on alpha) from
+    the libc-alpha mailing list.
+  * debian/local/manpages/*: fix typos.  Closes: #395427.
+  * debian/debhelper.in/libc.dirs: don't provide /sys, now provided by
+    initscripts.
+  * debian/debhelper.in/nscd.init: add lsb header.
+  * debian/rules.d/debhelper.mk: add support for installing lintian and linda
+    overrides files.
+  * debian/debhelper.in/libc.overrides: new file.
+  * debian/debhelper.in/libc-dev.overrides: new file.
+  * debian/debhelper.in/libc-alt.overrides: new file.
+  * debian/debhelper.in/libc-otherbuild.overrides: new file.
+  * debian/debhelper.in/libc-dev-otherbuild.overrides: new file.
+  * debian/any/submitted-getcwd-sys_param_h.diff: new patch (fix the build
+    with linuxthreads) from the libc-alpha mailing list.
+  * debian/powerpc/cvs-tls-debug.diff: new patch (fix for debugging
+    thread-local variables on powerpc) from CVS.
+  * Build depends on gcc-4.2 on hppa to enable TLS on hppa.  Closes: #397813.
+  * debian/patches/hppa/cvs-hppa-update.diff: new patch (CVS update).
+  * debian/sysdeps/hppa.mk, debian/script.in/kernelcheck.sh: bump minimum
+    kernel requirement to 2.6.9 on hppa to get LWS CAS support.
+  * debian/any/patches/local-linuxthreads-semaphore_h.diff: new patch (fix
+    /usr/include/semaphore.h with linuxthreads).
+  * sysdeps/sparc.mk: install 64-bit headers (actually gnu/stubs-64.h)
+    directly into /usr/include and provide /usr/include/sparc64-linux-gnu as
+    a symlink to /usr/include for compatibility reasons.  Closes: #403980.
+  * sysdeps/*.mk: build with -g instead of -g1.  Closes: bug#403270.
+  * debhelper.in/libc.install: install gai.conf in /etc.  Closes: #404379.
+  * Add patches/any/local-ldconfig-timestamps.diff (use the timestamps to
+    update the cache only when needed) by Josselin Mouette.  Closes: #374945.
+  * Add partial support for armel, from http://armel-debs.applieddata.net/diffs/.
+  * debian/debhelper.in/: delete /usr/doc removal from postinst scripts.
+  * debian/control.in: drop the dependency on tzdata. It is a required package
+    and the glibc from Etch depends on it, ensuring tzdata is always present
+    post-Etch.
+  * debian/script.in/kernelcheck.sh, debian/sysdeps/linux.mk: set the minimum
+    kernel version to 2.6.1, except on m68k where it is set to 2.4.1.
+  * patches/any/cvs-2.5-branch-update.diff: new patch (2.5 branch update) from
+    upstream CVS.
+  * patches/any/cvs-lt-update.diff: new patch (linuxthreads update) from
+    upstream CVS.
+  * debhelper.in/locales.templates: recommends UTF-8 locales by default.
+    Closes: #312927.
+  * control.in/main, rules.d/debhelper.mk: use dh_shlibdeps to set the
+    dependencies of nscd.  Closes: #409288.
+  * sysdeps/s390.mk: install 64-bit headers (actually gnu/stubs-64.h)
+    directly into /usr/include and provide /usr/include/s390x-linux-gnu as
+    a symlink to /usr/include for compatibility reasons.
+  * patches/all/local-pthread-manpages.diff: update to fix a typo in
+    pthread_detach(3).  Closes: #98852.
+  * Change any/local-__thread.diff into any/local-notls.diff.
+  * Update any/local-notls.diff (make glibc buildable without TLS support)
+    from Petr Salinger and Aurelien Jarno.
+  * hurd-i386/submitted-trivia.diff: new patch from Thomas Schwinge (make glibc
+    partly buildable on Hurd).
+  * hurd-i386/submitted-stat.diff: new patch from Thomas Schwinge (update
+    struct stat on Hurd).
+  * hurd-i386/submitted-libc_once.diff: new patch from Thomas Schwinge (add
+    __libc_once_else to make glibc buildable on Hurd).
+  * hurd-i386/local-msg-nosignal.diff: new patch from Thomas Schwinge
+    (workaround the missing MSG_NOSIGNAL support).
+  * m68k/cvs-m68k-update.diff: new patch (bits from CVS).  Closes: #364098.
+  * any/submitted-clock-settime.diff: new patch (include <time.h> to get
+    clockid_t).
+  * hurd-i386/local-sigsuspend-nocancel.diff: new patch (workaround missing
+    sigsuspend_not_cancel() on Hurd).
+  * debhelper.in/glibc-doc.links: add symlinks from pthread_setcanceltype(3),
+    pthread_setcancelstate(3) and pthread_testcancel(3) to pthread_cancel(3).
+    Closes: #411132.
+  * debian/control.in/i386: Changed the conflicts on ia32-libs-dev to a
+    versioned conflict.  Closes: #407540.
+  * any/local-mktemp.diff: new patch (also propose mkdtemp as an alternative
+    to mktemp).  Closes: #377310.
+  * any/cvs-ftw-c.diff: new patch (fix nftw() with FTW_CHDIR in /) from CVS.
+    Closes: #367522.
+  * any/cvs-printf_fp-c.diff: new patch (fix printf %#.0g) from CVS.
+    Closes: #209136.
+  * New Norwegian bokmål debconf translation, by Bjørn Steensrud.  Closes:
+    #412559.
+  * Remove patches/arm/local-softfloat.diff and patches/series.arm-softfloat.
+    Remove arm-softfloat from debian/rules.d/control.mk. armel (ARM EABI)
+    replaces the softfloat architecture.
+  * patches/any/cvs-pow.diff: new patch (fix pow(-inf, nan)) from upstream.
+    Closes: #226291.
+  * Update Catalan debconf translation, by Jordà Polo.  Closes: #413259.
+
+  [ Denis Barbier ]
+  * Remove localedata/locale-en_NZ.diff (merged upstream).
+  * Remove localedata/locale-nr_ZA.diff (merged upstream).
+  * Remove localedata/new-catalan-locales.diff (merged upstream).
+  * Remove localedata/update-ZA.diff (merged upstream).
+  * Remove localedata/locale-te_IN.diff (merged upstream).
+  * Remove locale/iso4217-RON.diff (merged upstream).
+  * Update localedata/locales_CH.diff
+  * Update localedata/supported.diff
+  * Update localedata/locale-hy_AM.diff
+  * Update localedata/locale-csb_PL.diff
+  * Update localedata/dz_BT-collation.diff
+  * Update localedata/locale-ia.diff
+  * Update localedata/locales-sr.diff
+  * Update localedata/tailor-iso14651_t1.diff
+  * Update localedata/fix-lang.diff
+  * Update localedata/first_weekday.diff
+
+  [ Pierre Habouzit ]
+  * Adding myself to Uploaders.
+  * Rework patches/any/local-ldd.diff so that we don't use file(1) anymore (it
+    wasn't used anyway). Closes: #165417, #413095.
+  * Rework patch for #340871 (patches/m68k/local-mathinline_h.diff to use
+    __NTH rather than __THROW) in function implementations.
+  * Fix rpcgen(1) manpage, to match rpcgen(1) behaviour more closely.
+    Closes: #46175.
+  * patches/any/submitted-date-and-unknown-tz.diff: fix date output in case of
+    an unknown timezone in $TZ, submitted upstream as #4028.
+    Closes: #55648, #119540, #269238.
+
+  [ Michael Banck ]
+  * patches/hurd-i386/local-tls.diff: New patch (fixes building with TLS) by
+    Samuel Thibault and Barry deFreese.  Closes: #413787.
+
+  [ Clint Adams ]
+  * debian/watch: add watch file.
+  * debian/control, debian/control.in/opt, debian/control.in/main,
+    debian/control.in/libc0.1, debian/control.in/libc,
+    debian/debhelper.in/locales.templates: English corrections from
+    Christian Perrier for Debconf templates and package descriptions.
+    Closes: #418006.
+
+ -- Clint Adams <schizo@debian.org>  Mon, 09 Apr 2007 16:17:20 -0400
+
+glibc (2.4-1) UNRELEASED; urgency=low
+
+  * New upstream version 2.4:
+    - NPTL is used instead of linuxthreads on alpha.  Closes: #325600.
+    - NPTL being the default thread library when available, only one
+      version of the thread library is available (either linuxthreads or
+      NPTL).  Closes: #399035.
+    - .eh_frame has been fixed.  Closes: #349688.
+    - Fix a memory leak in getprotobyname. Closes: #365233.
+    - Support for MALLOC_PERTURB has been added.  Closes: #350579.
+    - Support for 2.4 kernels has been removed.  Closes: #258740.
+
+  [ Clint Adams ]
+  * Remove all/cvs-manual-memory.diff (merged upstream).
+  * Remove all/cvs-manual-string.diff (merged upstream).
+  * Remove any/cvs-divdi3-moddi3.diff (merged upstream).
+  * Remove any/cvs-errlist.diff (merged upstream).
+  * Remove any/cvs-siginfo_h.diff (merged upstream).
+  * Remove any/cvs-regcomp_c.diff (merged upstream).
+  * Remove any/cvs-tst-setcontext_c.diff (merged upstream).
+  * Remove any/local-dash.diff (merged upstream).
+  * Remove any/local-gcc4-elf.diff (merged upstream).
+  * Remove powerpc/cvs-executable-got.diff (merged upstream).
+  * Remove sparc/cvs-datastart.diff (merged upstream).
+  * Remove sparc/cvs-gcc4-inline.diff (merged upstream).
+  * Remove sparc/local-gcc4-mv8.diff (merged upstream).
+  * Remove sparc/submitted-socket-weakalias.diff (merged upstream).
+  * Remove everything to do with nscd_nischeck.
+  * Remove any/local-linuxthreads-sizefix.diff (not necessary anymore).
+  * Update hppa/submitted-lt.diff.
+  * debian/shlibver: Bump up to 2.4-1.
+  * Update any/local-bashisms.diff: fix invalid test operator (==)
+    in run-iconv-test.sh
+  * debian/rules.d/build.mk: don't try to build html documentation.
+  * debian/sysdeps/hppa.mk: use ports and linuxthreads add-ons
+  * debian/sysdeps/m68k.mk: use ports and linuxthreads add-ons
+  * debian/sysdeps/m32r.mk: use ports and linuxthreads add-ons
+  * debian/sysdeps/mips.mk: use ports add-on
+  * debian/sysdeps/mipsel.mk: use ports add-on
+  * debian/sysdeps/arm.mk: use ports add-on
+  * Build with gcc 4.1 on all architectures but hurd-i386.
+  * debian/debhelper.in/nscd.init: partially sync nscd initscript
+    with upstream.
+  * Remove mips/local-librt.diff.
+  * debian/rules.d/tarball.mk: no longer run tar with -v.
+  * Add hppa/cvs-portshead.patch (update hppa code to ports HEAD)
+  * Add arm/cvs-portshead.patch (update arm code to ports HEAD)
+
+  [ Denis Barbier ]
+  * Remove locale/complex-collate.diff (merged upstream).
+  * Remove locale/cvs-{iso4217,iso639}.diff, locale/cvs-localedata.diff
+  * Remove from any/local-forward-backward-collation.diff a chunk merged
+    upstream.
+  * debian/rules.d/tarball.mk: glibc-<foo>-2.4.tar.bz2 add-on unpacks
+    into either <foo> or glibc-<foo>-2.4, in which case it is renamed
+    into <foo>.
+
+  [ Michael Banck ]
+  * debian/sysdeps/hurd.mk: Only use libidn for add-ons.
+
+  [ Aurelien Jarno ]
+  * Update all/submitted-new-brf-encoding.diff.
+  * Remove alpha/cvs-gcc4-profile.diff (not needed anymore).
+  * Update alpha/submitted-xstat.diff.
+  * Update arm/cvs-gcc4-inline.diff.
+  * Remove arm/cvs-gcc4.1-raise.diff (merged upstream).
+  * Remove arm/cvs-float-byteorder.diff (merged upstream).
+  * Remove arm/cvs-socket-weakalias.diff (merged upstream).
+  * Update arm/local-ioperm.diff to reflect the new port add-on.
+  * Update arm/local-no-hwcap.diff to reflect the new port add-on.
+  * Remove any/cvs-argp_h.diff (merged upstream).
+  * Remove any/cvs-ctan.diff (merged upstream).
+  * Remove any/cvs-futimes.diff (merged upstream).
+  * Remove any/cvs-nfs_h.diff (merged upstream).
+  * Remove any/cvs-path_log.diff (merged upstream).
+  * Remove any/cvs-resource_h.diff (merged upstream).
+  * Remove any/cvs-static-getpid.diff (merged upstream).
+  * Remove any/cvs-tls-crashfix.diff (merged upstream).
+  * Add any/cvs-uio_h.diff from upstream to allow inclusion of bits/uio.h from
+    fcntl.h and prevent multiple inclusions.
+  * Remove any/local-kernel-features.diff (merged upstream).
+  * Update any/local-ldso-disable-hwcap.diff.
+  * Add any/local-linuxthreads-tst-sighandler.diff to disable
+    tst-sighandler{1,2} tests, which seems to be buggy.
+  * Update any/local-rtld.diff.
+  * Update any/local-sysctl.diff to reflect the new port add-on.
+  * Update any/local-version-sanity.diff.
+  * Remove any/submitted-eh-frame-terminator.diff (merged upstream).
+  * Update any/submitted-nis-netgrp.diff.
+  * Remove i386/local-i486_ldt_support.diff (merged upstream).
+  * Remove ia64/cvs-gcc41-atomic_h.diff (merged upstream).
+  * Remove hppa/cvs-linesep.diff (merged upstream).
+  * Remove hppa/cvs-no-ldbl-128 (merged upstream).
+  * Replace hppa/cvs-pie-relocs.diff by submitted-nptl-carlos.diff, see
+    http://lists.parisc-linux.org/pipermail/parisc-linux/2006-July/029549.html.
+  * Remove hppa/local-gcc-4-profile.diff (not necessary anymore).
+  * Update hppa/local-inlining.diff to reflect the new port add-on.
+  * Remove hppa/local-remove-mallocdef.diff (not necessary anymore as
+    spinlock ldcw fix has been applied).
+  * Update hppa/submitted-drop-utimes.diff.
+  * Remove hppa/submitted-fenv-align.diff (merged upstream).
+  * Remove hppa/submitted-fpu.diff (merged upstream).
+  * Remove hppa/submitted-iitlbp.diff (merged upstream).
+  * Remove hppa/submitted-sysdeps.diff (merged upstream).
+  * Remove hurd-i386/cvs-ioctl-pfinet.diff (merged upstream).
+  * Remove hurd-i386/cvs-getresuid-dyslexia.diff (merged upstream).
+  * Remove hurd-i386/cvs-posix-opts.diff (merged upstream).
+  * Update hurd-i386/submitted-sysvshm.diff.
+  * Remove kfreebsd/local-nscd_no_mremap.diff (not necessary anymore).
+  * Update kfreebsd/local-scripts.diff.
+  * Add kfreebsd/local-ftw.diff.
+  * Add kfreebsd/local-sysdeps-2.4.diff.
+  * Add kfreebsd/local-memusage_no_mremap.diff.
+  * Remove m32r/cvs-elf-m32r_rel32.diff (merged upstream).
+  * Update m68k/local-compat.diff.
+  * Update m68k/local-mathinline_h.diff to reflect the new port add-on.
+  * Update m68k/local-fpic.diff.
+  * Update m68k/local-reloc.diff to reflect the new port add-on.
+  * Update m68k/submitted-gcc34-seccomment.diff.
+  * Add mips/cvs-fork.diff (fix the path to i386/fork.c) from CVS.
+  * Add mips/cvs-resource.diff (fix a typo in bits/resource.h) from CVS.
+  * Remove mips/cvs-gcc4-inline.diff (merged upstream).
+  * Remove mips/cvs-gcc4-sysdeps.diff (merged upstream).
+  * Update mips/submitted-msq.diff to reflect the new port add-on.
+  * Remove powerpc/cvs-gcc41-initfini.diff (merged upstream).
+  * Update any/local-libgcc-compat-{all,others}.diff and split them into
+    any/local-libgcc-compat-{main,ports}.diff. Move mips/libgcc-compat.c to
+    mips/mips32/libgcc-compat.c as it is only needed for the o32 ABI, and not
+    needed for n32 and n64 ABIs.
+  * Add sparc/local-fork.diff (use fork.c instead of fork.S).
+  * Add any/local-__thread.diff (make glibc buildable without __thread support)
+    from Michael Banck.
+  * debian/script.in/kernelcheck.sh: set the minimum kernel version to 2.6.0,
+    except on m68k where it is set to 2.4.1.
+  * debian/sysdeps/i386.mk: install the xen flavour in /lib/i686/nosegneg and
+    create /etc/ld.so.conf.d/libc6-xen.conf which uses the new hwcap feature.
+    Closes: #363442.
+  * debian/FAQ: Remove LD_ASSUME_KERNEL workaround, as linuxthreads versions
+    of the glibc are not built anymore.
+
+  [ Jeff Bailey ]
+
+  * debian/control.in/libc: Move tzdata dependancy to ...
+  * debian/sysdeps/depflags.mk: ... here.
+
+  * debian/sysdeps/powerpc.mk: Include biarch headers in libc6-dev-ppc64
+
+  * debian/patches/any/local-dynamic-resolvconf.diff: New file to
+    check for updated resolv.conf before a nameserver call.  (Closes:
+    #272265).
+  * debian/patches/series: Use it.
+
+ -- Clint Adams <schizo@debian.org>  Sun, 28 May 2006 03:28:14 +0200
+
+glibc (2.3.6.ds1-13) unstable; urgency=low
+
+  * debhelper.in/libc.postinst: try to add /etc/ld.so.conf.d support for
+    versions lower then 2.3.6.ds1-11 instead of 2.3.6-16, because new
+    installations done with version from 2.3.6-16 to 2.3.6.ds1-10 are
+    broken.  Closes: #411542.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 21 Feb 2007 11:07:13 +0100
+
+glibc (2.3.6.ds1-12) unstable; urgency=low
+
+  [ Pierre Habouzit ]
+  * patches/any/cvs-sunrpc-xdrmem_setpos.diff: fix a pointer-to-cast problem
+    in sunrpc, backport from glibc-2.5. Closes: #389084.
+  * patches/any/cvs-getent-wrong-struct-size.diff: fix a bad struct size in
+    nss/getent.c, backport from glibc-2.5. Closes: #347358.
+  * patches/any/local-sysctl.diff: sysctl is back for good it seems, remove
+    the link warning from the patch. Closes: #410816.
+
+  [ Aurelien Jarno ]
+  * debian/control.in/opt: fix a typo: Ezla -> Ezra.  Closes: #410839.
+
+ -- Pierre Habouzit <madcoder@debian.org>  Thu, 15 Feb 2007 18:41:06 +0100
+
+glibc (2.3.6.ds1-11) unstable; urgency=low
+
+  * patches/kfreebsd/local-sysdeps.diff: update to revision 1886 (from
+    glibc-bsd).
+  * patches/any/cvs-itoa-c.diff: new patch from CVS (fix sprintf %0lld when
+    argument equals to 0).  Closes: bug#292523.
+  * patches/all/local-pthread-manpages.diff: fix pthread manpages.  Closes:
+    bug#220719.
+  * debhelper.in/libc-otherbuild.postinst: fix handling of
+    /etc/ld.so.hwcappkgs.  Closes: bug#409374.
+  * debhelper.in/libc.postinst: fix code adding /etc/ld.so.conf.d support to
+    /etc/ld.so.conf.  Closes: bug#409516.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat,  3 Feb 2007 20:13:29 +0100
+
+glibc (2.3.6.ds1-10) unstable; urgency=low
+
+  * sysdeps/kfreebsd.mk: Link all machine*/ directories to support
+    new bi-arch headers.
+  * Add bi-arch support on kfreebsd-amd64:
+    - debian/sysdeps/kfreebsd-amd64.mk: New pass for 32-bit glibc
+    - debian/control.in/main: Add build-depends on libc0.1-dev-i386
+    - debian/control.in/kfreebsd-i386: add libc0.1-dev-i386 and
+      libc0.1-i386 packages
+  * patches/kfreebsd/local-sysdeps.diff: update to revision 1853 (from
+    glibc-bsd).
+  * debian/control.in/libc: downgrade priority of libc-dev to optional
+    from standard to match overrides.
+  * debian/patches/hppa/cvs-clone.diff: new patch by Helge Deller
+    <deller@gmx.de> inspired from upstream CVS code (fix LTP clone04 and
+    clone06 test).  Closes: #405411.
+  * debian/patches/any/cvs-zdump-64-bit.diff: new patch from CVS to fix zdump
+    on 64-bit architectures.  Closes: #402776.
+  * debian/quitlrc: new file.
+  * debian/rules.d/quilt.mk: use debian/quiltrc instead of default ~/.quiltrc.
+    Closes: #406136.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon,  8 Jan 2007 22:29:37 +0100
+
+glibc (2.3.6.ds1-9) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * patches/kfreebsd/local-sysdeps.diff: update to revision 1775 (from
+    glibc-bsd).
+  * debian/po/eu.po: new file, thanks to Piarres Beobide.  Closes: #398984.
+  * debian/wrapper/objcopy: remove useless .debug_loc (patch from Daniel
+    Jacobowitz).  Closes: #399217.
+  * debian/po/de.po: Fix German translation.  Closes: #372817.
+
+  [ Michael Banck ]
+  * patches/hurd-i386/submitted-futimes.diff: Moved to ...
+  * patches/hurd-i386/cvs-futimes.diff: ... here, updated with the
+    version committed upstream by Roland McGrath.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu,  7 Dec 2006 11:27:42 +0100
+
+glibc (2.3.6.ds1-8) unstable; urgency=high
+
+  * any/local-iconv-fix-trampoline.diff: new patch (fix iconvconfig segfault
+    when run under exec-shield, PaX or similar) from hlfs.  Closes: #397020.
+  * debian/po/ro.po: new file, thanks to Stan Ioan-Eugen.  Closes: #395348.
+  * debhelper.in/locales.prerm; debhelper.in/locales.prerm,
+    debhelper.in/locales-all.prerm: fixed bad interactions between locales
+    and locales-all.  Closes: #396354.
+  * patches/kfreebsd/local-sysdeps.diff: update to revision 1703 (from
+    glibc-bsd).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat,  4 Nov 2006 23:36:19 +0100
+
+glibc (2.3.6.ds1-7) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * New any/local-no-pagesize.diff (remove the usage of PAGE_SIZE) by
+    Steve Langasek.  Closes: #394385.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 21 Oct 2006 22:41:39 +0200
+
+glibc (2.3.6.ds1-6) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Improve the heuristic used to detect other copy of the C library. Closes:
+    #390950.
+  * Add m68k/local-pthread_lock.diff (fix deadlock with pthread_spinlock) by
+    Roman Zippel. Closes: #385917.
+  * Build-conflicts with buggy gcc-4.1 (= 4.1.1-14). Closes: #391485.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat,  7 Oct 2006 23:54:49 +0200
+
+glibc (2.3.6.ds1-5) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * debian/local/manpages/ldconfig.8: Update the manpage. Closes: #325921.
+  * debian/local/manpages/ld.so.8: Update the manpage. Closes: #171145,
+    #357676, #280027.
+  * rules.d/debhelper.mk: don't make ld.so.8.gz or ld.so.conf executable.
+  * debian/FAQ: specify that LD_ASSUME_KERNEL does not work on amd64.
+    Closes: #386924.
+  * patches/any/cvs-sqrt.diff: New patch from upstream to fix sqrt computation
+    for negative imaginary number.  Closes: #388852.
+
+  [ Michael Banck ]
+  * Add hurd-i386/cvs-getsid.diff (fix getsid(0) on the Hurd) by
+    Samuel Thibault (patch from glibc-2.4).
+  * Add hurd-i386/submitted-futimes.diff (fix touch on the Hurd) by
+    Thomas Schwinge and Samuel Thibault. Closes: #388785.
+
+  [ Denis Barbier ]
+  * Add sr_ME and sr_RS locales, and keep sr_CS for backward compatibility.
+  * First weekday is Sunday in Brazil.  Closes: #385859
+    Thanks Gunther and Felipe Augusto van de Wiel.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun,  1 Oct 2006 18:48:27 +0200
+
+glibc (2.3.6.ds1-4) unstable; urgency=low
+
+  * debian/control.in/opt: add a new line at the end of the file.  (Closes:
+    #384375).
+  * debian/rules.d/control.mk: add a check to make sur that all files in
+    debian/control.in have a new line at the end.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 24 Aug 2006 00:21:25 +0200
+
+glibc (2.3.6.ds1-3) unstable; urgency=low
+
+  * patches/any/cvs-sysctl.diff: patch from upstream to fix the sysctl()
+    problem for NPTL.
+  * patches/any/local-sysctl.diff: remove the NPTL fix from this patch, apply
+    the same kind of fix for linuxthreads than for NPTL.  (Closes: #383976).
+  * patches/any/local-sysctl.diff: fix for arm.
+  * patches/any/local-bashisms.diff: fix bashisms in the testsuite.
+  * debian/control.in/{i386,powerpc,ppc64,s390x,sparc64}: change the bi-arch
+    package priority to optional (but keep libc6-i386 on amd64 to standard).
+    (Closes: #344253).
+  * debian/control.in/opt: Removed the comment about the IBM's JDK in the
+    descriptions of the optimized packages, as an NPTL version is also present
+    in the main libc.
+  * debian/rules.d/build.mk: force the locale directory to /usr/lib/locale.
+    This way the 32-bit libc6 on amd64 is able use the locales correctly (it
+    was already done for other bi-arch architectures).  (Closes: #379959).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 23 Aug 2006 00:38:22 +0200
+
+glibc (2.3.6.ds1-2) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * rules.d/build.mk: removed the call to texi2html.  (Closes: #383276).
+  * New debian/patches/any/cvs-ctermid.diff from upstream to fix a segfault in
+    ctermid(NULL).  Thanks Denis for the hint.  (Closes: #380504, #383362).
+  * New debian/patches/localedata/reverted-for-etch.diff: revert a few
+    locales changes done in 2.3.6.ds1-1 and refused by the release managers:
+    - locales/vi_VN: Various fixes
+    - locales/ru_RU: Use U2002 for thousands_sep and mon_throusands_sep.
+
+  [ Denis Barbier ]
+  * debian/patches/localedata/cvs-localedata.diff: A new test target
+    tst-strfmon1 was previously added into localedata/Makefile,
+    so add localedata/tst-strfmon1.c to really perform this test.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 17 Aug 2006 00:32:25 +0200
+
+glibc (2.3.6.ds1-1) unstable; urgency=low
+
+  [ Denis Barbier ]
+  * New all/submitted-uninitialized-byte-LC_CTYPE.diff patch to fix
+    uninitialized bytes or misaligned words in locale files.
+  * debian/debhelper.in/locales-all.postinst: Make localedef silent, and
+    fix an error, this script could not be run more than once.
+  * debian/debhelper.in/locales-all.prerm: New file, to remove
+    /usr/lib/locale/locale-archive.  Thanks Lars Wirzenius.
+    (Closes: #382136)
+  * debian/debhelper.in/locales.postinst: Pass --no-checks to update-locale
+    to not break installation of this package even if non working locales
+    are selected.  Thanks Robert Millan.  (Closes: #365628)
+  * debian/patches/locale/cvs-iso4217.diff: Update to CVS 2006-08-12.
+  * debian/patches/localedata/cvs-localedata.diff: Update to CVS 2006-08-12
+    Among other changes:
+    * New locale files: as_IN, ca_AD, csb_PL, el_CY, fr_AD, it_AD, nr_ZA,
+      or_IN, pa_PK and tr_CY.
+    * charmaps/MIK: New file.
+    * Sync bg_BG bs_BA es_MX ru_RU tg_TJ tt_RU with latest iso-4217.def
+    * Add transliateration support to LC_CTYPE for most locales.
+    * Fix date fields for several *_IN locales.
+    * locales/{*_ZA,ro_RO,vi_VN}: Various fixes
+    * locales/de_DE: Fix date_fmt.
+    * locales/hu_HU: Better month name abbreviations.
+    * locales/pl_PL: Don't ignore U0020 in collation.
+    * locales/ru_RU: Use U2002 for thousands_sep and mon_throusands_sep.
+    * locales/es_UY: Change currency_symbol. Closes: #378151
+    * locales/de_CH: Change thousand separator to '.
+  * The following patches have been merged into localedata/cvs-localedata.diff
+    and are dropped:
+      locale/iso4217-RON.diff               localedata/locale-ro_RO.diff
+      localedata/new-catalan-locales.diff   localedata/locale-te_IN.diff
+      localedata/locale-nr_ZA.diff          localedata/update-ZA.diff
+
+  [ Aurelien Jarno ]
+  * sysdeps/{powerpc,s390,ia64}.mk: make the NPTL version buildable on 2.4
+    kernels.
+  * New any/local-sysctl.diff patch to remove the annoying warning messages
+    that appear with 2.6.18+ kernels, and to warn users to not use sysctl().
+  * debian/debhelper.in/libc.postinst: update list of optimized glibc
+    packages.  Thanks Petr Salinger.  (Closes: #383168).
+  * New any/cvs-static-getpid.diff patch from upstream to fix getpid() in
+    statically linked programs on some architectures.  (Closes: #367656).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 15 Aug 2006 23:01:43 +0200
+
+glibc (2.3.6-19) unstable; urgency=low
+
+  [ Michael Banck ]
+  * debhelper.in/libc-udeb.install.hurd-i386: New file; libpthread is
+    not part of glibc on the Hurd.
+
+  [ Aurelien Jarno ]
+  * Ship librt in the libc udeb (closes: bug#381881).
+
+ -- Aurelien Jarno <aurelien@aurel32.net>  Tue,  8 Aug 2006 18:18:48 +0200
+
+glibc (2.3.6-18) unstable; urgency=medium
+
+  (urgency set to medium as it fixes a FTBFS)
+
+  [ Aurelien Jarno ]
+  * Update ia64/cvs-gcc41-atomic_h.diff again (fix build failure with gcc-4.1,
+    nptl part) from upstream.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue,  1 Aug 2006 16:59:33 +0200
+
+glibc (2.3.6-17) unstable; urgency=medium
+
+  (urgency set to medium as it fixes a FTBFS)
+
+  [ Aurelien Jarno ]
+  * Update ia64/cvs-gcc41-atomic_h.diff (fix build failure with gcc-4.1) from
+    upstream.
+
+  [ Michael Banck ]
+  * debian/sysdeps/hurd.mk: Disable RUN_TESTSUITE.
+
+ -- Aurelien Jarno <aurelien@aurel32.net>  Sun, 30 Jul 2006 21:25:32 +0200
+
+glibc (2.3.6-16) UNRELEASED; urgency=low
+
+  (urgency set to medium as it fixes a FTBFS)
+
+  [ Aurelien Jarno ]
+  * Add arm/cvs-gcc4.1-raise.diff (fix build failure with gcc-4.1) from
+    upstream.
+  * Add ia64/cvs-gcc41-atomic_h.diff (fix build failure with gcc-4.1) from
+    upstream.
+  * Build with gcc 4.1 on all architectures but hurd-i386.
+  * debian/sysdeps/s390.mk: switch s390x to nptl.
+  * debian/rules.d/build.mk: use ld.so libc.so instead of libc.so to
+    determine if the host CPU is able to run the testsuite.
+  * debian/sysdeps/kfreebsd.mk: also use the nfs/ directory from kernel
+    headers.
+  * debian/sysdeps/kfreebsd.mk: also use the nfs/ directory from kernel
+    headers.
+  * patches/kfreebsd/local-sysdeps.diff: update to revision 1631 (from glibc-bsd).
+  * debian/local/manpages/iconv.1: fixed the description of the --silent
+    option.  (Closes: #375741)
+  * debian/local/manpages/iconv.1: fixed the use of the TH keyword.  (Closes:
+    #372510)
+  * debian/locales-all.README.Debian:  File removed, it is useless now.
+    (Closes: #378191)
+  * Update Russian debconf translation, by Yuri Kozlov.  (Closes: #379395)
+  * debian/debhelper.in/libc.postinst: add /etc/ld.so.conf.d/ support.
+  * Drop any/local-ldconfig-multiarch.diff, use /etc/ld.so.conf.d/ to
+    configure multiarch libraries.
+  * Update m68k/local-mathinline_h.diff (fix bits/mathinline.h), by Roger Leigh.
+    (Closes: #340871)
+
+  [ Denis Barbier ]
+  * debian/control.in/main: also make locales Conflicts: belocs-locales-bin.
+  * debian/debhelper.in/locales.config: some programs keep modifying
+    /etc/environment to store locale variables, so read /etc/environment
+    even when upgrading new versions.  Of course, /etc/default/locale has
+    still a higher precedence over /etc/environment.  (Closes: #363644)
+  * Add new Lithuanian debconf translation, by Gintautas Miliauskas.
+    (Closes: #374365)
+  * Update Brazilian Portuguese debconf translation, by Felipe Augusto
+    van de Wiel.  (Closes: #375451)
+  * debian/debhelper.in/libc.postinst: Call iconvconfig to generate
+    /usr/lib/gconv/gconv-modules.cache.  (Closes: #376811)
+  * debian/debhelper.in/libc.postrm: Remove this cache file.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu,  8 Jun 2006 08:03:49 +0200
+
+glibc (2.3.6-15) unstable; urgency=low
+
+  * debian/rules.d/build.mk: generate a test log file even if the testsuite
+    is disabled, too make debhelper 5 happy.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu,  8 Jun 2006 08:02:47 +0200
+
+glibc (2.3.6-14) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * debian/debhelper.in/nscd: explicitely list the tables to invalidate.
+    (Closes: #370124)
+  * debian/debhelper.in/nscd: create /var/run/nscd if it does not already
+    exist.  (Closes: #370122)
+  * Update m68k/local-mathinline_h.diff (fix bits/mathinline.h), by Roger Leigh.
+    Enable it.  (Closes: #340871)
+  * debian/debhelper.in/libc.preinst: also check for other copies of the libc in
+    /lib32 and /lib64.
+  * debian/debhelper.in/libc.preinst, debian/rules.d/debhelper.mk: only use
+    the default system linker when searching for other copies of the libc.
+  * debian/sysdeps/i386.mk: make /lib/i386-linux-gnu and /usr/lib/i386-linux-gnu
+    symlinks relative.
+  * debhelper.in/libnss-dns-udeb.install, debhelper.in/libnss-files-udeb.install:
+    fix the installation path.  (Closes: #370523)
+  * patches/kfreebsd/local-sysdeps.diff: update to revision 1583 (from glibc-bsd)
+    to fix the build with gcc-4.1.
+  * patches/m32r/local-ports-m32r.diff: remove libc_cv_gcc_unwind_find=yes
+    from m32r/configure by Kazuhiro Inaoka.  (Closes: #371052)
+  * rules.d/debhelper.mk: don't install librpcsvc.a when cross-compiling.
+    (Closes: #369657)
+  * debian/compat, debian/control.in/main: switch to debhelper 5.0.
+
+  [ Denis Barbier ]
+  * debian/patches/localedata/tailor-iso14651_t1.diff: Fix several collation
+    rules, which could cause errors in regular expressions with character
+    ranges, in particular with et_EE locale.  (Closes: #362514)
+  * debian/patches/localedata/locale-csb_PL.diff
+  * debian/patches/localedata/locale-ro_RO.diff
+  * debian/patches/localedata/locale-se_NO.diff: Apply similar fixes.
+  * debian/main/control.in: make locales Conflicts: belocs-locales-data.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed,  7 Jun 2006 23:16:58 +0200
+
+glibc (2.3.6-13) unstable; urgency=low
+
+  * debian/patches/alpha/local-gcc4.1.diff: fix a small typo. sigh.
+  * debian/control.in/main: build-depends on libc6-dev-s390x on s390.
+  * Remove any/local-libgcc-static.diff.  (Closes: #369636, #369641)
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed, 31 May 2006 07:20:14 +0200
+
+glibc (2.3.6-12) unstable; urgency=low
+
+  * Don't do a udeb pass, it is still too buggy.  (Closes: #369492)
+  * debian/control.in/main: build-depends on libc6-dev-sparc64 on sparc.
+  * Add patches/alpha/local-gcc4.1.diff (fix build with gcc-4.1) from
+    Falk Hueffner.
+  * patches/kfreebsd/local-sysdeps.diff: update to revision 1571 (from
+    glibc-bsd).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 30 May 2006 22:35:35 +0200
+
+glibc (2.3.6-11) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * debian/rules/build.mk: don't remove ld.so from udeb packages.
+  * debian/rules: move udeb_add-ons to debian/sysdeps/{kfreebsd,linux}.mk.
+  * M32R support:  (Closes: #366962)
+    - debian/rules.d/control.mk: add m32r.
+    - Add debian/sysdeps/m32r.mk.
+    - Add debian/patches/any/cvs-futimes.diff (use fnctl64 if fnctl is no
+      available).
+    - Add debian/patch/any/local-kernel-features.diff (fix the include path
+      for kernel-features.h) so that it could be used from other files.
+    - Add debian/patches/any/local-libgcc-static.diff (link with libgcc_s).
+    - Add debian/patches/m32r/local-ports-m32r.diff (m32r support).
+    - Add debian/patches/m32r/cvs-elf-m32r_rel32.diff (Add R_M32R_REL32 to
+      elf/elf.h).
+  * debian/local/manpages/localedef.1: fix a typo.  (Closes: #310477)
+  * debian/local/manpages/iconv.1: fix the indentation (Closes: #316148)
+  * debian/local/manpages/iconv.1, debian/local/manpages/localedef.1: change
+    sarge into etch.
+  * debian/sysdeps/kfreebsd.mk: build the udeb package with -Os on
+    kfreebsd-i386 and kfreebsd-amd64.
+  * debian/sysdeps/*.mk: build the udeb with -Os, except on m68k and s390.
+  * debian/sysdeps/hppa.mk: build the udeb with gcc 4.1.
+    mipsel, powerpc and sparc.
+  * debian/sysdeps/arm.mk: set udeb_MIN_KERNEL_SUPPORTED to 2.4.1, as the
+    arm build daemons are still running a 2.4 kernel.
+  * debian/sysdeps/sparc.mk: set udeb_MIN_KERNEL_SUPPORTED to 2.4.1, as d-i
+    still needs a 2.4 kernel.
+  * patches/kfreebsd/local-sysdeps.diff: update to revision 1577 (from
+    glibc-bsd).
+  * Add debian/patches/powerpc/cvs-gcc41-initfini.diff (fix build with gcc 4.1
+    on powerpc) from upstream CVS.
+  * debian/sysdeps/i386.mk: add a symlink (/usr)/lib/i386-linux-gnu ->
+    (/usr)/lib/i486-linux-gnu.
+  * Remove patches/i386/local-sse-oldkernel.diff (we don't support 2.2 kernels
+    anymore).
+  * Merge debian/local/etc_init.d/nscd and debian/debhelper.in/nscd.init.
+    (Closes: #368587)
+  * Remove debian/local/etc_init.d/nscd.
+
+  [ Denis Barbier ]
+  * Add patches/all/submitted-new-brf-encoding.diff: Add new BRF encoding
+    (ASCII Braille), submitted upstream by Samuel Thibault.
+  * Add patches/localedata/locale-zh_TW.diff: Remove <U897F><U5143> from
+    dates.  Thanks Dan Jacobson (Closes: #352600)
+
+  [ Clint Adams ]
+  * debian/debhelper.in/libc.preinst: use POSIX syntax for kill.
+  * debian/control.in/main: bump to Standards-Version 3.7.2.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 30 May 2006 02:28:33 +0200
+
+glibc (2.3.6-10) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * debian/debhelper.in/libc.preinst: use the original path if readlink -f
+    fails to canonicalize the path.  (Closes: #368116)
+  * Add patches/arm/local-softfloat.diff (support for arm softfloat), and
+    enable on arm-softfloat only, as it breaks other architectures.  (Closes:
+    #358772)
+  * debian/rules.d/control.mk: Add arm-softfloat to the architectures list.
+  * Do a separate pass for the udeb package, so that it could use different
+    build options.
+  * Set the minimum kernel to 2.6.1 for the udeb package, except for i386,
+    m68k, mips, mipsel, powerpc and s390.
+  * Enable the locales-all package.  (Closes: #308020)
+  * debian/sysdeps/i386.mk: build the glibc with --without-__thread again on
+    i386 (Closes: #368022, #368326).
+  * debhelper.in/libc.preinst, debhelper.in/libc-otherbuild.postinst,
+    debhelper.in/libc.postinst, debhelper.in/libc-otherbuild.preinst: use
+    /bin/sh instead of /bin/bash.  (Closes: #267594)
+  * patches/kfreebsd/local-sysdeps.diff: update to revision 1571 (from
+    glibc-bsd).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 21 May 2006 22:36:27 +0200
+
+glibc (2.3.6-9) unstable; urgency=low
+
+  * Don't run make install with -j, as it is not SMP safe.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 18 May 2006 17:54:39 +0000
+
+glibc (2.3.6-8) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Disable m68k/local-mathinline_h.diff, it breaks the build of the glibc on
+    m68k.
+  * Add all/local-pt_BR.diff (fix a small typo in the Brazilian Portuguese
+    translation) by Guilherme de S. Pastore.  (Closes: #319422)
+  * Add hurd-i386/local-mlock.diff (fix mlock on Hurd/Mach), by Samuel
+    Thibault.  (Closes: #349204)
+  * sysdeps/i386.mk: build glibc with --with-__thread on i386.
+  * debian/local/manpages: s/woody/etch/g.  (Closes: #364198)
+  * sysdeps/depflags.pl: bumped the versioned conflicts with initrd-tools
+    to 0.1.84.1, as older version use LD_ASSUME_KERNEL=2.4.  (Closes: #365647)
+  * Follow symlinks while checking for other copy of the C library.
+    (Closes: #365838)
+  * Invalidate nscd cache when calling /etc/init.d/nscd restart.
+    (Closes: #365676, #365677)
+  * /usr/sbin/tzconfig: set umask to 022.  (Closes: #367145)
+  * debian/main/control.in: make locales Replaces: lliurex-belocs-locales-data.
+    (Closes: #365651)
+  * Move the NJOBS part to debian/sysdeps/(system) to debian/rules.
+  * debian/debhelper.in/libc-otherbuild.postinst: fixed parsing of
+    /etc/ld.so.hwcappkgs.  (Closes: #364666)
+
+  [ Denis Barbier ]
+  * Fix location of locales/NEWS.Debian.  Thanks Matthijs Mohlmann.
+    (Closes: #362763)
+  * locales.postinst: Do not abort if the current locale is not generated.
+  * locales.config: Fix shell scripting when "All locales" is selected along
+    with other choices,  Thanks Olivier Trichet.  (Closes: #364251)
+  * update-locale: When checking for invalid locale settings, do not mess up
+    with current environment settings.
+  * Remove sem_*.3 manual pages from glibc-doc, these manual pages are updated
+    and maintained in the manpages-dev package.  (Closes: #365547)
+
+  [ Michael Banck ]
+  * Add hurd-i386/cvs-posix-opts.diff (Define many missing options, most
+    notably _POSIX_THREAD_SAFE_FUNCTIONS) by Roland McGrath (patch from
+    HEAD).
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 18 May 2006 15:34:08 +0000
+
+glibc (2.3.6-7) unstable; urgency=medium
+
+  [ Aurelien Jarno ]
+  * Urgency set to medium because this version fixes and RC bug in testing.
+  * Optimized libraries should actually be cross-compiled as we don't know the
+    CPU that will be used.
+  * Allow the glibc to be cross-compiled for Linux and kFreeBSD.  (Closes:
+    #358771)
+  * Bumped the minimum kernel to 2.4.1 instead of 2.4.0 as there are some
+    important new features in this version. Thanks to Petr Salinger for
+    noticing me.
+  * Add m68k/local-mathinline_h.diff (fix bits/mathinline.h), by Roger Leigh.
+    (Closes: #340871)
+  * Add beginning and end timestamps to both the build logs and the
+    testsuite logs.  (Closes: #155690)
+  * debian/sysdeps/sparc.mk: build sparcv9b optimized libraries with
+    -mtune=ultrasparc3.
+  * debian/sysdeps/kfreebsd/local-sysdeps.diff: update from the latest SVN.
+  * debian/patches/series: Fix the patchlevel for local-i486_ldt_support.diff
+    (Closes: #226716)
+  * Fix a typo in the previous changelog entry (s/not/now/).  (Closes: #362460)
+
+  [ Denis Barbier ]
+  * Remove ldd calls from libc.preinst.
+  * Do no more transfer variables from /etc/environment to /etc/default/locale
+    in locales.postinst, but instead add /usr/share/doc/locales/NEWS.Debian
+    to explain that /etc/environment needs to be cleaned up.
+    (Closes: #361048)
+  * Create a new locales-all package with all supported locales precompiled,
+    but keep it disabled for now.
+    Both locales and locales-all packages provide a virtual generated-locales
+    package.  Packages which currently depends on locales should instead
+    depend on 'locales | generated-locales'.
+  * Add a new ca_ES@valencia locale, requested by Robert Millan (Closes: #361972)
+
+ -- Aurelien Jarno <aurel32@debian.org>  Fri, 14 Apr 2006 13:48:30 +0200
+
+glibc (2.3.6-6) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Remove the timezone database from the libc6 package. It is now provided
+    by a separate package called tzdata.
+  * Put each test log file in the corresponding package instead of putting all
+    of them in libc6.
+  * Remove sparc/local-sparc64-fixups.diff as /lib64 and /usr/lib64 are now a
+    default search path on 32/64-bit architectures.
+  * Switch minimum kernel to at least 2.4.0 on all arches but m68k, and change
+    kernelcheck.sh accordingly. Affected architectures:
+    - alpha: from 2.2.0 to 2.4.0
+    - arm: from 2.2.0 to 2.4.0 (but 2.4.0 was checked at installed time)
+    - i386: from 2.2.0 to 2.4.0
+    - powerpc: from 2.2.0 to 2.4.0
+    - s390: from 2.2.10 to 2.4.0
+    - sparc: from 2.2.0 to 2.4.0
+    (Closes: #174270, #220992)
+  * Add i386/local-i486_ldt_support.diff (add ldt support and thus TLS support
+    on i486 machines). Thanks to Petr Salinger for the hint.  (Closes: #226716)
+  * Bump shlib to (>= 2.3.6-6) on i386.
+  * debian/debhelper.in/libc-alt.install: Add gconv-modules to the bi-arch
+    packages.  (Closes: #361642)
+  * /etc/ld.so.nohwcap is now supported on non-Linux architectures. Drop the
+    "Linux" check from libc-otherbuild.preinst.
+  * Build a libc6-xen flavour on i386.
+  * Fix a typo in the description of the libc6-sparcv9 and libc6-sparcv9b
+    packages.
+  * local/usr_sbin/tzconfig:
+    - Put a copy of the current timezone into /etc/localtime instead of a
+      symlink.  (Closes: #346342)
+    - Handle the case where /etc/localtime does not exists.  (Closes:
+      #360383).
+  * local/manpages/tzconfig.8: Update the manpage accordingly.
+  * script.in/kernelcheck.sh: Also take in account 64-bit mips(el) kernels.
+  * Add GNU/kFreeBSD patches, using conditional patching until they get
+    accepted upstream.
+  * Correctly replace DEB_HOST_ARCH by its value in libc6.preinst. Thanks to
+    Denis for noticing me.
+
+  [ Denis Barbier ]
+  * debian/debhelper.in/locales.config: /etc/locale.gen was not generated at
+    initial installation.  (Closes: #357523)
+  * update-locale: Fix buggy sanity check between LANGUAGE and LANG.
+    (Closes: #361091)
+  * update-locale: Drop the --remove flag, it is useless.
+  * update-locale: Fix the --locale-file flag.
+  * Add new Galician debconf translation, by Jacobo Tarrio.  (Closes: #361101)
+  * Use new features of po-debconf 1.0 to remove unneeded strings from PO
+    files.
+  * Fix day, abmon and mon fields for wo_SN locale.  (Closes: #361338)
+
+  [ Michael Banck ]
+  * Add hurd-machrules-make.diff (fixes build problems with make-3.81 for
+    Mach interface generation rules) by Roland McGrath (patch from HEAD).
+  * Add hurd-sysvshm.diff (implements SysV shared memory for GNU/Hurd)
+    by Marcus Brinkmann.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 10 Apr 2006 20:19:55 +0200
+
+glibc (2.3.6-5) unstable; urgency=low
+
+  [ Denis Barbier ]
+  * Add am_pm formatting information to en_NZ.  (Closes: #356328)
+  * Add interlingua locale.  (Closes: #224756)
+  * Move locale variables from /etc/environment into a dedicated
+    /etc/default/locale file.  (Closes: #214898, #349503)
+  * Add a new /usr/sbin/update-locale program to handle this new file.
+
+  [ Aurelien Jarno ]
+  * Fix ldconfig multiarch patch for reiserfs filesystems.
+  * Make ldconfig look into /lib32 and /usr/lib32 on amd64. Add /lib32 ->
+    /emul/ia32-linux/lib and /usr/lib32 -> /emul/ia32-linux/usr/lib links.
+  * Remove glibc235-gcc4-ppc-procfs.diff from debian/patches/series.
+    (Closes: #360126)
+  * Add siginfo_h.diff (fixes a typo in ILL_ILLOPN definition), backported
+    from upstream.  (Closes: #358041)
+  * Replace getcwd_ia64.diff by getcwd_c.diff (fix getcwd on platforms where
+    PAGE_SIZE >> PATH_MAX), backported from upstream.  (Closes: #355109)
+  * debian/control: drop alternative build-depends on ia32-libs-dev as this
+    package does not exist anymore.
+
+ -- Denis Barbier <barbier@debian.org>  Tue,  4 Apr 2006 18:07:21 +0200
+
+glibc (2.3.6-4) unstable; urgency=low
+
+  [ Aurelien Jarno ]
+  * Set configure_build to the same value as configure_host for sparc
+    optimized libraries (as on i386). This way they will be tested.
+  * If the CPU has biarch support, run tests for cross-compiled libraries.
+  * Remove ld.so from optimized libraries as it is not used.
+  * Add regcomp_c.diff (Call __libc_lock_init after init_dfa) from upstream
+    (Ulrich Drepper). This make possible to run the testsuite again on hppa.
+  * Enable the testsuite on hppa.
+  * Add tst-setcontext_c.diff (fix the arguments passed to setcontext during
+    test) from upstream.
+  * Create a link /usr/lib32 -> /emul/ia32-linux/usr/lib on amd64.
+  * Add argp_h.diff fixes (Remove __NTH for __argp_usage inline function)
+    by Ulrich Drepper (patch from HEAD).  (Closes: #355264)
+  * Add getcwd_ia64.diff (Remove the assertion so that the behaviour is the
+    same on all platforms, including ia64). This is a temporary fix to bug
+    #355109, until the upstream takes a decision.
+  * debian/sysdeps/kfreebsd-amd64.mk:
+    - s/libc6/libc0.1/g
+    - Change rtlddir from /lib64 to /lib
+
+  [ Denis Barbier ]
+  * locales.config: If $DEBCONF_IS_A_REGISTRY is set to a non-empty value,
+    the content of /etc/locale.gen does not override debconf values.
+  * Add strfmon.diff: the negative sign is not printed by strfmon when
+    current locale defines sign_posn == 4 (as in de_CH) and format
+    argument contains the ! modifier.
+  * Fix forward-backward-collation.diff: the change in strcoll_l.c has to
+    be applied at several places.  (Closes: #357390)
+  * Update timezone data files to tzdata2006b (no data change, only comments).
+  * Fix resource_h.diff: there was a typo for mips:
+    s/_RLIMIT_RTPRIO/__RLIMIT_RTPRIO/  (Closes: #357419)
+
+ -- Denis Barbier <barbier@debian.org>  Sat, 18 Mar 2006 10:26:45 +0100
+
+glibc (2.3.6-3) unstable; urgency=low
+
+  [ Aurelien Jarno]
+  * Use a shell function instead of ifneq when testing a variable depending on
+    $(curpass), otherwise it is only evaluated at the first pass.
+  * Add support for the ppc64 architecture.  (Closes: #301438).
+  * Use the new slibdir, libdir, rtlddir variables to build the various
+    flavours of the libc. Put them directly in the final directory, and
+    remove the corresponding tweaks done after the make install phase.
+  * Install the 32-bit libraries in /emul/ia32-linux(/usr)/lib on amd64.
+  * Only create the multiarch directories and the symlinks in /lib/ldconfig
+    for the main pass. Otherwise alternate libraries would conflict with the
+    main one when using multiarch.
+  * Fix the build-dependencies for kfreebsd-amd64.
+  * Add sysdeps/kfreebsd-amd64.mk and add kfreebsd-amd64 to
+    rules.d/control.mk.
+  * Make libc6-i386-dev conflicts with all versions of ia32-libs-dev. As it
+    won't be built anymore on amd64, this will automatically remove it during
+    the upgrade.
+
+  [ Clint Adams ]
+  * Get rid of -o as a binary operator to [ in tzconfig and postinst.
+
+  [ Denis Barbier ]
+  * Update localedata/locales/ro_RO.  Thanks Eddy Petrişor.  (Closes: #347173)
+  * Bump LOCALES_DEP_VER to 2.3.6-2.  All locales can be compiled with
+    localedef from 2.3.6-2 and 2.3.6-3.  (Closes: #352620)
+  * Updated Italian debconf translation, by Luca Monducci.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Wed,  1 Mar 2006 17:11:36 +0100
+
+glibc (2.3.6-2) unstable; urgency=low
+
+   [ Denis Barbier ]
+   * Modify debver2localesdep.pl, locales-depver and control files to provide
+     a smooth upgrade in unstable when locales require changes in localedef.
+     This is the first part for solving #352620, the proper dependency for
+     locales will be set by the next upload.
+   * debian/control: Clean up. Remove versioned dependencies on gettext,
+     debianutils, tar, texinfo; these versions were already in oldstable.
+     Drop references to localebin, wg15-locale, i18ndata, locale-ja, locale-ko,
+     locale-vi, locale-zh, libc6-doc, glibcdoc and libc6 (<< 2.1-4).
+   * debian/control: Split Build-Depends on several lines for readability
+     purpose.
+   * Add RON to locale/iso-4217.def and bump LOCALES_COMPAT_VER to 2.3.6-2.
+   * Fix thousand separator for de_CH, and let other Swiss locales copy
+     de_CH for LC_NUMERIC and LC_MONETARY sections.  (Closes: #345481)
+   * Apply a patch from Fedora to define AM/PM strings in cy_GB and en_GB
+     locales.  (Closes: #240901)
+   * Fix the week definition for the C locale.
+   * Check first_weekday fields against current CLDR snapshot.  Modified
+     locales are *_GB (=2), ar_SY (=5), ms_MY (=2), id_ID (=2).  Add
+     this field to more locales.
+   * locale-gen: Replace 'test ... -a ...' by two tests.
+   * Add an "All locales" option to the locales/locales_to_be_generated
+     template.  When it is selected, /etc/locale.gen is a symlink to
+     /usr/share/i18n/SUPPORTED.  (Closes: #321580, #323013)
+   * Updated debconf translations:  (Closes: #353611)
+    - Brazilian Portuguese, by André Luís Lopes  (Closes: #352416)
+    - Czech, by Miroslav Kure
+    - Danish, by Morten Brix Pedersen
+    - Dutch, by Bart Cornelis
+    - French, by Denis Barbier
+    - German, by Helge Kreutzmann
+    - Polish, by Emilian Nowak
+    - Portuguese, by Simão Pedro Cardoso
+    - Spanish, by Carlos Valdivia Yagüe
+    - Swedish, by Daniel Nylander
+    - Ukrainian, by Eugeniy Meshcheryakov
+
+  [ Clint Adams ]
+  * Add hurd-getresuid-dyslexia.diff (fixes incorrect ordering of
+    arguments) with patch from Samuel Thibault.  (Closes: #352500)
+  * Add hppa-no-ldbl-128.diff (stops implying that PA needs
+    128-bit long double support in glibc) from Aurelien Jarno.
+    (Closes: #344836).
+  * debian/local/manpages/locale.1: remove double quotes from
+    synopsis.  (Closes: #352597)
+
+  [ Aurelien Jarno ]
+  * Move dependency on lib64gcc1 from libc6-amd64 to libc6-dev-amd64 to
+    avoid a dependency loop.  (Closes: #352263)
+  * Use sed and test in /etc/init.d/glibc.sh to compare kernel versions.
+    Put the Debian architecture name in the script at build time instead
+    of using 'dpkg --print-architecture'. Thanks to Florent Bayle for
+    the idea.  (Closes: #325802, #328088, #339482)
+  * Fix example code showing how to use hooks for malloc.  (Closes:
+    bug#333565).
+  * Add hurd-ioctl-decode-argument.diff (fixes decoding of ioctl
+    arguments) from Samuel Thibault.  (Closes: #320273)
+  * Fix the prototype of sbrk() in the manual.  (Closes: #281863)
+  * Fix the strcasestr() examples in the manual.  (Closes: #289853)
+  * Install libc_nonshared.a in /usr/lib/nptl, and fix the location
+    of the static libraries of the NPTL ld scripts. (Closes: #347762)
+  * Update debian/ files for GNU/kFreeBSD.  (Closes: #351638)
+  * Regenerate debian/control, generate debian/control.in/libc0.1.
+  * Lintian cleans:
+    - Remove build-dependencies on tar and debianutils, they are
+      build-essential packages
+    - Fix FSF postal address
+    - Use policy compliant links in libc6-dev-amd64
+    - Use an absolute symlink for /lib64 on amd64
+  * Add myself to Uploaders.
+  * Switch to gcc-4.0 on powerpc.
+  * Remove old hack for gcc-3.4 on amd64.
+  * Build with the compiler defined as default for glibc (ie currently
+    gcc-4.0) instead of gcc on amd64.
+  * Decrease priorities of 64-bit main and -dev packages to standard
+    and optional for all architectures. It better matches override,
+    though it will still have to be changed.
+  * Fix glibc235-hppa-lt.diff (restore ret0 across calls to CDISABLE)
+    from Randolph Chung.  (Closes: #326581)
+  * Switch to gcc-4.0 on hppa.
+  * Add support for extra_pkg_install hooks for udeb packages.
+  * Build back with -g1 on amd64, it was removed to permit the build with
+    gcc-3.4.
+  * Remove --with-tls and --with-__thread in sysdeps/* as they are the
+    default option since version 2.3.5.
+  * Multiarch support:
+    - Add ld-multiarch.diff (add (/usr)/lib/$(config-machine)-$(config-os))
+      to the search path of the dynamic linker) from Tollef Fog Heen.
+      (Closes: #295855)
+    - Add ldconfig-multiarch.diff (add directories pointed from /lib/ldconfig
+      to the search path).
+    - Create (/usr)/lib/$(config-machine)-$(config-os) and add symlinks to
+      these directories in /lib/ldconfig/
+    - Add rtld.diff (add a new configuration variable rtlddir to change the
+      dynamic linker in the ELF binaries) partly from Andreas Jochen. This is
+      necessary to be able to install a glibc in the multiarch dir while still
+      conforming to the various ABIs which specify a linker in /lib or /lib64.
+  * Remove the patch to install the libc into /lib instead of /lib64 on
+    amd64. Use the new libdir, slibdir and rtlddir options in configparm to
+    install the glibc in (/usr)/lib, and to use the dynamic linker path
+    specified by the ABI for path for libc objects.  (Closes: #325226)
+  * Add -u option to the ldd manpage.  (Closes: #354074)
+  * Merged a patch from Michael Banck to use gcc-4.0 on Hurd.
+  * Add resource_h.diff (RLIMIT_NICE and RLIMIT_RTPRIO support) from MAIN.
+    (Closes: #352636)
+  * Add hppa-inlining.diff (Increase the maximal overall growth of the
+    compilation unit caused by inlining for dl-reloc.c on hppa).
+  * Build a 32-bit libc on amd64, using the new multiarch directories.
+    (Closes: #274367)
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 23 Feb 2006 17:47:58 +0100
+
+glibc (2.3.6-1) unstable; urgency=low
+
+  [ Denis Barbier ]
+  * debian/debhelper.in/libc.postinst: Restart webmin on upgrade.
+    (Closes: #345641)
+  * debian/debhelper.in/libc.postinst: Restart dropbear on upgrade.
+    (Closes: #351036)
+  * Fix yesexpr/noexpr in tl_PH locale.  Reported by eric pareja.
+    (Closes: #295810)
+  * Fix langinfo(_NL_TIME_FIRST_WEEKDAY) for C locale.  Reported by
+    Graham Wilson (Closes: #327025)
+  * Add first_weekday fields to most locales.
+    (Closes: #343885, #347323, #347686, #348518, #351375)
+  * Apply various fixes to French locales.  (Closes: #248377)
+  * Fix d_t_fmt and date_fmt in fo_FO. Reported by Jacob Sparre Andersen.
+  * New sa_IN locale file, provided by Vidya Ayer and Christian Perrier.
+    (Closes: #331377)
+  * Add several locales to SUPPORTED:
+    - ru_RU.CP1251, requested by Michael Bravo.  (Closes: #225516)
+    - uz_UZ.UTF-8 (its ISO-8859-1 counterpart had no UTF-8 variant)
+    - da_DK.ISO-8859-15, en_GB.ISO-8859-15, en_US.ISO-8859-15, no_NO.UTF-8,
+      no_NO and sv_SE.ISO-8859-15 are found in fedora-branch CVS branch.
+  * Apply several improvements to hy_AM found in upstream Bugzilla.
+  * Fix LC_MONETARY section of en_DK and provide en_DK.ISO-8859-15.
+    (Closes: #323159)
+  * Improve localedef(1) manual page, by Lars Wirzenius (Closes: #309846)
+  * Fix LC_MONETARY section of pl_PL. Reported by Michał Politowski.
+    (Closes: #227214)
+  * New wo_SN locale file, provided by Samba Ndao Diop and Christian
+    Perrier.  (Closes: #279697)
+  * Add new ca_AD, ca_FR and ca_IT locale files, sent upstream by Robert
+    Millan.
+  * New csb_PL locale file, sent upstream by Andrzej Krzysztofowicz.
+  * Rewrite collation rules of several locales to include iso14651_t1.
+    This eases maintenance and saves about 1MB for installed size.
+  * Sort SUPPORTED to list UTF-8 locales first.  This change partly
+    solves #312927.
+  * Modify localedata/locales/no_NO to copy definitions from nb_NO.
+  * Fix lang_* fields in gez_ER, gez_ET, tr_TR and wal_ET.
+  * Fix unknown symbols in collation rules of several locales: da_DK,
+    fa_IR, is_IS, lo_LA, lv_LV, nb_NO and sr_CS.
+  * Apply updates for st_ZA, xh_ZA and zu_ZA sent upstream by Dwayne Bailey.
+  * Add new nr_ZA locale, sent upstream by Dwayne Bailey.
+  * Rewrite collation rules for dz_BT, in collaboration with Pema Geyleg.
+  * Revert upstream change of postal_fmt in te_IN because localedef
+    complains.  (Closes: #348804)
+  * New debconf translations:
+    - Italian, by Luca Monducci  (Closes: #329428)
+    - Swedish, by Daniel Nylander  (Closes: #334864)
+  * Slightly reword locales.templates to be DTSG-compliant, thanks Thomas
+    Huriaux.
+  * Updated debconf translations:  (Closes: #350103)
+    - Brazilian Portuguese, by André Luís Lopes  (Closes: #352416)
+    - Czech, by Miroslav Kure
+    - Danish, by Morten Brix Pedersen
+    - Dutch, by Bart Cornelis
+    - French, by Denis Barbier
+    - German, by Helge Kreutzmann
+    - Polish, by Emilian Nowak
+    - Turkish, by Erçin EKER
+    - Ukrainian, by Eugeniy Meshcheryakov
+    - Vietnamese, by Clytie Siddall
+  * Update timezone data files to tzdata2006a.  (Closes: #345479, #347315, #351049)
+  * Drop Build-Depends-Indep: po4a from control file, translated manual pages
+    are currently not built.
+
+  [ Clint Adams ]
+  * Move to upstream version 2.3.6.
+    - Redo debian/patches/localedata/cvs-localedata.diff
+    - Remove glibc235-gcc4-cvs.diff
+    - Remove glibc235-gcc4-jis0208.diff
+    - Remove glibc235-binutils216-ia64.diff
+    - Remove glibc235-gcc4-ia64-profile.diff
+    - Remove glibc235-gcc4-ppc-procfs.diff
+    - Remove glibc235-execvp-fix.diff
+    - Delete CSD (Serbian Dinar) hunk from locale-iso4217.diff
+    - Redo glibc235-dl-execstack.diff
+    - Remove glibc235-alpha-divqu.diff
+    - Remove amd64-semtrywait-weakalias.diff
+    - Remove strfry-segv.diff
+    - Remove ia64-binutils-libm.diff
+    - Remove glibc235-leapsecond.diff
+    - Delete several hunks from glibc235-gcc4-sparc-inline.diff
+    - Remove hurd-libpthread-indirect-loading.diff
+    - Remove glibc235-gcc4-hurd.diff
+    - Delete several hunks from glibc235-gcc4-arm-inline.diff
+    - Remove glibc235-gcc4-s390-inline.diff
+  * Add hppa-pie-relocs.diff, thanks to Aurelien Jarno.  This
+    fixes nscd on hppa.  (Closes: #350501)
+
+  [ Daniel Jacobowitz ]
+  * Remove mips-bits-syscall.diff, merged.
+
+  [ GOTO Masanori ]
+  * Update po/ja.po.
+
+ -- Clint Adams <schizo@debian.org>  Thu,  9 Feb 2006 21:45:45 -0500
+
+glibc (2.3.5-13) unstable; urgency=low
+
+  [ Clint Adams ]
+  * Acknowledge NMU.  (Closes: #342545)
+
+  [ Denis Barbier ]
+  * debian/rules.d/control.mk: Make sure that debian/control is regenerated.
+    (Closes: #351704)
+
+ -- Denis Barbier <barbier@debian.org>  Mon,  6 Feb 2006 22:22:23 +0100
+
+glibc (2.3.5-12.1) unstable; urgency=low
+
+  * NMU
+  * glibc235-hppa-fpu.diff: New, fixes hppa FPU issues.  Closes: #342545
+
+ -- LaMont Jones <lamont@bld-4.mmjgroup.com>  Wed,  1 Feb 2006 09:47:57 -0700
+
+glibc (2.3.5-12) unstable; urgency=low
+
+  * debian/patches/glibc235-nis-netgrp.diff: New file to fix assertion
+    failures with NIS.  (Closes: #322011)
+  * Switch to quilt to handle Debian patches.
+    - debian/control.in/main: add Build-Depends: quilt.
+    - Replace debian/rules.d/dpatch.mk by debian/rules.d/quilt.mk.
+    - Rename debian/patches/*.dpatch into debian/patches/*.diff.
+    - Move localedata patches into debian/patches/localedata/
+  * debian/patches/localedata/cvs-localedata.diff: Update to latest CVS.
+    Among other changes:
+    - locales/mn_MN: Fix date_fmt.  (Closes: #328831)
+    - locales/de_DE: Add transliterations for quoting characters.
+      (Closes: #235759)
+    - locales/ss_ZA locales/tn_ZA locales/ve_ZA locales/nso_ZA
+      locales/ts_ZA: New files.  (Closes: #254417)
+    - locales/km_KH: New file.  (Closes: #334762)
+    - locales/mg_MG: New file.  (Closes: #271549)
+    - locales/sr_CS: New file.  (Closes: #254993)
+  * debian/patches/locale-iso4217.diff: Update to latest CVS.
+    This includes changes from glibc235-localedata-sr_CS.diff, which
+    is no more needed.
+  * debian/patches/locale-iso639.diff: New file.
+  * debian/patches/locale-ku_TR.diff: New file, to provide a Kurdish
+    locale needed by d-i.  This locale comes from upstream CVS, and has
+    been updated to the latest patch sent to BZ870.
+  * debian/patches/localedata/locale-eo_EO.diff: Apply minor updates to
+    this locale file.  Add eo and eo.UTF-8 to SUPPORTED.  (Closes: #233308)
+  * Import collation fixes and enhancements for localedef from
+    belocs-locales-bin.
+  * debian/patches/forward-backward-collation.diff: New file.  Due to the
+    fixes in localedef, some bugs in code which was previously never run
+    did show up.  (Closes: #310635)
+  * debian/patches/locale/locale-print-LANGUAGE.diff: New file, so that
+    locale displays the LANGUAGE environment variable when called without
+    argument.
+  * Add myself to Uploaders.
+
+ -- Denis Barbier <barbier@debian.org>  Sun, 15 Jan 2006 00:54:16 +0100
+
+glibc (2.3.5-11) unstable; urgency=low
+
+  [ Phil Blundell ]
+  * Apply patch from Colin Watson to add "--keep-existing" option to
+    locale-gen.  (Closes: #298913)
+  * Also restart exim4 on upgrade.  (Closes: #326554)
+  * debian/debhelper.in/libc.preinst: Clarify wording of message about
+    detection of services needing to be stopped before upgrade.
+
+  [ GOTO Masanori ]
+  * debian/po/pt.po: New file, add Portuguese translation.
+    Patched by Rui Branco <ruipb@debianpt.org>.  (Closes: #339110)
+
+  [ Clint Adams ]
+  * Patch from Lars Wirzenius to not rely on bash-like echo
+    behavior.  (Closes: #207391).
+  * Add allowance for the 2005 leap second.  (Closes: #345310)
+
+ -- Clint Adams <schizo@debian.org>  Sun,  1 Jan 2006 11:29:08 -0500
+
+glibc (2.3.5-10) unstable; urgency=low
+
+  [ GOTO Masanori ]
+  * debian/local/etc_init.d/glibc.sh: Change the last 'exit 0' to
+    ': exit 0' to not block sourcing.  (Closes: #340147)
+
+  [ Phil Blundell ]
+  * Merge patch from upstream CVS (courtesy Daniel Jacobowitz) to
+    fix weak alias related build problem on ARM.
+  * Merge patch from upstream CVS (courtesy Ulrich Drepper) to fix
+    strfry() crash.  (Closes: #343365)
+  * Merge patch from upstream CVS (courtesy Roland McGrath and Anton
+    Blanchard) to fix problem with execute permissions on GOT when using
+    64kB pages on PowerPC.  (Closes: #344105)
+  * Require binutils 2.16.1cvs20051109-1 to ensure that i386 biarch
+    linking works properly.
+  * debian/script.in/kernelcheck.sh: Require kernel >= 2.4.0 on arm to
+    avoid llseek problem.  (Closes: #324795)
+  * Also restart atd on upgrade.  (Closes: #331293)
+  * Merge patch from upstream CVS (courtesy Ulrich Drepper) to fix
+    problems with accuracy of tanh and related functions, per request of
+    Rafael Laboissiere.  (Closes: #328504)
+  * Add "validlocale" program (ex base-config) to locales package, per
+    request of Joey Hess.  (Closes: #344954)
+  * sysdeps/hppa.mk: Add new /usr/hppa64-linux-gnu/include symlink, per
+    request of Matthias Klose.  (Closes: #326583)
+
+  [ Clint Adams ]
+  * Steal glibc-235-sparc-datastart.dpatch from Ubuntu.
+  * Steal ia64 libm symbol patch from Ubuntu.
+  * Compile with -g2 instead of -g1 on sparc.
+
+ -- Clint Adams <schizo@debian.org>  Wed, 28 Dec 2005 13:18:56 -0500
+
+glibc (2.3.5-9) unstable; urgency=low
+
+  [ Daniel Jacobowitz ]
+  * Downgrade priority of amd64 libraries on i386.
+  * Move packages from base to libs.
+
+  [ Clint Adams ]
+  * Remove sparc64 TLS patch, and disable TLS for sparc64 build
+    (Closes: #340835, #341514).
+  * Add patch to fix build failure with __bind and other
+    socket-related symbols being already defined on
+    sparc (Closes: #342755).
+  * Add patch from Anton Blanchard to fix build failure with
+    __bind and other socket-related symbols being already
+    defined on powerpc (Closes: #343571).
+  * Replace amd64 sem_trywait patch from Kurt Roeckx's NMU with
+    fix from upstream glibc CVS (Closes: #339389).
+  * Add patch from Anton Blanchard to fix build failures with
+    "__moddi3" and friends being already defined on i386
+    and powerpc (Closes: #339415).
+  * Bump Standards-Version to 3.6.2 and add myself to Uploaders.
+
+ -- Clint Adams <schizo@debian.org>  Sat, 17 Dec 2005 10:33:38 -0500
+
+glibc (2.3.5-8.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Rename sem_trywait to __new_sem_trywait in amd64 nptl code
+    so the alias works properly, and it can be build.
+    (Closes: #339389)
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Sun, 27 Nov 2005 11:22:03 +0100
+
+glibc (2.3.5-8) unstable; urgency=low
+
+  * Add missing build dependency on libc6-dev-ppc64 on powerpc.
+  * Add patch to fix sparc64 TLS build failure, from Aurelien Jarno
+    (Closes: #335821).
+  * Also restart saslauthd at upgrades, from Philipp Hug (Closes: #334101).
+  * Merge .eh_frame terminator fix, by Richard Sandiford (Closes: #334112).
+  * Merge armeb support, from Lennert Buytenhek (Closes: #335116).
+  * Add LSB headers to glibc.sh and nscd init scripts, from Petter
+    Reinholdtsen (Closes: #335308, #335343).
+  * Remove obsolete mountkernfs, tmpfs, and devpts.sh files from debian/.
+  * Temporarily set hppa back to gcc 3.4, from Steve Langasek
+    (Closes: #326581).
+  * Re-enable libidn (Closes: #181025).
+
+ -- Daniel Jacobowitz <dan@debian.org>  Sat, 12 Nov 2005 19:15:29 -0500
+
+glibc (2.3.5-7) unstable; urgency=low
+
+  [ GOTO Masanori ]
+  * debian/script.in/kernelcheck.sh: Drop real-i386 kernel support.
+
+  [ Daniel Jacobowitz ]
+  * Build 64-bit packages on i386 - based on patches from both Ubuntu
+    and Andreas Jochens <aj@andaco.de>.
+    - Build depend on a biarch linux-kernel-headers package.
+    - Build depend on new libc6-dev-amd64 package.
+    - Conflict with amd64-libs to avoid stale libraries.
+    - Replace files from amd64-libs-dev.
+    - Use lib64 for 64-bit libraries on i386.
+    - Search lib64 for ldconfig.
+    - Install 64-bit headers in /usr/include/x86_64-linux-gnu.
+  * Remove obsolete references to NPTL as an add-on.
+  * Conflict with broken versions of libterm-readline-gnu-perl
+    (Closes: #326856, #326492).
+  * Merge makefile patch from Goswin Brederlow
+    <brederlo@informatik.uni-tuebingen.de> to fail earlier if builds fail
+    (but omit the bit for make -k check) (Closes: #325460).
+  * Update debconf dependency to work with cdebconf (Closes: #331838).
+  * Merge MIPS <bits/syscall.h> fix from CVS (Closes: #329043).
+  * Do not complain about incompatible libraries in /etc/ld.so.conf
+    (Closes: #310047).
+  * Update hppa assembly for current CVS binutils.
+  * Use 8-byte-aligned buffers for doubleword FPU transfers on HPPA
+    (Closes: #333766).
+
+ -- Daniel Jacobowitz <dan@debian.org>  Fri, 14 Oct 2005 14:18:22 -0400
+
+glibc (2.3.5-6) unstable; urgency=low
+
+  * GOTO Masanori <gotom@debian.org>
+
+    * debian/script.in/kernelcheck.sh: Use sed instead of bash extension.
+      (Closes: #325373, #325471, #325504, #325511)
+
+ -- GOTO Masanori <gotom@debian.org>  Mon, 29 Aug 2005 12:40:32 +0900
+
+glibc (2.3.5-5) unstable; urgency=low
+
+  * GOTO Masanori <gotom@debian.org>
+
+    * debian/debhelper.in/debhelper.mk: Don't expand debug-packages with
+      DEB_INDEP_REGULAR_PACKAGES.  It causes binary-indep is unexpectedly
+      included.  (Closes: #233390, #233391, #233392)
+
+    * Add the correct new line.  (Closes: #324450)
+      - debian/control.in/sparc64: Likewise.
+      - debian/control: Update.
+
+    * Support Hurd again.  (Closes: #324165)
+      - debian/sysdeps/gnu.mk: Rename to...
+      - debian/sysdeps/hurd.mk: ... this.
+
+    * debian/local/usr_sbin/locale-gen: Don't break locale-gen when locale-def
+      warns errors.
+
+    * debian/patches/glibc235-localedata-sr_CS.dpatch: New file, to fix
+      sr_CS localedef breakage.  (Closes: #321580, #322655)
+    * debian/patches/glibc235-localedata-locales.dpatch: New file, to fix
+      mn_MN and sid_ET localedef breakage.  (Closes: #321634)
+
+    * debian/sysdeps/powerpc.mk: Enable PowerPC NPTL.
+      (Closes: #246689, #307984)
+
+    * debian/README: Add the description about dropping __ctype_* symbol support
+      of static linked application/libraries in etch.  (Closes: #324526)
+
+    * debian/sysdeps/linux.mk: Check SETNJOBS environment variable to specify
+      the number of parallel make by users.
+
+    * debian/sysdeps/depflags.pl: Add Conflicts: e2fsprogs (<< 1.35-7)
+      because new ldd cannot work with old e2fsprogs.  (Closes: #324550)
+
+    * debian/patches/glibc235-alpha-divqu.dpatch: New file, to fix alpha
+      divqu/remqu that does not return the correct result when their dividend
+      and divisor are the same and 63bit is 1.  (Closes: #324455)
+
+    * Hurd requires gcc-3.3 to compile instead of gcc-4.0.  Requested by
+      Michael Banck <mbanck@debian.org>.
+      - debian/sysdeps/hurd.mk: Change CC/BUILD_CC to gcc-3.3.
+      - debian/control.in/main: Build-Depends falls back to gcc-3.3.
+      - debian/control: Update.
+
+    * Introduce bootstrap kernel version check script.
+      - debian/debhelper.in/libc.preinst: Move detection script to...
+      - debian/script.in/kernelcheck.sh: ...this, new file.
+      - debian/local/etc_init.d/glibc.sh: New file, it includes kernelcheck.sh.
+      - debian/debhelper.in/libc.postinst: Invoke /etc/init.d/glibc.sh as S01.
+      - debian/rules.d/debhelper.mk: Add replacing KERNEL_VERSION_CHECK and
+        EXIT_CHECK for libc.preinst and glibc.sh.
+      - debian/debhelper.in/libc.dirs: Create etc/init.d.
+
+    * Don't use absolute path name.
+      - debian/debhelper.in/libc.dirs: Suppress the first slash.
+      - debian/debhelper.in/libc-pic.dirs: Likewise.
+      - debian/debhelper.in/nscd.dirs: Likewise.
+      - debian/debhelper.in/locales.dirs: Likewise.
+
+    * Michael Banck <mbanck@debian.org>:
+      - debian/patches/glibc235-gcc4-hurd.dpatch: New file, to build glibc
+        on Hurd with gcc-4.0.  (Closes: #324549)
+
+ -- GOTO Masanori <gotom@debian.org>  Sun, 21 Aug 2005 12:33:42 +0900
+
+glibc (2.3.5-4) unstable; urgency=low
+
+  * The "hppa is important to someone, really - LaMont" release.
+
+  * GOTO Masanori <gotom@debian.org>
+
+    * d-i wants to remove libnss-files-udeb and libnss-dns-udeb dependency
+      from libc-udeb.  Suggested by Joey Hess <joeyh@debian.org>.
+      (Closes: #322506)
+      - debian/control.in/libc: Remove libnss-files-udeb libnss-dns-udeb
+        dependency.
+      - debian/control: Update.
+
+    * Build-Depends fixes:
+      - debian/control.in/main: Change gcc-* dependency from | to ,.
+        Suggested by Andreas Jochens <aj@andaco.de>.
+      - debian/control.in/main: Add gcc-4.0 (>= 4.0.1-5) [hppa], because prior
+        versions cannot generate sane glibc binaries.
+      - debian/control: Update.
+
+    * Enable libnss upgrade guard again.
+      (Closes: #321561, #321712, #321796, #322768, #323560)
+      - debian/debhelper.in/libc.preinst: Change guard to 2.3.5-1.
+      - debian/debhelper.in/libc.postinst: Likewise.
+      - debian/debhelper.in/libc.postinst: Fix to invoke NSS check again.
+
+    * debian/debhelper.in/nscd.dirs: Add /var/db/nscd.
+      (Closes: #323352, #323487)
+
+    * debian/debhelper.in/locales.prerm: Add purge to remove locale-archive.
+      (Closes: #321719)
+
+    * debian/patches/00list: Drop glibc234-hppa-remove-mallocdef.dpatch.
+      It causes unconditional locking problem, because it was already replaced
+      by Carlos' new patches.  Reported by LaMont Jones <lamont@debian.org>.
+
+    * Add Depends: lib64gcc1 and provide lib64c-dev for 64bit -dev packages.
+      Suggested by Matthias Klose <doko@cs.tu-berlin.de>.  (Closes: #323552)
+      - debian/control.in/sparc64: Likewise.
+      - debian/control.in/ppc64: Likewise.
+      - debian/control.in/s390x: Likewise.
+      - debian/control: Update.
+
+    * debian/patches/glibc235-dl-execstack.dpatch: New file, to fix execstack
+      failed to check on kernel <= 2.4.18.  (Closes: #321717, #321718, #323409)
+
+    * Roland Stigge <stigge@antcom.de>:
+      - debian/debhelper.in/glibc-doc.install: Install HTML documents
+        correctly.  (Closes: #321740)
+
+ -- GOTO Masanori <gotom@debian.org>  Sat,  6 Aug 2005 06:52:42 +0900
+
+glibc (2.3.5-3) unstable; urgency=low
+
+  * The "Keep Debconf5 speed" and the "Welcome back the recent glibc to
+    unstable" release.
+  * Glibc bumps up from 2.3.2.ds1 to 2.3.5 on etch.
+
+  * GOTO Masanori <gotom@debian.org>
+
+    * Localedata update:
+      - debian/patches/cvs-localedata.dpatch: New file, to update localedata
+        to the latest cvs.  Reported by Safir Secerovic <esafir@yahoo.com>,
+        Reviewed by Denis Barbier <barbier@linuxfr.org>.  (Closes: #312902)
+      - debian/patches/locale-iso4217.dpatch: New file, to fix localedef
+        breakage for tr_TR.ISO-8859-9.  (Closes: #314855)
+
+    * To make glibc-2.3.5 buidable with gcc-4.0:
+      - debian/patches/00list: Drop glibc234-hppa-full-nptl-2004-12-20.dpatch
+        line replaced by the new patches: glibc235-hppa-sysdeps.dpatch and
+        glibc235-hppa-lt.dpatch.  It'll be removed when hppa unstable works
+        nicely.
+      - debian/patches/glibc235-gcc4-sparc-inline.dpatch: Update the patch
+        to compile sparc64.
+      - debian/patches/glibc235-gcc4-s390-inline.dpatch: New file, fix s390
+        compilation breakage by changing static inline to auto inline for
+        dl-machine.h.
+      - debian/patches/glibc235-gcc4-alpha-profile.dpatch: New file, fix
+        alpha compilation breakage by removing strong_alias.
+      - debian/patches/glibc235-gcc4-hppa-profile.dpatch: New file, fix hppa
+        compilation breakage by removing strong_alias.
+      - debian/sysdeps/alpha.mk: Disabled __thread for static linked
+        executables.
+      - debian/control.in/main: Add Build-Depends: gcc-3.4 for powerpc and
+        m68k.
+      - debian/control: Regenerated.
+
+    * To make glibc-2.3.5 buildable with gcc-3.4:
+      - debian/sysdeps/m68k.mk: New file, to use gcc-3.4 as CC and BUILD_CC
+        due to gcc-4.0 ICE.  See #319312.
+      - debian/patches/glibc235-gcc34-m68k-seccomment.dpatch: New file, fix
+        m68k binutils comment parse error.
+
+    * Introduce RUN_TESTSUITE for disabling make check, taken from Jeff
+      Bailey <jbailey@ubuntu.com>:
+      - debian/rules: Enable RUN_TESTSUITE in default.
+      - debian/rules.d/build.mk: Check RUN_TESTSUITE before invoking tests.
+      - debian/sysdeps/hppa.mk: Disable RUN_TESTSUITE because linuxthreads
+        cannot work correctly.
+      - debian/sysdeps/alpha.mk: Likewise.
+
+    * Introduce loose locales version dependency to avoid locales version
+      mismatch for FTBFS architectures, taken from Jeff Bailey
+      <jbailey@ubuntu.com> (Closes: #204696, #308824):
+      - debian/locales-depver: New file, describes minimum locales dependency
+        version.  It's renamed from locales-shlibver because it's not "shlib".
+      - debian/rules.d/debhelper.mk: Use LOCALES_DEP_VER to generate locales
+        dependency.
+      - debian/rules: Include debian/locales-depver.
+
+    * debian/rules.d/build.mk: Add --without-selinux for nscd.  It should be
+      removed after this version ASAP.
+
+    * debian/sysdeps/depflags.pl: Drop Depends: libdb1-compat because it's
+      until sarge stuff.  Suggested by Colin Watson <cjwatson@debian.org>.
+      (Closes: #318885)
+
+    * debian/debhelper.in/nscd.dirs: New file, add /var/run/nscd dir to
+      invoke nscd correctly.  (Closes: #314892)
+
+    * debian/local/manpages/locale.gen.5: Fix typo, charsets -> charmaps.
+      (Closes: #312297, #318982)
+
+    * debian/debhelper.in/libc.preinst: Remove dpkg --assert-support-predepends
+      check like base-passwrd, suggested by Bastian Blank <waldi@debian.org>.
+      (Closes: #316217)
+
+    * debian/patches/locales-supported.dpatch: Don't apply to drop UTF-8@euro
+      locales from SUPPORTED.  (Closes: #274491)
+
+    * debian/debhelper.in/libc.preinst: Fix typo.  (Closes: #306136)
+    * debian/debhelper.in/libc.postinst: Likewise.
+
+    * Michael Banck <mbanck@debian.org>:
+      - debian/patches/hurd-enable-ldconfig.dpatch: New file, to build ldconfig
+        again on Hurd.  (Closes: #309489)
+      - debian/sysdeps/gnu.mk: Hurd-i386 needs --without-tls option to build.
+      - debian/patches/hurd-libpthread-indirect-loading.dpatch: New file, to
+        make libpthread load indirectly on Hurd.  (Closes: #312488)
+      - debian/patches/hurd-ioctl-pfinet.dpatch: New file, to support part of
+        SIOCGIFHWADDR for pfinet on Hurd.  (Closes: #295117)
+
+    * Jeff Bailey <jbailey@ubuntu.com>:
+      - debian/patches/glibc235-hppa-sysdeps.dpatch: New file, to build hppa
+        linuxthreads locking problem and sysdeps correctly again.
+      - debian/patches/glibc235-hppa-lt.dpatch: New file, likewise.
+
+    * Denis Barbier <barbier@debian.org>:
+      - debian/debhelper.in/locales.config: Use LANG=C for locale-dependent
+        commands.  (Closes: #314717)
+      - debian/debhelper.in/locales.postinst: Likewise.
+      - debian/debhelper.in/locales.postinst: Fix repeated locale entry
+        duplication when at least a locale is defined twice in /etc/locale.gen.
+        (Closes: #271526)
+
+    * Stephen Gildea <gildea@stop.mail-abuse.org>:
+      - debian/debhelper.in/nscd.init: Provides a "status" option, fix the exit
+        status if the script is given an unsupported option.  (Closes: #312404)
+
+    * Serge Belyshev <belyshev@depni.sinp.msu.ru>:
+      - debian/patches/glibc235-execvp-fix.dpatch: Fix execvp segv caused by
+        invalid free pointer.
+
+    * This version fixes some bugs that are already marked as
+      fixed-in-experimental and explained the reason in this changelog.
+      (Closes: #144670, #185991, #258647, #276062, #279423, #280030, #298784)
+      (Closes: #300806, #300842, #304963, #305400, #305662, #305666, #309618)
+      (Closes: #311793, #313404, #314084, #315347, #315793)
+
+    * This version fixes some bugs that are already confirmed as fixed
+      (fixed-in-experimental) in the experimental glibc:
+      - Can compile rpc/xdr.h with gcc-4.0.  (Closes: #315198, #320963)
+      - Support posix_fadvise64 correctly on 2.4 kernel.
+          (Closes: #312406, #313219)
+      - Can static link with the recent toolchain changed with TLS/non-TLS
+        errno definition on amd64 and ia64.
+        (Closes: #317674, #317946, #318956, #318963, #319115)
+      - Fix mktime when setting a timezone value to AC_FUNC_MKTIME.
+        (Closes: #177940)
+      - Fix libc6-i686 to reexec init.  (Closes: #270745)
+
+    * This version fixes some bugs that are marked as fixed-upstream:
+      - Fix ucontext.h failure with g++-4.0 on ia64.
+        (Closes: #318429, #320240)
+
+      - Missing icache flushing on PPC caused sometimes segv, and now cache
+        management is reworked and fixed.  (Closes: #146489)
+      - Fix alpha atan() that gave wrong results for some operands.
+        (Closes: #210613)
+      - Fix PPC rint() that gave wrong result for negative arguments in the
+        rounding toward -inf and +inf mode.  (Closes: #216800)
+      - Fix that the pmaplist frees the freed memory in xdr_pmaplist.
+        (Closes: #230219)
+      - Don't export unneeded symbol _fp_hw on s390.  (Closes: #247681)
+      - Set locale correctly for generated threads in static linked binaries.
+        (Closes: #260221)
+      - Make g++ compilation with nptl pthread.h by changing initializers.
+        (Closes: #276309)
+      - Fix a race condition with pthread_cond_broadcast.  (Closes: #276312)
+      - Fix re_exec() segv that caused on UTF-8 locales.
+        (Closes: #175163, #237681, #290551, #299137, #310443)
+      - Implement getcontext on alpha.  (Closes: #293653)
+      - Fix an incorrect value of ceill and floorl on amd64.  (Closes: #302458)
+      - Fix memory leaks in getaddrinfo/freeaddrinfo.  (Closes: #304022)
+      - Fix mips/mipsel incomplete clobbered registers for syscalls.
+        (Closes: #304426)
+      - Support working sched_setaffinity on powerpc.  (Closes: #311053)
+      - Support _SC_HOST_NAME_MAX in sysconf.  (Closes: #314350)
+      - Fix pthread_rwlock_wrlock hangs with NPTL on amd64.  (Closes: #314408)
+
+      - Check timezone changes for localtime and friends.  (Closes: #48184)
+      - Fix a race condition of sigaction and signal handler.
+        (Closes: #136990)
+      - Fix segmentation fault when invoking nscd -d.
+        (Closes: #156923, 245208)
+      - Support POSIX style strerror_r implementation.
+        (Closes: #159298, #169370, #182542, #202209)
+      - Enable to use short IPv4 address notation again.  (Closes: #192091)
+      - Fix broken pthread_cleanup_push on Alpha.  (Closes: #197988)
+      - Support POSIX message queues.  (Closes: #202197, #280137)
+      - Don't use ?: in bits/mathinline.h.  (Closes: #206015, #304500)
+      - Update Norwegian translation that fixes confusing text.
+        (Closes: #207266)
+      - Enable executable again for libc.so.*.  (Closes: #215463, #264948)
+      - Improve putchar and io performance by changes to pthread locking code.
+        (Closes: #219205)
+      - Update sys/vm86.h.  (Closes: #219476)
+      - Fix invalid __libc_dlclose() in nsswitch.c.  (Closes: #222130)
+      - Support backtrace on ia64 and x86_64.  (Closes: #235876)
+      - Fix nl_langinfo(ERA) returns NULL, not "".  (Closes: #245836)
+      - Libintl.h is ready for some g++ compilation option.  (Closes: #252753)
+      - Fix pthread_cond_timedwait and mutex hang with cancellation.
+        (Closes: #253303)
+      - Fix too long fraction digits handling in strtold().  (Closes: #260377)
+      - Fix some regexec() segv in UTF-8 locales.  (Closes: #261135)
+      - Fix pthread_cond_timedwait with a outdated timespec destroys the
+        pthread_cond_t variable. (Closes: #261237)
+      - Declare EPOLLONESHOT in sys/epoll.h.  (Closes: #261541)
+      - Fix returning invalid pointer when freeing valloc()-ed memory.
+        (Closes: #262782)
+      - Replace gcc-3.4 option for ppc64.  (Closes: #263959)
+      - Fix zdump -v segv on ia64.  (Closes: #266438)
+      - Support pthread_create with attributes.  (Closes: #266507)
+      - Change __vector to __iovec for sys/io.h to prevent conflicts with
+        altivec.  (Closes: #267442)
+      - Fix atan2 infinit loop on amd64.  (Closes: #270823)
+      - Avoid memory leak for some gconv encoding by calling gconv_end.
+        (Closes: #274390)
+      - Fix mplayerplug-in crash closed by mozilla.  (Closes: #275240)
+      - Fix invalid memory access of printf when its specifier combines
+        parameter number specification and floating point values.
+        (Closes: #277667, #312036)
+      - Don't touch unrelated bits in __feclearexcept on i386.
+        (Closes: #279294)
+      - Don't invoke unneeded cancellation if PTHREAD_CANCEL_DISABLE is set.
+        (Closes: #281775)
+      - Fix a race condition between pthread_create and pthread_exit.
+        (Closes: #282091, #292154)
+      - Fix for setfacl to handle many files in ntfw64.  (Closes: #288710)
+      - Support large dev_t.  (Closes: #289945, #299139)
+      - Use the correct ifndef __GNUC_PREREQ.  (Closes: #315345)
+
+      - Fix the indended first line of ldd output.  (Closes: #209145, #276223)
+      - Fix misleading error message of ldd when kernel version is old.
+        (Closes: #224665)
+      - Fix typo of the language name in te_IN.  (Closes: #276527)
+      - Replace old --help message that indicated glibcbug script.
+        (Closes: #315448)
+
+      - Support IDN.  (Closes: #181025)
+      - Support O_NOATIME.  (Closes: #284131, #297010, #298488)
+      - The first day of a week in Finnish is Monday.  (Closes: #288472)
+
+ -- GOTO Masanori <gotom@debian.org>  Sun, 17 Jul 2005 17:27:30 +0900
+
+glibc (2.3.5-2) experimental; urgency=low
+
+  * Debconf5 release.
+
+  * GOTO Masanori <gotom@debian.org>
+
+    * Merge glibc-2.3.4 branch to the main trunk for etch development.
+
+    * These dpatches are removed from debian/patches because the similar
+      patches are already applied in the latest version:
+      - debian/patches/rtld-vdso-assertion.dpatch
+      - debian/patches/glibc232-sigsetjmp.dpatch
+      - debian/patches/hurd-weak-aliases.dpatch
+      - debian/patches/sched-update.dpatch
+      - debian/patches/glibc232-pthread-cancellation.dpatch
+      - debian/patches/glibc232-clock_settime.dpatch
+
+    * The New dpkg-architecture changes:
+      - debian/rules: Replace DEB_HOST_BUILD_SYSTEM, use DEB_HOST_ARCH_OS.
+        Reported by Arthur Marsh <arthur.marsh@internode.on.net>.
+        (Closes: #315347, #315793)
+      - debian/control.in/main: Bump up Build-Depends: dpkg-dev (>= 1.13.5).
+      - debian/control: Updated.
+      - debian/debhelper.in/libc.preinst: Replace "dpkg
+        --print-installation-architecture", use "dpkg --print-architecture".
+      - debian/debhlper.in/libc.postrm: Likewise.
+      - debian/debhlper.in/libc.postinst: Likewise.
+      - debian/sysdeps/depflags.pl: Change checks from i386 to i486.
+        It also replaces -linux, use -linux-gnu.
+
+    * Default compiler moves from gcc-3.3 to gcc-4.0:
+      - debian/rules: Use gcc-4.0 instead of gcc-3.3.  (Closes: #315198)
+      - debian/control.in/main: Define Build-Depends: gcc-4.0.
+      - debian/control: Updated.
+      - debian/sysdeps/i386.mk: Replace depreciated "-mcpu", use "-mtune".
+
+    * These dpatches are added to make glibc-2.3.5 buidable with gcc-4.0:
+      - debian/patches/glibc235-gcc4-cvs.dpatch: Fix some bad defintion of
+        internal for all architectures.
+      - debian/patches/glibc235-gcc4-elf.dpatch: Remove elf_machine_rel*
+        definitions for all architectures.
+      - debian/patches/glibc235-gcc4-jis0208.dpatch: Fix compilation breakage
+        for all architectures.
+      - debian/patches/glibc235-gcc4-wcstol_l.dpatch: Fix wcstol_l.c
+        compilation breakage for all 64bit architectures.
+      - debian/patches/glibc235-binutils216-ia64.dpatch: Fix _init/_fini was
+        not defined within procedure with binutils 2.16 for ia64.
+      - debian/patches/glibc235-gcc4-ia64-profile.dpatch: Fix compilation
+        breakage by removing strong_alias for ia64.
+      - debian/patches/glibc235-gcc4-ppc-procfs.dpatch: Fix ppc32 compilation
+        breakage by removing __uint128_t use.  (Closes: #304963)
+      - debian/patches/glibc235-gcc4-arm-inline.dpatch: Fix arm compilation
+        breakage by changing static inline to auto inline for dl-machine.h.
+      - debian/patches/glibc235-gcc4-sparc-inline.dpatch: Fix sparc compilation
+        breakage by changing static inline to auto inline for dl-machine.h.
+      - debian/patches/glibc235-gcc4-sparc-mv8.dpatch: Fix obsolete gcc option
+        to replace newer standard one.
+      - debian/patches/glibc235-gcc4-mips-inline.dpatch: Fix mips compilation
+        breakage by changing static inline to auto inline for dl-machine.h.
+      - debian/patches/glibc235-gcc4-mips-sysdeps.dpatch: Fix mips compilation
+        breakage by changing large syscall arguments handling.
+
+    * Move /etc/locale.alias to /usr/share/locale/locale.alias.
+      Don't install locale.alias.5.  (Closes: #144670, #185991, #298784)
+      - debian/local/usr_sbin/locale-gen: Use /usr/share/locale/locale.alias
+        instead of /etc/locale.alias.
+      - debian/local/manpages/locale-gen.8: Delete reference to
+        locale.alias.5.
+      - debian/local/manpages/locale.gen.5: Likewise.
+      - debian/debhelper.in/locales.links: Remove file, don't link to /etc.
+      - debian/debhelper.in/locales.install: Install locale.alias under
+        /usr/share/locale, not /etc/.
+      - debian/debhelper.in/locales.manpages: Don't install locale.alias.5
+
+    * Add documents:
+      - debian/debhelper.in/libc.docs: Add CONFORMANCE and NAMESPACE.
+
+    * Fix messages to add a patience message.  (Closes: #305400)
+      - debian/local/usr_sbin/locale-gen
+
+    * Move sprof from libc-prof to libc-dev.  (Closes: #280030)
+      - debian/sysdeps/depflags.pl: Add Replaces: libc-dev (<< 2.3.5-2).
+      - debian/debhelper.in/libc-prof.install: Remove sprof install.
+      - debian/debhelper.in/libc-dev.install: Install sprof moved from -prof.
+      - debian/debhelper.in/libc-dev.install.hurd-i386: Likewise.
+      - debian/debhelper.in/libc-dev.manpages: Add sprof.1 install.
+      - debian/debhelper.in/libc-prof.manpages: Remove file, don't install
+        sprof.1.
+
+    * Remove Depends: lib64gcc1 from libc6-sparc64.  (Closes: #258647)
+      - debian/control.in/sparc64: Delete Depends: lib64gcc1.
+      - debian/control: Likewise.
+
+    * Small change for libc6 upgrade problem.
+      - debian/debhelper.in/libc.postrm: Add plain messages and clean up.
+
+    * Add conflicts to old initrd-tools for avoiding new glibc 2.3.4/5 ldd
+      blocks to generate initrd images.  Suggested by Goswin von Brederlow
+      <brederlo@informatik.uni-tuebingen.de>.
+      - debian/sysdeps/depflags.pl: Add conflicts initrd-tools (<< 0.1.79).
+
+    * Add support PowerPC64, based on patches and suggestions by Bastian Blank
+      <waldi@debian.org> and Jeff Bailey <jbailey@ubuntu.com>:
+      - debian/control.in/main: Add Build-Depends: gcc-3.4 [powerpc] because
+        powerpc porting does not support gcc-4.0 currently.
+      - debian/control: Updated.
+      - debian/rules.d/control.mk: Add ppc64.
+      - debian/sysdeps/powerpc.mk: Added to support ppc64 target.
+
+    * debian/sysdeps/hppa.mk: Add /usr/hppa64-linux-gnu/include symlinks for
+      dpkg-architecture changes.  Reported by Matthias Klose
+      <doko@cs.tu-berlin.de>.  (Closes: #313404)
+
+    * A Costa <agcosta@gis.net>.  (Closes: #305662, #305666)
+      - debian/local/manpages/tzconfig.8: Fixed typo.
+      - debian/local/manpages/ldconfig.8: Likewise.
+
+    * Clytie Siddall <clytie@riverland.net.au>:
+      - debian/po/vi.po: Add the Vietnamese translation for locales.
+        (Closes: #309618, 311793)
+
+    * Jens Seidel <jensseidel@users.sf.net>:
+      - debian/po/de.po: Fix typo.  (Closes: #314084)
+
+ -- GOTO Masanori <gotom@debian.org>  Thu, 21 Apr 2005 16:52:36 +0900
+
+glibc (2.3.5-1) experimental; urgency=low
+
+  * GOTO Masanori <gotom@debian.org>
+
+    * New upstream release.
+      - debian/shlibver: Bump up to 2.3.5-1.
+
+    * Drop patches:
+      - debian/patches/hurd-malloc.dpatch: Removed, it's already applied in
+        the upstream source.
+
+    * Merge with 2.3.2.ds1-21, added:
+      - debian/patches/linuxthreads-sizefix.dpatch: Added.
+      - debian/po/fi.po: Added.
+      - debian/patches/glibc23-mips-lazy-eval.dpatch: Added, drop dl-machine.h
+        because the recent upstream should not need such change.
+      - debian/patches/glibc232-tls-crashfix.dpatch: Added, remove some parts
+        that are applied in the recent version.
+
+    * Merge with 2.3.2.ds1-21, changed:
+      - debian/debhelper.in/libc.preinst: Fix typo, proofreading.
+      - debian/debhelper.in/libc.preinst: Add export LC_ALL=C.
+      - debian/patches/00list: Update.
+
+    * Update linuxthreads size fix for not only ia64, but also alpha,
+      amd64, i386, powerpc, s390, sh and sparc.
+      - debian/patches/linuxthreads-sizefix.dpatch: Update.
+
+    * Fix more libc6 upgrade problem from old <= 2.3.4-1:
+      - debian/debhelper.in/libc.postinst: Don't use uname -m, use
+        dpkg --print-installation-architecture.  Hwcappkgs mechanism does not
+        work on (ex:) install architecture: i386, kernel architecture: amd64.
+      - debian/debhelper.in/libc.postrm: Likewise.
+
+    * Support libc6-dev NPTL static libraries and headers into
+      /usr/lib/nptl and /usr/include/nptl.  (Closes: #276062, #279423)
+      - debian/rules.d/build.mk: Add installation code from tmp-nptl to
+        tmp-libc.
+      - debian/debhelper.in/libc-dev.install: Add tmp-libc/usr/lib/nptl*.
+
+ -- GOTO Masanori <gotom@debian.org>  Sun, 10 Apr 2005 14:02:19 +0900
+
+glibc (2.3.4-3) experimental; urgency=low
+
+  * GOTO Masanori <gotom@debian.org>
+
+    * The complete libc6 installation breakage is fixed when hwcap packages
+      (libc6-i686 and libc6-sparcv9/sparcv9b) is installed.  It introduced
+      /etc/ld.so.hwcappkgs to track hwcap packages.
+      - debian/debhelper.in/libc.postinst: Create /etc/ld.so.hwcappkgs if
+        such file is not existed.  Check hwcap packages and decide to keep
+        /etc/ld.so.nohwcap.  Put special ld.so.nohwcap string when the
+        downgraded version does not support ld.so.hwcappkgs.
+      - debian/debhelper.in/libc-otherbuild.postinst: When it's configured,
+        check /etc/ld.so.hwcappkgs and decides to keep /etc/ld.so.nohwcap.
+      - debian/debhelper.in/libc-otherbuild.postrm: When it's removed,
+        check /etc/ld.so.hwcappkgs and search other hwcap package's version
+        consistency.  Then it decides to remove /etc/ld.so.nohwcap.
+      - debian/debhelper.in/libc.postrm: Leave /etc/ld.so.nohwcap if it's
+        downgrade to hwcappkgs incompatible version.
+      - debian/rules.d/debhelper.mk: Include "libc-" into OPT string
+        replacement.
+
+ -- GOTO Masanori <gotom@debian.org>  Tue, 29 Mar 2005 17:22:25 +0900
+
+glibc (2.3.4-2) experimental; urgency=low
+
+  * GOTO Masanori <gotom@debian.org>
+
+    * Fix libc6 installation breakage when old libc6 and libc6-i686 was
+      installed, and it's replaced with a new libc6.  This fix is limited
+      for i686 optimized package, not for sparc multiple opt packages.
+      (Closes: #300806, #300842)
+      - debian/debhelper.in/libc.postinst: Add check for the existence of
+        multiple optimized packages.
+      - debian/rules.d/debhelper.mk: Add the replace code from CURRENT_VER
+        to $(DEB_VERSION) for libc.postinst.  Install libc-otherbuild.postrm.
+      - debian/debhelper.in/libc-otherbuild.postrm: Added to remove
+        unneeded ld.so.nohwcap for single optimized package.
+
+ -- GOTO Masanori <gotom@debian.org>  Tue, 22 Mar 2005 11:17:32 +0900
+
+glibc (2.3.4-1) experimental; urgency=low
+
+  * GOTO Masanori <gotom@debian.org>
+
+    * Reflect from glibc-snapshot package 2.3.4-0.3.snapshot20041220.2.
+
+    * Add glibc-libidn package handling for the following files:
+      - debian/sysdeps/gnu.mk
+      - debian/sysdeps/linux.mk
+      - debian/sysdeps/kfreebsd-gnu.mk
+      - debian/rules
+
+    * Add separated shlibver file:
+      - debian/rules: Include debian/shlibver.
+      - debian/shlibver: Bump up shlibver to 2.3.4-1.
+
+    * Delete removed file info/libc-dir-add.info:
+      - debian/debhelper.in/glibc-doc.install
+      - debian/rules.d/build.mk
+
+    * These dpatches are added in debian/patches/:
+      - glibc234-alpha-xstat.dpatch: Fix alpha compilation failure when
+        kernel headers < 2.6.4 is used.
+      - glibc234-hppa-linesep.dpatch: Add to fix hppa compilation failure.
+      - glibc234-hppa-remove-mallocdef.dpatch: Add to
+        fix hppa compilation breakage until ldcw lock change is introduced.
+        This patch will be removed when ldcw patch is revised to apply.
+      - glibc234-m68k-linuxthreads-fPIC.dpatch: Add to fix m68k compilation
+        warnings to remove linuxthreads o-iterator.
+      - glibc234-hppa-full-nptl-2004-12-20.dpatch: Remove in-cvs parts,
+        apply the remained stuff for hppa, except for ldcw lock change.
+        This file is renamed from 50_glibc232-hppa-full-nptl-2003-10-22.dpatch.
+
+    * These dpatches are modified/replaced with the newer patches in
+      debian/patches/:
+      - glibc-i686-timing.dpatch: Modify makefile.  Fix i686 library breakage.
+      - glibc23-cmov.dpatch: Drop additional TLS parts.
+      - glibc23-sse-oldkernel.dpatch: Regenerated.
+      - hppa-drop-utimes.dpatch: Regenerated.
+      - ldconfig.dpatch: The previous patch seems being wrong because it
+        supresses all warnings about error.  The new patch I introduced should
+        not warn during debootstrap, and works finely during normal operation.
+      - ldd.dpatch: Regenerated.
+      - ldso-disable-hwcap.dpatch: Regenerated.
+      - locale-no_NO.dpatch: Drop locale.alias part which is already applied.
+      - makeconfig.dpatch: Regenerated.
+      - 50_glibc232-arm-dwarf2-buildfix.dpatch: Modify to fix sjlj compilation.
+      - 50_glibc232-m68k-dwarf2-buildfix.dpatch: Likewise.
+
+    * These dpatches are currently suspended to apply (those entries in
+      00list are commented out) with various reasons, they need update or
+      confirmation:
+      - 30_glibc232-base.dpatch: If this patch is needed, the another
+        binutils related problem should be occured.  It's disabled for a
+        while, then remove iff no problem is reported.
+      - alpha-pic.dpatch: #175511 said the upstream should have another
+        different fix.  After confirmation, it should be removed.
+      - arm-output-format.dpatch: I believe the recent arm glibc should work
+        without this patch.  If arm still has problem, then enable it.
+      - glibc232-globfree-clear.dpatch: The latest upstream has gl_pathv=NULL
+        part, bug gl_pathc=0 part.  I think the current code is harmless.
+        It needs confirmation to Jeff Licquia.
+      - translation-fr.dpatch: The upstream rejects this wishlist bug.  After
+        confirmation, it'll be removed.
+      - mips-asm-unistd.dpatch: I need to look at the result of the current cvs
+        unistd.h.
+      - hurd-enable-ldconfig.dpatch: Disabled currently.
+
+    * These dpatches are currently applied, but it may be removed from
+      00list as until sarge stuff:
+      - libgcc-compat-all.dpatch: It'll be removed in future.
+      - libgcc-compat-other.dpatch: Likewise.
+
+    * These dpatches are currently suspended to apply from 00list because
+      we plan to be removed after sarge release:
+      - glibc23-ctype-compat.dpatch: Until sarge stuff.
+      - glibc23-errno-hack.dpatch: Until sarge stuff.
+      - glibc23-errno.dpatch: This patch should not be considered permanent;
+        it may be one of until sarge stuff.
+      - glibc23-function-compat.dpatch: Until sarge stuff.
+      - locales-supported.dpatch: Debian specific, until sarge stuff.
+
+    * This dpatch is not used currently:
+      - 10_cvs.dpatch
+
+    * These dpatches are removed from debian/patches/ because they are already
+      in upstream cvs:
+      - 11_cvs_locales.dpatch
+      - 11_shlib-lds.dpatch
+      - 51_glibc232-hppa-dist.dpatch
+      - 51_glibc232-hppa-nopltrel.dpatch
+      - 51_glibc232-hppa-profiling.dpatch
+      - 52_glibc233-hppa-feupdateenv.dpatch
+      - 90_glibc232-statvfs.dpatch
+      - 90_glibc232-timezones.dpatch
+      - alpha-crti.dpatch
+      - alpha-rtsigaction-fix.dpatch
+      - fno-unit-at-a-time.dpatch
+      - glibc23-dlclose-l_opencount.dpatch
+      - glibc23-libio-compat.dpatch
+      - glibc23-powerpc-sigcontext.dpatch
+      - glibc23-sparc-pread64.dpatch
+      - glibc232-catchsegv-insecure-temp.dpatch
+      - glibc232-hppa-unwindinfo.dpatch
+      - glibc232-ia64-unwindinfo.dpatch
+      - glibc232-iconv-ucs2-unalign.dpatch
+      - glibc232-mips-dl-machine.dpatch
+      - glibc232-misc-syslog.dpatch
+      - glibc232-nptl-posix-timer.dpatch
+      - glibc232-ppc32-nanosecond.dpatch
+      - glibc232-remove-vsyscall.dpatch
+      - glibc232-sparc64-softfp.dpatch
+      - glibcbug.dpatch
+      - hppa-syscall.dpatch
+      - hurd-cleanup.dpatch
+      - hurd-exit-attr-hidden.dpatch
+      - hurd-i386-hwcap.dpatch
+      - hurd-libc-lock.dpatch
+      - hurd-utmp-file.dpatch
+      - locale-byn_ER.dpatch
+      - locale-et_EE.dpatch
+      - locale-ro_RO.dpatch
+      - locale-strfmon.dpatch
+      - mips-sgidefs.dpatch
+      - nptl-io-locking.dpatch
+      - nptl-page-align.dpatch
+      - nptl-pthread-c++.dpatch
+      - nptl-pthread-create-attr.dpatch
+      - nptl-pthread-once.dpatch
+      - pthread-cleanup.dpatch
+      - s390-backtrace.dpatch
+      - s390-pthread-fpic.dpatch
+      - syslog-locale.dpatch
+
+    * Hurd update:
+      - debian/patches/hurd-string.dpatch: Removed, it's already in cvs.
+      - debian/patches/00list.hurd-i386: Removed.
+      - debian/patches/hurd-malloc.dpatch: Add to fix Hurd build fix, patch
+        from Michael Banck <mbanck@debian.org>.
+
+ -- GOTO Masanori <gotom@debian.org>  Fri, 18 Mar 2005 09:41:49 +0900
+
+glibc (2.3.2.ds1-22) unstable; urgency=medium
+
+  * Daniel Jacobowitz <dan@debian.org>
+
+    - debian/patches/rtld-vdso-assertion.dpatch: Fix an assertion failure
+      running /lib/libc.so.6.
+    - debian/rules.d/debhelper.mk: Mark runnable libraries +x again.
+
+ -- Daniel Jacobowitz <dan@debian.org>  Tue, 10 May 2005 15:11:53 -0400
+
+glibc (2.3.2.ds1-21) unstable; urgency=high
+
+  * GOTO Masanori <gotom@debian.org>
+
+    - debian/patches/linuxthreads-sizefix.dpatch: Fix ia64 TLS_PRE_TCB_SIZE
+      alignment where TLS_DTV_AT_TP is defined between linuxthreads and nptl.
+      It breaks evolution on ia64 linuxthreads ld.so + nptl environment.
+      (Closes: #292673)
+    - debian/patches/glibc232-sigsetjmp.dpatch: Fix gcc-4.0 compilation
+      breakage on amd64.  (Closes: #295457)
+    - debian/debhelper.in/libc.manpages: Add tzconfig.8.  Reported by Matthijs
+      Mohlmann <matthijs@cacholong.nl>.  (Closes: #182981)
+    - debian/patches/90_glibc232-timezones.dpatch: Update to tzdata2005h.
+    - debian/patches/hurd-weak-aliases.dpatch: Add to fix undefined references
+      to build putty on Hurd, patched by Michael Banck <mbanck@debian.org>.
+      (Closes: #295118)
+    - debian/debhelper.in/libc.preinst: Fix typo, proofreading.
+      (Closes: #294816, #303478)
+    - debian/rules: Bump up shlib_dep_ver 2.3.2.ds1-21.  It's required by
+      adding GLIBC_2.3.4 symbol.
+
+    - Bastian Blank <waldi@debian.org>:
+      - debian/patches/sched-update.dpatch: Update sched_[gs]et_affinity to
+        new interface and library version.  Add GLIBC_2.3.4 versioned symbol
+        for new interface.  (Closes: #297769)
+    - Jeff Bailey <jbailey@raspberryginger.com>:
+      - debian/patches/glibc232-tls-crashfix.dpatch: Fix tls assertion that
+        crashes xmms/nvidia.  (Closes: #219352)
+      - debian/patches/glibc232-pthread-cancellation.dpatch: Fix pthread
+        cancellation bug that causes JVM lockups.  (Closes: #300943)
+    - Denis Barbier <barbier@debian.org>:
+      - debian/debhelper.in/libc.preinst: Add export LC_ALL=C like
+        libc.postinst, it corrects some locale dependent behavior,
+        especially for `tr'.  (Closes: #304257)
+    - Lars Wirzenius <liw@iki.fi>:
+      - debian/local/manpages/iconv.1: Escape hyphens for Unicode
+        environments.  (Closes: #292013)
+    - Emilian Nowak <emil5@go2.pl>:
+      - debian/po/pl.po: Add Polish debconf translation.  (Closes: #294444)
+    - Matti Polla <mpo@iki.fi>:
+      - debian/po/fi.po: Add Finnish debconf translation.  (Closes: #303816)
+    - Khalid Aziz <khalid_aziz@hp.com>:
+      - debian/patches/glibc232-clock_settime.dpatch: Fix clock_settime
+        always fails with EINVAL.  (Closes: #304668)
+    - Thiemo Seufer <ths@debian.org>:
+      - debian/patches/glibc23-mips-lazy-eval.dpatch: Workaround fix for
+        broken symbol resolving of lazy evaluation stubs on mips/mipsel,
+        that causes fakeroot breakage.  (Closes: #265678, #264920)
+
+ -- GOTO Masanori <gotom@debian.org>  Mon, 14 Feb 2005 09:26:26 +0900
+
+glibc (2.3.2.ds1-20) unstable; urgency=high
+
+  * GOTO Masanori <gotom@debian.org>
+
+    - debian/patches/hppa-drop-utimes.dpatch: Fix sudo breakage because
+      system call utimes() is not defined on hppa.  Patched by Randolph Chung
+      <tausq@debian.org>.  (Closes: #284449)
+
+    - Fix ia64 unwind FTBFS.  Patched by Matthias Klose <doko@debian.org>:
+      - debian/patches/glibc232-ia64-unwindinfo.dpatch: Modify Makeconfig
+        which unconditionally set the libunwind macro to -lunwind, until the
+        it's safe again to regenerate the configure script, on advice of
+        Jeff Bailey.  (Closes: #284563)
+      - debian/control.in/main: Tighten build dependency on ia64 to
+        gcc-3.3_3.3.5-5.
+      - debian/control: Likewise.
+
+    - debian/sysdeps/amd64.mk: Add /lib64 and /usr/lib64 symlinks which are
+      provided by glibc instead of base-files for amd64.  Requested by Goswin
+      Brederlow <brederlo@informatik.uni-tuebingen.de>.  (Closes: #259302)
+    - debian/rules.d/debhelper.mk: Replace from extra_pkg_install to
+      extra_debhelper_pkg_install rule which are used for debhelper.mk only.
+
+    - debian/patches/librt-mips.dpatch: Update to provide clock_{set,get}time
+      with versioned symbol both GLIBC_2.0 and GLIBC_2.2.  This patch should
+      be applied until sarge+1 will be released.
+
+    - debian/local/manpages/locale.1: Add the description about
+      /usr/share/i18n/SUPPORTED.  Requested by Guillermo S. Romero
+      <gsromero@alumnos.euitt.upm.es>.  (Closes: #284137)
+
+ -- GOTO Masanori <gotom@debian.org>  Wed, 15 Dec 2004 19:44:47 +0900
+
+glibc (2.3.2.ds1-19) unstable; urgency=high
+
+  * GOTO Masanori <gotom@debian.org>
+
+    - debian/local/manpages/gencat.1: Use \fR instead of \fT for bold
+      font, and use .TP instead of .PP for option usage.  Patched by
+      Lars Wirzenius <lars.wirzenius@nokia.com>.  (Closes: #279685)
+    - debian/local/manpages/iconvconfig.8: Likewise + fix typo.
+    - debian/local/manpages/mtrace.1: Likewise.
+    - debian/local/manpages/locale.1: Add "SEE ALSO" to the end of the
+      manual.  (Closes: #282128)
+
+    - debian/sysdeps/linux.mk: Drop -fomit-frame-pointer from compiling
+      option to build NPTL packages in order to get valid backtrace.
+      -D__USE_STRING_INLINES is also dropped to consider about backtraces.
+      Requested by David Mosberger <davidm@hpl.hp.com>.
+    - debian/sysdeps/amd64.mk: Likewise.
+    - debian/sysdeps/i386.mk: Likewise.
+    - debian/sysdeps/s390.mk: Likewise.
+    - debian/sysdeps/sparc.mk: Likewise.
+
+    - debian/patches/glibc232-hppa-unwindinfo.dpatch: Add for unwind
+      information for hppa plt fixup routine.  Patched by
+      Randolph Chung <tausq@debian.org>.  (Closes: #281993)
+    - debian/patches/glibc232-ia64-unwindinfo.dpatch: Add to work
+      ia64 unwind info and libunwind properly.  Requested by David Mosberger
+      <davidm@napali.hpl.hp.com>.  (Closes: #278837)
+
+    - debian/patches/glibc232-catchsegv-insecure-temp.dpatch: Add fix
+      CAN-2004-0968: catchsegv creates insecure temporary file.
+      (Closes: #278278)
+    - debian/debhelper.in/libc.install: Remove glibcbug to fix CAN-2004-0968,
+      and it's meaningless to include nowadays.  (Closes: #205600)
+    - debian/debhelper.in/libc.manpages: Remove glibcbug.1 from manpage.
+    - debian/patches/glibcbug.dpatch: Add comment to be removed.
+
+    - debian/make-cvs-patch.sh: Change like make-cvs-locales-patch.sh.
+
+    - debian/patches/s390-pthread-fpic.dpatch: Add to fix lam build failure.
+      It changes pthread_atfork in libpthread_nonshared.a is built with
+      -fPIC, not -fpic, that is already applied in libc_nonshared.a.
+      (Closes: #280445)
+
+    - debian/control.in/libc: Add gcc | c-compiler to Recommends of libc-dev.
+      This change avoids that aptitude tries to install various compiler
+      packages if only c-compiler is specified.  (Closes: #283668)
+    - debian/control.in/main: Add Build-Depends: gcc-3.3 (>= 1:3.3.5-3) [ia64]
+      | gcc-3.4 (>= 3.4.3-2) [ia64] because ia64 should be built with gcc
+      which supports libunwind.  Requested by Matthias Klose
+      <doko@debian.org>.
+    - debian/control: Update.
+
+    - debian/patches/nptl-pthread-c++.dpatch: Add to disable using C99
+      designators for nptl pthread.h to fix C++ breakage.  Patched by
+      Andreas Jochens <aj@andaco.de> and Matthias Klose
+      <doko@cs.tu-berlin.de>.  (Closes: #275997, #283461)
+
+ -- GOTO Masanori <gotom@debian.org>  Sat,  6 Nov 2004 19:04:26 +0900
+
+glibc (2.3.2.ds1-18) unstable; urgency=high
+
+  * GOTO Masanori <gotom@debian.org>
+
+    - debian/patches/glibc232-sparc64-softfp.dpatch: Add to fix
+      glibc build breakage on sparc with binutils 2.15.  It's caused by
+      the register misusage, that was allowed by the previous binutils.
+      (Closes: #266598)
+    - debian/debhelper.in/libc.postinst: Fix to execute NSS services
+      correctly when file-rc is used.  (Closes: #275403)
+
+    - debian/patches/90_glibc232-timezones.dpatch: Update to tzdata2004e.
+
+    - debian/debhelper.in/locales.prerm: Add to fix warning not to remove
+      /usr/lib/locale/locale-archive.  (Closes: #264020)
+    - debian/debhelper.in/locales.postrm: Add to remove /etc/locale.gen
+      when purge is specified.
+
+ -- GOTO Masanori <gotom@debian.org>  Tue,  5 Oct 2004 09:32:01 +0900
+
+glibc (2.3.2.ds1-17) unstable; urgency=high
+
+  * GOTO Masanori <gotom@debian.org>
+
+    - debian/sysdeps/depflags.pl: Fix typo, from "kerberos4th-dev" to
+      "kerberos4kth-dev".  (Closes: #266637)
+    - debian/patches/00list: Add locale-byn_ER.dpatch that was missing
+      when I fixed.  (Closes: #270998)
+
+    - debian/patches/glibc23-dlclose-l_opencount.dpatch: Fix reference
+      counter in dl that does not sometimes decrement correctly.
+      (Closes: #233301, #259211)
+    - debian/patches/glibc232-globfree-clear.dpatch: Workaround and
+      to make sure that fix to enforce clear gl_pathc and gl_pathv in
+      globfree() for sarge to conform LFS test, requested by Jeff Licquia.
+      (Closes: #264884)
+
+    - debian/local/manpages/tzselect.1: Fix typo.  (Closes: #269747)
+
+    - debian/debhelper.in/libc.preinst: Don't install glibc when kernel
+      is not 2.6 on amd64.
+    - debian/sysdeps/amd64.mk: Patch from Andreas Jochens:
+       - Drop the 'nptl' pass from GLIBC_PASSES.
+       - Use 'nptl' instead of 'linuxthreads' in the 'libc' pass (this
+         requires kernel >= 2.6.0, but 2.4 is not supported by the amd64
+         port anyway).
+
+ -- GOTO Masanori <gotom@debian.org>  Thu, 19 Aug 2004 12:39:35 +0900
+
+glibc (2.3.2.ds1-16) unstable; urgency=high
+
+  * GOTO Masanori <gotom@debian.org>
+
+    - debian/FAQ: Add note about errno + NPTL workaround.
+      (Closes: #261035)
+    - debian/patches/glibc232-mips-dl-machine.dpatch: Fix mips/mipsel
+      compilation breakage with the recent binutils.  (Closes: #262646)
+    - debian/patches/glibc232-m68k-reloc.dpatch: Fix m68k compilation
+      breakage with the recent binutils.  (Closes: #263601)
+
+  * Jeff Bailey <jbailey@raspberryginger.com>
+
+    - debian/debhelper.in/libc-dev.install.hurd-i386: Don't install
+      getconf.
+
+ -- GOTO Masanori <gotom@debian.org>  Mon,  2 Aug 2004 11:53:54 +0900
+
+glibc (2.3.2.ds1-15) unstable; urgency=high
+
+  * Jeff Bailey <jbailey@raspberryginger.com>
+
+    - debian/sysdeps/depflags.pl: Replace ${libc}, not libc6.
+      (Closes: #262669)
+
+    - Marking urgency as high, last upload should have been marked
+      this way for RC bug fix.
+
+ -- Jeff Bailey <jbailey@raspberryginger.com>  Sun,  1 Aug 2004 08:50:13 -0400
+
+glibc (2.3.2.ds1-14) unstable; urgency=low
+
+  * GOTO Masanori <gotom@debian.org>
+
+    - debian/patches/glibc232-iconv-ucs2-unalign.dpatch: Add to fix
+      iconv unalignment access with UCS-2BE/UCS-2LE on some architectures.
+      (Closes: #234691)
+    - debian/patches/locale-byn_ER.dpatch: Add to fix byn_ER localedef
+      breakage.  Patched by Denis Barbier <barbier@linuxfr.org>.
+      (Closes: #246270, #257658)
+    - debian/patches/locales-supported.dpatch: Add no_NO.ISO-8859-1 into
+      SUPPORTED.  (Closes: #246170)
+    - debian/patches/glibc232-nptl-posix-timer.dpatch: Fix posix timer
+      SIGEV_THREAD notification is broken.  (Closes: #259878)
+    - debian/patches/glibc232-remove-vsyscall.dpatch: Remove __ASSUME_VSYSCALL
+      to fix the system startup failure on the machine using PAX.
+      (Closes: #245563)
+    - debian/patches/90_glibc232-timezones.dpatch: Updated to tzcode2004b
+      and tzdata2004b.
+    - debian/patches/locale-eu_FR.dpatch: Add eu_FR and eu_FR@euro.
+      Patched by Christian Perrier <bubulle@debian.org>.  (Closes: #257840)
+    - debian/patches/locale-sr_CS.dpatch: Add sr_CS and sr_CS@cyrillic.
+      Patched by Christian Perrier <bubulle@debian.org>.  But this patch is
+      conflicted to sr_YU things - it's disabled for a while.
+
+    - debian/local/etc_init.d/nscd: Rewritten the whole script to make
+      use of the initscript's method.  Patched by Thomas Hood
+      <jdthood@aglu.demon.nl>.
+      (Closes: #229273, #229484, #253119, #252284, #222953)
+
+    - debian/local/manpages/iconv.1: Add small description for `-c' and
+      so on.  (Closes: #189958)
+    - debian/local/manpages/rpcgen.1: Add -M option description.
+      (Closes: #193467)
+    - debian/po/de.po: Updated.  Patched by Helge Kreutzmann
+      <kreutzm@itp.uni-hannover.de>.  (Closes: #251732)
+
+    - debian/debhelper.in/libc.postinst: Add apache-ssl and apache-perl to
+      restart script.  Suggested by Daniel Jacobowitz <dan@debian.org>.
+      (Closes: #208997)
+    - debian/debhelper.in/libc.postinst: Add vsftpd to restart script.
+      Suggested by Jeff Bailey <jbailey@nisa.net>.  (Closes: #213535)
+    - debian/debhelper.in/libc.postinst: Add lpr-ppd.  Change init script
+      name from lpr, lpr-ppd to lpd, lpd-ppd.  (Closes: #205084)
+    - debian/debhelper.in/libc.postinst: Fix package detection failure when
+      uninstalled package is encountered during NSS upgrade.
+      (Closes: #193278)
+    - debian/debhelper.in/libc.postinst: Add export LANG=C to work scripts
+      correctly even if user sets locale environment variable.
+    - debian/debhelper.in/libc.postinst: Change sleep time from 1 to 2.
+      It's work-around fix, actual fix is start-stop-daemon --stop should
+      check the process termination.  See: #211784.
+
+    - debian/local/usr_sbin/tzconfig: Fix typo: old_timezone vs oldtimezone.
+      Reported by Kai Henningsen <kai@khms.westfalen.de>.  (Closes: #213159)
+
+    - debian/control.in/libc-dbg: Add Provides: libc-dbg for -dbg package.
+      (Closes: #219145)
+    - debian/control.in/libc, debian/control: likewise.
+
+    - /usr/bin/getconf and getconf.1 are moved from libc-dev to libc.
+      (Closes: #239170)
+    - debian/debhelper.in/libc-udeb.install: Add libutil* and libcrypt*
+      to -udeb.  (Closes: #258956)
+
+    - Put amd64 port from Andreas Jochens.
+      - debian/control: Updated.
+      - debian/control.in: Modify Build-Depends: gcc-3.3 | gcc-3.4.
+        glibc can build at least gcc-3.3 and later.  And this will make it
+        possible to build glibc with gcc-3.4 when gcc-3.4 becomes the default
+        on amd64 without changing glibc again.
+      - debian/sysdeps/amd64.mk: Use workaround -g0 option when gcc-3.4 is
+        used, because gcc-3.4 on amd64 with -g0 + nested functions are broken:
+        http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=260710
+
+  * Andreas Jochens <aj@andaco.de>
+
+    - debian/rules.d/control.mk: Add amd64 at the appropriate places.
+    - Add debian/patches/amd64-lib.dpatch to disable the biarch lib64 dir on
+      amd64 and enable this patch in debian/patches/00list.  (Closes: #246547)
+    - Add a new file debian/sysdeps/amd64.mk with GLIBC_PASSES += nptl
+      (Closes: #248192)
+    - debian/sysdeps/amd64.mk: Use gcc instead of gcc-3.3 on amd64.
+    - debian/patches/fno-unit-at-a-time.dpatch: Add -fno-unit-at-a-time
+      test to configure for amd64 + gcc-3.4.  (Closes: #261082)
+
+  * Jeff Bailey <jbailey@raspberryginger.com>
+
+    - debian/patches/syslog-locale.dpatch: Include patch from Jakub
+      Jelinek to make sure syslogging happens in the C locale.
+      Thanks to pere for catching this.  (Closes: #161340, #158651)
+
+    - debian/patches/hurd-string.dpatch: New file
+    - debian/patches/00list.hurd-i386: Only load hurd-string on hurd-i386.
+
+ -- GOTO Masanori <gotom@debian.org>  Mon, 31 May 2004 23:43:29 +0900
+
+glibc (2.3.2.ds1-13) unstable; urgency=low
+
+  * Jeff Bailey <jbailey@raspberryginger.com>
+
+   - debian/control.in/main: Change to new email address.
+   - debian/debhelper.in/libc-dev.install.hurd-i386: Add missing files.
+     Thanks to Michael Banck (Closes: #246355)
+   - debian/sysdeps/gnu.mk: Stub out kernel_check.
+     Thanks to Michael Banck
+
+  * GOTO Masanori <gotom@debian.org>
+
+   - debian/debhelper.in/libc.preinst: Fixed to work when kernel version is
+     x.y.zFOOz pattern.  (Closes: #245643)
+   - debian/patches/locale-ro_RO.dpatch: Fix Romania can't be built.
+     (Closes: #245657)
+   - debian/local/manpages/locale.1: Fix typo: LOC_PATH -> LOCPATH.
+     (Closes: #246557)
+   - debian/rules: Fix build correctly when we execute "debian/rules binary".
+     Patched by Jurij Smakov <jurij@wooyd.org>.  (Closes: #247241)
+   - debian/patches/glibc232-misc-syslog.dpatch: Fix syslog segv under
+     memory shortage.  (Closes: #249559)
+   - debian/patches/s390-backtrace.dpatch: Fix 900 test failures in the
+     libjava testsuite in gcc-3.4 on s390.  (Closes: #243394)
+   - debian/sysdeps/linux.mk: Fix build failure when kernel headers directory
+     in /usr/src has symlink asm direcotry.  Patched by Wolfram Gloger
+     <wg@malloc.de>.  (Closes: #249408)
+
+   - debian/debhelper.in/libc-udeb.install: Add libnss_files.so*,
+   - debian/libnss-dns-udeb, libnss-dns-files: Update description.
+   - debian/control: Update.
+
+  * Colin Watson <cjwatson@debian.org>
+
+   - debian/rules: Add libnss-dns-udeb and libnss-files-udeb.
+     (Closes: #247430)
+   - debian/.cvsignore: Likewise.
+   - debian/control.in/libc: libc-udeb depends on libnss-dns-udeb and
+     libnss-files-udeb.
+   - debian/debhelper.in/libc-udeb.install: Remove libnss_dns and libnss_files.
+   - debian/rules.d/control.mk: Likewise.
+   - debian/control.in/libnss-dns-udeb: Update description.
+
+ -- GOTO Masanori <gotom@debian.org>  Wed, 26 May 2004 00:18:06 +0900
+
+glibc (2.3.2.ds1-12) unstable; urgency=low
+
+  * GOTO Masanori <gotom@debian.org>
+
+   - debian/local/etc_init.d/mountkernfs: Fix typo.  (Closes: #229340)
+   - debian/local/etc_init.d/mountkernfs: Fix error if the kernel does not
+     set CONFIG_TMPFS on 2.4.  (Closes: #230758)
+   - debian/local/etc_init.d/mountkernfs: Check each mount directory is
+     actually directory or not.  (Closes: #234813)
+   - debian/local/etc_init.d/mountkernfs: remove "set -e".
+   - debian/debhelper.in/libc.postinst: use invoke-rc.d to invoke
+     mountkernfs when it's available, suggested by Junichi Uekawa
+     <dancer@netfort.gr.jp>.  (Closes: #230008)
+
+   - debian/debhelper.in/libc.install: drop installing three files:
+     debian/local/etc_init.d/mountkernfs, debian/local/etc_default/devpts,
+     and debian/local/etc_default/tmpfs.  Because initscripts now provides
+     those files.  (Closes: #238963)
+   - debian/debhelper.in/libc.preinst: devpts.sh should be actually replaced to
+     mountkernfs.  But by now mounting filesystems should be done with
+     mountvirtfs in initscripts.  Initscripts needs to remove devpts.sh and
+     mountkernfs.
+   - debian/debhelper.in/libc.postinst: likewise.
+   - debian/debhelper.in/libc.postrm: likewise.
+
+   - debian/debhelper.in/libc.preinst: Fix kernel version detection correctly.
+     Patched by Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>.
+     (Closes: #241395).
+
+   - debian/rules.d/debhelper.mk: Fix build failure in strip processing.
+
+   - debian/patches/51_glibc232-hppa-nopltrel.dpatch: Do not process
+     lezy relocations if no DT_PLTREL is present.  Reported by
+     Richard Hirst <rhirst@linuxcare.com> and Patched by
+     Carlos O'Donell <carlos@baldric.uwo.ca>.  (Closes: #228375)
+   - debian/patches/glibc232-ppc32-nanosecond.dpatch: Fix ppc32 stat
+     reports bogus nanosecond data.  Patched by Anton Blanchard
+     <anton@samba.org>.  (Closes: #231358)
+   - debian/patches/nptl-io-locking.dpatch: Add stdio performance
+     improvement for nptl.  Dpatched by Michael Clark
+     <michael@metaparadigm.com>.  (Closes: #238213)
+   - debian/patches/52_glibc233-hppa-feupdateenv.dpatch:
+     The newest compiler in unstable has caught a bug in the feupdateenv
+     implementation for hppa. The code should not be using the constant input
+     argument as temporary scratch.  Patched by Carlos O'Donell
+     <carlos@baldric.uwo.ca>.
+   - debian/patches/localedef-fix-trampoline.dpatch: Fix localedef segv
+     when run under exec-shield/PaX and so on due to trampoline issue.
+     Dpatched by James Troup <james@nocrew.org>.
+     (Closes: #231438, #198099, #215624, #215821, #221740)
+   - debian/patches/alpha-rtsigaction-fix.dpatch: Fix alpha sigaction with
+     SA_SIGINFO (rt_sigaction), keep program execution after exiting signal
+     handler, with correctly calling rt_sigreturn.  (Closes: #221969)
+   - debian/patches/translation-fr.dpatch: Include fr.po translation patch.
+     Patched by Petter Reinholdtsen <pere@hungry.com>.  Related bug #243183
+     is currently suspended.
+   - debian/patches/locale-et_EE.dpatch: Fix et_EE locale incorrect charset.
+     Patched by Petter Reinholdtsen <pere@hungry.com>.  (Closes: #208238)
+
+   - debian/debhelper.in/libc.postinst: add rsync to NSS checking code.
+     (Closes: #229196)
+   - debian/debhelper.in/libc.preinst: add kernel version check code if
+     real i386 is used.  (Closes: #231538)
+
+   - debian/po/da.po: added.  Patched by Morten Brix Pedersen <morten@wtf.dk>.
+     (Closes: #230669)
+   - debian/po/cs.po: added.  Patched by Miroslav Kure
+     <kurem@upcase.inf.upol.cz>.  (Closes: #230969)
+   - debian/po/el.po: added.  Patched by Konstantinos Margaritis
+     <markos@debian.org>.  (Closes: #230997)
+   - debian/po/ru.po: added.  Patched by Ilgiz Kalmetev
+     <translator@ilgiz.pp.ru>.  (Closes: #221657)
+   - debian/po/uk.po: added.  Patched by Eugeniy Meshcheryakov
+     <eugen@univ.kiev.ua>.  (Closes: #235850)
+   - debian/po/zh_CN.po: added. Patched by Hiei Xu <nicky@mail.edu.cn>
+     and Carlos Z.F. Liu <carlos_liu@yahoo.com>.  (Closes: #231907)
+   - debian/po/tr.po: added.  Patched by Ercin EKER <erc.caldera@gmx.net>
+     and Recai Oktas <roktas@omu.edu.tr>.  (Closes: #240654)
+
+   - debian/debhelper.in/glibc-doc.links: add manpages links for sem_*.
+
+   - debian/patches/template.dpatch: split Author to Dpatch author and
+     Patch author.
+
+   - debian/sysdeps/hppa.mk: added to create symlink
+     /usr/hppa64-linux/include to /usr/include for hppa64.  (Closes: #239020)
+   - debian/sysdeps/depflags.pl: added conflicts to gcc-3.3-hppa64 and
+     gcc-3.4-hppa64.
+   - debian/sysdeps/depflags.pl: Add replaces: kerberos4th-dev (<< 1.2.2-10)
+     to avoid conflicting /usr/include/ifaddrs.h.  (Closes: #234347)
+
+   - debian/control.in/opt: made libc6-i686 description easier to
+     understand from users' requests.  (Closes: #218396, #239555, #242546)
+
+   - debian/local/usr_sbin/locale-gen: Add code to write an error if the
+     line doesn't satisfy the format.  Patched by Petter Reinholdtsen
+     <pere@hungry.com>.  (Closes: #207199)
+
+  * Jeff Bailey <jbailey@nisa.net>
+
+   - debian/debhelper.in/libc.preinst: Don't use awk except in
+     upgrade mode.  (Closes: #229461)
+     Also make sure that it doesn't trip on words being added to the
+     upstream revision number.  Thanks to James Troup for
+     mentioning this.
+     Thanks to Bastian Blank <waldi@debian.org> for the fix.
+   - debian/debhelper.in/libc.postinst: Respect DEBIAN_FRONTEND=noninteractive
+     for setting timezone.  Default to UTC.  (Closes: #196382)
+
+   - debian/debhelper.in/libc.docs: Add TODO.
+
+   Hopefully the last round of hurd-i386 fixes:
+
+   - debian/debhelper.in/libc-dev.install.hurd-i386: New file.
+   - debian/rules.d/debhelper.mk: Deal with the arch-specific install files.
+   - debian/patches/hurd-cleanup.dpatch: New file for dl-procinfo.c and
+     missing include in malloc.c (Both in upstream)
+   - debian/patches/00list: Update
+
+  Locales surgery, with many thanks to Petter Reinholdtsen:
+
+   - debian/patches/glibc22-eo_EO.dpatch: Rename to ...
+   - debian/patches/locale-eo_EO.dpatch: ... this.
+   - debian/patches/11_cvs_locales.dpatch: New generated file from CVS.
+   - debian/patches/locales-stuff.dpatch: Remove bogs code and split
+     into ..
+   - debian/patches/locale-de_CH.dpatch: ... this and ...
+   - debian/patches/locale-ru_RU.dpatch: this.
+   - debian/patches/locale-no_NO.dpatch: New file to keep no_NO around
+     during the transition to nb_NO.
+   - debian/patches/locale-strfmon.dpatch: New file from CVS needed
+     for new locales formatting. (Closes: #226047)
+   - debian/patches/00list: Update.
+
+   - debian/patches/glibc22-locales.dpatch: Obsoleted by CVS update.
+   - debian/patches/locale-es_AR.dpatch: Add template header.
+   - debian/patches/locales-supported.dpatch: Remove entries provided
+     by CVS.  Add no_NO for transition.
+
+     (Closes: #211607, #215466, #218424)
+
+   - debian/patches/template.dpatch: Tweak to make it easier to
+     generate patches.
+   - debian/make-cvs-locales-patch.sh: New file.
+
+  * Daniel Jacobowitz <dan@debian.org>
+
+    - Add separate-debug-info files to libc6-dbg to allow backtraces through
+      optimized libraries (Closes: #227097, #219459)
+      - debian/control.in/main: Bump build dependencies for binutils and
+        debhelper.
+      - debian/control.in/libc-dbg: Update package description.
+      - debian/rules: Set NOSTRIP after loading sysdeps rules files, so that
+        it actually gets set.
+      - debian/rules.d/debhelper.mk: Generate separate debug info libraries.
+        Touch stamp file for libc-udeb.
+      - debian/sysdeps/i386.mk, debian/sysdeps/linux.mk, s390x_extra_cflags,
+        debian/sysdeps/sparc.mk: Use -g1 instead of -g0 so that we get
+        unwind information.
+      - debian/wrapper/objcopy: Wrapper script to remove excess debug
+        info, for now.
+    - Remove tabs from debian/changelog, since they confuse
+      dpkg-parsechangelog.
+    - Add missing quotes in debhelper.mk NOSTRIP test.
+    - Don't add libc-dir-add.info to info after all
+      (Closes: #222171, #230765).
+      (debhelper.in/glibc-doc.info, debhelper.in/glibc-doc.install)
+
+  * Ben Collins <bcollins@debian.org>
+
+    - Added and enabled a sparc v9b target (UltraSPARC III).
+
+  * Bastian Blank <waldi@debian.org>
+
+    - Add libnss-dns-udeb package.
+    - Rename udebs to match the real packages.  (Closes: #183139)
+    - Fix provides of udebs.  (Closes: #183143)
+    - Use debhelper udeb knowledge.
+
+ -- GOTO Masanori <gotom@debian.org>  Wed, 21 Apr 2004 00:40:55 +0900
+
+glibc (2.3.2.ds1-11) unstable; urgency=low
+
+  * Jeff Bailey <jbailey@nisa.net>
+
+   - debian/control.in/s390x: Remove -dev dependency on gcc-3.2.
+   - debian/sysdeps/s390.mk: Add missing )
+   - debian/rules: Fixes for cross-compiling
+   - debian/patches/90_glibc233_tcsetaddr.dpatch: LSB Fix for tcgetattr
+     (Closes: #218131)
+   - debian/sysdeps/depflags.pl: Update wine conflicts.
+     (Closes: #218717)
+   - debian/sysdeps/depflags.pl: Update cyrus-imapd conflicts.
+     (Closes: #220983)
+   - debian/sysdeps/sparc.mk: Force -m32 when building sparcv9
+   - debian/patches/glibc-sparc-timing.dpatch: New file to let sparcv9 works.
+     (Closes: #222886)
+   - debian/patches/nptl-page-align.dpatch: New file to fix page
+     alignment troubles.  (Closes: #223241, #225466)
+
+   - debian/patches/hurd-exit-attr-hidden.dpatch: New file to fix
+     compilation on gcc-3.3 and hurd-i386
+   - debian/patches/hurd-i386-hwcap.dpatch: New file to give the needed
+     i386 HWCAP defines on hurd-i386
+   - debian/patches/hurd-libc-lock.dpatch: New file to fix FTBFS on hurd-i386
+   - debian/patches/hurd-utmp-file.dpatch: New file to fix FTBFS on
+     non-Linux.
+   - debian/patches/glibc23-cmov.dpatch: Update for moved i386 HWCAP
+     definitions.
+   - debian/patches/glibc23-sse-oldkernel.dpatch: Updated for
+     severelly munged sysdeps/unix/sysv/linux/i386/dl-procinfo.h
+     Thanks to Barry deFreese for helping get these in order.
+
+   - debian/patches/00list: Update
+
+   - debian/debhelper.in/libc.preinst: For Linux kernels of the form
+     x.y.z-n, fail the install if z >= 255. (Closes: #226688)
+     Thanks to James Morrison and Kevin Everets for help on the wording
+     of the error message.
+
+   - debian/sysdeps/sparc.mk: Revert Ben's change of '-mcpu=v8
+     -mtune=ultrasparc'.  This was misleading because it was always
+     overridden by the glibc Makefile and had no effect.
+
+  * Phil Blundell <pb@debian.org>
+
+   - Require linux-kernel-headers >= 2.5.999-test7-bk-9 to avoid module-
+     related problems on ARM.
+
+  * Ben Collins <bcollins@debian.org>
+
+    - Bump sparcv9 back to -mcpu=v8 -mtune=ultrasparc.  Should fix sparcv9.
+
+  * Daniel Jacobowitz <dan@debian.org>
+
+    - Pass CC to configure; should fix sparc64.
+    - Suppress the errno warning message for now.  Update to point to
+      README.Debian.gz.
+      - debian/patches/glibc23-errno-hack.dpatch, debian/FAQ
+    - Redirect dpkg -s sysvinit's stderr to /dev/null (Closes: #225601).
+    - Fix <bits/syscall.h> on MIPS targets.  Thanks to Guido Guenther
+      for testing and improvements to the patch (Closes: #223891, #226483).
+      - debian/patches/mips-asm-unistd.dpatch
+    - Fix for GCC <sgidefs.h> changes from Thiemo Seufer (Closes: #224744).
+      - debian/patches/mips-sgidefs.dpatch
+    - Fix i386-linux build failure.
+      - debian/patches/glibc23-sse-oldkernel.dpatch
+    - Quote a backslash in libc.preinst
+
+  * GOTO Masanori  <gotom@debian.org>
+
+    - debian/debhelper.in/glibc-doc.links: add missing links for
+      pthread_mutex_*(), pthread_mutexattr_*(), pthread_cond_*(), and
+      pthread_condattr_*().
+    - debian/control.in/main: remove Build-Depends-Indep: latex2html.
+      (Closes: #221317)
+
+    - debian/local/etc_init.d/devpts.sh: rename to mountkernfs.
+    - debian/local/etc_init.d/mountkernfs: rename from devpts.sh, for
+      adding to mount tmpfs(shmfs), sysfs, and usbfs.
+    - debian/local/etc_default/tmpfs: add to control tmpfs upper limit size.
+    - debian/debhelper.in/libc.dirs: add to make /sys.
+    - debian/debhelper.in/libc.install: add mountkernfs and tmpfs,
+      remove devpts.sh.
+    - debian/debhelper.in/libc.postrm: rename devpts.sh to mountkernfs.
+    - debian/debhelper.in/libc.postinst: likewise.
+    - debian/local/etc_init.d/mountkernfs: fix devpts_mounted to check
+      its pathname is exactly started from the top directory.
+
+    - debian/debhelper.in/libc.preinst: fix preinst does not stop
+      on mips even if it's kernel version is < 2.4.22.  (Closes: #223769)
+
+    - debian/po/pt_BR.po: Update pt_BR debconf template translation.
+      Patched by Andre Luis Lopes <andrelop@debian.org>.  (Closes: #219839)
+    - debian/po/nl.po: Update nl debconf template translation.
+      Patched by cobaco <cobaco@linux.be>.  (Closes: #220693)
+
+  * Carlos O'Donell <carlos@baldric.uwo.ca>
+
+    - debian/patches/51_glibc232-hppa-dist.dpatch: Add entry.h to dist.
+    - debian/patches/51_glibc232-hppa-profiling.dpatch: Fix profile support.
+      (Closes: #221010)
+
+ -- Daniel Jacobowitz <dan@debian.org>  Tue, 20 Jan 2004 09:41:48 -0500
+
+glibc (2.3.2.ds1-10) unstable; urgency=low
+
+  This is the "Swimming to the surface" release.
+
+  * GOTO Masanori <gotom@debian.org>
+
+    - debian/control.in/opt: Add more ix86 CPUs in the description.
+    - debian/debhelper.in/libc.preinst: Ignore old libc4/5.
+      (Closes: #218449)
+
+  * Daniel Jacobowitz <dan@debian.org>
+
+    - Add a patch to automatically disable NPTL for programs which
+      reference the old errno; and update the FAQ to match.
+      (glibc23-errno-hack.dpatch).
+    - Update make build dependency as reported by Mikko Kautto
+      (Closes: #218595).
+    - Update debian/po/nl.po with new translation from Bart Cornelis
+      (Closes: #218642).
+    - Update SSE disabling patch to work for static binaries too
+      (Closes: #218524, #219025).
+    - debian/debhelper.in/libc.preinst: Ignore ia32-libs also
+      (Closes: #219176).
+    - debian/control.in/main: Build depend on fixed linux-kernel-headers
+      to get ia64 module syscalls (Closes: #218645).
+
+  * Jeff Bailey <jbailey@nisa.net>
+
+    Update to Standards-Version 3.6.1:
+    - debian/changelog: Convert from Latin-1 to UTF-8.  1 Line affected.
+    - debian/control.in/main: Update version number.
+    Fix some lintian warnings:
+    - debian/changelog: Remove obsolete user-emacs settings.
+    - debian/control.in/libc: Remove trailing periods from synopis'.  These
+    aren't full sentences.
+    - debian/local/manpages/gencat.1: New file.
+    - debian/local/manpages/trace.1: New file.
+    - debian/debhelper.in/libc-dev.manpages: Install them.
+    - debian/local/manpages/iconvconfig.8: New file.
+    - debian/debhelper.in/libc.manpages: Install it.
+    - debian/patches/90_glibc232-statvfs.dpatch: Don't get confused on bad
+    mtab.  (Closes: #219271)
+    - debian/patches/90_glibc232-timezones.dpatch: Update timezone
+    information.
+
+  * Phil Blundell <pb@nexus.co.uk>
+
+    - debian/patches/arm-ioperm.dpatch: Third time lucky?
+
+ -- Jeff Bailey <jbailey@nisa.net>  Wed,  5 Nov 2003 10:53:14 -0500
+
+glibc (2.3.2.ds1-9) unstable; urgency=low
+
+  * GOTO Masanori <gotom@debian.org>
+
+    - debian/po/es.po: Update.  Patched by Carlos Valdivia Yagüe
+      <valyag@dat.etsit.upm.es>.
+    - debian/debhelper.in/libc.preinst: Replace s/libc6/glibc/
+      in messages, actually there are not only libc6, but also
+      libc6.1, libc0.3, and so on.
+
+  * Daniel Jacobowitz <dan@debian.org>
+
+    - Export libpthread symbols needed for thread debugging
+      (glibc23-thread-debugging.dpatch).
+    - Remove glibc23-thread-debugging.dpatch in response to upstream
+      comments.  Don't strip libpthread symbols needed for thread debugging.
+    - Add version sanity check for kernels whose extraversion starts with a
+      dot (Closes: #218546).
+    - Disable SSE for pre-2.4 kernels (Closes: #218524).
+    - Symlink asm-sparc and asm-sparc64 into debian/include if necessary.
+    - Don't duplicate .so symlinks in libc6-s390x and libc6-dev-s390x.
+    - Add a build fix for sparc64; pread syscall has been renamed to
+      pread64.
+    - Add a FAQ entry for unresolved errno (Closes: #218561).
+    - Import patch from CVS to fix ucontext_t/mcontext_t on powerpc32
+      (Closes: #207806).
+    - Patch from Randolph Chung for HPPA system calls
+      (hppa-syscall.dpatch).
+
+ -- Daniel Jacobowitz <dan@debian.org>  Sat,  1 Nov 2003 18:54:16 -0500
+
+glibc (2.3.2.ds1-8) unstable; urgency=low
+
+  * Daniel Jacobowitz <dan@debian.org>
+
+    - Don't use --enable-omitfp since we don't install libc_g.a.
+    - Enable NPTL for S/390.
+    - Fix the /lib/ld64.so.1 symlink for s390x.
+    - Update maintainer scripts for fixes lost in the rewrite.
+    - Enable NPTL for ia64.  Thanks to Ian Wienand for testing.
+    - Automatically cross-compile if the kernel is too old to build
+      an optimized library.
+    - Do not run make check if cross compiling.
+    - Fix msqid_ds on MIPS.  Dpatch from Guido Guenther, patch by
+      Thiemo Seufer (Closes: #215273, #200215, #217593).
+    - Check for old copies of glibc in a couple of places (Closes: #212224).
+    - Fix a libio compatibility code bug which crashed the Citrix client
+      (glibc23-libio-compat.dpatch).
+    - Remove fuzzy markers from fr.po.  Patch from Denis Barbier
+      <barbier@debian.org> (Closes: #217865).
+    - Re-add debian/patches/80_glibc232-locales-nb_NO-fix.dpatch, which had
+      gotten lost.
+    - Re-add typo fixes to iconv.1 and rpcgen.1.  (Closes: #202161)
+    - Merge iconv.1 fix to iconv.pod.
+    - Re-add fix for locale-gen and POSIXLY_CORRECT.
+    - Update ldso-disable-hwcap.dpatch and preinst/postinst scripts.
+    - Update maintainer scripts not to use basename; dpkg invokes the
+      scripts as tmp.ci/postinst, not libc6.postinst.
+    - Add a patch for building shlib.lds which fixes a parse error when
+      building without an existing -dev package installed.
+      - debian/patches/11_shlib-lds.dpatch
+
+  * Jeff Bailey <jbailey@nisa.net>
+
+    - debian/sysdeps/linux.mk: Use getconf _NPROCESSORS_ONLN instead
+      of /proc/cpuinfo to calculate NJOBS.  The cpuinfo file format
+      is not consistent between arch's.
+    - debian/.cvsignore: New file.
+
+  * GOTO Masanori <gotom@debian.org>
+
+    - debian/debhelper.in/locales.dirs: Add /usr/lib/locale, because
+      localedef stops to create locale data if this dir is not found.
+    - debian/debhelper.in/libc-otherbuild.preinst: Fix typo which
+      disturbs to install libc-otherbuild package.
+    - Dan's checking code for old copies in libc6 preinst fixes
+      installation breakage for example /usr/lib/debug is in
+      /etc/ld.so.conf, or so on.
+      (Closes: #165374, #212224).
+    - debhelper.in/libc.preinst: add kernel version sanity check for
+      sun4m arch which needs at least 2.4.21 due to hardware multiplication
+      instruction is used by default.  (Closes: #215010, #215012)
+    - debian/debhelper.in/libc.preinst: fix check_dirs return value.
+
+ -- Daniel Jacobowitz <dan@debian.org>  Tue, 28 Oct 2003 18:29:09 -0500
+
+glibc (2.3.2.ds1-7) experimental; urgency=low
+
+  * Daniel Jacobowitz <dan@debian.org>
+
+    - Fix TLS libraries, which belong in /lib/tls, not /libtls.
+    - Fix -march for NPTL libraries on i386 - was i686, should have
+      been i486.
+    - Move i686 libraries to /lib/tls/i686/cmov.
+    - Include make check output in the libc package.
+    - S/390 perversely uses /lib/ld64.so.1 as the dynamic linker; include
+      a symlink.
+    - Leave /lib64/ld64.so.1 executable on S/390.
+    - Generate SUPPORTED again.
+    - Update ldconfig to prefer /lib/tls to /lib/i686/cmov.
+    - Disable conflicts between optimized libraries and libsafe/memprof;
+      they've worked for a while.
+    - Switch the i686 optimized libraries to use NPTL, and update their
+      description.
+    - Fix dependencies for locales package.
+    - Include SONAME symlinks in libc6-dbg.
+    - Remove vestigial gconv-modules Provides.
+    - Install more files for libc6 and locales packages.
+    - Correct section for zdump.8 man page.
+    - Install ld.so.8 in the right directory (debhelper thinks that .so is a
+      language extension).
+    - Install info menu entries for functions provided by libc, in
+      glibc-doc.
+    - Include changelog in glibc-doc also.
+    - Re-add libc6-dev dependency on matching libc6.
+    - Fix libc-udeb build.
+
+  * Phil Blundell <pb@nexus.co.uk>
+
+    - debian/patches/arm-ioperm.dpatch: Try again.
+
+  * Jeff Bailey <jbailey@nisa.net>
+
+    Welcome back HPPA, Thanks to Carlos O'Donell <carlos@baldric.uwo.ca>
+
+    - debian/patches/50_glibc232-hppa-full-nptl-2003-10-22.dpatch: New.
+    - debian/patches/50_glibc23-hppa-entry.dpatch: Remove.
+    - debian/patches/glibc23-00-hppa-pthreads.dpatch: Remove.
+    - debian/patches/glibc23-01-hppa-dl-machine.dpatch: Remove.
+    - debian/patches/glibc23-07-hppa-atomicity.dpatch: Remove.
+    - debian/patches/glibc23-hppa-compat.dpatch: Remove.
+    - debian/patches/glibc23-hppa-malloc8.dpatch: Remove.
+
+    - debian/patches/00list: Update.
+
+    - debian/rules: Define NJOBS as 1.
+    - debian/sysdeps/linux.mk: Define NJOBS based on number of processors
+    - debian/rules.d/build.mk: Use -j $(NJOBS) during build.
+    Based on patch from Ian Wienand <ianw@gelato.unsw.edu.au>
+
+    - debian/debhelper.in/libc.install: Install pt_chown
+    - debian/rules.d/debhelper.mk: Don't clobber SUID on pt_chown
+    - debian/debhelper.in/glibc-doc.docs: Install DEB_SRCDIR/ChangeLog*
+    - debian/rules.d/build.mk: Don't run testsuite if DEB_BUILD_OPTIONS
+      contains nocheck
+
+    - debian/sysdeps/gnu.mk: Define slibdir.
+    - debian/rules.d/build.mk: Only set slibdir in configparms if its set.
+    - debian/debhelper.in/glibc-doc.doc-base: New file.
+    - debian/debhelper.in/glibc-doc.install: New file.
+    - debian/debhelper.in/glibc-doc.links: New file.
+    - debian/rules.d/build.mk: Generate HTML files.
+    - debian/rules.d/debhelper.mk: Map LIBC to $(libc) in generated files.
+    - debian/debhelper.in/libc.install: Install Linuxthreads ChangeLog.
+    - debian/debhelper.in/libc.docs: Install various docs.
+    - debian/sysdeps/kfreebsd-gnu.mk: New file.  Put in all the magic
+      from the old packaging.
+    - debian/sysdeps/kfreebsd.mk: Deleted.
+    - debian/sysdeps/gnu.mk: Add in GLIBC_OVERLAYS to allow patching to work,
+      create ld.so symlink at end of build.
+    - debian/sysdeps/sparc.mk: Change MIN_KERNEL_REQUIRED to
+      MIN_KERNEL_SUPPORTED.
+    - debian/sysdeps/s390.mk: Likewise.
+    - debian/rules: Define kernel_check macro.
+    - debian/sysdeps/linux.mk: Override kernel_check for Linux.
+    - debian/rules.d/build.mk: Call kernel_check macro when --build ==
+      --host
+
+  * GOTO Masanori <gotom@debian.org>
+
+    - debian/po/ru.po: Update.  Patched by Ilgiz Kalmetev
+      <translator@ilgiz.pp.ru>.  (Closes: #214349)
+
+ -- Daniel Jacobowitz <dan@debian.org>  Sat, 25 Oct 2003 15:09:02 -0400
+
+glibc (2.3.2.ds1-6) experimental; urgency=low
+
+  * Phil Blundell <pb@debian.org>
+
+    - debian/patches/arm-ioperm.dpatch: New.
+
+  * Daniel Jacobowitz <dan@debian.org>
+
+    - Add debhelper build dependency.
+    - Use linux-kernel-headers package for headers.
+    - Add S/390 support.
+    - Build libc6-dev-sparc64.
+
+ -- Daniel Jacobowitz <dan@debian.org>  Mon, 20 Oct 2003 16:27:39 -0400
+
+glibc (2.3.2.ds1-5) experimental; urgency=low
+
+  * Daniel Jacobowitz <dan@debian.org>
+
+    - Fix a thinko in i686 timing patch for non-HP_TIMING architectures.
+    - Add -k to make check.
+
+ -- Daniel Jacobowitz <dan@debian.org>  Mon, 13 Oct 2003 10:53:31 -0400
+
+glibc (2.3.2.ds1-4) experimental; urgency=low
+
+  * Daniel Jacobowitz <dan@debian.org>
+
+    - Update i686 timing patch to fix clock_gettime.
+    - Update glibc23-cmov patch to let ld load tls libraries from
+      ld.so.cache.
+    - Include symlinks in optimized library directories to placate
+      dpkg-shlibdeps.
+    - Fix shlibs files to include a version again.
+    - Re-enable make check.
+    - Update makeconfig.dpatch to fix a typo that broke make check.
+    - Add glibc-make-check-perms.dpatch to fix an upstream make check
+      problem.
+    - Build some optimized libraries using appropriate --build options
+      so that they can run make check.
+
+  * Jeff Bailey <jbailey@nisa.net>
+
+    - Build libraries for sparcv9 and sparc64.
+    - Enable TLS for ia64.
+
+ -- Daniel Jacobowitz <dan@debian.org>  Sun, 12 Oct 2003 19:42:11 -0400
+
+glibc (2.3.2.ds1-3) experimental; urgency=low
+
+  * Daniel Jacobowitz <dan@debian.org>
+
+    - Use ldd* in debhelper.in/libc6, because non-i386 arches don't have
+      lddlibc4.
+    - Include gconv-modules in libc6.
+    - Don't include some unnecessary generated kernel headers.
+    - Merge previous .dpatch files (Closes: #214470).
+    - Run depflags.pl again (Closes: #214468).
+    - Don't include profiled libraries in libc-dev (Closes: #214504).
+    - Ship /usr/include/asm-generic (Closes: #214512).
+
+ -- Daniel Jacobowitz <dan@debian.org>  Mon,  6 Oct 2003 21:18:28 -0400
+
+glibc (2.3.2.ds1-2) experimental; urgency=low
+
+  * Daniel Jacobowitz <dan@debian.org>
+
+    - Install the right headers in /usr/include/asm, instead of trying to
+      replace the directory with a symlink (Closes: #214233).
+    - Map DEB_HOST_GNU_CPU to a uname value for creating the asm symlink.
+    - Move libc6-dev's postinst back to preinst.
+    - Support multiple autoconf.h headers.
+    - Add an ia64 autoconf.h, from Branden Robinson.
+
+ -- Daniel Jacobowitz <dan@debian.org>  Sun,  5 Oct 2003 14:47:05 -0400
+
+glibc (2.3.2.ds1-1) experimental; urgency=low
+
+  * Essentially redo the debian/ packaging directory.
+
+    Specifically, the following directories were changed:
+    - debian/sysdeps/*: Redo into os-based and arch-based handling.
+    - debian/debhelper.in/*: Use debhelper for all package management.
+    - debian/rules.d/*: Split out rules file into logical pieces.
+    - debian/local/*: Move all of the files that Debian provides to here.
+
+    Update dpatch to more closely match the debian package:
+    - debian/patches/0list: Rename to 00list to match dpatch update.
+    - debian/rules.d/dpatch.mk: Sync with Debian package with the
+      following four changes:
+      1) Support srcdir != builddir builds.
+      2) Support $(stampdir)
+      3) patch target depends on unpack
+      4) Use $(DEB_SOURCE_PACKAGE) instead of $(PACKAGE)
+
+    Remove dependency on various kernel-headers packages, bring into
+    the package:
+    - linux-kernel-headers/: New directory, import from 2.6.0-test2
+
+    Add NPTL support on i386:
+    - debian/sysdeps/i386.mk: Add NPTL patterns, set minimum kernel.
+
+    Redo "DBS-Style" tarball support:
+    - debian/rules.d/tarball.mk: New file
+    - debian/sysdeps/linux.mk: Bring in linuxthreads and nptl overlays.
+    - prep.sh: Remove.
+    - version: Remove.
+
+    Update to recent CVS snapshot to support NPTL:
+    - debian/patches/10_cvs.dpatch: update
+
+    This cleanup project is the result of several discussions between
+    Jeff Bailey, GOTO Masanori, Daniel Jacobowitz, and Philip Blundell.
+
+    The initial work here was done by Jeff Bailey, Branden Robinson,
+    and Daniel Jacobowitz.
+
+ -- Daniel Jacobowitz <dan@debian.org>  Thu,  2 Oct 2003 13:47:40 -0400
+
+glibc (2.3.2-9) unstable; urgency=medium
+
+  Urgency set to medium, because this version should bring HPPA alive again.
+
+  * GOTO Masanori  <gotom@debian.org>
+
+    - debian/patches/82_glibc232-iconv-euc-jp-ms-fix.dpatch: Fix EUC-JP-MS
+      does not work even if they are listed as available in iconv.
+      Dpatched by Topia <topia@clovery.jp>.  (Closes: #212080)
+
+    - debian/manpages/iconv.1: Fix typo in -o option.  Patched by
+      Max Vozeler <max@hinterhof.net>.  (Closes: #211733)
+
+    - debian/manpages/rpcgen.1: Fix typo which cause some infos for the '-o'
+      option are not shown, and add -Sm option description.  Patched by
+      Nicolas Francois <nicolas.francois@centraliens.net>.
+      (Closes: #211984)
+
+    - debian/libc/DEBIAN/preinst: Updated libc6 libnss restarting version
+      from 2.2.94-1 to 2.3.2-2 in preinst.  Postinst code was already fixed
+      in 2.3.2-2.  (Closes: #211825)
+
+    - debian/locales/DEBIAN/template: There is no reason to
+      set LANG=C in /etc/environment, so do not display this locale
+      in the locales/default_environment_locale question.
+    - debian/locales/DEBIAN/config: Likewise.
+    - debian/locales/DEBIAN/postinst: If /etc/environment sets the LANG
+      variable and a new configuration asks for not setting it, the
+      line was not removed from this file.
+    - debian/po/templates.pot: Update templates followed by above changes.
+    - debian/po/fr.po: Update accordingly using debconf-updatepo with new
+      translation.
+    - debian/po/ja.po: Likewise.
+    - debian/po/ca.po: Update accordingly using debconf-updatepo.
+    - debian/po/de.po: Likewise.
+    - debian/po/es.po: Likewise.
+    - debian/po/fr.po: Likewise.
+    - debian/po/ko.po: Likewise.
+    - debian/po/pt_BR.po: Likewise.
+    - debian/po/ru.po: Likewise.
+    - debian/po/nl.po: Update accordingly using debconf-updatepo with
+      fixing line invalid wrapping.
+      All patched by Denis Barbier <barbier@debian.org>.
+
+    - debian/patches/80_glibc232-locales-nb_NO-fix.dpatch: Added to fix
+      nb_NO as real locale, not an alias.  Patched by Petter Reinholdtsen
+      <pere@hungry.com>.  (Closes: #206474)
+
+  * Jeff Bailey <jbailey@nisa.net>:
+
+     - 20_glibc232-hppa-full-2003-10-20.dpatch: New HPPA patch.
+       (Closes: #209253) Thanks to Carlos O'Donell <carlos@baldric.uwo.ca>
+
+     - 50_glibc23-hppa-entry.dpatch: Remove.
+     - 80_glibc232-locales-nb_NO-fix.dpatch: Remove.
+     - glibc23-00-hppa-pthreads.dpatch: Remove.
+     - glibc23-01-hppa-dl-machine.dpatch: Remove.
+     - glibc23-07-hppa-atomicity.dpatch: Remove.
+     - glibc23-hppa-compat.dpatch: Remove.
+     - glibc23-hppa-malloc8.dpatch: Remove.
+
+     - 0list: Update
+
+ -- Jeff Bailey <jbailey@nisa.net>  Wed, 22 Oct 2003 13:46:39 -0400
+
+glibc (2.3.2-8) unstable; urgency=low
+
+  * Phil Blundell <pb@debian.org>
+
+    - debian/control.in/main: add gawk to Build-Depends, since testsuite
+      apparently requires it.
+
+    - debian/patches/pthread-cleanup.dpatch: Vector __pthread_cleanup_push
+      and __pthread_cleanup_pop through __libc_pthread_functions.
+      (Closes: #205234)
+
+    - debian/patches/arm-no-hwcap.dpatch: Admit HWCAP_FAST_MULT again,
+      since we want to start using this for openssh.
+    - debian/patches/arm-updates.dpatch: Add some miscellaneous arm
+      changes taken from upstream.
+    - debian/patches/arm-vfork.dpatch: Avoid bad interaction between
+      vfork and libpthread.
+
+  * GOTO Masanori  <gotom@debian.org>
+
+    - debian/patches/80_glibc232-fesetround-fix.dpatch: Fix fesetround static
+      link time failure.  (Closes: #211135)
+
+    - debian/patches/lo_LA.UTF-8_not_supported.dpatch: Dropped, to support
+      lo_LA.UTF-8 again.
+    - debian/patches/80_glibc232-locales-lo_LA.dpatch: Added to support
+      lo_LA.UTF-8 again.
+
+    - debian/locales/usr/sbin/locale-gen: Fix locale-gen breaks with bash
+      2.03, unset POSIXLY_CORRECT iff it's previously defined.
+      Patched by Daniel Verite <daniel@brainstorm.fr>.  (Closes: #210301)
+
+ -- Philip Blundell <pb@nexus.co.uk>  Wed, 17 Sep 2003 20:44:48 +0100
+
+glibc (2.3.2-7) unstable; urgency=medium
+
+  * GOTO Masanori  <gotom@debian.org>
+
+    - debian/patches/90_glibc232-mathinline_iso.dpatch: Fix inline math
+      function complaints with gcc -pedantic -ffast-math.  Patched by
+      Thomas Richter <thor@math.TU-Berlin.DE>.  (Closes: #208016, #207221)
+
+    - debian/patches/template.dpatch: Added DP: Related bugs: field.  You can
+      use it to put which bugs are related with this dpatch.
+
+  * Daniel Jacobowitz <dan@debian.org>
+
+    - debian/control.in/main: Update binutils dependency for !s390.
+
+    - debian/patches/linuxthreads-push-pop.dpatch: Add __libc_cleanup_push
+      and __libc_cleanup_pop.
+    - debian/patches/syslog-backrev.dpatch: Remove, no longer necessary.
+      This should fix the crashes in syslog without libpthread loaded.
+
+    - debian/patches/linuxthreads-jumptable-wine.dpatch: Move
+      pthread_cond_timedwait out of the way, so that it doesn't break
+      the way Wine pokes into this structure (Closes: #210347).
+
+    - debian/patches/ia64-memccpy.patch: Fix a segfault on ia64
+      (Closes: #210441).
+
+ -- Daniel Jacobowitz <dan@debian.org>  Fri, 12 Sep 2003 14:56:19 -0400
+
+glibc (2.3.2-6) unstable; urgency=low
+
+  * Phil Blundell <pb@debian.org>
+
+    - debian/control.in/main: require kernel-headers-2.4.20-m68k (>=
+      2.4.20-1) for m68k.  Requested by Adam Conrad <adconrad@0c3.net>.
+
+    - debian/patches/pthread_cond_timedwait.dpatch: avoid problem when
+      pthread_cond_timedwait is used in code that doesn't link with
+      -lpthread.  (Closes: #209139)
+
+  * GOTO Masanori  <gotom@debian.org>
+
+    - debian/sysdeps/kfreebsd-gnu.mk: Added to support kfreebsd-gnu.
+      Patched by Robert Millan <zeratul2@wanadoo.es>.  (Closes: #206663)
+    - debian/sysdeps/freebsd.mk: Dropped because of replacing kfreebsd-gnu.mk.
+    - debian/sysdeps/soname.mk: Modified from freebsd to kfreebsd-gnu.
+
+ -- Philip Blundell <pb@nexus.co.uk>  Mon,  8 Sep 2003 08:51:49 +0100
+
+glibc (2.3.2-5) unstable; urgency=low
+
+  * Phil Blundell <pb@debian.org>
+
+    - debian/control: change section for -pic, -dbg, -prof packages
+      from devel to libdevel.
+
+    - debian/control.in/main: add Build-Depends changes from 2.3.2-3
+      here as well.
+
+    - debian/packages.d/*.mk: add md5sums for generated packages,
+      thanks to Petr Konecny.  (Closes: #158354)
+
+    - debian/patches/80_glibc232-locales-header.dpatch: adjust
+      filenames so patch applies correctly.
+
+    - debian/locales/DEBIAN/config: The "Leave alone" option has been
+      removed, but locale-gen crashes if it was set by a previous run,
+      so really discard it.  Patch by Denis Barbier (Closes: #204958)
+
+    - debian/patches/lo_LA.UTF-8_not_supported.dpatch: remove this
+      locale from SUPPORTED file; requested by Denis Barbier.
+      (Closes: #205118)
+
+    - debian/patches/nss_compat-shadow: fix problem with shadow
+    passwords and NIS.  Patch from Thorsten Kukuk.  (Closes: #204711)
+
+  * GOTO Masanori <gotom@debian.org>
+
+    - debian/control.in/libc: Add more missing change section for -pic,
+      -dbg, -prof packages from devel to libdevel.
+    - debian/control.in/libc-dbg: likewise.
+
+    - debian/patches/80_glibc232-locales-header.dpatch: Fix an_ES,
+      wa_BE, yi_US localedata header.  (Closes: #194289)
+
+    - debian/locales/usr/sbin/locale-gen: Add "unset POSIXLY_CORRECT"
+      because if user set POSIXLY_CORRECT, this script is interrupted.
+      (Closes: #206784)
+
+    - debian/patches/glibc22-ttyname-devfs.dpatch: Fix one byte leak
+      in getttyname_r.  Patched by Hunor Csordas <hunor@cs.elte.hu>.
+      (Closes: #194637)
+
+    - debian/sysdeps/freebsd.mk: Modified config-os from freebsd-gnu
+      to kfreebsd-gnu.  Patched by Robert Millan <zeratul2@wanadoo.es>.
+      (Closes: #206663)
+
+    - debian/patches/80_glibc232-iconvdata-fix.dpatch: Fix cp932
+      does not work.  (Closes: #205679)
+
+ -- Philip Blundell <pb@nexus.co.uk>  Tue, 26 Aug 2003 22:51:03 +0100
+
+glibc (2.3.2-4) unstable; urgency=low
+
+  * Jeff Bailey <jbailey@nisa.net>
+    - debian/locales/DEBIAN/postinst: Use tail -n 1 instead of tail -1.
+      Thanks to Jurij Smakov (Closes: #206464)
+
+  * Phil Blundell <pb@debian.org>
+    - debian/patches/glibc23-arm-waitpid.dpatch: deleted.
+    - for arm, Build-Depend on kernel-headers 2.4.19-4 or newer.
+      (Closes: #206895)
+    - debian/patches/revert-old-libio.dpatch: back out changes causing
+      problems with fseek in binaries linked with glibc 2.0.
+      (Closes: #206839)
+    - debian/libc/DEBIAN/postinst: also restart cucipop (Closes: #206783)
+    - debian/patches/arm-output-format.dpatch: Very bad hack to avoid
+      problem with libc.so on ARM until a proper fix is forthcoming.
+    - debian/patches/81_glibc232-utimes-fix.dpatch: replace with version
+      that applies cleanly to current sources.
+    - debian/control: require sed 4.0.5-4 or later.
+
+  * GOTO Masanori <gotom@debian.org>
+
+    - debian/po/es.po: Updated Spanish (es) debconf template.
+      Patched by Carlos Valdivia Yagüe <valyag@dat.etsit.upm.es>.
+    - debian/patches/81_glibc232-utimes-fix.dpatch: Fix utimes wrong time
+      calculation.  Patched by Paul Eggert <eggert@CS.UCLA.EDU>.
+      (Closes: #204728, #202243, #205110)
+
+ -- Philip Blundell <pb@nexus.co.uk>  Tue, 26 Aug 2003 17:27:00 +0100
+
+glibc (2.3.2-3) unstable; urgency=low
+
+  * GOTO Masanori <gotom@debian.or.jp>
+
+    - debian/patches/80_glibc232-futimes-buildfix.dpatch: Fix build failure
+      on arm, mips, mipsel, due to be missing #include <string.h>.
+      (Closes: #204768)
+
+    - debian/libc/DEBIAN/preinst: Modified chown owner:group separater from
+      `.' to `:', according to POSIX 1003.1-2001.  (Closes: #205527)
+    - debian/packages.d/glibc-doc.mk: likewise.
+    - debian/packages.d/libc-dbg.mk: likewise.
+    - debian/packages.d/libc-dev.mk: likewise.
+    - debian/packages.d/libc-pic.mk: likewise.
+    - debian/packages.d/libc-prof.mk: likewise.
+    - debian/packages.d/libc-udeb.mk: likewise.
+    - debian/packages.d/libc.mk: likewise.
+    - debian/packages.d/locales.mk: likewise.
+    - debian/packages.d/nscd.mk: likewise.
+    - debian/packages.d/optimized.mk: likewise.
+    - debian/packages.d/s390x.mk: likewise.
+    - debian/packages.d/sparc64.mk: likewise.
+
+    - debian/libc/DEBIAN/postinst: Restarting script supported dovecot.
+      (Closes: #205566)
+
+    - debian/po/pt_BR.po: Updated Brazilian Portuguese (pt_BR) debconf
+      template.  Patched by Andre Luis Lopes <andrelop@ig.com.br>.
+      (Closes: #195873)
+    - debian/po/nl.po: Added nl.po debconf template.  Patched by
+      Bart Cornelis <cobaco@linux.be>.  (Closes: #205090)
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Fri,  8 Aug 2003 20:32:24 +0900
+
+glibc (2.3.2-2) unstable; urgency=low
+
+  This is the "fleeing to the horizon" release...
+
+  * GOTO Masanori <gotom@debian.or.jp>
+
+    - debian/patches/glibc23-arm-waitpid.dpatch: Fix arm ld-linux failure due
+      to sys_waitpid missing.  Patched by Philip Blundell <pb@nexus.co.uk>.
+    - debian/patches/50_glibc232-arm-dwarf2-buildfix.dpatch: Avoid arm dwarf2
+      build failure.  Patched by Philip Blundell <pb@nexus.co.uk>.
+    - debian/patches/50_glibc232-m68k-dwarf2-buildfix.dpatch: Avoid m68k
+      dwarf2 build failure.  Suggested by Philip Blundell <pb@nexus.co.uk>,
+      Andreas Schwab <schwab@suse.de>.
+    - debian/libc/DEBIAN/postinst: Modified watermark of restarting NSS
+      services from 2.1.94-1 to 2.3.2-2, because libnss_compat is changed in
+      2.3.2-1 (2003-06-17 Upstream change).
+    - debian/patches/80_glibc232-wcsmbs-fix.dpatch: Added to fix wcsmbs bugs
+      which is lacked in 2003-07-15 upstream cvs.  (Closes: #202969)
+
+    - These bugs are fixed in this update:
+      * Bug in dlopen/dlclose leads to segfaults with kdecore is fixed in this
+        version.  (Closes: #201221)
+      * Static linking adjtimex() on alpha failed to compile due to undefined
+        reference to `__adjtimex_tv32'.  It's fixed in this version.
+        (Closes: #186331)
+
+  * Jeff Bailey <jbailey@nisa.net>
+    - debian/packages.d/s390x.mk: Remove gcc-3.2 hardcode
+
+  * Phil Blundell <pb@nexus.co.uk>
+    - debian/patches/alpha-crti.dpatch: remove stray .prologue causing
+      alpha build failure.
+    - debian/patches/alpha-pwrite.dpatch: add missing __GI___pwrite64 alias.
+    - debian/control: demand binutils 2.14.90.0.5-0.1 or later (required
+      for .usepv on alpha)
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Sat, 19 Jul 2003 00:37:11 +0900
+
+glibc (2.3.2-1) experimental; urgency=low
+
+  ** UPLOADING THIS TO EXPERIMENTAL **
+
+  * Clint Adams <schizo@debian.org>
+    - debian/control: build-dep on gcc-3.3 for sparc(64)
+    - debian/rules: re-enable sparc64 build
+    - debian/packages.d/sparc64.mk: use gcc-3.3 to build sparc64
+    - debian/sysdeps/linux.mk: re-enable sparc64 build
+
+  * Jeff Bailey <jbailey@nisa.net>
+    - debian/patches/hurd-enable-ldconfig.dpatch: New file
+    - debian/packages.d/libc.mk: Install regular ldconfig, not
+      debian/ldconfig-hurd.sh on hurd-i386
+    - debian/patches/0list: Add hurd-enable-ldconfig
+    - debian/sysdeps/paths.mk: Comply with FHS, use $(prefix)/lib, not
+      $(prefix)/libexec
+    - debian/rules: Introduce "perfect_make_check_archs" concept -
+      arch's listed in this variable must pass make check cleanly,
+      or the build will fail.  Start off with i386, powerpc, sparc, alpha
+      and s390.
+    - debian/control.in/main: Build-dep on gcc-3.3
+    - debian/sysdeps/tools.mk: Use gcc-3.3
+    - debian/patches/sparc32-buildfix.dpach: Prune after yet another CVS
+    update
+    - debian/patches/syslog-backrev.dpatch: New file
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - Updated glibc 2.3.2.
+    - debian/patches/cvs.dpatch: rename it to 10_cvs.dpatch.
+      I plan to introduce <2digitnumber>_<filename>.dpatch filename.
+    - debian/patches/10_cvs.dpatch: update 2003-07-15 upstream cvs.
+    - version: bump up to 2.3.2.
+    - rules.d/shlibs.mk: bump up to 2.3.2.
+    - debian/sysdeps/sysdeps.mk: i386 optimization level is back to -O2.
+
+    - These debian/patches/<below files> are removed from cvs because
+      they are no longer being used and were superceeded by CVS patches:
+      * document-fix.dpatch
+      * glibc23-cert-rpcxdr.dpatch
+      * glibc23-getdents64-fix.dpatch
+      * glibc23-getaddrinfo.dpatch
+      * glibc23-hppa-shmlba.dpatch
+      * glibc23-m68k-madv.dpatch
+      * glibc23-malloc-check.dpatch
+      * glibc23-regcomp.dpatch
+      * signal-texi.dpatch
+      * glibc23-ia64-strncpy.dpatch
+      * elf-machine-rela-mips.dpatch
+      * glibc23-linuxthreads-fix.dpatch
+      * locales-monetary.dpatch
+
+    - These debian/patches/<below files> are removed from cvs because
+      they are no longer being used and already fixed the previous versions:
+      * rtsig.dpatch
+      * crypt.dpatch
+      * s390x-lib64.dpatch
+      * hurd-fork-fix.dpatch
+
+    - These debian/patches/<below files> are fixed to apply for glibc
+      2.3.2 + cvs.dpatch.
+      * alpha-pic.dpatch: Fix the diff conflict.
+      * glibc23-hppa-Rminkernel.dpatch: likewise.
+      * libgcc-compat-all.dpatch: remove reflected entries in glibc-2.3.2.
+      * libgcc-compat-other.dpatch: likewise.
+      * ldconfig.dpatch: modify to be enable to compile again
+
+    - These bugs are fixed in this update:
+      * glibc 2.3.2 can handle errno correctly if 32 bit uid or gid is used
+        and errno=ENOSYS is defined before geteuid() is called.
+        setfsuid(), setfsgid() and getgroups() are also fixed with my patch,
+        bug reported by Fumihiko Kakuma.  (Closes: #183694)
+      * Submitter Neil's patch is applied in the upstream.  (Closes: #181701)
+      * cfmakeraw definition in manual terminal.texi is fixed with my patch.
+        It can be reassign only to manpages-dev.
+      * sparc and powerpc has O_DIRECT definition in fcntl.h.
+        (Closes: #157142, #157143)
+      * The definition both __bswap_16 and __bswap_32 in bits/byteswap.h is
+        fixed and it can be ready for non-gcc C-compilers.  (Closes: #181910)
+      * BSD derived random functions are correctly braced into #if defined
+        __USE_BSD with my patch.  (Closes: #108619)
+      * Dynamic loading problems with the recent OpenOffice.org, KDE,
+        Wine/Mono, Quake3 Arena, Oracle, and NVidia libGL library, is fixed.
+        Glibc TLS does not properly handle using dlopen() to access shared
+        libraries which utilize some TLS models.
+        (Closes: #171695, #184696, #167564, #192096, #200386)
+      * Missing ntp_adjtime weak reference on alpha is defined.
+        (Closes: #182654)
+      * Sparc64 sysdep.h typo is fixed.  (Closes: #185648)
+      * stdio-common/sscanf.c for libc6-sparc64 with gcc-3.3 can become to be
+        compiled.  (Closes: #185649)
+      * Timezone data is updated to tzdata2003a.
+        (Closes: #140788, #149862, #186210, #164719, #190322)
+      * /usr/bin/locale -a searches both /usr/lib/locale/<locale>/ and
+               /usr/lib/locale/locale-archive in this release. (Closes: #166979)
+      * Powerpc fpu_control.h is fixed to be enable to compile _FPU_SETCW
+        macro.  (Closes: #137020)
+      * The IA-64 versions of __sigsetjmp() and getcontext failed to restore
+        ar.unat before returning, is fixed in this version.  (Closes: #186654)
+      * regcomp() crashed with some regexp pattern is fixed.
+        (Closes: #187475)
+      * pthread_atfork() is removed from unistd.h.  Including this definition
+        in unistd.h is implementation dependent issue, and the upstream
+        decided not to keep it.  (Closes: #106254)
+      * It's fixed that malloc_stats() segfaults if you don't first allocate
+        memory.  (Closes: #191295)
+      * Typo in the symbol lookup code is fixed, which causes the loading of
+        the oracle binary to fail (and possibly affects other apps as well).
+        (Closes: #191952)
+      * The abday values for de_DE is changed to two letters. (Closes: #115536)
+      * IA64 umount needs to set second parameter for sys_umount.  It's fixed
+        in 2003-05-14 cvs.  (Closes: #193327)
+      * tmpfile64() is now available on hurd-i386.  (Closes: #171022)
+      * SIOCSIFNAME is added.  (Closes: #164638)
+      * cos() now correctly returns the cosine, not the sine, of values near
+        0.80 on machines lacking an optimised libm.  (Closes: #153548)
+      * ioperm() returns -ENODEV on ARM machines without ISA or PCI.
+        (Closes: #199134)
+
+    - debian/locales/usr/sbin/locale-gen: Fix the localedef invocation
+      argument order, to run under POSIXLY_CORRECT=1 environment.
+      (Closes: #185924)
+
+    - debian/sysdeps/depflags.pl: add Suggests: manpages-dev in libc-dev
+      package.  (Closes: #158410)
+    - debian/sysdeps/depflags.pl: Adding entry "Suggests: glibc-doc"
+      into depflags.pl push.
+    - debian/control.in/libc: Remove "Suggests: glibc-doc" in each -dev
+      package entry.
+    - debian/control: likewise.
+
+    - debian/patches/s390-tls.dpatch: add to build glibc 2.3.2 on s390.
+      The correct fix is to modify the kernel headers, but for the present
+      we use it regardless of the kernel issue.
+      Patched by Gerhard Tonn <GerhardTonn@gammatau.de>.
+    - debian/packages.d/libc-dev.mk: s390 kernel-headers package does not have
+      generate-asm.sh.  The current libc-dev.mk assumes the existence of this
+      script, but on s390 it's not existed.  Now libc-dev.mk s390 asm setup
+      part does not use generate-asm.sh, and has the generate-asm.sh
+      functionality in its own.  This makes s390 which has 32/64 bit multi
+      libraries are much easier to build.
+      Patched by Gerhard Tonn <GerhardTonn@gammatau.de>.
+    - debian/packages.d/s390x.mk: likewise.
+
+    - debian/locales/DEBIAN/postinst: add "rm -rf /usr/lib/locale/*"
+      to remove all old locale dir and locale-archive in locales
+      configuration time.  Requested by Denis Barbier <barbier@linuxfr.org>.
+    - debian/locales/DEBIAN/config: /usr/lib/locale/* files are no more
+      deleted when /etc/locale/gen is not managaed by debconf. Patched by
+      Denis Barbier <barbier@linuxfr.org>
+    - debian/locales/DEBIAN/postinst: likewise.
+
+    - debian/locales/DEBIAN/{config,postinst,templates}: Debconf must not
+      be used to store configuration items; another even more important is
+      that user changes in configuration files must be preserved.
+      These files are now fixed with this issue.  Patched by Denis Barbier
+      <barbier@linuxfr.org>.  Some suggestions by Joey Hess <joeyh@debian.org>.
+    - debian/locales/DEBIAN/config:
+      * Replace /bin/bash by /bin/sh on the shebang line.
+      * Add support for backing up.
+      * Parse configuration files and set debconf values.
+    - debian/locales/DEBIAN/postinst:
+      * Recreate configuration files from debconf values and run locale-gen
+      * As explained by Joey Hess, this script should be safer because some
+        border cases are now taken into account: configuration files might
+        have no EOL at EOF, and line order is preserved.
+    - debian/locales/DEBIAN/templates:
+      * Apply patch from #117509 and another typo fix by Joey Hess
+        (Closes: #117509)
+      * In locales/locales_to_be_generated, Choices is no more translatable
+        because it is set to Choices: ${locales}
+    - debian/locales/usr/sbin/locale-gen:
+      * Clean up /usr/lib/locale/ before generating locales
+    - debian/po/{ca.po, de.po, es.po, fr.po, ja.po, ko.po, pt_BR.po, ru.po,
+      templates.pot}: update with debconf-updatepo.
+
+    - debian/control: Change Section: from devel to libdevel for packages:
+      libc0.3-dev, libc6-dev, libc6-dev-s390x, libc6-dev-sparc64, libc6.1-dev
+      and libc1-dev.
+    - debian/control.in/libc: likewise.
+    - debian/control.in/s390x: likewise.
+    - debian/control.in/sparc64: likewise.
+
+    - debian/control: Remove "Conflicts: php4" from libc1 and libc0.3.
+    - debian/control: Add "Conflicts: gcc-3.0 (<< 1:3.0.4ds3-11), libgcc1
+      (<< 1:3.0.4ds3-11), fakeroot (<< 0.4.5-2.7)" to fix /usr/lib/64 vs
+      /usr/lib64 issue with upgrading from woody for sparc64 (see bug 156947).
+      Suggested by Dagfinn Ilmari Mannsaker <ilmari@ping.uio.no>.
+      (Closes: #188383, #193331)
+    - debian/control.in/sparc64: likewise.
+
+    - debian/copyright: update the version and the year 2003.
+
+    - debian/patches/locales-monetary.dpatch: add to change some locales
+      LC_MONETARY symbols: ar_SD, sr_YU, sr_YU@cyrillic, and es_EC.
+      And now this patch is merged into the upstream cvs, drop dpatch.
+      (Closes: #160040, #173963, #185342, #187142, #188159, #190785, #193020)
+      (Closes: #193508, #193509, #193510, #194791)
+
+    - debian/manpages/localedef.1: remove "-h" from --help option entry.
+      (Closes: #187621)
+
+    - debian/debver2localesdep.pl: add clever version recognition for binary
+      only NMU or source NMU/local packaging.
+      Patched by Gerhard Tonn <GerhardTonn@gammatau.de>.
+
+    - debian/patches/glibc23-linuxthreads-fix.dpatch: add to revert Jakub's
+      change in 2003-04-02 to be enable to compile librt.so for the present.
+      And this bug is fixed during the development, this patch is dropped now.
+      Thanks to Jack Howarth <howarth@bromo.msbb.uc.edu>.
+
+    - debian/libc/etc/init.d/devpts.sh: Modify mounting devpts for 2.5.68 and
+      later.  As of 2.5.68, devpts is not automounted when using devfs. So
+      even in that case, devpts needs to be mounted via the devpts.sh script
+      as well as the case that devfs is not used.
+      (Closes: #189792, #189879, #191785)
+
+    - debian/libc/DEBIAN/postinst: Add code to remove a relic of the past
+      /usr/doc/<package> symlinks.  This script should keep at least until
+      sarge release.  (Closes: #189854)
+    - debian/glibc-doc/DEBIAN/postinst: likewise.
+    - debian/locales/DEBIAN/postinst: likewise.
+    - debian/nscd/DEBIAN/postinst: likewise.
+    - debian/libc/DEBIAN/postinst: Remove symlinks for libc-{dbg,dev,pic,prof}.
+
+    - prep.sh: Add NPTL extract code.
+    - version: Add NPTL version.
+
+    - debian/packages.d/sparc64.mk: bumping up --enable-kernel version from
+      2.4.0 to 2.4.1.
+    - debian/packages.d/s390x.mk: likewise.
+
+    - debian/patches/50_glibc232-mips-buildfix.dpatch: add for building
+      mips/mipsel correctly.  Patched by Guido Guenther <agx@sigxcpu.org>,
+      Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>.
+
+    - debian/packages.d/libc-udeb.mk: libc-udeb includes libnss_dns and
+      libresolv.  (Closes: #192577)
+
+    - debian/patches/50_glibc23-hppa-entry.dpatch: added to fix funcptr
+      (function descriptors) for _start on hppa, so we need a
+      sysdeps/hppa/elf/entry.h (similar to ppc64, ia64, etc).
+      Patched by Randolph Chung <tausq@debian.org>.  (Closes: #193656)
+
+    - debian/patches/30_glibc232-base.dpatch: add that binutils 2.14.90.0.2
+      has entered in sid, which contain the binutils portion of the base fix.
+      Reported by Jack Howarth <howarth@fuse.net>.
+
+    - debian/patches/sparc32-buildfix.dpatch: added to fix sparc32 build.
+
+  * Ben Collins <bcollins@debian.org>
+    - debian/contron.in/sparc64: Remove the superflous (and incorrect) dep on
+      gcc-3.2 for libc6-dev-sparc64. Add lib64gcc1 as a dep for libc6-sparc64.
+    - Use CC for building sparc64 libs.
+    - Remove build-dep for gcc-3.3 on sparc.
+    - Really fix devpts.sh so that it mounts devpts whenever devpts is
+      available and not mounted.
+    - sparcv8-target.dpatch: New patch that enables v8 optimizations for
+      sparc-linux compiles. Debian specific. For some reason config.sub
+      doesn't recognize sparcv8, else I'd just pass sparcv8-linux as the host
+      target.
+    - Change how things are passed to configure for optimized packages, so
+      that we let glibc set all the optimizations for us.
+    - Change how sparc64 and s390x are built. Before the binary stage would
+      force the build of the packages. Now, the build/install phases dep on
+      the same for sparc64 and s390x. Same way that the OPT packages are done.
+
+ -- Jeff Bailey <jbailey@nisa.net>  Tue, 15 Jul 2003 14:35:58 -0400
+
+glibc (2.3.1-17) unstable; urgency=low
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - debian/libc/DEBIAN/preinst: Add NSS restarting preinstallation
+      service detection routine and messages.  xdm, kdm, gdm,
+      postgresql, xscreensaver needs user's hand restart.
+      (Closes: #165258, #165915, #184036, #184495, #188724)
+    - debian/libc/DEBIAN/postinst: Edit NSS restarting messages to
+      adopt some preinst messages.
+    - Cleanup optimized and sparc64 builds.
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Sat, 19 Apr 2003 22:01:40 +0900
+
+glibc (2.3.1-16) unstable; urgency=high
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - debian/patches/glibc23-cert-rpcxdr.dpatch: Fix "CERT Advisory
+      CA-2003-10 Integer overflow in Sun RPC XDR library routines"
+      (Closes: #185508).
+
+    - debian/packages.d/glibc-doc.mk: Fix unneeded file '[' and ']' in
+      /usr/share/man/man3.
+    - These debian/patches/<below files> are removed from cvs because
+      they are no longer being used and were superceeded by CVS patches:
+      - libgcc-compat-mips.dpatch
+      - libgcc-compat-sparc.dpatch
+    - debian/libc/DEBIAN/postinst: add spamassassin to restart during
+      upgrade from 2.2 to 2.3.  (Closes: #185275)
+    - debian/control.in/opt: add one empty line at the end of file.
+      This fix avoids opt packages to get mixed debian/control
+      message with libc-udeb package.  (Closes: #185688)
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Tue, 18 Mar 2003 00:04:13 +0900
+
+glibc (2.3.1-15) unstable; urgency=low
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - debian/packages.d/optimized.mk: drop configure --disable-static
+      option, because it does not work.  enable-kernel version bumps
+      up to 2.4.1.
+
+    - debian/manpages/nscd.8: Apply slightly improvement for the nscd(8),
+      nscd_nischeck(8), and nscd.conf(5) man pages.  Patched by
+      Sebastian Rittau <srittau@jroger.in-berlin.de> (Closes: #94058)
+    - debian/manpages/nscd.conf.5: likewise.
+    - debian/manpages/nscd_nischeck.8: likewise.
+    - debian/manpages/zdump.1: add the description that zonename should be
+      relative path name from /usr/share/zoneinfo.  (Closes: #171017)
+    - debian/manpages/locale.1: add the description for LOCPATH.
+      (Closes: #176661)
+
+    - debian/locales/DEBIAN/templates: Add a description "what is the
+      locale?". (Closes: #119197)
+    - debian/FAQ: Add description how to setup your own locale with
+      debconf + locales.  (Closes: #99763)
+
+    - debian/locales/DEBIAN/templates: Introducing new templates format
+      with po-debconf.  Thanks to Denis Barbier <barbier@linuxfr.org>.
+    - debian/packages.d/locales.mk: likewise.
+    - debian/po/*: likewise.
+    - debian/control.in/main: Build-Depends-Indep: po-debconf.
+    - debian/po/ja.po: Update translation data.
+    - debian/po/fr.po: Update translation data.  Translated by
+      Denis Barbier <barbier@debian.org>.  (Closes: #183652, #193083).
+
+    - debian/sysdeps/depflags.pl: Remove conflicts: file-rc (<< 0.7.0)
+    - debian/libc/DEBIAN/postinst: Use /usr/sbin/update-rc.d in updatercd(),
+      suggested by Anthony Towns <aj@azure.humbug.org.au>.
+    - debian/libc/DEBIAN/postinst: Check /usr/{lib,share}/file-rc/
+      because file-rc >= 0.7.0 does not use /usr/lib/file-rc.
+
+    - debian/patches/glibc23-hppa-compat.dpatch: add hppa libgcc-compat
+      symbols patch, patched by Randolph Chung <tausq@debian.org>.
+    - debian/patches/libgcc-compat-all.dpatch: update for mips and add
+      for alpha, patched by Guido Guenther <agx@debian.org>.
+    - debian/patches/libgcc-compat-other.dpatch: add for arm, m68k, ia64
+      and s390.  Patched by GOTO Masanori <gotom@debian.org>.
+
+    - debian/locales/usr/sbin/locale-gen: add "set -e" in order to return
+      value.  (Closes: #183449)
+
+    - debian/packages.d/libc-udeb.mk: contain libpthread.so to support
+      installer using pthread.  (Closes: #183155)
+
+    - debian/sysdeps/depflags.pl: remove php4 conflicts from libc6.
+      (Closes: #183477, #184091)
+
+    - debian/libc/DEBIAN/postinst: add proftpd-{ldap,mysql,pgsql} to
+      restart during upgrade from 2.2 to 2.3.  (Closes: #184129)
+    - debian/libc/DEBIAN/postinst: add cupsys.  (Closes: #184257)
+
+    - debian/patches/glibc23-m68k-madv.dpatch: add to fix build error
+      for some MADV_* used software on m68k, pulled from the latest cvs.
+      (Closes: #159723, #181661, #184589)
+
+    - debian/patches/glibc23-00-hppa-pthreads.dpatch: add to improve
+      linuxthreads on hppa.  Pathced by Carlos O'Donell
+      <carlos@baldric.uwo.ca>.  His summary: LinuxThreads is now using a
+      self-aligning lock.
+    - debian/patches/glibc23-hppa-malloc8.dpatch: add to improve malloc
+      on hppa.  Patched by Carlos O'Donell <carlos@baldric.uwo.ca>.
+      His summary: Malloc alignment has been moved back to 8 for optimal
+      performance.
+
+    - These debian/patches/<below files> are removed from cvs because
+      they are no longer being used and were superceeded by CVS patches:
+      - glibc23-02-hppa-min-kern-unwind-fde.dpatch
+      - glibc23-03-hppa-mcontext.dpatch
+      - glibc23-04-hppa-fcntl64.dpatch
+      - glibc23-05-hppa-buildhack.dpatch
+      - glibc23-06-hppa-tests.dpatch
+      - glibc23-08-hppa-configure.dpatch
+
+    - Glibc 2.3 uses another regex engine: "sed: woody version more than
+      1000 times slower than potato version" should be fixed.
+      (Closes: #155751)
+    - en_CA can generate without warnings.  In addition, we use debconf
+      interface in these days, this kind of "manual edit /etc/locale.gen"
+      bug should be avoided.  (Closes: #151631)
+    - libc6.postinst restarts samba in these days.  (Closes: #168189)
+    - _FPU_SETCW/_FPU_GETCW macro works fine on powerpc in these days.
+      "Incorrect macro _FPU_SETCW in <fpu_control.h>" should be fixed.
+      (Closes: #137020)
+    - hyper and unsigned hyper are supported in the current glibc.
+      "rpcgen(1) doesn't handle 64 bit types" should be fixed.
+      (Closes: #69041)
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Wed, 26 Feb 2003 18:44:08 +0900
+
+glibc (2.3.1-14) unstable; urgency=low
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - debian/patches/glibc23-cmov.dpatch: Fix hwcap condition code again,
+      previous version did not work properly under some situation.
+    - debian/sysdeps/depflags.pl: Fix libnss-db dependency from << 2.2-6
+      to <= 2.2-6.1.1, because the first version of libnss-db to work
+      with libc6 2.3 is 2.2-6.1, and 2.2-6.2 works under all architectures
+      correctly.  Suggested by Ryan Murray <rmurray@cyberhqz.com>.
+      (Closes: #181834)
+    - debian/sysdeps/depflags.pl: Fix libc6.postinst breakage with file-rc
+      (<< 0.7.0), now libc6 conflicts them.  (Closes: #181683, #182320)
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Fri, 21 Feb 2003 09:19:45 +0900
+
+glibc (2.3.1-13) unstable; urgency=low
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - debian/libc/DEBIAN/postinst: Replace from "/usr/lib/file-rc" to
+      "/usr/share/file-rc" to follow up file-rc 0.7.
+      (Closes: #181551, #181556, #181606)
+    - debian/libc/etc/init.d/devpts.sh: Fix devpts.sh failure if
+      $devfs_mounted is empty. (Closes: #181541, #181591)
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Wed, 19 Feb 2003 09:26:17 +0900
+
+glibc (2.3.1-12) unstable; urgency=low
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - debian/patches/glibc23-malloc-check.dpatch: Fix hppa MALLOC_CHECK_
+      invalid pointer problem.  (Closes: #177242)
+    - debian/patches/libgcc-compat-sparc.dpatch: Fix sparc libgcc compat
+      symbol problem.  Patched by Guido Guenther <agx@debian.org>
+      (Closes: #178645)
+    - debian/patches/locales-supported.dpatch: This dpatch addes many
+      locales especially for UTF-8 and ISO-8859-15, to display debconf
+      locale menu using SUPPORTED.orig.
+      (Closes: #135334, #154556, #177472, #99623, #130517)
+    - debian/packages.d/glibc-doc.mk: add pthread_{getspecific, key_delete,
+      setspecific} manpage symlinks to pthread_key_create. (Closes: #99530)
+    - debian/manpages/ldconfig.8: Update from the redhat manpages.
+      (Closes: #180916)
+    - debian/patches/libgcc-compat-all.dpatch: Fix i386 libgcc compat
+      symbol problem, this dpatch merges with
+      libgcc-compat-{sparc,mips}.dpatch, patched by Guido Guenther
+      <agx@debian.org>. (Closes: #179781, #180330)
+    - debian/locales/DEBIAN/{postinst,templates,config}: Fix default
+      environment variable "Leave alone" does not affect its meaning.
+      (Closes: #180040)
+  * Daniel Jacobowitz <dan@debian.org>
+    - debian/libc/etc/init.d/devpts.sh: Update devpts.sh to work with the
+      new grep package (Closes: #181409).
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Sat,  8 Feb 2003 22:08:59 +0900
+
+glibc (2.3.1-11) unstable; urgency=low
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - debian/libc/DEBIAN/preinst: Fix silly bug at parisc64 kernel version
+      check, replace from $ver to $kernel_ver. (Closes: #178159, #178217)
+    - debian/patches/glibc23-cmov.dpatch: Fix hwcap inappropriate handling
+      not to load CMOV libraries (/*/lib/i686/cmov/) on VIA C3 architecture.
+    - debian/patches/libgcc-compat-mips.dpatch: Fix undefined some symbols
+      like __umoddi3 to export libgcc compat symbol.  Patched by
+      Guido Guenther <agx@debian.org>.
+    - debian/patches/0list: Disabled ldso-disable-hwcap.dpatch because
+      (1) -opt is not provided currently, (2) disabling hwcap is not good
+      way whether -opt package is installed or not.
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Wed, 22 Jan 2003 22:17:45 +0900
+
+glibc (2.3.1-10) unstable; urgency=low
+
+  * The "trudging the sludge" release.
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - debian/packages.d/glibc-doc.mk: install linuxthreads/man/*.man
+      manpages into glibc-doc package. (Closes: #155794)
+    - debian/libc/DEBIAN/preinst: add kernel version check compared with
+      2.4.19-pa17 on parisc64. Suggested by Randolph Chung.
+    - debian/libc/DEBIAN/preinst: add kernel version requirement for
+      2.5.53-pa3 in 2.5 series kernel on parisc64.
+    - debian/locales/DEBIAN/config, debian/locales/DEBIAN/templates:
+      add translated selection "Leave alone" and "None" because such strings
+      were hardcoded and could not be localized in the templates file.
+      Patched by Denis Barbier <barbier@debian.org>.  (Closes: #171502)
+    - debian/packages.d/glibc-doc.mk: Fix glibc-doc dangling symbolic link for
+      /usr/share/doc/glibc-doc/html/index.html. (Closes: #169878, #176701)
+    - debian/libc/DEBIAN/postinst: Fix to work $DEBIAN_FRONTEND value
+      regardless its case insensitivity. See #176483.
+    - debian/sysdeps/depflags.pl: Fix again to conflict against wine
+      (<< 0.0.20021007-1) and php4 (<< 4:4.2.3-5). (Closes: #170385)
+    - debian/control: Fix unneeded Conflicts: wine and php4, as denoted above.
+    - debian/control.in/libc: likewise.
+    - debian/patches/glibc23-cmov.dpatch: Add CMOV to hwcap, for VIA C3 which
+      is i686 class processor, but does not have 686 optional instruction CMOV.
+    - debian/patches/glibc23-regcomp.dpatch: Fix regex crash, if clearing
+      buffer, clear allocated too.  This patch is pulled from the current
+      upstream glibc cvs.  (Closes: #175529)
+
+  * Daniel Jacobowitz <dan@debian.org>
+    - debian/patches/alpha-pic.dpatch: Fix errno reporting from syscalls
+      on Alpha (Closes: #175511).
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Sun,  5 Jan 2003 09:13:22 +0900
+
+glibc (2.3.1-9) unstable; urgency=low
+
+  * Daniel Jacobowitz <dan@debian.org>
+    - debian/packages.d/s390x.mk: Don't try to install CVS directories
+      (Closes: #174267).
+    - debian/packages.d/optimized.mk, debian/packages.d/sparc64.mk:
+      Likewise.
+    - debian/patches/glibc23-errno.dpatch: Updated for "h_errno" and "_res"
+      also.
+    - Upload properly this time, with a .diff.gz (Closes: #174436).
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - debian/patches/glibc23-hppa-shmlba.dpatch: Applied hppa SHMLBA
+      definition. (Closes: #170507)
+    - debian/libc/DEBIAN/postinst: add mysql-server in restarting service
+      list. (Closes: #172123)
+    - debian/patches/document-fix.dpatch: Applied patches sent by
+      H. S. Teoh and GOTO Masanori. (Closes: #117680)
+    - debian/patches/glibc23-asserth-decls.dpatch: Applied patches send by
+      Jeroen T. Vermeulen <jtv@bulletproof>. (Closes: #106253, #164571)
+    - debian/libc/DEBIAN/postinst: Removed 'logind' from checking list
+      because it does not exist.
+    - debian/libc/DEBIAN/postinst: Replaced dpkg -s from apache2 to
+      apache2-common correctly.
+    - debian/libc/DEBIAN/postinst: Redirect dpkg stderr message to /dev/null,
+      which is showed if there are not installed packages. (Closes: #168481)
+    - debian/libc/DEBIAN/postinst: Message typo fixed as "successfully."
+      (Closes: #168483)
+    - debian/manpages/ldd.1: Updated newer version which is pulled from
+      RedHat manpages.
+    - debian/locales/usr/sbin/locale-gen: add '-A /etc/locale.alias' into
+      localedef option to consult locale alias name when making archives.
+
+ -- Daniel Jacobowitz <dan@debian.org>  Thu,  2 Jan 2003 12:02:13 -0500
+
+glibc (2.3.1-8) unstable; urgency=high
+
+  * Daniel Jacobowitz <dan@debian.org>
+    - debian/patches/glibc23-errno.dpatch: Temporarily re-enable linking
+      to "errno" to fix compatibility with broken binaries
+      (Closes: #174040, #174004).
+    - debian/patches/glibc23-getaddrinfo.dpatch: Add getaddrinfo patch
+      from CVS (Closes: #174027).
+    - debian/control.in/main: Add myself to Uploaders.
+
+ -- Daniel Jacobowitz <dan@debian.org>  Tue, 24 Dec 2002 12:35:39 -0500
+
+glibc (2.3.1-7) unstable; urgency=high
+
+  * The "Climb Ev'ry Mountain" release.
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - debian/packages.d/s390x.mk: typo fixed, s390x-linux should be
+      ok to rebuild. (Closes: #173874)
+    - debian/patches/glibc23-getdents64-fix.dpatch: Fix getdents64
+      failure on linux kernel 2.2. (Closes: #173913)
+
+  * Jeff Bailey <jbailey@nisa.net>
+    - sysdeps/linux.mk: Finish disabling sparc64.
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Sun, 22 Dec 2002 01:35:43 +0900
+
+glibc (2.3.1-6) unstable; urgency=low
+
+  * The "I will not be thwarted" release.
+
+  * Daniel Jacobowitz <dan@debian.org>
+    - Update glibc23-ctype-compat.patch to fix segfaults in old static
+      binaries (Closes: #171451).
+    - Allow building from the CVS checkout without getting CVS dirs in the
+      resulting packages.  Whew.
+
+  * Jeff Bailey <jbailey@nisa.net>
+    - debian/patches/cvs.dpatch: Update.
+      (Closes: #171550, #170507)
+    - debian/patches/0list: Update
+    - debian/control.in/libc: Conflict against wine (<< 0.0.20021007-1)
+      (Closes: #170385)
+      Also conflict against php4 (<< 4:4.2.3-5)
+      Thanks to Steve Langasek for hunting this down!
+    - debian/rules: Disable sparc64 build targets for now.
+    - debian/packages.d/s390x.mx: Setup the 64 bit build as a cross-compile,
+      because 's390' cannot run binaries intended for 's390x'
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - cvs.dpatch update resolve some bugs (Closes: #169919, #165603)
+    - debian/patches/glibc23-hppa-Rminkernel.dpatch: Added hppa kernel
+      version checking due to prevent people from installing unmatched version.
+      Patched by Carlos O'Donell (Closes: #171804)
+    - debian/libc/DEBIAN/preinst: likewise.
+    - glibc23-function-compat.dpatch: Added for some bad application to
+      keep running and not to resolve some symbols like __libc_wait,
+      __libc_waitpid, so on. This patch will be removed when sarge will be
+      relased apparently. (Closes: #165358, #173201)
+
+    - debian/locales/DEBIAN/config: db_set is set if and only if locale.gen
+      is existed.  Patched by Masato Taruishi <taru@debian.org>
+      His note:
+       The previous config script always set locales_to_be_generated
+       even when /etc/locale.gen doesn't exist. So the question in
+       dpkg-preconfigure time became empty in dpkg --configure locales time.
+       This change resolves long outstanding locales bug.
+      (Closes: #156386, #151784, #154244, #164523)
+
+ -- Daniel Jacobowitz <dan@debian.org>  Mon,  2 Dec 2002 17:26:38 -0500
+
+glibc (2.3.1-5) unstable; urgency=low
+
+  * This is the "Leonids" release.
+
+  * Jeff Bailey <jbailey@nisa.net>
+    - debian/packages.d/libc-udeb.mk: Do not rename file to SONAME if it's
+      a symlink.  Needed for hurd-i386.
+    - debian/patches/signal-texi.dpatch: New file to remove link to
+      linuxthreads manual.  Needed for hurd-i386.
+
+    Welcome back, hppa:
+
+    - debian/patches/glibc23-00-hppa-pthreads.dpatch
+    - debian/patches/glibc23-01-hppa-dl-machine.dpatch
+    - debian/patches/glibc23-02-hppa-min-kern-unwind-fde.dpatch
+    - debian/patches/glibc23-03-hppa-mcontext.dpatch
+    - debian/patches/glibc23-04-hppa-fcntl64.dpatch
+    - debian/patches/glibc23-05-hppa-buildhack.dpatch
+    - debian/patches/glibc23-06-hppa-tests.dpatch
+    - debian/patches/glibc23-07-hppa-atomicity.dpatch
+    - debian/patches/glibc23-08-hppa-configure.dpatch
+    Thanks to Carlos O'Donell for these!
+
+    - debian/control.in/libc-udeb: Remove missing trailing blank line.
+    Thanks to Tollef Fog Heen.  Closes: #169342
+    - debian/control.in/s390x: Remove missing trailing blank line.
+    Thanks to Gerhard Tonn.
+
+    - debian/libc/DEBIAN/postinst: Fix error in apache2 restart logic.
+    Thanks to Carlos O'Donell.
+
+    - debian/packages.d/libc-dev.mk: Fix missing tabs from s390x section.
+    - debian/patches/s390-types.dpatch: New file to fix __ssize_t
+    Thanks to Gerhard Tonn for these.
+
+    - debian/packages.d/libc-udeb.mk: use DEB_HOST_ARCH, not DEB_BUILD_ARCH
+      for determining package name.  Fixes cross-compilation case.
+
+    - debian/patches/0list: Update for above
+
+ -- Jeff Bailey <jbailey@nisa.net>  Mon, 18 Nov 2002 23:12:47 -0500
+
+glibc (2.3.1-4) unstable; urgency=low
+
+  * Daniel Jacobowitz <dan@debian.org>
+    - debian/patches/cvs.patch: Fix RCS ID tags.
+    - debian/rules, debian/sysdeps/sysdeps.mk: Move i386 optimization
+      hack out of the rules file and put debugging information back in
+      libc6-dbg for i386 (Closes: #165892).
+    - debian/patches/crypt.dpatch: Fix initialization in crypt_r
+      (Closes: #163260).
+    - debian/patches/rtsig.dpatch: Fix the value of SIGRTMIN in non-threaded
+      applications (Closes: #165412).
+    - debian/rules, debian/packages.d/libc-dev.mk,
+      debian/packages.d/libc-udeb.mk: Don't use '{}' wildcards, to fix
+      building with /bin/sh -> ash.
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - debian/libc/DEBIAN/postinst: add more NSS services:
+        samba, courier-authdaemon
+    - debian/packages.d/sparc64.mk: fix build error.
+    - debian/libc/DEBIAN/postinst: modify apache2 service,
+      apache2 ships its init script in apache2-common, but the script
+      is in apache2. So replace from apache2-common to apache2 is needed.
+      Closes: #165959
+    - debian/patches/cvs.patch: Hurd trailing slash handling fixed.
+      Closes: #162414
+    - debian/patches/locales-stuff.dpatch: Fixed error generating de_CH,
+      it's caused by typo. Closes: #140054
+
+  * Jeff Bailey <jbailey@nisa.net>
+    - debian/patches/cvs.dpatch: New file.
+    - debian/patches/0list: Update
+    - debian/sysdeps/depflags.pl: Conflict against libnss-db <= 2.2-6
+      Thanks to Ryan Murray for the patch.  Closes: #168890
+
+    - debian/patches/s390x-lib64.dpatch: New file.
+    - debian/control.in/s390x: New file.
+    - debian/libc-s390x/postinst: New file.
+    - debian/packages.d/libc-dev.mk: Handle asm-s390x
+    - debian/packages.d/s390x.mk: New file.
+    - debian/rules: Include s390x files.
+    - debian/rules.d/control.mk: Add s390x to control_deps, and include
+      control.in/s390x
+    - debian/sysdeps/linux.mk: Add s390x support.
+
+    Thanks to Gerhard Tonn.  Closes: #169176, #166450.
+
+    - debian/control.in/main: Update Standards-Version to 3.5.7.0
+
+    - debian/patches/glibc22-hppa-fcntl.dpatch: Remove File
+    - debian/patches/glibc22-hppa-fcntl-lfs.dpatch: Remove File
+    - debian/patches/glibc22-hppa-mcontext.dpatch: Remove File
+    - debian/patches/glibc22-hppa-pthreads.dpatch: Remove File
+    - debian/patches/glibc22-hppa-rela.dpatch: Remove File
+    - debian/patches/glibc22-hppa-tests.dpatch: Remove File
+    - debian/patches/glibc22-hppa-unwind.dpatch: Remove File
+
+    - debian/patches/hurd-fork-fix.dpath: New File.
+
+    Note: CVS patch disabled for this upload
+
+ -- Daniel Jacobowitz <dan@debian.org>  Tue, 29 Oct 2002 13:14:51 -0500
+
+glibc (2.3.1-3) unstable; urgency=low
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - debian/patches/librt-mips.dpatch: librt is not worked on
+      mips/mipsel architecture, we apply it until sarge will be
+      released. Thanks to Guido Guenther <agx@sigxcpu.org>.
+    - debian/patches/glibc23-ctype-compat.dpatch: added.
+      glibc 2.3.x changes some symbols (__ctype_b, __ctype_toupper,
+      __ctype_tolower) as hidden attribute. These symbols that are
+      crashing the old 2.2.x dynamic linking code in static binaries
+      are now exported.
+      This patch is originally pulled from RedHat patch, I modified
+      it for current debian glibc. Closes: #165554
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Sun, 20 Oct 2002 15:04:48 +0900
+
+glibc (2.3.1-2) unstable; urgency=low
+
+  * This is the "Why did everything stop working, mommy?" release
+
+  * Jeff Bailey <jbailey@nisa.net>
+    - debian/libc/DEBIAN/postinst: Warn about NSS changes if upgrading
+    from older than 2.2.94-1.  Add ssh-krb5 and apache2 to list of
+    services that definetly need restarting.
+
+    Add libc-udeb (closes: #158589) Thanks to Tollef Fog Heen.
+    - debian/control.in/libc-udeb: New file
+    - debian/packages.d/libc-udeb.mk: New file
+    - debian/rules: Call udeb machinery.
+    - debian/rules.d/control.mk: Call udeb machinery.
+
+    - debian/sysdeps/build-options.mk: Strip libc on alpha
+
+    - debian/control.in/main: 2.13.90.0.10-1 is broken on s390
+    require 2.13.90.0.4-1 for them.
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - debian/patches/0list: disable ip6-fix.dpatch. Closes: #165287
+    - debian/packages.d/libc-udeb.mk: Clean up and fix indent crap.
+    - debian/rules.d/shlibs.mk: bump up to 2.3.1-1. Closes: #165456
+
+ -- Jeff Bailey <jbailey@nisa.net>  Fri, 18 Oct 2002 11:27:07 -0400
+
+glibc (2.3.1-1) unstable; urgency=low
+
+  * This is the "twilight" release...
+
+  * Jeff Bailey <jbailey@nisa.net>
+    - Upgrade tarballs to 2.3.1
+    - version: Update to 2.3.1
+
+    - debian/sysdeps/linux.mk: Do not build optimized libraries
+    - debian/rules.d/control.mk: Likewise
+
+    - debian/control.in/main: Require binutils 2.13.90.0.10-1 for ppc
+
+    - debian/patches/elf-machine-rela-mips.dpatch: New file
+    - debian/patches/0list: Update accordingly.
+
+    - debian/rules: Use -O on i386.  This should go somewhere else,
+    but I want to get this release out.
+
+  * XXX Below here was during the 2.3 development, and never released.
+
+  * Jeff Bailey <jbailey@nisa.net>
+    - Upgrade tarballs to 2.3
+    - version: Update to 2.3
+
+    - debian/patches/hppa-data-start.dpatch: Remove, incorporated upstream
+    - debian/patches/various-lsb-fixes.dpatch: Remove, incorporated upstream
+
+    - debian/patches/0list: adjust accordingly
+                            Also, prune ia64-reloc-none from the list.
+                            I can't tell from the code snippet if this
+                            has been incorporated or not.
+
+    - .cvsignore: Add the stamp directories
+
+    - debian/rules: Don't put CFLAGS in configparms, resolves ldconfig
+      miscompile on i386
+
+    - debian/rules: Add freebsd-i386 support
+    - debian/rules.d/control.mk: Add freebsd-i386 support
+    - debian/sysdeps/freebsd.mk: New file to add freebsd-i386 support
+    - debian/sysdeps/paths.mk: Add freebsd-i386 support
+    - debian/sysdeps/soname.mk: Add freebsd-i386 support
+
+  * XXX Below here was during the 2.2.94 development, and never released.
+
+  * Jeff Bailey <jbailey@nisa.net>
+    - Upgrade tarballs to 2.2.94
+    - version: Update to 2.2.94
+
+    - debian/patches/cvs: Remove
+    - debian/patches/manual-texinfo4: Remove, incorporated upstream.
+    - debian/patches/i386-mathinline.dpatch: Remove, glibc headers require
+      ANSI compilers.
+    - debian/patches/db1-addon-enabler.dpatch: Remove
+    - debian/patches/0list: adjust accordingly
+
+    - debian/patches/0list: Comment out string2-pointer-arith.
+      This was originally created to fix #44697, but without this
+      patch, 44697 is no longer reproducable.
+
+    - debian/patches/fhs-linux-paths.dpatch: Update to new template format
+
+    - .cvsignore: New file
+
+  * XXX Below here was during the 2.2.93 development, and never released.
+
+  * Jeff Bailey <jbailey@nisa.net>
+     - Upgrade tarballs to 2.2.93
+     - version: Update to 2.2.93
+
+     The following important patches are still disabled:
+
+       glibc22-hppa-pthreads, glibc22-hppa-rela, ia64-perf
+
+     - debian/patches/0list: prune commented out patches that won't
+       be needed anymore
+
+     - debian/patches/ia64-reloc-none.dpatch: Updated, thank to
+       Randolph Chung <randolph@tausq.org>
+
+     - debian/make-cvs-patch.sh: New file.
+
+     - debian/patches/template.dpatch: Update headers to new format.
+
+     - debian/patches/hurd-ioperms.dpatch - Deleted
+     - debian/patches/hurd-lfs64.dpatch - Deleted
+     - debian/patches/hurd-update.dpatch - Deleted
+     - debian/patches/syserrlist.dpatch - Deleted
+
+     - debian/README - More updates
+
+     - debian/rules.d/control.mk: debian/control should Depend on
+       debian/sysdeps/depflags.pl
+
+     - debian/sysdeps/depflags.pl: Actually add the dependancy on
+       libdb1-compat.  This is an update to GOTO Masanori's change,
+       Thanks to Ryan Murray for catching this.
+
+     - debian/patches/mathpatch.dpatch: Prune
+
+     - debian/rules.d/patch.mk: Add `setup' as an alias for `patch'
+       to provide dbs compatability.
+
+     - debian/patches/cvs.dpatch: Sync with CVS from September 14th.
+     - debian/patches/0list: Updated
+
+  * GOTO Masanori <gotom@debian.or.jp>
+     - debian/packages.d/glibc-doc.mk: change texi2html processed file from
+       chapters.texi to libc.texinfo. Closes: #159417
+     - debian/packages.d/libc-{dbg,pic,prof}.mk: fix /usr/doc removal
+       compilation failure.
+     - debian/libc/DEBIAN/postinst: Fix 'grep -v' failure if the size of
+       /etc/ld.so.nohwcap is 0.
+     - debian/rules.d/control.mk: Generate libc-opt control information.
+
+     - Updating 2.2.9x fixes LSB 1.2 compliance. Closes: #156821
+     - debian/control: add Depends: libdb1-compat.
+       Until woody, libdb1 is included in libc6 package. However after sarge,
+       libdb1 support is removed. libdb1-compat contains libdb1 which is
+       formerly provided by libc6. Now libc6 depends on libdb1-compat,
+       so upgrading from woody to sarge does not break any libdb1 issues.
+       Closes: #155904
+
+     - debian/patches/glibc22-hppa-fcntl.dpatch: added, patched by
+       Carlos O'Donell <carlos@baldric.uwo.ca>.
+     - debian/patches/glibc22-hppa-fcntl-lfs.dpatch: added, patched by
+       Randolph Chung <tausq@debian.org>. Closes: #160846
+
+  * Ben Collins <bcollins@debian.org>
+    - Make sparc64 build use gcc-3.2.
+    - Update all config options to not use --disable-sanity-checks, since we
+      are actually using gcc-3.2 for everything.
+    - Patch cleanups.
+    - Re-enable optimized libs. Includes a simple mechanism which should fix
+      the conflicting symbols during libc/libc-opt upgrade scenarios. This
+      means that libc6-v9, libc6-i586 and libc6-i686 are back in full swing.
+    - Remove all references to /usr/doc symlink crap, which is deprecated.
+
+  * XXX Below here was during the 2.2.92 development, and never released.
+
+  * Jeff Bailey <jbailey@nisa.net>
+     - Upgrade tarballs to 2.2.92
+     - version: Update to 2.2.92
+     - debian/control.in/main: Require gcc-3.2 for all archs
+     - debian/patches/0list: prune glibc-cvs, glibc22-s390-resource,
+       gmon-start, locales-de_CH, sh-sysdep, alpha-build-failure
+
+       These are already included in the 2.3 series.
+
+     - debian/patches/glibc22-misc.dpatch: Split into ...
+       debian/patches/makeconfig.dpatch: ... this
+       debian/patches/locale-es_AR.dpatch: ... and this
+       debian/patches/i386-mathinline.dpatch: ... and this
+       debian/patches/ldconfig.dpatch: ... and this.
+
+     - debian/patches/makeconfig.dpatch: Update for 2.3 series
+
+     - debian/patches/0list: Temporarily disable some other patches:
+
+       glibc22-hppa-pthreads, glibc22-hppa-rela, ia64-perf
+
+     - debian/rules: memset.S works on ppc now, so stop deleting it.  Thanks
+       to Jack Howarth <howarth@fuse.net> for letting us know.
+
+     - debian/sysdeps/gnu.mk: Remove --enable-libio, now set by default.  Add
+       NO_TEST = yes, make check does not run on i386-gnu.
+
+     - debian/sysdeps/tools.mk: Hardcode gcc-3.2 for $(CC) and $(BUILD_CC)
+       until gcc-defaults switches.
+
+     - debian/rules: use CC=$(CC) when calling configure to get any changed
+       definitions.
+
+     - debian/control.in/main: Require binutils (>= 2.13.90.0.4-1)
+
+     - debian/rules: Add time/date stamps to beginning and end of log files
+
+     - db1-addon-2.1.3.tar.bz2: Delete
+
+     - debian/ppc-memset.S: Delete
+
+     - debian/README: Update
+
+  * GOTO Masanori <gotom@debian.or.jp>
+     - debian/packages.d/libc-dbg.mk: update libpthread-0.9 -> 0.10.
+     - packages.d/libc.mk: likewise.
+     - packages.d/optimized.mk: likewise.
+     - packages.d/sparc64.mk: likewise.
+
+     - debian/patches/glibc22-hppa-mcontext.dpatch: Fix unmatched userland
+       mcontext_t definition differed from kernel. Patched by
+       Carlos O'Donell <carlos@baldric.uwo.ca>. Closes: #157374
+
+  * XXX Below here was during the 2.2.5 development, and never released.
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - debian/patches/glibc-cvs.dpatch: Update from Glibc CVS.
+    - debian/patches: Dropped applying below patches due to updating
+      glibc-cvs.dpatch.
+        hurd-update, hurd-ioperms, ia64-strncpy, sparc-misc, resolv-nss_dns,
+        glibc-openoffice-fixes, xdr-array-security, hurd-lfs64,
+        syserrlist, mathpatch
+    - Fix gcc 3.1/3.2 compatibility building for glibc on ppc, with upstream
+      patched by Jack Howarth <howarth@bromo.msbb.uc.edu> and
+      Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
+      Closes: #155606
+
+ -- Jeff Bailey <jbailey@nisa.net>  Thu, 17 Oct 2002 08:37:52 -0400
+
+glibc (2.2.5-15) unstable; urgency=low
+
+  * debian/patches/dl-procinfo-fix.dpatch: Fix libssl optimization
+    problem occured by glibc dl-procinfo.
+      Closes: #161700, #161717, #161720, #161740, #161773, #161774
+      Closes: #161786, #161788, #161813
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Thu,  3 Oct 2002 09:56:46 +0900
+
+glibc (2.2.5-14.3) unstable; urgency=low
+
+  * NMU
+  * debian/patches/glibc22-mips-mcontext.dpatch: delete.
+
+ -- Ryan Murray <rmurray@debian.org>  Sun, 15 Sep 2002 14:21:21 -0700
+
+glibc (2.2.5-14.2) unstable; urgency=medium
+
+  * NMU
+  * debian/patches/alpha-stxncpy.dpatch: keep testsuite patch (accepted
+    upstream), but disable all use of stxncpy until a correct patch can
+    be made.
+
+ -- Ryan Murray <rmurray@debian.org>  Thu, 12 Sep 2002 13:04:47 -0700
+
+glibc (2.2.5-14.1) unstable; urgency=low
+
+  * NMU
+  * sysdeps/depflags.pl: Make libc{6,6.1} depend on libdb1-compat
+    (closes: #155904)
+  * debian/patches/alpha-stxncpy.dpatch: Add patch from Daniel Jacobowitz
+    for alpha stxncpy (closes: #159633)
+  * debian/patches/glibc22-mips-msq.dpatch: Add
+    sysdeps/unix/sysv/linux/mips/bits/msq.h for mips (closes: #159923)
+  * debian/patches/glibc22-hppa-fcntl.dpatch: Add DN_* and F_NOTIFY definitions
+    for hppa (closes: #159636)
+  * debian/patches/glibc22-hppa-mcontext.dpatch: correct definition of mcontext
+    to match kernel (closes: #157374)
+  * debian/patches/glibc22-mips-mcontext.dpatch: correct definition of mcontext
+    to match kernel (closes: #160462)
+  * add build-depends on dpkg 1.10.8 to ensure we use the install-info that
+    has the perl 5.8 workaround.
+
+ -- Ryan Murray <rmurray@debian.org>  Tue, 10 Sep 2002 22:35:48 -0700
+
+glibc (2.2.5-14) unstable; urgency=low
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - debian/patches/sh-sysdep.dpatch: Added the patch to compile for sh[34]
+      sh[34]eb. Closes: #156273
+    - debian/patches/glibc22-m68k-compat.dpatch: Newer m68k debian specific
+      compatibility patch. Patched by Michael Fedrowitz <michaelf@debian.org>.
+    - debian/patches/malloc-security.dpatch: Applied malloc security patch
+      Patched by Wolfram Gloger <wg@malloc.de>.
+    - debian/patches/alpha-build-failure.dpatch: Fix alpha build failure.
+
+ -- GOTO Masanori <gotom@debian.or.jp>  Wed,  7 Aug 2002 20:56:54 +0900
+
+glibc (2.2.5-13) unstable; urgency=low
+
+  * Ben Collins
+    - Last maintainer upload for me.
+    - Fix double getent listing for build of libc package.
+      Closes: #154133, #152866
+    - Set maintainer to the debian-glibc mailing list. Set uploaders to myself
+      and others.
+    - Placed into CVS (this log entry is the first test commit).
+    - ia64 build failure was fixed in last NMU. Closes: #151956
+    - This sshd/libc bug is long since gone. Closes: #72596, #82468
+    - ldconfig search order has also since been fixed. Closes: #105249
+    - Add patches that OpenOffice needs in order to build. Closes: #153107
+    - Bump min kernel supported to 2.2.0. Closes: #149529
+    - Remove db1 compat library. The only user I know of this is coda. Coda
+      can include it's own version of the library now. I've emailed the coda
+      maintainer.
+    - Bump the shlibs ver because of the min-kernel change, and db1 removal.
+    - Add xdr-array.c security patch, Closes: #154992
+
+  * GOTO Masanori <gotom@debian.or.jp>
+    - applied patches/locale-de_CH.
+    - debian/control: fix my uploader address due to my obsolete gpg key.
+    - debian/copyright: update copyright year.
+
+  * Jeff Bailey <jbailey@debian.org>
+    - Add hurd-i386 patch for support LFS from CVS
+    - Add patch to only declare sys_errlist and sys_nerr on Linux.  This
+      allows gcc to build cleanly on hurd-i386.
+    - Require mig >= 1.3-2 (hurd-i386 only), and hurd-dev >= 20020608-1
+      (hurd-i386 only)
+    - Prune hurd-ldflags from Hurd patch list.  Noone is quite sure what
+      it's for.  With this change, all hurd-i386 patches are now upstream
+      in CVS.
+    - Add 'mathpatch' to fix a math testsuite failure.
+
+ -- Ben Collins <bcollins@debian.org>  Thu, 25 Jul 2002 11:13:22 -0400
+
+glibc (2.2.5-12) unstable; urgency=low
+
+  * Non-maintainer upload to fix build problems on ia64
+  * replaces ia64-asm-fixes.dpatch with ia64-perf.dpatch, ia64-strncpy.dpatch
+
+ -- Bdale Garbee <bdale@gag.com>  Tue, 16 Jul 2002 17:09:24 -0600
+
+glibc (2.2.5-11) unstable; urgency=low
+
+  * Yet another NMU
+  * Build with a -11 version to work around fragile logic that breaks
+    locale dependencies when using NMU versioning. Closes: Bug#152968
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Sun, 14 Jul 2002 23:59:04 +0200
+
+glibc (2.2.5-10.0) unstable; urgency=low
+
+  * Non-maintainer upload by the security team
+  * Rebuild, uploads to both testing and unstable are not allowed
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Sun, 14 Jul 2002 04:48:50 +0200
+
+glibc (2.2.5-9) testing-security unstable; urgency=low
+
+  * Something fucked up. Not sure why the .diff.gz size didn't match the
+    .changes/.dsc. Not sure why katie didn't reject the upload when it found
+    that out aswell.
+
+ -- Ben Collins <bcollins@debian.org>  Sat, 13 Jul 2002 10:08:51 -0400
+
+glibc (2.2.5-8) testing-security unstable; urgency=low
+
+  * Resolver security bug fix.
+
+ -- Ben Collins <bcollins@debian.org>  Fri, 12 Jul 2002 18:24:28 -0400
+
+glibc (2.2.5-7) unstable; urgency=low
+
+  * Misc ia64 asm updates, and strncpy fix
+  * Misc sparc patches from DaveM
+  * Revert sparc64 back to lib64 from my rebelious lib/64 effort. Use gcc-3.1
+    now.
+
+ -- Ben Collins <bcollins@debian.org>  Mon, 17 Jun 2002 22:33:39 -0400
+
+glibc (2.2.5-6) unstable; urgency=low
+
+  * Fix locales/config to be 755.
+  * Add big fat note to default nscd.conf about how host cache is insecure,
+    and disable it by default. This lowers the severity of #139879 for the
+    time being. I'll close it when a proper fix is in.
+  * Hurd patches from Jeff Bailey. Hurd goes to libc0.3!
+
+ -- Ben Collins <bcollins@debian.org>  Sun, 28 Apr 2002 11:21:48 -0400
+
+glibc (2.2.5-5) unstable; urgency=low
+
+  * Fix missing LOCALES var in locale-gen.
+  * Fix space before "]" in locales/postinst. Closes: #139902, #139977,
+    #140048, #140464, #141408, #141515, #141558, #141617, #141786
+  * Generate list of locales directly in locales/DEBIAN/config, so that we
+    have a working list during pre-inst. Closes: #76954, #141384
+  * Backout nice changes for now.
+
+ -- Ben Collins <bcollins@debian.org>  Mon, 25 Mar 2002 21:05:44 -0500
+
+glibc (2.2.5-4) unstable; urgency=low
+
+  * Include s/ip6.arpa/ip6.int/ patch from Fabbione. Closes: #119773,
+    #132310
+  * Fix perms on locales/DEBIAN/config. Closes: #134094, #139682
+  * Update from Glibc CVS: Lots of euro conversions and locales updates.
+    Closes: #128181, #130259
+    Lots of other various fixes (please read the ChangeLog). Closes: #138094
+  * Upstream fixed ia64 ldd rewrite problem. Closes: #128451
+  * Upstream fixed nice return. Closes: #136815
+  * pt_BR translation is ok now, Closes: #128530
+  * Applied patch from Ganesan R to better handle some locale names.
+    Closes: #128969
+  * Add ARM patch to disable hardware caps.
+  * Fix typos in catalan template. Closes: #133247
+  * Add a "Leave alone" option for locales setting of /etc/environment.
+    Make it the default. Closes: #133315, #133315
+  * HPPA patch from Randolph Chung. Closes: #133666
+  * Fix zh_HK date output, from Anthony Fok.
+  * s/Noninteractive/noninteractive/ (hopefully for the last time).
+    Closes: #134381, #137348
+  * Fix locales/config for when locale.gen doesn't exist.
+    Closes: #135343, #134613, #139284
+  * Patch from Gary Hade (via Randolph Chung) to fix gmon-start.
+    Closes: #135748, #129903
+  * Fix locale.1 - s/LC_PAPR/LC_PAPER/ Closes: #114174
+  * Add glibc22-hppa-tests patch from Randolph Chung. Closes: #137513
+  * Alistair McKinstry:
+    - Added locale.alias(5) and locale.gen(5) man pages. Closes: #106117
+    - Patch for glibcbug to correctly handle bad EDITOR setting.
+      Closes: #128699
+    - Include glibcbug.1 manpage. Closes: #128701
+    - Add patch to fix segv in localedef.
+    - Patch for locale.1 and localedef.1 to add missing LC_* vars.
+      Closes: #114174
+    - Fix for the d_fmt field in de_CH. Closes: #27397
+    - Fix locale.alias so Russion charset is KOI8-R instead of ISO-8859-5.
+      Closes: #62586
+    - s/Jun/Juni/ s/Jul/Juli/ for sr_YU. Closes: #131846
+    - Typo in categories.def. Closes: #133379
+    - Update iso-4217.def Closes: #133380
+    - Re-enable el.po since we are using newer gettext. Closes: #133383
+  * nscd.conf.5: Clarification. server-user option cannot be used with
+    -S/--secure. It will fail to start. Also note that using server-user other
+    than root may break some lookup services. Closes: #139433
+  * Completely remove the pthread man pages. They are _way_ out of date (last
+    updated in 1998 according to the ChangeLog). Use the info or html docs
+    instead. Feel free to send me mucho patches for them, if you want them
+    back. Closes: #139052, #139042
+  * Various LSB conformance patches from Joey Hess. Closes: #136815
+  * ia64 patch for R_IA64_NONE relocs. Closes: #135314
+
+ -- Ben Collins <bcollins@debian.org>  Sun, 24 Mar 2002 09:49:37 -0500
+
+glibc (2.2.5-3) unstable; urgency=low
+
+  * Fix logic in locales postinst which would fail on empty or missing
+    /etc/environment. Closes: #132025, #131999, #132244
+  * Remove build-dep on gcc-3.0-sparc64
+  * Fix case where no locales are selected, so the only choices for LANG are C
+    and None. This left a hangin comma which debconf doesn't seem to like.
+    Closes: #132245
+
+ -- Ben Collins <bcollins@debian.org>  Sun,  3 Feb 2002 23:13:29 -0500
+
+glibc (2.2.5-2) unstable; urgency=low
+
+  * Remove glibc22-m68k-resource.dpatch. Patch is already included upstream.
+    Closes: #130922
+  * Fix thinko in locales postinst. Also add a "None" option for LANG, and
+    check for it in postinst.
+  * HPPA correct unwind setting, from Matthew Wilcox. Also update patch
+    splitting the linuxthreads and rel/rela changes. Closes: #131216
+  * Fix copyright shown for the GNU Libc Manual. Closes: #130866
+  * Fix problem where a binary-NMU rebuild of libc would provide a version
+    that was incompatible with the current locales dep.
+  * Fix atomic_lock_t decleration for hppa. Closes: #131367
+  * Fix logic in locales where LANG wasn't being set in /etc/environment.
+    Closes: #131040
+  * Moved SUPPORTED list to /usr/share/i18n/, since policy says it can't be in
+    /usr/share/doc/locales/. Fixup debconf scripts to notice this.
+  * A few patches from CVS:
+    - Fixes bad optimization in dynamic linker
+    - Updates m68k and arm for unwind
+    - tzdata2002b updates
+    - Some irrelevant (for us) x86_64 updates
+  * Patch from Gerhard Tonn for s390-32 for bits/resource.h.
+  * libc6-sparc64-dev: Change dep to gcc-3.0 instead of gcc-3.0-sparc64. The
+    packages are now merged.
+
+ -- Ben Collins <bcollins@debian.org>  Fri,  1 Feb 2002 11:52:54 -0500
+
+glibc (2.2.5-1) unstable; urgency=low
+
+  * New upstream. Closes: #122980, #126441
+  * locales.postinst: Add a signature line to /etc/locale.gen so people can
+    take over the file manually instead of through debconf.
+  * Added -de template for locales. Closes: #114078
+  * Removed need for generate-config.mk. SUPPORTED list for debconf is now
+    generated dynamically using SUPPORTED.gz.
+  * Added debconf option in locales to choose LANG= default in
+    /etc/environment based on contents of /etc/locale.gen. Closes: #117216,
+    #120410
+  * Patched nscd init script. Patch supplied by Grant Bowman. Closes: #121942
+  * Do not install tzconfig(8), Closes: #123679
+  * Removed obsolete BSD license clause in debian/copyright. Closes: #123821
+  * Applied spelling patch for locales description. Closes: #125092
+  * Updated glibc-doc description to note that it includes html docs too. I am
+    not, however, splitting info and html docs into seperate packages. Closes:
+    #125825
+  * Check for the existence of libdb.so.3 before cat'ing it. Closes: #126459
+  * Added powerpc sysconf patch from David Schleef. Closes: #127560
+  * Added SuperH support. Closes: #127740
+  * No longer apply glibc-vs-gcc3 patch. Implementation merged upstream.
+  * Last minute ARM patch to fix unwind.
+
+ -- Ben Collins <bcollins@debian.org>  Thu, 24 Jan 2002 00:31:40 -0500
+
+glibc (2.2.4-7) unstable; urgency=low
+
+  * glibc22-hppa: Fix mips/pt-machine.h, so that it patches both the ISA-1 and
+    ISA-2 cases of testandset(). Also add IPC updates from Willy. Closes: #120383
+  * glibc22-hppa: Updated, from Mathew Wilcox.
+
+ -- Ben Collins <bcollins@debian.org>  Mon,  3 Dec 2001 12:09:26 -0500
+
+glibc (2.2.4-6) unstable; urgency=low
+
+  * glibc22-hppa.dpatch: Fix lock_held macro on non-hppa. This patch is now
+    enabled by default for all archs.
+  * Update patches for HPPA dynamic loader from.
+  * m68k resource.h patch from Roman Zippel, Closes: #118909
+
+ -- Ben Collins <bcollins@debian.org>  Fri,  9 Nov 2001 21:20:59 -0500
+
+glibc (2.2.4-5) unstable; urgency=low
+
+  * Added patch from Ulrich to really fix the [x-] fnmatch() case.
+    Closes: #96013
+  * Updated gcc3 compat patch.
+  * Several changes to ldconfig:
+    - Parse the config file before checking system directories. This is needed
+      to make sure it is possible to override system directories.
+    - Cleanup the config file parsing routine a bit. Make sure we open the
+    config file with correct perms in case it gets created by this call.
+  * Pulled from CVS as of Oct 27, 2001:
+    - Includes fnmatch fix upstream.
+    - strxfrm fix.
+    - dlfcn fix for C++ program usage.
+    - ENABLE_NLS fixes for various functions (doesn't affect us, since it is
+      mainly meant for non-nls builds).
+    - IPv6 reverse lookup fixes.
+    - Lots of libm fixes.
+    - Several language translation updates.
+    - Several m68k setjmp fixes.
+    - Some mips fixes merged.
+    - Timezone updates.
+    - S390 ucontext fixes.
+    - Several hurd fixes.
+    - ELFOSABI_* Updates.
+  * Update the kernel headers on all the systems I build for (arm, ppc, i386,
+    mips, sparc, sparc64, hppa).
+  * Added "es" template for locales, from Carlos Valdivia. Closes: #117413
+  * Fixup ttyname patch for devfs, which broke some things. Closes: #117551
+  * Remove the errno.texi explanation for _GNU_SOURCE for two defines. The
+    thing is, according to the libc manual conventions, this is not the
+    correct way to handle it. In fact, it is already done according to the
+    convention of the rest of the manual. The two items are tagged with the
+    "GNU" comment, meaning they are GNU extensions. The libc manual explains
+    in its introductory chapters that this means it needs the _GNU_SOURCE
+    define.
+
+ -- Ben Collins <bcollins@debian.org>  Mon, 29 Oct 2001 20:25:40 -0500
+
+glibc (2.2.4-4) unstable; urgency=low
+
+  * Hopefully fix the damn .html docs. Looks good to me. Closes: #84237,
+    #89382
+  * Fix inttypes.h typo. Closes: #114483
+  * Disable sanity checks for gcc-3.0 archs, Closes: #114724
+  * Fix entry for locales depending on debconf. Closes: #115155
+  * Fix echo commands when generating locales.config. The -e option is not
+    portable.
+  * New hppa patch from several people. This, along with the .10 binutils,
+    should fix all of hppa's problems.
+  * Apply devfs compatibility patch for ttyname. Closes: #74911
+  * Add (modified) patch for ldconfig to create ld.so.conf if it doesn't
+    exist. Original patch from David Whedon, Closes: #98763
+  * Clarify some errno.texi functions wrt _GNU_SOURCE. Patch from Jeremiah
+    Savage. Closes: #99683
+  * Add conflicts/replaces for all the potato locales that cannot be installed
+    with this glibc (and are actually supported now). Closes: #108015
+  * Fix comma in confnames.h to make all the -pedantic folks happy :).
+    Closes: #113498, #113816, #114672
+  * Include a mips termios.h cleanup patch, sent by Ryan Murray, patch by Ralf
+    Baechle.
+  * Add Russion template for locales package, by Ilgiz Kalmetev. Closes:
+    #114303
+  * Fix sed in ia64/ldd-rewrite.sh: Closes: #115784
+  * Add Brazilian Portuguese locales template from Andre Luis Lopes, closes:
+    #116435
+
+ -- Ben Collins <bcollins@debian.org>  Wed, 24 Oct 2001 12:28:49 -0400
+
+glibc (2.2.4-3) unstable; urgency=low
+
+  * Apply patch to fix es_AR number formatting. Closes: #108373
+  * Fix SA_* defines on some archs. Patch sent upstream, and accepted.
+    Closes: #113273
+  * Brought in dynamic module patch from CVS that fixes
+    mozilla/galeon/konquerer. Closes: #113457, #113481, #113708
+  * Fixed libc postinst for the readlink call. Based on patch supplied by
+    Branden Robinson. Closes: #113459
+  * Increase shlib dep to 2.2.4-2. Closes: #113731
+
+ -- Ben Collins <bcollins@debian.org>  Sat, 29 Sep 2001 23:38:11 -0400
+
+glibc (2.2.4-2) unstable; urgency=low
+
+  * Updates from CVS Head, includes some s390 fixes, closes: #109072
+  * Reincluded some missed patches (notable the fakeroot fix), closes:
+    #109162
+  * Include the iconvconfig program in the libc6 package, closes: #109600
+  * Fixup locales/libc dep back to the old way, closes: #109850
+  * Apply patch for locale-gen.8, closes: #110554
+  * Apply patch to make /etc/locale.gen generated by debconf interface.
+    Thanks to Ho-seok Lee, closes: #110980, #110661
+  * glibc22-fts.dpatch: Remove, fixes upstream now.
+  * libc/DEBIAN/postinst: Before calling init u, make sure /proc/1/exe
+    resolves to /sbin/init. This should help ensure we don't muck up
+    debootstrap.  closes: #110615
+
+ -- Ben Collins <bcollins@debian.org>  Fri,  7 Sep 2001 14:52:02 -0400
+
+glibc (2.2.4-1) unstable; urgency=low
+
+  * Final release of 2.2.4. Not much changed from 2.2.3-11.
+  * Remove cruft from debian/patches/
+
+ -- Ben Collins <bcollins@debian.org>  Thu, 16 Aug 2001 09:29:14 -0400
+
+glibc (2.2.3-11) unstable; urgency=low
+
+  * Updated to HEAD of CVS as of Aug 11, 2001
+    - Misc fixes found in 2.2.4pre2
+    - This is basically 2.2.4pre3
+  * New glibc-vs-gcc3 patch, closes: #108408, #108364, #108415, #108364,
+    #108454, #108476
+
+ -- Ben Collins <bcollins@debian.org>  Sun, 12 Aug 2001 10:02:12 -0400
+
+glibc (2.2.3-10) unstable; urgency=low
+
+  * Updated to HEAD of CVS, as of Aug 4, 2001
+    - Mostly arch specific bug fixes.
+    - This is actually the same as 2.2.4-pre2 (releasing in a day or so)
+  * Ok, I give up. I don't want any more bug reports, so I've added the
+    nfs getdents fix. If it breaks anything, I will hunt down all of those
+    who submitted the patch/bug. closes: #86877
+  * Added two more Q/A's to the Debian FAQ (AKA "The Overfiend Clause" :)
+    This documents Debian's glibc following stable CVS, and also
+    kernel-headers desync.
+  * Added latex2html to build-dep-indep, closes: #101662
+  * Fix tzconfig so it handles ambiguous names correctly, closes: #105580
+    Patch by Martin Pool <mbp@valinux.com>
+  * Add copyright and license to tzconfig, closes: #105581
+  * Updated libc0.2 hurd dep to (>= 20010718-1), closes: #106291
+  * Include locale-gen.8 manpage from Eduard Bloch <edi@gmx.de>
+  * Duh. We don't need to cat in the saved libdb.so.3 to the new location.
+    Ldconfig does the work for us by creating a symlink to it.
+  * Remove sysdeps/powerpc/memset.S so ppc gets the generic C version for
+    now (which is actually faster on most machines anyway), until they get
+    their memset.S fixed (especially for Power3).
+  * Added updates for hppa patch from Matthew Wilcox.
+  * debian/rules.d/control.mk: Added hppa to list of archs for libc6
+
+ -- Ben Collins <bcollins@debian.org>  Tue,  7 Aug 2001 10:11:22 -0400
+
+glibc (2.2.3-9) unstable; urgency=low
+
+  * Really fix the timezone problem this time. I moved the UTC check
+    before the TZ check, and then reuse that to get the TZ date, instead
+    of the other way around. That solves the problem. Using this method, I
+    can get the UTC date first setting LC_ALL=C, and then allow the
+    override for the real UTC0 and $TZ date, so we get lang support
+    without breakage now.
+
+ -- Ben Collins <bcollins@debian.org>  Tue, 24 Jul 2001 12:19:48 -0400
+
+glibc (2.2.3-8) unstable; urgency=low
+
+  * Use glibc- instead of glibc_ for the provides between libc and
+    locales. Underscores are actually not allowed in package names.
+  * CVS as of July 22, 2001
+  * Use LC_ALL instead of LANG in libc postinst, closes: #106043, #106078,
+    #106081, #106187, #106215
+  * Use Noninteractive, not noninteractive in postinst's, closes: #105902
+  * SUPPORTED file ends in .gz...guess some people can't bother to add
+    that themselves. Also, add notes about locale-gen closes: #105915
+  * Fix cp -L calls, use cat instead to make sure we avoid any command
+    line problems, closes: #106120, #106096
+  * MIPS WARNING: The MAP_BASE_ADDR patch does not apply anymore, since it
+    seems that whole bit of code was removed. MAKE SURE THIS DOESN'T BREAK
+    ANYTHING! :)
+
+ -- Ben Collins <bcollins@debian.org>  Sun, 22 Jul 2001 23:04:15 -0400
+
+glibc (2.2.3-7) unstable; urgency=low
+
+  * CVS as of 7-9-2001, closes: 101308, 103251, 100398, 100398
+  * New hppa patch, still not enabled by default since I got deadlocks in
+    the linuxthreads tests (ex2 and ex10) on sparc.
+  * Increased shlibdep to 2.2.3-7
+  * SUPPORTED locales list is now in doc dir, and locale.gen is a
+    non-changing file (still a conffile, but it doesn't change when glibc
+    changes).
+  * Fix fts patch so it doesn't break Hurd, closes: 102826
+  * Make libc provide glibc_$DEBVERSION, and locales depend on it. This
+    way we make sure everything matches up. closes: 100605, 100605,
+    101034, 100605, 99344
+  * Added some more UTF-8 locales, closes: 103742, 86372
+  * Fixed hurd's ldconfig, closes: #101691
+  * Already fixed ld_envlib_path, closes: 101622
+  * In libc preinst, detect if we are upgrading from a version where we
+    used to provide our own libdb.so.3, and keep a copy. We reuse it
+    during postinst. This way, we have no time where libdb.so.3 doesn't
+    exist. closes: 101795, 103586
+  * Removed depends on libdb2 from libc6, since our hack above makes it
+    pointless. Now, libc6 should get installed before libdb2 (since it
+    depends on libc6), which will leave a working libdb.so.3. After libdb2
+    is upgraded, the new libdb.so.3 will be installed, which will work
+    since the new libc6 that it depends on is also working.
+  * Fixed calls for zoneinfo as per JoeyH's suggestion. closes: 100461
+  * Updated copyright notice since LGPL 2.1 is now used.
+
+ -- Ben Collins <bcollins@debian.org>  Tue, 10 Jul 2001 14:00:59 -0400
+
+glibc (2.2.3-6) unstable; urgency=low
+
+  * CVS As of 6-9-2001, closes: #100055
+  * debian/sysdeps/depflags.pl: Fix typo where netbase/netkit-rpc wasn't
+    being added to libc-dev control flags, closes: #98735, #99460, #99990,
+    #100382
+  * Moved rpcinfo from /usr/sbin to /usr/bin... closes: #100279
+  * Added fts() security patch
+  * Updated patch for HPPA, now also enabled per default
+
+ -- Ben Collins <bcollins@debian.org>  Sat,  9 Jun 2001 16:35:29 -0400
+
+glibc (2.2.3-5) unstable; urgency=low
+
+  * CVS as of 5-28-2001
+  * Added fake ldconfig script for hurd, provided by Robert Bihlmeye,
+    closes: #95189
+  * Add replaces for netbase (<< 4.0), closes: #98708, #98735
+  * Install rpcgen/rpcinfo manpages, closes: #98710
+
+ -- Ben Collins <bcollins@debian.org>  Mon, 28 May 2001 14:36:32 -0400
+
+glibc (2.2.3-4) unstable; urgency=low
+
+  * CVS as of 5-24-2001
+  * Add forgotten mips ld.so patch
+  * Added s390 to arch lists, closes: #97718
+  * Add m68k fPIC patch for libc_nonshared, closes: #97663
+  * Add LD_LIBRARY_PATH to --library-path, closes: #98638
+
+ -- Ben Collins <bcollins@debian.org>  Thu, 24 May 2001 16:10:09 -0400
+
+glibc (2.2.3-3) unstable; urgency=low
+
+  * Upgraded to CVS as of 5-20-2001
+  * New HPPA patch (applies cleanly)
+  * Fix prep.sh, closes: #97600
+  * Add rpcinfo to libc, and rpcgen to libc-dev. Add Conflicts/Replaces
+    for both packages with netkit-rpc, closes: #93280
+
+ -- Ben Collins <bcollins@debian.org>  Mon, 21 May 2001 09:56:47 -0400
+
+glibc (2.2.3-2) unstable; urgency=low
+
+  * Enable threads for hppa
+  * Updated to CVS as of May 10, 2001, closes: #96968, #94501
+  * Run locale-gen on upgrades from before 2.2.3-1, closes: #96767, #96913
+  * Should be fixed, old regex problems, closes: #86728, #88677
+  * This should be fixed now too, closes: #88662
+  * There were some regcomp related fixes that appear to have fixed this,
+    closes: #93167
+  * Build-Depends-Indep: s/perl5/perl/, closes: #95782
+  * Updated eo_EO from Edmund GRIMLEY, closes: #78085
+
+ -- Ben Collins <bcollins@debian.org>  Thu, 10 May 2001 13:54:42 -0400
+
+glibc (2.2.3-1) unstable; urgency=low
+
+  * Were up to 2.2.3 now.
+  * libc-dev: Conflict with older gcc's that do not have the weak-sym or
+    pic-kludge patches.
+  * ldd.dpatch: New and improved fix for the "no execute permissions"
+    buglet. Now, ldd will not call the "file" command for every file. This
+    should speed up dpkg-shlibdeps a lot.
+  * Removed some obsolete db2 patches
+  * Removed some other obsolete patches
+  * Conflict with libnss-db that used db2
+  * Depends on current libdb2 which contains libdb.so.3...hopefully this
+    wont make apt choke because of a dep loop
+  * Use the new gcc-3.0 to build sparc64 64bit libc/libc-dev packages.
+  * Build-Depend += gcc-3.0-sparc64 [sparc]
+
+ -- Ben Collins <bcollins@debian.org>  Thu, 12 Apr 2001 21:08:33 -0400
+
+glibc (2.2.2-4) unstable; urgency=low
+
+  * Yeah! We can disable our libdb.so.3 (db2) interface in favor of the
+    one in libdb2. That package now has a symboled version so we can start
+    to migrate away from this cruft. However, we do still have the db1
+    support.
+
+ -- Ben Collins <bcollins@debian.org>  Fri, 23 Mar 2001 19:17:39 -0500
+
+glibc (2.2.2-3) unstable; urgency=low
+
+  * Disable building of optimized libs for now. I did not forsee the
+    problems involved with symbol skew between ld-linux.so.2 and the
+    optmized libc.so.6. As of now, I can see no way around this.
+  * Make libc6 conflict with the optimized libs for now, so we can get rid
+    of them, closes: #90753, #90758, #90763, #90770, #90778, #90779
+  * RPC patch from Jakub Jelenik, probably closes: #90830
+  * Add build-dep for file, m4 not needed now that opt libs are gone.
+    closes: #90773
+
+ -- Ben Collins <bcollins@debian.org>  Fri, 23 Mar 2001 10:31:24 -0500
+
+glibc (2.2.2-2) unstable; urgency=low
+
+  * Fix ld.so shlib output, closes: #87655
+  * Update to latest CVS, as of 2001-03-21
+  * manual/arith.texi: Fix documentation of fast and least integer
+    typedef's. Patch sent upstream, closes: #84711
+  * glibc22-getaddrinfo.dpatch: Add fix from Hiroyuki YAMAMORI
+    <h-yamamo@db3.so-net.ne.jp>, closes: #85304
+  * i386/mathinlines.h: Fix non-ANSI ?: construct, closes: #85322
+  * sysdeps/unix/sysv/linux/mips/bits/mman.h: Add and fix some madvise
+    declerations, closes: #86676
+  * Explicitly list inetd to be restarted, closes: #86715
+  * Updated Hurd SIOCS patch from Marcus Brinkman
+    <Marcus.Brinkmann@ruhr-uni-bochum.de>, closes: #87903
+  * Added eo_EO locale by Robert Thomson <sirrmt@dingoblue.net.au>
+  * Check to make sure any services actually need to be restarted, closes:
+    #88440
+  * Conflict with old strace, which appears to break under new libc6,
+    closes: #88775
+  * Make sure we remove any CVS cruft, closes: #90173
+  * Removed -O2 override for hppa, at Matt Taggart's request.
+  * Build-Depend on latest gcc so we get the weak sym stuff right.
+  * Made opt libs compiled specifically for 2.4.0+ kernels. This should
+    make them even faster and smaller since it reduces the compatibility
+    code.
+  * libc-opt/DEBIAN/preinst: Check to make sure we are running under a
+    2.4.0 kernel, and under the correct cpu
+  * libc/DEBIAN/{prerm,postinst}: Changed check for package name to use
+    basename of $0 as opposed to uname.
+
+ -- Ben Collins <bcollins@debian.org>  Fri, 23 Mar 2001 10:30:47 -0500
+
+glibc (2.2.2-1) unstable; urgency=low
+
+  * New upstream version
+  * Updated to CVS as of 2001-02-16, should make alpha build now.
+
+ -- Ben Collins <bcollins@debian.org>  Thu, 15 Feb 2001 23:55:24 -0500
+
+glibc (2.2.1-4) unstable; urgency=low
+
+  * Fixup section "disparities" between control and overrides on
+    ftp-master
+
+ -- Ben Collins <bcollins@debian.org>  Tue, 13 Feb 2001 11:47:22 -0500
+
+glibc (2.2.1-3) unstable; urgency=low
+
+  * Update CVS, should fix regex memleak, closes: #85788
+
+ -- Ben Collins <bcollins@debian.org>  Mon, 12 Feb 2001 22:57:56 -0500
+
+glibc (2.2.1-2) unstable; urgency=low
+
+  * Synced with CVS as of 2001-02-09, 2.2.2-pre1
+  * shlibs: s/libdb1/libdb/
+  * debian/rules (clean): remove shlibs file, since it is generated
+  * move getaddrinfo patch to it's own .dpatch
+  * Added some ia64 setups, closes: #82384
+  * clean target, remove debian/control.in/libc?*, since they are
+    generated
+  * debian/control.d/main (locales): Fix description to reflect recent
+    merging of the i18ndata package, closes: #82347
+  * Added hppa patch from Matt Taggart <taggart@carmen.fc.hp.com>
+  * db/ndbm.h: s,db.h,db1/db.h, closes: #83171, #83443
+  * Added extra disclaimer to the locale postinst warning. closes: #83394
+  * libc/DEBIAN/postinst: change logic in check for init. closes: #84287
+
+ -- Ben Collins <bcollins@debian.org>  Mon, 29 Jan 2001 10:54:53 -0500
+
+glibc (2.2.1-1) unstable; urgency=low
+
+  * Upstream version 2.2.1 release, not many changes for us really, since
+    we've been using CVS all along.
+  * Included Hurd-SIOCS patch from Marcus Brinkman.
+  * segfault.c: s/__access/access/. Patch sent upstream. closes: #82026
+  * Increase shlibdep version to 2.2.1
+  * Merged i18ndata package into locales package. closes: #81990
+  * Added snmpd to the restart list, closes: #81736
+  * Resynced bug list. Count is 57 now...
+
+ -- Ben Collins <bcollins@debian.org>  Wed, 10 Jan 2001 08:55:08 -0500
+
+glibc (2.2-11) unstable; urgency=high
+
+  * Synced to CVS as of 2001-01-09 - 52 unique bugs and decrementing...
+    This fixes the RESOLV_HOST_CONF security problem.
+  * Included nscd(8), nscd_nischeck(8) and nscd.conf(5) man pages by
+    Sebastian Rittau <srittau@jroger.in-berlin.de>. closes: 66365
+  * /etc/init.d/nscd: Actually uncomment and use the nscd_nischeck to see
+    if we want to start in secure mode.
+  * debian/manpages/getconf.1: New manpage for getconf utility. closes:
+    #63897
+  * debian/manpages/catchsegv.1: New manpage for catchsegv utility.
+    closes: #70740
+  * debian/glibc-doc/usr/share/doc-base/glibc-manual: Fix for new html
+    setup.
+  * sysdeps/posix/getaddrinfo.c (gaih_inet): Try absolute lookups first.
+    closes: #64192
+  * manual/conf.texi (File Minimums): make _POSIX_PATH_MAX match the
+    posix1_lim.h value, patch sent upstream aswell. closes: #81628
+
+ -- Ben Collins <bcollins@debian.org>  Sun,  7 Jan 2001 16:15:34 -0500
+
+glibc (2.2-10) unstable; urgency=low
+
+  * Synced to CVS as of 2001-01-05 - 64 unique bugs and decrementing...
+  * manual/stdio.texi: getline(): Clarify the return value if EOF is
+    reached before a newline. Patch sent upstream aswell. closes: #14590
+  * manual/string.h: basename()/dirname(): Added documentation for these.
+    Basename() required two definitions, one for the GNU version, the
+    other for the XPG version. Included examples. Patch sent upstream.
+    closes: #27586
+  * DISCLAIMER: All three of the above changelog entries did in fact change
+    the state of the files in this source. It is the opinion of the
+    maintainer (hereto after refered to as GOD), that the changes made do
+    in fact make the package(s) better. GOD does not warantee that these
+    changes will make your life (be it sex life, or no life) better. GOD
+    does guarantee that you (hereto after refered to as NON-DIETY) will
+    gain great wisdom simply by using this(these) package(s). The
+    NON-DIETY shall not, in any event, hold GOD responsible for misreadings
+    of these statements.
+
+ -- Ben Collins <bcollins@debian.org>  Fri,  5 Jan 2001 10:46:42 -0500
+
+glibc (2.2-9) unstable; urgency=low
+
+  * CVS synced as of 2001-01-03. Happy freaking new year.
+  * Remove FAKEROOT check, since we don't build locales now, we don't have
+    to worry about it.
+  * dlfcn/dlerror.c: dlerror(): Check for result->errstring being NULL,
+    closes: #80991
+  * No offense, but I cannot be expected to debug fortran programs
+    compiled with a commercial(?), non-GNU compiler. Talk to them about
+    getting it to work. As for the "works on RH, but not Debian", most
+    likely that didn't do anything to make it very portable. closes: #68510
+  * Tested with current NIS, and the test cases passes with no open fd's.
+    closes: #52222
+  * Make note of AMD in libc6-i[56]86 descriptions. closes: #77791
+  * Make note about some commercial programs not liking our optimized
+    libraries (IBM JDK for one). closes: #78656
+    NOTE: To the submitter of this bugreport, I'm pretty sure the JDK
+    relies on frame-pointer to handle some special ass-backwards stuff,
+    which wont work with these libraries since they are compiled without
+    frame-pointer (making it hard to strace, and debug using these libs).
+  * Yes, semget(2) refers to SEMMSL, but nothing I can find says it should
+    be defined in userspace. closes: #11560
+  * This patch only applies to kernel-headers, and since they don't need
+    to be used in userspace, it's ok to have some oddities, closes: #55578
+  * I was able to write an 90 byte "Hello World" .c, and compile it into
+    an 800 byte static binary using -nostdlib and -Wl,-lc. closes: #21676
+  * Making an ar archive from one .o is just silly, closes: #58606
+  * Patch sent upstream. Might change a bit, but the result should be the
+    same, closes: #73003
+  * I believe the reason the .pwd.lock file remains is to avoid a race
+    condition, where something might be waiting for the lock, and
+    unlinking it would cause something else to be able to obtain the lock,
+    even though it isn't available. closes: #14093
+  * I tried to reproduce this, but glob kept working right for me. I think
+    the user is misusing the function. Most likely they are passing the
+    glob on the command line, which is in turn doing some escape
+    processing, and not working right with glob() itself. closes: #67921
+  * In Debian, locales are not required to be installed. closes: #35875
+  * Could not reproduce in the latest glibc. Upstream seems to have fixed
+    this. closes: #75163
+  * Bug report log says this is fixed in glibc 2.1.1, closes: #36775
+  * I think this was an issue with the gcc-2.95 compiler defaulting to
+    486 instruction sets. This was fixed by gcc some time ago. closes:
+    #38998
+  * The "order" directive in host.conf is supposed to be a space seperated
+    list of sources, not comma. This is a bug in host.conf(5), which has
+    already been reported. I'm closing this one to avoid duplication.
+    closes: #35731
+  * Appears to be related to #36775, but I checked the test case anyway,
+    and it worked as expected. closes: #35035
+  * I tried the test program, and it worked fine. So either guile or glibc
+    fixed the bug already. closes: #36030
+  * The locales package is not referenced by any other package ATM.
+    closes: #38742
+  * Symlink /usr/share/zoneinfo/localtime to /etc/localtime for libc5
+    compat. closes: #48705
+  * SUSv2 defines putenv as "int putenv(char *)", closes: #60960
+  * From my understanding of of the SUSv2 definition, the pointer
+    reference of inbuf may be incremented to the current position of
+    translation. So in actuality, the object is not const. GLibc
+    interprets this using the __restrict compiler option (defined in gcc's
+    later than 2.92, e.g. egcs 1.1.2, and gcc 2.95). closes: #77312
+  * Fixed ambiguity problem in tzconfig, closes: #69045
+  * This was a netscape/libc5/plugin issue, closes: #50672
+  * User error. He is setting all of the fd's in the pollfd struct to -1,
+    which returns POLLNVAL, which is the expected response. closes: #51877
+  * objstack_* does use const definitions now, closes: #68918
+  * This was the old xmms-segv's-on-exit bug, fixed by glibc 2.1.9X (can't
+    remember which version exactly). closes: #74345
+  * leading zero makes sscanf determine the number as an octal, closes:
+    #69278
+  * zic.8: zdump is section 1, not 8. closes: #72095
+  * Old libdb2 upgrade issue, fixed in during the 2.1.9x uploads. closes:
+    #72663
+  * Update this changelog to include the revisions from the stable (potato)
+    updates.
+  * Patch sent upstream. Fixes timezone showing up as "/etc/localtime".
+    closes: #71060
+
+ -- Ben Collins <bcollins@debian.org>  Tue,  2 Jan 2001 20:22:11 -0500
+
+glibc (2.2-8) unstable; urgency=low
+
+  * The one-liner fix for devpts.sh
+  * Patch sent and accepted upstream, closes: #80485
+  * CVS synced as of 2000-12-30
+
+ -- Ben Collins <bcollins@debian.org>  Thu, 28 Dec 2000 09:49:30 -0500
+
+glibc (2.2-7) unstable; urgency=low
+
+  * Synced to CVS as of 2000-12-25
+  * Patches sent upstream, closes: #75334, #34550, #71928, #11839, #75349
+    closes: #38392, #68923, #77416, #39440
+  * TCPOPT_EOL, TCPOPT_NOP, TCPOPT_MAXSEG: not declared in glibc (was a
+    libc5 thing), so they don't need to be documented, closes: #9888
+  * Use texi2html for .html output, which actually does split the file,
+    closes: #61257, #76678
+  * Hmm, not sure I can fix hamm->slink upgrades for libc6-doc->glibc-doc,
+    closes: #32792, #32801
+  * Fixed by upstream, closes: #62173, #10686, #37014, #54051, #57297
+    closes: #53786, #74611, #37162, #41388, #60255, #63569, #67204
+    closes: #67205, #60034, #42850, #60320, #39594, #59800, #48371
+    closes: #66803
+  * Could not reproduce. My test program showed that it resolved the
+    libpthread properly. I am going to assume user error, or some
+    funkiness on the user's system. closes: #78585
+  * This is reported as a kernel issue, and the submitter was asked to try
+    a newer kernel, but never replied. I'm closing on the grounds that I
+    believe it was a kernel issue, closes: #45693
+  * The iconv test program seems to work as expected in glibc 2.2,
+    closes: #39762
+  * lt_LT uses ISO-8859-13 now, closes: #10358
+  * Things relying on sort to work correctly, should set LANG=C to get
+    expected behavior, closes: #56195, #61746, #69544
+  * Fixed long long ago, closes: #58226, #58586, #35948, #76246, #53530
+    closes: #39584, #13800, #34452, #53894, #54096, #42490, #30683, #32468
+    closes: #29619, #34816, #35113, #39071, #35334, #35497, #42867, #36212
+    closes: #59316, #62826, #35131, #36952, #43659, #24090, #36076, #45041
+    closes: #54156, #37307, #27146, #34729, #47457, #34699, #35250, #34538
+    closes: #30054, #35389, #36655, #36762, #36932, #36933, #61163, #58954
+  * We no longer build locales at build time, but at install time, closes: #69172
+  * I don't see the problem in this testcase, works for me, closes: #73018
+  * debian/control.in/main: Show in description that nscd also handles
+    host lookups, closes: #48716
+  * Unreproducable, probably fixed in 2.2, closes: #57026, #42726, #40768
+    closes: #45848, #58367, #62990, #40870, #67296, #38897, #60099, #66769
+  * nscd now has a --invalidate option, closes: #42727, #43729
+  * adduser now calls nscd -i, so works correctly, closes: #36080
+  * Hey, it's one of my bugs, and it isn't any good! closes: #34940
+  * Yeah, I agree with the bug report. If you don't want nscd to run on a
+    particular system, just uh, don't install it, closes: #36621
+  * Setting Fixed to, closes: #47289
+  * Do not use UNIX_PATH_MAX, use SUN_LEN(ptr) (defined in sys/un.h),
+    closes: #61963
+  * _PATH_DEFPATH is the bare minimum for linux. If you want more, use the
+    PATH env, closes: #31983
+  * The man page is wrong. dlerror.c, and dlfnc.h both show that the
+    return string is allocated, so it is not const. closes: #35694
+  * All together now, "Using kernel headers in userspace is BAD",
+    closes: #12207, #19646, #43105
+  * Ran the test case with -O0, -O2, -O3, -O6 on sparc and i386, and did
+    not see the problem reported, closes: #37154, #27516
+  * Seems perl has worked around this (or libc has), since perl modules
+    are building fine, AFAICT, closes: #34110
+  * Linus does not suggest doing /usr/include/{linux,asm} symlinks
+    anymore. closes: #24949
+  * This isn't a glibc bug, it was a gdb bug that is now fixed. closes: #27544
+  * lrint is defined with -D_ISOC99_SOURCE, closes: #43530
+  * No reference to which docs, nor is there a test case, so: closes: #63511
+  * Doh, this was already fixed by me in 2.2-6! closes: #79666
+  * User malfunction, not a bug. closes: #39648, #50261, #36075
+  * Including stdio.h only ensures that getline will work, it does not
+    guarantee you that it's return type is defined, which you must do
+    yourself. closes: #62511
+  * O_LARGEFILE is only usable when compiling with -D_LARGEFILE64_SOURCE,
+    closes: #68873, #52455
+  * Ok, strcoll doesn't seem as slow now as shown in the bug report when
+    LANG is set. The thing is, this function will always be slower when it
+    has to take localization into account. closes: #62803
+  * Re bug #44093
+    a) I'm pretty sure there is no problem with libc translating errno
+       from the kernel, else we'de have some serious problems.
+    b) The ioctl() manpage cannot document all returns (and in fact it
+       says that it does not document all ioctl types).
+    c) I'm pretty sure the EIO return on this particular case is generated
+       by the kernel.
+    closes: #44093
+  * Tested this, and I was able to get 1022 temp files from mkstemp on a
+    single run, using the same template, closes: #31415
+  * Ulrich Drepper, Re: sortlist in libresolv:
+     >It never was and in general is not wanted.  Beside, it is another poor
+     >DNS feature which doesn't work with IPv6.  Finally, the NSS gethost*()
+     >functions don't have the supporting code.
+    closes: #64327
+  * lpd should not be using internal glibc functions. closes: #33686
+  * makedb -V has no translation now, closes: #34702
+  * Checking printf returns is left to the programmer, closes: #28250
+  * Ok, the 51 pages of flaming in tis bug report leads me to believe that
+    this will never be resolved in glibc. IMO, it is up to the programmer
+    to be smart enough to check these things (where it matters). I am
+    closing this bug report on the precedence that it is not really a bug
+    because current functionality meets specs (and this bug report would
+    break that compatibility). This entire bug report should be archived
+    all on it's own. Hell, it should have it's own BTS just to track the
+    conversation. closes: #28251
+  * mkstemp complies with SUSv2 and BSD 4.3. Changing it's bahvior would
+    cause portability problems. closes: #34793
+  * Downgrading is not supported, closes: #36578
+  * The test case did not use pthread_detach(), which resolved the issue.
+    closes: #25879
+  * Fix devpts regex for when to mount devfs. closes: #79830
+  * I believe Wichert found out that base-passwd did have a bug that was
+    causing this, and fixed it. closes: #55367, #79043
+  * First of all, I do think tzconfig manpage needs to be in section 8.
+    However, changing the execute permissions does very little. In fact it
+    does nothing. Since normal users don't have perms to change the system
+    tz, it doesn't matter if they can execute tzconfig. closes: #62397
+  * Added autofs to the services that need to be restarted.
+    closes: #80453, #79926
+  * Use neat dpkg/awk one-liner from Adam Heath to get list of installed
+    services for the daemon check. closes: #80454
+  * tzconfig allows you to choose UTC now. Just go to "12" (none of the
+    above), and then choose UTC. closes: #38556, #35094
+  * Ok, my opinion on this is that you should check dlopen's return every
+    time. The example program shows that they did not do this. closes: #37604
+  * Looks like a bug in haskell to me. closes: #37902
+  * IIRC, all the BSD code is gone. closes: #58270
+  * Bug report claims it is not a bug. closes: #42155
+  * We have optimized libs now, so that should solve this. closes: #44619
+  * I'm pretty sure this "large" wtmp file with only 3 entries is a sparse
+    file (check with du). closes: #43950
+  * I seriously doubt that ld.so's LD_LIBRARY_PATH stopped working.
+    closes: #59110
+  * I don't think this is a glibc bug. Sounds more like a cross-compiler
+    bug. closes: #68424
+  * In Debian, 2.1.2 and 2.1.3 are binary compatible. closes: #60113
+  * To get i18n/charmaps, you need to install i18ndata. closes: #65132
+  * We don't need to mount shmfs anymore, closes: #65510
+  * Fixed by dpkg, closes: #66913, #64906
+
+ -- Ben Collins <bcollins@debian.org>  Mon, 25 Dec 2000 08:42:49 -0500
+
+glibc (2.2-6) unstable; urgency=low
+
+  * Added m68k lchown fixes, plus removed conflict for libstdc++2.10-dev
+    on m68k. Bug/patch provided by Michael Fedrowitz
+    <michael.fedrowitz@informatik.uni-ulm.de>, closes: #78937
+  * libc-opt: added memprof to the death list of packages that don't work
+    with our optimized libraries, closes: #79224
+  * Added Provides: glibc2.2 to libc6/libc6.1/libc0.2 so I can make
+    locales dep on it, closes: #78495
+  * CVS sync as of 2000-12-15
+  * Fixed previously: closes: #75865, #77170, #75473
+  * Added a "." counter while checking services for install, closes: #78881
+  * %hhn works as expected in i386 in this version of glibc, closes: #79221
+  * Looks like this is resolved, closes: #59429
+  * The libc info page says not to use fgets on streams that may have NULL
+    char's, which sockets might, closes: #57729
+  * This is probably fixed, if not reopen it please, closes: #24414
+  * Well this bug report has no report in the BTS, I am going to assume
+    from the age and type of the title, that it is fixed, closes: #21272
+  * Old ld.so issue, most likely resolved in hamm, closes: #46173
+  * This bug is a simple programming mistake. For one the child never
+  * fills the buffer in certain cases, so it's contents are never flushed.
+    If the program called fflush after every output, then it works fine,
+    closes: #26226
+  * The new upgrade code in libc postint should resolve this, closes: #64074
+  * This is a compilation error. libc.so.6 does not contains fxstat
+    (libc-nonshared.a does), so if you don't link properly (like with
+    gcc), you will miss some symbols, closes: #36139
+  * Similar to the above, also resolved, closes: #30427
+  * Old ld.so bug, fixed, closes: #70658
+  * Current localedef doesn't seem to segv on improper input, closes: #65634, #64878
+  * YAOLDSOB (Yet Another LDSO Bug), closes: #42944
+  * Lack of useful info in the BTS ("I suspect glibc" doesn't cut it),
+    closes: #36498
+  * Someone needs to read release notes, closes: #41455
+  * Uh, tzconfig works. Tzselect is not for changing timezones, but for
+    querying what the available ones are. From tzselect(1):
+
+      Note  that tzselect will not actually change the timezone
+      for you. Use the tzconfig(8) utility to achieve this.
+
+    So you see, this is how it's meant to be, closes: #37409
+  * Fixed in glibc 2.2, closes: #42512
+  * a) all init scripts need to support restart
+    b) postinst uses stop/start now anyway
+    c) postinst fails much better now when things go wrong
+
+    closes: #52914
+  * getaddrinfo does DNS lookups regardless because of the nature of the
+    function. Also it handles ipv4/ipv6 better now, closes: #60743
+  * I don't see why libc6 needs to create /etc/rcS.d/ when dpkg does it so
+    closes: #66138
+  * strstr seems pretty fast now, closes: #10689
+  * Latest emacs/libc6 is working fine, closes: #48476
+  * YAOLDSOB, closes: #42135
+  * libstdc++-v3/glibc2.2 compiles fine together, closes: #66757
+  * strerror() with maxerror+1 works as expected now, closes: #40184
+  * No other info, and no similar reports. Assuming user error, closes: #31465
+  * Old ssh-nonfree getting a sigsegv is not a bug in libc6, but sshd,
+    closes: #41800
+  * Restarting woffle already, closes: #74164
+  * I believe this was due to some old nss1 issues, which are now resolved
+    during upgrades, closes: #35089
+  * This is something libc6 itself cannot fix. Either way, rsh/rlogin is
+    broken by nature, closes: #19168
+  * Well, I can't retroactively go back to hamm and add a stub for
+    setresuid(), closes: #29675
+  * Fixed upstream a long time ago, closes: #39693
+  * From unix/getlogin.c:
+
+    /* Get name of tty connected to fd 0.  Return NULL if not a tty or
+       if fd 0 isn't open.  Note that a lot of documentation says that
+       getlogin() is based on the controlling terminal---what they
+       really mean is "the terminal connected to standard input".  The
+       getlogin() implementation of DEC Unix, SunOS, Solaris, HP-UX all
+       return NULL if fd 0 has been closed, so this is the compatible
+       thing to do.  Note that ttyname(open("/dev/tty")) on those
+       systems returns /dev/tty, so that is not a possible solution for
+       getlogin().  */
+
+    So basically, closes: #17528
+  * Current nis/nss-compat code looks like it handles this right,
+    closes: #33197
+  * libc6 cannot compensate for broken coding, closes: #42912
+  * nprocs is fixed in 2.2, closes: #57101
+  * libdb.so.2 does have shlibs now, closes: #39578
+  * getcwd now returns NULL in the case shown in this bug report, so there
+    is no suprise if the program checks the return correctly, closes:
+    #27227
+  * Adduser now restarts nscd as needed, closes: #37296
+  * getaddrinfo fixes for ipv4/ipv6 fixes this, closes: #58713
+  * Programs using libc5/libc6 at the same time via dynamically loading
+    libc5 apps from a libc6 apps) simply does not work, closes: #42088
+  * getaddrinfo fix, closes: #70012
+  * libc-64 was never meant to work right, closes: #53748
+  * libNoVersion.so.1 is gone, closes: #37681
+  * libc/postinst is file-rc friendly now, closes: #40053
+  * libdb2 is no longer a reference for libdb stuff, closes: #61154
+  * ld.so/ldconfig now have man pages, closes: #41917
+  * Bah, libtricks is old and gone, closes: #39080
+  * /var/state/glibc is gone, closes: #39562, #39705
+  * glibc no longer includes db/db2, so look for docs in those seperate
+    packages, closes: #23547
+  * scsi/scsi.h is there, closes: #31502
+  * linux/joystick.h is there, closes: #38028
+  * db.h is no longer in libc6-dev, closes: #39077, #74945
+  * nprocs works on sparc now, closes: #52420
+  * ldd now supports libc5 better, closes: #35644
+  * Unreproducable, closes: #39582, #25773, #35624, #35123
+  * /var/lib/misc/Makefile does not refer to /var/db, closes: #41947
+  * llseek is obsolete, use lseek64 now, closes: #20988
+  * Actually this looks like an error in the program, closes: #41952
+  * Hmm, I would guess that libc6/libc5.4.38 is correct, and libc5.4.17 is
+    wrong, close: #21839
+  * Fixed in the Before Time, during the Great Long-Long Ago,
+    closes: #39585, #34442, #59622, #24652
+  * That's all for now...
+
+ -- Ben Collins <bcollins@debian.org>  Fri, 15 Dec 2000 15:30:16 -0500
+
+glibc (2.2-5) unstable; urgency=low
+
+  * Update to CVS as of 2000-11-27
+    - Includes hppa config stuff
+  * Ok, libsafe seems to be broken with our optimized packages. I
+    reassigned the bug report to that package. Most likely this wont be
+    fixed in libsafe for a bit, so for now I am making the optimized
+    packages conflict with it. The likely cause is the inline string
+    functions (-D__USE_STRING_INLINES).
+  * libc/postinst: added lprng and lpr to the list of daemons to restart,
+    closes: #78132
+
+ -- Ben Collins <bcollins@debian.org>  Mon, 27 Nov 2000 11:33:25 -0500
+
+glibc (2.2-4) unstable; urgency=low
+
+  * Dear god! Who changed things to a symlink in the kernel-headers and
+    didn't tell me of all people!? This must be a conspiracy! Some one is
+    out to get me! Everyone, I am going to go underground until the
+    security of my system is safe once again! (btw, I fixed the asm
+    include problem before I took a vacation from my sanity...)
+
+ -- Ben Collins <bcollins@debian.org>  Thu, 23 Nov 2000 18:19:24 -0500
+
+glibc (2.2-3) unstable; urgency=low
+
+  * Damn, really remove libc6 dep from locales this time
+  * Include shlibs file with optimized libs, so dpkg-shlibdeps will be
+    happy with people using them.
+  * Added updates eo_EO locale
+
+ -- Ben Collins <bcollins@debian.org>  Wed, 22 Nov 2000 15:40:12 -0500
+
+glibc (2.2-2) unstable; urgency=low
+
+  * Update to CVS to 2000-11-19
+    - Includes the ldconfig patch, so removed from local set
+    - WOOHOO! Includes a patch to getaddrinfo, so that it only returns
+      failure if both ipv4 AND ipv6 lookups fail for PF_UNSPEC.
+      closes: #72764, #72905, #74692, #74692, #74367, #75388, #74692
+    - Now includes the USAGI ipv6 patch
+  * control/locales: remove $(libc) dep...bad for a arch-all package,
+    closes: #76830
+  * Move locales to binary-indep targets, closes: #76830
+  * Add another hppa patch for _setjmp. Also, make hppa build with -O for
+    now.
+  * libc-dbg: make debug/ld*.so executable
+  * $(libc): suggests libnss-db
+  * locale-gen: set umask to 022, closes: #77191
+  * etc/locale.gen: uncomment en_US as a default
+  * debian/sysdeps/optimized.mk: New make snippet, which allows building
+    optimized sets of runtime libraries. Right now, only sparc and i386
+    seem to support hwcap, so we only build i586, i686 and v9 optimized
+    libraries. When other archs start supporting hwcap, then they too can
+    join the club.
+  * prep.sh: use ./version, so ash will work too
+  * Fixed prior to this release: closes: #71938, #75295, #75488, #76168
+
+ -- Ben Collins <bcollins@debian.org>  Sun, 19 Nov 2000 16:32:27 -0500
+
+glibc (2.2-1) unstable; urgency=low
+
+  * ALL HAIL GLIBC 2.2 RELEASE! Please put seats in full upright position,
+    remain seated until installed, and do not panic. The ride is almost
+    over. Once you have installed Glibc 2.2, please procede to our new
+    Debian-Rough-Ride, Xfree86-4.0.1, which is currently in progress.
+  * glibc22-ipv6-USAGI.dpatch: New patch, brings some stability and
+    compatibility to ipv6. This will most likely fix ipv6 issues with
+    things like ssh (let me know).
+  * Totally whack job on the locales package! We now do not provide *any*
+    precompiled locales. Instead we allow the admin to selectively decide
+    which ones to compile.
+  * Start of support for future upgrades. A new patch that should make
+    upgrades easier, post woody. This deals soley with the NSS module
+    problem and daemons running during upgrade.
+  * glibc22-hppa-config-fix: Fix config.{sub,guess} so hppa builds (From
+    the nice Debian folks at HP). BTW, where's my HP/PA BOX!? :)
+  * glibc22-ldconfig-fix: Fix bad allocation in ldconfig
+  * Bugs closed by this release: closes: #74057, #74362, #74692, #75249,
+    #75956, #76390, #76451
+
+ -- Ben Collins <bcollins@debian.org>  Fri, 10 Nov 2000 12:47:02 -0500
+
+glibc (2.1.97-1) unstable; urgency=low
+
+  * New upstream, + recent CVS
+    - includes lockf fix now
+    - fixes fmemopen issues
+    - adds ja_JP.ujis alias, closes: #72686
+    - fixes for sparc mathinline.h
+    - lots of locale related updates
+    - mips patches are now included upstream
+  * depflags.pl: added replaces ldso for libc6 too (ldd), closes: #76126
+  * Set --enable-kernel for Linux builds, so we can control how much
+    backward compatibility we have.
+  * Fix build-depends for gcc to include epoch
+  * Up'd the shlibs deps to 2.1.97
+  * Removed static nss
+
+ -- Ben Collins <bcollins@debian.org>  Tue,  7 Nov 2000 14:04:36 -0500
+
+glibc (2.1.96-1) unstable; urgency=low
+
+  * New upstream release (close to a final 2.2), closes: #73058
+    - fixes ld.so reference counting (fixes some obscure bugs with
+      loadable modules, like NSS).
+    - fixes for ppc
+    - netinet/tcp.h fixes for uint8, closes: #74061
+    - fixes limits.h/LONG_MAX declerations, closes: #75720
+  * When running "$(MAKE) test" use -k so we complete as much as possible
+  * db/Makefile: remove patch that inhibited the db1 headers. Now, db1
+    applications can be built again. This is temporary, to give poeple
+    time to migrate (db2 maintainer can use this for db_dump185),
+    closes: #72723
+  * shlibs.mk: Use $(objdir)/soversions.i for generating the shlibs file,
+    which is more correct. Thanks to Marcus Brinkman for pointing this
+    out, closes: #75685
+  * debian/glibc-doc/usr/share/doc-base/linuxthreads-faq: removed, no
+    longer in upstream source, closes: #74046
+  * libc/postinst: added wu-ftpd, wu-ftpd-academ, slapd, openldapd and
+    logind to list of daemons to to restart, closes: #74158
+  * libc/postinst: added support for filerc, thanks to Roland Rosenfeld
+    <roland@debian.org>, closes: #74290
+  * libc/postinst: check for existence of /sbin/init before restarting it,
+    closes: #75310
+  * sysdeps/depflags.pl: Change g++ conflict to libstdc++-dev so we
+    precludes the right package (i.e., we need a newer libstdc++-dev, not a
+    new g++), closes: #75019
+  * sysdeps/depflags.pl: make libc6 depend on libdb2 from woody so we
+    don't make apt act all weird with a three layer dependency of sorts
+    (ask Jason, I'm not sure of all the issues, but it seems it is needed
+    for now), closes: #75601, #75689
+  * sysdeps/generic/lockf.c: explicitly set l_type to F_RDLCK (help from
+    Anton on this one)
+  * dl-machine.h.mips-2: new patch from Florian Lohoff <flo@rfc822.org> to
+    fix ld.so segv on mips (I expect to see some .deb's in the official
+    archive soon, my Indy is getting jealous :)
+
+ -- Ben Collins <bcollins@debian.org>  Sun, 29 Oct 2000 16:39:12 -0500
+
+glibc (2.1.95-1) unstable; urgency=low
+
+  * New upstream release
+  * debian/sysdeps/depflags.pl: Don't conflict/replace old libdb2, just
+    conflict.
+  * debian/libc/DEBIAN/postinst: Don't just check the service name with
+    "dpkg -s" since we miss things like inetd, which isn't in a package
+    named "inetd". Check for "installed" and "", then -x of the init.d
+    file
+  * debian/patches/ldd.dpatch: fixup so we don't get double output of
+    libraries, closes: #72710
+  * debian/sysdeps/depflags.pl: Hmm...where did the libnss-db dep go
+    anyway? There now.
+  * debian/manpages/: Added man pages for ldd, ldconfig and ld.so
+    to replace the ones removed from ld.so, closes: #72648, #72727
+  * locales fixed in -2, closes: #72752
+
+ -- Ben Collins <bcollins@debian.org>  Mon,  2 Oct 2000 11:18:48 -0400
+
+glibc (2.1.94-3) unstable; urgency=low
+
+  * updated CVS post-2.1.94 to 20000929
+  * Put db/db2 libs back in for runtime use only (not linkable and no
+    headers). Closes a shitload of bugs, and makes everyone happy. Oh, let
+    the sun shine down.
+  * alpha-dwarf2-dl-machine: merged upstream
+  * debian/sysdeps/depflags.pl: removed all the db2 cruft conflicts
+  * debian/libc/DEBIAN/postinst: Use /etc/rc${rl}.d/ instead of
+    /etc/init.d/ when restarting services. This way, we don't start any
+    services that were meant to be off. Also, check for a non-zero exit when
+    starting and report such failures. This will give people a heads up to
+    any problems.
+
+ -- Ben Collins <bcollins@debian.org>  Fri, 29 Sep 2000 16:29:59 -0400
+
+glibc (2.1.94-2) unstable; urgency=low
+
+  * Removed WANT_LDD, we now install it for every arch. This removes the
+    need for the ldso package completely, on systems without libc5 (YAH!)
+  * debian/sysdeps/depflags.mk: removed cruft
+  * debian/sysdeps/depflags.pl: new script with a simplified control deps
+    setup to replace depflags.mk. The former was getting too complex
+  * debian/rules.d/shlibs.mk: fixed logic preventing it from actually
+    installing the new shlibs file
+  * debian/sysdeps/depflags.pl: Added lots of conflicts for NMU'd packages
+    that fell prey to the db2 problems.
+  * debian/contron.in/main: Fix nscd depend on libc6
+
+ -- Ben Collins <bcollins@debian.org>  Wed, 27 Sep 2000 10:09:51 -0400
+
+glibc (2.1.94-1) unstable; urgency=low
+
+  * New maintainer, "Lector, si monumentum requiris, circumspice"
+  * New upstream version, pre 2.2 now
+    - crypt is now in glibc source, so is not a seperate tarball
+    - removed nss1 compat tarball
+    - db2 is gone aswell
+    - without db2, upstream split nss_db from main source (*sigh*)
+  * Added inetd to list of services to restart
+  * modfl/fmodl: documented in info pages, closes: #17874
+  * Just a quick list of bugs that I can verify do not exist any longer,
+    closes: #45903, #26514, #46547, #32345, #30987, #48713
+  * fcloseall: in the case of stdio/fcloseall.c, yes, it only ever
+    returns success. However, we use libio/fcloseall.c, who does in fact
+    have a chance to return EOF, closes: #20973
+  * libio/libio.h: shows that the Stream Hooks do in fact take (void *) as
+    the first argument as shown in the protos, closes: #61497
+  * trunc/floor: documented correctly in this release, closes: #65683, #65684
+  * Hurd maintainers say this can be closed, closes: #54154
+  * I'm pretty sure this isn't an issue anymore, else potato wouldn't be
+    releasing, closes: #35049
+  * Sorry this isn't a glibc bug. The kernel handles error returns on a
+    failed executable. Most likely this is bin_interp's problem, but I
+    seriously doubt it will be fixed because of conventions, standards and
+    the like, closes: #22301
+  * keyenvoy: no longer compiled for linux (it seems), closes: #47560
+  * infnan: is defined now, closes: #19264
+  * libc5 bug, no longer applies, closes: #11300
+  * Make sure we copy over asm-sparc for sparc aswell as "generate-asm.sh"
+    script used to generate /usr/include/asm
+  * Disable parallel build on sparc (broken for some reason, might not be
+    sparc specific)
+  * devpts.sh: used a more devfs friendly version from bug submitter,
+    closes: #65276
+  * libc/postinst: cannot reproduce problem, appears to be user error,
+    closes: #64865
+  * glibc-doc: this bug is no longer valid, closes: #33759
+  * We now use ldconfig from libc6 for all archs, ldso will conform.
+  * Change build deps to just "kernel-headers" for non-Hurd archs. With
+    mips and other coming down the pipe, this is bound to get ugly if we
+    specify the particular version for each.
+  * Add checks to automatically detect proper kernel-headers, error out
+    otherwise.
+  * hurd: add Depends: hurd (>= 20000803) for libc0.2
+  * libpthread: soname version is now 0.9
+  * debian/libc/DEBIAN/shlibs: bump to 2.1.94
+  * libc6: add temporary depend on libdb2
+  * debian/rules: check for FAKEROOTKEY, and fail if it's there. We cannot
+    build under fakeroot, we need real rewt. Fear my hacking skillz.
+
+ -- Ben Collins <bcollins@debian.org>  Mon, 25 Sep 2000 11:30:45 -0400
+
+glibc (2.1.3-14) stable; urgency=low
+
+  * Stable upload for some serious issues in potato
+  * Patch to match glibc 2.2 to not set personality, closes: #72165
+  * Arm ld.so patch, closes: #75982
+  * Add check for FAKEROOTKEY, to $(checkroot) to make sure we build as
+    real root, and not fakeroot. This is required for locale definitions
+    to be generated properly. closes: #70806, #70876
+  * Backport the fix to lockf(F_TEST), which fixed this on alpha and
+    sparc.
+
+ -- Ben Collins <bcollins@debian.org>  Tue,  2 Jan 2001 17:15:44 -0500
+
+glibc (2.1.3-13) stable; urgency=low
+
+  * Damnit...used the 0824 patch set, now there's an 0827 :/
+
+ -- Ben Collins <bcollins@debian.org>  Fri,  1 Sep 2000 10:54:11 -0400
+
+glibc (2.1.3-12) stable; urgency=low
+
+  * Ugh, add three patches posted by Solar Designer which include the ldso
+    bug (better patch), locales bug, and md5 fixups.
+
+ -- Ben Collins <bcollins@debian.org>  Thu, 31 Aug 2000 11:10:46 -0400
+
+glibc (2.1.3-11) stable; urgency=low
+
+  * Security upload for ldso problem
+  * Fix sparc headers too
+  * Might aswell change the maintainer too (So long Joel, you are missed)
+
+ -- Ben Collins <bcollins@debian.org>  Thu, 31 Aug 2000 11:10:36 -0400
+
+glibc (2.1.3-10) frozen unstable; urgency=low
+
+  * The "Ask not for whom the feep tolls" release.
+  * zic -l will use hardlinks if /etc and /usr are on the same
+    filesystem, so revert to ln -s.
+  * Update Build-Depends to kernel-headers-2.2.15.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Fri, 28 Apr 2000 18:45:49 -0700
+
+glibc (2.1.3-9) frozen unstable; urgency=low
+
+  * The "Insert clever reference here" release.
+  * debian/patches:
+    - i386-sys-io-c++: Change '::' to ': :' to avoid confusing g++
+      + closes: Bug#57914
+    - zic-l: Fix -l in zic(8) (taken from OpenBSD)
+  * Teach tzconfig to acquire current timezone from /etc/localtime
+    symlink if necessary.
+  * Use zic -l instead of ln to make /etc/localtime symlink.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Fri, 21 Apr 2000 13:30:47 -0700
+
+glibc (2.1.3-8) frozen unstable; urgency=low
+
+  * The "What's my name? Say my name, bitch!" release.
+  * debian/patches:
+    - i386-linux-ucontext: Don't use ERR.
+      + closes: Bug#59962
+    - ldd:
+      + Improve non-executable shared object handling.
+      + Revert ${RTLD} --list stuff. (closes:Bug#60869)
+      + alpha will break again, someone needs to fix ld.so.
+  * debian/control.in/main: locales: Depends: @libc@ (= ${Source-Version})
+    This will insulate us from data format changes.
+  * Fix tzconfig man page (closes:Bug#61610,#61613).
+  * Revert /etc/localtime to a symlink (closes:Bug#60744).
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Mon,  3 Apr 2000 08:40:07 -0700
+
+glibc (2.1.3-7) frozen unstable; urgency=low
+
+  * The "Light my Alpha fire with a SPARC" release.
+  * debian/patches:
+    - libc-pr-fixes: Fixes for post-2.1.3 PRs
+      + closes: Bug#59802,#59257
+    - tzdata2000c: Includes AR timezone correction
+      + closes: Bug#59790,#59806
+    - sparc-linux-getsysstats: Update so it actually works.
+    - alpha-dwarf2-dl-machine: Fix for unaligned traps from C++ EH code
+      + closes: Bug#59789
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Tue,  7 Mar 2000 10:31:42 -0800
+
+glibc (2.1.3-6) frozen unstable; urgency=low
+
+  * The "Smash Everything with a _Huge Steamroller_!" release.
+  * debian/sysdeps/gnu.mk: Define WANT_LDD (closes:Bug#59165).
+  * debian/libc/DEBIAN/preinst: Make this as /bin/bash script (closes:Bug#59613).
+  * debian/libc/DEBIAN/postinst:
+    - Only make /var/mail symlink on upgrades.
+    - Make this a /bin/bash script.
+  * debian/sysdeps/depflags.mk: (libc_control_flags)
+    C/R/P gconv-modules where necessary, Replace locales (<< 2.1.3-5).
+  * debian/control.in/main: Build-Indep-Depends: perl5 (closes:Bug#59350).
+  * debian/libc/etc/init.d/devpts.sh: Remove version check, checking for
+    the filesystems alone should be sufficient (closes:Bug#59576).
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sat,  4 Mar 2000 09:28:08 -0800
+
+glibc (2.1.3-5) frozen unstable; urgency=high
+
+  * The "Down, not across" release.
+  * 2.1.3 final.
+  * Pre-Depends were a bad idea
+    - quit using readlink.
+    - removed pre-depends on debianutils.
+  * Add devpts.sh again, this time not as a conffile.
+  * Build-Depends: gcc (>= 2.95.2-6) [alpha], remove sharutils [alpha].
+  * Move /usr/lib/gconv to $(libc).
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sat, 26 Feb 2000 00:14:34 -0800
+
+glibc (2.1.3-4) frozen unstable; urgency=low
+
+  * The "Pain as bright as steel squared" release.
+  * glibc 2.1.3pre4.
+  * Remove debian/patches/po-it-po.dpatch,
+    debian/patches/powerpc-linux-sys-procfs.h.dpatch, and
+    debian/patches/powerpc-linux-syscalls.list-mmap64.dpatch;
+    Integrated upstream.
+  * Add back debian/patches/linuxthreads-lock.dpatch now that I know
+    what it's for (closes:Bug#58385).
+  * Bugs closed since devpts.sh is gone (closes:Bug#57584,#57698,#57580).
+  * debian/libc/DEBIAN/preinst:
+    - Save a copy of /etc/timezone in /etc/timezone.save.
+    - Convert /etc/localtime from link to file.
+  * debian/libc/DEBIAN/postinst:
+    - Use /etc/timezone.save if necessary. (closes:Bug#57885,#57922).
+    - Remove some unnecessary timezone code that caused some odd behavior
+      (closes:Bug#57456).
+  * tzconfig: /etc/localtime is a file, not a link.
+  * $(libc): Pre-Depend on debianutils (>= 1.13.1) for readlink.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Fri, 18 Feb 2000 17:35:19 -0800
+
+glibc (2.1.3-3) frozen unstable; urgency=low
+
+  * The "Pain as bright as steel" release.
+  * Move iconv, locale, localedef to $(libc).
+  * Remove devpts.sh.
+  * debian/patches/po-it-po.dpatch:
+    Add "portable object" for Italian (closes:Bug#57031).
+  * $(libc): Replaces: locales (closes:Bug#57482).
+  * Add Build-Depend for gettext (closes:Bug#57797).
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Fri, 11 Feb 2000 13:02:13 -0800
+
+glibc (2.1.3-2) frozen unstable; urgency=low
+
+  * The "Dark, Naughty Evil" release.
+  * debian/patches/powerpc-linux-sys-procfs.h.dpatch:
+    Fix sys/procfs.h for powerpc-linux.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Mon,  7 Feb 2000 17:38:54 -0800
+
+glibc (2.1.3-1) frozen unstable; urgency=low
+
+  * The "From now on all of my world-killing weapons will be kept a TOTAL SECRET!" release.
+    or the "Brown Paper Bag" release.
+  * Really fix devpts.sh
+    (closes:Bug#56659,#56687,#56726,#56770,#56782,#56893,#56941,#56850,#56659,#57049,#57005,#57156,#57183).
+  * Give up and call it 2.1.3.
+  * CVS as of 2000-01-31.
+  * Move some docs from glibc-doc back to $(libc).
+  * Make /etc/init.d/devpts.sh and /etc/default/devpts conffiles (closes:Bug#57081).
+  * Re-enable libnss1-compat..
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sun,  6 Feb 2000 08:55:41 -0800
+
+glibc (2.1.2-13) frozen unstable; urgency=low
+
+  * The "@!%$&! you, I use Debian" release.
+  * debian/patches/powerpc-linux-syscalls.list-mmap64.dpatch:
+    Fix mmap and stuff (closes:Bug#56343).
+  * Add sharutils [alpha] to Build-Depends, drop gcc dep.
+  * $(libc): conflict with locales (<< 2.1.2-12).
+  * locales: replaces $(libc)-bin (closes:Bug#56540,#56536,#56534).
+  * Fix devpts.sh (closes:Bug#56487,#56507,#56559).
+  * Update to CVS as of 2000-01-29.
+  * Restore HTML to glibc-doc (closes:Bug#56609).
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sun, 30 Jan 2000 01:14:05 -0800
+
+glibc (2.1.2-12) frozen unstable; urgency=low
+
+  * The "Cardboard Messiah" release.
+  * debian/rules: Form arch_packages and indep_packages using += instead
+    of $(filter-out ...).
+  * debian/package-rules/locales.mk: Remove cross-compiling kluges.
+  * debian/package-rules/libc-dbg.mk: Fix libthread_db (closes:Bug#55439).
+  * debian/control.in/main:
+    - locales: Architecture all -> any.
+    - Build-Depends:
+      + add make (>= 3.78) due to use of new warning and error make functions.
+      + add gcc (>= 2.95.2-5) for alpha.
+  * Merge gconv-modules back into locales.
+  * Move locale and localedef programs back into locales.
+  * Put devpts.sh init script back in $(libc). (closes:Bug#50913,#53842)
+  * Add Replaces for timezones back into $(libc).
+  * Kill $(libc)-bin.
+  * Restore `tzselect' script, which slipped out of $(libc) (closes:Bug#55377)
+  * Bugs fixed in -11.0.1 (closes:Bug#53705,#53659,#53680,#53754
+  * Update to CVS as of 2000-01-26.
+  * Eliminate obsoleted patches.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Wed, 26 Jan 2000 16:44:12 -0800
+
+glibc (2.1.2-11.0.1) unstable; urgency=low
+
+  * Binary-only upload of locales.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Wed, 29 Dec 1999 11:45:56 -0800
+
+glibc (2.1.2-11) unstable; urgency=low
+
+  * The "If it ain't broke, you're not tryin'" release.
+  * Split out $(libc)-bin and libnss1-compat.
+  * Split debian/rules into debian/package-rules/*.
+    $(libc-bin):
+      - Install db_* programs as glibcdb_*.
+      - Move zic, zdump, locale, localedef, getent here.
+      - Use alternatives for db_*. (closes:Bug#50311,#50341)
+  * debian/mk/rules-* -> debian/rules.d/*.
+  * debian/<pkg> now resembles $(tmpdir) tree for <pkg>.
+  * Improve setperms rule, so debian/perms can specify fewer files.
+  * New source unpacking system, see prep.sh.
+  * Remove devpts.sh, the init script is now in sysvinit.
+  * Improve debian/libc/DEBIAN/shlibs rule (debian/rules.d/shlibs.mk).
+  * debian/sysdeps/soname.mk: Bump shlib_depend.
+  * Add sysdeps files for $(DEB_HOST_GNU_CPU).
+  * Add debian/patches/glibc-mega.dpatch:
+    Selected patches from CVS (closes:Bug#48120,#52195).
+  * Add debian/patches/linuxthreads-mega.dpatch:
+    Selected patches from CVS.
+  * Add debian/patches/alpha-pt-machine.h.dpatch:
+    Fix pt-machine.h so that linuxthreads compiles on Alpha.
+  * Add debian/patches/db2-alpha-powerpc-mutex.dpatch:
+    Alpha and PowerPC implementations for db2 spinlocks.
+    (patches by David Huggins-Daines <dhd@debian.org>)
+    (db2 patch slightly modified)
+  * Add debian/patches/powerpc-plt.dpatch:
+    1999-10-07  Geoffrey Keating  <geoffk@cygnus.com>
+      * sysdeps/powerpc/dl-machine.c: Many minor formatting changes.
+        (OPCODE_LWZU): New macro.
+        (OPCODE_ADDIS_HI): New macro.
+        (OPCODE_LIS_HI): New macro.
+        (__elf_machine_runtime_setup): Change PLT code-generation scheme
+        for thread safety even with very large PLTs, better efficiency,
+        and to fix a cache-flushing bug.
+        (__elf_machine_fixup_plt): Likewise.
+        (__process_machine_rela): Don't use elf_machine_fixup_plt.
+  * Add debian/patches/sparc64-linux-lib64.dpatch:
+    Use /lib/64 and /usr/lib/64 instead of /lib64 and /usr/lib64.
+  * Add debian/patches/sparc64-linux-execve.dpatch:
+    Add __syscall_execve to sparc64 syscalls.list.
+  * Add automatic parallel build support for SMP systems.
+  * Fix broken parsing of DEB_BUILD_OPTIONS.
+  * Add framework to build libc6-64 and libc6-64-dev packages for sparc
+    (not enabled for potato).
+  * Split locales into `locales' and `i18ndata'.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sat, 25 Dec 1999 09:54:29 -0800
+
+glibc (2.1.2-10) unstable; urgency=low
+
+  * The "Omigod! I overdosed on heroin!" release.
+  * debian/devpts.init: Create /dev/ptmx unconditionally.
+  * Restore correct nscd DEBIAN dir.
+  * Revamp rules a bit (split more parts into debian/mk/rules-*).
+  * debian/mk/sysdeps.mk: Split into pieces and include them.
+  * debian/patches/tzcode1999h.dpatch:
+    Update timezone data to 1999h release.
+  * Add stub for support for libc6-64 packages for sparc.
+  * Add one more last timezone sanity check to libc postinst (closes:Bug#49539).
+  * Always unpack linuxthreads add on and pass --enable-add-ons=crypt to
+    configure for hurd (closes:Bug#49459).
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Mon,  8 Nov 1999 09:47:28 -0800
+
+glibc (2.1.2-9) unstable; urgency=low
+
+  * The "Service with a capital 'Bugger Off'" release.
+  * debian/copyright: Update for 2.1.2.
+  * debian/rules: Make each binary package depend on setperms (closes:Bug#48914).
+  * Move debian/libc-doc to debian/glibc-doc and eliminate the need for
+    postinst and prerm to be generated files. (closes:Bug#48786).
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sun, 31 Oct 1999 09:23:16 -0800
+
+glibc (2.1.2-8) unstable; urgency=low
+
+  * The "Can't Start a Fire Without a SPARC" release.
+  * Build with unstable dpkg.
+  * debian/patches/sparc-various.dpatch: Various sparc-specific patches
+    from Jakub Jelinek <jakub@redhat.com> and David S. Miller <davem@redhat.com>.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sat, 30 Oct 1999 06:55:33 -0700
+
+glibc (2.1.2-7) unstable; urgency=high
+
+  * The "Fuck Me Harder" release.
+  * sparc-linux: Replaces: ldso (<< 1.9.11-6).
+  * debian/{libc.postinst.in,libc/prerm}: Add /usr/doc symlink stuff (closes:Bug#48324).
+  * debian/control.in-main: Adjust locales depends.
+    Correct Build-Depends: field.
+  * debian/mk/source-rules.mk: Split unpack-source, source, and orig-source
+    targets from debian/rules.
+  * debian/patches/manual-texinfo4.dpatch: Use @ifnottex instead of @ifinfo.
+  * Use makeinfo --html to generate HTML version of glibc manual.
+  * Remove texi2html from debian/scripts.
+  * Fix debian/scripts/Makefile for cross-compiling.
+  * Correct debian/patches/string2-pointer-arith.dpatch for archs that don't
+    support unaligned memory accesses.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Fri, 29 Oct 1999 09:06:27 -0700
+
+glibc (2.1.2-6) unstable; urgency=low
+
+  * The "Evil Bitch Monster of Death" release.
+  * debian/rules: Move debian/control targets to...
+    debian/mk/debian-control.mk.
+  * Move debian/*.mk to debian/mk/.
+  * Use debian/<pkg>/* for control archive items.
+    Adjust debian/rules for this.
+  * Add setperms target to set modes of debian/<pkg>/*.
+    Make unpack-source and clean depend on it.
+  * Don't compile with -g when DEB_HOST_GNU_CPU is alpha.
+  * debian/patches/string2-pointer-arith: New file.
+    Fix "/usr/include/bits/string2.h:419: warning: pointer of type `void *'
+    used in arithmetic" (closes:Bug#45824,#44491,#44697)
+  * Change maintainer back to "Joel Klecker <debian-glibc@lists.debian.org>".
+  * Update to CVS sources as of 1999-10-24.
+  * debian/patches/{linuxthreads-signals.c-ucontext,cs-po}.dpatch:
+    Fixes for source tree brokenness.
+  * Adjust clean target for new generated files.
+  * Add libresolv to $(libc)-pic.
+  * Add readlink.c and texi2html to debian/scripts to eliminate tetex-bin dependency.
+  * nscd: Install nscd_nischeck.
+    Sync nscd.init with upstream.
+  * Implement /usr/doc symlinks.
+  * $(libc): strip libpthread with --strip-debug.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sun, 24 Oct 1999 20:50:58 -0700
+
+glibc (2.1.2-5) unstable; urgency=low
+
+  * The "One more week to go" release.
+  * debian/patches/localedata-SUPPORTED:
+    Oops, this patch wasn't actually being applied.
+    eo_EO, zh_TW.Big5, and es_AR should be [back] in locales now.
+    Back out zh_CN, the definition is broken.
+  * Remove sparc from HAVE_LIBC{4,5}, we want to install our ldd.
+  * debian/patches/sparc-linux-ldd.dpatch: New file.
+    Restore missing patch (in ChangeLog, not in source).
+  * debian/sysdeps.mk: Tighten alpha shlib_depend to libc6.1 (>= 2.1.2-1).
+
+ -- Joel Klecker <espy@debian.org>  Tue, 28 Sep 1999 04:55:35 -0700
+
+glibc (2.1.2-4) unstable; urgency=low
+
+  * The "Perl Sucks" release.
+  * debian/libc.postinst: Steal updatercd shell function from sysvinit postinst.
+    Use it for devpts.sh. (closes:Bug#45867,#45879,#45880,#45885,#45895)
+    Bitch-slap perl maintainers. :)
+  * debian/rules: nscd: run nscd.conf through sed 's/adm/log/'.
+  * debian/patches/sparc-llnux-chown.dpatch: Update from Ben Collins.
+  * debian/sysdeps.mk: Drop sparc-linux depends back to libc6 (>= 2.0.105).
+
+ -- Joel Klecker <espy@debian.org>  Fri, 24 Sep 1999 12:39:26 -0700
+
+glibc (2.1.2-3) unstable; urgency=low
+
+  * The "Pot-smoking Pikachu" release.
+  * debian/rules: Don't install ldd man page on i386/m68k (closes:Bug#45421).
+    check: Don't depend on build.
+    Symlink db_dump185 manpage to db_dump manpage (closes:Bug#42322).
+    $(libc)-pic: Install map file for libm.
+      Install map files as $(libdir)/libfoo_pic.map.
+  * debian/patches/zh_TW.Big5-locale.dpatch:
+    Split into localedata-charmap-BIG5_1984 and localedata-zh_TW.Big5.
+  * debian/patches/eo_EO-locale.dpatch: Rename to...
+    localedata-eo_EO.
+  * debian/patches/localedata-SUPPORTED.dpatch: New file.
+    Add eo_EO, es_AR (closes:Bug#37162), zh_CN.GB2312 (closes:Bug#38553),
+    zh_TW.Big5.
+  * debian/patches/pthread_create-manpage.dpatch: New file.
+    Correct pthread_create manpage to match texinfo documentation
+    (closes:Bug#22119).
+
+ -- Joel Klecker <espy@debian.org>  Wed, 22 Sep 1999 19:16:01 -0700
+
+glibc (2.1.2-2) unstable; urgency=low
+
+  * The "Bite Me" release.
+  * debian/rules: $(libc): strip pt_chown.
+    Don't install ldd on i386/m68k.
+    Query dpkg-architecture variables individually.
+    Use bunzip2 -c ... | tar xf - instead of tar yxf.
+    $(libc)-pic: Add libm_pic.a.
+    check: New target; run test suite.
+    Call make with SHELL=/bin/bash, as the test suite seems to rely on
+    bash behavior.
+    Use --strip-unneeded (closes:Bug#40467).
+  * debian/sysdeps.mk: reorganize.
+  * debian/patches/generic-getenv.dpatch: New file.
+    1999-09-10  Andreas Schwab  <schwab@suse.de>
+
+      * sysdeps/generic/getenv.c (getenv): Fix lookup for single
+        character variable on bigendian platforms without unaligned memory
+        access.
+
+ -- Joel Klecker <espy@debian.org>  Thu, 16 Sep 1999 14:41:28 -0700
+
+glibc (2.1.2-1) unstable; urgency=low
+
+  * The "Gone Evil" release.
+  * glibc 2.1.2 final.
+    - Properly free mmaps for archs without spinlocks in db2 (closes:Bug#43786).
+
+  * debian/rules: configure: Fix hurd part (missing \).
+    Add frame.o hack for alpha.
+    Use CFLAGS instead of default_cflags.
+    Create srcdir for each arch.
+    Remove arch/indep patch split.
+    New directory layout (build/foo-<arch> -> build/<arch>/foo).
+    Use bz2 tarballs.
+
+  * debian/patches/sparc-linux-types.dpatch: Remove, applied upstream.
+
+  * devpts.sh never used any bashisms (closes:Bug#43296).
+
+ -- Joel Klecker <espy@debian.org>  Tue,  7 Sep 1999 05:00:58 -0700
+
+glibc (2.1.2-0pre12) unstable; urgency=low
+
+  * The "Espy's Birthday" release.
+  * debian/rules: (libc-pic) strip debugging symbols from *_pic.a.
+      interp.o is no longer needed.
+
+  * debian/patches/sparc-linux-types.dpatch: New file.
+      1999-07-25  Jakub Jelinek   <jj@ultra.linux.cz>
+
+        * sysdeps/unix/sysv/linux/sparc/bits/types.h: Define always
+          __qaddr_t.
+          __ino64_t should be 32bit unsigned type on sparc32.
+          Define __off64_t to __quad_t instead of __int64_t.
+          Make __pic_pid_t unsigned on sparc32.
+
+  * Really change maintainer name to Debian GNU C Library Maintainers.
+
+  * debian/control.in-libc: s/m@archs@/many/ (closes:Bug#43657).
+
+  * debian/devpts.init: Check if devpts is already mounted before trying
+    to mount it. (closes:Bug#43658,#43659).
+    Remove exit 0 from end (closes:Bug#42541)
+
+  * Fixed upstream: db_dump185 now linked with libdb1 (closes:Bug#42898).
+
+ -- Joel Klecker <espy@debian.org>  Sun, 29 Aug 1999 07:51:16 -0700
+
+glibc (2.1.2-0pre11) unstable; urgency=high
+
+  * The "Lesbian Seagull" release.
+  * glibc 2.1.2pre3.
+
+ -- Joel Klecker <espy@debian.org>  Wed, 25 Aug 1999 15:33:23 -0700
+
+glibc (2.1.2-0pre10) unstable; urgency=low
+
+  * The "Crack-smoking Squirrel" release.
+  * CVS as of 1999-08-21.
+  * Change maintainer name to Debian GNU C Library Maintainers.
+
+ -- Joel Klecker <espy@debian.org>  Sat, 21 Aug 1999 10:57:42 -0700
+
+glibc (2.1.2-0pre9) unstable; urgency=low
+
+  * The "Son of Drunken Iceweasel" release.
+  * Compile with gcc 2.95.1.
+  * CVS as of 1999-08-18.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Wed, 18 Aug 1999 11:11:29 -0700
+
+glibc (2.1.2-0pre8) unstable; urgency=low
+
+  * The "Drunken Iceweasel" release.
+  * Compile with gcc 2.95.1-0pre1.
+  * Remove explicit -march=i386 on i386, it's no longer needed.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sun, 15 Aug 1999 08:34:55 -0700
+
+glibc (2.1.2-0pre7) unstable; urgency=low
+
+  * The "Evil Mastermind" release.
+  * CVS as of 1999-08-09.
+  * debian/patches/arm-osabi.dpatch: "...and another patch bites the dust"
+    (functionality integrated upstream).
+  * Add -march=i386 on i386 to work around gcc lossage.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Tue, 10 Aug 1999 01:54:57 -0700
+
+glibc (2.1.2-0pre6) unstable; urgency=low
+
+  * The "Stoned Monkey" release.
+  * More adjustments for multi-arch build tree.
+  * Split patch rules into debian/patch-rules.mk.
+  * Divide patch system into indep and arch patches.
+  * Update sources to CVS as of 1999-08-08 (closes:Bug#42579,#42343).
+    - I think perhaps this will fix the StarOrifice problem too.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sun,  8 Aug 1999 21:11:12 -0700
+
+glibc (2.1.2-0pre5) unstable; urgency=low
+
+  * The "Chainsaw Psycho" release.
+  * Install zdump in $(bindir).
+  * Fix 3l33t control frags system for "weird" architectures. ;)
+  * Avoid using DEB_*_ARCH variables, for they are evil. :)
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Fri,  6 Aug 1999 05:34:55 -0700
+
+glibc (2.1.2-0pre4) unstable; urgency=low
+
+  * 2.1.2pre2.
+  * Run testsuite in build target.
+  * $(libc)-pic: Provides: glibc-pic.
+  * Logging is back.
+  * Update copyright file.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sun,  1 Aug 1999 17:58:49 -0700
+
+glibc (2.1.2-0pre3) unstable; urgency=low
+
+  * CVS as of 19990730.
+  * Implement new debian/control-frags system.
+  * $(libc)-pic is back.
+  * {gconv-modules,$(libc)-{pic,dev,dbg,prof}}:
+    doc dirs are directories again.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Fri, 30 Jul 1999 10:52:06 -0700
+
+glibc (2.1.2-0pre2) unstable; urgency=low
+
+  * debian/rules: Fix typo that prevented all the linux-specific
+    patches from being applied.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Mon, 26 Jul 1999 14:44:46 -0700
+
+glibc (2.1.2-0pre1) unstable; urgency=low
+
+  * New upstream pre-release 2.1.2pre1.
+  * debian/depflags.mk.
+    - (libc_dev_control_flags):
+      Add conflicts to alpha/i386/m68k for libncurses4-dev (<< 4.2-3.1) and
+      libreadlineg2-dev (<< 2.1-13.1).
+    - (libc_control_flags):
+      Add conflicts to alpha/i386/m68k for libglib1.2 (<< 1.2.1-2).
+  * devpts.init:
+    - Cope with EXTRAVERSION in uname -r (closes:Bug#41064,#41389).
+    - Don't worry about /dev/ptmx anymore, glibc now checks for a mounted
+      devpts filesystem as well as an existing /dev/ptmx.
+  * debian/patches/{ieee754_y0,linux-mmap64,libio-oldiopopen}.dpatch:
+    Removed; applied upstream.
+  * debian/patches/arm-{dynamiclinker,tftp}.dpatch:
+    Removed; applied upstream.
+  * debian/patches/arm-string.dpatch:
+    Remove string/endian.h part (applied upstream) and rename to arm-ieee754.
+  * Disable building of $(libc)-pic, the boot-floppies library
+    reduction hack doesn't work anyway.
+  * Adjusted rules for dpkg-architecture and reworked source unpacking
+    to handle snapshot upstream versions better.
+  * Use suidmanager for pt_chown.
+  * More fully adopt dpkg-architecture system.
+  * Correct libc.preinst for sparc.
+  * Set sparc shlib_depend to $(libc) (>= 2.1) per request.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sat, 24 Jul 1999 12:35:05 -0700
+
+glibc (2.1.1-13) unstable; urgency=low
+
+  * debian/devpts.init: Revise again.
+  * debian/rules: debian/shlibs: Add special case for libdb1.
+  * debian/sysdeps.mk: Add cflags variable and i386 hack
+    (hopefully this will allow the library to run on 386es again).
+  * Use 2.2.10 kernel headers by default on *-linux targets.
+  * Docs in /usr/share/doc.
+  * debian/control.in: Update Standards-Version to 3.0.0.
+  * debian/fhs.dpatch: Adjust for FHS 2.1pre2 /var/mail wording.
+  * debian/libc.postinst: Symlink /var/mail to /var/spool/mail.
+  * Integrate changes from Jim Pick's NMUs for arm (closes:#40927,#40479,#40691).
+  * debian/patches/ieee754_y0.dpatch: Upstream fix for yn() issue.
+  * debian/patches/linux-mmap64.dpatch: Fix for mmap64() on powerpc
+    (maybe others too).
+  * debian/patches/libio-oldiopopen.dpatch: Fix for glibc 2.0 compat popen().
+  * debian/copyright:
+    - Update URLs
+    - Add libio license
+    - s%/usr/doc/copyright%/usr/share/common-licenses%
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Wed,  7 Jul 1999 17:36:23 -0700
+
+glibc (2.1.1-12.3) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Oops, messed up tftp patch for ARM.
+
+ -- Jim Pick <jim@jimpick.com>  Wed,  7 Jul 1999 00:15:48 -0700
+
+glibc (2.1.1-12.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Another patch for ARM to fix tftp struct alignment problem.
+
+ -- Jim Pick <jim@jimpick.com>  Thu,  1 Jul 1999 09:38:02 -0700
+
+glibc (2.1.1-12.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Include patch for ARM to fix dynamic linker.
+
+ -- Jim Pick <jim@jimpick.com>  Thu, 17 Jun 1999 21:11:59 -0700
+
+glibc (2.1.1-12) unstable; urgency=low
+
+  * debian/rules: Use /var/lib/misc here too.
+  * debian/tzconfig: Fix #! line.
+  * debian/libc.postinst: Minor adjustments.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Tue, 15 Jun 1999 09:24:49 -0700
+
+glibc (2.1.1-11) unstable; urgency=low
+
+  * debian/patches/glibcbug.dpatch: New file.
+    - Fixes glibcbug to use `sensible-editor'
+  * debian/patches/fhs.dpatch: Deal with _PATH_VARDB.
+  * debian/patches/m68k-chown.dpatch: Fix paths (closes:Bug#37933).
+  * $(libc): Add HTML version of glibc FAQ.
+  * tzselect is crap, restore old version of tzconfig.
+  * Use 2.2.9 kernel headers by default on *-linux targets.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sun, 13 Jun 1999 09:34:41 -0700
+
+glibc (2.1.1-10) unstable; urgency=low
+
+  * debian/libc.postinst: Redirect stdout/stderr to /dev/null when
+    restarting services (closes:Bug#38413).
+  * debian/patches/fhs.dpatch: Alter slightly for FHS 2.1 draft.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Mon, 31 May 1999 01:45:27 -0700
+
+glibc (2.1.1-9) unstable; urgency=low
+
+  * 2.1.1 final (closes:Bug#38178).
+  * -7 was accidentally/intentionally compiled with gcc 2.95pre.
+  * -8 was a local build.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Mon, 24 May 1999 22:10:01 -0700
+
+glibc (2.1.1-8) unstable; urgency=low
+
+  * Rebuild with egcs 1.1.2.
+    (/me hides)
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sun, 23 May 1999 21:28:29 -0700
+
+glibc (2.1.1-7) unstable; urgency=low
+
+  * Make sure all patches get applied (closes:Bug#37951,Bug#37974).
+  * Fixes for m68k via Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
+    - (debian/rules): Add new m68k-chown patch (closes:Bug#38048).
+    - (debian/depflags.mk): Fix m68k case (closes:Bug#37933).
+  * There were some localedata changes in format between -5 and -6
+    (closes:Bug#37850,Bug#37822,Bug#37829).
+  * Add patch to fix install-locales target when localedata is not installed.
+  * Build locales in the `locales' target
+    (no sense building them in the arch-indep install target).
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Thu, 20 May 1999 14:02:15 -0700
+
+glibc (2.1.1-6) unstable; urgency=low
+
+  * 2.1.1pre3.
+  * (debian/rules): Set BASH and KSH to /bin/bash in configparms.
+  * (debian/libc.preinst): sparc fix (closes:Bug#37415,Bug#37616).
+  * (debian/nscd.prerm): Stop nscd before removing it (closes:Bug#37416).
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Mon, 17 May 1999 19:29:12 -0700
+
+glibc (2.1.1-5) unstable; urgency=low
+
+  * CVS as of 1999-05-08.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sat,  8 May 1999 19:31:52 -0700
+
+glibc (2.1.1-4) unstable; urgency=low
+
+  * Fix logic errors in tzconfig.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sat,  8 May 1999 00:07:44 -0700
+
+glibc (2.1.1-3) unstable; urgency=low
+
+  * 2.1.1pre2.
+  * glibc-compat 2.1.0.
+  * debian/copyright: Update URLs for upstream source locations.
+  * debian/devpts.init: Rewrite for more sensible handling of devfs.
+  * debian/libc.postinst: Be more paranoid about /etc/timezone, and
+    always remake /etc/localtime symlink.
+  * debian/sysdeps.mk: Add sparc to HAVE_LIBC4 to deal with lddlibc4.
+  * debian/rules: Don't apply sparc32-ldd patch.
+  * debian/patches/sparc32-ldd.dpatch: delete.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Fri,  7 May 1999 10:40:11 -0700
+
+glibc (2.1.1-2) unstable; urgency=low
+
+  * $(libc): replace locales << 2.1.1-1
+  * debian/depflags.mk: clean up
+  * debian/control.in: locales: remove depend on @libc@ (closes:Bug#36654).
+  * debian/devpts.sh: Remove bashisms (closes:Bug#36552).
+  * debian/libc.postinst:
+    - Use ln -sf instead of zic -l (closes:Bug#36305).
+    - If upgrading from glibc 2.0, restart services potentially affected
+      by libnss_* upgrade.
+  * debian/libc.preinst: Add kernel version sanity check for sparc.
+  * debian/rules:
+    - Fix reverse-patches target (closes:Bug#36574).
+    - Fix libexecdir handling (closes:Bug#36673).
+    - locales is binary-all, so build it in binary-indep, not binary-arch.
+  * debian/sysdeps.mk: $(shlib_depend): >= 2.0.105 for sparc.
+  * locales: Add eo_EO (Esperanto) locale definition.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Sat,  1 May 1999 22:22:22 -0700
+
+glibc (2.1.1-1) unstable; urgency=low
+
+  * Using maintainer versions now; 2.1.1 is still in pre-release.
+  * CVS as of 1999-04-19.
+  * Upgrade glibc-compat addon.
+  * Add kernel version sanity check to nscd init script.
+  * Slight tweaks to devpts.sh init script.
+  * Remove hurd-fcntl patch, it is applied upstream.
+  * Fix libc.preinst libnss code.
+  * Symlink /var/db to /var/state/glibc for backward compatibility.
+  * Add zh_TW.Big5 locale and BIG5_1984 charmap.
+  * Revert to ln -sf instead of zic -l in tzconfig (closes:Bug#36305).
+  * Add latest version of sparc32-chown patch.
+  * Move architecture-dependant parts of locales to other packages
+    and make it Architecture: all.
+  * Move locale and localedef to $(libc); and split gconv-modules into its
+    own package.
+
+ -- Joel Klecker <debian-glibc@lists.debian.org>  Tue, 20 Apr 1999 15:09:18 -0700
+
+glibc (2.1.1-0.2) unstable; urgency=low
+
+  * Upgrade to latest CVS sources.
+    - Fixes ttyname problem which affected screen (closes:Bug#35695).
+    - libio backward compatibility fixes.
+    - Many other fixes.
+  * Put manpages in /usr/share/man, info in /usr/share/info.
+  * Add devpts.sh init script and /etc/default/devpts to configure it.
+  * Better FHS compliance.
+    - /var/db -> /var/state/glibc.
+    - --libexecdir=/usr/lib (my reading of the FHS seems to allow
+      executables directly in /usr/lib).
+
+ -- Joel Klecker <espy@debian.org>  Wed,  7 Apr 1999 14:47:08 -0700
+
+glibc (2.1.1-0.1) unstable; urgency=low
+
+  * Now using NMU-style versions for prereleases.
+  * Don't start utmpd.
+  * Somehow the old nss modules (libnss_*.so.1) slipped out
+    of the last release, put them back.
+  * Let libc keep its x bit.
+    (executing it presents some interesting output)
+
+ -- Joel Klecker <espy@debian.org>  Wed, 17 Mar 1999 00:44:44 -0800
+
+glibc (2.1.1-0pre1.3) unstable; urgency=low
+
+  * Fix source package.
+  * $(libc)-dbg: Install libpthread (closes:Bug#34461).
+  * $(libc): Add note about devpts and services to postinst.
+    - Recreate databases in /var/db if upgrading from glibc 2.0.x
+      (closes:Bug#34442)
+    - i386, alpha, m68k: Conflict with libtricks, apt (<< 0.1.10.1).
+  * Change default_cflags to -O2 -g.
+  * Allow make check to fail.
+
+ -- Joel Klecker <espy@debian.org>  Sat, 13 Mar 1999 15:14:50 -0800
+
+glibc (2.1.1-0pre1.2) unstable; urgency=low
+
+  * strip shared libs with --strip-debug instead of --strip-unneeded.
+  * Loosened shlibs depend.
+
+ -- Joel Klecker <espy@debian.org>  Fri, 12 Mar 1999 22:33:01 -0800
+
+glibc (2.1.1-0pre1.1) unstable; urgency=low
+
+  * Fix $(libc) replaces on i386.
+
+ -- Joel Klecker <espy@debian.org>  Fri, 12 Mar 1999 14:47:28 -0800
+
+glibc (2.1.1-0pre1) unstable; urgency=low
+
+  * New upstream release.
+  * Really release this one to unstable.
+
+ -- Joel Klecker <espy@debian.org>  Wed, 10 Mar 1999 09:14:29 -0800
+
+glibc (2.1-4) unstable; urgency=low
+
+  * First release for unstable.
+  * Add glibc-compat addon.
+  * $(libc): Conflict with libwcsmbs
+    - Start utmpd and touch /var/run/utmpx, /var/log/wtmpx.
+  * $(libc)-dbg: Install unstripped shared libs in /usr/lib/glibc_dbg.
+  * $(libc)-prof: Strip libraries.
+  * glibc-doc: Remove cruft from top-level of info dir.
+  * Split nscd into separate package.
+  * Fixed $KERNEL_SOURCE handling.
+  * Bugs fixed: 19264, 22788, 26148, 26306, 30609, 30773, 31415
+    (will elaborate later :)
+
+ -- Joel Klecker <espy@debian.org>  Fri,  5 Mar 1999 11:29:44 -0800
+
+glibc (2.1-3) unstable; urgency=low
+
+  * (debian/depflags.mk):
+    - Correct typo
+    - Add libc_dev_control_flags for Conflicts
+
+ -- Joel Klecker <espy@debian.org>  Mon,  8 Feb 1999 03:22:27 -0800
+
+glibc (2.1-2) unstable; urgency=low
+
+  * Get shlibs file dependencies correct.
+
+ -- Joel Klecker <espy@debian.org>  Sat,  6 Feb 1999 22:56:22 -0800
+
+glibc (2.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * (debian/control.in): Update maintainer address.
+  * (debian/depflags.mk):
+    $(libc): conflict and replace timezone, timezones; replace libdb2
+  * (debian/rules):
+          $(libc)-dev: copy subdirectories from $(KERNEL_HEADERS)/linux too.
+          timezones: remove
+          $(libc): Put timezone data, and the zic and zdump utils here
+  * Sync with HURD again.
+  * Removed hurd-utimes patch, it is integrated upstream.
+
+ -- Joel Klecker <espy@debian.org>  Sat,  6 Feb 1999 12:26:10 -0800
+
--- eglibc-2.13.orig/debian/libc6-amd64.symbols.i386
+++ eglibc-2.13/debian/libc6-amd64.symbols.i386
@@ -0,0 +1,5 @@
+#include "libc6.symbols.common"
+ld-linux-x86-64.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc6.symbols.armhf
+++ eglibc-2.13/debian/libc6.symbols.armhf
@@ -0,0 +1,9 @@
+#include "libc6.symbols.common"
+ld-linux-armhf.so.3 #PACKAGE# (>= 2.13-28)
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# (>= 2.13-28)
+#include "symbols.wildcards"
+ getcontext@GLIBC_2.4 2.13-31
+ makecontext@GLIBC_2.4 2.13-31
+ setcontext@GLIBC_2.4 2.13-31
+ swapcontext@GLIBC_2.4 2.13-31
--- eglibc-2.13.orig/debian/libc6.1.symbols.ia64
+++ eglibc-2.13/debian/libc6.1.symbols.ia64
@@ -0,0 +1,59 @@
+ld-linux-ia64.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+### TLS support added/enabled in debian upload 2.3.5
+ __tls_get_addr@GLIBC_2.3 2.3.5
+libc.so.6.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+ accept4@GLIBC_2.10 2.13-25~
+libBrokenLocale.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libSegFault.so #PACKAGE# #MINVER#
+ __invoke_dynamic_linker__@Base 2.3.6
+libcidn.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libcrypt.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libdl.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libm.so.6.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libmemusage.so #PACKAGE# #MINVER#
+ __invoke_dynamic_linker__@Base 2.3.6
+ calloc@Base 2.3.6
+ free@Base 2.3.6
+ malloc@Base 2.3.6
+ mmap64@Base 2.3.6
+ mmap@Base 2.3.6
+ mremap@Base 2.3.6
+ munmap@Base 2.3.6
+ realloc@Base 2.3.6
+libnsl.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_compat.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_dns.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_files.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_hesiod.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_nis.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_nisplus.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libpcprofile.so #PACKAGE# #MINVER#
+ __cyg_profile_func_enter@Base 2.3.6
+ __cyg_profile_func_exit@Base 2.3.6
+ __invoke_dynamic_linker__@Base 2.3.6
+libresolv.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+librt.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libutil.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libanl.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libpthread.so.0 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libthread_db.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/compat
+++ eglibc-2.13/debian/compat
@@ -0,0 +1 @@
+5
--- eglibc-2.13.orig/debian/TODO
+++ eglibc-2.13/debian/TODO
@@ -0,0 +1,33 @@
+Outstanding concerns
+====================
+
+ - no entry
+
+TODO
+====
+
+* General:
+
+ - Make sure that prep.sh and version aren't in the root of the source
+   package.
+
+* libc:
+ - Only add some libraries to the optimized packages instead of all of them?
+ - Add patch to display (or ignore) linux-gate.so.1 in ldd.
+ - Check dpkg-shlibdeps for linux-gate.so.1 handling.
+ - Don't do make install for libc6-i686 if we aren't going to use the
+   results - it's very slow.
+
+* libc-dev:
+
+ - What do we do for headers on 32/64 systems?  Do we generate
+   #if wrappers for /usr/include?  This looks like a non-issue since
+   only asm needs it.
+
+* locales:
+
+ - locales debconf template is a bit difficult for newbie users.
+   Using localedata/locales/*, it can be readable.  For example,
+   "ja_JP" -> "Japanese", "Japan".
+
+
--- eglibc-2.13.orig/debian/libc6.symbols.hppa
+++ eglibc-2.13/debian/libc6.symbols.hppa
@@ -0,0 +1,35 @@
+#include "libc6.symbols.common"
+ld.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+###
+### Override headers already defined in libc6.symbols.common
+###
+# Minimal dependency set to 2.11 due to linuxthreads -> NPTL transition
+libBrokenLocale.so.1 #PACKAGE# (>= 2.11), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libSegFault.so #PACKAGE# (>= 2.11), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libcidn.so.1 #PACKAGE# (>= 2.11), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libcrypt.so.1 #PACKAGE# (>= 2.11), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libdl.so.2 #PACKAGE# (>= 2.11), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libm.so.6 #PACKAGE# (>= 2.11), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libmemusage.so #PACKAGE# (>= 2.11), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnsl.so.1 #PACKAGE# (>= 2.11), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_compat.so.2 #PACKAGE# (>= 2.11), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_dns.so.2 #PACKAGE# (>= 2.11), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_files.so.2 #PACKAGE# (>= 2.11), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_hesiod.so.2 #PACKAGE# (>= 2.11), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_nis.so.2 #PACKAGE# (>= 2.11), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/copyright
+++ eglibc-2.13/debian/copyright
@@ -0,0 +1,267 @@
+This is the Debian prepackaged version of the Embedded GNU C Library
+version 2.13.
+
+It was put together by the GNU Libc Maintainers <debian-glibc@lists.debian.org>
+from <svn://svn.eglibc.org>
+
+* Most of the GNU C library is under the following copyright:
+
+    Copyright (C) 1991,92,93,94,95,96,97,98,99,2000,2001,2002,2003,2004,2005,
+    2006,2007,2008,2009,2010,2011 Free Software Foundation, Inc.
+
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    The GNU C Library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+    02110-1301 USA
+
+  On Debian systems, the complete text of the GNU Library
+  General Public License can be found in `/usr/share/common-licenses/LGPL-2.1'.
+
+* The utilities associated with GNU C library is under the following
+  copyright:
+
+    Copyright (C) 1991,92,93,94,95,96,97,98,99,2000,2001,2002,2003,2004,2005,
+    2006,2007,2008,2009,2010,2011 Free Software Foundation, Inc.
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published
+    by the Free Software Foundation; version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software Foundation,
+    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+  On Debian systems, the complete text of the GNU Library
+  General Public License can be found in `/usr/share/common-licenses/GPL-2'.
+
+* All code incorporated from 4.4 BSD is distributed under the following
+  license:
+   
+   Copyright (C) 1991 Regents of the University of California.
+   All rights reserved.
+   
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+   
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+   2. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+   3. [This condition was removed.]
+   4. Neither the name of the University nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+   
+   THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+   SUCH DAMAGE.
+
+* The DNS resolver code, taken from BIND 4.9.5, is copyrighted both by
+  UC Berkeley and by Digital Equipment Corporation.  The DEC portions
+  are under the following license:
+    
+    Portions Copyright (C) 1993 by Digital Equipment Corporation.
+    
+    Permission to use, copy, modify, and distribute this software for any
+    purpose with or without fee is hereby granted, provided that the above
+    copyright notice and this permission notice appear in all copies, and
+    that the name of Digital Equipment Corporation not be used in
+    advertising or publicity pertaining to distribution of the document or
+    software without specific, written prior permission.
+    
+    THE SOFTWARE IS PROVIDED ``AS IS'' AND DIGITAL EQUIPMENT CORP.
+    DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL
+    DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT,
+    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+    FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+    NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+    WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+    
+* The Sun RPC support (from rpcsrc-4.0) is covered by the following
+  license:
+    
+    Copyright (c) 2010, Oracle America, Inc. 
+   
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are
+    met:
+ 
+        * Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.
+        * Redistributions in binary form must reproduce the above
+          copyright notice, this list of conditions and the following
+          disclaimer in the documentation and/or other materials
+          provided with the distribution.
+        * Neither the name of the "Oracle America, Inc." nor the names of its
+          contributors may be used to endorse or promote products derived
+          from this software without specific prior written permission.
+
+      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+      "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+      LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+      FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+      COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+      DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+      GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+      INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+      NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+      OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+    
+* The following CMU license covers some of the support code for Mach,
+  derived from Mach 3.0:
+    
+    Mach Operating System
+    Copyright (C) 1991,1990,1989 Carnegie Mellon University
+    All Rights Reserved.
+    
+    Permission to use, copy, modify and distribute this software and its
+    documentation is hereby granted, provided that both the copyright
+    notice and this permission notice appear in all copies of the
+    software, derivative works or modified versions, and any portions
+    thereof, and that both notices appear in supporting documentation.
+    
+    CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS ``AS IS''
+    CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+    ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+    
+    Carnegie Mellon requests users of this software to return to
+    
+     Software Distribution Coordinator
+     School of Computer Science
+     Carnegie Mellon University
+     Pittsburgh PA 15213-3890
+    
+    or Software.Distribution@CS.CMU.EDU any improvements or
+    extensions that they make and grant Carnegie Mellon the rights to
+    redistribute these changes.
+
+* The file if_ppp.h is under the following CMU license:
+    
+     Redistribution and use in source and binary forms, with or without
+     modification, are permitted provided that the following conditions
+     are met:
+     1. Redistributions of source code must retain the above copyright
+        notice, this list of conditions and the following disclaimer.
+     2. Redistributions in binary form must reproduce the above copyright
+        notice, this list of conditions and the following disclaimer in the
+        documentation and/or other materials provided with the distribution.
+     3. Neither the name of the University nor the names of its contributors
+        may be used to endorse or promote products derived from this software
+        without specific prior written permission.
+    
+     THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY AND
+     CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+     INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+     IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE FOR ANY
+     DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+     DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+     GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+     INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+     IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+     OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+     IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+* The following license covers the files from Intel's "Highly Optimized
+  Mathematical Functions for Itanium" collection:
+    
+    Intel License Agreement
+    
+    Copyright (c) 2000, Intel Corporation
+    
+    All rights reserved.
+    
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions are
+    met:
+    
+    * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+    
+    * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+    
+    * The name of Intel Corporation may not be used to endorse or promote
+    products derived from this software without specific prior written
+    permission.
+    
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR
+    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+* The files inet/getnameinfo.c and sysdeps/posix/getaddrinfo.c are copyright
+  (C) by Craig Metz and are distributed under the following license:
+    
+    /* The Inner Net License, Version 2.00
+    
+      The author(s) grant permission for redistribution and use in source and
+    binary forms, with or without modification, of the software and documentation
+    provided that the following conditions are met:
+    
+    0. If you receive a version of the software that is specifically labelled
+       as not being for redistribution (check the version message and/or README),
+       you are not permitted to redistribute that version of the software in any
+       way or form.
+    1. All terms of the all other applicable copyrights and licenses must be
+       followed.
+    2. Redistributions of source code must retain the authors' copyright
+       notice(s), this list of conditions, and the following disclaimer.
+    3. Redistributions in binary form must reproduce the authors' copyright
+       notice(s), this list of conditions, and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+    4. [The copyright holder has authorized the removal of this clause.]
+    5. Neither the name(s) of the author(s) nor the names of its contributors
+       may be used to endorse or promote products derived from this software
+       without specific prior written permission.
+    
+    THIS SOFTWARE IS PROVIDED BY ITS AUTHORS AND CONTRIBUTORS ``AS IS'' AND ANY
+    EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY
+    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+    ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+    
+      If these license terms cause you a real problem, contact the author.  */
+
--- eglibc-2.13.orig/debian/libc6.symbols.sparc64
+++ eglibc-2.13/debian/libc6.symbols.sparc64
@@ -0,0 +1,5 @@
+#include "libc6.symbols.common"
+ld-linux.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc0.3.symbols.hurd-i386
+++ eglibc-2.13/debian/libc0.3.symbols.hurd-i386
@@ -0,0 +1,946 @@
+ld.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.0.3 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+ *@HURD_CTHREADS_0.3 2.11
+ *@GLIBC_2.13_DEBIAN_19 2.13-19~
+ *@GLIBC_2.13_DEBIAN_31 2.13-31~
+ *@GLIBC_2.13_DEBIAN_33 2.13-33~
+libBrokenLocale.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libSegFault.so #PACKAGE# #MINVER#
+ __invoke_dynamic_linker__@Base 2.3.6
+#include "symbols.wildcards"
+libcidn.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libcrypt.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libdl.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libm.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libmemusage.so #PACKAGE# #MINVER#
+ __invoke_dynamic_linker__@Base 2.3.6
+ calloc@Base 2.3.6
+ free@Base 2.3.6
+ malloc@Base 2.3.6
+ mmap64@Base 2.3.6
+ mmap@Base 2.3.6
+ mremap@Base 2.3.6
+ munmap@Base 2.3.6
+ realloc@Base 2.3.6
+#include "symbols.wildcards"
+libnsl.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_compat.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_dns.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_files.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_hesiod.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_nis.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_nisplus.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libpcprofile.so #PACKAGE# #MINVER#
+ __cyg_profile_func_enter@Base 2.3.6
+ __cyg_profile_func_exit@Base 2.3.6
+ __invoke_dynamic_linker__@Base 2.3.6
+#include "symbols.wildcards"
+libresolv.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+librt.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libutil.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libanl.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+###
+### The symbols for libmachuser and libhurduser are not versionned and are
+### actually coming from the interface definition files in gnumach-dev and
+### hurd-dev. Thus we must keep track of which symbols were included in
+### a given Debian build, and changes here should be associated with
+### bumping the build dependency on these packages to versions which
+### provide the new symbols in their .defs files.
+###
+libhurduser.so.0.3 #PACKAGE# #MINVER#
+ _S_msg_server@Base 2.11
+ _S_msg_server_routine@Base 2.11
+ __auth_getids@Base 2.11
+ __auth_makeauth@Base 2.11
+ __auth_server_authenticate@Base 2.11
+ __auth_user_authenticate@Base 2.11
+ __crash_dump_task@Base 2.11
+ __dir_link@Base 2.11
+ __dir_lookup@Base 2.11
+ __dir_mkdir@Base 2.11
+ __dir_mkfile@Base 2.11
+ __dir_notice_changes@Base 2.11
+ __dir_readdir@Base 2.11
+ __dir_rename@Base 2.11
+ __dir_rmdir@Base 2.11
+ __dir_unlink@Base 2.11
+ __exec_exec@Base 2.11
+ __exec_exec_file_name@Base 2.13-33~
+ __exec_init@Base 2.11
+ __exec_setexecdata@Base 2.11
+ __exec_startup_get_info@Base 2.11
+ __file_chauthor@Base 2.11
+ __file_check_access@Base 2.11
+ __file_chflags@Base 2.11
+ __file_chmod@Base 2.11
+ __file_chown@Base 2.11
+ __file_exec@Base 2.11
+ __file_exec_file_name@Base 2.13-33~
+ __file_get_fs_options@Base 2.11
+ __file_get_storage_info@Base 2.11
+ __file_get_translator@Base 2.11
+ __file_get_translator_cntl@Base 2.11
+ __file_getcontrol@Base 2.11
+ __file_getfh@Base 2.11
+ __file_getlinknode@Base 2.11
+ __file_lock@Base 2.11
+ __file_lock_stat@Base 2.11
+ __file_notice_changes@Base 2.11
+ __file_reparent@Base 2.11
+ __file_set_size@Base 2.11
+ __file_set_translator@Base 2.11
+ __file_statfs@Base 2.11
+ __file_sync@Base 2.11
+ __file_syncfs@Base 2.11
+ __file_utimes@Base 2.11
+ __fsys_forward@Base 2.11
+ __fsys_get_options@Base 2.11
+ __fsys_getfile@Base 2.11
+ __fsys_getpriv@Base 2.11
+ __fsys_getroot@Base 2.11
+ __fsys_goaway@Base 2.11
+ __fsys_init@Base 2.11
+ __fsys_set_options@Base 2.11
+ __fsys_startup@Base 2.11
+ __fsys_syncfs@Base 2.11
+ __ifsock_getsockaddr@Base 2.11
+ __interrupt_operation@Base 2.11
+ __invoke_dynamic_linker__@Base 2.11
+ __io_async@Base 2.11
+ __io_clear_some_openmodes@Base 2.11
+ __io_duplicate@Base 2.11
+ __io_eofnotify@Base 2.11
+ __io_get_conch@Base 2.11
+ __io_get_icky_async_id@Base 2.11
+ __io_get_openmodes@Base 2.11
+ __io_get_owner@Base 2.11
+ __io_identity@Base 2.11
+ __io_map@Base 2.11
+ __io_map_cntl@Base 2.11
+ __io_mod_owner@Base 2.11
+ __io_pathconf@Base 2.11
+ __io_postnotify@Base 2.11
+ __io_prenotify@Base 2.11
+ __io_read@Base 2.11
+ __io_readable@Base 2.11
+ __io_readnotify@Base 2.11
+ __io_readsleep@Base 2.11
+ __io_reauthenticate@Base 2.11
+ __io_release_conch@Base 2.11
+ __io_restrict_auth@Base 2.11
+ __io_revoke@Base 2.11
+ __io_seek@Base 2.11
+ __io_select@Base 2.11
+ __io_server_version@Base 2.11
+ __io_set_all_openmodes@Base 2.11
+ __io_set_some_openmodes@Base 2.11
+ __io_sigio@Base 2.11
+ __io_stat@Base 2.11
+ __io_write@Base 2.11
+ __login_get_idle_time@Base 2.11
+ __login_get_input_devices@Base 2.11
+ __login_get_location@Base 2.11
+ __login_get_login_collection@Base 2.11
+ __login_message_user@Base 2.11
+ __msg_add_auth@Base 2.11
+ __msg_del_auth@Base 2.11
+ __msg_describe_ports@Base 2.11
+ __msg_get_dtable@Base 2.11
+ __msg_get_env_variable@Base 2.11
+ __msg_get_environment@Base 2.11
+ __msg_get_fd@Base 2.11
+ __msg_get_init_int@Base 2.11
+ __msg_get_init_ints@Base 2.11
+ __msg_get_init_port@Base 2.11
+ __msg_get_init_ports@Base 2.11
+ __msg_proc_newids@Base 2.11
+ __msg_report_wait@Base 2.11
+ __msg_set_dtable@Base 2.11
+ __msg_set_env_variable@Base 2.11
+ __msg_set_environment@Base 2.11
+ __msg_set_fd@Base 2.11
+ __msg_set_init_int@Base 2.11
+ __msg_set_init_ints@Base 2.11
+ __msg_set_init_port@Base 2.11
+ __msg_set_init_ports@Base 2.11
+ __msg_sig_post@Base 2.11
+ __msg_sig_post_reply@Base 2.11
+ __msg_sig_post_request@Base 2.11
+ __msg_sig_post_untraced@Base 2.11
+ __msg_sig_post_untraced_reply@Base 2.11
+ __msg_sig_post_untraced_request@Base 2.11
+ __password_check_group@Base 2.11
+ __password_check_user@Base 2.11
+ __pfinet_siocgifconf@Base 2.11
+ __proc_child@Base 2.11
+ __proc_child_request@Base 2.11
+ __proc_dostop@Base 2.11
+ __proc_dostop_request@Base 2.11
+ __proc_execdata_notify@Base 2.11
+ __proc_execdata_notify_request@Base 2.11
+ __proc_get_arg_locations@Base 2.11
+ __proc_get_arg_locations_request@Base 2.11
+ __proc_get_tty@Base 2.11
+ __proc_get_tty_request@Base 2.11
+ __proc_getallpids@Base 2.11
+ __proc_getallpids_request@Base 2.11
+ __proc_getexecdata@Base 2.11
+ __proc_getexecdata_request@Base 2.11
+ __proc_getlogin@Base 2.11
+ __proc_getlogin_request@Base 2.11
+ __proc_getloginid@Base 2.11
+ __proc_getloginid_request@Base 2.11
+ __proc_getloginpids@Base 2.11
+ __proc_getloginpids_request@Base 2.11
+ __proc_getmsgport@Base 2.11
+ __proc_getmsgport_request@Base 2.11
+ __proc_getnports@Base 2.11
+ __proc_getnports_request@Base 2.11
+ __proc_getpgrp@Base 2.11
+ __proc_getpgrp_request@Base 2.11
+ __proc_getpgrppids@Base 2.11
+ __proc_getpgrppids_request@Base 2.11
+ __proc_getpids@Base 2.11
+ __proc_getpids_request@Base 2.11
+ __proc_getprivports@Base 2.11
+ __proc_getprivports_request@Base 2.11
+ __proc_getprocargs@Base 2.11
+ __proc_getprocargs_request@Base 2.11
+ __proc_getprocenv@Base 2.11
+ __proc_getprocenv_request@Base 2.11
+ __proc_getprocinfo@Base 2.11
+ __proc_getprocinfo_request@Base 2.11
+ __proc_getsessionpgids@Base 2.11
+ __proc_getsessionpgids_request@Base 2.11
+ __proc_getsessionpids@Base 2.11
+ __proc_getsessionpids_request@Base 2.11
+ __proc_getsid@Base 2.11
+ __proc_getsid_request@Base 2.11
+ __proc_getsidport@Base 2.11
+ __proc_getsidport_request@Base 2.11
+ __proc_handle_exceptions@Base 2.11
+ __proc_handle_exceptions_request@Base 2.11
+ __proc_make_login_coll@Base 2.11
+ __proc_make_login_coll_request@Base 2.11
+ __proc_mark_cont@Base 2.11
+ __proc_mark_cont_request@Base 2.11
+ __proc_mark_exec@Base 2.11
+ __proc_mark_exec_request@Base 2.11
+ __proc_mark_exit@Base 2.11
+ __proc_mark_exit_request@Base 2.11
+ __proc_mark_stop@Base 2.11
+ __proc_mark_stop_request@Base 2.11
+ __proc_mark_traced@Base 2.11
+ __proc_mark_traced_request@Base 2.11
+ __proc_mod_stopchild@Base 2.11
+ __proc_mod_stopchild_request@Base 2.11
+ __proc_pid2proc@Base 2.11
+ __proc_pid2proc_request@Base 2.11
+ __proc_pid2task@Base 2.11
+ __proc_pid2task_request@Base 2.11
+ __proc_proc2task@Base 2.11
+ __proc_proc2task_request@Base 2.11
+ __proc_reassign@Base 2.11
+ __proc_reassign_request@Base 2.11
+ __proc_reauthenticate@Base 2.11
+ __proc_reauthenticate_request@Base 2.11
+ __proc_register_version@Base 2.11
+ __proc_register_version_request@Base 2.11
+ __proc_set_arg_locations@Base 2.11
+ __proc_set_arg_locations_request@Base 2.11
+ __proc_setexecdata@Base 2.11
+ __proc_setexecdata_request@Base 2.11
+ __proc_setlogin@Base 2.11
+ __proc_setlogin_request@Base 2.11
+ __proc_setmsgport@Base 2.11
+ __proc_setmsgport_request@Base 2.11
+ __proc_setowner@Base 2.11
+ __proc_setowner_request@Base 2.11
+ __proc_setpgrp@Base 2.11
+ __proc_setpgrp_request@Base 2.11
+ __proc_setsid@Base 2.11
+ __proc_setsid_request@Base 2.11
+ __proc_task2pid@Base 2.11
+ __proc_task2pid_request@Base 2.11
+ __proc_task2proc@Base 2.11
+ __proc_task2proc_request@Base 2.11
+ __proc_uname@Base 2.11
+ __proc_uname_request@Base 2.11
+ __proc_wait@Base 2.11
+ __proc_wait_request@Base 2.11
+ __socket_accept@Base 2.11
+ __socket_bind@Base 2.11
+ __socket_connect2@Base 2.11
+ __socket_connect@Base 2.11
+ __socket_create@Base 2.11
+ __socket_create_address@Base 2.11
+ __socket_fabricate_address@Base 2.11
+ __socket_getopt@Base 2.11
+ __socket_listen@Base 2.11
+ __socket_name@Base 2.11
+ __socket_peername@Base 2.11
+ __socket_recv@Base 2.11
+ __socket_send@Base 2.11
+ __socket_setopt@Base 2.11
+ __socket_shutdown@Base 2.11
+ __socket_whatis_address@Base 2.11
+ __startup_authinit@Base 2.11
+ __startup_essential_task@Base 2.11
+ __startup_procinit@Base 2.11
+ __startup_reboot@Base 2.11
+ __startup_request_notification@Base 2.11
+ __term_get_bottom_type@Base 2.11
+ __term_get_nodename@Base 2.11
+ __term_get_peername@Base 2.11
+ __term_getctty@Base 2.11
+ __term_on_hurddev@Base 2.11
+ __term_on_machdev@Base 2.11
+ __term_on_pty@Base 2.11
+ __term_open_ctty@Base 2.11
+ __term_set_filenode@Base 2.11
+ __term_set_nodename@Base 2.11
+ __termctty_open_terminal@Base 2.11
+ __tioctl_tioccbrk@Base 2.11
+ __tioctl_tioccdtr@Base 2.11
+ __tioctl_tiocdrain@Base 2.11
+ __tioctl_tiocexcl@Base 2.11
+ __tioctl_tiocext@Base 2.11
+ __tioctl_tiocflush@Base 2.11
+ __tioctl_tiocgeta@Base 2.11
+ __tioctl_tiocgetd@Base 2.11
+ __tioctl_tiocgpgrp@Base 2.11
+ __tioctl_tiocgwinsz@Base 2.11
+ __tioctl_tiocmbic@Base 2.11
+ __tioctl_tiocmbis@Base 2.11
+ __tioctl_tiocmget@Base 2.11
+ __tioctl_tiocmodg@Base 2.11
+ __tioctl_tiocmods@Base 2.11
+ __tioctl_tiocmset@Base 2.11
+ __tioctl_tiocnxcl@Base 2.11
+ __tioctl_tiocoutq@Base 2.11
+ __tioctl_tiocpkt@Base 2.11
+ __tioctl_tiocremote@Base 2.11
+ __tioctl_tiocsbrk@Base 2.11
+ __tioctl_tiocsdtr@Base 2.11
+ __tioctl_tiocseta@Base 2.11
+ __tioctl_tiocsetaf@Base 2.11
+ __tioctl_tiocsetaw@Base 2.11
+ __tioctl_tiocsetd@Base 2.11
+ __tioctl_tiocsig@Base 2.11
+ __tioctl_tiocspgrp@Base 2.11
+ __tioctl_tiocstart@Base 2.11
+ __tioctl_tiocsti@Base 2.11
+ __tioctl_tiocstop@Base 2.11
+ __tioctl_tiocswinsz@Base 2.11
+ __tioctl_tiocucntl@Base 2.11
+ _hurdsig_fault_exc_server@Base 2.11
+ _hurdsig_fault_exc_server_routine@Base 2.11
+ auth_getids@Base 2.11
+ auth_makeauth@Base 2.11
+ auth_server_authenticate@Base 2.11
+ auth_user_authenticate@Base 2.11
+ crash_dump_task@Base 2.11
+ dir_link@Base 2.11
+ dir_lookup@Base 2.11
+ dir_mkdir@Base 2.11
+ dir_mkfile@Base 2.11
+ dir_notice_changes@Base 2.11
+ dir_readdir@Base 2.11
+ dir_rename@Base 2.11
+ dir_rmdir@Base 2.11
+ dir_unlink@Base 2.11
+ exec_exec@Base 2.11
+ exec_exec_file_name@Base 2.13-33~0
+ exec_init@Base 2.11
+ exec_setexecdata@Base 2.11
+ exec_startup_get_info@Base 2.11
+ file_chauthor@Base 2.11
+ file_check_access@Base 2.11
+ file_chflags@Base 2.11
+ file_chmod@Base 2.11
+ file_chown@Base 2.11
+ file_exec@Base 2.11
+ file_exec_file_name@Base 2.13-33~0
+ file_get_fs_options@Base 2.11
+ file_get_storage_info@Base 2.11
+ file_get_translator@Base 2.11
+ file_get_translator_cntl@Base 2.11
+ file_getcontrol@Base 2.11
+ file_getfh@Base 2.11
+ file_getlinknode@Base 2.11
+ file_lock@Base 2.11
+ file_lock_stat@Base 2.11
+ file_notice_changes@Base 2.11
+ file_reparent@Base 2.11
+ file_set_size@Base 2.11
+ file_set_translator@Base 2.11
+ file_statfs@Base 2.11
+ file_sync@Base 2.11
+ file_syncfs@Base 2.11
+ file_utimes@Base 2.11
+ fsys_forward@Base 2.11
+ fsys_get_options@Base 2.11
+ fsys_getfile@Base 2.11
+ fsys_getpriv@Base 2.11
+ fsys_getroot@Base 2.11
+ fsys_goaway@Base 2.11
+ fsys_init@Base 2.11
+ fsys_set_options@Base 2.11
+ fsys_startup@Base 2.11
+ fsys_syncfs@Base 2.11
+ ifsock_getsockaddr@Base 2.11
+ interrupt_operation@Base 2.11
+ io_async@Base 2.11
+ io_clear_some_openmodes@Base 2.11
+ io_duplicate@Base 2.11
+ io_eofnotify@Base 2.11
+ io_get_conch@Base 2.11
+ io_get_icky_async_id@Base 2.11
+ io_get_openmodes@Base 2.11
+ io_get_owner@Base 2.11
+ io_identity@Base 2.11
+ io_map@Base 2.11
+ io_map_cntl@Base 2.11
+ io_mod_owner@Base 2.11
+ io_pathconf@Base 2.11
+ io_postnotify@Base 2.11
+ io_prenotify@Base 2.11
+ io_read@Base 2.11
+ io_readable@Base 2.11
+ io_readnotify@Base 2.11
+ io_readsleep@Base 2.11
+ io_reauthenticate@Base 2.11
+ io_release_conch@Base 2.11
+ io_restrict_auth@Base 2.11
+ io_revoke@Base 2.11
+ io_seek@Base 2.11
+ io_select@Base 2.11
+ io_server_version@Base 2.11
+ io_set_all_openmodes@Base 2.11
+ io_set_some_openmodes@Base 2.11
+ io_sigio@Base 2.11
+ io_stat@Base 2.11
+ io_write@Base 2.11
+ login_get_idle_time@Base 2.11
+ login_get_input_devices@Base 2.11
+ login_get_location@Base 2.11
+ login_get_login_collection@Base 2.11
+ login_message_user@Base 2.11
+ msg_add_auth@Base 2.11
+ msg_del_auth@Base 2.11
+ msg_describe_ports@Base 2.11
+ msg_get_dtable@Base 2.11
+ msg_get_env_variable@Base 2.11
+ msg_get_environment@Base 2.11
+ msg_get_fd@Base 2.11
+ msg_get_init_int@Base 2.11
+ msg_get_init_ints@Base 2.11
+ msg_get_init_port@Base 2.11
+ msg_get_init_ports@Base 2.11
+ msg_proc_newids@Base 2.11
+ msg_report_wait@Base 2.11
+ msg_set_dtable@Base 2.11
+ msg_set_env_variable@Base 2.11
+ msg_set_environment@Base 2.11
+ msg_set_fd@Base 2.11
+ msg_set_init_int@Base 2.11
+ msg_set_init_ints@Base 2.11
+ msg_set_init_port@Base 2.11
+ msg_set_init_ports@Base 2.11
+ msg_sig_post@Base 2.11
+ msg_sig_post_reply@Base 2.11
+ msg_sig_post_request@Base 2.11
+ msg_sig_post_untraced@Base 2.11
+ msg_sig_post_untraced_reply@Base 2.11
+ msg_sig_post_untraced_request@Base 2.11
+ password_check_group@Base 2.11
+ password_check_user@Base 2.11
+ pfinet_siocgifconf@Base 2.11
+ proc_child@Base 2.11
+ proc_child_request@Base 2.11
+ proc_dostop@Base 2.11
+ proc_dostop_request@Base 2.11
+ proc_execdata_notify@Base 2.11
+ proc_execdata_notify_request@Base 2.11
+ proc_get_arg_locations@Base 2.11
+ proc_get_arg_locations_request@Base 2.11
+ proc_get_tty@Base 2.11
+ proc_get_tty_request@Base 2.11
+ proc_getallpids@Base 2.11
+ proc_getallpids_request@Base 2.11
+ proc_getexecdata@Base 2.11
+ proc_getexecdata_request@Base 2.11
+ proc_getlogin@Base 2.11
+ proc_getlogin_request@Base 2.11
+ proc_getloginid@Base 2.11
+ proc_getloginid_request@Base 2.11
+ proc_getloginpids@Base 2.11
+ proc_getloginpids_request@Base 2.11
+ proc_getmsgport@Base 2.11
+ proc_getmsgport_request@Base 2.11
+ proc_getnports@Base 2.11
+ proc_getnports_request@Base 2.11
+ proc_getpgrp@Base 2.11
+ proc_getpgrp_request@Base 2.11
+ proc_getpgrppids@Base 2.11
+ proc_getpgrppids_request@Base 2.11
+ proc_getpids@Base 2.11
+ proc_getpids_request@Base 2.11
+ proc_getprivports@Base 2.11
+ proc_getprivports_request@Base 2.11
+ proc_getprocargs@Base 2.11
+ proc_getprocargs_request@Base 2.11
+ proc_getprocenv@Base 2.11
+ proc_getprocenv_request@Base 2.11
+ proc_getprocinfo@Base 2.11
+ proc_getprocinfo_request@Base 2.11
+ proc_getsessionpgids@Base 2.11
+ proc_getsessionpgids_request@Base 2.11
+ proc_getsessionpids@Base 2.11
+ proc_getsessionpids_request@Base 2.11
+ proc_getsid@Base 2.11
+ proc_getsid_request@Base 2.11
+ proc_getsidport@Base 2.11
+ proc_getsidport_request@Base 2.11
+ proc_handle_exceptions@Base 2.11
+ proc_handle_exceptions_request@Base 2.11
+ proc_make_login_coll@Base 2.11
+ proc_make_login_coll_request@Base 2.11
+ proc_mark_cont@Base 2.11
+ proc_mark_cont_request@Base 2.11
+ proc_mark_exec@Base 2.11
+ proc_mark_exec_request@Base 2.11
+ proc_mark_exit@Base 2.11
+ proc_mark_exit_request@Base 2.11
+ proc_mark_stop@Base 2.11
+ proc_mark_stop_request@Base 2.11
+ proc_mark_traced@Base 2.11
+ proc_mark_traced_request@Base 2.11
+ proc_mod_stopchild@Base 2.11
+ proc_mod_stopchild_request@Base 2.11
+ proc_pid2proc@Base 2.11
+ proc_pid2proc_request@Base 2.11
+ proc_pid2task@Base 2.11
+ proc_pid2task_request@Base 2.11
+ proc_proc2task@Base 2.11
+ proc_proc2task_request@Base 2.11
+ proc_reassign@Base 2.11
+ proc_reassign_request@Base 2.11
+ proc_reauthenticate@Base 2.11
+ proc_reauthenticate_request@Base 2.11
+ proc_register_version@Base 2.11
+ proc_register_version_request@Base 2.11
+ proc_set_arg_locations@Base 2.11
+ proc_set_arg_locations_request@Base 2.11
+ proc_setexecdata@Base 2.11
+ proc_setexecdata_request@Base 2.11
+ proc_setlogin@Base 2.11
+ proc_setlogin_request@Base 2.11
+ proc_setmsgport@Base 2.11
+ proc_setmsgport_request@Base 2.11
+ proc_setowner@Base 2.11
+ proc_setowner_request@Base 2.11
+ proc_setpgrp@Base 2.11
+ proc_setpgrp_request@Base 2.11
+ proc_setsid@Base 2.11
+ proc_setsid_request@Base 2.11
+ proc_task2pid@Base 2.11
+ proc_task2pid_request@Base 2.11
+ proc_task2proc@Base 2.11
+ proc_task2proc_request@Base 2.11
+ proc_uname@Base 2.11
+ proc_uname_request@Base 2.11
+ proc_wait@Base 2.11
+ proc_wait_request@Base 2.11
+ socket_accept@Base 2.11
+ socket_bind@Base 2.11
+ socket_connect2@Base 2.11
+ socket_connect@Base 2.11
+ socket_create@Base 2.11
+ socket_create_address@Base 2.11
+ socket_fabricate_address@Base 2.11
+ socket_getopt@Base 2.11
+ socket_listen@Base 2.11
+ socket_name@Base 2.11
+ socket_peername@Base 2.11
+ socket_recv@Base 2.11
+ socket_send@Base 2.11
+ socket_setopt@Base 2.11
+ socket_shutdown@Base 2.11
+ socket_whatis_address@Base 2.11
+ startup_authinit@Base 2.11
+ startup_essential_task@Base 2.11
+ startup_procinit@Base 2.11
+ startup_reboot@Base 2.11
+ startup_request_notification@Base 2.11
+ term_get_bottom_type@Base 2.11
+ term_get_nodename@Base 2.11
+ term_get_peername@Base 2.11
+ term_getctty@Base 2.11
+ term_on_hurddev@Base 2.11
+ term_on_machdev@Base 2.11
+ term_on_pty@Base 2.11
+ term_open_ctty@Base 2.11
+ term_set_filenode@Base 2.11
+ term_set_nodename@Base 2.11
+ termctty_open_terminal@Base 2.11
+ tioctl_tioccbrk@Base 2.11
+ tioctl_tioccdtr@Base 2.11
+ tioctl_tiocdrain@Base 2.11
+ tioctl_tiocexcl@Base 2.11
+ tioctl_tiocext@Base 2.11
+ tioctl_tiocflush@Base 2.11
+ tioctl_tiocgeta@Base 2.11
+ tioctl_tiocgetd@Base 2.11
+ tioctl_tiocgpgrp@Base 2.11
+ tioctl_tiocgwinsz@Base 2.11
+ tioctl_tiocmbic@Base 2.11
+ tioctl_tiocmbis@Base 2.11
+ tioctl_tiocmget@Base 2.11
+ tioctl_tiocmodg@Base 2.11
+ tioctl_tiocmods@Base 2.11
+ tioctl_tiocmset@Base 2.11
+ tioctl_tiocnxcl@Base 2.11
+ tioctl_tiocoutq@Base 2.11
+ tioctl_tiocpkt@Base 2.11
+ tioctl_tiocremote@Base 2.11
+ tioctl_tiocsbrk@Base 2.11
+ tioctl_tiocsdtr@Base 2.11
+ tioctl_tiocseta@Base 2.11
+ tioctl_tiocsetaf@Base 2.11
+ tioctl_tiocsetaw@Base 2.11
+ tioctl_tiocsetd@Base 2.11
+ tioctl_tiocsig@Base 2.11
+ tioctl_tiocspgrp@Base 2.11
+ tioctl_tiocstart@Base 2.11
+ tioctl_tiocsti@Base 2.11
+ tioctl_tiocstop@Base 2.11
+ tioctl_tiocswinsz@Base 2.11
+ tioctl_tiocucntl@Base 2.11
+libmachuser.so.1 #PACKAGE# #MINVER#
+ _S_exc_server@Base 2.11
+ _S_exc_server_routine@Base 2.11
+ __default_pager_info@Base 2.11
+ __default_pager_object_create@Base 2.11
+ __default_pager_object_pages@Base 2.11
+ __default_pager_objects@Base 2.11
+ __default_pager_paging_file@Base 2.11
+ __default_pager_register_fileserver@Base 2.11
+ __device_close@Base 2.11
+ __device_get_status@Base 2.11
+ __device_map@Base 2.11
+ __device_open@Base 2.11
+ __device_open_request@Base 2.11
+ __device_read@Base 2.11
+ __device_read_inband@Base 2.11
+ __device_read_request@Base 2.11
+ __device_read_request_inband@Base 2.11
+ __device_set_filter@Base 2.11
+ __device_set_status@Base 2.11
+ __device_write@Base 2.11
+ __device_write_inband@Base 2.11
+ __device_write_request@Base 2.11
+ __device_write_request_inband@Base 2.11
+ __exception_raise@Base 2.11
+ __host_adjust_time@Base 2.11
+ __host_get_boot_info@Base 2.11
+ __host_get_time@Base 2.11
+ __host_info@Base 2.11
+ __host_kernel_version@Base 2.11
+ __host_processor_set_priv@Base 2.11
+ __host_processor_sets@Base 2.11
+ __host_processors@Base 2.11
+ __host_reboot@Base 2.11
+ __host_set_time@Base 2.11
+ __i386_get_gdt@Base 2.11
+ __i386_get_ldt@Base 2.11
+ __i386_io_perm_create@Base 2.11
+ __i386_io_perm_modify@Base 2.11
+ __i386_set_gdt@Base 2.11
+ __i386_set_ldt@Base 2.11
+ __invoke_dynamic_linker__@Base 2.11
+ __mach_port_allocate_name_rpc@Base 2.11
+ __mach_port_allocate_rpc@Base 2.11
+ __mach_port_deallocate_rpc@Base 2.11
+ __mach_port_destroy@Base 2.11
+ __mach_port_extract_right@Base 2.11
+ __mach_port_get_receive_status@Base 2.11
+ __mach_port_get_refs@Base 2.11
+ __mach_port_get_set_status@Base 2.11
+ __mach_port_insert_right_rpc@Base 2.11
+ __mach_port_mod_refs@Base 2.11
+ __mach_port_move_member@Base 2.11
+ __mach_port_names@Base 2.11
+ __mach_port_rename@Base 2.11
+ __mach_port_request_notification@Base 2.11
+ __mach_port_set_mscount@Base 2.11
+ __mach_port_set_qlimit@Base 2.11
+ __mach_port_set_seqno@Base 2.11
+ __mach_port_type@Base 2.11
+ __mach_ports_lookup@Base 2.11
+ __mach_ports_register@Base 2.11
+ __memory_object_change_attributes@Base 2.11
+ __memory_object_change_completed@Base 2.11
+ __memory_object_copy@Base 2.11
+ __memory_object_create@Base 2.11
+ __memory_object_create_proxy@Base 2.11
+ __memory_object_data_error@Base 2.11
+ __memory_object_data_initialize@Base 2.11
+ __memory_object_data_provided@Base 2.11
+ __memory_object_data_request@Base 2.11
+ __memory_object_data_return@Base 2.11
+ __memory_object_data_supply@Base 2.11
+ __memory_object_data_unavailable@Base 2.11
+ __memory_object_data_unlock@Base 2.11
+ __memory_object_data_write@Base 2.11
+ __memory_object_destroy@Base 2.11
+ __memory_object_get_attributes@Base 2.11
+ __memory_object_init@Base 2.11
+ __memory_object_lock_completed@Base 2.11
+ __memory_object_lock_request@Base 2.11
+ __memory_object_ready@Base 2.11
+ __memory_object_set_attributes@Base 2.11
+ __memory_object_supply_completed@Base 2.11
+ __memory_object_terminate@Base 2.11
+ __old_mach_port_get_receive_status@Base 2.11
+ __processor_assign@Base 2.11
+ __processor_control@Base 2.11
+ __processor_exit@Base 2.11
+ __processor_get_assignment@Base 2.11
+ __processor_info@Base 2.11
+ __processor_set_create@Base 2.11
+ __processor_set_default@Base 2.11
+ __processor_set_destroy@Base 2.11
+ __processor_set_info@Base 2.11
+ __processor_set_max_priority@Base 2.11
+ __processor_set_policy_disable@Base 2.11
+ __processor_set_policy_enable@Base 2.11
+ __processor_set_tasks@Base 2.11
+ __processor_set_threads@Base 2.11
+ __processor_start@Base 2.11
+ __task_assign@Base 2.11
+ __task_assign_default@Base 2.11
+ __task_create_rpc@Base 2.11
+ __task_disable_pc_sampling@Base 2.11
+ __task_enable_pc_sampling@Base 2.11
+ __task_get_assignment@Base 2.11
+ __task_get_emulation_vector@Base 2.11
+ __task_get_sampled_pcs@Base 2.11
+ __task_get_special_port@Base 2.11
+ __task_info@Base 2.11
+ __task_priority@Base 2.11
+ __task_ras_control@Base 2.11
+ __task_resume@Base 2.11
+ __task_set_emulation@Base 2.11
+ __task_set_emulation_vector@Base 2.11
+ __task_set_special_port_rpc@Base 2.11
+ __task_suspend_rpc@Base 2.11
+ __task_terminate_rpc@Base 2.11
+ __task_threads@Base 2.11
+ __thread_abort@Base 2.11
+ __thread_assign@Base 2.11
+ __thread_assign_default@Base 2.11
+ __thread_create@Base 2.11
+ __thread_depress_abort_rpc@Base 2.11
+ __thread_disable_pc_sampling@Base 2.11
+ __thread_enable_pc_sampling@Base 2.11
+ __thread_get_assignment@Base 2.11
+ __thread_get_sampled_pcs@Base 2.11
+ __thread_get_special_port@Base 2.11
+ __thread_get_state@Base 2.11
+ __thread_info@Base 2.11
+ __thread_max_priority@Base 2.11
+ __thread_policy@Base 2.11
+ __thread_priority@Base 2.11
+ __thread_resume@Base 2.11
+ __thread_set_special_port@Base 2.11
+ __thread_set_state@Base 2.11
+ __thread_suspend@Base 2.11
+ __thread_terminate@Base 2.11
+ __thread_wire@Base 2.11
+ __vm_allocate_rpc@Base 2.11
+ __vm_cache_statistics@Base 2.13-36
+ __vm_copy@Base 2.11
+ __vm_deallocate_rpc@Base 2.11
+ __vm_inherit@Base 2.11
+ __vm_machine_attribute@Base 2.11
+ __vm_map_rpc@Base 2.11
+ __vm_protect@Base 2.11
+ __vm_read@Base 2.11
+ __vm_region@Base 2.11
+ __vm_set_default_memory_manager@Base 2.11
+ __vm_statistics@Base 2.11
+ __vm_wire@Base 2.11
+ __vm_write@Base 2.11
+ default_pager_info@Base 2.11
+ default_pager_object_create@Base 2.11
+ default_pager_object_pages@Base 2.11
+ default_pager_objects@Base 2.11
+ default_pager_paging_file@Base 2.11
+ default_pager_register_fileserver@Base 2.11
+ device_close@Base 2.11
+ device_get_status@Base 2.11
+ device_map@Base 2.11
+ device_open@Base 2.11
+ device_open_request@Base 2.11
+ device_read@Base 2.11
+ device_read_inband@Base 2.11
+ device_read_request@Base 2.11
+ device_read_request_inband@Base 2.11
+ device_set_filter@Base 2.11
+ device_set_status@Base 2.11
+ device_write@Base 2.11
+ device_write_inband@Base 2.11
+ device_write_request@Base 2.11
+ device_write_request_inband@Base 2.11
+ exception_raise@Base 2.11
+ host_adjust_time@Base 2.11
+ host_get_boot_info@Base 2.11
+ host_get_time@Base 2.11
+ host_info@Base 2.11
+ host_kernel_version@Base 2.11
+ host_processor_set_priv@Base 2.11
+ host_processor_sets@Base 2.11
+ host_processors@Base 2.11
+ host_reboot@Base 2.11
+ host_set_time@Base 2.11
+ i386_get_gdt@Base 2.11
+ i386_get_ldt@Base 2.11
+ i386_io_perm_create@Base 2.11
+ i386_io_perm_modify@Base 2.11
+ i386_set_gdt@Base 2.11
+ i386_set_ldt@Base 2.11
+ mach_port_allocate_name_rpc@Base 2.11
+ mach_port_allocate_rpc@Base 2.11
+ mach_port_deallocate_rpc@Base 2.11
+ mach_port_destroy@Base 2.11
+ mach_port_extract_right@Base 2.11
+ mach_port_get_receive_status@Base 2.11
+ mach_port_get_refs@Base 2.11
+ mach_port_get_set_status@Base 2.11
+ mach_port_insert_right_rpc@Base 2.11
+ mach_port_mod_refs@Base 2.11
+ mach_port_move_member@Base 2.11
+ mach_port_names@Base 2.11
+ mach_port_rename@Base 2.11
+ mach_port_request_notification@Base 2.11
+ mach_port_set_mscount@Base 2.11
+ mach_port_set_qlimit@Base 2.11
+ mach_port_set_seqno@Base 2.11
+ mach_port_type@Base 2.11
+ mach_ports_lookup@Base 2.11
+ mach_ports_register@Base 2.11
+ memory_object_change_attributes@Base 2.11
+ memory_object_change_completed@Base 2.11
+ memory_object_copy@Base 2.11
+ memory_object_create@Base 2.11
+ memory_object_create_proxy@Base 2.11
+ memory_object_data_error@Base 2.11
+ memory_object_data_initialize@Base 2.11
+ memory_object_data_provided@Base 2.11
+ memory_object_data_request@Base 2.11
+ memory_object_data_return@Base 2.11
+ memory_object_data_supply@Base 2.11
+ memory_object_data_unavailable@Base 2.11
+ memory_object_data_unlock@Base 2.11
+ memory_object_data_write@Base 2.11
+ memory_object_destroy@Base 2.11
+ memory_object_get_attributes@Base 2.11
+ memory_object_init@Base 2.11
+ memory_object_lock_completed@Base 2.11
+ memory_object_lock_request@Base 2.11
+ memory_object_ready@Base 2.11
+ memory_object_set_attributes@Base 2.11
+ memory_object_supply_completed@Base 2.11
+ memory_object_terminate@Base 2.11
+ old_mach_port_get_receive_status@Base 2.11
+ processor_assign@Base 2.11
+ processor_control@Base 2.11
+ processor_exit@Base 2.11
+ processor_get_assignment@Base 2.11
+ processor_info@Base 2.11
+ processor_set_create@Base 2.11
+ processor_set_default@Base 2.11
+ processor_set_destroy@Base 2.11
+ processor_set_info@Base 2.11
+ processor_set_max_priority@Base 2.11
+ processor_set_policy_disable@Base 2.11
+ processor_set_policy_enable@Base 2.11
+ processor_set_tasks@Base 2.11
+ processor_set_threads@Base 2.11
+ processor_start@Base 2.11
+ task_assign@Base 2.11
+ task_assign_default@Base 2.11
+ task_create_rpc@Base 2.11
+ task_disable_pc_sampling@Base 2.11
+ task_enable_pc_sampling@Base 2.11
+ task_get_assignment@Base 2.11
+ task_get_emulation_vector@Base 2.11
+ task_get_sampled_pcs@Base 2.11
+ task_get_special_port@Base 2.11
+ task_info@Base 2.11
+ task_priority@Base 2.11
+ task_ras_control@Base 2.11
+ task_resume@Base 2.11
+ task_set_emulation@Base 2.11
+ task_set_emulation_vector@Base 2.11
+ task_set_special_port_rpc@Base 2.11
+ task_suspend_rpc@Base 2.11
+ task_terminate_rpc@Base 2.11
+ task_threads@Base 2.11
+ thread_abort@Base 2.11
+ thread_assign@Base 2.11
+ thread_assign_default@Base 2.11
+ thread_create@Base 2.11
+ thread_depress_abort_rpc@Base 2.11
+ thread_disable_pc_sampling@Base 2.11
+ thread_enable_pc_sampling@Base 2.11
+ thread_get_assignment@Base 2.11
+ thread_get_sampled_pcs@Base 2.11
+ thread_get_special_port@Base 2.11
+ thread_get_state@Base 2.11
+ thread_info@Base 2.11
+ thread_max_priority@Base 2.11
+ thread_policy@Base 2.11
+ thread_priority@Base 2.11
+ thread_resume@Base 2.11
+ thread_set_special_port@Base 2.11
+ thread_set_state@Base 2.11
+ thread_suspend@Base 2.11
+ thread_terminate@Base 2.11
+ thread_wire@Base 2.11
+ vm_allocate_rpc@Base 2.11
+ vm_cache_statistics@Base 2.13-36
+ vm_copy@Base 2.11
+ vm_deallocate_rpc@Base 2.11
+ vm_inherit@Base 2.11
+ vm_machine_attribute@Base 2.11
+ vm_map_rpc@Base 2.11
+ vm_protect@Base 2.11
+ vm_read@Base 2.11
+ vm_region@Base 2.11
+ vm_set_default_memory_manager@Base 2.11
+ vm_statistics@Base 2.11
+ vm_wire@Base 2.11
+ vm_write@Base 2.11
+libpthread.so.0.3 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+ *@GLIBC_2.13_DEBIAN_38 2.13-38~
--- eglibc-2.13.orig/debian/symbols.wildcards
+++ eglibc-2.13/debian/symbols.wildcards
@@ -0,0 +1,31 @@
+| #PACKAGE# (>> 2.13), #PACKAGE# (<< 2.14)
+ *@GLIBC_PRIVATE 0 1
+ *@GLIBC_2.0 2.0
+ *@GLIBC_2.1 2.1
+ *@GLIBC_2.1.1 2.1.1
+ *@GLIBC_2.1.2 2.1.2
+ *@GLIBC_2.1.3 2.1.3
+ *@GLIBC_2.1.4 2.1.4
+ *@GLIBC_2.2 2.2
+ *@GLIBC_2.2.1 2.2.1
+ *@GLIBC_2.2.2 2.2.2
+ *@GLIBC_2.2.3 2.2.3
+ *@GLIBC_2.2.4 2.2.4
+ *@GLIBC_2.2.5 2.2.5
+ *@GLIBC_2.2.6 2.2.6
+ *@GLIBC_2.3 2.3
+ *@GLIBC_2.3.1 2.3.1
+ *@GLIBC_2.3.2 2.3.2
+ *@GLIBC_2.3.3 2.3.3
+ *@GLIBC_2.3.4 2.3.4
+ *@GLIBC_2.4 2.4
+ *@GLIBC_2.5 2.5
+ *@GLIBC_2.6 2.6
+ *@GLIBC_2.7 2.7
+ *@GLIBC_2.8 2.8
+ *@GLIBC_2.9 2.9
+ *@GLIBC_2.10 2.10
+ *@GLIBC_2.11 2.11
+ *@GLIBC_2.12 2.12
+ *@GLIBC_2.13 2.13
+ *@GCC_3.0 2.3.6
--- eglibc-2.13.orig/debian/quiltrc
+++ eglibc-2.13/debian/quiltrc
@@ -0,0 +1,4 @@
+QUILT_PATCHES="debian/patches"
+QUILT_PATCH_OPTS="--reject-format=unified"
+QUILT_DIFF_ARGS="--no-timestamps --no-index"
+QUILT_REFRESH_ARGS="-pab --no-timestamps --no-index --diffstat"
--- eglibc-2.13.orig/debian/changelog.upstream
+++ eglibc-2.13/debian/changelog.upstream
@@ -0,0 +1,3 @@
+The upstream changelog being composed of multiple files with a total size
+of more than 1.5MB, they are provided by the glibc-doc package in the
+/usr/share/doc/glibc-doc/ directory.
--- eglibc-2.13.orig/debian/locales-depver
+++ eglibc-2.13/debian/locales-depver
@@ -0,0 +1,25 @@
+#  When glibc is uploaded into unstable, the locales package is immediately
+#  available because it is arch:all.  But libc binary parckages are processed
+#  by autobuilders and become available later.
+#
+#  If compiling locales depend on a given version of localedef (for instance
+#  when ISO codes are updated), the idea is to first bump LOCALES_COMPAT_VER and
+#  make an upload without changing locales.  When this version is available on
+#  all architectures in unstable, locales can be modified and LOCALES_DEP_VER
+#  is bumped too.
+#
+#  LOCALES_COMPAT_VER must always contain two values during the transition phase
+#  so that dependencies in unstable can always be satisfied, and
+#  LOCALES_DEP_VER point to the highest value of LOCALES_COMPAT_VER when
+#  packages are available for all architectures in unstable.
+
+LOCALES_DEP_VER = 2.13-1
+LOCALES_COMPAT_VER = 2.13-1
+
+#  Previous versions:
+#    2.7-1: glibc 2.7
+#    2.8-1: glibc 2.8
+#    2.9-1: eglibc 2.9
+#   2.10-1: eglibc 2.10
+#   2.11-1: eglibc 2.11
+#   2.13-1: eglibc 2.13
--- eglibc-2.13.orig/debian/README
+++ eglibc-2.13/debian/README
@@ -0,0 +1,37 @@
+This directory contains the files needed to build glibc for the Debian
+GNU/Linux and GNU/Hurd distributions.
+
+If you have pulled this version from CVS, you will probably need to go
+and get the tar.bz2 files that match the file 'version'.  You can
+generally find these at sources.redhat.com in pub/libc.  Put both the
+regular glibc tar.bz2 *AND* the matching linuxthreads tar.bz2.  After
+that follow the usual build procedures.  
+
+Compiling the GNU C library yourself requires a lot of resources.  For
+a complete build using dpkg-buildpackage you need at least 750MB free
+disk space and at least 16MB of RAM and 32MB of swap space (if you
+have only that much you're better off not running X at the same
+time). Note that the C library on the Hurd is also somewhat larger:
+you'll need over 800MB of free disk space to build Hurdish packages.
+
+A complete build takes 45 minutes on a Pentium III 735Mhz machine, and
+25 minutes to run the test suite.  The cause for this is the intricate
+Makefile structure of glibc which needs a lot of computing power for
+make to figure out the automatically generated dependencies.  If you
+are building all of the optimized libraries for the IA32 family, allow
+2.5 hours for this build.
+
+For Linux, you will need at least the kernel headers for the specific
+kernel version required for your machine's architecture. These are
+specified in the `debian/sysdeps/linux.mk' file, and can be overridden
+by exporting the environment variable LINUX_SOURCE set to the path to
+the desired kernel.
+
+For the Hurd, you will need to have installed the GNU Mach and Hurd
+header files (which come with the `gnumach-dev' and `hurd-dev'
+packages).  See the Hurd source package's `INSTALL' file for more
+information.
+
+Please consider reading the `FAQ' file in this directory.  It is also
+suggested that you also read the `README' and `INSTALL' files in the
+top-level of the glibc source tree.
--- eglibc-2.13.orig/debian/libc6.1.symbols.alpha
+++ eglibc-2.13/debian/libc6.1.symbols.alpha
@@ -0,0 +1,58 @@
+ld-linux.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+### TLS support added/enabled in debian upload 2.3.5
+ __tls_get_addr@GLIBC_2.3 2.3.5
+libc.so.6.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libBrokenLocale.so.1.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libSegFault.so #PACKAGE# #MINVER#
+ __invoke_dynamic_linker__@Base 2.3.6
+libcidn.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libcrypt.so.1.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libdl.so.2.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libm.so.6.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libmemusage.so #PACKAGE# #MINVER#
+ __invoke_dynamic_linker__@Base 2.3.6
+ calloc@Base 2.3.6
+ free@Base 2.3.6
+ malloc@Base 2.3.6
+ mmap64@Base 2.3.6
+ mmap@Base 2.3.6
+ mremap@Base 2.3.6
+ munmap@Base 2.3.6
+ realloc@Base 2.3.6
+libnsl.so.1.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_compat.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_dns.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_files.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_hesiod.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_nis.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_nisplus.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libpcprofile.so #PACKAGE# #MINVER#
+ __cyg_profile_func_enter@Base 2.3.6
+ __cyg_profile_func_exit@Base 2.3.6
+ __invoke_dynamic_linker__@Base 2.3.6
+libresolv.so.2.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+librt.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libutil.so.1.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libanl.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libpthread.so.0 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libthread_db.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/README.source
+++ eglibc-2.13/debian/README.source
@@ -0,0 +1,57 @@
+This package uses quilt to manage all modifications to the upstream
+source.  Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+To configure quilt to use debian/patches instead of patches, you want
+either to export QUILT_PATCHES=debian/patches in your environment
+or use this snippet in your ~/.quiltrc:
+
+    for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do
+        if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then
+                export QUILT_PATCHES=debian/patches
+        fi
+    done
+
+To get the fully patched source after unpacking the source package, cd to
+the root level of the source package and run:
+
+    quilt push -a
+
+The last patch listed in debian/patches/series will become the current
+patch.
+
+To add a new set of changes, first run quilt push -a, and then run:
+
+    quilt new <patch>
+
+where <patch> is a descriptive name for the patch, used as the filename in
+debian/patches.  Then, for every file that will be modified by this patch,
+run:
+
+    quilt add <file>
+
+before editing those files.  You must tell quilt with quilt add what files
+will be part of the patch before making changes or quilt will not work
+properly.  After editing the files, run:
+
+    quilt refresh
+
+to save the results as a patch.
+
+Alternately, if you already have an external patch and you just want to
+add it to the build system, run quilt push -a and then:
+
+    quilt import -P <patch> /path/to/patch
+    quilt push -a
+
+(add -p 0 to quilt import if needed). <patch> as above is the filename to
+use in debian/patches.  The last quilt push -a will apply the patch to
+make sure it works properly.
+
+To remove an existing patch from the list of patches that will be applied,
+run:
+
+    quilt delete <patch>
+
+You may need to run quilt pop -a to unapply patches first before running
+this command.
--- eglibc-2.13.orig/debian/libc6-sparc64.symbols.sparc
+++ eglibc-2.13/debian/libc6-sparc64.symbols.sparc
@@ -0,0 +1,5 @@
+#include "libc6.symbols.common"
+ld-linux.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/debver2localesdep.pl
+++ eglibc-2.13/debian/debver2localesdep.pl
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+
+for my $i (0..$#ARGV) {
+    $_ = $ARGV[$i];
+    /(.*)-(.*)/m;
+
+    $debver = $1;
+    $devrev = $2;
+
+    @revs = split('\.', $devrev);
+
+    $devrev = $revs[0];
+    $devrev = "$devrev.$revs[1]" if defined($revs[1]) and $revs[1] ne "0";
+
+    print ", " if $i > 0;
+    print "glibc-$debver-$devrev";
+}
+print "\n";
--- eglibc-2.13.orig/debian/eglibc-source.filelist
+++ eglibc-2.13/debian/eglibc-source.filelist
@@ -0,0 +1,59 @@
+debian/eglibc-source.filelist
+debian/libc0.1-i386.symbols.kfreebsd-amd64
+debian/libc0.1.symbols.common
+debian/libc0.1.symbols.kfreebsd-amd64
+debian/libc0.1.symbols.kfreebsd-i386
+debian/libc6-amd64.symbols.i386
+debian/libc6-i386.symbols.amd64
+debian/libc6-mips64.symbols.mips
+debian/libc6-mips64.symbols.mipsel
+debian/libc6-mipsn32.symbols.mips
+debian/libc6-mipsn32.symbols.mipsel
+debian/libc6-ppc64.symbols.powerpc
+debian/libc6-s390x.symbols.s390
+debian/libc6-sparc64.symbols.sparc
+debian/libc6.1.symbols.alpha
+debian/libc6.1.symbols.ia64
+debian/libc6.symbols.amd64
+debian/libc6.symbols.arm
+debian/libc6.symbols.armel
+debian/libc6.symbols.armhf
+debian/libc6.symbols.common
+debian/libc6.symbols.hppa
+debian/libc6.symbols.i386
+debian/libc6.symbols.m68k
+debian/libc6.symbols.mips
+debian/libc6.symbols.mipsel
+debian/libc6.symbols.powerpc
+debian/libc6.symbols.s390
+debian/libc6.symbols.sparc
+debian/libc6.symbols.sparc64
+debian/README
+debian/README.source
+debian/TODO
+debian/bug
+debian/changelog
+debian/changelog.upstream
+debian/compat
+debian/control
+debian/control.in
+debian/copyright
+debian/debhelper.in
+debian/debver2localesdep.pl
+debian/generate-supported.mk
+debian/local
+debian/locales-depver
+debian/patches
+debian/po
+debian/quiltrc
+debian/rules
+debian/rules.d
+debian/script.in
+debian/shlibs-add-udebs
+debian/shlibver
+debian/source
+debian/symbols.wildcards
+debian/sysdeps
+debian/testsuite-checking
+debian/watch
+debian/wrapper
--- eglibc-2.13.orig/debian/libc6-mips64.symbols.mipsel
+++ eglibc-2.13/debian/libc6-mips64.symbols.mipsel
@@ -0,0 +1,5 @@
+#include "libc6.symbols.common"
+ld.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc6-ppc64.symbols.powerpc
+++ eglibc-2.13/debian/libc6-ppc64.symbols.powerpc
@@ -0,0 +1,5 @@
+#include "libc6.symbols.common"
+ld64.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc6.symbols.s390
+++ eglibc-2.13/debian/libc6.symbols.s390
@@ -0,0 +1,12 @@
+#include "libc6.symbols.common"
+ld.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+### TLS support enabled in Debian upload 2.4
+ __tls_get_offset@GLIBC_2.3 2.4
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+###
+### Override headers already defined in libc6.symbols.common
+###
+libpthread.so.0 #PACKAGE# (>= 2.4), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc0.1.symbols.kfreebsd-i386
+++ eglibc-2.13/debian/libc0.1.symbols.kfreebsd-i386
@@ -0,0 +1,3 @@
+#include "libc0.1.symbols.common"
+ld.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/control
+++ eglibc-2.13/debian/control
@@ -0,0 +1,877 @@
+Source: eglibc
+Section: libs
+Priority: required
+Build-Depends: gettext, make (>= 3.80), dpkg-dev (>= 1.16.0), bzip2, xz-utils, file, quilt,
+ autoconf, sed (>= 4.0.5-4), gawk, debhelper (>= 7.4.3), tar (>= 1.22), fdupes,
+ linux-libc-dev (>= 3.2.1) [linux-any],
+ mig (>= 1.3-2) [hurd-i386], hurd-dev (>= 20120520-2~) [hurd-i386], gnumach-dev (>= 2:1.3.99.dfsg.git20120923~) [hurd-i386],
+ kfreebsd-kernel-headers [kfreebsd-any],
+ binutils (>= 2.20-3), binutils (>= 2.21) [sparc sparc64],
+ g++-4.4 (>= 4.4.2-2) [!armhf], g++-4.6 [armhf], g++-4.4-multilib [amd64 i386 kfreebsd-amd64 mips mipsel powerpc ppc64 s390 s390x sparc]
+Build-Depends-Indep: perl, po-debconf (>= 1.0)
+Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
+Uploaders: Clint Adams <clint@debian.org>, Aurelien Jarno <aurel32@debian.org>, Adam Conrad <adconrad@0c3.net>
+Standards-Version: 3.9.3
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-glibc/glibc-package/
+Vcs-Svn: svn://svn.debian.org/pkg-glibc/glibc-package/
+Homepage: http://www.eglibc.org
+
+Package: libc-bin
+Architecture: any
+Section: libs
+Priority: required
+Essential: yes
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Breaks: libc0.1 (<< 2.10), libc0.3 (<< 2.10), libc6 (<< 2.10), libc6.1 (<< 2.10)
+Replaces: libc0.1, libc0.3, libc6, libc6.1
+Description: Embedded GNU C Library: Binaries
+ This package contains utility programs related to the GNU C Library.
+ .
+  * catchsegv: catch segmentation faults in programs
+  * getconf: query system configuration variables
+  * getent: get entries from administrative databases
+  * iconv, iconvconfig: convert between character encodings
+  * ldd, ldconfig: print/configure shared library dependencies
+  * locale, localedef: show/generate locale definitions
+  * rpcinfo: report RPC information
+  * tzselect, zdump, zic: select/dump/compile time zones
+
+Package: libc-dev-bin
+Architecture: any
+Section: libdevel
+Priority: optional
+Multi-Arch: foreign
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: manpages-dev
+Replaces: libc0.1-dev, libc0.3-dev, libc6-dev, libc6.1-dev
+Description: Embedded GNU C Library: Development binaries
+ This package contains utility programs related to the GNU C Library
+ development package.
+
+Package: glibc-doc
+Architecture: all
+Section: doc
+Priority: optional
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Suggests: glibc-doc-reference
+Description: Embedded GNU C Library: Documentation
+ Contains man pages for libpthread functions and the complete GNU C Library
+ ChangeLog.  The GNU C Library Reference manual has been moved into
+ glibc-doc-reference for licensing reasons.
+
+Package: eglibc-source
+Architecture: all
+Section: devel
+Priority: optional
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Recommends: xz-utils
+Description: Embedded GNU C Library: sources
+ This package contains the sources and patches which are needed to
+ build eglibc.
+
+Package: locales
+Architecture: all
+Section: localization
+Priority: standard
+Depends: ${locale:Depends}, ${misc:Depends}, debconf | debconf-2.0
+Conflicts: base-config, belocs-locales-bin, belocs-locales-data
+Replaces: base-config, lliurex-belocs-locales-data
+Description: Embedded GNU C Library: National Language (locale) data [support]
+ Machine-readable data files, shared objects and programs used by the
+ C library for localization (l10n) and internationalization (i18n) support.
+ .
+ This package contains the libc.mo i18n files, plus tools to generate
+ locale definitions from source files (included in this package). It
+ allows you to customize which definitions actually get
+ generated. This is a space-saver over how this package used to be,
+ with all locales generated by default. This created a package that
+ unpacked to an excess of 30 megs.
+
+Package: locales-all
+Architecture: any
+Section: localization
+Priority: extra
+Multi-Arch: foreign
+Depends: ${locale:Depends}, ${misc:Depends}
+Breaks: locales (<< 2.13-17)
+Provides: locales
+Description: Embedded GNU C Library: Precompiled locale data
+ This package contains the precompiled locale data for all supported locales.
+ A better alternative is to install the locales package and only select
+ desired locales, but it can be useful on a low-memory machine because some
+ locale files take a lot of memory to be compiled.
+
+Package: nscd
+Architecture: any
+Section: admin
+Multi-Arch: foreign
+Priority: optional
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Embedded GNU C Library: Name Service Cache Daemon
+ A daemon which handles passwd, group and host lookups
+ for running programs and caches the results for the next
+ query. You should install this package only if you use
+ slow services like LDAP, NIS or NIS+.
+
+Package: multiarch-support
+Architecture: any
+Multi-Arch: foreign
+Depends: ${misc:Depends},
+	 libc6 (>= 2.3.6-2) [!any-i386 !alpha !armhf !ia64 !hurd-any !kfreebsd-any],
+         libc6.1 (>= 2.3.6-2) [alpha ia64],
+         libc0.3 (>= 2.3.6-2) [!linux-any !kfreebsd-any !hurd-i386],
+         libc0.1 (>= 2.3.6-2) [!linux-any !hurd-any !kfreebsd-i386],
+         libc6 (>= 2.13-5) [armhf i386],
+         libc0.3 (>= 2.13-5) [hurd-i386],
+         libc0.1 (>= 2.13-5) [kfreebsd-i386],
+Priority: required
+Description: Transitional package to ensure multiarch compatibility
+ This is a transitional package used to ensure multiarch support is present
+ in ld.so before unpacking libraries to the multiarch directories.  It can
+ be removed once nothing on the system depends on it.
+
+Package: libc6
+Architecture: amd64 arm armel armhf hppa i386 m32r m68k mips mipsel powerpc powerpcspe ppc64 sparc sparc64 s390 s390x sh4
+Section: libs
+Priority: required
+Multi-Arch: same
+Depends: libc-bin (= ${binary:Version}), hurd (>= 20070606-1+SVN) [hurd-i386], libgcc1 [!hppa !m68k], libgcc2 [m68k], libgcc4 [hppa]
+Recommends: libc6-i686 [i386], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386]
+Suggests: glibc-doc, debconf | debconf-2.0, locales [!hurd-i386]
+Provides: ${locale-compat:Depends}, libc6-sparcv9b [sparc sparc64]
+Conflicts: tzdata-etch, tzdata (<< 2007k-1), prelink (<= 0.0.20090311-1)
+Breaks: nscd (<< 2.13), locales (<< 2.13), locales-all (<< 2.13), lsb-core (<= 3.2-27) [amd64 ppc64 sparc64]
+Replaces: libc6-amd64 [amd64],
+          libc6-i386 [i386],
+          libc0.1-i386 [kfreebsd-i386],
+          libc6-powerpc [powerpc],
+          libc6-ppc64 [ppc64],
+          libc6-s390x [s390x],
+          libc6-sparc64 [sparc64],
+          hurd (<< 20120408-3) [hurd-i386]
+Description: Embedded GNU C Library: Shared libraries
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C library
+ and the standard math library, as well as many others.
+
+Package: libc6-dev
+Architecture: amd64 arm armel armhf hppa i386 m32r m68k mips mipsel powerpc powerpcspe ppc64 sparc sparc64 s390 s390x sh4
+Section: libdevel
+Priority: optional
+Multi-Arch: same
+Depends: libc6 (= ${binary:Version}), libc-dev-bin (= ${binary:Version}), ${misc:Depends}, linux-libc-dev [linux-any], kfreebsd-kernel-headers (>= 0.11) [kfreebsd-any], gnumach-dev [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386]
+Replaces: hurd-dev (<< 20120408-3) [hurd-i386]
+Recommends: gcc | c-compiler
+Suggests: glibc-doc, manpages-dev
+Provides: libc-dev, libc6-dev [alpha ia64 hurd-i386 kfreebsd-i386 kfreebsd-amd64]
+Breaks: binutils (<< 2.20.1-1), binutils-gold (<< 2.20.1-11), cmake (<< 2.8.4+dfsg.1-5), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2), gcc-4.6 (<< 4.6.0-12), make (<< 3.81-8.1), pkg-config (<< 0.26-1), libjna-java (<< 3.2.7-4), liblouis-dev (<< 2.3.0-2), liblouisxml-dev (<< 2.4.0-2), libhwloc-dev (<< 1.2-3)
+Conflicts: libc6.1-dev, libc0.1-dev, libc0.3-dev,
+Description: Embedded GNU C Library: Development Libraries and Header Files
+ Contains the symlinks, headers, and object files needed to compile
+ and link programs which use the standard C library.
+
+Package: libc6-dbg
+Architecture: amd64 arm armel armhf hppa i386 m32r m68k mips mipsel powerpc powerpcspe ppc64 sparc sparc64 s390 s390x sh4
+Section: debug
+Priority: extra
+Multi-Arch: same
+Provides: libc-dbg
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: detached debugging symbols
+ This package contains the detached debugging symbols for the GNU C
+ library.
+
+Package: libc6-prof
+Architecture: amd64 arm armel armhf hppa i386 m32r m68k mips mipsel powerpc powerpcspe ppc64 sparc sparc64 s390 s390x sh4
+Section: libdevel
+Priority: extra
+Multi-Arch: same
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: Profiling Libraries
+ Static libraries compiled with profiling info (-pg) suitable for use
+ with gprof.
+
+Package: libc6-pic
+Architecture: amd64 arm armel armhf hppa i386 m32r m68k mips mipsel powerpc powerpcspe ppc64 sparc sparc64 s390 s390x sh4
+Section: libdevel
+Priority: optional
+Multi-Arch: same
+Conflicts: libc-pic
+Provides: libc-pic, glibc-pic
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: PIC archive library
+ Contains an archive library (ar file) composed of individual shared objects.
+ This is used for creating a library which is a smaller subset of the
+ standard libc shared library. The reduced library is used by debian-installer
+ and may be useful for custom installation media and in embedded systems.
+
+Package: libc6-udeb
+XC-Package-Type: udeb
+Architecture: amd64 arm armel armhf hppa i386 m32r m68k mips mipsel powerpc powerpcspe ppc64 sparc sparc64 s390 s390x sh4
+Section: debian-installer
+Priority: extra
+Provides: libc6, libc-udeb, ${locale-compat:Depends}
+Description: Embedded GNU C Library: Shared libraries - udeb
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C library
+ and the standard math library, as well as many others.
+ .
+ This package contains a minimal set of libraries needed for the Debian
+ installer.  Do not install it on a normal system.
+
+Package: libc6.1
+Architecture: alpha ia64
+Section: libs
+Priority: required
+Multi-Arch: same
+Depends: libc-bin (= ${binary:Version}), hurd (>= 20070606-1+SVN) [hurd-i386], libgcc1 [!hppa !m68k], libgcc2 [m68k], libgcc4 [hppa]
+Recommends: libc6-i686 [i386], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386]
+Suggests: glibc-doc, debconf | debconf-2.0, locales [!hurd-i386]
+Provides: ${locale-compat:Depends}, libc6-sparcv9b [sparc sparc64]
+Conflicts: tzdata-etch, tzdata (<< 2007k-1), prelink (<= 0.0.20090311-1)
+Breaks: nscd (<< 2.13), locales (<< 2.13), locales-all (<< 2.13), lsb-core (<= 3.2-27) [amd64 ppc64 sparc64]
+Replaces: libc6-amd64 [amd64],
+          libc6-i386 [i386],
+          libc0.1-i386 [kfreebsd-i386],
+          libc6-powerpc [powerpc],
+          libc6-ppc64 [ppc64],
+          libc6-s390x [s390x],
+          libc6-sparc64 [sparc64],
+          hurd (<< 20120408-3) [hurd-i386]
+Description: Embedded GNU C Library: Shared libraries
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C library
+ and the standard math library, as well as many others.
+
+Package: libc6.1-dev
+Architecture: alpha ia64
+Section: libdevel
+Priority: optional
+Multi-Arch: same
+Depends: libc6.1 (= ${binary:Version}), libc-dev-bin (= ${binary:Version}), ${misc:Depends}, linux-libc-dev [linux-any], kfreebsd-kernel-headers (>= 0.11) [kfreebsd-any], gnumach-dev [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386]
+Replaces: hurd-dev (<< 20120408-3) [hurd-i386]
+Recommends: gcc | c-compiler
+Suggests: glibc-doc, manpages-dev
+Provides: libc-dev, libc6-dev [alpha ia64 hurd-i386 kfreebsd-i386 kfreebsd-amd64]
+Breaks: binutils (<< 2.20.1-1), binutils-gold (<< 2.20.1-11), cmake (<< 2.8.4+dfsg.1-5), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2), gcc-4.6 (<< 4.6.0-12), make (<< 3.81-8.1), pkg-config (<< 0.26-1), libjna-java (<< 3.2.7-4), liblouis-dev (<< 2.3.0-2), liblouisxml-dev (<< 2.4.0-2), libhwloc-dev (<< 1.2-3)
+Conflicts: libc6-dev, libc0.1-dev, libc0.3-dev,
+Description: Embedded GNU C Library: Development Libraries and Header Files
+ Contains the symlinks, headers, and object files needed to compile
+ and link programs which use the standard C library.
+
+Package: libc6.1-dbg
+Architecture: alpha ia64
+Section: debug
+Priority: extra
+Multi-Arch: same
+Provides: libc-dbg
+Depends: libc6.1 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: detached debugging symbols
+ This package contains the detached debugging symbols for the GNU C
+ library.
+
+Package: libc6.1-prof
+Architecture: alpha ia64
+Section: libdevel
+Priority: extra
+Multi-Arch: same
+Depends: libc6.1 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: Profiling Libraries
+ Static libraries compiled with profiling info (-pg) suitable for use
+ with gprof.
+
+Package: libc6.1-pic
+Architecture: alpha ia64
+Section: libdevel
+Priority: optional
+Multi-Arch: same
+Conflicts: libc-pic
+Provides: libc-pic, glibc-pic
+Depends: libc6.1 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: PIC archive library
+ Contains an archive library (ar file) composed of individual shared objects.
+ This is used for creating a library which is a smaller subset of the
+ standard libc shared library. The reduced library is used by debian-installer
+ and may be useful for custom installation media and in embedded systems.
+
+Package: libc6.1-udeb
+XC-Package-Type: udeb
+Architecture: alpha ia64
+Section: debian-installer
+Priority: extra
+Provides: libc6.1, libc-udeb, ${locale-compat:Depends}
+Description: Embedded GNU C Library: Shared libraries - udeb
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C library
+ and the standard math library, as well as many others.
+ .
+ This package contains a minimal set of libraries needed for the Debian
+ installer.  Do not install it on a normal system.
+
+Package: libc0.3
+Architecture: hurd-i386
+Section: libs
+Priority: required
+Multi-Arch: same
+Depends: libc-bin (= ${binary:Version}), hurd (>= 20070606-1+SVN) [hurd-i386], libgcc1 [!hppa !m68k], libgcc2 [m68k], libgcc4 [hppa]
+Recommends: libc6-i686 [i386], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386]
+Suggests: glibc-doc, debconf | debconf-2.0, locales [!hurd-i386]
+Provides: ${locale-compat:Depends}, libc6-sparcv9b [sparc sparc64]
+Conflicts: tzdata-etch, tzdata (<< 2007k-1), prelink (<= 0.0.20090311-1)
+Breaks: nscd (<< 2.13), locales (<< 2.13), locales-all (<< 2.13), lsb-core (<= 3.2-27) [amd64 ppc64 sparc64]
+Replaces: libc6-amd64 [amd64],
+          libc6-i386 [i386],
+          libc0.1-i386 [kfreebsd-i386],
+          libc6-powerpc [powerpc],
+          libc6-ppc64 [ppc64],
+          libc6-s390x [s390x],
+          libc6-sparc64 [sparc64],
+          hurd (<< 20120408-3) [hurd-i386]
+Description: Embedded GNU C Library: Shared libraries
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C library
+ and the standard math library, as well as many others.
+
+Package: libc0.3-dev
+Architecture: hurd-i386
+Section: libdevel
+Priority: optional
+Multi-Arch: same
+Depends: libc0.3 (= ${binary:Version}), libc-dev-bin (= ${binary:Version}), ${misc:Depends}, linux-libc-dev [linux-any], kfreebsd-kernel-headers (>= 0.11) [kfreebsd-any], gnumach-dev [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386]
+Replaces: hurd-dev (<< 20120408-3) [hurd-i386]
+Recommends: gcc | c-compiler
+Suggests: glibc-doc, manpages-dev
+Provides: libc-dev, libc6-dev [alpha ia64 hurd-i386 kfreebsd-i386 kfreebsd-amd64]
+Breaks: binutils (<< 2.20.1-1), binutils-gold (<< 2.20.1-11), cmake (<< 2.8.4+dfsg.1-5), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2), gcc-4.6 (<< 4.6.0-12), make (<< 3.81-8.1), pkg-config (<< 0.26-1), libjna-java (<< 3.2.7-4), liblouis-dev (<< 2.3.0-2), liblouisxml-dev (<< 2.4.0-2), libhwloc-dev (<< 1.2-3)
+Conflicts: libc6-dev, libc6.1-dev, libc0.1-dev,
+Description: Embedded GNU C Library: Development Libraries and Header Files
+ Contains the symlinks, headers, and object files needed to compile
+ and link programs which use the standard C library.
+
+Package: libc0.3-dbg
+Architecture: hurd-i386
+Section: debug
+Priority: extra
+Multi-Arch: same
+Provides: libc-dbg
+Depends: libc0.3 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: detached debugging symbols
+ This package contains the detached debugging symbols for the GNU C
+ library.
+
+Package: libc0.3-prof
+Architecture: hurd-i386
+Section: libdevel
+Priority: extra
+Multi-Arch: same
+Depends: libc0.3 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: Profiling Libraries
+ Static libraries compiled with profiling info (-pg) suitable for use
+ with gprof.
+
+Package: libc0.3-pic
+Architecture: hurd-i386
+Section: libdevel
+Priority: optional
+Multi-Arch: same
+Conflicts: libc-pic
+Provides: libc-pic, glibc-pic
+Depends: libc0.3 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: PIC archive library
+ Contains an archive library (ar file) composed of individual shared objects.
+ This is used for creating a library which is a smaller subset of the
+ standard libc shared library. The reduced library is used by debian-installer
+ and may be useful for custom installation media and in embedded systems.
+
+Package: libc0.3-udeb
+XC-Package-Type: udeb
+Architecture: hurd-i386
+Section: debian-installer
+Priority: extra
+Provides: libc0.3, libc-udeb, ${locale-compat:Depends}
+Description: Embedded GNU C Library: Shared libraries - udeb
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C library
+ and the standard math library, as well as many others.
+ .
+ This package contains a minimal set of libraries needed for the Debian
+ installer.  Do not install it on a normal system.
+
+Package: libc0.1
+Architecture: kfreebsd-amd64 kfreebsd-i386
+Section: libs
+Priority: required
+Multi-Arch: same
+Depends: libc-bin (= ${binary:Version}), hurd (>= 20070606-1+SVN) [hurd-i386], libgcc1 [!hppa !m68k], libgcc2 [m68k], libgcc4 [hppa]
+Recommends: libc6-i686 [i386], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386]
+Suggests: glibc-doc, debconf | debconf-2.0, locales [!hurd-i386]
+Provides: ${locale-compat:Depends}, libc6-sparcv9b [sparc sparc64]
+Conflicts: tzdata-etch, tzdata (<< 2007k-1), prelink (<= 0.0.20090311-1)
+Breaks: nscd (<< 2.13), locales (<< 2.13), locales-all (<< 2.13), lsb-core (<= 3.2-27) [amd64 ppc64 sparc64]
+Replaces: libc6-amd64 [amd64],
+          libc6-i386 [i386],
+          libc0.1-i386 [kfreebsd-i386],
+          libc6-powerpc [powerpc],
+          libc6-ppc64 [ppc64],
+          libc6-s390x [s390x],
+          libc6-sparc64 [sparc64],
+          hurd (<< 20120408-3) [hurd-i386]
+Description: Embedded GNU C Library: Shared libraries
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C library
+ and the standard math library, as well as many others.
+
+Package: libc0.1-dev
+Architecture: kfreebsd-amd64 kfreebsd-i386
+Section: libdevel
+Priority: optional
+Multi-Arch: same
+Depends: libc0.1 (= ${binary:Version}), libc-dev-bin (= ${binary:Version}), ${misc:Depends}, linux-libc-dev [linux-any], kfreebsd-kernel-headers (>= 0.11) [kfreebsd-any], gnumach-dev [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386]
+Replaces: hurd-dev (<< 20120408-3) [hurd-i386]
+Recommends: gcc | c-compiler
+Suggests: glibc-doc, manpages-dev
+Provides: libc-dev, libc6-dev [alpha ia64 hurd-i386 kfreebsd-i386 kfreebsd-amd64]
+Breaks: binutils (<< 2.20.1-1), binutils-gold (<< 2.20.1-11), cmake (<< 2.8.4+dfsg.1-5), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2), gcc-4.6 (<< 4.6.0-12), make (<< 3.81-8.1), pkg-config (<< 0.26-1), libjna-java (<< 3.2.7-4), liblouis-dev (<< 2.3.0-2), liblouisxml-dev (<< 2.4.0-2), libhwloc-dev (<< 1.2-3)
+Conflicts: libc6-dev, libc6.1-dev, libc0.3-dev,
+Description: Embedded GNU C Library: Development Libraries and Header Files
+ Contains the symlinks, headers, and object files needed to compile
+ and link programs which use the standard C library.
+
+Package: libc0.1-dbg
+Architecture: kfreebsd-amd64 kfreebsd-i386
+Section: debug
+Priority: extra
+Multi-Arch: same
+Provides: libc-dbg
+Depends: libc0.1 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: detached debugging symbols
+ This package contains the detached debugging symbols for the GNU C
+ library.
+
+Package: libc0.1-prof
+Architecture: kfreebsd-amd64 kfreebsd-i386
+Section: libdevel
+Priority: extra
+Multi-Arch: same
+Depends: libc0.1 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: Profiling Libraries
+ Static libraries compiled with profiling info (-pg) suitable for use
+ with gprof.
+
+Package: libc0.1-pic
+Architecture: kfreebsd-amd64 kfreebsd-i386
+Section: libdevel
+Priority: optional
+Multi-Arch: same
+Conflicts: libc-pic
+Provides: libc-pic, glibc-pic
+Depends: libc0.1 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: PIC archive library
+ Contains an archive library (ar file) composed of individual shared objects.
+ This is used for creating a library which is a smaller subset of the
+ standard libc shared library. The reduced library is used by debian-installer
+ and may be useful for custom installation media and in embedded systems.
+
+Package: libc0.1-udeb
+XC-Package-Type: udeb
+Architecture: kfreebsd-amd64 kfreebsd-i386
+Section: debian-installer
+Priority: extra
+Provides: libc0.1, libc-udeb, ${locale-compat:Depends}
+Description: Embedded GNU C Library: Shared libraries - udeb
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C library
+ and the standard math library, as well as many others.
+ .
+ This package contains a minimal set of libraries needed for the Debian
+ installer.  Do not install it on a normal system.
+
+Package: libc6-i386
+Architecture: amd64
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Replaces: libc6-dev-i386
+Breaks: fakeroot (<< 1.12.3), gnu-efi (<< 3.0e-3), fakechroot (<< 2.9-1.1), fglrx-glx-ia32 (<< 1:9-6-1), ia32-libs (<< 20090804), ia32-libs-gtk (<< 20090804), lib32asound2 (<< 1.0.20-3), lib32asound2-dev (<< 1.0.20-3), lib32bz2-1.0 (<< 1.0.5-3), lib32bz2-dev (<< 1.0.5-3), lib32ffi-dev (<< 3.0.9~rc9-1), lib32ffi5 (<< 3.0.9~rc9-1), lib32g2c0 (<< 1:3.4.6-10), lib32gcc1 (<< 1:4.4.0-7), lib32gfortran3 (<< 4.4.0-7), lib32gmp3 (<< 2:4.3.1+dfsg-3), lib32gmp3-dev (<< 2:4.3.1+dfsg-3), lib32gmpxx4 (<< 2:4.3.1+dfsg-3), lib32gomp1 (<< 4.4.0-7), lib32icu-dev (<< 4.0.1-3), lib32icu40 (<< 4.0.1-3), lib32mudflap0 (<< 4.4.0-7), lib32ncurses5 (<< 5.7+20090523-1), lib32ncurses5-dev (<< 5.7+20090530-1), lib32ncursesw5 (<< 5.7+20090530-1), lib32ncursesw5-dev (<< 5.7+20090530-1), lib32nss-mdns (<< 0.10-3.1), lib32objc2 (<< 4.4.0-7), lib32readline5 (<< 5.2-5), lib32readline5-dev (<< 5.2-5), lib32stdc++6 (<< 4.4.0-7), lib32stdc++6-4.4-dbg (<< 4.4.0-7), lib32z1 (<< 1:1.2.3.3.dfsg-14), lib32z1-dev (<< 1:1.2.3.3.dfsg-14), libc6-dev-i386 (<< 2.9-15), nvidia-glx-ia32 (<< 185.18.14-2), nvidia-libvdpau1-ia32 (<< 185.18.14-2)
+Description: Embedded GNU C Library: 32-bit shared libraries for AMD64
+ This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ This is the 32bit version of the library, meant for AMD64 systems.
+
+Package: libc6-dev-i386
+Architecture: amd64
+Section: libdevel
+Priority: optional
+Provides: lib32c-dev
+Conflicts: libc6-i386 (<= 2.9-18), libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-i386 (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 32-bit development libraries for AMD64
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 32bit version of the
+ library, meant for AMD64 systems.
+
+Package: libc6-sparc64
+Architecture: sparc
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Conflicts: gcc-3.0 (<< 1:3.0.4ds3-11), libgcc1 (<< 1:3.0.4ds3-11), fakeroot (<< 0.4.5-2.7)
+Description: Embedded GNU C Library: 64bit Shared libraries for UltraSPARC
+ This package includes shared versions of the standard C library and the
+ standard math library, as well as many others. This is the 64bit version
+ of the library, meant for UltraSPARC systems.
+
+Package: libc6-dev-sparc64
+Architecture: sparc
+Section: libdevel
+Priority: optional
+Provides: lib64c-dev
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-sparc64 (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 64bit Development Libraries for UltraSPARC
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 64bit version of the
+ library, meant for UltraSPARC systems.
+
+Package: libc6-s390
+Architecture: s390x
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: 32bit Shared libraries for IBM zSeries
+ This package includes shared versions of the standard C library and the
+ standard math library, as well as many others. This is the 32bit version
+ of the library.
+
+Package: libc6-dev-s390
+Architecture: s390x
+Section: libdevel
+Priority: optional
+Provides: lib32c-dev
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-s390 (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 32bit Development Libraries for IBM zSeries
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 32bit version of the
+ library.
+
+Package: libc6-s390x
+Architecture: s390
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: 64bit Shared libraries for IBM zSeries
+ This package includes shared versions of the standard C library and the
+ standard math library, as well as many others. This is the 64bit version
+ of the library, meant for zSeries systems.
+
+Package: libc6-dev-s390x
+Architecture: s390
+Section: libdevel
+Priority: optional
+Provides: lib64c-dev
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-s390x (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 64bit Development Libraries for IBM zSeries
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 64bit version of the
+ library, meant for zSeries systems.
+
+Package: libc6-amd64
+Architecture: i386
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Conflicts: amd64-libs (<= 1.2)
+Description: Embedded GNU C Library: 64bit Shared libraries for AMD64
+ This package includes shared versions of the standard C library and the
+ standard math library, as well as many others. This is the 64bit version
+ of the library, meant for AMD64 systems.
+
+Package: libc6-dev-amd64
+Architecture: i386
+Section: libdevel
+Priority: optional
+Depends: libc6-amd64 (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: amd64-libs-dev (<= 1.2), libc6-dev (<< 2.13-11)
+Provides: lib64c-dev
+Description: Embedded GNU C Library: 64bit Development Libraries for AMD64
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 64bit version of the
+ library, meant for AMD64 systems.
+
+Package: libc6-powerpc
+Architecture: ppc64
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: 32bit powerpc shared libraries for ppc64
+ This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ This is the 32bit version of the library, meant for ppc64 systems.
+
+Package: libc6-dev-powerpc
+Architecture: ppc64
+Section: libdevel
+Priority: optional
+Provides: lib32c-dev
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-powerpc (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 32bit powerpc development libraries for ppc64
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 32bit version of the
+ library, meant for ppc64 systems.
+
+Package: libc6-ppc64
+Architecture: powerpc
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: 64bit Shared libraries for PowerPC64
+ This package includes shared versions of the standard C library and the
+ standard math library, as well as many others. This is the 64bit version
+ of the library, meant for PowerPC64 systems.
+
+Package: libc6-dev-ppc64
+Architecture: powerpc
+Section: libdevel
+Priority: optional
+Provides: lib64c-dev
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-ppc64 (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 64bit Development Libraries for PowerPC64
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 64bit version of the
+ library, meant for PowerPC64 systems.
+
+Package: libc6-mipsn32
+Architecture: mips mipsel
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: n32 Shared libraries for MIPS64
+ This package includes shared versions of the standard C library and the
+ standard math library, as well as many others. This is the n32 version
+ of the library, meant for MIPS64 systems.
+
+Package: libc6-dev-mipsn32
+Architecture: mips mipsel
+Section: libdevel
+Priority: optional
+Provides: libn32c-dev
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-mipsn32 (= ${binary:Version}), libc6-dev-mips64 (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: n32 Development Libraries for MIPS64
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the n32 version of the
+ library, meant for MIPS64 systems.
+
+Package: libc6-mips64
+Architecture: mips mipsel
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: 64bit Shared libraries for MIPS64
+ This package includes shared versions of the standard C library and the
+ standard math library, as well as many others. This is the 64bit version
+ of the library, meant for MIPS64 systems.
+
+Package: libc6-dev-mips64
+Architecture: mips mipsel
+Section: libdevel
+Priority: optional
+Provides: lib64c-dev
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-mips64 (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 64bit Development Libraries for MIPS64
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 64bit version of the
+ library, meant for MIPS64 systems.
+
+Package: libc0.1-i386
+Architecture: kfreebsd-amd64
+Section: libs
+Priority: optional
+Depends: libc0.1 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: 32bit shared libraries for AMD64
+ This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ This is the 32bit version of the library, meant for AMD64 systems.
+
+Package: libc0.1-dev-i386
+Architecture: kfreebsd-amd64
+Section: libdevel
+Priority: optional
+Provides: lib32c-dev
+Conflicts: libc0.1-dev (<< 2.13-14)
+Replaces: libc0.1-dev (<< 2.13-11)
+Depends: libc0.1-i386 (= ${binary:Version}), libc0.1-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 32bit development libraries for AMD64
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 32bit version of the
+ library, meant for AMD64 systems.
+
+Package: libc6-i686
+Architecture: i386
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc6 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries [i686 optimized]
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for i686 machines, and will only be
+ used on an i686 class CPU (check the output of `uname -m').  This includes 
+ Pentium Pro, Pentium II/III/IV, Celeron CPU's and similar class CPU's
+ (including clones such as AMD Athlon/Opteron, VIA C3 Nehemiah, but not VIA 
+ C3 Ezra).  
+
+Package: libc6-xen
+Architecture: i386
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc6 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries [Xen version]
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for the Xen hypervisor, and will be
+ selected instead when running under Xen.
+
+Package: libc0.1-i686
+Architecture: kfreebsd-i386
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc0.1 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries [i686 optimized]
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for i686 machines, and will only be
+ used on an i686 class CPU (check the output of `uname -m').  This includes 
+ Pentium Pro, Pentium II/III/IV, Celeron CPU's and similar class CPU's
+ (including clones such as AMD Athlon/Opteron, VIA C3 Nehemiah, but not VIA 
+ C3 Ezra).  
+
+Package: libc0.3-i686
+Architecture: hurd-i386
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc0.3 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries [i686 optimized]
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for i686 machines, and will only be
+ used on an i686 class CPU (check the output of `uname -m').  This includes 
+ Pentium Pro, Pentium II/III/IV, Celeron CPU's and similar class CPU's
+ (including clones such as AMD Athlon/Opteron, VIA C3 Nehemiah, but not VIA 
+ C3 Ezra).  
+
+Package: libc0.3-xen
+Architecture: hurd-i386
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc0.3 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries [Xen version]
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for the Xen hypervisor, and will be
+ selected instead when running under Xen.
+
+Package: libc6.1-alphaev67
+Architecture: alpha
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc6.1 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries (EV67 optimized)
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for the Alpha EV67. It only
+ needs to be installed on Alpha EV67/68 and EV7 machines. If you install
+ this on an older machine, it won't even be used.
+
+Package: libc6-loongson2f
+Architecture: mipsel
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc6 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries (Loongson 2F optimized)
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for the Loongson 2F. It only
+ needs to be installed on Lemote Loongson 2F machines. If you install
+ this on a non-Loongson, it won't even be used.
+
+Package: libnss-dns-udeb
+XC-Package-Type: udeb
+Architecture: any
+Section: debian-installer
+Priority: extra
+Description: Embedded GNU C Library: NSS helper for DNS - udeb
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C library
+ and the standard math library, as well as many others.
+ .
+ This package contains the DNS NSS helper needed for the Debian installer.
+ Do not install it on a normal system.
+
+Package: libnss-files-udeb
+XC-Package-Type: udeb
+Architecture: any
+Section: debian-installer
+Priority: extra
+Description: Embedded GNU C Library: NSS helper for files - udeb
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C library
+ and the standard math library, as well as many others.
+ .
+ This package contains the files NSS helper needed for the Debian installer.
+ Do not install it on a normal system.
+
--- eglibc-2.13.orig/debian/libc6-s390x.symbols.s390
+++ eglibc-2.13/debian/libc6-s390x.symbols.s390
@@ -0,0 +1,5 @@
+#include "libc6.symbols.common"
+ld64.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc6.symbols.i386
+++ eglibc-2.13/debian/libc6.symbols.i386
@@ -0,0 +1,12 @@
+#include "libc6.symbols.common"
+ld-linux.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+### TLS support enabled with Debian upload 2.3.6-6
+ __tls_get_addr@GLIBC_2.3 2.3.6-6~
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+###
+### Override headers already defined in libc6.symbols.common
+###
+libpthread.so.0 #PACKAGE# (>= 2.3.6-6~), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc0.1.symbols.common
+++ eglibc-2.13/debian/libc0.1.symbols.common
@@ -0,0 +1,58 @@
+libc.so.0.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libBrokenLocale.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libSegFault.so #PACKAGE# #MINVER#
+ __invoke_dynamic_linker__@Base 2.3.6
+#include "symbols.wildcards"
+libcidn.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libcrypt.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libdl.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libm.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libmemusage.so #PACKAGE# #MINVER#
+ __invoke_dynamic_linker__@Base 2.3.6
+ calloc@Base 2.3.6
+ free@Base 2.3.6
+ malloc@Base 2.3.6
+ mmap64@Base 2.3.6
+ mmap@Base 2.3.6
+ munmap@Base 2.3.6
+ realloc@Base 2.3.6
+#include "symbols.wildcards"
+libnsl.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_compat.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_dns.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_files.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_hesiod.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_nis.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_nisplus.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libpcprofile.so #PACKAGE# #MINVER#
+ __cyg_profile_func_enter@Base 2.3.6
+ __cyg_profile_func_exit@Base 2.3.6
+ __invoke_dynamic_linker__@Base 2.3.6
+#include "symbols.wildcards"
+libresolv.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+librt.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libutil.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libanl.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libpthread.so.0 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+ pthread_condattr_getclock@GLIBC_2.3.3 2.13-31
+ pthread_condattr_setclock@GLIBC_2.3.3 2.13-31
+libthread_db.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc6.symbols.mips
+++ eglibc-2.13/debian/libc6.symbols.mips
@@ -0,0 +1,12 @@
+#include "libc6.symbols.common"
+ld.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+### TLS support enabled in Debian upload 2.4
+ __tls_get_addr@GLIBC_2.3 2.4
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+###
+### Override headers already defined in libc6.symbols.common
+###
+libpthread.so.0 #PACKAGE# (>= 2.4), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc6.symbols.arm
+++ eglibc-2.13/debian/libc6.symbols.arm
@@ -0,0 +1,12 @@
+#include "libc6.symbols.common"
+ld-linux.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+### TLS support enabled in Debian upload 2.4
+ __tls_get_addr@GLIBC_2.3 2.4
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+###
+### Override headers already defined in libc6.symbols.common
+###
+libpthread.so.0 #PACKAGE# (>= 2.4), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc6.symbols.powerpcspe
+++ eglibc-2.13/debian/libc6.symbols.powerpcspe
@@ -0,0 +1,12 @@
+#include "libc6.symbols.common"
+ld.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+### TLS support enabled in Debian upload 2.3.5
+ __tls_get_addr@GLIBC_2.3 2.3.5
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+###
+### Override headers already defined in libc6.symbols.common
+###
+libpthread.so.0 #PACKAGE# (>= 2.3.5), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc6-mips64.symbols.mips
+++ eglibc-2.13/debian/libc6-mips64.symbols.mips
@@ -0,0 +1,5 @@
+#include "libc6.symbols.common"
+ld.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc6.symbols.mipsel
+++ eglibc-2.13/debian/libc6.symbols.mipsel
@@ -0,0 +1,12 @@
+#include "libc6.symbols.common"
+ld.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+### TLS support enabled in Debian upload 2.4
+ __tls_get_addr@GLIBC_2.3 2.4
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+###
+### Override headers already defined in libc6.symbols.common
+###
+libpthread.so.0 #PACKAGE# (>= 2.4), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc6.symbols.common
+++ eglibc-2.13/debian/libc6.symbols.common
@@ -0,0 +1,55 @@
+libBrokenLocale.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libSegFault.so #PACKAGE# #MINVER#
+ __invoke_dynamic_linker__@Base 2.3.6
+#include "symbols.wildcards"
+libcidn.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libcrypt.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libdl.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libm.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libmemusage.so #PACKAGE# #MINVER#
+ __invoke_dynamic_linker__@Base 2.3.6
+ calloc@Base 2.3.6
+ free@Base 2.3.6
+ malloc@Base 2.3.6
+ mmap64@Base 2.3.6
+ mmap@Base 2.3.6
+ mremap@Base 2.3.6
+ munmap@Base 2.3.6
+ realloc@Base 2.3.6
+#include "symbols.wildcards"
+libnsl.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_compat.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_dns.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_files.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_hesiod.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_nis.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_nisplus.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libpcprofile.so #PACKAGE# #MINVER#
+ __cyg_profile_func_enter@Base 2.3.6
+ __cyg_profile_func_exit@Base 2.3.6
+ __invoke_dynamic_linker__@Base 2.3.6
+#include "symbols.wildcards"
+libresolv.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+librt.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libutil.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libanl.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libpthread.so.0 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libthread_db.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc6.symbols.armel
+++ eglibc-2.13/debian/libc6.symbols.armel
@@ -0,0 +1,9 @@
+#include "libc6.symbols.common"
+ld-linux.so.3 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+ getcontext@GLIBC_2.4 2.13-31
+ makecontext@GLIBC_2.4 2.13-31
+ setcontext@GLIBC_2.4 2.13-31
+ swapcontext@GLIBC_2.4 2.13-31
--- eglibc-2.13.orig/debian/libc6-mipsn32.symbols.mipsel
+++ eglibc-2.13/debian/libc6-mipsn32.symbols.mipsel
@@ -0,0 +1,5 @@
+#include "libc6.symbols.common"
+ld.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc6.symbols.m68k
+++ eglibc-2.13/debian/libc6.symbols.m68k
@@ -0,0 +1,5 @@
+#include "libc6.symbols.common"
+ld.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/generate-supported.mk
+++ eglibc-2.13/debian/generate-supported.mk
@@ -0,0 +1,11 @@
+#!/usr/bin/make
+
+include $(IN)
+
+all:
+	rm -f $(OUT)
+	touch $(OUT)
+	for locale in $(SUPPORTED-LOCALES); do \
+		[ $$locale = true ] && continue; \
+		echo $$locale | sed 's,/, ,' >> $(OUT); \
+	done
--- eglibc-2.13.orig/debian/libc0.1-i386.symbols.kfreebsd-amd64
+++ eglibc-2.13/debian/libc0.1-i386.symbols.kfreebsd-amd64
@@ -0,0 +1,5 @@
+#include "libc0.1.symbols.common"
+ld.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.0.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc6-mipsn32.symbols.mips
+++ eglibc-2.13/debian/libc6-mipsn32.symbols.mips
@@ -0,0 +1,5 @@
+#include "libc6.symbols.common"
+ld.so.1 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/watch
+++ eglibc-2.13/debian/watch
@@ -0,0 +1,2 @@
+version=3
+ftp://ftp.gnu.org/gnu/glibc/glibc-([\d\.]+)\.tar\.gz debian uupdate
--- eglibc-2.13.orig/debian/rules
+++ eglibc-2.13/debian/rules
@@ -0,0 +1,208 @@
+#! /usr/bin/make -f
+# -*- makefile -*-
+# debian/rules file for GNU libc.
+# Copyright 1998, 1999 by Joel Klecker <espy@debian.org>
+# Copyright 2000 Ben Collins <bcollins@debian.org>
+# Copyright 2003 Jeff Bailey <jbailey@debian.org>
+# This Makefile is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# What are the phases to building glibc?
+
+# Unpack main tarball
+# Do any necessary overlays
+# Apply patches
+# Determine how many builds there are to do.  For Each build:
+
+#  Create build directory
+#  Configure
+#  Build
+#  Test as desired
+#  Install to package directories
+
+# Run debian magic to build packages.
+
+# Things you may need to customise:
+
+# These are done as absolute paths so that in the case of filesystem size
+# limitations, they can be overridden and spread all over.
+build-tree := build-tree
+stamp := $(CURDIR)/stamp-dir/
+DUMMY := $(shell mkdir -p $(stamp))
+
+# The minimum package version with which these packages are compatible.
+include debian/shlibver
+shlib_dep = $(libc) (>= $(shlib_dep_ver))
+
+# The version of the C library that locales needs for its format.
+include debian/locales-depver
+
+# Beyond here you shouldn't need to customise anything:
+
+export SHELL          = /bin/bash -e
+
+DEB_HOST_ARCH         ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_ARCH_OS      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+DEB_HOST_GNU_CPU      ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
+DEB_HOST_GNU_TYPE     ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_HOST_GNU_SYSTEM   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
+DEB_HOST_MULTIARCH    ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+DEB_BUILD_ARCH        ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+DEB_BUILD_GNU_CPU     ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
+DEB_BUILD_GNU_TYPE    ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_BUILD_GNU_SYSTEM  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
+
+DEB_HOST_GNU_CPU_ALT  ?=
+DEB_HOST_GNU_TYPE_ALT ?=
+
+DEB_SOURCE_PACKAGE := $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':'))
+
+DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
+EGLIBC_VERSION = $(shell echo $(DEB_VERSION) | sed -e 's/-.*//')
+
+DEB_BUILDDIR ?= $(build-tree)/$(DEB_HOST_ARCH)-$(curpass)
+
+EGLIBC_SOURCES = $(addprefix $(shell basename $(CURDIR))/, \
+		 $(filter-out debian $(shell basename $(stamp)) $(build-tree), $(wildcard *)))
+		 
+# The kernel uses different CPU appreviations (uname output) than the GNU
+# tools do (config.sub).  Map them.
+KERNEL_HOST_CPU := $(subst powerpc,ppc,$(DEB_HOST_GNU_CPU))
+
+# Support multiple makes at once based on number of processors
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+NJOBS := -j $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+endif
+
+# Default setup
+EGLIBC_PASSES ?= libc
+
+prefix=/usr
+bindir=$(prefix)/bin
+datadir=$(prefix)/share
+localedir=$(prefix)/lib/locale
+sysconfdir=/etc
+libexecdir=$(prefix)/lib
+rootsbindir=/sbin
+includedir=$(prefix)/include
+docdir=$(prefix)/share/doc
+mandir=$(prefix)/share/man
+sbindir=$(prefix)/sbin
+rtlddir=/lib
+slibdir=/lib/$(DEB_HOST_MULTIARCH)
+libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
+
+BUILD_CC = gcc
+BUILD_CXX = g++
+
+RUN_TESTSUITE = yes
+
+# Set CC and CXX for cross-compiling
+ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
+CC     = $(DEB_HOST_GNU_TYPE)-gcc$(DEB_GCC_VERSION)
+CXX    = $(DEB_HOST_GNU_TYPE)-g++$(DEB_GCC_VERSION)
+else
+DEB_GCC_VERSION ?= -4.4
+CC     = gcc$(DEB_GCC_VERSION)
+CXX    = g++$(DEB_GCC_VERSION)
+endif
+
+BUILD_CFLAGS = -O2 -g
+HOST_CFLAGS = -pipe -O2 -fstrict-aliasing -g $(call xx,extra_cflags)
+
+configure_target := $(DEB_HOST_GNU_TYPE)
+
+# Normally we'll just use this for --build.  If the architecture requires
+# that build daemons be able to run a particular optimized library, then
+# they can set the --build to match --host for that optimized build.
+# Among other things this lets tests run.
+configure_build := $(DEB_BUILD_GNU_TYPE)
+
+log_build    = $(build-tree)/log-build-$(call xx,configure_target)-$(curpass)
+log_test     = $(build-tree)/log-test-$(call xx,configure_target)-$(curpass)
+log_results  = $(build-tree)/test-results-$(call xx,configure_target)-$(curpass)
+log_expected = debian/testsuite-checking/expected-results-$(call xx,configure_target)-$(curpass)
+
+# Which build pass are we on?
+curpass = $(filter-out %_,$(subst _,_ ,$@))
+
+DEB_ARCH_REGULAR_PACKAGES = $(libc) $(libc)-dev $(libc)-dbg $(libc)-prof $(libc)-pic libc-bin libc-dev-bin multiarch-support
+DEB_INDEP_REGULAR_PACKAGES = glibc-doc eglibc-source locales
+DEB_UDEB_PACKAGES = $(libc)-udeb libnss-dns-udeb libnss-files-udeb
+
+## Locales can only be pre-generated during native compiles
+ifeq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
+DEB_ARCH_REGULAR_PACKAGES += locales-all
+endif
+
+# Generic kernel version check
+define kernel_check
+(if [ $(CURRENT_KERNEL_VERSION) -lt $(1) ]; then \
+  false; \
+fi)
+endef
+
+# Include libidn for both NPTL and LinuxThreads targets.
+standard-add-ons = libidn,
+
+# Pull in all the per-arch magic!
+
+-include debian/sysdeps/$(DEB_HOST_ARCH_OS).mk
+-include debian/sysdeps/$(DEB_HOST_ARCH).mk
+
+# Don't run dh_strip on this package
+NOSTRIP_$(libc)-dbg = 1
+
+# Don't put debug files from these packages in libc-dbg
+NODEBUG_libc-bin = 1
+NODEBUG_libc-dev-bin = 1
+NODEBUG_libc6-amd64 = 1
+NODEBUG_libc6-i386 = 1
+NODEBUG_libc6-mipsn32 = 1
+NODEBUG_libc6-powerpc = 1
+NODEBUG_libc6-ppc64 = 1
+NODEBUG_libc6-s390 = 1
+NODEBUG_libc6-s390x = 1
+NODEBUG_libc6-sparc64 = 1
+NODEBUG_libc6-mips64 = 1
+NODEBUG_nscd = 1
+
+ifeq ($(threads),yes)
+DEB_ARCH_REGULAR_PACKAGES += nscd
+endif
+
+# And now the rules...
+include debian/rules.d/*.mk
+
+clean:: unpatch
+	make -C $(CURDIR)/linuxthreads/man clean
+	make -C $(CURDIR)/debian/local/memcpy-wrapper clean
+	rm -f $(CURDIR)/po/*.mo
+	rm -rf $(patsubst %,debian/tmp-%,$(EGLIBC_PASSES))
+	rm -rf $(build-tree)
+	rm -rf $(stamp)
+	rm -rf debian/include
+
+# Required Debian targets
+build-arch: $(stamp)info \
+	$(patsubst %,$(stamp)build_%,$(EGLIBC_PASSES)) \
+	$(patsubst %,$(stamp)check_%,$(EGLIBC_PASSES))
+
+build-indep: $(stamp)source $(stamp)doc
+
+build: build-arch build-indep
+
+
+binary-indep: build-indep testroot debian/control $(build-tree) \
+	$(patsubst %,$(stamp)binaryinst_%,$(DEB_INDEP_REGULAR_PACKAGES))
+
+binary-arch: build-arch testroot debian/control $(build-tree) \
+	$(patsubst %,$(stamp)binaryinst_%,$(DEB_ARCH_REGULAR_PACKAGES)) \
+	$(patsubst %,$(stamp)binaryinst_%,$(DEB_UDEB_PACKAGES))
+
+binary: binary-indep binary-arch
+
+testroot:
+	dh_testroot
--- eglibc-2.13.orig/debian/libc6.symbols.sparc
+++ eglibc-2.13/debian/libc6.symbols.sparc
@@ -0,0 +1,50 @@
+#include "libc6.symbols.common"
+ld-linux.so.2 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+###
+### Override headers already defined in libc6.symbols.common
+###
+# Minimal dependency set to 2.6 due to SPARCV8 -> SPARCV8PLUS ABI transition
+libBrokenLocale.so.1 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libSegFault.so #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libcidn.so.1 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libcrypt.so.1 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libdl.so.2 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libm.so.6 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libmemusage.so #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+libnsl.so.1 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_compat.so.2 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_dns.so.2 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_files.so.2 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_hesiod.so.2 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_nis.so.2 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libnss_nisplus.so.2 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libpcprofile.so #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libresolv.so.2 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+librt.so.1 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libutil.so.1 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libanl.so.1 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libpthread.so.0 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libthread_db.so.1 #PACKAGE# (>= 2.6), #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/libc6-i386.symbols.amd64
+++ eglibc-2.13/debian/libc6-i386.symbols.amd64
@@ -0,0 +1,5 @@
+#include "libc6.symbols.common"
+ld-linux.so.2 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
+libc.so.6 #PACKAGE# #MINVER#
+#include "symbols.wildcards"
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-alpha-linux-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-alpha-linux-gnu-libc
@@ -0,0 +1,17 @@
+#
+# Allowed failures for alpha-linux-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-localplt.out, Error 1
+noinl-tester.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-eintr1.out, Error 1
+tst-mqueue5.out, Error 1
+tst-signal3.out, Error 1
+tst-timer.out, Error 132
+tst-timer.out, Error 139
+tst-timer4.out, Error 1
+tst-waitid.out, Error 1
+tst-writev.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-arm-linux-gnueabi-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-arm-linux-gnueabi-libc
@@ -0,0 +1,18 @@
+#
+# Allowed failures for arm-linux-gnueabi-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+bug-nextafter.out, Error 16
+bug-nexttoward.out, Error 16
+check-localplt.out, Error 1
+tst-cpuclock2.out, Error 1
+test-double.out, Error 1
+test-float.out, Error 1
+test-idouble.out, Error 1
+test-ifloat.out, Error 1
+test-misc.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-i686-gnu-xen
+++ eglibc-2.13/debian/testsuite-checking/expected-results-i686-gnu-xen
@@ -0,0 +1,87 @@
+#
+# Allowed failures for i486-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+# Need actual porting
+tst-cpucount, Error 1
+tst-cpuset.o, Error 1
+tst-cputimer1.o, Error 1
+tst-cputimer2.o, Error 1
+tst-cputimer3.o, Error 1
+tst-mqueue5.o, Error 1
+tst-pselect.o, Error 1
+tst-timer2.o, Error 1
+tst-timer4.o, Error 1
+tst-timer5.o, Error 1
+#
+# Need investigation
+annexc.out, Error 1 (ignored)
+bug-glob2.out, Error 1
+bug-regex31-mem, Error 1
+bug-ulimit1.out, Error 1
+check-execstack.out, Error 1
+check-local-headers.out, Error 1
+check-localplt.out, Error 1
+check-textrel.out, Error 1
+libnss_test1.so, Error 1
+mtrace-tst-loading, Error 1
+opendir-tst1.out, Error 1
+test-assert-perr.out, Error 1
+test-assert.out, Error 1
+test-fenv.out, Error 1
+test-idouble.out, Error 139
+test-ifaddrs.out, Error 1
+test-ifloat.out, Error 139
+test-lfs.out, Error 1
+test-memmem, Error 1
+test-strnlen, Error 1
+tst-aio10.out, Error 1
+tst-aio2.o, Error 1
+tst-aio3.o, Error 1
+tst-aio8.out, Error 1
+tst-aio9.out, Error 1
+tst-atime.out, Error 1
+tst-audit1.out, Error 137
+tst-audit2.out, Error 137
+tst-chk1.out, Error 1
+tst-chk2.out, Error 1
+tst-chk3.out, Error 1
+tst-chk4.out, Error 1
+tst-chk5.out, Error 1
+tst-chk6.out, Error 1
+tst-clock_nanosleep.out, Error 1
+tst-dlmopen1.out, Error 1
+tst-error1-mem, Error 1
+tst-fdopendir2.out, Error 1
+tst-fdopendir.out, Error 1
+tst-fnmatch-mem, Error 1
+tst-fopenloc.check, Error 1
+tst-futimesat.out, Error 1
+tst-getconf.out, Error 3
+tst-gettext.out, Error 1
+tst-grantpt.out, Error 1
+tst-lfschk1.out, Error 1
+tst-lfschk2.out, Error 1
+tst-lfschk3.out, Error 1
+tst-lfschk4.out, Error 1
+tst-lfschk5.out, Error 1
+tst-lfschk6.out, Error 1
+tst-longjmp_chk2.out, Error 1
+tst-mknodat.out, Error 1
+tst-renameat.out, Error 1
+tst-sprofil.out, Error 136
+tst-stackguard1-static.out, Error 1
+tst-stackguard1.out, Error 1
+tst-sysconf.out, Error 1
+tst-timer.out, Error 1
+tst-tls18.out, Error 1
+tst-tls9-static.out, Error 1
+tst-unique1.out, Error 1
+tst-unique2.out, Error 127
+tst-vfork3-mem, Error 1
+tst-waitid.out, Error 1
+tststatic.out, Error 139
+tststatic2.out, Error 139
+# happens seldomly
+tst-nanosleep.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-s390x-linux-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-s390x-linux-gnu-libc
@@ -0,0 +1,14 @@
+#
+# Allowed failures for s390x-linux-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+bug22.out, Error 1
+check-localplt.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-robust8.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
+tst-writev.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-x86_64-kfreebsd-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-x86_64-kfreebsd-gnu-libc
@@ -0,0 +1,18 @@
+#
+# Allowed failures for x86_64-kfreebsd-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-localplt.out, Error 1
+tst-aio10.out, Error 1
+tst-aio4.out, Error 1
+tst-aio9.out, Error 1
+tst-clock1.out, Error 1
+tst-cputimer2.out, Error 1
+tst-longjmp_chk.out, Error 1
+tst-mknodat.out, Error 1
+tst-renameat.out, Error 1
+tst-timer4.out, Error 1
+tst-waitid.out, Error 1
+tst-writev.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-mipsel-linux-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-mipsel-linux-gnu-libc
@@ -0,0 +1,19 @@
+#
+# Allowed failures for mipsel-linux-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-execstack.out, Error 1
+check-localplt.out, Error 1
+test-fenv.out, Error 1
+tst-audit1.out, Error 127
+tst-audit2.out, Error 127
+tst-backtrace1.out, Error 1
+tst-backtrace2.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-tls2.out, Error 1
+tst-tls3.out, Error 1
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-s390x-linux-gnu-s390x
+++ eglibc-2.13/debian/testsuite-checking/expected-results-s390x-linux-gnu-s390x
@@ -0,0 +1,14 @@
+#
+# Allowed failures for s390x-linux-gnu-s390x and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+bug22.out, Error 1
+check-localplt.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-robust8.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
+tst-writev.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-i486-kfreebsd-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-i486-kfreebsd-gnu-libc
@@ -0,0 +1,16 @@
+#
+# Allowed failures for i486-kfreebsd-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-localplt.out, Error 1
+tst-aio10.out, Error 1
+tst-aio4.out, Error 1
+tst-aio9.out, Error 1
+tst-cputimer2.out, Error 1
+tst-longjmp_chk.out, Error 1
+tst-mknodat.out, Error 1
+tst-renameat.out, Error 1
+tst-timer4.out, Error 1
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-s390-linux-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-s390-linux-gnu-libc
@@ -0,0 +1,13 @@
+#
+# Allowed failures for s390-linux-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+bug22.out, Error 1
+check-localplt.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-robust8.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-i686-kfreebsd-gnu-i386
+++ eglibc-2.13/debian/testsuite-checking/expected-results-i686-kfreebsd-gnu-i386
@@ -0,0 +1,18 @@
+#
+# Allowed failures for i686-kfreebsd-gnu-i386 and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-localplt.out, Error 1
+test-ifaddrs.out, Error 1
+test_ifindex.out, Error 1
+tst-aio10.out, Error 1
+tst-aio4.out, Error 1
+tst-aio9.out, Error 1
+tst-cputimer2.out, Error 1
+tst-longjmp_chk.out, Error 1
+tst-mknodat.out, Error 1
+tst-renameat.out, Error 1
+tst-timer4.out, Error 1
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-mips32-linux-gnu-mipsn32
+++ eglibc-2.13/debian/testsuite-checking/expected-results-mips32-linux-gnu-mipsn32
@@ -0,0 +1,23 @@
+#
+# Allowed failures for mips32-linux-gnu-mipsn32 and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+bug-nextafter.out, Error 8
+bug-nexttoward.out, Error 8
+check-execstack.out, Error 1
+check-localplt.out, Error 1
+test-double.out, Error 1
+test-idouble.out, Error 1
+test-misc.out, Error 1
+tst-audit1.out, Error 127
+tst-audit2.out, Error 127
+tst-backtrace1.out, Error 1
+tst-backtrace2.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-tls2.out, Error 1
+tst-tls3.out, Error 1
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-i686-linux-gnu-xen
+++ eglibc-2.13/debian/testsuite-checking/expected-results-i686-linux-gnu-xen
@@ -0,0 +1,10 @@
+#
+# Allowed failures for i686-linux-gnu-xen and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-s390x-linux-gnu-s390
+++ eglibc-2.13/debian/testsuite-checking/expected-results-s390x-linux-gnu-s390
@@ -0,0 +1,13 @@
+#
+# Allowed failures for s390x-linux-gnu-s390 and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+bug22.out, Error 1
+check-localplt.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-robust8.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/compare.sh
+++ eglibc-2.13/debian/testsuite-checking/compare.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+if [ $# -ne '2' ]; then
+  echo -e "\nUsage: Compare a test-expected-* file and a test-results-* file."
+  echo -e "$0 : < Expected testsuite results > < Testsuite results >\n";
+  exit 1
+fi;
+
+expected=$(tempfile)
+results=$(tempfile)
+grep -v '^#.*' $1 | sort > $expected
+grep -v '^#.*' $2 | sort > $results
+
+REGRESSIONS=$(diff -wB $expected $results | sed -e '/^>/!d;s/^> //g')
+rm -f $expected $results
+if [ -n "$REGRESSIONS" ] ; then
+  echo "Encountered regressions that don't match expected failures:"
+  echo "$REGRESSIONS"
+  # disable build failures on testsuite regressions to ease security updates:
+  exit 0
+else
+  echo "Passed regression testing. No new failures, no changed error values."
+  exit 0
+fi
+
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-hppa-linux-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-hppa-linux-gnu-libc
@@ -0,0 +1,34 @@
+#
+# Allowed failures for hppa-linux-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-execstack.out, Error 1
+check-localplt.out, Error 1
+check-textrel.out, Error 1
+tst-addr1.out, Error 1
+tst-audit2.out, Error 139
+tst-backtrace2.out, Error 1
+tst-cancelx20.out, Error 1
+tst-cancelx21.out, Error 1
+tst-cancelx4.out, Error 1
+tst-cancelx5.out, Error 1
+tst-cleanupx4.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-cputimer1.out, Error 1
+tst-cputimer2.out, Error 1
+tst-cputimer3.out, Error 1
+tst-getcpu.out, Error 1
+tst-longjmp_chk.out, Error 1
+tst-mqueue3.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer4.out, Error 1
+tst-timer5.out, Error 1
+tst-waitid.out, Error 1
+
+# Should be removed when bug #582787 is fixed
+tstdiomisc.out, Error 1
+
+# Should be removed when bug #561203 is fixed
+tst-fork1.out, Error 139
--- eglibc-2.13.orig/debian/testsuite-checking/README
+++ eglibc-2.13/debian/testsuite-checking/README
@@ -0,0 +1,17 @@
+Testsuite Regression Testing
+============================
+
+This directory contains a file for each arch/os, listing the allowed failures
+during a testsuite run for a given arch/os pair. The files are listed as
+"${arch-os}-test-results".  Where "${arch-os}" is extracted by rules as 
+"$(call xx,configure_target)".
+
+A script, "convertlog.sh", can be used to process the normal log-test-*
+file into a test-results-* file.
+
+Since we cannot run the testsuite without "-k", we run the enitre testsuite
+ignoring errors. Then we compare the error set with the expected errors, 
+differences in signal numbers or errors fails the build. If the architecture
+does not have a test-results-* file a warning is given and no comparison is
+made.
+
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-i686-gnu-i686
+++ eglibc-2.13/debian/testsuite-checking/expected-results-i686-gnu-i686
@@ -0,0 +1,87 @@
+#
+# Allowed failures for i486-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+# Need actual porting
+tst-cpucount, Error 1
+tst-cpuset.o, Error 1
+tst-cputimer1.o, Error 1
+tst-cputimer2.o, Error 1
+tst-cputimer3.o, Error 1
+tst-mqueue5.o, Error 1
+tst-pselect.o, Error 1
+tst-timer2.o, Error 1
+tst-timer4.o, Error 1
+tst-timer5.o, Error 1
+#
+# Need investigation
+annexc.out, Error 1 (ignored)
+bug-glob2.out, Error 1
+bug-regex31-mem, Error 1
+bug-ulimit1.out, Error 1
+check-execstack.out, Error 1
+check-local-headers.out, Error 1
+check-localplt.out, Error 1
+check-textrel.out, Error 1
+libnss_test1.so, Error 1
+mtrace-tst-loading, Error 1
+opendir-tst1.out, Error 1
+test-assert-perr.out, Error 1
+test-assert.out, Error 1
+test-fenv.out, Error 1
+test-idouble.out, Error 139
+test-ifaddrs.out, Error 1
+test-ifloat.out, Error 139
+test-lfs.out, Error 1
+test-memmem, Error 1
+test-strnlen, Error 1
+tst-aio10.out, Error 1
+tst-aio2.o, Error 1
+tst-aio3.o, Error 1
+tst-aio8.out, Error 1
+tst-aio9.out, Error 1
+tst-atime.out, Error 1
+tst-audit1.out, Error 137
+tst-audit2.out, Error 137
+tst-chk1.out, Error 1
+tst-chk2.out, Error 1
+tst-chk3.out, Error 1
+tst-chk4.out, Error 1
+tst-chk5.out, Error 1
+tst-chk6.out, Error 1
+tst-clock_nanosleep.out, Error 1
+tst-dlmopen1.out, Error 1
+tst-error1-mem, Error 1
+tst-fdopendir2.out, Error 1
+tst-fdopendir.out, Error 1
+tst-fnmatch-mem, Error 1
+tst-fopenloc.check, Error 1
+tst-futimesat.out, Error 1
+tst-getconf.out, Error 3
+tst-gettext.out, Error 1
+tst-grantpt.out, Error 1
+tst-lfschk1.out, Error 1
+tst-lfschk2.out, Error 1
+tst-lfschk3.out, Error 1
+tst-lfschk4.out, Error 1
+tst-lfschk5.out, Error 1
+tst-lfschk6.out, Error 1
+tst-longjmp_chk2.out, Error 1
+tst-mknodat.out, Error 1
+tst-renameat.out, Error 1
+tst-sprofil.out, Error 136
+tst-stackguard1-static.out, Error 1
+tst-stackguard1.out, Error 1
+tst-sysconf.out, Error 1
+tst-timer.out, Error 1
+tst-tls18.out, Error 1
+tst-tls9-static.out, Error 1
+tst-unique1.out, Error 1
+tst-unique2.out, Error 127
+tst-vfork3-mem, Error 1
+tst-waitid.out, Error 1
+tststatic.out, Error 139
+tststatic2.out, Error 139
+# happens seldomly
+tst-nanosleep.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-sparc64-linux-gnu-sparc64
+++ eglibc-2.13/debian/testsuite-checking/expected-results-sparc64-linux-gnu-sparc64
@@ -0,0 +1,15 @@
+#
+# Allowed failures for sparc64-linux-gnu-sparc64 and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-localplt.out, Error 1
+tst-backtrace2.out, Error 1
+tst-cancelx21.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-longjmp_chk2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
+tst-writev.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-sparc64-linux-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-sparc64-linux-gnu-libc
@@ -0,0 +1,17 @@
+#
+# Allowed failures for sparc64-linux-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-localplt.out, Error 1
+tst-backtrace2.out, Error 1
+tst-cancelx21.out, Error 1
+tst-cancelx4.out, Error 1
+tst-cancelx5.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-longjmp_chk2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
+tst-writev.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-ia64-linux-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-ia64-linux-gnu-libc
@@ -0,0 +1,14 @@
+#
+# Allowed failures for ia64-linux-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-localplt.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-getcpu.out, Error 1
+tst-longjmp_chk2.out, Error 1
+tst-makecontext3.out, Error 1
+tst-mqueue5.out, Error 1
+tst-waitid.out, Error 1
+tst-writev.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-mips-linux-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-mips-linux-gnu-libc
@@ -0,0 +1,18 @@
+#
+# Allowed failures for mips-linux-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-execstack.out, Error 1
+check-localplt.out, Error 1
+tst-audit1.out, Error 127
+tst-audit2.out, Error 127
+tst-backtrace1.out, Error 1
+tst-backtrace2.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-tls2.out, Error 1
+tst-tls3.out, Error 1
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-i686-linux-gnu-i686
+++ eglibc-2.13/debian/testsuite-checking/expected-results-i686-linux-gnu-i686
@@ -0,0 +1,10 @@
+#
+# Allowed failures for i686-linux-gnu-i686 and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-x86_64-linux-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-x86_64-linux-gnu-libc
@@ -0,0 +1,12 @@
+#
+# Allowed failures for x86_64-linux-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+tst-cancelx17.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
+tst-writev.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-alphaev67-linux-gnu-alphaev67
+++ eglibc-2.13/debian/testsuite-checking/expected-results-alphaev67-linux-gnu-alphaev67
@@ -0,0 +1,22 @@
+#
+# Allowed failures for alphaev67-linux-gnu-alphaev67 and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-localplt.out, Error 1
+noinl-tester.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-eintr1.out, Error 1
+tst-mqueue5.out, Error 1
+tst-signal3.out, Error 1
+tst-timer.out, Error 132
+tst-timer.out, Error 139
+tst-timer4.out, Error 1
+tst-waitid.out, Error 1
+tst-writev.out, Error 1
+
+# Broken due to binutils bug
+# http://sourceware.org/bugzilla/show_bug.cgi?id=12608
+tst-tls10.out, Error 139
+tst-tls11.out, Error 139
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-i686-linux-gnu-i386
+++ eglibc-2.13/debian/testsuite-checking/expected-results-i686-linux-gnu-i386
@@ -0,0 +1,10 @@
+#
+# Allowed failures for i686-linux-gnu-i386 and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-sparc-linux-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-sparc-linux-gnu-libc
@@ -0,0 +1,12 @@
+#
+# Allowed failures for sparc-linux-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-localplt.out, Error 1
+tst-backtrace2.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-longjmp_chk2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-i686-gnu-i386
+++ eglibc-2.13/debian/testsuite-checking/expected-results-i686-gnu-i386
@@ -0,0 +1,87 @@
+#
+# Allowed failures for i486-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+# Need actual porting
+tst-cpucount, Error 1
+tst-cpuset.o, Error 1
+tst-cputimer1.o, Error 1
+tst-cputimer2.o, Error 1
+tst-cputimer3.o, Error 1
+tst-mqueue5.o, Error 1
+tst-pselect.o, Error 1
+tst-timer2.o, Error 1
+tst-timer4.o, Error 1
+tst-timer5.o, Error 1
+#
+# Need investigation
+annexc.out, Error 1 (ignored)
+bug-glob2.out, Error 1
+bug-regex31-mem, Error 1
+bug-ulimit1.out, Error 1
+check-execstack.out, Error 1
+check-local-headers.out, Error 1
+check-localplt.out, Error 1
+check-textrel.out, Error 1
+libnss_test1.so, Error 1
+mtrace-tst-loading, Error 1
+opendir-tst1.out, Error 1
+test-assert-perr.out, Error 1
+test-assert.out, Error 1
+test-fenv.out, Error 1
+test-idouble.out, Error 139
+test-ifaddrs.out, Error 1
+test-ifloat.out, Error 139
+test-lfs.out, Error 1
+test-memmem, Error 1
+test-strnlen, Error 1
+tst-aio10.out, Error 1
+tst-aio2.o, Error 1
+tst-aio3.o, Error 1
+tst-aio8.out, Error 1
+tst-aio9.out, Error 1
+tst-atime.out, Error 1
+tst-audit1.out, Error 137
+tst-audit2.out, Error 137
+tst-chk1.out, Error 1
+tst-chk2.out, Error 1
+tst-chk3.out, Error 1
+tst-chk4.out, Error 1
+tst-chk5.out, Error 1
+tst-chk6.out, Error 1
+tst-clock_nanosleep.out, Error 1
+tst-dlmopen1.out, Error 1
+tst-error1-mem, Error 1
+tst-fdopendir2.out, Error 1
+tst-fdopendir.out, Error 1
+tst-fnmatch-mem, Error 1
+tst-fopenloc.check, Error 1
+tst-futimesat.out, Error 1
+tst-getconf.out, Error 3
+tst-gettext.out, Error 1
+tst-grantpt.out, Error 1
+tst-lfschk1.out, Error 1
+tst-lfschk2.out, Error 1
+tst-lfschk3.out, Error 1
+tst-lfschk4.out, Error 1
+tst-lfschk5.out, Error 1
+tst-lfschk6.out, Error 1
+tst-longjmp_chk2.out, Error 1
+tst-mknodat.out, Error 1
+tst-renameat.out, Error 1
+tst-sprofil.out, Error 136
+tst-stackguard1-static.out, Error 1
+tst-stackguard1.out, Error 1
+tst-sysconf.out, Error 1
+tst-timer.out, Error 1
+tst-tls18.out, Error 1
+tst-tls9-static.out, Error 1
+tst-unique1.out, Error 1
+tst-unique2.out, Error 127
+tst-vfork3-mem, Error 1
+tst-waitid.out, Error 1
+tststatic.out, Error 139
+tststatic2.out, Error 139
+# happens seldomly
+tst-nanosleep.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-mips64-linux-gnu-mips64
+++ eglibc-2.13/debian/testsuite-checking/expected-results-mips64-linux-gnu-mips64
@@ -0,0 +1,24 @@
+#
+# Allowed failures for mips64-linux-gnu-mips64 and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+bug-nextafter.out, Error 8
+bug-nexttoward.out, Error 8
+check-execstack.out, Error 1
+check-localplt.out, Error 1
+test-double.out, Error 1
+test-idouble.out, Error 1
+test-misc.out, Error 1
+tst-audit1.out, Error 127
+tst-audit2.out, Error 127
+tst-backtrace1.out, Error 1
+tst-backtrace2.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-tls2.out, Error 1
+tst-tls3.out, Error 1
+tst-waitid.out, Error 1
+tst-writev.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-powerpc64-linux-gnu-ppc64
+++ eglibc-2.13/debian/testsuite-checking/expected-results-powerpc64-linux-gnu-ppc64
@@ -0,0 +1,13 @@
+#
+# Allowed failures for powerpc64-linux-gnu-ppc64 and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-execstack.out, Error 1
+check-localplt.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
+tst-writev.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-i686-kfreebsd-gnu-i686
+++ eglibc-2.13/debian/testsuite-checking/expected-results-i686-kfreebsd-gnu-i686
@@ -0,0 +1,16 @@
+#
+# Allowed failures for i686-kfreebsd-gnu-i686 and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-localplt.out, Error 1
+tst-aio10.out, Error 1
+tst-aio4.out, Error 1
+tst-aio9.out, Error 1
+tst-cputimer2.out, Error 1
+tst-longjmp_chk.out, Error 1
+tst-mknodat.out, Error 1
+tst-renameat.out, Error 1
+tst-timer4.out, Error 1
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-x86_64-linux-gnu-amd64
+++ eglibc-2.13/debian/testsuite-checking/expected-results-x86_64-linux-gnu-amd64
@@ -0,0 +1,11 @@
+#
+# Allowed failures for x86_64-linux-gnu-amd64 and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
+tst-writev.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-powerpc-linux-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-powerpc-linux-gnu-libc
@@ -0,0 +1,11 @@
+#
+# Allowed failures for powerpc-linux-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-localplt.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-powerpc-linux-gnuspe-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-powerpc-linux-gnuspe-libc
@@ -0,0 +1,17 @@
+#
+# Allowed failures for powerpc-linux-gnuspe-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+bug-nextafter.out, Error 18
+bug-nexttoward.out, Error 18
+check-localplt.out, Error 1
+test-double.out, Error 1
+test-fenv.out, Error 1
+test-float.out, Error 1
+test-idouble.out, Error 1
+test-ifloat.out, Error 1
+test-misc.out, Error 1
+tst-cputimer1.out, Error 1
+tst-setcontext-fpscr.o, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-mips32el-linux-gnu-mipsn32
+++ eglibc-2.13/debian/testsuite-checking/expected-results-mips32el-linux-gnu-mipsn32
@@ -0,0 +1,24 @@
+#
+# Allowed failures for mips32el-linux-gnu-mipsn32 and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+bug-nextafter.out, Error 8
+bug-nexttoward.out, Error 8
+check-execstack.out, Error 1
+check-localplt.out, Error 1
+test-double.out, Error 1
+test-fenv.out, Error 1
+test-idouble.out, Error 1
+test-misc.out, Error 1
+tst-audit1.out, Error 127
+tst-audit2.out, Error 127
+tst-backtrace1.out, Error 1
+tst-backtrace2.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-tls2.out, Error 1
+tst-tls3.out, Error 1
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-arm-linux-gnueabihf-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-arm-linux-gnueabihf-libc
@@ -0,0 +1,15 @@
+#
+# Allowed failures for arm-linux-gnueabihf-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+check-localplt.out, Error 1
+tst-cpuclock2.out, Error 1
+test-double.out, Error 1
+test-fenv.out, Error 1
+test-float.out, Error 1
+test-idouble.out, Error 1
+tst-cputimer1.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-i486-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-i486-gnu-libc
@@ -0,0 +1,87 @@
+#
+# Allowed failures for i486-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+# Need actual porting
+tst-cpucount, Error 1
+tst-cpuset.o, Error 1
+tst-cputimer1.o, Error 1
+tst-cputimer2.o, Error 1
+tst-cputimer3.o, Error 1
+tst-mqueue5.o, Error 1
+tst-pselect.o, Error 1
+tst-timer2.o, Error 1
+tst-timer4.o, Error 1
+tst-timer5.o, Error 1
+#
+# Need investigation
+annexc.out, Error 1 (ignored)
+bug-glob2.out, Error 1
+bug-regex31-mem, Error 1
+bug-ulimit1.out, Error 1
+check-execstack.out, Error 1
+check-local-headers.out, Error 1
+check-localplt.out, Error 1
+check-textrel.out, Error 1
+libnss_test1.so, Error 1
+mtrace-tst-loading, Error 1
+opendir-tst1.out, Error 1
+test-assert-perr.out, Error 1
+test-assert.out, Error 1
+test-fenv.out, Error 1
+test-idouble.out, Error 139
+test-ifaddrs.out, Error 1
+test-ifloat.out, Error 139
+test-lfs.out, Error 1
+test-memmem, Error 1
+test-strnlen, Error 1
+tst-aio10.out, Error 1
+tst-aio2.o, Error 1
+tst-aio3.o, Error 1
+tst-aio8.out, Error 1
+tst-aio9.out, Error 1
+tst-atime.out, Error 1
+tst-audit1.out, Error 137
+tst-audit2.out, Error 137
+tst-chk1.out, Error 1
+tst-chk2.out, Error 1
+tst-chk3.out, Error 1
+tst-chk4.out, Error 1
+tst-chk5.out, Error 1
+tst-chk6.out, Error 1
+tst-clock_nanosleep.out, Error 1
+tst-dlmopen1.out, Error 1
+tst-error1-mem, Error 1
+tst-fdopendir2.out, Error 1
+tst-fdopendir.out, Error 1
+tst-fnmatch-mem, Error 1
+tst-fopenloc.check, Error 1
+tst-futimesat.out, Error 1
+tst-getconf.out, Error 3
+tst-gettext.out, Error 1
+tst-grantpt.out, Error 1
+tst-lfschk1.out, Error 1
+tst-lfschk2.out, Error 1
+tst-lfschk3.out, Error 1
+tst-lfschk4.out, Error 1
+tst-lfschk5.out, Error 1
+tst-lfschk6.out, Error 1
+tst-longjmp_chk2.out, Error 1
+tst-mknodat.out, Error 1
+tst-renameat.out, Error 1
+tst-sprofil.out, Error 136
+tst-stackguard1-static.out, Error 1
+tst-stackguard1.out, Error 1
+tst-sysconf.out, Error 1
+tst-timer.out, Error 1
+tst-tls18.out, Error 1
+tst-tls9-static.out, Error 1
+tst-unique1.out, Error 1
+tst-unique2.out, Error 127
+tst-vfork3-mem, Error 1
+tst-waitid.out, Error 1
+tststatic.out, Error 139
+tststatic2.out, Error 139
+# happens seldomly
+tst-nanosleep.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-m68k-linux-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-m68k-linux-gnu-libc
@@ -0,0 +1,47 @@
+#
+# Allowed failures for m68k-linux-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+bug-nextafter.out, Error 24
+bug-nexttoward.out, Error 32
+bug-regex20.out, Error 139
+check-localplt.out, Error 1
+sort-test.out, Error 1
+test-double.out, Error 1
+test-fenv.out, Error 1
+test-float.out, Error 1
+test-idouble.out, Error 1
+test-ifloat.out, Error 1
+test-misc.out, Error 1
+tst-atomic-long.out, Error 1
+tst-atomic.out, Error 1
+tst-mqueue5.out, Error 1
+tst-mqueue6.out, Error 1
+tst-mutexpi2.out, Error 1
+tst-mutexpi4.out, Error 1
+tst-mutexpi5.out, Error 1
+tst-mutexpi5a.out, Error 1
+tst-mutexpi6.out, Error 1
+tst-mutexpi7.out, Error 1
+tst-mutexpi7a.out, Error 1
+tst-mutexpi9.out, Error 1
+tst-robust1.out, Error 1
+tst-robust2.out, Error 1
+tst-robust3.out, Error 1
+tst-robust4.out, Error 1
+tst-robust5.out, Error 1
+tst-robust6.out, Error 1
+tst-robust7.out, Error 1
+tst-robust8.out, Error 1
+tst-robust9.out, Error 1
+tst-robustpi1.out, Error 1
+tst-robustpi2.out, Error 1
+tst-robustpi3.out, Error 1
+tst-robustpi4.out, Error 1
+tst-robustpi5.out, Error 1
+tst-robustpi6.out, Error 1
+tst-robustpi7.out, Error 1
+tst-robustpi8.out, Error 1
+tst-rxspencer.out, Error 139
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-i486-linux-gnu-libc
+++ eglibc-2.13/debian/testsuite-checking/expected-results-i486-linux-gnu-libc
@@ -0,0 +1,10 @@
+#
+# Allowed failures for i486-linux-gnu-libc and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-waitid.out, Error 1
--- eglibc-2.13.orig/debian/testsuite-checking/convertlog.sh
+++ eglibc-2.13/debian/testsuite-checking/convertlog.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+if [ $# -ne '1' ]; then
+  echo -e "\nUsage: Converts a log-test-* file into a test-results-* file."
+  echo -e "$0 : < Input testsuite log file >\n";
+  exit 1
+fi;
+
+echo '#'
+echo '# Testsuite failures, someone should be working towards'
+echo '# fixing these! They are listed here for the purpose of'
+echo '# regression testing during builds.'
+echo '# Format: <Failed test>, Error <Make error code> [(ignored)]'
+echo '#'
+grep 'make\[.*\]:.* \[/.*' $1 | sed -e's,^.*/,,g' -e 's/\]/,/g' | sort
--- eglibc-2.13.orig/debian/testsuite-checking/expected-results-mips64el-linux-gnu-mips64
+++ eglibc-2.13/debian/testsuite-checking/expected-results-mips64el-linux-gnu-mips64
@@ -0,0 +1,25 @@
+#
+# Allowed failures for mips64el-linux-gnu-mips64 and the returned make
+# failure number, indicating the signal the process died with.
+# Format: <Failed test>, Error <Make error code> [(ignored)]
+#
+annexc.out, Error 1 (ignored)
+bug-nextafter.out, Error 8
+bug-nexttoward.out, Error 8
+check-execstack.out, Error 1
+check-localplt.out, Error 1
+test-double.out, Error 1
+test-fenv.out, Error 1
+test-idouble.out, Error 1
+test-misc.out, Error 1
+tst-audit1.out, Error 127
+tst-audit2.out, Error 127
+tst-backtrace1.out, Error 1
+tst-backtrace2.out, Error 1
+tst-cpuclock2.out, Error 1
+tst-mqueue5.out, Error 1
+tst-timer.out, Error 139
+tst-tls2.out, Error 1
+tst-tls3.out, Error 1
+tst-waitid.out, Error 1
+tst-writev.out, Error 1
--- eglibc-2.13.orig/debian/local/usr_sbin/locale-gen
+++ eglibc-2.13/debian/local/usr_sbin/locale-gen
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+set -e
+
+LOCALEGEN=/etc/locale.gen
+LOCALES=/usr/share/i18n/locales
+USER_LOCALES=/usr/local/share/i18n/locales
+if [ -n "$POSIXLY_CORRECT" ]; then
+  unset POSIXLY_CORRECT
+fi
+
+
+[ -f $LOCALEGEN ] || exit 0;
+[ -s $LOCALEGEN ] || exit 0;
+
+KEEP=
+if [ "$1" = '--keep-existing' ]; then
+	KEEP=1
+fi
+
+if [ -z "$KEEP" ]; then
+	# Remove all old locale dir and locale-archive before generating new
+	# locale data.
+	rm -rf /usr/lib/locale/locale-archive || true
+fi
+
+umask 022
+
+is_entry_ok() {
+  if [ -n "$locale" -a -n "$charset" ] ; then
+    true
+  else
+    echo "error: Bad entry '$locale $charset'"
+    false
+  fi
+}
+
+echo "Generating locales (this might take a while)..."
+while read locale charset; do \
+	case $locale in \#*) continue;; "") continue;; esac; \
+	is_entry_ok || continue
+	if [ "$KEEP" ] && PERL_BADLANG=0 perl -MPOSIX -e \
+	    'exit 1 unless setlocale(LC_ALL, $ARGV[0])' "$locale"; then
+		continue
+	fi
+	echo -n "  `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \
+	echo -n ".$charset"; \
+	echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
+	echo -n '...'; \
+	if [ -f $USER_LOCALES/$locale ] ; then
+	    input=$USER_LOCALES/$locale
+        elif [ -f $LOCALES/$locale ]; then 
+	    input=$locale
+        else
+	    input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`
+	    if [ -f $USER_LOCALES/$input ]; then
+	        input=$USER_LOCALES/$input
+            fi
+	fi
+	localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale || :; \
+	echo ' done'; \
+done < $LOCALEGEN
+echo "Generation complete."
--- eglibc-2.13.orig/debian/local/usr_sbin/update-locale
+++ eglibc-2.13/debian/local/usr_sbin/update-locale
@@ -0,0 +1,129 @@
+#! /usr/bin/perl -w
+
+use strict;
+use Getopt::Long;
+
+my $progname     = "update-locale";
+my $locale_file  = "/etc/default/locale";
+
+my $help         = 0;
+my $reset        = 0;
+#  Kept for compatibility reasons
+my $remove       = 0;
+my $no_checks    = 0;
+
+GetOptions(
+	'reset'          => \$reset,
+	'remove'         => \$remove,
+	'locale-file=s'  => \$locale_file,
+	'no-checks'      => \$no_checks,
+	'h|help'         => \$help,
+);
+
+sub usage
+{
+	my $rc = shift;
+	print STDERR "Usage: $progname [OPTIONS] [LANG=locale] [LC_NUMERIC=locale] ...
+Options:
+   --help              display this message and exit
+   --reset             ignore variables defined in the locale file
+   --locale-file=FILE  file containing locale variables
+                       (Default: /etc/default/locale)
+   --no-checks         do not perform sanity checks on locale variables
+";
+	exit $rc;
+}
+
+$help && usage(0);
+
+#  Process command-line arguments
+my %arg = ();
+my $content = '';
+my $mode = 0644;
+if (-r $locale_file)
+{
+	#  Keep file mode
+	$mode = (stat($locale_file))[2] & 07777;
+	#  Read current values
+	open(IN, "<", $locale_file)
+		or die "$progname: Unable to read $locale_file: $!\n";
+	while (<IN>)
+	{
+		$content .= $_;
+		next unless m/^(\w+)=(.*)/;
+		$arg{$1} = $2 unless $reset;
+	}
+	close(IN)
+		or die "$progname: Unable to close $locale_file: $!\n";
+	$content =~ s/^(\s*\w+=)/#$1/mg;
+	$content .= "\n" unless $content =~ m/\n$/s;
+}
+else
+{
+	$content = "#  File generated by $progname\n";
+}
+for (@ARGV)
+{
+	if (m/(.*?)=(.*)/)
+	{
+		$arg{$1} = $2;
+	}
+	else
+	{
+		delete $arg{$_};
+	}
+}
+
+my $env = '';
+my ($key, $value);
+while (($key, $value) = each %arg)
+{
+	$env .= " $key=$value";
+	$content =~ s/^#\s*$key=.*/$key=$value/m or
+		$content .= "$key=$value\n";
+}
+
+#  Sanity checks
+if ($no_checks == 0)
+{
+	#  Check that this locale does exist
+	my $charset = `LANG= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION= LC_ALL= $env locale charmap 2>&1`;
+	die "*** $progname: Error: invalid locale settings: $env\n"
+		if ($charset =~ m/Cannot set/);
+	#  If LANGUAGE is set, its first value must be compatible with LC_MESSAGES
+	if (defined $arg{LANGUAGE})
+	{
+		my $language = $arg{LANGUAGE};
+		$language =~ s/["']//g;
+		$language =~ s/[.:_].*//;
+		my $msg = '';
+		my $var = '';
+		for (qw(LANG LC_MESSAGES LC_ALL))
+		{
+			if (defined $arg{$_})
+			{
+				$var = $_;
+				$msg = $arg{$_};
+			}
+		}
+		$msg =~ s/["']//g;
+		if ($msg !~ m/^$language/ && $var ne ''
+		    && $msg ne 'C' && $msg ne 'POSIX'
+		    && $language ne 'C' && $language ne 'POSIX')
+		{
+			print "*** $progname: Warning: LANGUAGE ($arg{LANGUAGE}) is not compatible with $var ($msg). Disabling it.\n";
+			$content =~ s/^(\s*LANGUAGE=)/#$1/mg;
+		}
+	}
+}
+
+#  Write locale file
+open(OUT, ">", $locale_file)
+	or die "$progname: Unable to write $locale_file: $!\n";
+print OUT $content;
+close(OUT)
+	or die "$progname: Unable to close $locale_file: $!\n";
+chmod($mode, $locale_file)
+	or die "$progname: Unable to chmod $locale_file: $!\n";
+
+1;
--- eglibc-2.13.orig/debian/local/usr_sbin/validlocale
+++ eglibc-2.13/debian/local/usr_sbin/validlocale
@@ -0,0 +1,75 @@
+#!/usr/bin/perl -w
+#
+# Author: Petter Reinholdtsen <pere@hungry.com>
+# Date:   2002-02-23
+#
+# Test if the locale given as argument is a valid locale.  If it
+# is not, print on stdout the string to add to /etc/locale.gen to make
+# locale-gen generate the locale (if it exists at all).
+
+use POSIX qw(setlocale LC_ALL);
+
+my $debug = 0;
+
+my $defaultcharset = $ENV{"DEFAULTCHARSET"} || "ISO-8859-1";
+
+my $supportedlist = "/usr/share/i18n/SUPPORTED";
+
+unless (defined $ARGV[0]) {
+    usage();
+    exit 1;
+}
+
+my $LANG = $ARGV[0];
+
+my $loc = setlocale(LC_ALL, $LANG);
+if ( ! $loc) {
+    print STDERR "locale '$LANG' not available\n";
+
+    my ($locale)   = $LANG =~ m/^([^.@]+)/;
+    my ($charset)  = $LANG =~ m/^[^.]+\.([^@]+)/;
+    my ($modifier) = $LANG =~ m/(@.+)$/;
+
+    $modifier = "" unless defined $modifier;
+
+    # Hm, if charset is missing, how to we pick the correct one to
+    # use?  Fetching the value from /usr/share/i18n/SUPPORTED should
+    # work on Debian.
+    my $codeset = "";
+    if (defined $charset) {
+       $codeset = '.' . $charset;
+    } else {
+       $charset = get_default_charset("$locale$modifier");
+    }
+
+    # print "L: $locale C: $charset M: $modifier\n";
+    print "$locale$codeset$modifier $charset\n";
+
+    exit 1;
+} else {
+    print STDERR "locale '$LANG' valid and available\n";
+    exit 0;
+}
+
+sub usage {
+    print "Usage: $0 <locale>\n"
+}
+
+sub get_default_charset {
+    my ($locale) = @_;
+    my ($l, $c);
+    open(SUPPORTED, "< $supportedlist") || die "Unable to open $supportedlist";
+    while (<SUPPORTED>) {
+	chomp;
+	($l, $c) = split(/\s+/);
+	print "Checking '$l' '$c' != '$locale'\n" if $debug;
+	last if  ($l eq $locale);
+    }
+    close(SUPPORTED);
+
+    if ($l eq $locale) {
+	return $c;
+    } else {
+	return $defaultcharset;
+    }
+}
--- eglibc-2.13.orig/debian/local/etc/nsswitch.conf
+++ eglibc-2.13/debian/local/etc/nsswitch.conf
@@ -0,0 +1,19 @@
+# /etc/nsswitch.conf
+#
+# Example configuration of GNU Name Service Switch functionality.
+# If you have the `glibc-doc-reference' and `info' packages installed, try:
+# `info libc "Name Service Switch"' for information about this file.
+
+passwd:         compat
+group:          compat
+shadow:         compat
+
+hosts:          files dns
+networks:       files
+
+protocols:      db files
+services:       db files
+ethers:         db files
+rpc:            db files
+
+netgroup:       nis
--- eglibc-2.13.orig/debian/local/etc/bindresvport.blacklist
+++ eglibc-2.13/debian/local/etc/bindresvport.blacklist
@@ -0,0 +1,14 @@
+#
+# This file contains a list of port numbers between 600 and 1024,
+# which should not be used by bindresvport. bindresvport is mostly
+# called by RPC services. This mostly solves the problem, that a
+# RPC service uses a well known port of another service.
+#
+631	# cups
+636	# ldaps
+774	# rpasswd
+783	# spamd
+873	# rsync
+921	# lwresd
+993	# imaps
+995	# pops
--- eglibc-2.13.orig/debian/local/etc/ld.so.conf.d/libc.conf
+++ eglibc-2.13/debian/local/etc/ld.so.conf.d/libc.conf
@@ -0,0 +1,2 @@
+# libc default configuration
+/usr/local/lib
--- eglibc-2.13.orig/debian/local/manpages/validlocale.8
+++ eglibc-2.13/debian/local/manpages/validlocale.8
@@ -0,0 +1,49 @@
+.TH "validlocale" "8" "0.1" "Petter Reinholdtsen" ""
+.SH "NAME"
+.LP 
+validlocale \- Test if a given locale is available
+.SH "SYNTAX"
+.LP 
+validlocale <\fIlocale\fP>
+.SH "DESCRIPTION"
+.LP 
+Test if the locale given as argument is a valid locale.  If it
+isn't, print on stdout the string to add to /etc/locale.gen to make
+locale\-gen generate the locale (if it exists at all).
+.SH "FILES"
+.LP 
+\fI/usr/sbin/validlocale\fP
+.br 
+\fI/usr/share/i18n/SUPPORTED\fP
+.SH "ENVIRONMENT VARIABLES"
+.LP 
+.TP 
+\fBDEFAULTCHARSET\fP
+Which charset to assume if the given locale is missing from the
+list of supported locales.
+.SH "EXAMPLES"
+.LP 
+If you give a valid locale as parameter, it outputs a string
+specifying this on stderr:
+.LP 
+.IP 
+% validlocale C
+.br 
+locale 'C' valid and available
+.LP 
+When given a invalid (not generated or just nonexistent), it
+outputs a string on stderr telling that this is an invalid locale, and a string to stdout with the string to add to /etc/locale.gen
+to have this locale generated:
+.LP 
+.IP 
+% validlocale de_AU@euro
+.br 
+locale 'de_AU@euro' not available
+.br 
+de_AU@euro ISO\-8859\-15
+.SH "AUTHORS"
+.LP 
+Petter Reinholdtsen <pere@hungry.com>
+.SH "SEE ALSO"
+.LP 
+locale\-gen(8), localedef(1), locale(1)
--- eglibc-2.13.orig/debian/local/manpages/iconv.1
+++ eglibc-2.13/debian/local/manpages/iconv.1
@@ -0,0 +1,274 @@
+.rn '' }`
+.\" $RCSfile: iconv.1,v $$Revision: 1.1.2.2 $$Date: 2003/10/28 05:48:08 $
+.\"
+.\" $Log: iconv.1,v $
+.\" Revision 1.1.2.2  2003/10/28 05:48:08  dan
+.\"     - Re-add debian/patches/80_glibc232-locales-nb_NO-fix.dpatch, which had
+.\"       gotten lost.
+.\"     - Re-add typo fixes to iconv.1 and rpcgen.1.
+.\"     - Merge iconv.1 fix to iconv.pod.
+.\"     - Fix ld.so name in ld.so.8.
+.\"     - Re-add fix for locale-gen and POSIXLY_CORRECT.
+.\"
+.\"
+.de Sh
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp
+.if t .sp .5v
+.if n .sp
+..
+.de Ip
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.de Vb
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve
+.ft R
+
+.fi
+..
+.\"
+.\"
+.\"     Set up \*(-- to give an unbreakable dash;
+.\"     string Tr holds user defined translation string.
+.\"     Bell System Logo is used as a dummy character.
+.\"
+.tr \(*W-|\(bv\*(Tr
+.ie n \{\
+.ds -- \(*W-
+.ds PI pi
+.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+.ds L" ""
+.ds R" ""
+.\"   \*(M", \*(S", \*(N" and \*(T" are the equivalent of
+.\"   \*(L" and \*(R", except that they are used on ".xx" lines,
+.\"   such as .IP and .SH, which do another additional levels of
+.\"   double-quote interpretation
+.ds M" """
+.ds S" """
+.ds N" """""
+.ds T" """""
+.ds L' '
+.ds R' '
+.ds M' '
+.ds S' '
+.ds N' '
+.ds T' '
+'br\}
+.el\{\
+.ds -- \(em\|
+.tr \*(Tr
+.ds L" ``
+.ds R" ''
+.ds M" ``
+.ds S" ''
+.ds N" ``
+.ds T" ''
+.ds L' `
+.ds R' '
+.ds M' `
+.ds S' '
+.ds N' `
+.ds T' '
+.ds PI \(*p
+'br\}
+.\"	If the F register is turned on, we'll generate
+.\"	index entries out stderr for the following things:
+.\"		TH	Title 
+.\"		SH	Header
+.\"		Sh	Subsection 
+.\"		Ip	Item
+.\"		X<>	Xref  (embedded
+.\"	Of course, you have to process the output yourself
+.\"	in some meaningful fashion.
+.if \nF \{
+.de IX
+.tm Index:\\$1\t\\n%\t"\\$2"
+..
+.nr % 0
+.rr F
+.\}
+.TH ICONV 1 "lenny" "18/Nov/2007" "Debian GNU/Linux"
+.UC
+.if n .hy 0
+.if n .na
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.de CQ          \" put $1 in typewriter font
+.ft CW
+'if n "\c
+'if t \\&\\$1\c
+'if n \\&\\$1\c
+'if n \&"
+\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
+'.ft R
+..
+.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
+.	\" AM - accent mark definitions
+.bd B 3
+.	\" fudge factors for nroff and troff
+.if n \{\
+.	ds #H 0
+.	ds #V .8m
+.	ds #F .3m
+.	ds #[ \f1
+.	ds #] \fP
+.\}
+.if t \{\
+.	ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.	ds #V .6m
+.	ds #F 0
+.	ds #[ \&
+.	ds #] \&
+.\}
+.	\" simple accents for nroff and troff
+.if n \{\
+.	ds ' \&
+.	ds ` \&
+.	ds ^ \&
+.	ds , \&
+.	ds ~ ~
+.	ds ? ?
+.	ds ! !
+.	ds /
+.	ds q
+.\}
+.if t \{\
+.	ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.	ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.	ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.	ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.	ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.	ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
+.	ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
+.	ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.	ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
+.\}
+.	\" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
+.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
+.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
+.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.ds oe o\h'-(\w'o'u*4/10)'e
+.ds Oe O\h'-(\w'O'u*4/10)'E
+.	\" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.	\" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.	ds : e
+.	ds 8 ss
+.	ds v \h'-1'\o'\(aa\(ga'
+.	ds _ \h'-1'^
+.	ds . \h'-1'.
+.	ds 3 3
+.	ds o a
+.	ds d- d\h'-1'\(ga
+.	ds D- D\h'-1'\(hy
+.	ds th \o'bp'
+.	ds Th \o'LP'
+.	ds ae ae
+.	ds Ae AE
+.	ds oe oe
+.	ds Oe OE
+.\}
+.rm #[ #] #H #V #F C
+.SH "NAME"
+iconv - Convert encoding of given files from one encoding to another
+.SH "SYNOPSIS"
+iconv \fB\-f\fR \fIencoding\fR [\fB\-t\fR \fIencoding\fR] \fI[inputfile]\fR...
+.SH "DESCRIPTION"
+The \fBiconv\fR program converts the encoding of characters in
+\fIinputfile\fR, or from the standard input if no filename is specified,
+from one coded character set to another. The result is
+written to standard output unless otherwise specified by the
+\fB\-\-output\fR option.
+.TP
+\fB\-\-from\-code\fR, \fB\-f\fR \fIencoding\fR
+Convert characters from \fIencoding\fR.
+.TP
+\fB\-\-to\-code\fR, \fB\-t\fR \fIencoding\fR
+Convert characters to \fIencoding\fR. If not specified the 
+encoding corresponding to the current locale is used.
+.TP
+\fB\-\-list\fR, \fB\-l\fR
+List known coded character sets.
+.TP
+\fB\-c\fR
+Omit invalid characters from output.
+.TP
+\fB\-\-output\fR, \fB\-o\fR \fIfile\fR
+Specify output file (instead of stdout).
+.TP
+\fB\-\-silent\fR, \fB\-s\fR
+Suppress warnings, but not errors.
+.TP
+\fB\-\-verbose\fR
+Print progress information.
+.TP
+\fB\-\-help\fR, \fB\-?\fR
+Give help list.
+.TP
+\fB\-\-usage\fR
+Give a short usage message.
+.TP
+\fB\-\-version\fR, \fB\-V\fR
+Print program version.
+.SH ENCODINGS
+The values permitted for \fI\-\-from\-code\fP and \fI\-\-to\-code\fP can be listed
+by the \fBiconv \-\-list\fP command, and all combinations of the listed values are
+supported. Furthermore the following two suffixes are supported:
+.TP
+//TRANSLIT
+When the string "//TRANSLIT" is appended to \fI\-\-to\-code\fP, transliteration
+is activated.
+This means that when a character cannot be represented in the
+target character set, it can be approximated through one or several
+similarly looking characters.
+.TP
+//IGNORE
+When the string "//IGNORE" is appended to \fI\-\-to\-code\fP, characters that
+cannot be represented in the target character set will be silently discarded.
+
+.SH "AUTHOR"
+\fIiconv\fR was written by Ulrich Drepper as part of the GNU C Library.
+.PP
+This man page was written by Joel Klecker <espy@debian.org>,
+for the Debian GNU/Linux system.
+
+.rn }` ''
+.IX Title "ICONV 1"
+.IX Name "iconv - Convert encoding of given files from one encoding to another"
+
+.IX Header "NAME"
+
+.IX Header "SYNOPSIS"
+
+.IX Header "DESCRIPTION"
+
+.IX Header "ENCODINGS"
+
+.IX Header "AUTHOR"
+
--- eglibc-2.13.orig/debian/local/manpages/locale.alias.5
+++ eglibc-2.13/debian/local/manpages/locale.alias.5
@@ -0,0 +1,45 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 2002 Free Software Foundation, Inc.
+.\"
+.\" This program is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 2, or (at your option)
+.\" any later version.
+.\"
+.\" This program is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with this program; if not, write to the Free Software Foundation,
+.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.TH locale.alias 5 "January 2002" "Debian GNU/Linux"
+.SH "NAME"
+locale.alias \- Locale name alias data base
+.SH "DESCRIPTION"
+The locale.alias database file (/etc/locale.alias) is used by the
+.B locale
+command and the 
+.B X Window System
+. 
+It describes aliases for the locales, with each line being of the
+form 
+ 
+<alias> <localename>
+
+Where <localename> is in the POSIX format: xx_YY.CHARSET.
+The first two letters \fIxx\fR are the ISO-639 Language code,
+ the next two \fIYY\fR are the ISO-3166 Country code, 
+and the Charset is one of the  character sets (listed in 
+\fI/usr/share/i18n/charsets\fR
+).
+The aliases can be free text; they are normally the English language
+name, or simpler versions of the POSIX locale name. 
+
+Lines beginning with Hash ("#") are treated as comments and ignored.
+
+.SH "SEE ALSO"
+locale(1), localedef(1), locale-gen(8),  locale.gen(5) 
+.SH "AUTHOR"
+Alastair McKinstry <mckinstry@computer.org>
--- eglibc-2.13.orig/debian/local/manpages/locale-gen.8
+++ eglibc-2.13/debian/local/manpages/locale-gen.8
@@ -0,0 +1,101 @@
+.\" This -*- nroff -*- file has been generated from
+.\" DocBook SGML with docbook-to-man on Debian GNU/Linux.
+.\"
+.\"	transcript compatibility for postscript use.
+.\"
+.\"	synopsis:  .P! <file.ps>
+.\"
+.de P!
+\\&.
+.fl			\" force out current output buffer
+\\!%PB
+\\!/showpage{}def
+.\" the following is from Ken Flowers -- it prevents dictionary overflows
+\\!/tempdict 200 dict def tempdict begin
+.fl			\" prolog
+.sy cat \\$1\" bring in postscript file
+.\" the following line matches the tempdict above
+\\!end % tempdict %
+\\!PE
+\\!.
+.sp \\$2u	\" move below the image
+..
+.de pF
+.ie     \\*(f1 .ds f1 \\n(.f
+.el .ie \\*(f2 .ds f2 \\n(.f
+.el .ie \\*(f3 .ds f3 \\n(.f
+.el .ie \\*(f4 .ds f4 \\n(.f
+.el .tm ? font overflow
+.ft \\$1
+..
+.de fP
+.ie     !\\*(f4 \{\
+.	ft \\*(f4
+.	ds f4\"
+'	br \}
+.el .ie !\\*(f3 \{\
+.	ft \\*(f3
+.	ds f3\"
+'	br \}
+.el .ie !\\*(f2 \{\
+.	ft \\*(f2
+.	ds f2\"
+'	br \}
+.el .ie !\\*(f1 \{\
+.	ft \\*(f1
+.	ds f1\"
+'	br \}
+.el .tm ? font underflow
+..
+.ds f1\"
+.ds f2\"
+.ds f3\"
+.ds f4\"
+'\" t 
+.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n  
+.TH "LOCALE-GEN" "8" 
+.SH "NAME" 
+locale-gen \(em generates localisation files from templates 
+.SH "SYNOPSIS" 
+.PP 
+\fBlocale-gen\fP 
+.SH "DESCRIPTION" 
+.PP 
+This manual page documents briefly the 
+\fBlocale-gen\fP command. 
+.PP 
+By default, the locale package which provides the base support for 
+localisation of libc-based programs does not contain usable localisation 
+files for every supported language. This limitation has became necessary 
+because of the substantial size of such files and the large number of 
+languages supported by libc. As a result, Debian uses a special 
+mechanism where we prepare the actual localisation files on the target 
+host and distribute only the templates for them. 
+.PP 
+\fBlocale-gen\fP is a program that reads the file 
+\fB/etc/locale.gen\fP and invokes 
+\fBlocaledef\fP for the chosen localisation profiles. 
+Run \fBlocale-gen\fP after you have modified the \fB/etc/locale.gen\fP file. 
+ 
+ 
+.SH "FILES" 
+.PP 
+\fB/etc/locale.gen\fP 
+.PP 
+The main configuration file, which has a simple format: every 
+line that is not empty and does not begin with a # is treated as a 
+locale definition that is to be built. 
+ 
+.SH "SEE ALSO" 
+.PP 
+localedef(1), locale(1), locale.gen(5). 
+.SH "AUTHOR" 
+.PP 
+This manual page was written by Eduard Bloch <blade@debian.org> for 
+the \fBDebian GNU/Linux\fP system (but may be used by others).  Permission is 
+granted to copy, distribute and/or modify this document under 
+the terms of the GNU Free Documentation 
+License, Version 1.1 or any later version published by the Free 
+Software Foundation; with no Invariant Sections, no Front-Cover 
+Texts and no Back-Cover Texts. 
+.\" created by instant / docbook-to-man, Sat 02 Mar 2002, 16:43 
--- eglibc-2.13.orig/debian/local/manpages/zic.8
+++ eglibc-2.13/debian/local/manpages/zic.8
@@ -0,0 +1,413 @@
+.TH ZIC 8
+.SH NAME
+zic \- time zone compiler
+.SH SYNOPSIS
+.B zic
+[
+.B \-v
+] [
+.B \-d
+.I directory
+] [
+.B \-l
+.I localtime
+] [
+.B \-p
+.I posixrules
+] [
+.B \-L
+.I leapsecondfilename
+] [
+.B \-s
+] [
+.B \-y
+.I command
+] [
+.I filename
+\&... ]
+.SH DESCRIPTION
+.if t .ds lq ``
+.if t .ds rq ''
+.if n .ds lq \&"\"
+.if n .ds rq \&"\"
+.de q
+\\$3\*(lq\\$1\*(rq\\$2
+..
+.I Zic
+reads text from the file(s) named on the command line
+and creates the time conversion information files specified in this input.
+If a
+.I filename
+is
+.BR \- ,
+the standard input is read.
+.PP
+These options are available:
+.TP
+.BI "\-d " directory
+Create time conversion information files in the named directory rather than
+in the standard directory named below.
+.TP
+.BI "\-l " timezone
+Use the given time zone as local time.
+.I Zic
+will act as if the input contained a link line of the form
+.sp
+.ti +.5i
+Link	\fItimezone\fP		localtime
+.TP
+.BI "\-p " timezone
+Use the given time zone's rules when handling POSIX-format
+time zone environment variables.
+.I Zic
+will act as if the input contained a link line of the form
+.sp
+.ti +.5i
+Link	\fItimezone\fP		posixrules
+.TP
+.BI "\-L " leapsecondfilename
+Read leap second information from the file with the given name.
+If this option is not used,
+no leap second information appears in output files.
+.TP
+.B \-v
+Complain if a year that appears in a data file is outside the range
+of years representable by
+.IR time (2)
+values.
+.TP
+.B \-s
+Limit time values stored in output files to values that are the same
+whether they're taken to be signed or unsigned.
+You can use this option to generate SVVS-compatible files.
+.TP
+.BI "\-y " command
+Use the given
+.I command
+rather than
+.B yearistype
+when checking year types (see below).
+.PP
+Input lines are made up of fields.
+Fields are separated from one another by any number of white space characters.
+Leading and trailing white space on input lines is ignored.
+An unquoted sharp character (#) in the input introduces a comment which extends
+to the end of the line the sharp character appears on.
+White space characters and sharp characters may be enclosed in double quotes
+(") if they're to be used as part of a field.
+Any line that is blank (after comment stripping) is ignored.
+Non-blank lines are expected to be of one of three types:
+rule lines, zone lines, and link lines.
+.PP
+A rule line has the form
+.nf
+.ti +.5i
+.ta \w'Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u
+.sp
+Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+.sp
+For example:
+.ti +.5i
+.sp
+Rule	US	1967	1973	\-	Apr	lastSun	2:00	1:00	D
+.sp
+.fi
+The fields that make up a rule line are:
+.TP "\w'LETTER/S'u"
+.B NAME
+Gives the (arbitrary) name of the set of rules this rule is part of.
+.TP
+.B FROM
+Gives the first year in which the rule applies.
+Any integer year can be supplied; the Gregorian calendar is assumed.
+The word
+.B minimum
+(or an abbreviation) means the minimum year representable as an integer.
+The word
+.B maximum
+(or an abbreviation) means the maximum year representable as an integer.
+Rules can describe times that are not representable as time values,
+with the unrepresentable times ignored; this allows rules to be portable
+among hosts with differing time value types.
+.TP
+.B TO
+Gives the final year in which the rule applies.
+In addition to
+.B minimum
+and
+.B maximum
+(as above),
+the word
+.B only
+(or an abbreviation)
+may be used to repeat the value of the
+.B FROM
+field.
+.TP
+.B TYPE
+Gives the type of year in which the rule applies.
+If
+.B TYPE
+is
+.B \-
+then the rule applies in all years between
+.B FROM
+and
+.B TO
+inclusive.
+If
+.B TYPE
+is something else, then
+.I zic
+executes the command
+.ti +.5i
+\fByearistype\fP \fIyear\fP \fItype\fP
+.br
+to check the type of a year:
+an exit status of zero is taken to mean that the year is of the given type;
+an exit status of one is taken to mean that the year is not of the given type.
+.TP
+.B IN
+Names the month in which the rule takes effect.
+Month names may be abbreviated.
+.TP
+.B ON
+Gives the day on which the rule takes effect.
+Recognized forms include:
+.nf
+.in +.5i
+.sp
+.ta \w'Sun<=25\0\0'u
+5	the fifth of the month
+lastSun	the last Sunday in the month
+lastMon	the last Monday in the month
+Sun>=8	first Sunday on or after the eighth
+Sun<=25	last Sunday on or before the 25th
+.fi
+.in -.5i
+.sp
+Names of days of the week may be abbreviated or spelled out in full.
+Note that there must be no spaces within the
+.B ON
+field.
+.TP
+.B AT
+Gives the time of day at which the rule takes effect.
+Recognized forms include:
+.nf
+.in +.5i
+.sp
+.ta \w'1:28:13\0\0'u
+2	time in hours
+2:00	time in hours and minutes
+15:00	24-hour format time (for times after noon)
+1:28:14	time in hours, minutes, and seconds
+.fi
+.in -.5i
+.sp
+where hour 0 is midnight at the start of the day,
+and hour 24 is midnight at the end of the day.
+Any of these forms may be followed by the letter
+.B w
+if the given time is local
+.q "wall clock"
+time,
+.B s
+if the given time is local
+.q standard
+time, or
+.B u
+(or
+.B g
+or
+.BR z )
+if the given time is universal time;
+in the absence of an indicator,
+wall clock time is assumed.
+.TP
+.B SAVE
+Gives the amount of time to be added to local standard time when the rule is in
+effect.
+This field has the same format as the
+.B AT
+field
+(although, of course, the
+.B w
+and
+.B s
+suffixes are not used).
+.TP
+.B LETTER/S
+Gives the
+.q "variable part"
+(for example, the
+.q S
+or
+.q D
+in
+.q EST
+or
+.q EDT )
+of time zone abbreviations to be used when this rule is in effect.
+If this field is
+.BR \- ,
+the variable part is null.
+.PP
+A zone line has the form
+.sp
+.nf
+.ti +.5i
+.ta \w'Zone\0\0'u +\w'Australia/Adelaide\0\0'u +\w'GMTOFF\0\0'u +\w'RULES/SAVE\0\0'u +\w'FORMAT\0\0'u
+Zone	NAME	GMTOFF	RULES/SAVE	FORMAT	[UNTIL]
+.sp
+For example:
+.sp
+.ti +.5i
+Zone	Australia/Adelaide	9:30	Aus	CST	1971 Oct 31 2:00
+.sp
+.fi
+The fields that make up a zone line are:
+.TP "\w'GMTOFF'u"
+.B NAME
+The name of the time zone.
+This is the name used in creating the time conversion information file for the
+zone.
+.TP
+.B GMTOFF
+The amount of time to add to UTC to get standard time in this zone.
+This field has the same format as the
+.B AT
+and
+.B SAVE
+fields of rule lines;
+begin the field with a minus sign if time must be subtracted from UTC.
+.TP
+.B RULES/SAVE
+The name of the rule(s) that apply in the time zone or,
+alternately, an amount of time to add to local standard time.
+If this field is
+.B \-
+then standard time always applies in the time zone.
+.TP
+.B FORMAT
+The format for time zone abbreviations in this time zone.
+The pair of characters
+.B %s
+is used to show where the
+.q "variable part"
+of the time zone abbreviation goes.
+Alternately,
+a slash (/)
+separates standard and daylight abbreviations.
+.TP
+.B UNTIL
+The time at which the UTC offset or the rule(s) change for a location.
+It is specified as a year, a month, a day, and a time of day.
+If this is specified,
+the time zone information is generated from the given UTC offset
+and rule change until the time specified.
+The month, day, and time of day have the same format as the IN, ON, and AT
+columns of a rule; trailing columns can be omitted, and default to the
+earliest possible value for the missing columns.
+.IP
+The next line must be a
+.q continuation
+line; this has the same form as a zone line except that the
+string
+.q Zone
+and the name are omitted, as the continuation line will
+place information starting at the time specified as the
+.B UNTIL
+field in the previous line in the file used by the previous line.
+Continuation lines may contain an
+.B UNTIL
+field, just as zone lines do, indicating that the next line is a further
+continuation.
+.PP
+A link line has the form
+.sp
+.nf
+.ti +.5i
+.ta \w'Link\0\0'u +\w'Europe/Istanbul\0\0'u
+Link	LINK-FROM	LINK-TO
+.sp
+For example:
+.sp
+.ti +.5i
+Link	Europe/Istanbul	Asia/Istanbul
+.sp
+.fi
+The
+.B LINK-FROM
+field should appear as the
+.B NAME
+field in some zone line;
+the
+.B LINK-TO
+field is used as an alternate name for that zone.
+.PP
+Except for continuation lines,
+lines may appear in any order in the input.
+.PP
+Lines in the file that describes leap seconds have the following form:
+.nf
+.ti +.5i
+.ta \w'Leap\0\0'u +\w'YEAR\0\0'u +\w'MONTH\0\0'u +\w'DAY\0\0'u +\w'HH:MM:SS\0\0'u +\w'CORR\0\0'u
+.sp
+Leap	YEAR	MONTH	DAY	HH:MM:SS	CORR	R/S
+.sp
+For example:
+.ti +.5i
+.sp
+Leap	1974	Dec	31	23:59:60	+	S
+.sp
+.fi
+The
+.BR YEAR ,
+.BR MONTH ,
+.BR DAY ,
+and
+.B HH:MM:SS
+fields tell when the leap second happened.
+The
+.B CORR
+field
+should be
+.q +
+if a second was added
+or
+.q -
+if a second was skipped.
+.\" There's no need to document the following, since it's impossible for more
+.\" than one leap second to be inserted or deleted at a time.
+.\" The C Standard is in error in suggesting the possibility.
+.\" See Terry J Quinn, The BIPM and the accurate measure of time,
+.\" Proc IEEE 79, 7 (July 1991), 894-905.
+.\"	or
+.\"	.q ++
+.\"	if two seconds were added
+.\"	or
+.\"	.q --
+.\"	if two seconds were skipped.
+The
+.B R/S
+field
+should be (an abbreviation of)
+.q Stationary
+if the leap second time given by the other fields should be interpreted as UTC
+or
+(an abbreviation of)
+.q Rolling
+if the leap second time given by the other fields should be interpreted as
+local wall clock time.
+.SH NOTE
+For areas with more than two types of local time,
+you may need to use local standard time in the
+.B AT
+field of the earliest transition time's rule to ensure that
+the earliest transition time recorded in the compiled file is correct.
+.SH FILE
+/usr/share/zoneinfo	standard directory used for created files
+.SH "SEE ALSO"
+ctime(3), zdump(1)
+.\" @(#)zic.8	7.18
--- eglibc-2.13.orig/debian/local/manpages/sprof.1
+++ eglibc-2.13/debian/local/manpages/sprof.1
@@ -0,0 +1,230 @@
+.rn '' }`
+.\" $RCSfile: sprof.1,v $$Revision: 1.1.2.1 $$Date: 2003/09/22 21:33:35 $
+.\"
+.\" $Log: sprof.1,v $
+.\" Revision 1.1.2.1  2003/09/22 21:33:35  jbailey
+.\" New directory for things we add to the package
+.\"
+.\"
+.de Sh
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp
+.if t .sp .5v
+.if n .sp
+..
+.de Ip
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.de Vb
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve
+.ft R
+
+.fi
+..
+.\"
+.\"
+.\"     Set up \*(-- to give an unbreakable dash;
+.\"     string Tr holds user defined translation string.
+.\"     Bell System Logo is used as a dummy character.
+.\"
+.tr \(*W-|\(bv\*(Tr
+.ie n \{\
+.ds -- \(*W-
+.ds PI pi
+.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+.ds L" ""
+.ds R" ""
+.\"   \*(M", \*(S", \*(N" and \*(T" are the equivalent of
+.\"   \*(L" and \*(R", except that they are used on ".xx" lines,
+.\"   such as .IP and .SH, which do another additional levels of
+.\"   double-quote interpretation
+.ds M" """
+.ds S" """
+.ds N" """""
+.ds T" """""
+.ds L' '
+.ds R' '
+.ds M' '
+.ds S' '
+.ds N' '
+.ds T' '
+'br\}
+.el\{\
+.ds -- \(em\|
+.tr \*(Tr
+.ds L" ``
+.ds R" ''
+.ds M" ``
+.ds S" ''
+.ds N" ``
+.ds T" ''
+.ds L' `
+.ds R' '
+.ds M' `
+.ds S' '
+.ds N' `
+.ds T' '
+.ds PI \(*p
+'br\}
+.\"	If the F register is turned on, we'll generate
+.\"	index entries out stderr for the following things:
+.\"		TH	Title 
+.\"		SH	Header
+.\"		Sh	Subsection 
+.\"		Ip	Item
+.\"		X<>	Xref  (embedded
+.\"	Of course, you have to process the output yourself
+.\"	in some meaningful fashion.
+.if \nF \{
+.de IX
+.tm Index:\\$1\t\\n%\t"\\$2"
+..
+.nr % 0
+.rr F
+.\}
+.TH SPROF 1 "etch" "7/Jan/2001" "Debian GNU/Linux"
+.UC
+.if n .hy 0
+.if n .na
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.de CQ          \" put $1 in typewriter font
+.ft CW
+'if n "\c
+'if t \\&\\$1\c
+'if n \\&\\$1\c
+'if n \&"
+\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
+'.ft R
+..
+.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
+.	\" AM - accent mark definitions
+.bd B 3
+.	\" fudge factors for nroff and troff
+.if n \{\
+.	ds #H 0
+.	ds #V .8m
+.	ds #F .3m
+.	ds #[ \f1
+.	ds #] \fP
+.\}
+.if t \{\
+.	ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.	ds #V .6m
+.	ds #F 0
+.	ds #[ \&
+.	ds #] \&
+.\}
+.	\" simple accents for nroff and troff
+.if n \{\
+.	ds ' \&
+.	ds ` \&
+.	ds ^ \&
+.	ds , \&
+.	ds ~ ~
+.	ds ? ?
+.	ds ! !
+.	ds /
+.	ds q
+.\}
+.if t \{\
+.	ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.	ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.	ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.	ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.	ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.	ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
+.	ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
+.	ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.	ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
+.\}
+.	\" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
+.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
+.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
+.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.ds oe o\h'-(\w'o'u*4/10)'e
+.ds Oe O\h'-(\w'O'u*4/10)'E
+.	\" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.	\" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.	ds : e
+.	ds 8 ss
+.	ds v \h'-1'\o'\(aa\(ga'
+.	ds _ \h'-1'^
+.	ds . \h'-1'.
+.	ds 3 3
+.	ds o a
+.	ds d- d\h'-1'\(ga
+.	ds D- D\h'-1'\(hy
+.	ds th \o'bp'
+.	ds Th \o'LP'
+.	ds ae ae
+.	ds Ae AE
+.	ds oe oe
+.	ds Oe OE
+.\}
+.rm #[ #] #H #V #F C
+.SH "NAME"
+sprof \- Read and display shared object profiling data
+.SH "SYNOPSIS"
+\fBsprof\fR \fB\-p\fR|\fB\-c\fR [\fB\-q\fR]
+.SH "DESCRIPTION"
+\fB--call-pairs\fR, \fB\-c\fR
+.PP
+.Vb 1
+\&        print list of count paths and their number of use
+.Ve
+\fB--flat-profile\fR, \fB\-p\fR
+.PP
+.Vb 1
+\&        generate flat profile with counts and ticks
+.Ve
+\fB--graph\fR, \fB\-q\fR
+.PP
+.Vb 1
+\&        generate call graph
+.Ve
+.SH "AUTHOR"
+\fIsprof\fR was written by Ulrich Drepper for the GNU C Library
+.PP
+This man page was written by Joel Klecker <espy@debian.org> for
+the Debian GNU/Linux system.
+
+.rn }` ''
+.IX Title "SPROF 1"
+.IX Name "sprof - Read and display shared object profiling data"
+
+.IX Header "NAME"
+
+.IX Header "SYNOPSIS"
+
+.IX Header "DESCRIPTION"
+
+.IX Header "AUTHOR"
+
--- eglibc-2.13.orig/debian/local/manpages/update-locale.8
+++ eglibc-2.13/debian/local/manpages/update-locale.8
@@ -0,0 +1,49 @@
+.TH UPDATE-LOCALE 8 "April 2006" "Debian GNU/Linux"
+.SH "NAME"
+.LP 
+update-locale \- Modify global locale settings
+.SH "SYNTAX"
+.LP 
+update-locale 
+.RI [ OPTIONS ]
+[\fIvar\fP=\fIlocale\fP | \fIvar\fP]
+[...]
+.SH "DESCRIPTION"
+.LP 
+This program can be called by maintainer scripts when Debian packages are
+installed or removed, it updates the \fB/etc/default/locale\fP file to
+reflect changes in system configuration related to global locale settings.
+When variables have no value assigned, they are removed from the locale
+file.
+Some basic checks are performed to ensure that requested settings are valid.
+.SH "OPTIONS"
+.TP
+.B \-\-help
+Display an help message and exit.
+.TP
+.B \-\-reset
+Variables which are not set on command-line are cleared out.
+.TP
+.BI \-\-locale\-file " FILE"
+Define file containing locale variables.  (Default:
+.BR /etc/default/locale )
+.TP
+.B \-\-no\-checks
+Do not perform sanity checks on locale variables.
+.SH "EXAMPLE"
+.nf
+The command
+.ft B
+        update-locale LANG=en_CA.UTF-8 LANGUAGE
+.ft R
+sets \fBLANG\fP to \fBen_CA.UTF-8\fP and removes definitions for \fBLANGUAGE\fP.
+.SH "FILES"
+.TP 
+.B /etc/default/locale
+File where global locale settings are stored.
+.SH "AUTHOR"
+.LP 
+Denis Barbier <barbier@linuxfr.org>
+.SH "SEE ALSO"
+.LP 
+locale\-gen(8), locale(1)
--- eglibc-2.13.orig/debian/local/manpages/ld.so.8
+++ eglibc-2.13/debian/local/manpages/ld.so.8
@@ -0,0 +1,318 @@
+.TH "LD.SO" 8 "26 May 2007"
+.SH NAME
+ld.so/ld-linux.so \- dynamic linker/loader
+.SH DESCRIPTION
+.B ld.so
+loads the shared libraries needed by a program, prepares the program
+to run, and then runs it.
+Unless explicitly specified via the
+.B \-static
+option to
+.B ld
+during compilation, all Linux programs are incomplete and require 
+further linking at run time.
+.PP
+The necessary shared libraries needed by the program are searched for 
+in the following order
+.IP o
+Using the environment variable
+.B LD_LIBRARY_PATH
+.RB ( LD_AOUT_LIBRARY_PATH
+for a.out programs).
+Except if the executable is a setuid/setgid binary, in which case it
+is ignored.
+.IP o
+From the cache file
+.BR /etc/ld.so.cache
+which contains a compiled list of candidate libraries previously found
+in the augmented library path. Libraries installed in hardware capabilities
+directories (see below) are prefered to other libraries.
+.IP o
+In the default path
+.BR /lib ,
+and then
+.BR /usr/lib .
+.SH COMMAND LINE OPTIONS
+.TP
+.B \-\-list
+List all dependencies and how they are resolved.
+.TP
+.B \-\-verify
+Verify that program is dynamically linked and this dynamic linker can handle
+it.
+.TP
+.B \-\-library\-path PATH
+Override
+.B LD_LIBRARY_PATH
+environment variable setting (see below).
+.TP
+.B \-\-ignore\-rpath LIST
+Ignore RPATH and RUNPATH information in object names in LIST.
+This option has been supported by glibc2 for about one hour.
+Then it was renamed into:
+.TP
+.B \-\-inhibit\-rpath LIST
+.SH ENVIRONMENT
+There are four important environment variables.
+.TP
+.B LD_BIND_NOW
+If set to a nonempty string,
+causes the dynamic linker to resolve all symbols
+at program startup instead of deferring function call resolution to the point
+when they are first referenced.
+This is useful when using a debugger.
+.TP
+.B LD_LIBRARY_PATH
+A colon-separated list of directories in which to search for
+ELF libraries at execution-time.
+Similar to the 
+.B PATH
+environment variable.
+.TP
+.B LD_PRELOAD
+A whitespace-separated list of additional, user-specified, ELF shared 
+libraries to be loaded before all others.
+This can be used to selectively override functions in other shared libraries.
+For setuid/setgid ELF binaries, only libraries in the standard search
+directories that are also setgid will be loaded.
+.TP
+.B LD_TRACE_LOADED_OBJECTS
+If set to a nonempty string, causes the program to list its dynamic library
+dependencies, as if run by
+.BR ldd (1),
+instead of running normally.
+.LP
+Then there are lots of more or less obscure variables,
+many obsolete or only for internal use.
+.TP
+.B LD_AOUT_LIBRARY_PATH
+A colon-separated list of directories in which to search for
+a.out libraries at execution-time.
+Similar to the 
+.B PATH
+environment variable.
+.TP
+.B LD_AOUT_PRELOAD
+The name of an additional, user-specified, a.out shared library to be loaded 
+after all others.
+This can be used to selectively override functions in other shared libraries.
+.TP
+.B LD_ASSUME_KERNEL
+Every DSO (Dynamic Shared Object, aka shared library) can tell the dynamic linker in glibc which
+minimum OS ABI version is needed. The information about the minimum OS ABI version is encoded in
+a ELF note section usually named .note.ABI-tag. This is used to determine which library to load
+when multiple version of the same library is installed on the system.
+The
+.B LD_ASSUME_KERNEL
+environment variable overrides the kernel version used by the dynamic linker to determine 
+which library to load.
+.TP
+.B LD_AUDIT
+A colon-separated list of user-specified, ELF shared objects
+to be loaded before all others in a separate linker namespace
+(i.e., one that does not intrude upon the normal symbol bindings that
+would occur in the process).
+These libraries can be used to audit the operation of the dynamic linker.
+.B LD_AUDIT
+is ignored for set-user-ID/set-group-ID binaries.
+
+The dynamic linker will notify the audit
+libraries at so-called auditing checkpoints\(emfor example,
+loading a new library, resolving a symbol,
+or calling a symbol from another shared object\(emby
+calling an appropriate function within the audit library.
+For details, see
+.BR rtld-audit (7).
+The auditing interface is largely compatible with that provided on Solaris,
+as described in its
+.IR "Linker and Libraries Guide" ,
+in the chapter
+.IR "Runtime Linker Auditing Interface" .
+.TP
+.B LD_BIND_NOT 
+Do not update the GOT (global offset table) and PLT (procedure linkage table) after resolving a symbol.
+.TP
+.B LD_DEBUG
+Output verbose debugging information about the dynamic linker.
+If set to `all' prints all debugging information it has, if set to
+`help' prints a help message about which categories can be specified
+in this environment variable.
+.TP
+.B LD_DEBUG_OUTPUT
+File where LD_DEBUG output should be fed into, default is standard
+output. LD_DEBUG_OUTPUT is ignored for setuid/setgid binaries.
+.TP
+.B LD_DYNAMIC_WEAK
+Allow weak symbols to be overridden (reverting to old glibc behavior).
+For security reasons, since glibc 2.3.4,
+.B LD_DYNAMIC_WEAK
+is ignored for set-user-ID/set-group-ID binaries.
+.TP
+.B LD_HWCAP_MASK
+Mask for hardware capabilities.
+.TP
+.B LD_KEEPDIR
+Don't ignore the directory in the names of a.out libraries to be loaded.
+Use of this option is strongly discouraged.
+.TP
+.B LD_NOWARN
+Suppress warnings about a.out libraries with incompatible minor 
+version numbers.
+.TP
+.B LD_ORIGIN_PATH
+Path where the binary is found (for non-set-user-ID programs).
+For security reasons, since glibc 2.4,
+.B LD_ORIGIN_PATH
+is ignored for set-user-ID/set-group-ID binaries.
+.TP
+.B LD_POINTER_GUARD
+Set to 0 to disable pointer guarding.
+Any other value enables pointer guarding, which is also the default.
+Pointer guarding is a security mechanism whereby some pointers to code
+stored in writable program memory (return addresses saved by
+.BR setjmp (3)
+or function pointers used by various glibc internals) are mangled
+semi-randomly to make it more difficult for an attacker to hijack
+the pointers for use in the event of a buffer overrun or
+stack-smashing attack.
+.TP
+.B LD_PROFILE
+Shared object to be profiled.
+.TP
+.B
+LD_PROFILE_OUTPUT
+File where
+.B LD_PROFILE
+output should be written.
+If this variable is not defined, or is defined as an empty string,
+then the default is
+.IR /var/tmp .
+.B LD_PROFILE_OUTPUT
+is ignored for set-user-ID and set-group-ID programs,
+which always use
+.IR /var/profile .
+.TP
+.B LD_SHOW_AUXV
+Show auxiliary array passed up from the kernel.
+For security reasons, since glibc 2.3.5,
+.B LD_SHOW_AUXV
+is ignored for set-user-ID/set-group-ID binaries.
+.TP
+.B LD_USE_LOAD_BIAS
+By default (i.e., if this variable is not defined)
+executables and prelinked
+shared objects will honor base addresses of their dependent libraries
+and (nonprelinked) position-independent executables (PIEs)
+and other shared objects will not honor them.
+If
+.B LD_USE_LOAD_BIAS
+is defined wit the value, both executables and PIEs
+will honor the base addresses.
+If
+.B LD_USE_LOAD_BIAS
+is defined with the value 0,
+neither executables nor PIEs will honor the base addresses.
+This variable is ignored by set-user-ID and set-group-ID programs.
+.TP
+.B LD_VERBOSE
+If set to non-empty string, output symbol versioning information
+about the program if querying information about the program (ie. either
+.B LD_TRACE_LOADED_OBJECTS
+has been set, or --list or --verify options have been given to the dynamic linker).
+.TP
+.B LD_WARN
+If set to non-empty string, warn about unresolved symbols.
+.SH RPATH TOKEN EXPANSION
+The runtime linker provides a number of tokens that can be used in an rpath 
+specification (\fBDT_RPATH\fR or \fBDT_RUNPATH\fR).
+.TP
+.B $ORIGIN
+ld.so understands the string \fB$ORIGIN\fR (or equivalently \fB${ORIGIN}\fR) 
+in an rpath specification to mean the directory containing the application
+executable. Thus, an application located in somedir/app could be compiled
+with gcc -Wl,-rpath,'$ORIGIN/../lib' so that it finds an associated shared
+library in somedir/lib no matter where somedir is located in the directory 
+hierarchy.
+.TP
+.B $PLATFORM
+The string \fB$PLATFORM\fR (or equivalently \fB${PLATFORM}\fR) in an rpath
+specifcation expands to the processor type of the current machine. Please note
+that on some architectures the Linux kernel doesn't provide a platform
+string to the dynamic linker.
+.TP
+.B $LIB
+The string \fB$LIB\fR (or equivalently \fB${LIB}\fR) in an rpath corresponds
+to the system libraries directory, which is /lib for the native architecture
+on FHS compliant GNU/Linux systems.
+.SH HARDWARE CAPABILITIES
+Libraries might be compiled using hardware-specific instructions which do not
+exist on all CPU. Such libraries should be installed in directories whose name
+defines the hardware capabilities such as \fB/usr/lib/sse2/\fR. The dynamic 
+linker checks these directories against the hardware of the machine and selects
+the best suitable version of a given library. Hardware capabilities directories
+could be cascaded to combine CPU features. Hardware capabilities depends on
+the CPU. The following names are currently recognized:
+.TP
+.B Alpha
+ev4, ev5, ev56, ev6, ev67
+.TP
+.B MIPS
+loongson2e, loongson2f, octeon, octeon2
+.TP
+.B PowerPC
+4xxmac, altivec, arch_2_05, arch_2_06, booke, cellbe, dfp, efpdouble, efpsingle,
+fpu, ic_snoop, mmu, notb, pa6t, power4, power5, power5+, power6x, ppc32, ppc601,
+ppc64, smt, spe, ucache, vsx
+.TP
+.B SPARC
+flush, muldiv, stbar, swap, ultra3, v9, v9v, v9v2
+.TP
+.B s390
+dfp, eimm, esan3, etf3enh, g5, highgprs, hpage, ldisp, msa, stfle,
+z900, z990, z9-109, z10, zarch
+.TP
+.TP
+.B x86 (32-bit only)
+acpi, apic, clflush, cmov, cx8, dts, fxsr, ht, i386, i486, i586, i686, mca, mmx, 
+mtrr, pat, pbe, pge, pn, pse36, sep, ss, sse, sse2, tm
+.SH FILES
+.PD 0
+.TP 20
+.B /lib/ld.so
+a.out dynamic linker/loader
+.TP 20
+.B /lib/ld-linux.so.*
+ELF dynamic linker/loader
+.TP
+.B /etc/ld.so.cache
+File containing a compiled list of directories in which to search for
+libraries and an ordered list of candidate libraries.
+.TP
+.B /etc/ld.so.preload
+File containing a whitespace separated list of ELF shared libraries to
+be loaded before the program.
+libraries and an ordered list of candidate libraries.
+.TP
+.B /etc/ld.so.nohwcap
+When this file is present the dynamic linker will load the non-optimized version
+of a library, even if the CPU supports the optimized version.
+.TP
+.B lib*.so*
+shared libraries
+.PD
+.SH SEE ALSO
+.BR ldd (1),
+.BR ldconfig (8).
+.SH BUGS
+.LP
+Currently
+.B ld.so
+has no means of unloading and searching for compatible or newer version of
+libraries.
+.PP
+.B ld.so
+functionality is only available for executables compiled using libc version
+4.4.3 or greater.
+.SH AUTHORS
+David Engel, Eric Youngdale, Peter MacDonald, Hongjiu Lu, Linus
+Torvalds, Lars Wirzenius and Mitch D'Souza (not necessarily in that order).
--- eglibc-2.13.orig/debian/local/manpages/ldconfig.8
+++ eglibc-2.13/debian/local/manpages/ldconfig.8
@@ -0,0 +1,167 @@
+.TH ldconfig 8 "25 February 2008"
+.SH NAME
+ldconfig \- configure dynamic linker run-time bindings
+.SH SYNOPSIS
+ldconfig
+.RB [OPTION...]
+.SH DESCRIPTION
+.B ldconfig
+creates, updates, and removes the necessary links and cache (for use by the run-time linker,
+.IR ld.so )
+to the most recent shared libraries found in the directories specified
+on the command line, in the file
+.IR /etc/ld.so.conf ,
+and in the trusted directories
+.RI ( /usr/lib
+and
+.IR /lib ).
+.B ldconfig
+checks the header and file names of the libraries it encounters when
+determining which versions should have their links updated.
+.B ldconfig
+ignores symbolic links when scanning for libraries.
+.PP
+.B ldconfig
+will attempt to deduce the type of ELF libs (ie. libc 5.x or libc 6.x (glibc))
+based on what C libraries if any the library was linked against, therefore when
+making dynamic libraries, it is wise to explicitly link against libc (use -lc).
+.B ldconfig
+is capable of storing multiple ABI types of libraries into a single cache on
+architectures which allow native running of multiple ABIs, like
+ia32/ia64/x86_64 or sparc32/sparc64.
+.PP
+Some existing libs do not contain enough information to allow the deduction of
+their type, therefore the
+.IR /etc/ld.so.conf
+file format allows the specification of an expected type.  This is
+.B only
+used for those ELF libs which we can not work out. The format
+is like this "dirname=TYPE", where type can be libc4, libc5 or libc6.
+(This syntax also works on the command line).  Spaces are
+.B not
+allowed. Also see the
+.B -p
+option.
+.PP
+Directory names containing an
+.B =
+are no longer legal unless they also have an expected type specifier.
+.PP
+.B ldconfig
+should normally be run by the super-user as it may require write
+permission on some root owned directories and files. If you use
+.B -r
+option to change the root directory, you don't have to be super-user though
+as long as you have sufficient right to that directory tree.
+.SH OPTIONS
+.TP
+.B \-v\ \-\-verbose
+Verbose mode.
+Print current version number, the name of each directory as it
+is scanned and any links that are created.
+.TP
+.B \-n
+Only process directories specified on the command line.
+Don't process the trusted directories
+.RI ( /usr/lib
+and
+.IR /lib )
+nor those specified in
+.IR /etc/ld.so.conf .
+Implies
+.BR \-N .
+.TP
+.B \-N
+Don't rebuild the cache.
+Unless
+.B \-X
+is also specified, links are still updated.
+.TP
+.B \-X
+Don't update links.
+Unless
+.B \-N
+is also specified, the cache is still rebuilt.
+.TP
+.B \-f conf
+Use
+.B conf
+instead of
+.IR /etc/ld.so.conf .
+.TP
+.B \-C cache
+Use
+.B cache
+instead of
+.IR /etc/ld.so.cache .
+.TP
+.B \-r root
+Change to and use
+.B root
+as the root directory.
+.TP
+.B \-l
+Library mode.
+Manually link individual libraries.
+Intended for use by experts only.
+.TP
+.B \-p\ \-\-print-cache
+Print the lists of directories and candidate libraries stored in
+the current cache.
+.TP
+.B \-c\ \-\-format=FORMAT
+Use
+.B FORMAT
+for the cache file. Choices are old, new and compat (the default).
+.TP
+.B \-i \-\-ignore-aux-cache
+Ignore auxiliary cache file.
+.TP
+.B \-?\ \-\-help \-\-usage
+Print usage information.
+.TP
+.B \-V\ \-\-version
+Print version and exit.
+.SH EXAMPLES
+.RS
+# /sbin/ldconfig -v
+.RE
+will set up the correct links for the shared binaries and rebuild
+the cache.
+.RS
+# /sbin/ldconfig -n /lib
+.RE
+as root after the installation of a new shared library will properly update the
+shared library symbolic links in /lib.
+.SH FILES
+.PD 0
+.TP 20
+.B /lib/ld-linux.so.*
+execution time linker/loader
+.TP 20
+.B /etc/ld.so.conf
+File containing a list of newline separated directories in which to search for libraries.
+.TP 20
+.B /etc/ld.so.cache
+File containing an ordered list of libraries found in the directories
+specified in
+.BR /etc/ld.so.conf .
+This file is not in human readable format, and is not intended to be
+edited.
+.TP
+.B lib*.so.version
+shared libraries
+.PD
+.SH SEE ALSO
+.BR ldd (1),
+.BR ld.so (8).
+.SH BUGS
+.LP
+.BR ldconfig ,
+being a user process, must be run manually and has no means of dynamically
+determining and relinking shared libraries for use by
+.BR ld.so
+when a new shared library is installed.
+.SH AUTHORS
+Andreas Jaeger.
+Manual page written by David Engel and Mitch D'Souza.
--- eglibc-2.13.orig/debian/local/manpages/catchsegv.1
+++ eglibc-2.13/debian/local/manpages/catchsegv.1
@@ -0,0 +1,218 @@
+.rn '' }`
+.\" $RCSfile: catchsegv.1,v $$Revision: 1.1.2.1 $$Date: 2003/09/22 21:33:35 $
+.\"
+.\" $Log: catchsegv.1,v $
+.\" Revision 1.1.2.1  2003/09/22 21:33:35  jbailey
+.\" New directory for things we add to the package
+.\"
+.\"
+.de Sh
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp
+.if t .sp .5v
+.if n .sp
+..
+.de Ip
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.de Vb
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve
+.ft R
+
+.fi
+..
+.\"
+.\"
+.\"     Set up \*(-- to give an unbreakable dash;
+.\"     string Tr holds user defined translation string.
+.\"     Bell System Logo is used as a dummy character.
+.\"
+.tr \(*W-|\(bv\*(Tr
+.ie n \{\
+.ds -- \(*W-
+.ds PI pi
+.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+.ds L" ""
+.ds R" ""
+.\"   \*(M", \*(S", \*(N" and \*(T" are the equivalent of
+.\"   \*(L" and \*(R", except that they are used on ".xx" lines,
+.\"   such as .IP and .SH, which do another additional levels of
+.\"   double-quote interpretation
+.ds M" """
+.ds S" """
+.ds N" """""
+.ds T" """""
+.ds L' '
+.ds R' '
+.ds M' '
+.ds S' '
+.ds N' '
+.ds T' '
+'br\}
+.el\{\
+.ds -- \(em\|
+.tr \*(Tr
+.ds L" ``
+.ds R" ''
+.ds M" ``
+.ds S" ''
+.ds N" ``
+.ds T" ''
+.ds L' `
+.ds R' '
+.ds M' `
+.ds S' '
+.ds N' `
+.ds T' '
+.ds PI \(*p
+'br\}
+.\"	If the F register is turned on, we'll generate
+.\"	index entries out stderr for the following things:
+.\"		TH	Title 
+.\"		SH	Header
+.\"		Sh	Subsection 
+.\"		Ip	Item
+.\"		X<>	Xref  (embedded
+.\"	Of course, you have to process the output yourself
+.\"	in some meaningful fashion.
+.if \nF \{
+.de IX
+.tm Index:\\$1\t\\n%\t"\\$2"
+..
+.nr % 0
+.rr F
+.\}
+.TH CATCHSEGV 1 "etch" "7/Jan/2001" "Debian GNU/Linux"
+.UC
+.if n .hy 0
+.if n .na
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.de CQ          \" put $1 in typewriter font
+.ft CW
+'if n "\c
+'if t \\&\\$1\c
+'if n \\&\\$1\c
+'if n \&"
+\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
+'.ft R
+..
+.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
+.	\" AM - accent mark definitions
+.bd B 3
+.	\" fudge factors for nroff and troff
+.if n \{\
+.	ds #H 0
+.	ds #V .8m
+.	ds #F .3m
+.	ds #[ \f1
+.	ds #] \fP
+.\}
+.if t \{\
+.	ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.	ds #V .6m
+.	ds #F 0
+.	ds #[ \&
+.	ds #] \&
+.\}
+.	\" simple accents for nroff and troff
+.if n \{\
+.	ds ' \&
+.	ds ` \&
+.	ds ^ \&
+.	ds , \&
+.	ds ~ ~
+.	ds ? ?
+.	ds ! !
+.	ds /
+.	ds q
+.\}
+.if t \{\
+.	ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.	ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.	ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.	ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.	ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.	ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
+.	ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
+.	ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.	ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
+.\}
+.	\" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
+.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
+.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
+.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.ds oe o\h'-(\w'o'u*4/10)'e
+.ds Oe O\h'-(\w'O'u*4/10)'E
+.	\" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.	\" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.	ds : e
+.	ds 8 ss
+.	ds v \h'-1'\o'\(aa\(ga'
+.	ds _ \h'-1'^
+.	ds . \h'-1'.
+.	ds 3 3
+.	ds o a
+.	ds d- d\h'-1'\(ga
+.	ds D- D\h'-1'\(hy
+.	ds th \o'bp'
+.	ds Th \o'LP'
+.	ds ae ae
+.	ds Ae AE
+.	ds oe oe
+.	ds Oe OE
+.\}
+.rm #[ #] #H #V #F C
+.SH "NAME"
+catchsegv \- Catch segmentation faults in programs
+.SH "SYNOPSIS"
+\fBcatchsegv\fR \fBprogram\fR [\fBargs\fR]
+.SH "DESCRIPTION"
+Used to debug segmentation faults in programs. The output is the
+content of registers, plus a backtrace. Basically you call your
+program and its arguments as the arguments to catchsegv.
+.SH "AUTHOR"
+\fIcatchsegv\fR was written by Ulrich Drepper for the GNU C Library
+.PP
+This man page was written by Ben Collins <bcollins@debian.org> for
+the Debian GNU/Linux system.
+
+.rn }` ''
+.IX Title "CATCHSEGV 1"
+.IX Name "catchsegv - Catch segmentation faults in programs"
+
+.IX Header "NAME"
+
+.IX Header "SYNOPSIS"
+
+.IX Header "DESCRIPTION"
+
+.IX Header "AUTHOR"
+
--- eglibc-2.13.orig/debian/local/manpages/locale.1
+++ eglibc-2.13/debian/local/manpages/locale.1
@@ -0,0 +1,272 @@
+.\" Automatically generated by Pod::Man v1.3, Pod::Parser v1.13
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
+.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
+.\" expand to `' in nroff, nothing in troff, for use with C<>.
+.tr \(*W-|\(bv
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.de IX
+..
+.if r F \{\
+.  if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.  \}
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "LOCALE 1"
+.TH LOCALE 1 "2004-12-16" "sarge" "Debian GNU/Linux"
+.UC
+.SH "NAME"
+locale \- Get locale-specific information.
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fBlocale\fR \fB[\fR \f(CW\-a\fR | \f(CW\-m\fR\fB]\fR
+.PP
+\&\fBlocale\fR \fB[\fR \-ck \fB]\fR \fIname\fR...
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+The \fIlocale\fR program writes information about the current locale
+environment, or all locales, to standard output.
+.PP
+When invoked without arguments, \fIlocale\fR summarizes the current
+locale environment for each locale category defined by the LC_*
+environment variables.
+.PP
+\&\fB\-a\fR, \fB\-\-all\-locales\fR
+.PP
+.Vb 1
+\&        Write names of available locales.
+.Ve
+\&\fB\-m\fR, \fB\-\-charmaps\fR
+.PP
+.Vb 1
+\&        Write names of available charmaps.
+.Ve
+.Sh "Output Format:"
+.IX Subsection "Output Format:"
+\&\fB\-c\fR, \fB\-\-category\-name\fR
+.PP
+.Vb 1
+\&        Write names of selected categories.
+.Ve
+\&\fB\-k\fR, \fB\-\-keyword\-name\fR
+.PP
+.Vb 1
+\&        Write names and values of selected keywords.
+.Ve
+.SH "ENVIRONMENT VARIABLES"
+.IX Header "ENVIRONMENT VARIABLES"
+These environment variables affect each locale categories for all locale-aware programs:
+
+\&\s-1LC_CTYPE\s0
+.PP
+.Vb 1
+\&        Character classification and case conversion.
+.Ve
+\&\s-1LC_COLLATE\s0
+.PP
+.Vb 1
+\&        Collation order.
+.Ve
+\&\s-1LC_TIME\s0
+.PP
+.Vb 1
+\&        Date and time formats.
+.Ve
+\&\s-1LC_NUMERIC\s0
+.PP
+.Vb 1
+\&        Non-monetary numeric formats.
+.Ve
+\&\s-1LC_MONETARY\s0
+.PP
+.Vb 1
+\&        Monetary formats.
+.Ve
+\&\s-1LC_MESSAGES\s0
+.PP
+.Vb 2
+\&        Formats of informative and diagnostic messages and
+\&        interactive responses.
+.Ve
+\&\s-1LC_PAPER\s0
+.PP
+.Vb 1
+\&        Paper size.
+.Ve
+\&\s-1LC_NAME\s0
+.PP
+.Vb 1
+\&        Name formats.
+.Ve
+\&\s-1LC_ADDRESS\s0
+.PP
+.Vb 1
+\&        Address formats and location information.
+.Ve
+\&\s-1LC_TELEPHONE\s0
+.PP
+.Vb 1
+\&        Telephone number formats.
+.Ve
+\&\s-1LC_MEASUREMENT\s0
+.PP
+.Vb 1
+\&        Measurement units (Metric or Other).
+.Ve
+\&\s-1LC_IDENTIFICATION\s0
+.PP
+.Vb 1
+\&        Metadata about the locale information.
+.Ve
+This environment variable can switch against multiple locale database:
+
+\&\s-1LOCPATH\s0
+.PP
+.Vb 1
+\&        The directory where locale data is stored.  By default, /usr/lib/locale is used.
+.Ve
+
+.SH "FILES"
+.IX Header "FILES"
+.PP
+.PD 0
+.TP 8
+\fI/usr/share/i18n/SUPPORTED\fP
+List of supported values (and their associated encoding) for the locale name.
+This representation is recommended over
+\fB\-\-all\-locales\fR one, due being the system wide supported values.
+.PP
+
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+\&\fIlocale\fR was written by Ulrich Drepper for the \s-1GNU\s0 C Library.
+.PP
+This manpage was written by Joel Klecker <espy@debian.org> for
+the Debian GNU/Linux system, and expanded by Alastair McKinstry
+<mckinstry@computer.org>
+.PP
+
+.SH "SEE ALSO"
+.BR locale "(5), " locale "(7), " setlocale (3)
+
--- eglibc-2.13.orig/debian/local/manpages/rpcinfo.8
+++ eglibc-2.13/debian/local/manpages/rpcinfo.8
@@ -0,0 +1,166 @@
+.\"	from: @(#)rpcinfo.8c	2.2 88/08/03 4.0 RPCSRC; from 1.24 88/02/25 SMI
+.\"	$Id: rpcinfo.8,v 1.1.2.1 2003/09/22 21:33:35 jbailey Exp $
+.\"
+.Dd December 17, 1987
+.Dt RPCINFO 8
+.Os
+.Sh NAME
+.Nm rpcinfo
+.Nd report RPC information
+.Sh SYNOPSIS
+.Nm rpcinfo
+.Fl p
+.Op Ar host
+.Nm rpcinfo
+.Op Fl n Ar portnum
+.Fl u Ar host
+.Ar program
+.Op Ar version
+.Nm rpcinfo
+.Op Fl n Ar portnum
+.Fl t Ar host 
+.Ar program
+.Op Ar version
+.Nm rpcinfo
+.Fl b
+.Ar program version
+.Nm rpcinfo
+.Fl d
+.Ar program version
+.Sh DESCRIPTION
+.Nm rpcinfo
+makes an
+.Tn RPC
+call to an
+.Tn RPC
+server and reports what it finds.
+.Sh OPTIONS
+.Bl -tag -width indent
+.It Fl p
+Probe the portmapper on
+.Ar host ,
+and print a list of all registered
+.Tn RPC
+programs.  If
+.Ar host
+is not specified, it defaults to the value returned by
+.Xr hostname 1 .
+.It Fl u
+Make an
+.Tn RPC
+call to procedure 0 of
+.Ar program
+on the specified
+.Ar host
+using
+.Tn UDP ,
+and report whether a response was received.
+.It Fl t
+Make an
+.Tn RPC
+call to procedure 0 of
+.Ar program
+on the specified
+.Ar host
+using
+.Tn TCP ,
+and report whether a response was received.
+.It Fl n
+Use
+.Ar portnum
+as the port number for the
+.Fl t
+and
+.Fl u
+options instead of the port number given by the portmapper.
+.It Fl b
+Make an
+.Tn RPC
+broadcast to procedure 0 of the specified
+.Ar program
+and
+.Ar version
+using
+.Tn UDP
+and report all hosts that respond.
+.It Fl d
+Delete registration for the
+.Tn RPC
+service of the specified
+.Ar program
+and
+.Ar version .
+This option can be exercised only by the super-user.
+.El
+.Pp
+The
+.Ar program
+argument can be either a name or a number.
+.Pp
+If a
+.Ar version
+is specified,
+.Nm rpcinfo
+attempts to call that version of the specified
+.Ar program .
+Otherwise,
+.Nm rpcinfo
+attempts to find all the registered version
+numbers for the specified
+.Ar program
+by calling version 0 (which is presumed not
+to exist; if it does exist,
+.Ar rpcinfo
+attempts to obtain this information by calling
+an extremely high version
+number instead) and attempts to call each registered version.
+Note: the version number is required for
+.Fl b
+and
+.Fl d
+options.
+.Sh EXAMPLES
+To show all of the
+.Tn RPC
+services registered on the local machine use:
+.Pp
+.Dl example% rpcinfo -p
+.Pp
+To show all of the
+.Tn RPC
+services registered on the machine named
+.Ar klaxon
+use:
+.Pp
+.Dl example% rpcinfo -p klaxon
+.Pp
+To show all machines on the local net that are running the Yellow Pages
+service use:
+.Pp
+.Dl example% rpcinfo -b ypserv 'version' | uniq
+.Pp
+where 'version' is the current Yellow Pages version obtained from the
+results of the
+.Fl p
+switch above.
+.Pp
+To delete the registration for version 1 of the
+.Nm walld
+service use:
+.Pp
+.Dl example% rpcinfo -d walld 1
+.Sh SEE ALSO
+.Xr rpc 5 ,
+.Xr portmap 8
+.Rs
+.%T "RPC Programming Guide"
+.Re
+.Sh BUGS
+In releases prior to SunOS 3.0, the Network File System (NFS) did not
+register itself with the portmapper;
+.Nm rpcinfo
+cannot be used to make
+.Tn RPC
+calls to the
+.Tn NFS
+server on hosts running such releases.
--- eglibc-2.13.orig/debian/local/manpages/gencat.1
+++ eglibc-2.13/debian/local/manpages/gencat.1
@@ -0,0 +1,240 @@
+.rn '' }`
+.\" $RCSfile: gencat.1,v $$Revision: 1.1 $$Date: 2008-08-08 21:49:44 +0200 (ven. 08 août 2008) $
+.\"
+.\" $Log: gencat.1,v $
+.\" Revision 1.1  2003/11/03 17:37:27  jbailey
+.\"     - debian/local/manpages/gencat.1: New file.
+.\"     - debian/local/manpages/trace.1: New file.
+.\"     - debian/debhelper.in/libc-dev.manpages: Install them.
+.\"     - debian/local/manpages/iconvconfig.8: New file.
+.\"     - debian/debhelper.in/libc.manpages: Install it.
+.\"
+.\" Revision 1.1.2.2  2003/10/28 05:48:08  dan
+.\"     - Re-add debian/patches/80_glibc232-locales-nb_NO-fix.dpatch, which had
+.\"       gotten lost.
+.\"     - Re-add typo fixes to iconv.1 and rpcgen.1.
+.\"     - Merge iconv.1 fix to iconv.pod.
+.\"     - Fix ld.so name in ld.so.8.
+.\"     - Re-add fix for locale-gen and POSIXLY_CORRECT.
+.\"
+.\"
+.de Sh
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp
+.if t .sp .5v
+.if n .sp
+..
+.de Ip
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.de Vb
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve
+.ft R
+
+.fi
+..
+.\"
+.\"
+.\"     Set up \*(-- to give an unbreakable dash;
+.\"     string Tr holds user defined translation string.
+.\"     Bell System Logo is used as a dummy character.
+.\"
+.tr \(*W-|\(bv\*(Tr
+.ie n \{\
+.ds -- \(*W-
+.ds PI pi
+.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+.ds L" ""
+.ds R" ""
+.\"   \*(M", \*(S", \*(N" and \*(T" are the equivalent of
+.\"   \*(L" and \*(R", except that they are used on ".xx" lines,
+.\"   such as .IP and .SH, which do another additional levels of
+.\"   double-quote interpretation
+.ds M" """
+.ds S" """
+.ds N" """""
+.ds T" """""
+.ds L' '
+.ds R' '
+.ds M' '
+.ds S' '
+.ds N' '
+.ds T' '
+'br\}
+.el\{\
+.ds -- \(em\|
+.tr \*(Tr
+.ds L" ``
+.ds R" ''
+.ds M" ``
+.ds S" ''
+.ds N" ``
+.ds T" ''
+.ds L' `
+.ds R' '
+.ds M' `
+.ds S' '
+.ds N' `
+.ds T' '
+.ds PI \(*p
+'br\}
+.\"	If the F register is turned on, we'll generate
+.\"	index entries out stderr for the following things:
+.\"		TH	Title 
+.\"		SH	Header
+.\"		Sh	Subsection 
+.\"		Ip	Item
+.\"		X<>	Xref  (embedded
+.\"	Of course, you have to process the output yourself
+.\"	in some meaningful fashion.
+.if \nF \{
+.de IX
+.tm Index:\\$1\t\\n%\t"\\$2"
+..
+.nr % 0
+.rr F
+.\}
+.TH GENCAT 1 "November 2003" "gencat (glibc)" "Debian"
+.UC
+.if n .hy 0
+.if n .na
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.de CQ          \" put $1 in typewriter font
+.ft CW
+'if n "\c
+'if t \\&\\$1\c
+'if n \\&\\$1\c
+'if n \&"
+\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
+'.ft R
+..
+.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
+.	\" AM - accent mark definitions
+.bd B 3
+.	\" fudge factors for nroff and troff
+.if n \{\
+.	ds #H 0
+.	ds #V .8m
+.	ds #F .3m
+.	ds #[ \f1
+.	ds #] \fP
+.\}
+.if t \{\
+.	ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.	ds #V .6m
+.	ds #F 0
+.	ds #[ \&
+.	ds #] \&
+.\}
+.	\" simple accents for nroff and troff
+.if n \{\
+.	ds ' \&
+.	ds ` \&
+.	ds ^ \&
+.	ds , \&
+.	ds ~ ~
+.	ds ? ?
+.	ds ! !
+.	ds /
+.	ds q
+.\}
+.if t \{\
+.	ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.	ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.	ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.	ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.	ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.	ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
+.	ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
+.	ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.	ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
+.\}
+.	\" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
+.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
+.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
+.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.ds oe o\h'-(\w'o'u*4/10)'e
+.ds Oe O\h'-(\w'O'u*4/10)'E
+.	\" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.	\" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.	ds : e
+.	ds 8 ss
+.	ds v \h'-1'\o'\(aa\(ga'
+.	ds _ \h'-1'^
+.	ds . \h'-1'.
+.	ds 3 3
+.	ds o a
+.	ds d- d\h'-1'\(ga
+.	ds D- D\h'-1'\(hy
+.	ds th \o'bp'
+.	ds Th \o'LP'
+.	ds ae ae
+.	ds Ae AE
+.	ds oe oe
+.	ds Oe OE
+.\}
+.rm #[ #] #H #V #F C
+.SH "NAME"
+gencat \- Generate message catalog
+.SH "SYNOPSIS"
+gencat [OPTION...] -o OUTPUT-FILE [INPUT-FILE]...
+.SH "DESCRIPTION"
+The \fBgencat\fR program is specified in the X/Open standard and the
+GNU implementation follows this specification and so processes all
+correctly formed input files. Additionally some extension are implemented
+which help to work in a more reasonable way with the \fBcatgets\fR(3) functions.
+.PP
+.TP
+\fB-H\fR, \fB--header\fR \fINAME\fR
+Create C header file NAME containing symbol definitions
+.TP
+\fB--new\fR
+Do not use existing catalog, force new output file
+.TP
+\fB-o\fR, \fB--output\fR \fINAME\fR
+Write output to file NAME
+.SH "AUTHOR"
+\fIgencat\fR was written by Ulrich Drepper as part of the GNU C Library.
+.PP
+This man page was written by Jeff Bailey <jbailey@debian.org>.
+
+.rn }` ''
+.IX Title "GENCAT 1"
+.IX Name "gencat - Generate message catalog"
+
+.IX Header "NAME"
+
+.IX Header "SYNOPSIS"
+
+.IX Header "DESCRIPTION"
+
+.IX Header "AUTHOR"
+
--- eglibc-2.13.orig/debian/local/manpages/zdump.1
+++ eglibc-2.13/debian/local/manpages/zdump.1
@@ -0,0 +1,43 @@
+.TH ZDUMP 1
+.SH NAME
+zdump \- time zone dumper
+.SH SYNOPSIS
+.B zdump
+[
+.B \-v
+] [
+.B \-c
+cutoffyear ] [ zonename ... ]
+.SH DESCRIPTION
+.I Zdump
+prints the current time in each
+.I zonename
+named on the command line.
+.PP
+These options are available:
+.TP
+.B \-v
+For each
+.I zonename
+on the command line,
+print the time at the lowest possible time value,
+the time one day after the lowest possible time value,
+the times both one second before and exactly at
+each detected time discontinuity,
+the time at one day less than the highest possible time value,
+and the time at the highest possible time value,
+Each line ends with
+.B isdst=1
+if the given time is Daylight Saving Time or
+.B isdst=0
+otherwise.
+.I zonename
+should be the relative path file name from
+.B /usr/share/zoneinfo/
+which directory contains all zone data.
+.TP
+.BI "\-c " cutoffyear
+Cut off the verbose output near the start of the given year.
+.SH "SEE ALSO"
+ctime(3), zic(8)
+.\" @(#)zdump.8	7.3
--- eglibc-2.13.orig/debian/local/manpages/iconvconfig.8
+++ eglibc-2.13/debian/local/manpages/iconvconfig.8
@@ -0,0 +1,232 @@
+.rn '' }`
+.\" $RCSfile: iconvconfig.8,v $$Revision: 1.1 $$Date: 2008-08-08 21:49:44 +0200 (ven. 08 août 2008) $
+.\"
+.\" $Log: iconvconfig.8,v $
+.\" Revision 1.1  2003/11/03 17:37:27  jbailey
+.\"     - debian/local/manpages/gencat.1: New file.
+.\"     - debian/local/manpages/trace.1: New file.
+.\"     - debian/debhelper.in/libc-dev.manpages: Install them.
+.\"     - debian/local/manpages/iconvconfig.8: New file.
+.\"     - debian/debhelper.in/libc.manpages: Install it.
+.\"
+.\" Revision 1.1.2.2  2003/10/28 05:48:08  dan
+.\"     - Re-add debian/patches/80_glibc232-locales-nb_NO-fix.dpatch, which had
+.\"       gotten lost.
+.\"     - Re-add typo fixes to iconv.1 and rpcgen.1.
+.\"     - Merge iconv.1 fix to iconv.pod.
+.\"     - Fix ld.so name in ld.so.8.
+.\"     - Re-add fix for locale-gen and POSIXLY_CORRECT.
+.\"
+.\"
+.de Sh
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp
+.if t .sp .5v
+.if n .sp
+..
+.de Ip
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.de Vb
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve
+.ft R
+
+.fi
+..
+.\"
+.\"
+.\"     Set up \*(-- to give an unbreakable dash;
+.\"     string Tr holds user defined translation string.
+.\"     Bell System Logo is used as a dummy character.
+.\"
+.tr \(*W-|\(bv\*(Tr
+.ie n \{\
+.ds -- \(*W-
+.ds PI pi
+.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+.ds L" ""
+.ds R" ""
+.\"   \*(M", \*(S", \*(N" and \*(T" are the equivalent of
+.\"   \*(L" and \*(R", except that they are used on ".xx" lines,
+.\"   such as .IP and .SH, which do another additional levels of
+.\"   double-quote interpretation
+.ds M" """
+.ds S" """
+.ds N" """""
+.ds T" """""
+.ds L' '
+.ds R' '
+.ds M' '
+.ds S' '
+.ds N' '
+.ds T' '
+'br\}
+.el\{\
+.ds -- \(em\|
+.tr \*(Tr
+.ds L" ``
+.ds R" ''
+.ds M" ``
+.ds S" ''
+.ds N" ``
+.ds T" ''
+.ds L' `
+.ds R' '
+.ds M' `
+.ds S' '
+.ds N' `
+.ds T' '
+.ds PI \(*p
+'br\}
+.\"	If the F register is turned on, we'll generate
+.\"	index entries out stderr for the following things:
+.\"		TH	Title 
+.\"		SH	Header
+.\"		Sh	Subsection 
+.\"		Ip	Item
+.\"		X<>	Xref  (embedded
+.\"	Of course, you have to process the output yourself
+.\"	in some meaningful fashion.
+.if \nF \{
+.de IX
+.tm Index:\\$1\t\\n%\t"\\$2"
+..
+.nr % 0
+.rr F
+.\}
+.TH ICONVCONFIG 8 "November 2003" "iconvconfig (glibc)" "Debian"
+.UC
+.if n .hy 0
+.if n .na
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.de CQ          \" put $1 in typewriter font
+.ft CW
+'if n "\c
+'if t \\&\\$1\c
+'if n \\&\\$1\c
+'if n \&"
+\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
+'.ft R
+..
+.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
+.	\" AM - accent mark definitions
+.bd B 3
+.	\" fudge factors for nroff and troff
+.if n \{\
+.	ds #H 0
+.	ds #V .8m
+.	ds #F .3m
+.	ds #[ \f1
+.	ds #] \fP
+.\}
+.if t \{\
+.	ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.	ds #V .6m
+.	ds #F 0
+.	ds #[ \&
+.	ds #] \&
+.\}
+.	\" simple accents for nroff and troff
+.if n \{\
+.	ds ' \&
+.	ds ` \&
+.	ds ^ \&
+.	ds , \&
+.	ds ~ ~
+.	ds ? ?
+.	ds ! !
+.	ds /
+.	ds q
+.\}
+.if t \{\
+.	ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.	ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.	ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.	ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.	ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.	ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
+.	ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
+.	ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.	ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
+.\}
+.	\" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
+.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
+.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
+.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.ds oe o\h'-(\w'o'u*4/10)'e
+.ds Oe O\h'-(\w'O'u*4/10)'E
+.	\" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.	\" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.	ds : e
+.	ds 8 ss
+.	ds v \h'-1'\o'\(aa\(ga'
+.	ds _ \h'-1'^
+.	ds . \h'-1'.
+.	ds 3 3
+.	ds o a
+.	ds d- d\h'-1'\(ga
+.	ds D- D\h'-1'\(hy
+.	ds th \o'bp'
+.	ds Th \o'LP'
+.	ds ae ae
+.	ds Ae AE
+.	ds oe oe
+.	ds Oe OE
+.\}
+.rm #[ #] #H #V #F C
+.SH "NAME"
+iconvconfig \- Create fastloading iconv module configuration file
+.SH "SYNOPSIS"
+iconvconfig [OPTION...] [DIR...]
+.SH "DESCRIPTION"
+The \fBiconvconfig\fR program generates a cache that internationalised
+applications can use to reduce loading time.
+.PP
+.TP
+\fB--prefix\fR \fIPATH\fR
+Prefix used for all file accesses
+.SH "AUTHOR"
+\fIiconvconfig\fR was written by Ulrich Drepper as part of the GNU C Library.
+.PP
+This man page was written by Jeff Bailey <jbailey@debian.org>.
+
+.rn }` ''
+.IX Title "ICONVCONFIG 8"
+.IX Name "iconvconfig - Create fastloading iconv module configuration file"
+
+.IX Header "NAME"
+
+.IX Header "SYNOPSIS"
+
+.IX Header "DESCRIPTION"
+
+.IX Header "AUTHOR"
+
--- eglibc-2.13.orig/debian/local/manpages/mtrace.1
+++ eglibc-2.13/debian/local/manpages/mtrace.1
@@ -0,0 +1,228 @@
+.rn '' }`
+.\" $RCSfile: mtrace.1,v $$Revision: 1.1 $$Date: 2008-08-08 21:49:44 +0200 (ven. 08 août 2008) $
+.\"
+.\" $Log: mtrace.1,v $
+.\" Revision 1.1  2003/11/03 17:37:27  jbailey
+.\"     - debian/local/manpages/gencat.1: New file.
+.\"     - debian/local/manpages/trace.1: New file.
+.\"     - debian/debhelper.in/libc-dev.manpages: Install them.
+.\"     - debian/local/manpages/iconvconfig.8: New file.
+.\"     - debian/debhelper.in/libc.manpages: Install it.
+.\"
+.\" Revision 1.1.2.2  2003/10/28 05:48:08  dan
+.\"     - Re-add debian/patches/80_glibc232-locales-nb_NO-fix.dpatch, which had
+.\"       gotten lost.
+.\"     - Re-add typo fixes to iconv.1 and rpcgen.1.
+.\"     - Merge iconv.1 fix to iconv.pod.
+.\"     - Fix ld.so name in ld.so.8.
+.\"     - Re-add fix for locale-gen and POSIXLY_CORRECT.
+.\"
+.\"
+.de Sh
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp
+.if t .sp .5v
+.if n .sp
+..
+.de Ip
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.de Vb
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve
+.ft R
+
+.fi
+..
+.\"
+.\"
+.\"     Set up \*(-- to give an unbreakable dash;
+.\"     string Tr holds user defined translation string.
+.\"     Bell System Logo is used as a dummy character.
+.\"
+.tr \(*W-|\(bv\*(Tr
+.ie n \{\
+.ds -- \(*W-
+.ds PI pi
+.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+.ds L" ""
+.ds R" ""
+.\"   \*(M", \*(S", \*(N" and \*(T" are the equivalent of
+.\"   \*(L" and \*(R", except that they are used on ".xx" lines,
+.\"   such as .IP and .SH, which do another additional levels of
+.\"   double-quote interpretation
+.ds M" """
+.ds S" """
+.ds N" """""
+.ds T" """""
+.ds L' '
+.ds R' '
+.ds M' '
+.ds S' '
+.ds N' '
+.ds T' '
+'br\}
+.el\{\
+.ds -- \(em\|
+.tr \*(Tr
+.ds L" ``
+.ds R" ''
+.ds M" ``
+.ds S" ''
+.ds N" ``
+.ds T" ''
+.ds L' `
+.ds R' '
+.ds M' `
+.ds S' '
+.ds N' `
+.ds T' '
+.ds PI \(*p
+'br\}
+.\"	If the F register is turned on, we'll generate
+.\"	index entries out stderr for the following things:
+.\"		TH	Title 
+.\"		SH	Header
+.\"		Sh	Subsection 
+.\"		Ip	Item
+.\"		X<>	Xref  (embedded
+.\"	Of course, you have to process the output yourself
+.\"	in some meaningful fashion.
+.if \nF \{
+.de IX
+.tm Index:\\$1\t\\n%\t"\\$2"
+..
+.nr % 0
+.rr F
+.\}
+.TH MTRACE 1 "November 2003" "mtrace (glibc)" "Debian"
+.UC
+.if n .hy 0
+.if n .na
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.de CQ          \" put $1 in typewriter font
+.ft CW
+'if n "\c
+'if t \\&\\$1\c
+'if n \\&\\$1\c
+'if n \&"
+\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
+'.ft R
+..
+.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
+.	\" AM - accent mark definitions
+.bd B 3
+.	\" fudge factors for nroff and troff
+.if n \{\
+.	ds #H 0
+.	ds #V .8m
+.	ds #F .3m
+.	ds #[ \f1
+.	ds #] \fP
+.\}
+.if t \{\
+.	ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.	ds #V .6m
+.	ds #F 0
+.	ds #[ \&
+.	ds #] \&
+.\}
+.	\" simple accents for nroff and troff
+.if n \{\
+.	ds ' \&
+.	ds ` \&
+.	ds ^ \&
+.	ds , \&
+.	ds ~ ~
+.	ds ? ?
+.	ds ! !
+.	ds /
+.	ds q
+.\}
+.if t \{\
+.	ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.	ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.	ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.	ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.	ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.	ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
+.	ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
+.	ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.	ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
+.\}
+.	\" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
+.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
+.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
+.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.ds oe o\h'-(\w'o'u*4/10)'e
+.ds Oe O\h'-(\w'O'u*4/10)'E
+.	\" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.	\" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.	ds : e
+.	ds 8 ss
+.	ds v \h'-1'\o'\(aa\(ga'
+.	ds _ \h'-1'^
+.	ds . \h'-1'.
+.	ds 3 3
+.	ds o a
+.	ds d- d\h'-1'\(ga
+.	ds D- D\h'-1'\(hy
+.	ds th \o'bp'
+.	ds Th \o'LP'
+.	ds ae ae
+.	ds Ae AE
+.	ds oe oe
+.	ds Oe OE
+.\}
+.rm #[ #] #H #V #F C
+.SH "NAME"
+mtrace \- Interpret output from MALLOC_TRACE
+.SH "SYNOPSIS"
+mtrace [OPTION]... [Binary] MtraceData
+.SH "DESCRIPTION"
+The \fBmtrace\fR interprets the output from when the MALLOC_TRACE
+environment variable is set.  
+.SH "AUTHOR"
+\fImtrace\fR was written by Ulrich Drepper as part of the GNU C Library.
+.PP
+This man page was written by Jeff Bailey <jbailey@debian.org>.
+
+.rn }` ''
+.IX Title "MTRACE 1"
+.IX Name "mtrace \- Interpret output from MALLOC_TRACE"
+
+.IX Header "NAME"
+
+.IX Header "SYNOPSIS"
+
+.IX Header "DESCRIPTION"
+
+.IX Header "AUTHOR"
+
--- eglibc-2.13.orig/debian/local/manpages/gai.conf.5
+++ eglibc-2.13/debian/local/manpages/gai.conf.5
@@ -0,0 +1,98 @@
+.\" A man page for gai.conf. -*- nroff -*-
+.\"
+.\" Copyright (C) 2006 Red Hat, Inc. All rights reserved.
+.\"
+.\" This copyrighted material is made available to anyone wishing to use,
+.\" modify, copy, or redistribute it subject to the terms and conditions of the
+.\" GNU General Public License v.2.
+.\"
+.\" This program is distributed in the hope that it will be useful, but WITHOUT
+.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+.\" more details.
+.\"
+.\" You should have received a copy of the GNU General Public License along
+.\" with this program; if not, write to the Free Software Foundation, Inc.,
+.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+.\"
+.\" Author: Ulrich Drepper <drepper redhat com>
+.TH gai.conf 5 "May 2006" gai.conf
+
+.SH NAME
+gai.conf \- getaddrinfo(3) configuration file
+
+.SH DESCRIPTION
+A call to
+.BR getaddrinfo (3)
+might return multiple answers.  According to RFC 3484 these answers must
+be sorted so that the answer with the highest success rate is first in
+the list.  The RFC provides an algorithm for the sorting.  The static
+rules are not always adequate, though.  For this reason the RFC also
+requires that system administrators get the chance to dynamically change
+the sorting.  For the glibc implementation this can be achieved with
+the
+.BR /etc/gai.conf
+file.
+.PP
+Each line in the configuration file consists of a keyword and its
+parameters.  White spaces in any place are ignored.  Lines starting
+with `#' are comments and are ignored.
+.PP
+The keywords currently recognized are:
+.TP
+\fBlabel\fR \fInetmask\fR \fIprecedence\fR
+The value is added to the label table used in the RFC 3484 sorting.
+If any \fBlabel\fR definition is present in the configuration file
+is present the default table is not used.  All the label definitions
+of the default table which are to be maintained have to be duplicated.
+Following the keyword the line has to contain a network mask and a label
+value.
+
+.TP
+\fBprecedence\fR \fInetmask\fR \fIprecedence\fR
+This  keyword is similar to \fBlabel\fR but instead the value is added
+to the precedence table as specified in RFC 3484.  Once again, the
+presence of a single \fBprecedence\fR line in the configuration file
+causes the default table to not be used.
+
+.TP
+\fBreload\fR <\fByes\fR|\fBno\fR>
+This keyword control whether a process checks whether the configuration
+file has been changes since the last time it was read.  If the value is
+`\fByes\fR' the file is re-read.  This might cause problems in multi-threaded
+applications and is generally a bad idea.  The default is `\fBno\fR'.
+
+.TP
+\fBscopev4\fR \fImask\fR \fIvalue\fR
+Add another rule to the RFC 3484 scope table for IPv4 address.
+By default the scope IDs described in section 3.2 in 
+RFC 3438 are used. 
+Changing these defaults should hardly ever be necessary.
+
+.SH EXAMPLE
+
+The default table according to RFC 3484 would be specified with the
+following configuration file:
+
+.nf
+label  ::1/128       0
+label  ::/0          1
+label  2002::/16     2
+label ::/96          3
+label ::ffff:0:0/96  4
+precedence  ::1/128       50
+precedence  ::/0          40
+precedence  2002::/16     30
+precedence ::/96          20
+precedence ::ffff:0:0/96  10
+
+
+.SH FILES
+\fI/etc/gai.conf\fR
+
+.SH AUTHOR
+Ulrich Drepper <drepper redhat com>
+
+.SH SEE ALSO
+.BR getaddrinfo(3),
+RFC 3484
--- eglibc-2.13.orig/debian/local/manpages/localedef.1
+++ eglibc-2.13/debian/local/manpages/localedef.1
@@ -0,0 +1,293 @@
+.TH LOCALEDEF 1 "May 20, 2005"
+.SH NAME
+localedef \- compile locale definition files
+.SH SYNOPSIS
+.ad l
+.nh
+.B localedef
+.RI [ options ]
+.I outputpath
+.br
+.B "localedef \-\-list\-archive"
+.RI [ options ]
+.br
+.B "localedef \-\-delete\-from\-archive"
+.RI [ options ]
+.IR localename " ..."
+.br
+.B "localedef \-\-add\-to\-archive"
+.RI [ options ]
+.IR compiledpath
+.br
+.B "localedef \-\-version"
+.br
+.B "localedef \-\-help"
+.br
+.B "localedef \-\-usage"
+.ad b
+.hy
+.SH DESCRIPTION
+The
+.B localedef
+program reads the indicated
+.I charmap
+and
+.I input
+files, compiles them to a binary form quickly usable by the
+.BR locale (7)
+functions in the C library, and places the output in 
+.IR outputpath .
+.PP
+If
+.I outputpath
+contains a slash character ('/'), it is directly the name of the output
+directory.
+In this case, there is a separate output file for each locale category
+(LC_CTIME, LC_NUMERIC, and so on).
+.PP
+Otherwise, if the 
+.B \-\-no\-archive
+option is used,
+.I outputpath
+is the name of a subdirectory in
+.B /usr/lib/locale
+where per-category compiled files are placed.
+.PP
+Otherwise, 
+.I outputpath
+is the name of a locale and the compiled locale data is added to the
+archive file 
+.BR /usr/lib/locale/locale-archive .
+.PP
+In any case,
+.B localedef
+aborts if the directory in which it tries to write locale files has
+not already been created.
+.PP
+If no
+.I charmapfile
+is given, the value
+.I POSIX
+is used by default.
+If no
+.I inputfile
+is given, or if it is given as a dash
+.RB ( \- ),
+.B localedef
+reads from standard input.
+.SH OPTIONS
+Most options can have either short or long forms.  If multiple short
+options are used, they can be combined in one word (for example,
+.B \-cv 
+is identical to
+.BR "\-c \-v" ).
+.PP
+If a short option takes an argument, the argument can be given separately
+as the next word
+.RB ( "\-f foo" ), 
+or it can be written together with the option letter
+.RB ( \-ffoo ).
+If a long option takes an argument, the argument can be given separately
+as the next word, or it can be written as option=argument 
+.RB ( \-\-charmap=foo ).
+.SS "Operation selection options"
+A few options direct 
+.B localedef
+to do something else than compile locale definitions.
+Only one of these should be used at a time.
+.TP
+.B \-\-delete\-from\-archive
+Delete the named locales from the locale archive file.
+.TP
+.B \-\-list\-archive
+List the locales contained in the locale archive file.
+.TP
+.B \-\-add\-to\-archive
+Add the 
+.I compiledpath
+directories to the locale archive file.
+The directories should have been created by previous runs of 
+.BR localedef ,
+using 
+.BR \-\-no\-archive .
+.SS "Other options"
+Some of the following options are only sensible for some operations; hopefully it is self-evident which ones.
+.TP
+.BI \-f " charmapfile" ", \-\-charmap=" charmapfile
+Specify the file that defines the symbolic character names that are
+used by the input file.  If the file is in the default directory for
+character maps, it is not necessary to specify the full pathname.
+This default directory is printed by
+.BR "localedef \-\-help" .
+.TP
+.BI \-i " inputfile" ", \-\-inputfile=" inputfile
+Specify the locale definition file to compile.  If
+.I inputfile
+is not absolute,
+.B localedef
+will also look in the directories specified by the environment variable
+.B I18NPATH
+and in the default directory for locale definition files.  This default
+directory is printed by
+.BR "localedef \-\-help" .
+.TP
+.BI \-u " repertoirefile" ", \-\-repertoire-map=" repertoirefile
+Read mappings from symbolic names to Unicode UCS4 values from
+.IR repertoirefile .
+.TP
+.BI \-A " aliasfile" ", \-\-alias\-file=" aliasfile
+Use 
+.I aliasfile
+to look up aliases for locale names.
+There is no default aliases file.
+.TP
+.BI \-\-prefix= pathname
+Set prefix to be prepended to the full archive pathname.
+By default, the prefix is empty.
+Setting the prefix to 
+.IR foo ,
+the archive would be placed in
+.BR foo/usr/lib/locale/locale-archive .
+.TP
+.B "\-c, \-\-force"
+Write the output files even if warnings were generated about the input
+file.
+.TP
+.B \-\-old\-style
+Create old-style tables.
+.TP
+.B "\-v, \-\-verbose"
+Generate extra warnings about errors that are normally ignored.
+.TP
+.B \-\-quiet
+Suppress all notifications and warnings, and report only fatal errors.
+.TP
+.B \-\-posix
+Conform strictly to POSIX.  Implies
+.BR \-\-verbose .
+This option currently has no other effect.  Posix conformance is
+assumed if the environment variable
+.B POSIXLY_CORRECT
+is set.
+.TP
+.B \-\-replace
+Replace a locale in the locale archive file.
+Without this option, if the locale is in the archive file already,
+an error occurs.
+.TP
+.B \-\-no\-archive
+Do not use the locale archive file, instead create 
+.I outputpath
+as a subdirectory in the same directory as the locale archive file,
+and create separate output files for locale categories in it.
+.TP
+.B "\-\-help"
+Print a usage summary and exit.  Also prints the default paths used by
+.BR localedef .
+.TP
+.B "\-\-usage"
+Print a short usage summary and exit.
+.TP
+.B "\-V, \-\-version"
+Print the version number, license, and disclaimer of warranty for
+.BR localedef .
+.SH ENVIRONMENT
+.TP
+.B POSIXLY_CORRECT
+The
+.B \-\-posix
+flag is assumed if this environment variable is set.
+.TP
+.B I18NPATH
+A colon separated list of default directories for locale definition files.
+.SH FILES
+.TP
+.B /usr/share/i18n/charmaps
+Usual default charmap path.
+.TP
+.B /usr/share/i18n/locales
+Usual default path for locale source files.
+.TP
+.B /usr/share/i18n/repertoiremaps
+Usual default repertoire map path.
+.TP
+.B /usr/lib/locale/locale-archive
+Usual default locale archive location.
+.TP
+.IB outputpath/ LC_COLLATE
+One of the output files.  It describes the rules for comparing strings
+in the locale's alphabet.
+.TP
+.IB outputpath/ LC_CTYPE
+One of the output files.  It contains information about character
+cases and case conversions for the locale.
+.TP
+.IB outputpath/ LC_MONETARY
+One of the output files.  It describes the way monetary values should
+be formatted in the locale.
+.TP
+.IB outputpath/ LC_MESSAGES/SYS_LC_MESSAGES
+One of the output files.  It contains information about the language
+messages should be printed in, and what an affirmative or negative
+answer looks like.
+.TP
+.IB outputpath/ LC_NUMERIC
+One of the output files.  It describes the rules for formatting
+numbers in the locale.
+.TP
+.IB outputpath/ LC_TIME
+One of the output files.  It describes the rules for formatting
+times and dates in the locale.
+.TP
+.IB outputpath/ LC_PAPER
+One of the output files. It describes the default paper size 
+in the locale.
+.TP
+.IB outputpath/ LC_NAME
+One of the output files. It describes the rules for formatting
+names in the locale.
+.TP
+.IB outputpath/ LC_ADDRESS
+One of the output files. It describes the rules for formatting
+addresses, and other location information in the locale.
+.TP
+.IB outputpath/ LC_TELEPHONE
+One of the output files. It describes the rules for formatting
+telephone numbers in the locale.
+.TP
+.IB outputpath/ LC_MEASUREMENT
+One of the output files. It describes the rules for measurement in the
+locale, e.g. Metric or other units.
+.TP
+.IB outputpath/ LC_IDENTIFICATION
+One of the output files. It identifies the elements within the locale.
+.SH EXAMPLES
+Compile the locale files for Finnish in the UTF-8 character set
+and add it to the default locale archive with the name 
+.BR fi_FI.UTF-8 :
+.PP
+.RS
+localedef \-f UTF\-8 \-i fi_FI fi_FI.UTF\-8
+.RE
+.PP
+The same, but generate files into the current directory (note that the
+last argument must then contain a slash):
+.PP
+.RS
+localedef \-f UTF\-8 \-i fi_FI ./
+.RE
+.SH "SEE ALSO"
+.BR locale "(5), " locale "(7), " locale (1)
+.SH AUTHOR
+The program was written by Ulrich Drepper.
+.PP
+This manual page was written by Richard Braakman <dark@xs4all.nl> on
+behalf of the Debian GNU/Linux Project and anyone else who wants it.
+It was amended by Alastair McKinstry <mckinstry@computer.org> to 
+explain new ISO 14652 elements,
+and amended further by Lars Wirzenius <liw@iki.fi> to document new
+functionality (as of GNU C library 2.3.5).
+The manpage is not supported by the GNU libc maintainers and may be
+out of date.
+.SH STANDARDS
+This program conforms to the POSIX standard P1003.2
--- eglibc-2.13.orig/debian/local/manpages/nscd_nischeck.8
+++ eglibc-2.13/debian/local/manpages/nscd_nischeck.8
@@ -0,0 +1,31 @@
+.\" Placed in the Public Domain by Sebastian Rittau <srittau@jroger.in-berlin.de>.
+.Dd January 08, 2001
+.Dt NSCD_NISCHECK 8
+.Os "GNU C Library 2.2"
+.Sh NAME
+.Nm nscd_nischeck
+.Nd check NIS+ tables for read permissions
+.Sh SYNOPSIS
+.Nm nscd_nischeck
+.Ar OPTION | TABLE
+.Sh DESCRIPTION
+.Nm Nscd_nischeck
+checks if a given NIS+ table is world-readable. 0 is returned in
+this case. Otherwise, only authenticated users can read the table
+and 1 is returned.
+.Sh OPTIONS
+.Bl -tag -width Ds
+.It Fl ? , Fl -help
+Print a short help list.
+.El
+.Bl -tag -width Ds
+.It Fl -usage
+Print a short usage message.
+.El
+.Bl -tag -width Ds
+.It Fl V , Fl -version
+Print program version.
+.El
+.Sh SEE ALSO
+GNU C Library info file,
+.Xr nscd 8
--- eglibc-2.13.orig/debian/local/manpages/rpcgen.1
+++ eglibc-2.13/debian/local/manpages/rpcgen.1
@@ -0,0 +1,442 @@
+.\" @(#)rpcgen.new.1	1.1 90/11/09 TIRPC 1.0; from 40.10 of 10/10/89
+.\" Copyright (c) 1988,1990 Sun Microsystems, Inc. - All Rights Reserved.
+.nr X
+.if \nX=0 .ds x} rpcgen 1 "" "\&"
+.if \nX=1 .ds x} rpcgen 1 ""
+.if \nX=2 .ds x} rpcgen 1 "" "\&"
+.if \nX=3 .ds x} rpcgen "" "" "\&"
+.TH \*(x}
+.SH NAME
+\f4rpcgen\f1 \- an RPC protocol compiler
+.SH SYNOPSIS
+.ft 4
+.nf
+rpcgen \f2infile\f4
+.fi
+.ft 1
+.br
+.ft 4
+.nf
+rpcgen [\-D\f2name\f4[=\f2value\f4]] [\-T] [\-K \f2secs\fP] \f2infile\f4
+.fi
+.ft 1
+.br
+.ft 4
+.nf
+rpcgen \-c|\-h|\-l|\-m|\-M|\-t [\-o \f2outfile\f4 ] \f2infile\f4
+.fi
+.ft 1
+.br
+.ft 4
+.nf
+rpcgen [\-I] \-s \f2nettype\f4 [\-o \f2outfile\f4] \f2infile\f4
+.fi
+.ft 1
+.br
+.ft 4
+.nf
+rpcgen \-n \f2netid\f4 [\-o \f2outfile\f4] \f2infile\f4
+.ft 1
+.SH DESCRIPTION
+.P
+\f4rpcgen\f1
+is a tool that generates C code to implement an RPC protocol.
+The input to
+\f4rpcgen\f1
+is a language similar to C known as
+RPC Language (Remote Procedure Call Language).
+.P
+\f4rpcgen\f1
+is normally used as in the first synopsis where 
+it takes an input file and generates up to four output files.
+If the
+\f2infile\f1
+is named
+\f4proto.x\f1,
+then
+\f4rpcgen\f1
+will generate a header file in
+\f4proto.h\f1,
+XDR routines in
+\f4proto_xdr.c\f1,
+server-side stubs in
+\f4proto_svc.c\f1,
+and client-side stubs in
+\f4proto_clnt.c\f1.
+With the
+\f4\-T\f1
+option,
+it will also generate the RPC dispatch table in
+\f4proto_tbl.i\f1.
+With the
+\f4\-Sc\f1
+option,
+it will also generate  sample code which would illustrate how to use the
+remote procedures on the client side. This code would be created in 
+\f4proto_client.c\f1.
+With the
+\f4\-Ss\f1
+option,
+it will also generate a sample server code which would illustrate how to write
+the remote procedures. This code would be created in 
+\f4proto_server.c\f1.
+.P
+The server created can be started both by the port monitors
+(for example, \f4inetd\f1 or \f4listen\f1)
+or by itself.
+When it is started by a port monitor,
+it creates servers only for the transport for which 
+the file descriptor \f40\fP was passed.
+The name of the transport must be specified
+by setting up the environmental variable
+\f4PM_TRANSPORT\f1.
+When the server generated by
+\f4rpcgen\f1
+is executed,
+it creates server handles for all the transports
+specified in
+\f4NETPATH\f1
+environment variable,
+or if it is unset,
+it creates server handles for all the visible transports from
+\f4/etc/netconfig\f1
+file.
+Note:
+the transports are chosen at run time and not at compile time.
+.P
+When built for a port monitor (\f4rpcgen\f1 \f4\-I\f1), and that the server
+is self-started, it backgrounds itself by default.  A special define symbol
+\f4RPC_SVC_FG\f1 can be used to run the server process in foreground.
+.P
+The second synopsis provides special features which allow
+for the creation of more sophisticated RPC servers.
+These features include support for user provided
+\f4#defines\f1
+and RPC dispatch tables.
+The entries in the RPC dispatch table contain:
+.RS
+.PD 0
+.TP 3
+\(bu
+pointers to the service routine corresponding to that procedure,
+.TP
+\(bu
+a pointer to the input and output arguments
+.TP
+\(bu
+the size of these routines
+.PD
+.RE
+A server can use the dispatch table to check authorization 
+and then to execute the service routine; 
+a client library may use it to deal with the details of storage
+management and XDR data conversion.
+.P
+The other three synopses shown above are used when 
+one does not want to generate all the output files,
+but only a particular one.
+Some examples of their usage is described in the
+EXAMPLE
+section below.
+When 
+\f4rpcgen\f1
+is executed with the
+\f4\-s\f1
+option,
+it creates servers for that particular class of transports.
+When
+executed with the
+\f4\-n\f1
+option,
+it creates a server for the transport specified by
+\f2netid\f1.
+If
+\f2infile\f1
+is not specified,
+\f4rpcgen\f1
+accepts the standard input.
+.P
+The C preprocessor,
+\f4cc \-E\f1
+[see \f4cc\fP(1)],
+is run on the input file before it is actually interpreted by
+\f4rpcgen\f1.
+For each type of output file,
+\f4rpcgen\f1
+defines a special preprocessor symbol for use by the
+\f4rpcgen\f1
+programmer:
+.P
+.PD 0
+.TP 12
+\f4RPC_HDR\f1
+defined when compiling into header files
+.TP
+\f4RPC_XDR\f1
+defined when compiling into XDR routines
+.TP
+\f4RPC_SVC\f1
+defined when compiling into server-side stubs
+.TP
+\f4RPC_CLNT\f1
+defined when compiling into client-side stubs
+.TP
+\f4RPC_TBL\f1
+defined when compiling into RPC dispatch tables
+.PD
+.P
+Any line beginning with
+`\f4%\f1'
+is passed directly into the output file,
+uninterpreted by
+\f4rpcgen\f1.
+.P
+For every data type referred to in
+\f2infile\f1,
+\f4rpcgen\f1
+assumes that there exists a
+routine with the string
+\f4xdr_\f1
+prepended to the name of the data type.
+If this routine does not exist in the RPC/XDR
+library, it must be provided.
+Providing an undefined data type
+allows customization of XDR routines.
+.br
+.ne 10
+.P
+The following options are available:
+.TP
+\f4\-a\f1
+Generate all the files including sample code for client and server side.
+.TP
+\f4\-b\f1
+This generates code for the SunOS4.1 style of rpc. It is
+for backward compatibility.  This is the default.
+.TP
+\f4\-5\f1
+This generates code for the SysVr4 style of rpc. It is used by the
+Transport Independent RPC that is in Svr4 systems.
+By default rpcgen generates code for SunOS4.1 stype of rpc.
+.TP
+\f4\-c\f1
+Compile into XDR routines.
+.TP
+\f4\-C\f1
+Generate code in ANSI C. This option also generates code that could be
+compiled with the C++ compiler.  This is the default.
+.TP
+\f4\-k\f1
+Generate code in K&R C.  The default is ANSI C.
+.TP
+\f4\-D\f2name\f4[=\f2value\f4]\f1
+Define a symbol
+\f2name\f1.
+Equivalent to the
+\f4#define\f1
+directive in the source.
+If no
+\f2value\f1
+is given,
+\f2value\f1
+is defined as \f41\f1.
+This option may be specified more than once.
+.TP
+\f4\-h\f1
+Compile into
+\f4C\f1
+data-definitions (a header file).
+\f4\-T\f1
+option can be used in conjunction to produce a 
+header file which supports RPC dispatch tables.
+.TP
+\f4\-I\f1
+Generate a service that can be started from inetd.  The default is
+to generate a static service that handles transports selected with \f4\-s\f1.
+Using \f4\-I\f1 allows starting a service by either method.
+.TP
+\f4-K\f2 secs\f1
+By default, services created using \f4rpcgen\fP wait \f4120\fP seconds
+after servicing a request before exiting.
+That interval can be changed using the \f4-K\fP flag.
+To create a server that exits immediately upon servicing a request,
+\f4-K\ 0\fP can be used.
+To create a server that never exits, the appropriate argument is
+\f4-K\ -1\fP.
+.IP
+When monitoring for a server,
+some portmonitors, like
+\f4listen\fP(1M),
+.I always
+spawn a new process in response to a service request.
+If it is known that a server will be used with such a monitor, the
+server should exit immediately on completion.
+For such servers, \f4rpcgen\fP should be used with \f4-K\ -1\fP.
+.TP
+\f4\-l\f1
+Compile into client-side stubs.
+.TP
+\f4\-m\f1
+Compile into server-side stubs,
+but do not generate a \(lqmain\(rq routine.
+This option is useful for doing callback-routines 
+and for users who need to write their own 
+\(lqmain\(rq routine to do initialization.
+.TP
+\f4\-M\f1
+Generate multithread-safe stubs for passing arguments
+and results between rpcgen-generated code and user written code.
+This option is useful for users who want to use threads in their code.
+.TP
+\f4\-n \f2netid\f1
+Compile into server-side stubs for the transport
+specified by
+\f2netid\f1.
+There should be an entry for
+\f2netid\f1
+in the
+netconfig database.
+This option may be specified more than once,
+so as to compile a server that serves multiple transports.
+.TP
+\f4\-N\f1
+Use the newstyle of rpcgen. This allows procedures to have multiple arguments. 
+It also uses the style of parameter passing that closely resembles C. So, when 
+passing an argument to a remote procedure you do not have to pass a pointer to
+the argument but the argument itself. This behaviour is different from the oldstyle
+of rpcgen generated code. The newstyle is not the default case because of 
+backward compatibility.
+.TP
+\f4\-o \f2outfile\f1
+Specify the name of the output file.
+If none is specified,
+standard output is used
+(\f4\-c\f1,
+\f4\-h\f1,
+\f4\-l\f1,
+\f4\-m\f1,
+\f4\-n\f1,
+\f4\-s\f1,
+\f4\-Sc\f1,
+\f4\-Sm\f1,
+\f4\-Ss\f1,
+and
+\f4\-t\f1
+modes only).
+.TP
+\f4\-s \f2nettype\f1
+Compile into server-side stubs for all the 
+transports belonging to the class
+\f2nettype\f1.
+The supported classes are
+\f4netpath\f1,
+\f4visible\f1,
+\f4circuit_n\f1,
+\f4circuit_v\f1,
+\f4datagram_n\f1,
+\f4datagram_v\f1,
+\f4tcp\f1,
+and
+\f4udp\f1
+[see \f4rpc\fP(3N)
+for the meanings associated with these classes].
+This option may be specified more than once.
+Note:
+the transports are chosen at run time and not at compile time.
+.TP
+\f4\-Sc\f1
+Generate sample code to show the use of remote procedure and how to bind
+to the server before calling the client side stubs generated by rpcgen.
+.TP
+\f4\-Sm\f1
+Generate a sample Makefile which can be used for compiling the application.
+.TP
+\f4\-Ss\f1
+Generate skeleton code for the remote procedures on the server side. You would need
+to fill in the actual code for the remote procedures.
+.TP
+\f4\-t\f1
+Compile into RPC dispatch table.
+.TP
+\f4\-T\f1
+Generate the code to support RPC dispatch tables.
+.P
+The options 
+\f4\-c\f1,
+\f4\-h\f1,
+\f4\-l\f1,
+\f4\-m\f1,
+\f4\-s\f1
+and
+\f4\-t\f1
+are used exclusively to generate a particular type of file,
+while the options
+\f4\-D\f1
+and
+\f4\-T\f1
+are global and can be used with the other options.
+.br
+.ne 5
+.SH NOTES
+The RPC Language does not support nesting of structures.
+As a work-around,
+structures can be declared at the top-level,
+and their name used inside other structures in 
+order to achieve the same effect.
+.P
+Name clashes can occur when using program definitions,
+since the apparent scoping does not really apply.
+Most of these can be avoided by giving 
+unique names for programs,
+versions,
+procedures and types.
+.P
+The server code generated with
+\f4\-n\f1
+option refers to the transport indicated by
+\f2netid\f1
+and hence is very site specific.
+.SH EXAMPLE
+The following example:
+.IP
+.ft 4
+$ rpcgen \-T prot.x
+.ft 1
+.P
+generates the five files:
+\f4prot.h\f1,
+\f4prot_clnt.c\f1,
+\f4prot_svc.c\f1,
+\f4prot_xdr.c\f1
+and
+\f4prot_tbl.i\f1.
+.P
+The following example sends the C data-definitions (header file)
+to the standard output.
+.IP
+.ft 4
+$ rpcgen \-h prot.x
+.ft 1
+.P
+To send the test version of the
+\f4-DTEST\f1,
+server side stubs for 
+all the transport belonging to the class
+\f4datagram_n\f1
+to standard output, use:
+.IP
+.ft 4
+$ rpcgen \-s datagram_n \-DTEST prot.x
+.ft 1
+.P
+To create the server side stubs for the transport indicated
+by
+\f2netid\f1
+\f4tcp\f1,
+use:
+.IP
+.ft 4
+$ rpcgen \-n tcp \-o prot_svc.c prot.x
+.ft 1
+.SH "SEE ALSO"
+\f4cc\fP(1).
--- eglibc-2.13.orig/debian/local/manpages/Makefile
+++ eglibc-2.13/debian/local/manpages/Makefile
@@ -0,0 +1,20 @@
+#! /usr/bin/make -f
+
+DIRS := de es fr id pl pt_BR
+
+SGML_MAN = locale-gen.8
+
+all: $(patsubst %.pod,%.1,$(wildcard *.pod)) $(SGML_MAN) po4a-man
+%.1: %.pod
+	pod2man --center="Debian GNU/Linux" --release="etch" $< > $@
+
+locale-gen.8: locale-gen.8.sgml
+	docbook-to-man $< > $@
+
+po4a-man:
+	po4a -q po4a.cfg
+
+clean:
+	po4a -q po4a.cfg
+	$(foreach dir, $(DIRS), rm -rf $(dir)/*.8)
+	rm -f po/*~
--- eglibc-2.13.orig/debian/local/manpages/tzselect.1
+++ eglibc-2.13/debian/local/manpages/tzselect.1
@@ -0,0 +1,67 @@
+.\" Copyright 1998 Marcus Brinkmann (brinkmd@debian.org)
+.\"
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one
+.\" 
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date.  The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein.  The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\" 
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\"
+.\" Modified Mon Jul 12 18:40:00 1998 by Marcus Brinkmann (brinkmd@debian.org)
+.TH TZSELECT 1 "12 June 1998" "Debian" "Debian Timezone Configuration"
+.SH NAME
+tzselect \- view timezones
+.SH SYNOPSIS
+.B tzselect
+.SH DESCRIPTION
+This manual page explains how you can use the
+.B "tzselect"
+utility to view the installed timezone. It comes handy when you want to know what time it is in
+other countries, or if you just wonder what timezones exist.
+
+.B tzselect
+is called without any parameters from the shell. It shows a list of about one dozen geographic
+areas one can roughly recognize as continents. After choosing a geographic area by number, a
+list of countries and cities in this area will be shown.
+
+You can press the
+.B Enter
+key to reprint the list. To choose a timezone, just press the number left to it.
+If your input is invalid, the list will be reprinted.
+
+You may press
+.B Ctrl-C
+to interrupt the script at any time.
+
+Note that
+.B tzselect
+will not actually change the timezone for you. Use 'dpkg-reconfigure tzdata' to achieve this.
+.SH FILES
+.I /usr/share/zoneinfo/
+.SH "SEE ALSO"
+.BR hwclock (8)
+.SH AUTHOR
+Copyright 1998 Marcus Brinkmann <brinkmd@debian.org>
+
+Please see nroff source for legal notice.
+
+
+
+
+
+
+
+
--- eglibc-2.13.orig/debian/local/manpages/locale-gen.8.sgml
+++ eglibc-2.13/debian/local/manpages/locale-gen.8.sgml
@@ -0,0 +1,148 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+<!-- Process this file with docbook-to-man to generate an nroff manual
+     page: `docbook-to-man manpage.sgml > manpage.1'.  You may view
+     the manual page with: `docbook-to-man manpage.sgml | nroff -man |
+     less'.  A typical entry in a Makefile or Makefile.am is:
+
+manpage.1: manpage.sgml
+	docbook-to-man $< > $@
+  -->
+
+  <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+  <!ENTITY dhfirstname "<firstname>Eduard</firstname>">
+  <!ENTITY dhsurname   "<surname>Bloch</surname>">
+  <!-- Please adjust the date whenever revising the manpage. -->
+  <!ENTITY dhdate      "<date>March 10, 2005</date>">
+  <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+       allowed: see man(7), man(1). -->
+  <!ENTITY dhsection   "<manvolnum>8</manvolnum>">
+  <!ENTITY dhemail     "<email>blade@debian.org</email>">
+  <!ENTITY dhusername  "Eduard Bloch">
+  <!ENTITY dhucpackage "<refentrytitle>LOCALE-GEN</refentrytitle>">
+  <!ENTITY dhpackage   "locale-gen">
+
+  <!ENTITY debian      "<productname>Debian GNU/Linux</productname>">
+  <!ENTITY gnu         "<acronym>GNU</acronym>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      &dhemail;
+    </address>
+    <author>
+      &dhfirstname;
+      &dhsurname;
+    </author>
+    <copyright>
+      <year>2001</year>
+      <holder>&dhusername;</holder>
+    </copyright>
+    &dhdate;
+  </refentryinfo>
+  <refmeta>
+    &dhucpackage;
+
+    &dhsection;
+  </refmeta>
+  <refnamediv>
+    <refname>&dhpackage;</refname>
+
+    <refpurpose>generates localisation files from templates</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>&dhpackage;</command>
+      <arg><option>--keep-existing</option></arg>
+
+    </cmdsynopsis>
+  </refsynopsisdiv>
+  <refsect1>
+    <title>DESCRIPTION</title>
+
+    <para>This manual page documents briefly the
+      <command>&dhpackage;</command> command.</para>
+
+    <para>By default, the locale package which provides the base support for
+    localisation of libc-based programs does not contain usable localisation
+    files for every supported language. This limitation has became necessary
+    because of the substantial size of such files and the large number of
+    languages supported by libc. As a result, Debian uses a special
+    mechanism where we prepare the actual localisation files on the target
+    host and distribute only the templates for them.</para>
+    <para>
+    <command>&dhpackage;</command> is a program that reads the file
+    <filename>/etc/locale.gen</filename> and invokes
+    <command>localedef</command> for the chosen localisation profiles.
+    Run <command>&dhpackage;</command> after you have modified the <filename>/etc/locale.gen</filename> file.
+    
+	  </para>
+
+  </refsect1>
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <variablelist>
+      <varlistentry>
+        <term><option>--keep-existing</option></term>
+        <listitem>
+          <para>By default, <command>&dhpackage;</command> removes all
+          existing locales and generates new ones afresh. The
+          <option>--keep-existing</option> option prevents this, so that
+          only locales which do not already exist are generated. This is
+          useful if calling locale-gen a number of times in
+          succession.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+
+  </refsect1>
+  <refsect1>
+    <title>FILES</title>
+
+    <para><filename>/etc/locale.gen</filename></para>
+    <para>The main configuration file, which has a simple format: every
+    line that is not empty and does not begin with a # is treated as a
+    locale definition that is to be built.
+    </para>
+
+  </refsect1>
+
+  <refsect1>
+    <title>SEE ALSO</title>
+
+    <para>localedef(1), locale(1), locale.alias(5), locale.gen(5).</para>
+
+  </refsect1>
+
+  <refsect1>
+    <title>AUTHOR</title>
+
+    <para>This manual page was written by &dhusername; &lt;&dhemail;&gt; for
+      the &debian; system (but may be used by others).  Permission is
+      granted to copy, distribute and/or modify this document under
+      the terms of the <acronym>GNU</acronym> Free Documentation
+      License, Version 1.1 or any later version published by the Free
+      Software Foundation; with no Invariant Sections, no Front-Cover
+      Texts and no Back-Cover Texts.</para>
+
+  </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
--- eglibc-2.13.orig/debian/local/manpages/glibcbug.1
+++ eglibc-2.13/debian/local/manpages/glibcbug.1
@@ -0,0 +1,50 @@
+'\" t
+.\" ** The above line should force tbl to be a preprocessor **
+.\" Man page for man
+.\"
+.\" Copyright (C), 2002 Free Software Foundation, Inc.
+.\"
+.\" You may distribute under the terms of the GNU General Public
+.\" License as specified in the file COPYING that comes with the
+.\" glibc distribution.
+.\"
+.\"
+.TH glibcbug 1 "10 January 2002" "" "Debian GNU/Linux"
+.SH "NAME"
+glibcbug \- Report a bug to the Glibc developers
+.SH "SYNOPSIS"
+.B glibcbug
+.SH "DESCRIPTION"
+.B glibcbug
+is a tool for reporting bugs to the glibc maintainers.
+It automatically starts an editor where the user can enter details
+of the bug. On completion, the bug is sent to the appropriate
+address.
+The User should replace the comments (text surrounded by
+<angle quotes>, and fill in the Subject: and From: lines with
+a summary and e-mail address.
+
+If the user believes the bug is related to Debian rather than to the
+glibc (libc6) package, then the
+.B reportbug
+command should be used instead.
+.SH "ENVIRONMENT"
+.B glibcbug
+will utilize the following enviromntal variables if they exist:
+.TP
+.B EDITOR
+and
+.B VISUAL 
+Specifies the preferred editor. If
+neither are set, 
+.B glibcbug
+will default to 
+.B /usr/bin/sensible-editor
+to determine a working editor.
+.TP
+.B HOME
+Directory in which the failed bug report is saved if the mail fails.
+.SH "SEE ALSO"
+reportbug(1)
+.SH "AUTHOR"
+Alastair McKinstry <mckinstry@computer.org>.
--- eglibc-2.13.orig/debian/local/manpages/nscd.8
+++ eglibc-2.13/debian/local/manpages/nscd.8
@@ -0,0 +1,87 @@
+.\" Placed in the Public Domain by Sebastian Rittau <srittau@jroger.in-berlin.de>.
+.Dd January 07, 2001
+.Dt NSCD 8
+.Os "GNU C Library 2.2"
+.Sh NAME
+.Nm nscd
+.Nd name service caching daemon
+.Sh SYNOPSIS
+.Nm nscd
+.Op OPTION...
+.Sh DESCRIPTION
+.Nm Nscd
+caches libc-issued requests to the Name Service. If retrieving
+NSS data is fairly expensive,
+.Nm nscd
+is able to speed up consecutive access to the same data
+dramatically and increase overall system performance.
+.Nm Nscd
+should be run at boot time by
+.Pa /etc/init.d/nscd .
+.Sh OPTIONS
+.Bl -tag -width Ds
+.It Fl d , Fl -debug
+Do not fork and display messages on the current tty.
+.El
+.Bl -tag -width Ds
+.It Fl f , Fl -config-file Ar NAME
+Read configuration data from
+.Pa NAME .
+For a description of the config file format, see nscd.conf(5).
+.El
+.Bl -tag -width Ds
+.It Fl g , Fl -statistic
+Print current configuration statistics.
+.El
+.Bl -tag -width Ds
+.It Fl i , Fl -invalidate Ar TABLE
+Invalidate the specified
+.Pa TABLE ,
+i. e. forget all data cached therein. This should be used if the
+database storing this information has been changed.
+.El
+.Bl -tag -width Ds
+.It Fl K , Fl -shutdown
+Quit a running
+.Nm nscd
+process.
+.El
+.Bl -tag -width Ds
+.It Fl S , Fl -secure Ar TABLE
+Use a separate cache for each user.
+.El
+.Bl -tag -width Ds
+.It Fl t , Fl -nthreads Ar NUMBER
+Start
+.Pa NUMBER
+threads. This denotes the maximum number
+of requests that can be handled simultaneously. The default is set
+in the configuration file. (See nscd.conf(5).)
+.El
+.Bl -tag -width Ds
+.It Fl ? , Fl -help
+Print the list of available options.
+.El
+.Bl -tag -width Ds
+.It Fl -usage
+Print a short usage message.
+.El
+.Bl -tag -width Ds
+.It Fl V , Fl -version
+Print program version.
+.El
+.Sh FILES
+.Bl -tag -width Ds
+.It Ar /etc/nscd.conf
+.Nm Nscd
+configuration file. See nscd.conf(5) for more information.
+.El
+.Bl -tag -width Ds
+.It Ar /etc/nsswitch.conf
+Name Service Switch configuration. See nsswitch.conf(5)
+for more information.
+.El
+.Sh SEE ALSO
+GNU C Library info file,
+.Xr nscd.conf 5 ,
+.Xr nsswitch.conf 5
--- eglibc-2.13.orig/debian/local/manpages/po4a.cfg
+++ eglibc-2.13/debian/local/manpages/po4a.cfg
@@ -0,0 +1,7 @@
+[po4a_paths] po/man.pot de:po/de.po es:po/es.po id:po/id.po \
+	fr:po/fr.po pl:po/pl.po pt_BR:po/pt_BR.po
+
+[type: man] validlocale.8 es:es/validlocale.es.8 \
+	id:id/validlocale.id.8 add_id:id/addendum.id fr:fr/validlocale.fr.8 \
+	add_fr:fr/addendum.fr pl:pl/validlocale.pl.8 \
+	pt_BR:pt_BR/validlocale.pt_BR.8
--- eglibc-2.13.orig/debian/local/manpages/locale.gen.5
+++ eglibc-2.13/debian/local/manpages/locale.gen.5
@@ -0,0 +1,41 @@
+.\" -*- nroff -*-
+.\" Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+.\"
+.\" This program is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 2, or (at your option)
+.\" any later version.
+.\"
+.\" This program is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with this program; if not, write to the Free Software Foundation,
+.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.TH locale.gen 5 "July 2005" "Debian GNU/Linux"
+.SH "NAME"
+locale.gen \- Configuration file for locale-gen
+.SH "DESCRIPTION"
+The file \fB/etc/locale.gen\fP lists the locales that are to be generated
+by the \fBlocale-gen\fP command.
+
+Each line is of the form:
+
+<locale> <charset>
+
+where <locale> is one of the locales given in 
+.B /usr/share/i18n/locales
+and <charset> is one of the character sets listed in 
+.B /usr/share/i18n/charmaps
+
+The
+.B locale-gen
+command will generate all the locales, placing them in
+\fB/usr/lib/locale\fP.
+
+.SH "SEE ALSO"
+locale-gen(8), localedef(1), locale(1)
+.SH "AUTHOR"
+Alastair McKinstry <mckinstry@computer.org>
--- eglibc-2.13.orig/debian/local/manpages/getconf.1
+++ eglibc-2.13/debian/local/manpages/getconf.1
@@ -0,0 +1,247 @@
+.rn '' }`
+.\" $RCSfile: getconf.1,v $$Revision: 1.1.2.1 $$Date: 2003/09/22 21:33:35 $
+.\"
+.\" $Log: getconf.1,v $
+.\" Revision 1.1.2.1  2003/09/22 21:33:35  jbailey
+.\" New directory for things we add to the package
+.\"
+.\"
+.de Sh
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp
+.if t .sp .5v
+.if n .sp
+..
+.de Ip
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.de Vb
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve
+.ft R
+
+.fi
+..
+.\"
+.\"
+.\"     Set up \*(-- to give an unbreakable dash;
+.\"     string Tr holds user defined translation string.
+.\"     Bell System Logo is used as a dummy character.
+.\"
+.tr \(*W-|\(bv\*(Tr
+.ie n \{\
+.ds -- \(*W-
+.ds PI pi
+.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+.ds L" ""
+.ds R" ""
+.\"   \*(M", \*(S", \*(N" and \*(T" are the equivalent of
+.\"   \*(L" and \*(R", except that they are used on ".xx" lines,
+.\"   such as .IP and .SH, which do another additional levels of
+.\"   double-quote interpretation
+.ds M" """
+.ds S" """
+.ds N" """""
+.ds T" """""
+.ds L' '
+.ds R' '
+.ds M' '
+.ds S' '
+.ds N' '
+.ds T' '
+'br\}
+.el\{\
+.ds -- \(em\|
+.tr \*(Tr
+.ds L" ``
+.ds R" ''
+.ds M" ``
+.ds S" ''
+.ds N" ``
+.ds T" ''
+.ds L' `
+.ds R' '
+.ds M' `
+.ds S' '
+.ds N' `
+.ds T' '
+.ds PI \(*p
+'br\}
+.\"	If the F register is turned on, we'll generate
+.\"	index entries out stderr for the following things:
+.\"		TH	Title 
+.\"		SH	Header
+.\"		Sh	Subsection 
+.\"		Ip	Item
+.\"		X<>	Xref  (embedded
+.\"	Of course, you have to process the output yourself
+.\"	in some meaningful fashion.
+.if \nF \{
+.de IX
+.tm Index:\\$1\t\\n%\t"\\$2"
+..
+.nr % 0
+.rr F
+.\}
+.TH GETCONF 1 "squeeze" "13/Jun/2010" "Debian GNU/Linux"
+.UC
+.if n .hy 0
+.if n .na
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.de CQ          \" put $1 in typewriter font
+.ft CW
+'if n "\c
+'if t \\&\\$1\c
+'if n \\&\\$1\c
+'if n \&"
+\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
+'.ft R
+..
+.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
+.	\" AM - accent mark definitions
+.bd B 3
+.	\" fudge factors for nroff and troff
+.if n \{\
+.	ds #H 0
+.	ds #V .8m
+.	ds #F .3m
+.	ds #[ \f1
+.	ds #] \fP
+.\}
+.if t \{\
+.	ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.	ds #V .6m
+.	ds #F 0
+.	ds #[ \&
+.	ds #] \&
+.\}
+.	\" simple accents for nroff and troff
+.if n \{\
+.	ds ' \&
+.	ds ` \&
+.	ds ^ \&
+.	ds , \&
+.	ds ~ ~
+.	ds ? ?
+.	ds ! !
+.	ds /
+.	ds q
+.\}
+.if t \{\
+.	ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.	ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.	ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.	ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.	ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.	ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
+.	ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
+.	ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.	ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
+.\}
+.	\" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
+.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
+.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
+.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.ds oe o\h'-(\w'o'u*4/10)'e
+.ds Oe O\h'-(\w'O'u*4/10)'E
+.	\" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.	\" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.	ds : e
+.	ds 8 ss
+.	ds v \h'-1'\o'\(aa\(ga'
+.	ds _ \h'-1'^
+.	ds . \h'-1'.
+.	ds 3 3
+.	ds o a
+.	ds d- d\h'-1'\(ga
+.	ds D- D\h'-1'\(hy
+.	ds th \o'bp'
+.	ds Th \o'LP'
+.	ds ae ae
+.	ds Ae AE
+.	ds oe oe
+.	ds Oe OE
+.\}
+.rm #[ #] #H #V #F C
+.SH "NAME"
+getconf \- Query system configuration variables
+.SH "SYNOPSIS"
+\fBgetconf\fR \-a
+.P
+\fBgetconf\fR [\fB\-v specification\fR] system_var
+.PP
+\fBgetconf\fR [\fB\-v specification\fR] path_var pathname
+.SH "DESCRIPTION"
+\fB\-a\fR
+.PP
+.Vb 2
+\&        Displays all configuration variables for the current system
+\&        and their values.
+.Ve
+\fB\-v\fR
+.PP
+.Vb 2
+\&        Indicate the specification and version for which to obtain
+\&        configuration variables.
+.Ve
+\fBsystem_var\fR
+.PP
+.Vb 2
+\&        A system configuration variable, as defined by sysconf(3) or
+\&        confstr(3).
+.Ve
+\fBpath_var\fR
+.PP
+.Vb 2
+\&        A system configuration variable as defined by pathconf(3). This
+\&        must be used with a pathname.
+.Ve
+.SH "AUTHOR"
+\fIgetconf\fR was written by Roland McGrath for the GNU C Library
+.PP
+This man page was written by Ben Collins <bcollins@debian.org> for
+the Debian GNU/Linux system.
+.SH "SEE ALSO"
+\fBsysconf\fR(3), \fBpathconf\fR(3), \fBconfstr\fR(3)
+
+.rn }` ''
+.IX Title "GETCONF 1"
+.IX Name "getconf - Query system configuration variables"
+
+.IX Header "NAME"
+
+.IX Header "SYNOPSIS"
+
+.IX Header "DESCRIPTION"
+
+.IX Header "AUTHOR"
+
+.IX Header "SEE ALSO"
+
--- eglibc-2.13.orig/debian/local/manpages/ldd.1
+++ eglibc-2.13/debian/local/manpages/ldd.1
@@ -0,0 +1,58 @@
+.\" Copyright 1995-2000 David Engel (david@ods.com)
+.\" Copyright 1995 Rickard E. Faith (faith@cs.unc.edu)
+.\" Copyright 2000 Ben Collins (bcollins@debian.org)
+.\"    Redone for GLibc 2.2
+.\" Copyright 2000 Jakub Jelinek (jakub@redhat.com)
+.\"    Corrected.
+.\" Most of this was copied from the README file.  Do not restrict distribution.
+.\" May be distributed under the GNU General Public License
+.TH LDD 1 "30 October 2000"
+.SH NAME
+ldd \- print shared library dependencies
+.SH SYNOPSIS
+.B ldd
+.RB [OPTION]...
+FILE...
+.SH DESCRIPTION
+.B ldd
+prints the shared libraries required by each program or shared library
+specified on the command line.
+.SH OPTIONS
+.TP
+.B \-\-version
+Print the version number of
+.BR ldd .
+.TP
+.B \-v\ \-\-verbose
+Print all information, including e.g. symbol versioning information.
+.TP
+.B \-d\ \-\-data\-relocs
+Perform relocations and report any missing objects (ELF only).
+.TP
+.B \-r\ \-\-function\-relocs
+Perform relocations for both data objects and functions, and
+report any missing objects or functions (ELF only).
+.TP
+.B \-u\ \-\-unused
+Print unused direct dependencies.
+.TP
+.B \-\-help
+Usage information.
+.SH BUGS
+.B ldd
+does not work on a.out shared libraries.
+.PP
+.B ldd
+does not work with some extremely old a.out programs which were
+built before
+.B ldd
+support was added to the compiler releases.
+If you use
+.B ldd
+on one of these programs, the program will attempt to run with argc = 0 and
+the results will be unpredictable.
+.SH AUTHOR
+Roland McGrath and Ulrich Drepper.
+.SH SEE ALSO
+.BR ldconfig (8),
+.BR ld.so (8).
--- eglibc-2.13.orig/debian/local/manpages/nscd.conf.5
+++ eglibc-2.13/debian/local/manpages/nscd.conf.5
@@ -0,0 +1,243 @@
+.\" Placed in the Public Domain by Sebastian Rittau <srittau@jroger.in-berlin.de>
+.TH NSCD.CONF 5 "07 January 2001"
+.UC 5
+.SH NAME
+nscd.conf \- configuration file for Name Service Caching Daemon
+.hy 0
+.SH DESCRIPTION
+.I /etc/nscd.conf
+configures the caches used by
+.BR nscd (8)
+as well as some generic options.
+.BR nscd (8)
+is able to use a configuration file at a different location,
+when supplied with the
+.IR -f 
+or
+.IR --config-file
+command line option.
+
+.PP
+The configuration file consists of a set of lines.
+Empty lines, and text after a '#' is ignored.
+All remaining lines denote the setting of an option.
+White space before and after options, and between
+options and option arguments is ignored.
+
+There are two kinds of options: General options influence
+.BR nscd (8)'s
+general behaviour, while cache related options only affect the
+specified cache. Options are set like this:
+.nf
+
+  general_option option
+  cache_option cache_name option
+.fi
+.SH GENERAL OPTIONS
+.TP
+.BI logfile \ file
+Specifies the name of the debug log-file that
+.BR nscd (8)
+should use if
+.B debug-level
+is higher than
+.BR 0 .
+If this option is not set,
+.BR nscd (8)
+will write its debug output to stderr.
+.TP
+.BI debug-level \ level
+If
+.I level
+is higher than
+.BR 0 ,
+.BR nscd (8)
+will create some debug output. The higher the level, the more verbose
+the output.
+.TP
+.BI threads \ #threads
+This option sets the number of threads that
+.BR nscd (8)
+should use by default. It can be overridden by calling
+.BR nscd (8)
+with the
+.I -t
+or
+.I --nthreads
+argument. If neither this configuration option nor the command line
+argument is given,
+.BR nscd (8)
+uses 5 threads by default. The minimum is 3. More threads means more
+simultaneous connections that
+.BR nscd (8)
+can handle.
+.TP
+.BI max-threads \ #threads
+Specifies the maximum number of threads to be started.
+.TP
+.BI server-user \ user
+By default,
+.BR nscd (8)
+is run as user root. This option can be set to force
+.BR nscd (8)
+to drop root privileges after startup. It cannot be used when
+.BR nscd (8)
+is called with the
+.I -S
+or
+.I --secure
+argument. Also note that some services require that nscd run as root, so
+using this may break those lookup services.
+.TP
+.BI stat-user \ user
+Specifies the user who is allowed to request statistics.
+.TP
+.BI paranoia \ bool
+.I bool
+must be one of
+.B yes
+or
+.BR no .
+Enabling paranoia mode causes 
+.BR nscd (8)
+to restart itself periodically.
+.TP
+.BI restart-interval \ time
+Sets the restart interval to time seconds if periodic restart is enabled by enabling
+paranoia mode. The default value is 3600.
+.SH CACHE OPTIONS
+All cache options take two arguments. The first one denotes
+the service or cache the option should affect. Currently
+.I service
+can be one of
+.BR passwd ,
+.BR group ,
+or
+.BR hosts .
+.TP
+.BI enable-cache \ service\ bool
+.I bool
+must be one of
+.B yes
+or
+.BR no .
+Each cache is disabled by default and must be enabled explicitly
+by setting this options to
+.BR yes .
+.TP
+.BI positive-time-to-live \ service\ secs
+This is the number of seconds after which a cached entry is
+removed from the cache. This defaults to 3600 seconds (i. e.
+one hour).
+.TP
+.BI negative-time-to-live \ service\ secs
+If an entry is not found by the Name Service, it is added to
+the cache and marked as "not existent". This option sets the number
+of seconds after which such a not existent entry is removed from
+the cache. This defaults to 20 seconds for the
+.B password
+and
+.B host
+caches and to 60 seconds for the
+.B group
+cache.
+.TP
+.BI suggested-size \ service\ prime-number
+This option sets the size of the hash that is used to store the
+cache entries. As this is a hash, it should be reasonably larger
+than the maximum number of entries that is expected to be cached
+simultaneously and should be a prime number. It defaults to a
+size of 211 entries.
+.TP
+.BI check-files \ service\ bool
+.I bool
+must be one of
+.B yes
+(default) or
+.BR no .
+If file checking is enabled,
+.BR nscd (8)
+periodically checks the modification time of
+.IR /etc/passwd ,
+.IR /etc/group ,
+or
+.I /etc/hosts
+(for the
+.BR passwd ,
+.BR group ,
+and
+.B host
+cache respectively)
+and invalidates the cache if the file has changed since the
+last check.
+.TP
+.BI persistent \ service\ bool
+.I bool
+must be one of
+.B yes
+(default) or
+.BR no .
+Keep the content of the cache for service over 
+.BR nscd (8)
+restarts. Useful when paranoia mode is set.
+.TP
+.BI shared \ service\ bool
+.I bool
+must be one of
+.B yes
+(default) or
+.BR no .
+The memory mapping of the
+.BR nscd (8)
+databases for service is shared with the clients so that they can directly search
+in them instead of having to ask the daemon over the socket each time a lookup is
+performed.
+.TP
+.BI reload-count \ #number
+Sets the number of times a cached record is reloaded before it is pruned from 
+the cache. Each cache record has a timeout, when that timeout expires, 
+.BR nscd (8)
+will either reload it (query the NSS service again if the data hasn't changed), or
+drop it.
+.TP
+.BI max-db-size \ service\ number-of-bytes  
+Sets the maximum allowable size for the service. 
+.TP
+.BI auto-propagate \ service\ bool
+When set to no for passwd or group service, then the 
+.I .byname
+requests are not added to
+.I passwd.byuid
+or
+.I group.bygid
+cache. This may help for tables containing multiple records for the same id.
+.SH EXAMPLE
+.nf
+
+# This is a comment.
+
+    logfile                 /var/log/nscd.log
+    threads                 6
+    server-user             nobody
+    debug-level             0
+
+    enable-cache            passwd          yes
+    positive-time-to-live   passwd          600
+    negative-time-to-live   passwd          20
+    suggested-size          passwd          211
+    check-files             passwd          yes
+
+    enable-cache            group           yes
+    positive-time-to-live   group           3600
+    negative-time-to-live   group           60
+    suggested-size          group           211
+    check-files             group           yes
+
+    enable-cache            hosts           yes
+    positive-time-to-live   hosts           3600
+    negative-time-to-live   hosts           20
+    suggested-size          hosts           211
+    check-files             hosts           yes
+.fi
+.SH SEE ALSO
+nscd(8), nsswitch.conf(5)
--- eglibc-2.13.orig/debian/local/manpages/pl/validlocale.pl.8
+++ eglibc-2.13/debian/local/manpages/pl/validlocale.pl.8
@@ -0,0 +1,52 @@
+.\" This file was generated with po4a. Translate the source file.
+.\" 
+.TH validlocale 8 0.1 "Petter Reinholdtsen" ""
+.SH NAZWA
+.LP
+validlocale \- Sprawdza, czy dost�pne jest dane locale
+.SH SK�ADNIA
+.LP
+validlocale <\fIlocale\fP>
+.SH OPIS
+.LP
+Sprawdza, czy locale podane jako argument jest poprawne. Je�li nie jest, 
+wypisuje na stdout napis, jaki nale�y doda� do /etc/locale.gen, aby 
+polecenie locale\-gen wygenerowa�o dane locale (o ile w og�le ono istnieje).
+.SH PLIKI
+.LP
+\fI/usr/sbin/validlocale\fP
+.br
+\fI/usr/share/i18n/SUPPORTED\fP
+.SH "ZMIENNE �RODOWISKOWE"
+.LP
+.TP  
+\fBDEFAULTCHARSET\fP
+Jakiego zestawu znak�w u�y�, je�li podanego locale nie ma w li�cie 
+obs�ugiwanych.
+.SH PRZYK�ADY
+.LP
+Je�li jako parametr podano nazw� poprawnego locale, wypisuje na stderr 
+odpowiedni napis:
+.LP
+.IP
+% validlocale C
+.br
+locale 'C' valid and available
+.LP
+Je�li podano nazw� nieprawid�owego locale (niewygenerowanego lub po prostu 
+nieistniej�cego), wypisuje na stderr napis m�wi�cy o tym, �e nie jest to 
+prawid�owe locale, oraz \- na stdout \- napis, kt�ry nale�y doda� do 
+/etc/locale.gen, aby m�c wygenerowa� dane locale:
+.LP
+.IP
+% validlocale de_AU@euro
+.br
+locale 'de_AT@euro' not available
+.br
+de_AT@euro ISO\-8859\-15
+.SH AUTOR
+.LP
+Petter Reinholdtsen <pere@hungry.com>
+.SH "PATRZ TAK�E"
+.LP
+locale\-gen(8), localedef(1), locale(1)
--- eglibc-2.13.orig/debian/local/manpages/fr/validlocale.fr.8
+++ eglibc-2.13/debian/local/manpages/fr/validlocale.fr.8
@@ -0,0 +1,57 @@
+.\" This file was generated with po4a. Translate the source file.
+.\" 
+.TH validlocale 8 0.1 "Petter Reinholdtsen" ""
+.SH NOM
+.LP
+validlocale \- v�rifie si un ensemble donn� de param�tres r�gionaux est 
+disponible
+.SH SYNTAXE
+.LP
+validlocale <\fIlocale\fP>
+.SH DESCRIPTION
+.LP
+Teste si l'ensemble de param�tres r�gionaux donn� en argument est 
+valable. S'il ne l'est pas, affiche sur la sortie standard la cha�ne de 
+caract�res � ajouter � /etc/locale.gen afin de permettre � locale\-gen de 
+g�n�rer l'ensemble de param�tres (s'il existe).
+.SH FICHIERS
+.LP
+\fI/us/sbin/validlocale\fP
+.br
+\fI/usr/share/i18n/SUPPORTED\fP
+.SH "VARIABLES D'ENVIRONNEMENT"
+.LP
+.TP  
+\fBDEFAULTCHARSET\fP
+Indique quel encodage de caract�res doit �tre suppos� si la locale donn�e 
+n'est pas dans la liste des locales g�r�es.
+.SH EXEMPLES
+.LP
+Si vous indiquez comme param�tre une locale valabe, vous recevrez ceci sur 
+la sortie d'erreur  
+.LP
+.IP
+% validlocale C
+.br
+locale �\ C\ � valide et disponible
+.LP
+Lorsqu'une locale non valable (non cr��e ou inexistante) est indiqu�e, vous 
+recevrez un message sur la sortie d'erreur disant qu'il s'agit d'une locale 
+non valable et une cha�ne de caract�res sur la sortie standard � ajouter � 
+/etc/locale.gen pour que la locale soit cr��e\ :
+.LP
+.IP
+% validlocale de_AU@euro
+.br
+locale  �\ de_AT@euro\ � non disponible
+.br
+de_AT@euro ISO\-8859\-15
+.SH AUTEURS
+.LP
+Petter�Reinholdtsen�<pere@hungry.com>
+
+.SH "TRADUCTION"
+Cl�ment Stenac, 2005. Veuillez signaler toute erreur � <debian\-l10n\-french@lists.debian.org>
+.SH "VOIR AUSSI"
+.LP
+locale\-gen(8), localedef(1), locale(1)
--- eglibc-2.13.orig/debian/local/manpages/fr/addendum.fr
+++ eglibc-2.13/debian/local/manpages/fr/addendum.fr
@@ -0,0 +1,4 @@
+PO4A-HEADER:mode=after;position=AUTEUR;beginboundary=\.SH
+
+.SH "TRADUCTION"
+Cl�ment Stenac, 2005. Veuillez signaler toute erreur � <debian\-l10n\-french@lists.debian.org>
--- eglibc-2.13.orig/debian/local/manpages/po/id.po
+++ eglibc-2.13/debian/local/manpages/po/id.po
@@ -0,0 +1,526 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+# 
+msgid ""
+msgstr ""
+"Project-Id-Version: base-config man\n"
+"POT-Creation-Date: 2005-12-27 17:38-0500\n"
+"PO-Revision-Date: 2005-11-11 16:50-0500\n"
+"Last-Translator: Debian Indonesia Team <debian-l10n-id@gurame.fisika.ui.ac."
+"id>\n"
+"Language-Team: Debian Indonesia Team <debian-l10n-id@gurame.fisika.ui.ac."
+"id>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ascii\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+# type: TH
+#: validlocale.8:1
+#, fuzzy, no-wrap
+msgid "validlocale"
+msgstr "validlocale"
+
+# type: TH
+#: validlocale.8:1
+#, fuzzy, no-wrap
+msgid "0.1"
+msgstr "0.1"
+
+# type: TH
+#: validlocale.8:1
+#, fuzzy, no-wrap
+msgid "Petter Reinholdtsen"
+msgstr "Petter Reinholdtsen"
+
+# type: SH
+#: validlocale.8:2
+#, fuzzy, no-wrap
+msgid "NAME"
+msgstr "NAMA"
+
+# type: Plain text
+#: validlocale.8:5
+#, fuzzy
+msgid "validlocale - Test if a given locale is available"
+msgstr "validlocale - memeriksa apakah lokal yang diberikan tersedia"
+
+# type: SH
+#: validlocale.8:5
+#, fuzzy, no-wrap
+msgid "SYNTAX"
+msgstr "RINGKASAN"
+
+# type: Plain text
+#: validlocale.8:8
+#, fuzzy
+msgid "validlocale E<lt>I<locale>E<gt>"
+msgstr "validlocale E<lt>I<lokal>E<gt>"
+
+# type: SH
+#: validlocale.8:8
+#, fuzzy, no-wrap
+msgid "DESCRIPTION"
+msgstr "PENJELASAN"
+
+# type: Plain text
+#: validlocale.8:13
+#, fuzzy
+msgid ""
+"Test if the locale given as argument is a valid locale.  If it isn't, print "
+"on stdout the string to add to /etc/locale.gen to make locale-gen generate "
+"the locale (if it exists at all)."
+msgstr ""
+"Memeriksa apakah lokal yang diberikan sebagai argumen adalah lokal yang sah. "
+"Jika tidak, akan dicetak pada stdout string yang dapat ditambahkan ke /etc/"
+"locale.gen untuk membuat locale-gen meng-generate lokal tersebut (jika "
+"tersedia)."
+
+# type: SH
+#: validlocale.8:13
+#, fuzzy, no-wrap
+msgid "FILES"
+msgstr "BERKAS-BERKAS"
+
+# type: Plain text
+#: validlocale.8:16
+#, fuzzy
+msgid "I</usr/sbin/validlocale>"
+msgstr "I</usr/sbin/validlocale>"
+
+# type: Plain text
+#: validlocale.8:18
+#, fuzzy
+msgid "I</usr/share/i18n/SUPPORTED>"
+msgstr "I</usr/share/i18n/SUPPORTED>"
+
+# type: SH
+#: validlocale.8:18
+#, fuzzy, no-wrap
+msgid "ENVIRONMENT VARIABLES"
+msgstr "VARIABEL-VARIABEL LINGKUNGAN"
+
+# type: TP
+#: validlocale.8:20
+#, fuzzy, no-wrap
+msgid "B<DEFAULTCHARSET>"
+msgstr "B<DEFAULTCHARSET>"
+
+# type: Plain text
+#: validlocale.8:24
+#, fuzzy
+msgid ""
+"Which charset to assume if the given locale is missing from the list of "
+"supported locales."
+msgstr ""
+"set karakter mana yang akan dipakai bila lokal yang diberikan tidak ada pada "
+"daftar lokal yang didukung."
+
+# type: SH
+#: validlocale.8:24
+#, fuzzy, no-wrap
+msgid "EXAMPLES"
+msgstr "CONTOH"
+
+# type: Plain text
+#: validlocale.8:28
+#, fuzzy
+msgid ""
+"If you give a valid locale as parameter, it outputs a string specifying this "
+"on stderr:"
+msgstr ""
+"Bila anda memberikan lokal yang sah pada parameter, program akan menuliskan "
+"string yang memberitahukan hal ini pada stderr:"
+
+# type: Plain text
+#: validlocale.8:31
+#, fuzzy
+msgid "% validlocale C"
+msgstr "% validlocale C"
+
+# type: Plain text
+#: validlocale.8:33
+#, fuzzy
+msgid "locale 'C' valid and available"
+msgstr "locale 'C' valid and available"
+
+# type: Plain text
+#: validlocale.8:37
+#, fuzzy
+msgid ""
+"When given a invalid (not generated or just nonexistent), it outputs a "
+"string on stderr telling that this is an invalid locale, and a string to "
+"stdout with the string to add to /etc/locale.gen to have this locale "
+"generated:"
+msgstr ""
+"Ketika parameter yang diberikan tidak sah (tidak digenerate atau tidak "
+"tersedia), program akan mencetak pada stderr string yang memberitahu bahwa "
+"lokal tidak sah, dan string lain pada stdout, yang dapat ditambahkan pada /"
+"etc/locale.gen agar lokal ini digenerate:"
+
+# type: Plain text
+#: validlocale.8:40
+#, fuzzy
+msgid "% validlocale de_AU@euro"
+msgstr "% validlocale de_AU@euro"
+
+# type: Plain text
+#: validlocale.8:42
+#, fuzzy
+msgid "locale 'de_AT@euro' not available"
+msgstr "locale 'de_AT@euro' not available"
+
+# type: Plain text
+#: validlocale.8:44
+#, fuzzy
+msgid "de_AT@euro ISO-8859-15"
+msgstr "de_AT@euro ISO-8859-15"
+
+# type: SH
+#: validlocale.8:44
+#, fuzzy, no-wrap
+msgid "AUTHORS"
+msgstr "PENULIS"
+
+# type: Plain text
+#: validlocale.8:47
+#, fuzzy
+msgid "Petter Reinholdtsen E<lt>pere@hungry.comE<gt>"
+msgstr "Petter Reinholdtsen E<lt>pere@hungry.comE<gt>"
+
+# type: SH
+#: validlocale.8:47
+#, fuzzy, no-wrap
+msgid "SEE ALSO"
+msgstr "LIHAT JUGA"
+
+# type: Plain text
+#: validlocale.8:49
+#, fuzzy
+msgid "locale-gen(8), localedef(1), locale(1)"
+msgstr "locale-gen(8), localedef(1), locale(1), base-config(8)"
+
+# type: TH
+#, fuzzy
+#~ msgid "BASE-CONFIG"
+#~ msgstr "BASE-CONFIG"
+
+# type: Plain text
+#, fuzzy
+#~ msgid "base-config - Debian base system configuration"
+#~ msgstr "base-config - Alat konfigurasi sistem basis Debian"
+
+# type: SH
+#, fuzzy
+#~ msgid "SYNOPSIS"
+#~ msgstr "RINGKASAN"
+
+# type: Plain text
+#, fuzzy
+#~ msgid "B<base-config [new]>"
+#~ msgstr "B<base-config [new]>"
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "B<base-config> is the program that was run when you first rebooted into "
+#~ "your newly installed debian system. It walks you through setting up the "
+#~ "system and downloading additional software, and so forth. The program can "
+#~ "be run at any later date to walk you through essentially the same process "
+#~ "again."
+#~ msgstr ""
+#~ "B<base-config> merupakan program yang dijalankan saat pertama kali anda "
+#~ "boot ke sistem Debian anda yang baru diinstal. Program ini membimbing "
+#~ "anda melalui tahap-tahap pengaturan sistem, mengunduh (mendownload) "
+#~ "perangkat lunak tambahan, dan seterusnya. Program ini dapat dijalankan "
+#~ "lagi di kemudian hari, apabila anda ingin mengulangi proses yang sama "
+#~ "lagi."
+
+# type: SH
+#, fuzzy
+#~ msgid "IMPLEMENTATION"
+#~ msgstr "IMPLEMENTASI"
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "B<base-config> generates a menu of choices from the contents of B</usr/"
+#~ "lib/base-config/>, and from debconf templates."
+#~ msgstr ""
+#~ "B<base-config> menghasilkan pilihan menu dari isi berkas B</usr/lib/base-"
+#~ "config/>, dan dari templet-templet debconf."
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "The .mnu files in /usr/lib/base-config/ control whether the menu item "
+#~ "appears only on new installs (Only-New: true), whether debconf can "
+#~ "already be running when the item is run (Debconf: true), a numeric Order "
+#~ "controls placement in the menu. If a .mnu file contains \"Exit-Menu: true"
+#~ "\", then base-config will terminate after running that menu item. "
+#~ "Finally, a \"Changes-Menu: true\" line will make base-config rebuild the "
+#~ "menu after running the menu item."
+#~ msgstr ""
+#~ "Berkas-berkas .mnu dalam /usr/lib/base-config mengatur apakah sebuah item "
+#~ "menu muncul hanya saat instalasi baru (Only-New: True), apakah debconf "
+#~ "dapat telah jalan ketika item tersebut dijalankan (Debconf: true), urutan "
+#~ "numerik mengatur peletakan dalam menu. Jika sebuah berkas .mnu berisi "
+#~ "\"Exit-Menu: true\", maka base-config akan berhenti setelah menjalankan "
+#~ "item menu tersebut. Terakhir, baris \"Changes-menu: true\" akan membuat "
+#~ "base-config membangun kembali menu setelah menjalankan item menu tersebut."
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "The .tst files in /usr/lib/base-config/ are run when base-config builds "
+#~ "the menu and must return true for that menu item to appear on the menu."
+#~ msgstr ""
+#~ "Berkas-berkas .tst pada /usr/lib/base-config/ akan dijalankan ketika base-"
+#~ "config membangun menu dan mesti mengembalikan nilai benar (true) agar "
+#~ "item menu tersebut muncul pada menu."
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "The menu items are taken from debconf, by looking for items in the "
+#~ "debconf database named base-config/menu/whatever."
+#~ msgstr ""
+#~ "Item-item menu diambil dari debconf, dengan melihat item-item pada basis "
+#~ "data debconf yang dinamakan base-config/menu/sesuatu."
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "When a menu item is selected, the corresponding program, in /usr/lib/base-"
+#~ "config is run. If this is a fresh install onto a new debian system, the "
+#~ "program receives \"new\" as its first argument."
+#~ msgstr ""
+#~ "Saat sebuah item menu dipilih, program yang sesuai pada /usr/lib/base-"
+#~ "config akan dijalankan. Jika ini merupakan instalasi perdana pada sebuah "
+#~ "sistem Debian yang baru, program akan menerima \"new\" pada argumen "
+#~ "pertama."
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "B<base-config> checks the return codes of each of the programs. If a "
+#~ "program returns nonzero, the main menu is displayed (this may involve "
+#~ "lowering the debconf priority)."
+#~ msgstr ""
+#~ "B<base-config> memeriksa nilai kembalian dari tiap program. Jika sebuah "
+#~ "program mengembalikan nilai bukan nol, maka menu utama akan ditampilkan "
+#~ "(ini bisa melibatkan penurunan prioritas debconf)."
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "Every base-config run is logged to B</var/log/base-config.log>.  B</var/"
+#~ "log/base-config.timings> contains timing information to go with the log. "
+#~ "This allows replays of base-config runs using the B<replay>(1)  utility."
+#~ msgstr ""
+#~ "Setiap kali base-config dijalankan, akan ditulis log pada B</var/log/base-"
+#~ "config.log>.  B</var/log/base-config.timings> berisi informasi waktu "
+#~ "untuk dijalankan dengan log.  Ini memungkinkan pengulangan jalannya base-"
+#~ "config dengan menggunakan utilitas B<replay>(1)"
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "B</var/log/installer/cdebconf>, if it exists, is used by B<base-config> "
+#~ "on new installs to get values from the debian-installer first stage "
+#~ "install."
+#~ msgstr ""
+#~ "B</var/log/installer/cdebconf>, jika ada, digunakan oleh B<base-config> "
+#~ "pada instalasi baru untuk mengambil nilai-nilai dari tahap pertama "
+#~ "instalasi debian-installer."
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "Other packages can drop files into B</usr/lib/base-config/>, and add menu "
+#~ "titles in debconf, and they will be added to the menu. It is very "
+#~ "strongly encouraged that any such programs communicate with the user "
+#~ "entirely via debconf, so that the base configuration maintains a "
+#~ "consistent and professional look."
+#~ msgstr ""
+#~ "Paket-paket lain dapat menaruh berkas-berkas pada B</usr/lib/base-config/"
+#~ ">, dan menambahkan judul menu pada debconf, dan mereka akan ditambahkan "
+#~ "pada menu.  Sangat disarankan agar program-program tersebut berinteraksi "
+#~ "dengan pengguna sepenuhnya melalui debconf, sehingga konfigurasi basis "
+#~ "dapat mempertahankan tampilan yang konsisten dan profesional."
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "Another useful thing for custom distributions is /usr/share/base-config/"
+#~ "debconf-seed. If that directory exists, every file in it will be loaded "
+#~ "into the debconf database using B<debconf-set-selections>(1)"
+#~ msgstr ""
+#~ "Hal berguna lainnya untuk distribusi yang dikustomisasi adalah berkas /"
+#~ "usr/share/base-config/debconf-seed. Bila direktori tersebut ditemukan,' "
+#~ "semua berkas didalamnya akan dimuat dalam basis data debconf menggunakan "
+#~ "B<debconf-set-selections>(1)"
+
+# type: SH
+#, fuzzy
+#~ msgid "ENVIRONMENT"
+#~ msgstr "LINGKUNGAN"
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "The following environment variables influence B<base-config>.  These "
+#~ "variables may be set at run time, or for new installs, may be passed to "
+#~ "the kernel at the B<lilo>(8)  (or other bootloader) command line. Consult "
+#~ "your boot loader's documentation for details. For example, lilo can be "
+#~ "booted with something like \"linux DEBIAN_FRONTEND=readline\"."
+#~ msgstr ""
+#~ "Variabel-variabel lingkungan berikut mempengaruhi B<base-config>.  Nilai-"
+#~ "nilai ini dapat diatur saat menjalankan, atau untuk instalasi baru, dapat "
+#~ "diberikan pada kernel melalui baris perintah B<lilo>(8)  (atau boot "
+#~ "loader lainnya). Lihat dokumentasi boot loader anda untuk informasi "
+#~ "detil. Sebagai contoh, lilo dapat diboot sebagai berikut: \"linux "
+#~ "DEBIAN_FRONTEND=readline\"."
+
+# type: TP
+#, fuzzy
+#~ msgid "B<DEBIAN_FRONTEND>"
+#~ msgstr "B<DEBIAN_FRONTEND>"
+
+# type: TP
+#, fuzzy
+#~ msgid "B<DEBIAN_PRIORITY>"
+#~ msgstr "B<DEBIAN_PRIORITY>"
+
+# type: TP
+#, fuzzy
+#~ msgid "B<DEBCONF_DEBUG>"
+#~ msgstr "B<DEBCONF_DEBUG>"
+
+# type: TP
+#, fuzzy
+#~ msgid "B<DEBCONF_TERSE>"
+#~ msgstr "B<DEBCONF_TERSE>"
+
+# type: Plain text
+#, fuzzy
+#~ msgid "Control various things about B<debconf>(7)"
+#~ msgstr "Mengatur beragam hal mengenai B<debconf>(7)"
+
+# type: SH
+#, fuzzy
+#~ msgid "AUTHOR"
+#~ msgstr "PENULIS"
+
+# type: Plain text
+#, fuzzy
+#~ msgid "Joey Hess E<lt>joeyh@debian.orgE<gt>"
+#~ msgstr "Joey Hess E<lt>joeyh@debian.orgE<gt>"
+
+# type: TH
+#, fuzzy
+#~ msgid "TERMWRAP"
+#~ msgstr "TERMWRAP"
+
+# type: Plain text
+#, fuzzy
+#~ msgid "termwrap - terminal wrapper"
+#~ msgstr "termwrap - terminal wrapper"
+
+# type: Plain text
+#, fuzzy
+#~ msgid "B<termwrap [-nnt] command [args]>"
+#~ msgstr "B<termwrap [-nnt] perintah [args]>"
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "B<termwrap> is used to execute B<base-config>(8)  on newly installed "
+#~ "Debian systems. It examines the environment, taking note of locale "
+#~ "settings, and what type of console is available, and runs an appropriate "
+#~ "terminal program. For example, at the Linux console and in a Japanese "
+#~ "locale, it runs jfterm. The specified command is run inside the terminal "
+#~ "program (if any)."
+#~ msgstr ""
+#~ "B<termwrap> digunakan untuk menjalankan B<base-config>(8)  pada sistem "
+#~ "Debian yang baru dipasang. Ia meneliti lingkungan, memperhatikan "
+#~ "pengaturan lokal, dan jenis konsol yang tersedia, dan kemudian "
+#~ "menjalankan program terminal yang sesuai. Sebagai contoh, pada konsol "
+#~ "Linux dan lokal Jepang, ia akan menjalankan jfterm.  Program yang "
+#~ "diberikan akan dijalakan pada terminal tersebut (jika tersedia)."
+
+# type: SH
+#, fuzzy
+#~ msgid "OPTIONS"
+#~ msgstr "OPSI-OPSI"
+
+# type: TP
+#, fuzzy
+#~ msgid "I<-nnt>"
+#~ msgstr "I<-nnt>"
+
+# type: Plain text
+#, fuzzy
+#~ msgid "Don't run another terminal."
+#~ msgstr "Jangan menjalankan terminal yang lain."
+
+# type: TH
+#, fuzzy
+#~ msgid "APT-SETUP"
+#~ msgstr "APT-SETUP"
+
+# type: Plain text
+#, fuzzy
+#~ msgid "apt-setup - add apt download sources"
+#~ msgstr "apt-setup - menambahkan sumber-sumber download untuk apt"
+
+# type: Plain text
+#, fuzzy
+#~ msgid "B<apt-setup [probe] [-N]>"
+#~ msgstr "B<apt-setup [probe]>"
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "B<apt-setup> is an interactive program that simplifies adding sources to "
+#~ "apt's sources.list. It knows about all the major debian mirrors and can "
+#~ "help you select one. It can even use B<apt-cdrom>(8)  to scan CDs."
+#~ msgstr ""
+#~ "B<apt-setup> merupakan program interaktif yang menyederhanakan penambahan "
+#~ "sumber-sumber ke berkas sources.list dari apt. Ia mengetahui semua mirror-"
+#~ "mirror utama Debian dan dapat membantu anda memilih salah satu. Ia bahkan "
+#~ "dapat menggunakan B<apt-cdrom>(8)  untuk memindai CD."
+
+# type: TP
+#, fuzzy
+#~ msgid "I<probe>"
+#~ msgstr "I<probe>"
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "By default no probing of CDs is done. Passing \"probe\" as the first "
+#~ "argument to this program will make it probe for a CD in the drive on "
+#~ "startup and add it to sources.list. This is useful on initial debian "
+#~ "installs, to minimize interaction with the user."
+#~ msgstr ""
+#~ "Secara bawaan tidak dilakukan pemeriksaan CD. Memberikan \"probe\" "
+#~ "sebagai argumen pertama untuk program ini, akan membuat program memeriksa "
+#~ "CD yang ada dalam penggerak dan menambahkannya ke berkas sources.list. "
+#~ "Ini berguna pada saat instalasi awal Debian, untuk mengurangi interaksi "
+#~ "dengan pengguna."
+
+# type: TP
+#, fuzzy
+#~ msgid "I<-N>"
+#~ msgstr "I<-N>"
+
+# type: Plain text
+#, fuzzy
+#~ msgid "Joey Hess E<lt>joey@kitenet.netE<gt>"
+#~ msgstr "Joey Hess E<lt>joey@kitenet.netE<gt>"
+
+# type: SH
+#, fuzzy
+#~ msgid "DERIVATION"
+#~ msgstr "PENJELASAN"
--- eglibc-2.13.orig/debian/local/manpages/po/pl.po
+++ eglibc-2.13/debian/local/manpages/po/pl.po
@@ -0,0 +1,490 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: base-config\n"
+"POT-Creation-Date: 2005-12-27 17:38-0500\n"
+"PO-Revision-Date: 2005-10-23  21:50+0200\n"
+"Last-Translator: Robert Luberda <robert@debian.org>\n"
+"Language-Team: Polish <debian-l10n-polish@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "validlocale"
+msgstr "validlocale"
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "0.1"
+msgstr "0.1"
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "Petter Reinholdtsen"
+msgstr "Petter Reinholdtsen"
+
+# type: SH
+#: validlocale.8:2
+#, no-wrap
+msgid "NAME"
+msgstr "NAZWA"
+
+# type: Plain text
+#: validlocale.8:5
+msgid "validlocale - Test if a given locale is available"
+msgstr "validlocale - Sprawdza, czy dost�pne jest dane locale"
+
+# type: SH
+#: validlocale.8:5
+#, no-wrap
+msgid "SYNTAX"
+msgstr "SK�ADNIA"
+
+# type: Plain text
+#: validlocale.8:8
+msgid "validlocale E<lt>I<locale>E<gt>"
+msgstr "validlocale E<lt>I<locale>E<gt>"
+
+# type: SH
+#: validlocale.8:8
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr "OPIS"
+
+# type: Plain text
+#: validlocale.8:13
+msgid ""
+"Test if the locale given as argument is a valid locale.  If it isn't, print "
+"on stdout the string to add to /etc/locale.gen to make locale-gen generate "
+"the locale (if it exists at all)."
+msgstr ""
+"Sprawdza, czy locale podane jako argument jest poprawne. Je�li nie jest, "
+"wypisuje na stdout napis, jaki nale�y doda� do /etc/locale.gen, aby "
+"polecenie locale-gen wygenerowa�o dane locale (o ile w og�le ono istnieje)."
+
+# type: SH
+#: validlocale.8:13
+#, no-wrap
+msgid "FILES"
+msgstr "PLIKI"
+
+# type: Plain text
+#: validlocale.8:16
+msgid "I</usr/sbin/validlocale>"
+msgstr "I</usr/sbin/validlocale>"
+
+# type: Plain text
+#: validlocale.8:18
+msgid "I</usr/share/i18n/SUPPORTED>"
+msgstr "I</usr/share/i18n/SUPPORTED>"
+
+# type: SH
+#: validlocale.8:18
+#, no-wrap
+msgid "ENVIRONMENT VARIABLES"
+msgstr "ZMIENNE �RODOWISKOWE"
+
+# type: TP
+#: validlocale.8:20
+#, no-wrap
+msgid "B<DEFAULTCHARSET>"
+msgstr "B<DEFAULTCHARSET>"
+
+# type: Plain text
+#: validlocale.8:24
+msgid ""
+"Which charset to assume if the given locale is missing from the list of "
+"supported locales."
+msgstr ""
+"Jakiego zestawu znak�w u�y�, je�li podanego locale nie ma w li�cie "
+"obs�ugiwanych."
+
+# type: SH
+#: validlocale.8:24
+#, no-wrap
+msgid "EXAMPLES"
+msgstr "PRZYK�ADY"
+
+# type: Plain text
+#: validlocale.8:28
+msgid ""
+"If you give a valid locale as parameter, it outputs a string specifying this "
+"on stderr:"
+msgstr ""
+"Je�li jako parametr podano nazw� poprawnego locale, wypisuje na stderr "
+"odpowiedni napis:"
+
+# type: Plain text
+#: validlocale.8:31
+msgid "% validlocale C"
+msgstr "% validlocale C"
+
+# type: Plain text
+#: validlocale.8:33
+msgid "locale 'C' valid and available"
+msgstr "locale 'C' valid and available"
+
+# type: Plain text
+#: validlocale.8:37
+msgid ""
+"When given a invalid (not generated or just nonexistent), it outputs a "
+"string on stderr telling that this is an invalid locale, and a string to "
+"stdout with the string to add to /etc/locale.gen to have this locale "
+"generated:"
+msgstr ""
+"Je�li podano nazw� nieprawid�owego locale (niewygenerowanego lub po prostu "
+"nieistniej�cego), wypisuje na stderr napis m�wi�cy o tym, �e nie jest to "
+"prawid�owe locale, oraz - na stdout - napis, kt�ry nale�y doda� do /etc/"
+"locale.gen, aby m�c wygenerowa� dane locale:"
+
+# type: Plain text
+#: validlocale.8:40
+msgid "% validlocale de_AU@euro"
+msgstr "% validlocale de_AU@euro"
+
+# type: Plain text
+#: validlocale.8:42
+msgid "locale 'de_AT@euro' not available"
+msgstr "locale 'de_AT@euro' not available"
+
+# type: Plain text
+#: validlocale.8:44
+msgid "de_AT@euro ISO-8859-15"
+msgstr "de_AT@euro ISO-8859-15"
+
+# type: SH
+#: validlocale.8:44
+#, no-wrap
+msgid "AUTHORS"
+msgstr "AUTOR"
+
+# type: Plain text
+#: validlocale.8:47
+msgid "Petter Reinholdtsen E<lt>pere@hungry.comE<gt>"
+msgstr "Petter Reinholdtsen E<lt>pere@hungry.comE<gt>"
+
+# type: SH
+#: validlocale.8:47
+#, no-wrap
+msgid "SEE ALSO"
+msgstr "PATRZ TAK�E"
+
+# type: Plain text
+#: validlocale.8:49
+#, fuzzy
+msgid "locale-gen(8), localedef(1), locale(1)"
+msgstr "locale-gen(8), localedef(1), locale(1), base-config(8)"
+
+# type: TH
+#~ msgid "BASE-CONFIG"
+#~ msgstr "BASE-CONFIG"
+
+# type: Plain text
+#~ msgid "base-config - Debian base system configuration"
+#~ msgstr "base-config - konfiguracja podstawowego systemu Debian"
+
+# type: SH
+#~ msgid "SYNOPSIS"
+#~ msgstr "SK�ADNIA"
+
+# type: Plain text
+#~ msgid "B<base-config [new]>"
+#~ msgstr "B<base-config [new]>"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<base-config> is the program that was run when you first rebooted into "
+#~ "your newly installed debian system. It walks you through setting up the "
+#~ "system and downloading additional software, and so forth. The program can "
+#~ "be run at any later date to walk you through essentially the same process "
+#~ "again."
+#~ msgstr ""
+#~ "B<base-config> to program uruchamiany po pierwszym starcie nowo "
+#~ "zainstalowanego systemu Debian. Prowadzi on u�ytkownika przez "
+#~ "konfiguracj� systemu, pobieranie dodatkowego oprogramowania i tak dalej. "
+#~ "Program ten mo�na uruchomi� w dowolnym momencie, aby przej�� przez ten "
+#~ "proces ponownie."
+
+# type: SH
+#~ msgid "IMPLEMENTATION"
+#~ msgstr "IMPLEMENTACJA"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<base-config> generates a menu of choices from the contents of B</usr/"
+#~ "lib/base-config/>, and from debconf templates."
+#~ msgstr ""
+#~ "B<base-config> generuje menu z list� wybor�w na podstawie zawarto�ci "
+#~ "katalogu B</usr/lib/base-config/> oraz z szablon�w programu debconf."
+
+# type: Plain text
+#~ msgid ""
+#~ "The .mnu files in /usr/lib/base-config/ control whether the menu item "
+#~ "appears only on new installs (Only-New: true), whether debconf can "
+#~ "already be running when the item is run (Debconf: true), a numeric Order "
+#~ "controls placement in the menu. If a .mnu file contains \"Exit-Menu: true"
+#~ "\", then base-config will terminate after running that menu item. "
+#~ "Finally, a \"Changes-Menu: true\" line will make base-config rebuild the "
+#~ "menu after running the menu item."
+#~ msgstr ""
+#~ "Pliki .mnu w /usr/lib/base-config/ okre�laj�, czy dana pozycja z menu "
+#~ "pojawia si� tylko w nowo instalowanych systemach (Only-New: true), czy "
+#~ "debconf mo�e ju� dzia�a�, kiedy pozycja z menu jest uruchamiana (Debconf: "
+#~ "true), a liczbowy \"Order\" okre�la pozycj� w menu. Je�eli plik .mnu "
+#~ "zawiera \"Exit-Menu: true\", to base-config zako�czy dzia�anie po "
+#~ "uruchomieniu tej pozycji. W ko�cu, linia \"Changes-Menu: true\" powoduje, "
+#~ "�e base-config przebuduje menu po uruchomieniu tej pozycji."
+
+# type: Plain text
+#~ msgid ""
+#~ "The .tst files in /usr/lib/base-config/ are run when base-config builds "
+#~ "the menu and must return true for that menu item to appear on the menu."
+#~ msgstr ""
+#~ "Podczas budowania menu base-config uruchamia pliki .tst z katalogu /usr/"
+#~ "lib/base-config, kt�re musz� zwr�ci� warto�� true, aby dana pozycja "
+#~ "pojawi�a si� w menu."
+
+# type: Plain text
+#~ msgid ""
+#~ "The menu items are taken from debconf, by looking for items in the "
+#~ "debconf database named base-config/menu/whatever."
+#~ msgstr ""
+#~ "Pozycje menu s� brane z programu debconf, przez wyszukiwanie w bazie "
+#~ "danych debconfa rekord�w o nazwie base-config/menu/cokolwiek."
+
+# type: Plain text
+#~ msgid ""
+#~ "When a menu item is selected, the corresponding program, in /usr/lib/base-"
+#~ "config is run. If this is a fresh install onto a new debian system, the "
+#~ "program receives \"new\" as its first argument."
+#~ msgstr ""
+#~ "Po wybraniu pozycji w menu uruchamiany jest odpowiadaj�cy jej program z "
+#~ "katalogu /usr/lib/base-config. Je�li jest to pierwsze uruchomienie po "
+#~ "zainstalowaniu systemu, ka�dy program otrzymuje jako pierwszy argument "
+#~ "wyraz \"new\"."
+
+# type: Plain text
+#~ msgid ""
+#~ "B<base-config> checks the return codes of each of the programs. If a "
+#~ "program returns nonzero, the main menu is displayed (this may involve "
+#~ "lowering the debconf priority)."
+#~ msgstr ""
+#~ "B<base-config> sprawdza kod zako�czenia ka�dego programu. Je�eli program "
+#~ "zwr�ci warto�� niezerow�, to zostanie wy�wietlone g��wne menu (mo�e to "
+#~ "wymaga� zmniejszenia priorytetu debconfa)."
+
+# type: Plain text
+#~ msgid ""
+#~ "Generally the user is advanced down the menu from item to item as each "
+#~ "succeeds. If a menu item needs to jump back to a previous item in the "
+#~ "menu, or skip over a subsequent item, it can write the name of the next "
+#~ "menu item to show to the file \"jump-to\" in the current directory."
+#~ msgstr ""
+#~ "Og�lnie rzecz bior�c, u�ytkownik jest przenoszony w d� menu od jednej "
+#~ "pozycji do nast�pnej. Je�eli pozycja z menu potrzebuje wr�ci� do "
+#~ "poprzedniej pozycji menu lub przeskoczy� p�niejsz� pozycj�, to mo�e do "
+#~ "pliku \"jump-to\" umieszczonego w bie��cym katalogu wpisa� nazw� "
+#~ "nast�pnej pozycji do pokazania w menu."
+
+# type: Plain text
+#~ msgid ""
+#~ "Every base-config run is logged to B</var/log/base-config.log>.  B</var/"
+#~ "log/base-config.timings> contains timing information to go with the log. "
+#~ "This allows replays of base-config runs using the B<replay>(1)  utility."
+#~ msgstr ""
+#~ "Ka�de uruchomienie programu base-config jest zapisywane w B</var/log/base-"
+#~ "config.log>. B</var/log/base-config.timings> zawiera informacje o czasie "
+#~ "wykonywania poszczeg�lnych polece�. Pozwala to na powt�rzenie uruchomie� "
+#~ "base-config za pomoc� programiku B<replay>(1)."
+
+# type: Plain text
+#~ msgid ""
+#~ "B</var/log/installer/cdebconf>, if it exists, is used by B<base-config> "
+#~ "on new installs to get values from the debian-installer first stage "
+#~ "install."
+#~ msgstr ""
+#~ "Podczas nowych instalacji B<base-config> u�ywa B</var/log/installer/"
+#~ "cdebconf>, je�eli istnieje, do pobrania warto�ci pierwszego etapu "
+#~ "instalacji przez program debian-installer."
+
+# type: Plain text
+#~ msgid ""
+#~ "Other packages can drop files into B</usr/lib/base-config/>, and add menu "
+#~ "titles in debconf, and they will be added to the menu. It is very "
+#~ "strongly encouraged that any such programs communicate with the user "
+#~ "entirely via debconf, so that the base configuration maintains a "
+#~ "consistent and professional look."
+#~ msgstr ""
+#~ "Pakiety mog� instalowa� programy w katalogu B</usr/lib/base-config/>, "
+#~ "dzi�ki czemu stan� si� one cz�ci� procesu konfiguracji. Zaleca si�, aby "
+#~ "programy te komunikowa�y si� z u�ytkownikiem wy��cznie przy pomocy "
+#~ "programu debconf, dzi�ki czemu konfiguracja systemu podstawowego uzyska "
+#~ "jednolity i profesjonalny wygl�d."
+
+# type: Plain text
+#~ msgid ""
+#~ "Another useful thing for custom distributions is /usr/share/base-config/"
+#~ "debconf-seed. If that directory exists, every file in it will be loaded "
+#~ "into the debconf database using B<debconf-set-selections>(1)"
+#~ msgstr ""
+#~ "Kolejn� u�yteczn� rzecz� dla w�asnych dystrybucji jest /usr/share/base-"
+#~ "config/debconf-seed. Je�eli ten katalog istnieje, to ka�dy plik w tym "
+#~ "katalogu zostanie za�adowany do bazy danych debconfa za pomoc� B<debconf-"
+#~ "set-selections>(1)."
+
+# type: Plain text
+#~ msgid ""
+#~ "If the file /var/log/installer/debconf-seed is created by the debian-"
+#~ "installer, it will also be loaded into the debconf database."
+#~ msgstr ""
+#~ "Je�eli plik /var/log/installer/debconf-seed zostanie utworzony przez "
+#~ "instalator Debiana, to tak�e zostanie za�adowany do bazy danych debconfa."
+
+# type: SH
+#~ msgid "ENVIRONMENT"
+#~ msgstr "ZMIENNE �RODOWISKOWE"
+
+# type: Plain text
+#~ msgid ""
+#~ "The following environment variables influence B<base-config>.  These "
+#~ "variables may be set at run time, or for new installs, may be passed to "
+#~ "the kernel at the B<lilo>(8)  (or other bootloader) command line. Consult "
+#~ "your boot loader's documentation for details. For example, lilo can be "
+#~ "booted with something like \"linux DEBIAN_FRONTEND=readline\"."
+#~ msgstr ""
+#~ "Nast�puj�ce zmienne �rodowiskowe wp�ywaj� na dzia�anie B<base-config>. "
+#~ "Mo�na je ustawi� przy uruchomieniu programu lub (w przypadku instalacji "
+#~ "nowego systemu) mo�na je poda� j�dru przy pomocy linii polece� B<lilo>(8) "
+#~ "(lub innego programu �aduj�cego). Wi�cej informacji na temat "
+#~ "przekazywania parametr�w j�dru mo�na znale�� w dokumentacji danego "
+#~ "programu �aduj�cego. W przypadku lilo mo�na za�adowa� system na przyk�ad "
+#~ "w nast�puj�cy spos�b: \"linux DEBIAN_FRONTEND=readline\"."
+
+# type: TP
+#~ msgid "B<DEBIAN_FRONTEND>"
+#~ msgstr "B<DEBIAN_FRONTEND>"
+
+# type: TP
+#~ msgid "B<DEBIAN_PRIORITY>"
+#~ msgstr "B<DEBIAN_PRIORITY>"
+
+# type: TP
+#~ msgid "B<DEBCONF_DEBUG>"
+#~ msgstr "B<DEBCONF_DEBUG>"
+
+# type: TP
+#~ msgid "B<DEBCONF_TERSE>"
+#~ msgstr "B<DEBCONF_TERSE>"
+
+# type: Plain text
+#~ msgid "Control various things about B<debconf>(7)"
+#~ msgstr "Wp�ywaj� na dzia�anie systemu B<debconf>(7)"
+
+# type: SH
+#~ msgid "AUTHOR"
+#~ msgstr "AUTOR"
+
+# type: Plain text
+#~ msgid "Joey Hess E<lt>joeyh@debian.orgE<gt>"
+#~ msgstr "Joey Hess E<lt>joeyh@debian.orgE<gt>"
+
+# type: TH
+#~ msgid "TERMWRAP"
+#~ msgstr "TERMWRAP"
+
+# type: Plain text
+#~ msgid "termwrap - terminal wrapper"
+#~ msgstr "termwrap - program po�rednicz�cy terminala"
+
+# type: Plain text
+#~ msgid "B<termwrap [-nnt] command [args]>"
+#~ msgstr "B<termwrap [-nnt] komenda [argumenty]>"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<termwrap> is used to execute B<base-config>(8)  on newly installed "
+#~ "Debian systems. It examines the environment, taking note of locale "
+#~ "settings, and what type of console is available, and runs an appropriate "
+#~ "terminal program. For example, at the Linux console and in a Japanese "
+#~ "locale, it runs jfterm. The specified command is run inside the terminal "
+#~ "program (if any)."
+#~ msgstr ""
+#~ "B<termwrap> jest u�ywany do wywo�ania B<base-config>(8) w nowo "
+#~ "instalowanych systemach Debian. Sprawdza on �rodowisko, zwracaj�c uwag� "
+#~ "na ustawienia locale i typ dost�pnej konsoli, a nast�pnie uruchamia "
+#~ "odpowiedni program terminala. Na przyk�ad na konsoli Linux przy locale "
+#~ "japo�skim uruchamia program jfterm. Podana komenda jest wykonywana w "
+#~ "uruchomionym terminalu."
+
+# type: SH
+#~ msgid "OPTIONS"
+#~ msgstr "OPCJE"
+
+# type: TP
+#~ msgid "I<-nnt>"
+#~ msgstr "I<-nnt>"
+
+# type: Plain text
+#~ msgid "Don't run another terminal."
+#~ msgstr "Nie uruchamiaj innego terminala."
+
+# type: TH
+#~ msgid "APT-SETUP"
+#~ msgstr "APT-SETUP"
+
+# type: Plain text
+#~ msgid "apt-setup - add apt download sources"
+#~ msgstr "apt-setup - dodaje nowe �r�d�a pakiet�w dla apt"
+
+# type: Plain text
+#~ msgid "B<apt-setup [probe] [-N]>"
+#~ msgstr "B<apt-setup [probe] [-N]>"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<apt-setup> is an interactive program that simplifies adding sources to "
+#~ "apt's sources.list. It knows about all the major debian mirrors and can "
+#~ "help you select one. It can even use B<apt-cdrom>(8)  to scan CDs."
+#~ msgstr ""
+#~ "B<apt-setup> to interaktywny program u�atwiaj�cy dodawanie �r�de� "
+#~ "pakiet�w do pliku sources.list programu apt. Zna on wszystkie g��wne "
+#~ "serwery lustrzane Debiana i mo�e pom�c wybra� jeden z nich. Mo�e nawet "
+#~ "u�y� programu B<apt-cdrom>(8) do przeszukiwania p�yt CD."
+
+# type: TP
+#~ msgid "I<probe>"
+#~ msgstr "I<probe>"
+
+# type: Plain text
+#~ msgid ""
+#~ "By default no probing of CDs is done. Passing \"probe\" as the first "
+#~ "argument to this program will make it probe for a CD in the drive on "
+#~ "startup and add it to sources.list. This is useful on initial debian "
+#~ "installs, to minimize interaction with the user."
+#~ msgstr ""
+#~ "Domy�lnie nie jest sprawdzana obecno�� p�yty CD. Je�li jako pierwszy "
+#~ "argument zostanie podany wyraz \"probe\", program przeszuka p�yt� CD "
+#~ "znajduj�c� si� w nap�dzie i doda j� do pliku sources.list. Jest to "
+#~ "przydatne przy instalacji systemu, gdy� pozwala na ograniczenie "
+#~ "koniecznych dzia�a� u�ytkownika."
+
+# type: TP
+#~ msgid "I<-N>"
+#~ msgstr "I<-N>"
+
+# type: Plain text
+#~ msgid ""
+#~ "Indicates that this is a new install.  This parameter allows apt-setup to "
+#~ "run in noninteractive mode if its debconf questions have been preseeded."
+#~ msgstr ""
+#~ "Wskazuje, �e jest to nowa instalacja. Ten parametr pozwala programowi apt-"
+#~ "setup uruchomi� si� w trybie nieinteraktywnym, je�eli wcze�niej zosta�y "
+#~ "wpisane odpowiedzi na jego pytania debconfa."
+
+# type: Plain text
+#~ msgid "Joey Hess E<lt>joey@kitenet.netE<gt>"
+#~ msgstr "Joey Hess E<lt>joey@kitenet.netE<gt>"
--- eglibc-2.13.orig/debian/local/manpages/po/de.po
+++ eglibc-2.13/debian/local/manpages/po/de.po
@@ -0,0 +1,294 @@
+# base-config manual page
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# Jens Seidel <jensseidel@users.sf.net>, 2005.
+# 
+msgid ""
+msgstr ""
+"Project-Id-Version: base-config 2005/11/17\n"
+"POT-Creation-Date: 2005-12-27 17:38-0500\n"
+"PO-Revision-Date: 2005-11-17 21:06+0100\n"
+"Last-Translator: Jens Seidel <jensseidel@users.sf.net>\n"
+"Language-Team: German <debian-l10n-german@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "validlocale"
+msgstr ""
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "0.1"
+msgstr ""
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "Petter Reinholdtsen"
+msgstr ""
+
+# type: SH
+#: validlocale.8:2
+#, no-wrap
+msgid "NAME"
+msgstr "NAME"
+
+# type: Plain text
+#: validlocale.8:5
+msgid "validlocale - Test if a given locale is available"
+msgstr ""
+
+# type: SH
+#: validlocale.8:5
+#, no-wrap
+msgid "SYNTAX"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:8
+msgid "validlocale E<lt>I<locale>E<gt>"
+msgstr ""
+
+# type: SH
+#: validlocale.8:8
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr "BESCHREIBUNG"
+
+# type: Plain text
+#: validlocale.8:13
+msgid ""
+"Test if the locale given as argument is a valid locale.  If it isn't, print "
+"on stdout the string to add to /etc/locale.gen to make locale-gen generate "
+"the locale (if it exists at all)."
+msgstr ""
+
+# type: SH
+#: validlocale.8:13
+#, no-wrap
+msgid "FILES"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:16
+msgid "I</usr/sbin/validlocale>"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:18
+msgid "I</usr/share/i18n/SUPPORTED>"
+msgstr ""
+
+# type: SH
+#: validlocale.8:18
+#, no-wrap
+msgid "ENVIRONMENT VARIABLES"
+msgstr ""
+
+# type: TP
+#: validlocale.8:20
+#, no-wrap
+msgid "B<DEFAULTCHARSET>"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:24
+msgid ""
+"Which charset to assume if the given locale is missing from the list of "
+"supported locales."
+msgstr ""
+
+# type: SH
+#: validlocale.8:24
+#, no-wrap
+msgid "EXAMPLES"
+msgstr "BEISPIELE"
+
+# type: Plain text
+#: validlocale.8:28
+msgid ""
+"If you give a valid locale as parameter, it outputs a string specifying this "
+"on stderr:"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:31
+msgid "% validlocale C"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:33
+msgid "locale 'C' valid and available"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:37
+msgid ""
+"When given a invalid (not generated or just nonexistent), it outputs a "
+"string on stderr telling that this is an invalid locale, and a string to "
+"stdout with the string to add to /etc/locale.gen to have this locale "
+"generated:"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:40
+msgid "% validlocale de_AU@euro"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:42
+msgid "locale 'de_AT@euro' not available"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:44
+msgid "de_AT@euro ISO-8859-15"
+msgstr ""
+
+# type: SH
+#: validlocale.8:44
+#, no-wrap
+msgid "AUTHORS"
+msgstr "AUTOR"
+
+# type: Plain text
+#: validlocale.8:47
+msgid "Petter Reinholdtsen E<lt>pere@hungry.comE<gt>"
+msgstr ""
+
+# type: SH
+#: validlocale.8:47
+#, no-wrap
+msgid "SEE ALSO"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:49
+msgid "locale-gen(8), localedef(1), locale(1)"
+msgstr ""
+
+# type: TH
+#~ msgid "BASE-CONFIG"
+#~ msgstr "BASE-CONFIG"
+
+# type: Plain text
+#~ msgid "base-config - Debian base system configuration"
+#~ msgstr "base-config - Debian-Basissystemkonfiguration"
+
+# type: SH
+#~ msgid "SYNOPSIS"
+#~ msgstr "�BERSICHT"
+
+# type: Plain text
+#~ msgid "B<base-config [new]>"
+#~ msgstr "B<base-config [new]>"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<base-config> is the program that was run when you first rebooted into "
+#~ "your newly installed debian system. It walks you through setting up the "
+#~ "system and downloading additional software, and so forth. The program can "
+#~ "be run at any later date to walk you through essentially the same process "
+#~ "again."
+#~ msgstr ""
+#~ "B<base-config> ist das Programm, das lief, als Sie das erste Mal Ihr neu "
+#~ "installiertes Debian-System starteten. Es f�hrt Sie durch die Einrichtung "
+#~ "des Systems, das Herunterladen zus�tzlicher Software und so weiter. Das "
+#~ "Programm kann zu jedem sp�teren Zeitpunkt erneut gestartet werden, um "
+#~ "erneut durch den selben Prozess zu f�hren."
+
+# type: SH
+#~ msgid "IMPLEMENTATION"
+#~ msgstr "IMPLEMENTIERUNG"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<base-config> generates a menu of choices from the contents of B</usr/"
+#~ "lib/base-config/>, and from debconf templates."
+#~ msgstr ""
+#~ "B<base-config> erzeugt ein Auswahlmen� aus dem Inhalt von B</usr/lib/base-"
+#~ "config/> und von Debconf-Vorlagen."
+
+# type: SH
+#~ msgid "AUTHOR"
+#~ msgstr "AUTOR"
+
+# type: Plain text
+#~ msgid "Joey Hess E<lt>joeyh@debian.orgE<gt>"
+#~ msgstr "Joey Hess E<lt>joey@kitenet.netE<gt>"
+
+# type: SH
+#~ msgid "OPTIONS"
+#~ msgstr "OPTIONEN"
+
+# type: TP
+#~ msgid "I<-nnt>"
+#~ msgstr "I<�-N�>"
+
+# type: TH
+#, fuzzy
+#~ msgid "APT-SETUP"
+#~ msgstr "APT-SETUP"
+
+# type: Plain text
+#, fuzzy
+#~ msgid "apt-setup - add apt download sources"
+#~ msgstr "apt-setup - Hinzuf�gen von Quellen zum Herunterladen"
+
+# type: Plain text
+#, fuzzy
+#~ msgid "B<apt-setup [probe] [-N]>"
+#~ msgstr "B<apt-setup [probe]>"
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "B<apt-setup> is an interactive program that simplifies adding sources to "
+#~ "apt's sources.list. It knows about all the major debian mirrors and can "
+#~ "help you select one. It can even use B<apt-cdrom>(8)  to scan CDs."
+#~ msgstr ""
+#~ "B<apt-setup> ist ein interaktives Programm, da� das Hinzuf�gen von "
+#~ "Quellen zu apt's sources.list vereinfacht. Es kennt alle bedeutenden "
+#~ "Debian-Spiegel und kann Ihnen bei der Auswahl helfen. Es kann sogar B<apt-"
+#~ "cdrom>(8)  zum Durchsuchen von CDs verwenden."
+
+# type: TP
+#, fuzzy
+#~ msgid "I<probe>"
+#~ msgstr "I<�probe�>"
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "By default no probing of CDs is done. Passing \"probe\" as the first "
+#~ "argument to this program will make it probe for a CD in the drive on "
+#~ "startup and add it to sources.list. This is useful on initial debian "
+#~ "installs, to minimize interaction with the user."
+#~ msgstr ""
+#~ "Standardm��ig wird nicht auf CDs �berpr�ft. Wird �probe� als erstes "
+#~ "Argument an dieses Programm �bergeben, dann wird beim Starten auf eine CD "
+#~ "im Laufwerk gepr�ft und diese zu den sources.list hinzugef�gt. Dies ist "
+#~ "bei Debian Erstinstallationen n�tzlich, um die Interaktion mit dem Nutzer "
+#~ "zu minimieren."
+
+# type: TP
+#, fuzzy
+#~ msgid "I<-N>"
+#~ msgstr "I<�-N�>"
+
+# type: Plain text
+#, fuzzy
+#~ msgid "Joey Hess E<lt>joey@kitenet.netE<gt>"
+#~ msgstr "Joey Hess E<lt>joey@kitenet.netE<gt>"
+
+# type: TH
+#~ msgid "TZSETUP"
+#~ msgstr "APT-SETUP"
+
+# type: SH
+#~ msgid "DERIVATION"
+#~ msgstr "BESCHREIBUNG"
--- eglibc-2.13.orig/debian/local/manpages/po/pt_BR.po
+++ eglibc-2.13/debian/local/manpages/po/pt_BR.po
@@ -0,0 +1,503 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# Brazilian <debian-l10n-portuguese@lists.debian.org>, 2005.
+# , fuzzy
+# 
+# 
+msgid ""
+msgstr ""
+"Project-Id-Version: base-config man\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-12-27 17:38-0500\n"
+"PO-Revision-Date: 2005-10-24 21:25-0200\n"
+"Last-Translator: Brazilian <debian-l10n-portuguese@lists.debian.org>\n"
+"Language-Team: Brazilian <debian-l10n-portuguese@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "validlocale"
+msgstr "validlocale"
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "0.1"
+msgstr "0.1"
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "Petter Reinholdtsen"
+msgstr "Petter Reinholdtsen"
+
+# type: SH
+#: validlocale.8:2
+#, no-wrap
+msgid "NAME"
+msgstr "NOME"
+
+# type: Plain text
+#: validlocale.8:5
+msgid "validlocale - Test if a given locale is available"
+msgstr "validlocale - Testa se uma dada locale est� dispon�vel"
+
+# type: SH
+#: validlocale.8:5
+#, no-wrap
+msgid "SYNTAX"
+msgstr "SINTAXE"
+
+# type: Plain text
+#: validlocale.8:8
+msgid "validlocale E<lt>I<locale>E<gt>"
+msgstr "validlocale E<lt>I<locale>E<gt>"
+
+# type: SH
+#: validlocale.8:8
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr "DESCRI��O"
+
+# type: Plain text
+#: validlocale.8:13
+msgid ""
+"Test if the locale given as argument is a valid locale.  If it isn't, print "
+"on stdout the string to add to /etc/locale.gen to make locale-gen generate "
+"the locale (if it exists at all)."
+msgstr ""
+"Testa se a locale passada como argumento � v�lida.  Se n�o for, imprime em "
+"stdout o texto a ser adicionado em /etc/locale.gen para fazer locale-gen "
+"gerar a locale (se ela existir)."
+
+# type: SH
+#: validlocale.8:13
+#, no-wrap
+msgid "FILES"
+msgstr "ARQUIVOS"
+
+# type: Plain text
+#: validlocale.8:16
+msgid "I</usr/sbin/validlocale>"
+msgstr "I</usr/sbin/validlocale>"
+
+# type: Plain text
+#: validlocale.8:18
+msgid "I</usr/share/i18n/SUPPORTED>"
+msgstr "I</usr/share/i18n/SUPPORTED>"
+
+# type: SH
+#: validlocale.8:18
+#, no-wrap
+msgid "ENVIRONMENT VARIABLES"
+msgstr "VARI�VEIS DE AMBIENTE"
+
+# type: TP
+#: validlocale.8:20
+#, no-wrap
+msgid "B<DEFAULTCHARSET>"
+msgstr "B<DEFAULTCHARSET>"
+
+# type: Plain text
+#: validlocale.8:24
+msgid ""
+"Which charset to assume if the given locale is missing from the list of "
+"supported locales."
+msgstr ""
+"Qual conjunto de caracteres assumir se a locale dada estiver faltando na "
+"lista de locales suportadas."
+
+# type: SH
+#: validlocale.8:24
+#, no-wrap
+msgid "EXAMPLES"
+msgstr "EXEMPLOS"
+
+# type: Plain text
+#: validlocale.8:28
+msgid ""
+"If you give a valid locale as parameter, it outputs a string specifying this "
+"on stderr:"
+msgstr ""
+"Se voc� der uma locale v�lida como par�metro, a sa�da ser� um texto "
+"especificando isto em stderr:"
+
+# type: Plain text
+#: validlocale.8:31
+msgid "% validlocale C"
+msgstr "% validlocale C"
+
+# type: Plain text
+#: validlocale.8:33
+msgid "locale 'C' valid and available"
+msgstr "locale�'C'�� v�lida e est� dispon�vel"
+
+# type: Plain text
+#: validlocale.8:37
+msgid ""
+"When given a invalid (not generated or just nonexistent), it outputs a "
+"string on stderr telling that this is an invalid locale, and a string to "
+"stdout with the string to add to /etc/locale.gen to have this locale "
+"generated:"
+msgstr ""
+"Quando � dado uma inv�lida (n�o gerada ou n�o existente), a sa�da ser� um "
+"texto em stderr dizendo que a locale � inv�lida, e um texto para stdout que "
+"deve ser adicionado a /etc/locale.gen para ter esta locale gerada:"
+
+# type: Plain text
+#: validlocale.8:40
+msgid "% validlocale de_AU@euro"
+msgstr "% validlocale de_AU@euro"
+
+# type: Plain text
+#: validlocale.8:42
+msgid "locale 'de_AT@euro' not available"
+msgstr "locale 'de_AT@euro' n�o est� dispon�vel"
+
+# type: Plain text
+#: validlocale.8:44
+msgid "de_AT@euro ISO-8859-15"
+msgstr "de_AT@euro ISO-8859-15"
+
+# type: SH
+#: validlocale.8:44
+#, no-wrap
+msgid "AUTHORS"
+msgstr "AUTORES"
+
+# type: Plain text
+#: validlocale.8:47
+msgid "Petter Reinholdtsen E<lt>pere@hungry.comE<gt>"
+msgstr "Petter Reinholdtsen E<lt>pere@hungry.comE<gt>"
+
+# type: SH
+#: validlocale.8:47
+#, no-wrap
+msgid "SEE ALSO"
+msgstr "VEJA TAMB�M"
+
+# type: Plain text
+#: validlocale.8:49
+#, fuzzy
+msgid "locale-gen(8), localedef(1), locale(1)"
+msgstr "locale-gen(8), localedef(1), locale(1), base-config(8)"
+
+# type: TH
+#~ msgid "BASE-CONFIG"
+#~ msgstr "BASE-CONFIG"
+
+# type: Plain text
+#~ msgid "base-config - Debian base system configuration"
+#~ msgstr "base-config - Configura��o do sistema base Debian"
+
+# type: SH
+#~ msgid "SYNOPSIS"
+#~ msgstr "SINOPSE"
+
+# type: Plain text
+#~ msgid "B<base-config [new]>"
+#~ msgstr "B<base-config [new]>"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<base-config> is the program that was run when you first rebooted into "
+#~ "your newly installed debian system. It walks you through setting up the "
+#~ "system and downloading additional software, and so forth. The program can "
+#~ "be run at any later date to walk you through essentially the same process "
+#~ "again."
+#~ msgstr ""
+#~ "B<base-config> � o programa que foi executado quando voc� reiniciou a "
+#~ "primeira vez em seu novo sistema debian instalado. Ele o guia atrav�s das "
+#~ "configura��es de seu sistema e baixando softwares adicionais, indo al�m.  "
+#~ "O programa pode ser executado posteriormente a qualquer momento para gui�-"
+#~ "lo essencialmente atrav�s do mesmo processo novamente."
+
+# type: SH
+#~ msgid "IMPLEMENTATION"
+#~ msgstr "IMPLEMENTA��O"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<base-config> generates a menu of choices from the contents of B</usr/"
+#~ "lib/base-config/>, and from debconf templates."
+#~ msgstr ""
+#~ "B<base-config> gera um menu de op��es a partir do conte�do de B</usr/lib/"
+#~ "base-config/>, e dos modelos debconf."
+
+# type: Plain text
+#~ msgid ""
+#~ "The .mnu files in /usr/lib/base-config/ control whether the menu item "
+#~ "appears only on new installs (Only-New: true), whether debconf can "
+#~ "already be running when the item is run (Debconf: true), a numeric Order "
+#~ "controls placement in the menu. If a .mnu file contains \"Exit-Menu: true"
+#~ "\", then base-config will terminate after running that menu item. "
+#~ "Finally, a \"Changes-Menu: true\" line will make base-config rebuild the "
+#~ "menu after running the menu item."
+#~ msgstr ""
+#~ "Os arquivos .mnu em /usr/lib/base-config/ controlam quando um item de "
+#~ "menu aparece apenas em novas instala��es (Only-New: true), ou o debconf "
+#~ "pode j� estar sendo executado quando o item � executado (Debconf: true), "
+#~ "um n�mero Order controla a posi��o no menu. Se um arquivo .mnu cont�m "
+#~ "\"Exit-Menu: true\", ent�o base-config ser� terminado ap�s executar esse "
+#~ "item do menu. Finalmente a linha \"Changes-Menu: true\"  far� com que "
+#~ "base-config reconstrua o menu ap�s executar este item."
+
+# type: Plain text
+#~ msgid ""
+#~ "The .tst files in /usr/lib/base-config/ are run when base-config builds "
+#~ "the menu and must return true for that menu item to appear on the menu."
+#~ msgstr ""
+#~ "Os arquivos .tst em /usr/lib/base-config/ s�o executados quando base-"
+#~ "config constr�i o menu e devem retornar verdadeiro para que apare�am no "
+#~ "menu."
+
+# type: Plain text
+#~ msgid ""
+#~ "The menu items are taken from debconf, by looking for items in the "
+#~ "debconf database named base-config/menu/whatever."
+#~ msgstr ""
+#~ "Os itens do menu s�o pegos do debconf olhando para itens na base de dados "
+#~ "do debconf chamada de base-config/menu/qualquercoisa"
+
+# type: Plain text
+#~ msgid ""
+#~ "When a menu item is selected, the corresponding program, in /usr/lib/base-"
+#~ "config is run. If this is a fresh install onto a new debian system, the "
+#~ "program receives \"new\" as its first argument."
+#~ msgstr ""
+#~ "Quando um item do menu � selecionado, o programa correspondente, em /usr/"
+#~ "lib/base-config � executado. Se esta � uma instala��o novo em um novo "
+#~ "sistema debian, o programa recebe \"new\" como seu primeiro argumento."
+
+# type: Plain text
+#~ msgid ""
+#~ "B<base-config> checks the return codes of each of the programs. If a "
+#~ "program returns nonzero, the main menu is displayed (this may involve "
+#~ "lowering the debconf priority)."
+#~ msgstr ""
+#~ "B<base-config> checa os c�digos de retorno de cada um dos programas. Se "
+#~ "um programa retorna n�o-zero, o menu principal � exibido (isso pode "
+#~ "envolver diminuir a prioridade do debconf)."
+
+# type: Plain text
+#~ msgid ""
+#~ "Generally the user is advanced down the menu from item to item as each "
+#~ "succeeds. If a menu item needs to jump back to a previous item in the "
+#~ "menu, or skip over a subsequent item, it can write the name of the next "
+#~ "menu item to show to the file \"jump-to\" in the current directory."
+#~ msgstr ""
+#~ "Geralmente o usu�rio avan�a descendo o menu item a item � medida que cada "
+#~ "um � completado com sucesso. Se um item do menu precisa voltar para um "
+#~ "item anterior ou pular algum item subseq�ente, ele pode escrever o nome "
+#~ "do pr�ximo item do menu para mostrar ao arquivo \"jump-to\" no diret�rio "
+#~ "atual."
+
+# type: Plain text
+#~ msgid ""
+#~ "Every base-config run is logged to B</var/log/base-config.log>.  B</var/"
+#~ "log/base-config.timings> contains timing information to go with the log. "
+#~ "This allows replays of base-config runs using the B<replay>(1)  utility."
+#~ msgstr ""
+#~ "Cada execu��o do base-config � registrada em B</var/log/base-config."
+#~ "log>.  B</var/log/base-config.timings> cont�m as informa��es de tempo que "
+#~ "v�o juntamente com o registro. Isso permite repeti��es da execu��o do "
+#~ "base-config usando o utilit�rio B<replay>(1)."
+
+# type: Plain text
+#~ msgid ""
+#~ "B</var/log/installer/cdebconf>, if it exists, is used by B<base-config> "
+#~ "on new installs to get values from the debian-installer first stage "
+#~ "install."
+#~ msgstr ""
+#~ "B</var/log/installer/cdebconf>, se o arquivo existe, � usado pelo B<base-"
+#~ "config> em novas instala��es para obter valores do primeiroest�gio de "
+#~ "instala��o do debian-installer."
+
+# type: Plain text
+#~ msgid ""
+#~ "Other packages can drop files into B</usr/lib/base-config/>, and add menu "
+#~ "titles in debconf, and they will be added to the menu. It is very "
+#~ "strongly encouraged that any such programs communicate with the user "
+#~ "entirely via debconf, so that the base configuration maintains a "
+#~ "consistent and professional look."
+#~ msgstr ""
+#~ "Outros pacotes podem colocar arquivos em B</usr/lib/base-config/>, e "
+#~ "adicionar t�tulos de menu no debconf, que ser�o adicionados ao menu. � "
+#~ "fortemente encorajado que qualquer programa desses comunique-se com o "
+#~ "usu�rio inteiramente via debconf, de forma que a configura��o da base "
+#~ "mantenha a consist�ncia e o visual profissional."
+
+# type: Plain text
+#~ msgid ""
+#~ "Another useful thing for custom distributions is /usr/share/base-config/"
+#~ "debconf-seed. If that directory exists, every file in it will be loaded "
+#~ "into the debconf database using B<debconf-set-selections>(1)"
+#~ msgstr ""
+#~ "Outra coisa �til para distribui��es customizadas � /usr/share/base-config/"
+#~ "debconf-seed. Se esse diret�rio existir, cada arquivo nele ser� carregado "
+#~ "no banco de dados do debconf usando B<debconf-set-selections>(1)"
+
+# type: Plain text
+#~ msgid ""
+#~ "If the file /var/log/installer/debconf-seed is created by the debian-"
+#~ "installer, it will also be loaded into the debconf database."
+#~ msgstr ""
+#~ "Se o arquivo /var/log/installer/debconf-seed � criado pelo debian-"
+#~ "installer, ele tamb�m ser� carregado no banco de dados do debconf."
+
+# type: SH
+#~ msgid "ENVIRONMENT"
+#~ msgstr "AMBIENTE"
+
+# type: Plain text
+#~ msgid ""
+#~ "The following environment variables influence B<base-config>.  These "
+#~ "variables may be set at run time, or for new installs, may be passed to "
+#~ "the kernel at the B<lilo>(8)  (or other bootloader) command line. Consult "
+#~ "your boot loader's documentation for details. For example, lilo can be "
+#~ "booted with something like \"linux DEBIAN_FRONTEND=readline\"."
+#~ msgstr ""
+#~ "As seguintes vari�veis de ambiente influenciam B<base-config>.  Essas "
+#~ "vari�veis podem ser definidas em tempo de execu��o, ou para novas "
+#~ "instala��es, podem ser passadas ao kernel na linha de comando do B<lilo>"
+#~ "(8)  (ou outro gerenciador de boot). Consulte a documenta��o do seu "
+#~ "gerenciador de boot para detalhes. Por exemplo, lilo pode ser bootado com "
+#~ "algo como: \"linux DEBIAN_FRONTEND=readline\"."
+
+# type: TP
+#~ msgid "B<DEBIAN_FRONTEND>"
+#~ msgstr "B<DEBIAN_FRONTEND>"
+
+# type: TP
+#~ msgid "B<DEBIAN_PRIORITY>"
+#~ msgstr "B<DEBIAN_PRIORITY>"
+
+# type: TP
+#~ msgid "B<DEBCONF_DEBUG>"
+#~ msgstr "B<DEBCONF_DEBUG>"
+
+# type: TP
+#~ msgid "B<DEBCONF_TERSE>"
+#~ msgstr "B<DEBCONF_TERSE>"
+
+# type: Plain text
+#~ msgid "Control various things about B<debconf>(7)"
+#~ msgstr "Controla v�rias coisas sobre o B<debconf>(7)"
+
+# type: SH
+#~ msgid "AUTHOR"
+#~ msgstr "AUTOR"
+
+# type: Plain text
+#~ msgid "Joey Hess E<lt>joeyh@debian.orgE<gt>"
+#~ msgstr "Joey Hess E<lt>joey@kitenet.netE<gt>"
+
+# type: TH
+#~ msgid "TERMWRAP"
+#~ msgstr "TERMWRAP"
+
+# type: Plain text
+#~ msgid "termwrap - terminal wrapper"
+#~ msgstr "termwrap - wrapper de terminal"
+
+# type: Plain text
+#~ msgid "B<termwrap [-nnt] command [args]>"
+#~ msgstr "B<termwrap [-nnt] comando [argumentos]>"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<termwrap> is used to execute B<base-config>(8)  on newly installed "
+#~ "Debian systems. It examines the environment, taking note of locale "
+#~ "settings, and what type of console is available, and runs an appropriate "
+#~ "terminal program. For example, at the Linux console and in a Japanese "
+#~ "locale, it runs jfterm. The specified command is run inside the terminal "
+#~ "program (if any)."
+#~ msgstr ""
+#~ "B<termwrap> � usado para executar B<base-config>(8)  em novos sistemas "
+#~ "Debian instalados. Ele examina o ambiente, tomando nota das configura��es "
+#~ "de localiza��o, qual tipo de console est� dispon�vel e executa um "
+#~ "programa de terminal apropriado.  Por exemplo, no console Linux e em uma "
+#~ "localiza��o Japonesa, ele executa jfterm. O comando especificado � "
+#~ "executado dentro do programa de terminal (caso exista algum)."
+
+# type: SH
+#~ msgid "OPTIONS"
+#~ msgstr "OP��ES"
+
+# type: TP
+#~ msgid "I<-nnt>"
+#~ msgstr "I<-nnt>"
+
+# type: Plain text
+#~ msgid "Don't run another terminal."
+#~ msgstr "N�o execute outro terminal."
+
+# type: TH
+#~ msgid "APT-SETUP"
+#~ msgstr "APT-SETUP"
+
+# type: Plain text
+#~ msgid "apt-setup - add apt download sources"
+#~ msgstr "apt-setup - adiciona fontes de download para o apt"
+
+# type: Plain text
+#~ msgid "B<apt-setup [probe] [-N]>"
+#~ msgstr "B<apt-setup [probe] [-N]>"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<apt-setup> is an interactive program that simplifies adding sources to "
+#~ "apt's sources.list. It knows about all the major debian mirrors and can "
+#~ "help you select one. It can even use B<apt-cdrom>(8)  to scan CDs."
+#~ msgstr ""
+#~ "B<apt-setup> � um programa interativo que simplifica a adi��o de fontes "
+#~ "no arquivo sources.list do apt. Ele conhece todos os principais espelhos "
+#~ "(mirrors) debian e pode ajud�-lo a selecionar um. Pode at� mesmo usar o "
+#~ "B<apt-cdrom>(8)  para vasculhar CDs."
+
+# type: TP
+#~ msgid "I<probe>"
+#~ msgstr "I<probe>"
+
+# type: Plain text
+#~ msgid ""
+#~ "By default no probing of CDs is done. Passing \"probe\" as the first "
+#~ "argument to this program will make it probe for a CD in the drive on "
+#~ "startup and add it to sources.list. This is useful on initial debian "
+#~ "installs, to minimize interaction with the user."
+#~ msgstr ""
+#~ "Por padr�o nenhuma consulta de CDs � feita. Passar \"probe\" como o "
+#~ "primeiro argumento para este programa far� com que o mesmo procure por um "
+#~ "CD no drive em sua inicializa��o e adicione-o ao sources.list. Isto � "
+#~ "�til em instala��es iniciais do debian para minimizar a intera��o com o "
+#~ "usu�rio."
+
+# type: TP
+#~ msgid "I<-N>"
+#~ msgstr "I<-N>"
+
+# type: Plain text
+#~ msgid ""
+#~ "Indicates that this is a new install.  This parameter allows apt-setup to "
+#~ "run in noninteractive mode if its debconf questions have been preseeded."
+#~ msgstr ""
+#~ "Indica que esta � uma nova instala��o.  Este par�metro permite ao apt-"
+#~ "setup executar no modo n�o-interativo se suas perguntas do debconf foram "
+#~ "previamente respondidas."
+
+# type: Plain text
+#~ msgid "Joey Hess E<lt>joey@kitenet.netE<gt>"
+#~ msgstr "Joey Hess E<lt>joey@kitenet.netE<gt>"
+
+# type: TH
+#, fuzzy
+#~ msgid "TZSETUP"
+#~ msgstr "APT-SETUP"
+
+# type: SH
+#, fuzzy
+#~ msgid "DERIVATION"
+#~ msgstr "DESCRIÃÃO"
--- eglibc-2.13.orig/debian/local/manpages/po/man.pot
+++ eglibc-2.13/debian/local/manpages/po/man.pot
@@ -0,0 +1,173 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+# 
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2005-12-27 17:38-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING"
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "validlocale"
+msgstr ""
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "0.1"
+msgstr ""
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "Petter Reinholdtsen"
+msgstr ""
+
+# type: SH
+#: validlocale.8:2
+#, no-wrap
+msgid "NAME"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:5
+msgid "validlocale - Test if a given locale is available"
+msgstr ""
+
+# type: SH
+#: validlocale.8:5
+#, no-wrap
+msgid "SYNTAX"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:8
+msgid "validlocale E<lt>I<locale>E<gt>"
+msgstr ""
+
+# type: SH
+#: validlocale.8:8
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:13
+msgid ""
+"Test if the locale given as argument is a valid locale.  If it isn't, print "
+"on stdout the string to add to /etc/locale.gen to make locale-gen generate "
+"the locale (if it exists at all)."
+msgstr ""
+
+# type: SH
+#: validlocale.8:13
+#, no-wrap
+msgid "FILES"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:16
+msgid "I</usr/sbin/validlocale>"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:18
+msgid "I</usr/share/i18n/SUPPORTED>"
+msgstr ""
+
+# type: SH
+#: validlocale.8:18
+#, no-wrap
+msgid "ENVIRONMENT VARIABLES"
+msgstr ""
+
+# type: TP
+#: validlocale.8:20
+#, no-wrap
+msgid "B<DEFAULTCHARSET>"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:24
+msgid ""
+"Which charset to assume if the given locale is missing from the list of "
+"supported locales."
+msgstr ""
+
+# type: SH
+#: validlocale.8:24
+#, no-wrap
+msgid "EXAMPLES"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:28
+msgid ""
+"If you give a valid locale as parameter, it outputs a string specifying this "
+"on stderr:"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:31
+msgid "% validlocale C"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:33
+msgid "locale 'C' valid and available"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:37
+msgid ""
+"When given a invalid (not generated or just nonexistent), it outputs a "
+"string on stderr telling that this is an invalid locale, and a string to "
+"stdout with the string to add to /etc/locale.gen to have this locale "
+"generated:"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:40
+msgid "% validlocale de_AU@euro"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:42
+msgid "locale 'de_AT@euro' not available"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:44
+msgid "de_AT@euro ISO-8859-15"
+msgstr ""
+
+# type: SH
+#: validlocale.8:44
+#, no-wrap
+msgid "AUTHORS"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:47
+msgid "Petter Reinholdtsen E<lt>pere@hungry.comE<gt>"
+msgstr ""
+
+# type: SH
+#: validlocale.8:47
+#, no-wrap
+msgid "SEE ALSO"
+msgstr ""
+
+# type: Plain text
+#: validlocale.8:49
+msgid "locale-gen(8), localedef(1), locale(1)"
+msgstr ""
--- eglibc-2.13.orig/debian/local/manpages/po/es.po
+++ eglibc-2.13/debian/local/manpages/po/es.po
@@ -0,0 +1,672 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: 2.74\n"
+"POT-Creation-Date: 2005-12-27 17:38-0500\n"
+"PO-Revision-Date: 2005-11-30 18:58+0100\n"
+"Last-Translator: Rub�n Porras <nahoo@inicia.es>\n"
+"Language-Team: Spanish <debian-l10n-spanish@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "validlocale"
+msgstr "validlocale"
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "0.1"
+msgstr "0.1"
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "Petter Reinholdtsen"
+msgstr "Petter Reinholdtsen"
+
+# type: SH
+#: validlocale.8:2
+#, no-wrap
+msgid "NAME"
+msgstr "NOMBRE"
+
+# type: Plain text
+#: validlocale.8:5
+msgid "validlocale - Test if a given locale is available"
+msgstr ""
+"validlocale - Comprueba si la opci�n de localizaci�n dada est� disponible"
+
+# type: SH
+#: validlocale.8:5
+#, no-wrap
+msgid "SYNTAX"
+msgstr "SINTAXIS"
+
+# type: Plain text
+#: validlocale.8:8
+msgid "validlocale E<lt>I<locale>E<gt>"
+msgstr "validlocale E<lt>I<opci�n_de_localizaci�n>E<gt>"
+
+# type: SH
+#: validlocale.8:8
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr "DESCRIPCI�N"
+
+# type: Plain text
+#: validlocale.8:13
+msgid ""
+"Test if the locale given as argument is a valid locale.  If it isn't, print "
+"on stdout the string to add to /etc/locale.gen to make locale-gen generate "
+"the locale (if it exists at all)."
+msgstr ""
+"Comprueba si la opci�n de localizaci�n dada como argumento es v�lida. Si no "
+"lo es muestra en la stdout (salida est�ndar) la cadena de caracteres que se "
+"necesita a�adir a /etc/locale.gen para que locale-gen genere esa opci�n de "
+"localizaci�n (si es que existe)."
+
+# type: SH
+#: validlocale.8:13
+#, no-wrap
+msgid "FILES"
+msgstr "FICHEROS"
+
+# type: Plain text
+#: validlocale.8:16
+msgid "I</usr/sbin/validlocale>"
+msgstr "I</usr/sbin/validlocale>"
+
+# type: Plain text
+#: validlocale.8:18
+msgid "I</usr/share/i18n/SUPPORTED>"
+msgstr "I</usr/share/i18n/SUPPORTED>"
+
+# type: SH
+#: validlocale.8:18
+#, no-wrap
+msgid "ENVIRONMENT VARIABLES"
+msgstr "VARIABLES DE ENTORNO"
+
+# type: TP
+#: validlocale.8:20
+#, no-wrap
+msgid "B<DEFAULTCHARSET>"
+msgstr "B<DEFAULTCHARSET>"
+
+# type: Plain text
+#: validlocale.8:24
+msgid ""
+"Which charset to assume if the given locale is missing from the list of "
+"supported locales."
+msgstr ""
+"El juego de caracteres que asume en caso de que la opci�n de localizaci�n "
+"dada no est� entre la lista de opciones de localizaci�n soportadas."
+
+# type: SH
+#: validlocale.8:24
+#, no-wrap
+msgid "EXAMPLES"
+msgstr "EJEMPLOS"
+
+# type: Plain text
+#: validlocale.8:28
+msgid ""
+"If you give a valid locale as parameter, it outputs a string specifying this "
+"on stderr:"
+msgstr ""
+"Si usted proporciona una opci�n de localizaci�n v�lida como par�metro, "
+"muestra una cadena de caracteres especific�ndolo en stderr (salida de "
+"errores est�ndar):"
+
+# type: Plain text
+#: validlocale.8:31
+msgid "% validlocale C"
+msgstr "% validlocale C"
+
+# type: Plain text
+#: validlocale.8:33
+msgid "locale 'C' valid and available"
+msgstr "locale 'C' valid and available"
+
+# type: Plain text
+#: validlocale.8:37
+msgid ""
+"When given a invalid (not generated or just nonexistent), it outputs a "
+"string on stderr telling that this is an invalid locale, and a string to "
+"stdout with the string to add to /etc/locale.gen to have this locale "
+"generated:"
+msgstr ""
+"Cuando se proporcione una inv�lida (no ha sido generada o no existe), "
+"muestra una cadena de caracteres en stderr diciendo que es inv�lida, y otra "
+"a stdout con la cadena de caracteres que se necesita a�adir a /etc/locale."
+"gen para que se genere:"
+
+# type: Plain text
+#: validlocale.8:40
+msgid "% validlocale de_AU@euro"
+msgstr "% validlocale de_AU@euro"
+
+# type: Plain text
+#: validlocale.8:42
+msgid "locale 'de_AT@euro' not available"
+msgstr "locale 'de_AT@euro' not available"
+
+# type: Plain text
+#: validlocale.8:44
+msgid "de_AT@euro ISO-8859-15"
+msgstr "de_AT@euro ISO-8859-15"
+
+# type: SH
+#: validlocale.8:44
+#, no-wrap
+msgid "AUTHORS"
+msgstr "AUTORES"
+
+# type: Plain text
+#: validlocale.8:47
+msgid "Petter Reinholdtsen E<lt>pere@hungry.comE<gt>"
+msgstr "Petter Reinholdtsen E<lt>pere@hungry.comE<gt>"
+
+# type: SH
+#: validlocale.8:47
+#, no-wrap
+msgid "SEE ALSO"
+msgstr "V�ASE ADEM�S"
+
+# type: Plain text
+#: validlocale.8:49
+#, fuzzy
+msgid "locale-gen(8), localedef(1), locale(1)"
+msgstr "locale-gen(8), localedef(1), locale(1), base-config(8)"
+
+# type: TH
+#~ msgid "BASE-CONFIG"
+#~ msgstr "BASE-CONFIG"
+
+# type: Plain text
+#~ msgid "base-config - Debian base system configuration"
+#~ msgstr "base-config - configuraci�n del sistema base de Debian"
+
+# type: SH
+#~ msgid "SYNOPSIS"
+#~ msgstr "SINOPSIS"
+
+# type: Plain text
+#~ msgid "B<base-config [new]>"
+#~ msgstr "B<base-config [new]>"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<base-config> is the program that was run when you first rebooted into "
+#~ "your newly installed debian system. It walks you through setting up the "
+#~ "system and downloading additional software, and so forth. The program can "
+#~ "be run at any later date to walk you through essentially the same process "
+#~ "again."
+#~ msgstr ""
+#~ "B<base-config> es el programa que se ejecut� la primera vez que arranc� "
+#~ "en su sistema Debian reci�n instalado. base-config termina de configurar "
+#~ "el sistema, descarga programas adicionales... El programa puede "
+#~ "ejecutarse en cualquier momento posterior para realizar el mismo proceso "
+#~ "de nuevo."
+
+# type: SH
+#~ msgid "IMPLEMENTATION"
+#~ msgstr "IMPLEMENTACI�N"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<base-config> generates a menu of choices from the contents of B</usr/"
+#~ "lib/base-config/>, and from debconf templates."
+#~ msgstr ""
+#~ "B<base-config> genera un men� de elecciones con los contenidos de B</usr/"
+#~ "lib/base-config/>, y de las plantillas de debconf."
+
+# type: Plain text
+#~ msgid ""
+#~ "The .mnu files in /usr/lib/base-config/ control whether the menu item "
+#~ "appears only on new installs (Only-New: true), whether debconf can "
+#~ "already be running when the item is run (Debconf: true), a numeric Order "
+#~ "controls placement in the menu. If a .mnu file contains \"Exit-Menu: true"
+#~ "\", then base-config will terminate after running that menu item. "
+#~ "Finally, a \"Changes-Menu: true\" line will make base-config rebuild the "
+#~ "menu after running the menu item."
+#~ msgstr ""
+#~ "Los ficheros .mnu de /usr/lib/base-config/ controlan si el elemento del "
+#~ "men� aparece s�lo en nuevas instalaciones (\"Only-New: true\"), si "
+#~ "debconf puede estar siendo ejecutado en el momento en el que se ejecute "
+#~ "el elemento (Debconf: true). Una opci�n num�rica \"Order\" controla el "
+#~ "lugar en el men�. Si el fichero .mnu contiene \"Exit-Menu:true\", base-"
+#~ "config terminar� despu�s de ejectuar ese elemento del men�. Finalmente, "
+#~ "una l�nea \"Changes-Menu: true\" har� que base-config reconstruya el men� "
+#~ "despu�s de ejecutar el elemento del men�."
+
+# type: Plain text
+#~ msgid ""
+#~ "The .tst files in /usr/lib/base-config/ are run when base-config builds "
+#~ "the menu and must return true for that menu item to appear on the menu."
+#~ msgstr ""
+#~ "Los ficheros .tst de /usr/lib/base-config/ se ejecutan cuando base-config "
+#~ "construye el men� y debe devolver \"true\" para que ese elemento aparezca "
+#~ "en el men�."
+
+# type: Plain text
+#~ msgid ""
+#~ "The menu items are taken from debconf, by looking for items in the "
+#~ "debconf database named base-config/menu/whatever."
+#~ msgstr ""
+#~ "Los elementos del men� se toman de debconf, buscando los elementos en la "
+#~ "base de datos de debconf llamada base-config/menu/loquesea."
+
+# type: Plain text
+#~ msgid ""
+#~ "When a menu item is selected, the corresponding program, in /usr/lib/base-"
+#~ "config is run. If this is a fresh install onto a new debian system, the "
+#~ "program receives \"new\" as its first argument."
+#~ msgstr ""
+#~ "Cuando se selecciona elemento del men�, se ejecuta el programa "
+#~ "correspondiente en /usr/lib/base-config. Si �sta es la primera "
+#~ "instalaci�n en un sistema muevo, entonces el programa recibe \"new\" como "
+#~ "su primer argumento."
+
+# type: Plain text
+#~ msgid ""
+#~ "B<base-config> checks the return codes of each of the programs. If a "
+#~ "program returns nonzero, the main menu is displayed (this may involve "
+#~ "lowering the debconf priority)."
+#~ msgstr ""
+#~ "B<base-config> comprueba los valores devueltos por cada programa. Si un "
+#~ "programa devuelve un valor distinto de cero, se muestra el men� principal "
+#~ "(puede que esto implique bajar la prioridad de debconf)."
+
+# type: Plain text
+#~ msgid ""
+#~ "Generally the user is advanced down the menu from item to item as each "
+#~ "succeeds. If a menu item needs to jump back to a previous item in the "
+#~ "menu, or skip over a subsequent item, it can write the name of the next "
+#~ "menu item to show to the file \"jump-to\" in the current directory."
+#~ msgstr ""
+#~ "Normalmente el usuario es guiado de arriba abajo de un elemento del men� "
+#~ "en otro a medida que cada uno de ellos se completa con �xito. Si un "
+#~ "elemento del men� necesita volver a otro anterior o saltar alguno de los "
+#~ "posteriores, puede hacerlo escribiendo el nombre del siguiente elemento "
+#~ "del men� al que saltar en el fichero \"jump-to\" en el directorio actual."
+
+# type: Plain text
+#~ msgid ""
+#~ "Every base-config run is logged to B</var/log/base-config.log>.  B</var/"
+#~ "log/base-config.timings> contains timing information to go with the log. "
+#~ "This allows replays of base-config runs using the B<replay>(1)  utility."
+#~ msgstr ""
+#~ "Cualquier ejecuci�n de base-config se registra en B</var/log/base-config."
+#~ "log>.  B</var/log/base-config.timings> contiene informaci�n de los "
+#~ "tiempos que van con el registro. Esto permite volver a ver la ejecuci�n "
+#~ "de base-config usando la utilidad B<replay>(1)B<.>"
+
+# type: Plain text
+#~ msgid ""
+#~ "B</var/log/installer/cdebconf>, if it exists, is used by B<base-config> "
+#~ "on new installs to get values from the debian-installer first stage "
+#~ "install."
+#~ msgstr ""
+#~ "Si existe B<var/log/installer/cdebconf>, B<base-config> lo usa en nuevas "
+#~ "instalaciones para obtener valores de la primera etapa de instalaci�n del "
+#~ "\"debian-installer\"."
+
+# type: Plain text
+#~ msgid ""
+#~ "Other packages can drop files into B</usr/lib/base-config/>, and add menu "
+#~ "titles in debconf, and they will be added to the menu. It is very "
+#~ "strongly encouraged that any such programs communicate with the user "
+#~ "entirely via debconf, so that the base configuration maintains a "
+#~ "consistent and professional look."
+#~ msgstr ""
+#~ "Otros paquetes pueden dejar ficheros en B</usr/lib/base-config/>, y "
+#~ "a�adir t�tulos de men� en debconf, y ser�n a�adidos al men�. Es altamente "
+#~ "recomendable que cualquiera de estos programas se comunique con el "
+#~ "usuario totalmente a trav�s de debconf, de esta forma, la configuraci�n "
+#~ "mantiene un aspecto consistente y profesional."
+
+# type: Plain text
+#~ msgid ""
+#~ "Another useful thing for custom distributions is /usr/share/base-config/"
+#~ "debconf-seed. If that directory exists, every file in it will be loaded "
+#~ "into the debconf database using B<debconf-set-selections>(1)"
+#~ msgstr ""
+#~ "Otra cosa �til para las distribuciones personalizadas es /usr/share/base-"
+#~ "config/debconf-seed. Si ese directorio existe, todos los ficheros dentro "
+#~ "de �l se cargar�n en la base de datos de debconf usando B<debconf-set-"
+#~ "selections>(1)"
+
+# type: Plain text
+#~ msgid ""
+#~ "If the file /var/log/installer/debconf-seed is created by the debian-"
+#~ "installer, it will also be loaded into the debconf database."
+#~ msgstr ""
+#~ "Si debian-installer crea el fichero /var/log/installer/debconf-seed, "
+#~ "tambi�n se incorporar� a la base de datos de debconf."
+
+# type: SH
+#~ msgid "ENVIRONMENT"
+#~ msgstr "ENTORNO"
+
+# type: Plain text
+#~ msgid ""
+#~ "The following environment variables influence B<base-config>.  These "
+#~ "variables may be set at run time, or for new installs, may be passed to "
+#~ "the kernel at the B<lilo>(8)  (or other bootloader) command line. Consult "
+#~ "your boot loader's documentation for details. For example, lilo can be "
+#~ "booted with something like \"linux DEBIAN_FRONTEND=readline\"."
+#~ msgstr ""
+#~ "Las siguientes variables de entorno influencian a B<base-config>.  Estas "
+#~ "variables pueden establecerse en tiempo de ejecuci�n, o para nuevas "
+#~ "instalaciones, puede pasarse al n�cleo en la l�nea de �rdenes de B<lilo>"
+#~ "(8)  (u otro gestor de arranque). Consulte la documentaci�n de su gestor "
+#~ "de arranque para m�s detalles. Por ejemplo, lilo puede arrancarse con "
+#~ "algo como \"linux DEBIAN_FRONTEND=readline\"."
+
+# type: TP
+#~ msgid "B<DEBIAN_FRONTEND>"
+#~ msgstr "B<DEBIAN_FRONTEND>"
+
+# type: TP
+#~ msgid "B<DEBIAN_PRIORITY>"
+#~ msgstr "B<DEBIAN_PRIORITY>"
+
+# type: TP
+#~ msgid "B<DEBCONF_DEBUG>"
+#~ msgstr "B<DEBCONF_DEBUG>"
+
+# type: TP
+#~ msgid "B<DEBCONF_TERSE>"
+#~ msgstr "B<DEBCONF_TERSE>"
+
+# type: Plain text
+#~ msgid "Control various things about B<debconf>(7)"
+#~ msgstr "Controlan varias cosas de B<debconf>(7)"
+
+# type: SH
+#~ msgid "AUTHOR"
+#~ msgstr "AUTOR"
+
+# type: Plain text
+#~ msgid "Joey Hess E<lt>joeyh@debian.orgE<gt>"
+#~ msgstr "Joey Hess E<lt>joey@debian.orgE<gt>"
+
+# type: TH
+#~ msgid "TERMWRAP"
+#~ msgstr "TERMWRAP"
+
+# type: Plain text
+#~ msgid "termwrap - terminal wrapper"
+#~ msgstr "termwrap - envuelve un terminal"
+
+# type: Plain text
+#~ msgid "B<termwrap [-nnt] command [args]>"
+#~ msgstr "B<termwrap [-nnt] orden [args]>"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<termwrap> is used to execute B<base-config>(8)  on newly installed "
+#~ "Debian systems. It examines the environment, taking note of locale "
+#~ "settings, and what type of console is available, and runs an appropriate "
+#~ "terminal program. For example, at the Linux console and in a Japanese "
+#~ "locale, it runs jfterm. The specified command is run inside the terminal "
+#~ "program (if any)."
+#~ msgstr ""
+#~ "B<termwrap> se usa para ejecutar B<base-config>(8) en sistemas Debian "
+#~ "reci�n instalados. Examina el entorno, toma nota de la configuraci�n de "
+#~ "las opciones de localizaci�n y de que tipo de terminal est� disponible, "
+#~ "para luego ejecutar un programa de terminal apropiado. Por ejemplo, en "
+#~ "una consola de Linux con configuraci�n de localizaci�n japonesa ejecutar� "
+#~ "jfterm. La orden especificada se ejecuta dentro del programa de terminal "
+#~ "(si hay alguno)."
+
+# type: SH
+#~ msgid "OPTIONS"
+#~ msgstr "OPCIONES"
+
+# type: TP
+#~ msgid "I<-nnt>"
+#~ msgstr "I<-nnt>"
+
+# type: Plain text
+#~ msgid "Don't run another terminal."
+#~ msgstr "No ejecutar otro terminal."
+
+# type: TH
+#~ msgid "APT-SETUP"
+#~ msgstr "APT-SETUP"
+
+# type: Plain text
+#~ msgid "apt-setup - add apt download sources"
+#~ msgstr "apt-setup - a�ade fuentes para las descargas de apt"
+
+# type: Plain text
+#~ msgid "B<apt-setup [probe] [-N]>"
+#~ msgstr "B<apt-setup [probe] [-N]>"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<apt-setup> is an interactive program that simplifies adding sources to "
+#~ "apt's sources.list. It knows about all the major debian mirrors and can "
+#~ "help you select one. It can even use B<apt-cdrom>(8)  to scan CDs."
+#~ msgstr ""
+#~ "B<apt-setup> es un programa interactivo que simplifica el proceso de "
+#~ "a�adir fuentes al sources.list de apt. Conoce las principales r�plicas "
+#~ "Debian y puede ayudarle a seleccionar una. Incluso puede usar B<apt-cdrom>"
+#~ "(8) para analizar CD's."
+
+# type: TP
+#~ msgid "I<probe>"
+#~ msgstr "I<probe>"
+
+# type: Plain text
+#~ msgid ""
+#~ "By default no probing of CDs is done. Passing \"probe\" as the first "
+#~ "argument to this program will make it probe for a CD in the drive on "
+#~ "startup and add it to sources.list. This is useful on initial debian "
+#~ "installs, to minimize interaction with the user."
+#~ msgstr ""
+#~ "Por omisi�n no se busca ning�n CD. Si se pasa \"probe\" como primer "
+#~ "argumento el programa mirar� al arrancar si hay un CD en la unidad y lo "
+#~ "a�adir� al sources.list. Esto es �til en instalaciones iniciales de "
+#~ "Debian, para minimizar la interacci�n con el usuario."
+
+# type: TP
+#~ msgid "I<-N>"
+#~ msgstr "I<-N>"
+
+# type: Plain text
+#~ msgid ""
+#~ "Indicates that this is a new install.  This parameter allows apt-setup to "
+#~ "run in noninteractive mode if its debconf questions have been preseeded."
+#~ msgstr ""
+#~ "Indica que es una nueva instalaci�n. Este par�metro permite ejecutar apt-"
+#~ "setup de forma no interactiva si los valores de debconf han sido "
+#~ "preconfigurados."
+
+# type: Plain text
+#~ msgid "Joey Hess E<lt>joey@kitenet.netE<gt>"
+#~ msgstr "Joey Hess E<lt>joey@kitenet.netE<gt>"
+
+# type: TH
+#~ msgid "TZSETUP"
+#~ msgstr "TZSETUP"
+
+# type: TH
+#~ msgid "16 January 2004"
+#~ msgstr "16 de enero de 2004"
+
+# type: TH
+#~ msgid "Debian"
+#~ msgstr "Debian"
+
+# type: TH
+#~ msgid "Debian Timezone Configuration"
+#~ msgstr "Configuraci�n de zona horaria en Debian"
+
+# type: Plain text
+#~ msgid "tzsetup - set the local timezone"
+#~ msgstr "tzsetup - establece la zona horaria local"
+
+# type: Plain text
+#~ msgid "B<tzsetup [-y] [-g] [-c CC] [-N]>"
+#~ msgstr "B<tzsetup [-y] [-g] [-c CC] [-N]>"
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "This manual page explains how you can use the B<tzsetup> utility to set "
+#~ "the local timezone. This is necessary to let your system know about the "
+#~ "difference between system time and local time (the time in the real "
+#~ "world). It is also necessary to make your system behave nicely when your "
+#~ "location uses Daylight Savings Time."
+#~ msgstr ""
+#~ "Esta p�gina del manual explica como puede usar la utilidad B<tzsetup> "
+#~ "para establecer la zona horaria local. Esto es importante para que su "
+#~ "sistema sepa la diferencia entre el tiempo del sistema y el tiempo local "
+#~ "(el tiempo del mundo real). Tambi�n es necesario para que su sistema se "
+#~ "comporte de forma adecuada cuando en su zona se realicen cambios horarios "
+#~ "para aprovechar mejor la luz del d�a."
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "A valid system time together with the correct local time zone will give "
+#~ "you best performance and highest reliability. It is especially important "
+#~ "in a network environment, where even small time differences can make a "
+#~ "mirror refetch a whole ftp site, or where time stamps on external file "
+#~ "systems are used."
+#~ msgstr ""
+#~ "Un tiempo del sistema v�lido junto con la zona horaria adecuada le dar� "
+#~ "mejores resultados y una mayor seguridad. Es especialmente importante en "
+#~ "un entorno de red, donde incluso peque�as diferencias de tiempo pueden "
+#~ "hacer que una r�plica vuelva a descargar todo un sitio ftp, o donde se "
+#~ "usan marcas de tiempo en un sistema de ficheros externo."
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "B<tzsetup> is typically called without any parameters from the shell. "
+#~ "Optionally, the -y parameter can be used, to make it always change your "
+#~ "time zone without asking first. The -g parameter can also be used, to "
+#~ "make it ask if the hardware clock is set to gmt or not. The -c parameter, "
+#~ "followed by a country code, hints at the country the user's time zone may "
+#~ "be in. The -N parameter allows it to run noninteractively if the debconf "
+#~ "questions have been preseeded."
+#~ msgstr ""
+#~ "Normalmente se invoca B<tzsetup> desde un shell sin par�metros. "
+#~ "Opcionalmente, puede usarse la opci�n -y, para que siempre cambie la zona "
+#~ "horaria sin preguntar primero. El par�metro -g puede tambi�n usarse, para "
+#~ "que pregunte si el reloj f�sico del sistema est� en hora GMT o no. El "
+#~ "par�metro -c, seguido de un c�digo de pa�s, indica el pa�s en el que "
+#~ "posiblemente est� la zona horaria del usuario. El par�metro -N hace que "
+#~ "se ejecute de forma no interactiva si ha sido preconfigurado."
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "After you made your choice, B<tzsetup> will try to change the timezone "
+#~ "for you. See the B<INTERNALS> section below for technical details. You "
+#~ "must have root privileges to actually change anything. Please use "
+#~ "B<tzselect>(1)  as a user space command to just look at the timezones. It "
+#~ "will print the local time in any timezone recognized by the system."
+#~ msgstr ""
+#~ "Despu�s de que realice su elecci�n, B<tzsetup> tratar� de cambiar la zona "
+#~ "horaria por usted. Lea la secci�n B<FUNCIONAMIENTO INTERNO> de m�s abajo "
+#~ "para los detalles t�cnicos. Debe de tener privilegios de superusuario "
+#~ "para cambiar realmente cualquier configuraci�n. Puede usar B<tzselect>"
+#~ "(1)  como una orden de usuario para simplemente mirar las zonas horarias "
+#~ "reconocidas por el sistema. Mostrar� la hora local y todas las zonas "
+#~ "horarias reconocidas por el sistema."
+
+# type: SH
+#~ msgid "A WORD OF WARNING"
+#~ msgstr "UN AVISO"
+
+# type: Plain text
+#~ msgid ""
+#~ "What timezone is correct for your system? It depends on the geographical "
+#~ "location of the machine. Getting the correct location is important, but "
+#~ "the system must also know how your hardware clock is set. Most DOS based "
+#~ "PCs set their hardware clock on Local Time, while most UNIX systems set "
+#~ "their hardware clock to UTC."
+#~ msgstr ""
+#~ "�Qu� zona horaria es correcta para su sistema? Depende de la localizaci�n "
+#~ "geogr�fica de la m�quina. Obtener la localizaci�n correcta es importante, "
+#~ "pero el sistema tambi�n necesita saber c�mo funciona el reloj f�sico. La "
+#~ "mayor�a de los ordenadores personales basados en DOS establecen el reloj "
+#~ "f�sico seg�n el tiempo local, mientras que los sistemas UNIX lo "
+#~ "establecen seg�n UTC."
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "The Debian GNU/Linux system gains its knowledge of this setting from the "
+#~ "file I</etc/default/rcS>.  This file contains either the line B<UTC=yes>, "
+#~ "which indicates that the hardware clock is set to UTC, or it contains the "
+#~ "line B<UTC=no>, which declares the hardware clock is set to Local Time. "
+#~ "If these setting are correct, and the hardware clock is truly set as "
+#~ "indicated, then configuring the proper timezone for the machine will "
+#~ "cause the proper date and time to be displayed. If these are not set "
+#~ "correctly, the the reported time will be quite incorrect. See B<hwclock>"
+#~ "(8)  for more details on this topic."
+#~ msgstr ""
+#~ "El sistema Debian GNU/Linux obtiene la configuraci�n del fichero I</etc/"
+#~ "default/rcS>.  Este fichero contiene o bien la l�nea B<UTC=yes>, que "
+#~ "indica que el reloj f�sico est� en UTC, o bien la l�nea B<UTC=no>, que "
+#~ "indica que est� en tiempo local. Si el reloj est� de verdad como se "
+#~ "indica, entonces configurar la zona horaria adecuada har� que se muestre "
+#~ "la fecha y el tiempo correcto. En caso de no ser as�, el tiempo mostrado "
+#~ "podr� ser bastante incorrecto. Consulte B<hwclock>(8)  para m�s detalles "
+#~ "acerca de este tema."
+
+# type: SH
+#~ msgid "INTERNALS"
+#~ msgstr "FUNCIONAMIENTO INTERNO"
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "The work done by B<tzsetup> is actually pretty simple. It just updates "
+#~ "the link I</etc/localtime> to point to the correct timezone installed in "
+#~ "I</usr/share/zoneinfo/>."
+#~ msgstr ""
+#~ "El trabajo hecho por B<tzsetup> es realmente bastante sencillo. S�lo "
+#~ "actualiza el enlace I</etc/localtime> para que apunte al la zona horaria "
+#~ "correcta instalada en I</usr/share/zoneinfo/>."
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "There is nothing wrong with doing this manually. However, using "
+#~ "B<tzsetup> you don't have to remember the path to the timezones."
+#~ msgstr ""
+#~ "No pasa nada malo si esto se realiza manualmente. Sin embargo, usando "
+#~ "B<tzsetup> no es necesario recordar donde se guardan las zonas horarias."
+
+# type: Plain text
+#~ msgid "I</etc/timezone> I</etc/localtime> I</usr/share/zoneinfo>"
+#~ msgstr "I</etc/timezone> I</etc/localtime> I</usr/share/zoneinfo>"
+
+# type: SH
+#~ msgid "DERIVATION"
+#~ msgstr "DERIVACI�N"
+
+# type: Plain text
+#, fuzzy
+#~ msgid ""
+#~ "This program is based on B<tzconfig>(8)  -- the only major difference is "
+#~ "that this program uses debconf for its user interface, and that it allows "
+#~ "configuration of GMT."
+#~ msgstr ""
+#~ "Este programa se base en B<tzconfig>(8)  -- la mayor diferencia est� en "
+#~ "que �ste usa debconf para la interfaz de usuario, y que adem�s permite la "
+#~ "configuraci�n de GMT."
+
+# type: Plain text
+#~ msgid "B<hwclock>(8)  B<tzselect>(1)  B<rcS>(5)  B<tzconfig>(8)"
+#~ msgstr "B<hwclock>(8)  B<tzselect>(1)  B<rcS>(5)  B<tzconfig>(8)"
--- eglibc-2.13.orig/debian/local/manpages/po/fr.po
+++ eglibc-2.13/debian/local/manpages/po/fr.po
@@ -0,0 +1,505 @@
+# fr.po for base-config manpage
+# 
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# 
+# Previous translator :
+#    Antoine Gémis <agemis@netuup.com>.
+#   
+msgid ""
+msgstr ""
+"Project-Id-Version: base-config\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-12-27 17:38-0500\n"
+"PO-Revision-Date: 2005-07-27 19:36+0200\n"
+"Last-Translator: Cl�ment Stenac <zorglub@via.ecp.fr>\n"
+"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "validlocale"
+msgstr "validlocale"
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "0.1"
+msgstr "0.1"
+
+# type: TH
+#: validlocale.8:1
+#, no-wrap
+msgid "Petter Reinholdtsen"
+msgstr "Petter Reinholdtsen"
+
+# type: SH
+#: validlocale.8:2
+#, no-wrap
+msgid "NAME"
+msgstr "NOM"
+
+# type: Plain text
+#: validlocale.8:5
+msgid "validlocale - Test if a given locale is available"
+msgstr ""
+"validlocale - v�rifie si un ensemble donn� de param�tres r�gionaux est "
+"disponible"
+
+# type: SH
+#: validlocale.8:5
+#, no-wrap
+msgid "SYNTAX"
+msgstr "SYNTAXE"
+
+# type: Plain text
+#: validlocale.8:8
+msgid "validlocale E<lt>I<locale>E<gt>"
+msgstr "validlocale E<lt>I<locale>E<gt>"
+
+# type: SH
+#: validlocale.8:8
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr "DESCRIPTION"
+
+# type: Plain text
+#: validlocale.8:13
+msgid ""
+"Test if the locale given as argument is a valid locale.  If it isn't, print "
+"on stdout the string to add to /etc/locale.gen to make locale-gen generate "
+"the locale (if it exists at all)."
+msgstr ""
+"Teste si l'ensemble de param�tres r�gionaux donn� en argument est valable. "
+"S'il ne l'est pas, affiche sur la sortie standard la cha�ne de caract�res � "
+"ajouter � /etc/locale.gen afin de permettre � locale-gen de g�n�rer "
+"l'ensemble de param�tres (s'il existe)."
+
+# type: SH
+#: validlocale.8:13
+#, no-wrap
+msgid "FILES"
+msgstr "FICHIERS"
+
+# type: Plain text
+#: validlocale.8:16
+msgid "I</usr/sbin/validlocale>"
+msgstr "I</us/sbin/validlocale>"
+
+# type: Plain text
+#: validlocale.8:18
+msgid "I</usr/share/i18n/SUPPORTED>"
+msgstr "I</usr/share/i18n/SUPPORTED>"
+
+# type: SH
+#: validlocale.8:18
+#, no-wrap
+msgid "ENVIRONMENT VARIABLES"
+msgstr "VARIABLES D'ENVIRONNEMENT"
+
+# type: TP
+#: validlocale.8:20
+#, no-wrap
+msgid "B<DEFAULTCHARSET>"
+msgstr "B<DEFAULTCHARSET>"
+
+# type: Plain text
+#: validlocale.8:24
+msgid ""
+"Which charset to assume if the given locale is missing from the list of "
+"supported locales."
+msgstr ""
+"Indique quel encodage de caract�res doit �tre suppos� si la locale donn�e "
+"n'est pas dans la liste des locales g�r�es."
+
+# type: SH
+#: validlocale.8:24
+#, no-wrap
+msgid "EXAMPLES"
+msgstr "EXEMPLES"
+
+# type: Plain text
+#: validlocale.8:28
+msgid ""
+"If you give a valid locale as parameter, it outputs a string specifying this "
+"on stderr:"
+msgstr ""
+"Si vous indiquez comme param�tre une locale valabe, vous recevrez ceci sur "
+"la sortie d'erreur "
+
+# type: Plain text
+#: validlocale.8:31
+msgid "% validlocale C"
+msgstr "% validlocale C"
+
+# type: Plain text
+#: validlocale.8:33
+msgid "locale 'C' valid and available"
+msgstr "locale ��C�� valide et disponible"
+
+# type: Plain text
+#: validlocale.8:37
+msgid ""
+"When given a invalid (not generated or just nonexistent), it outputs a "
+"string on stderr telling that this is an invalid locale, and a string to "
+"stdout with the string to add to /etc/locale.gen to have this locale "
+"generated:"
+msgstr ""
+"Lorsqu'une locale non valable (non cr��e ou inexistante) est indiqu�e, vous "
+"recevrez un message sur la sortie d'erreur disant qu'il s'agit d'une locale "
+"non valable et une cha�ne de caract�res sur la sortie standard � ajouter � /"
+"etc/locale.gen pour que la locale soit cr��e�:"
+
+# type: Plain text
+#: validlocale.8:40
+msgid "% validlocale de_AU@euro"
+msgstr "% validlocale de_AU@euro"
+
+# type: Plain text
+#: validlocale.8:42
+msgid "locale 'de_AT@euro' not available"
+msgstr "locale  ��de_AT@euro�� non disponible"
+
+# type: Plain text
+#: validlocale.8:44
+msgid "de_AT@euro ISO-8859-15"
+msgstr "de_AT@euro ISO-8859-15"
+
+# type: SH
+#: validlocale.8:44
+#, no-wrap
+msgid "AUTHORS"
+msgstr "AUTEURS"
+
+# type: Plain text
+#: validlocale.8:47
+msgid "Petter Reinholdtsen E<lt>pere@hungry.comE<gt>"
+msgstr "Petter�Reinholdtsen�E<lt>pere@hungry.comE<gt>"
+
+# type: SH
+#: validlocale.8:47
+#, no-wrap
+msgid "SEE ALSO"
+msgstr "VOIR AUSSI"
+
+# type: Plain text
+#: validlocale.8:49
+#, fuzzy
+msgid "locale-gen(8), localedef(1), locale(1)"
+msgstr "locale-gen(8),�localedef(1),�locale(1),�base-config(8)"
+
+# type: TH
+#~ msgid "BASE-CONFIG"
+#~ msgstr "BASE-CONFIG"
+
+# type: Plain text
+#~ msgid "base-config - Debian base system configuration"
+#~ msgstr "base-config - Configuration du syst�me Debian de base"
+
+# type: SH
+#~ msgid "SYNOPSIS"
+#~ msgstr "SYNOPSIS"
+
+# type: Plain text
+#~ msgid "B<base-config [new]>"
+#~ msgstr "B<base-config [new]>"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<base-config> is the program that was run when you first rebooted into "
+#~ "your newly installed debian system. It walks you through setting up the "
+#~ "system and downloading additional software, and so forth. The program can "
+#~ "be run at any later date to walk you through essentially the same process "
+#~ "again."
+#~ msgstr ""
+#~ "B<base-config> est le programme lanc� lors du premier red�marrage d'un "
+#~ "nouveau syst�me Debian. Il vous guide pas � pas dans la configuration du "
+#~ "syst�me, l'installation de nouveaux programmes, etc. Vous pourrez lancer "
+#~ "� nouveau ce programme plus tard si vous d�sirez modifier la "
+#~ "configuration de votre syst�me."
+
+# type: SH
+#~ msgid "IMPLEMENTATION"
+#~ msgstr "IMPL�MENTATION"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<base-config> generates a menu of choices from the contents of B</usr/"
+#~ "lib/base-config/>, and from debconf templates."
+#~ msgstr ""
+#~ "B<base-config> g�n�re un menu de choix � partir du contenu de B</usr/lib/"
+#~ "base-config/> et depuis les mod�les debconf."
+
+# type: Plain text
+#~ msgid ""
+#~ "The .mnu files in /usr/lib/base-config/ control whether the menu item "
+#~ "appears only on new installs (Only-New: true), whether debconf can "
+#~ "already be running when the item is run (Debconf: true), a numeric Order "
+#~ "controls placement in the menu. If a .mnu file contains \"Exit-Menu: true"
+#~ "\", then base-config will terminate after running that menu item. "
+#~ "Finally, a \"Changes-Menu: true\" line will make base-config rebuild the "
+#~ "menu after running the menu item."
+#~ msgstr ""
+#~ "Les fichiers .mnu dans /usr/lib/base-config/ permettent de sp�cifier si "
+#~ "un �l�ment de menu ne doit appara�tre que pour les nouvelles "
+#~ "installations (Only-New:true), si Debconf doit d�j� fonctionner lors du "
+#~ "lancement de l'�l�ment (Debconf: true), et un champ num�rique contr�le la "
+#~ "position dans le menu. Si un fichier .mnu contient ��Exit-Menu: true��, "
+#~ "base-config se terminera apr�s l'ex�cution de cet �l�ment. Enfin, une "
+#~ "ligne ��Changes-Menu: true�� fera que base-config reconstruira le menu "
+#~ "apr�s l'ex�cution de l'�l�ment."
+
+# type: Plain text
+#~ msgid ""
+#~ "The .tst files in /usr/lib/base-config/ are run when base-config builds "
+#~ "the menu and must return true for that menu item to appear on the menu."
+#~ msgstr ""
+#~ "Les fichiers .tst dans /usr/lib/base-config/ sont lanc�s lorsque base-"
+#~ "config construit le menu et doivent renvoyer un r�sultat nul pour que cet "
+#~ "�l�ment apparaisse dans le menu."
+
+# type: Plain text
+#~ msgid ""
+#~ "The menu items are taken from debconf, by looking for items in the "
+#~ "debconf database named base-config/menu/whatever."
+#~ msgstr ""
+#~ "Les �l�ments du menu sont tir�s de Debconf, en cherchant les �l�ments "
+#~ "dans la base de donn�es de Debconf appel�s base-config/menu/quelque_chose"
+
+# type: Plain text
+#~ msgid ""
+#~ "When a menu item is selected, the corresponding program, in /usr/lib/base-"
+#~ "config is run. If this is a fresh install onto a new debian system, the "
+#~ "program receives \"new\" as its first argument."
+#~ msgstr ""
+#~ "Lorsqu'un �l�ment du menu est s�lectionn�, le programme correspondant "
+#~ "dans /usr/lib/base-config est ex�cut�. S'il s'agit d'une installation sur "
+#~ "un nouveau syst�me, le programme re�oit ��new�� en tant que premier "
+#~ "argument."
+
+# type: Plain text
+#~ msgid ""
+#~ "B<base-config> checks the return codes of each of the programs. If a "
+#~ "program returns nonzero, the main menu is displayed (this may involve "
+#~ "lowering the debconf priority)."
+#~ msgstr ""
+#~ "B<base-config> v�rifie les codes de retour des programmes. Si un "
+#~ "programme retourne une valeur non nulle, le menu principal sera affich� "
+#~ "(ceci peut conduire � une diminution de la priorit� Debconf)"
+
+# type: Plain text
+#~ msgid ""
+#~ "Generally the user is advanced down the menu from item to item as each "
+#~ "succeeds. If a menu item needs to jump back to a previous item in the "
+#~ "menu, or skip over a subsequent item, it can write the name of the next "
+#~ "menu item to show to the file \"jump-to\" in the current directory."
+#~ msgstr ""
+#~ "G�n�ralement, au fur et � mesure que les �l�ments se terminent avec "
+#~ "succ�s, les �l�ments suivants du menu sont pr�s�lectionn�s. Si un �l�ment "
+#~ "a besoin d'un retour � un �l�ment pr�c�dent du menu, ou d'un saut � un "
+#~ "autre �l�ment, il peut �crire le nom de l'�l�ment � pr�s�lectionner "
+#~ "ensuite dans le fichier ��jump-to�� du r�pertoire courant."
+
+# type: Plain text
+#~ msgid ""
+#~ "Every base-config run is logged to B</var/log/base-config.log>.  B</var/"
+#~ "log/base-config.timings> contains timing information to go with the log. "
+#~ "This allows replays of base-config runs using the B<replay>(1)  utility."
+#~ msgstr ""
+#~ "Chaque ex�cution de base-config est consign�e dans B</var/log/installer."
+#~ "log>. Les informations temporelles du journal sont consign�es dans B</var/"
+#~ "log/installer.timings>, ceci permet de relancer base-config en utilisant "
+#~ "B<replay>(1)B<.>"
+
+# type: Plain text
+#~ msgid ""
+#~ "B</var/log/installer/cdebconf>, if it exists, is used by B<base-config> "
+#~ "on new installs to get values from the debian-installer first stage "
+#~ "install."
+#~ msgstr ""
+#~ "Le fichier B</var/log/debian-installer/cdebconf>, s'il existe, est "
+#~ "utilis� par B<base-config> pendant les nouvelles installations pour "
+#~ "obtenir les valeurs produites par la premi�re �tape de debian-installer"
+
+# type: Plain text
+#~ msgid ""
+#~ "Other packages can drop files into B</usr/lib/base-config/>, and add menu "
+#~ "titles in debconf, and they will be added to the menu. It is very "
+#~ "strongly encouraged that any such programs communicate with the user "
+#~ "entirely via debconf, so that the base configuration maintains a "
+#~ "consistent and professional look."
+#~ msgstr ""
+#~ "D'autres paquets peuvent ins�rer des programmes dans B</usr/lib/base-"
+#~ "config/> et ajouter des �l�ments de menu � debconf�; ils seront alors "
+#~ "ajout�s au menu. Afin de conserver l'homog�n�it� et l'aspect "
+#~ "professionnel du processus d'installation, il est fortement conseill� que "
+#~ "la communication entre ces paquets et l'utilisateur se fasse "
+#~ "exclusivement par debconf."
+
+# type: Plain text
+#~ msgid ""
+#~ "Another useful thing for custom distributions is /usr/share/base-config/"
+#~ "debconf-seed. If that directory exists, every file in it will be loaded "
+#~ "into the debconf database using B<debconf-set-selections>(1)"
+#~ msgstr ""
+#~ "Un autre r�pertoire int�ressant pour les distributions personnalis�es "
+#~ "est /usr/share/base-config/debconf-seed. Si ce r�pertoire existe, tout "
+#~ "son contenu sera charg� dans la base de donn�es debconf � l'aide de "
+#~ "B<debconf-set-selections>(1)"
+
+# type: Plain text
+#~ msgid ""
+#~ "If the file /var/log/installer/debconf-seed is created by the debian-"
+#~ "installer, it will also be loaded into the debconf database."
+#~ msgstr ""
+#~ "Si le fichier /var/log/debian-installer/debconf-seed�est cr�� par "
+#~ "l'installateur Debian, il sera �galement charg� dans la base de donn�es "
+#~ "debconf"
+
+# type: SH
+#~ msgid "ENVIRONMENT"
+#~ msgstr "ENVIRONNEMENT"
+
+# type: Plain text
+#~ msgid ""
+#~ "The following environment variables influence B<base-config>.  These "
+#~ "variables may be set at run time, or for new installs, may be passed to "
+#~ "the kernel at the B<lilo>(8)  (or other bootloader) command line. Consult "
+#~ "your boot loader's documentation for details. For example, lilo can be "
+#~ "booted with something like \"linux DEBIAN_FRONTEND=readline\"."
+#~ msgstr ""
+#~ "base-config tient compte des variables d'environnement suivantes. Ces "
+#~ "variables peuvent �tre d�finies dynamiquement, pendant l'installation, ou "
+#~ "bien encore pass�es en param�tre au noyau sur la ligne de commande de "
+#~ "B<lilo>(8) (ou d'un autre chargeur de d�marrage). Consultez la "
+#~ "documentation de votre chargeur de d�marrage pour plus d'informations. "
+#~ "Par exemple, lilo peut �tre lanc� avec un param�tre tel que ��linux "
+#~ "DEBIAN_FRONTEND=readline��."
+
+# type: TP
+#~ msgid "B<DEBIAN_FRONTEND>"
+#~ msgstr "B<DEBIAN_FRONTEND>"
+
+# type: TP
+#~ msgid "B<DEBIAN_PRIORITY>"
+#~ msgstr "B<DEBIAN_PRIORITY>"
+
+# type: TP
+#~ msgid "B<DEBCONF_DEBUG>"
+#~ msgstr "B<DEBCONF_DEBUG>"
+
+# type: TP
+#~ msgid "B<DEBCONF_TERSE>"
+#~ msgstr "B<DEBCONF_TERSE>"
+
+# type: Plain text
+#~ msgid "Control various things about B<debconf>(7)"
+#~ msgstr "Contr�le de nombreux aspects de <debconf >(7)"
+
+# type: SH
+#~ msgid "AUTHOR"
+#~ msgstr "AUTEUR"
+
+# type: Plain text
+#~ msgid "Joey Hess E<lt>joeyh@debian.orgE<gt>"
+#~ msgstr "Joey Hess E<lt>joey@debian.orgE<gt>"
+
+# type: TH
+#~ msgid "TERMWRAP"
+#~ msgstr "TERMWRAP"
+
+# type: Plain text
+#~ msgid "termwrap - terminal wrapper"
+#~ msgstr "termwrap - encapsulateur de terminal"
+
+# type: Plain text
+#~ msgid "B<termwrap [-nnt] command [args]>"
+#~ msgstr "B<termwrap [-nnt] commande [arguments]>"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<termwrap> is used to execute B<base-config>(8)  on newly installed "
+#~ "Debian systems. It examines the environment, taking note of locale "
+#~ "settings, and what type of console is available, and runs an appropriate "
+#~ "terminal program. For example, at the Linux console and in a Japanese "
+#~ "locale, it runs jfterm. The specified command is run inside the terminal "
+#~ "program (if any)."
+#~ msgstr ""
+#~ "B<termwrap> est utilis� pour ex�cuter B<base-config> (8) sur un syst�me "
+#~ "Debian nouvellement install�. Il examine l'environnement, prenant en "
+#~ "compte les r�glages de param�tres locaux et le type de console "
+#~ "disponible, et lance un programme de terminal ad�quat. Par exemple, pour "
+#~ "une console Linux et des param�tres locaux japonais, il lancera jfterm. "
+#~ "La commande indiqu�e est alors lanc�e dans le programme de terminal, s'il "
+#~ "y en a un."
+
+# type: SH
+#~ msgid "OPTIONS"
+#~ msgstr "OPTIONS"
+
+# type: TP
+#~ msgid "I<-nnt>"
+#~ msgstr "I<-nnt>"
+
+# type: Plain text
+#~ msgid "Don't run another terminal."
+#~ msgstr "Ne pas lancer d'autre terminal"
+
+# type: TH
+#~ msgid "APT-SETUP"
+#~ msgstr "APT-SETUP"
+
+# type: Plain text
+#~ msgid "apt-setup - add apt download sources"
+#~ msgstr "apt-setup - permet d'ajouter des sources de t�l�chargement apt"
+
+# type: Plain text
+#~ msgid "B<apt-setup [probe] [-N]>"
+#~ msgstr "B<apt-setup [probe] [-N]>"
+
+# type: Plain text
+#~ msgid ""
+#~ "B<apt-setup> is an interactive program that simplifies adding sources to "
+#~ "apt's sources.list. It knows about all the major debian mirrors and can "
+#~ "help you select one. It can even use B<apt-cdrom>(8)  to scan CDs."
+#~ msgstr ""
+#~ "B<apt-setup> est un programme interactif simplifiant l'ajout de sources "
+#~ "au fichier sources.list. Il conna�t tous les principaux miroirs Debian et "
+#~ "peut vous aider � en choisir un. Il peut m�me utiliser B<apt-cdrom>(8) "
+#~ "pour parcourir des c�d�roms."
+
+# type: TP
+#~ msgid "I<probe>"
+#~ msgstr "I<��probe��>"
+
+# type: Plain text
+#~ msgid ""
+#~ "By default no probing of CDs is done. Passing \"probe\" as the first "
+#~ "argument to this program will make it probe for a CD in the drive on "
+#~ "startup and add it to sources.list. This is useful on initial debian "
+#~ "installs, to minimize interaction with the user."
+#~ msgstr ""
+#~ "Par d�faut, aucune d�tection des CD n'est faite. Si vous passez ��probe�� "
+#~ "comme premier argument � ce programme, il effectuera une d�tection du CD "
+#~ "dans le lecteur au d�marrage et l'ajoutera au sources.list. Ceci est "
+#~ "utile lors des installations initiales de Debian, afin de minimiser "
+#~ "l'interaction avec l'utilisateur."
+
+# type: TP
+#~ msgid "I<-N>"
+#~ msgstr "I<-N>"
+
+# type: Plain text
+#~ msgid ""
+#~ "Indicates that this is a new install.  This parameter allows apt-setup to "
+#~ "run in noninteractive mode if its debconf questions have been preseeded."
+#~ msgstr ""
+#~ "Indique qu'il s'agit d'une nouvelle installation. Ce param�tre permet � "
+#~ "apt-setup de fonctionner en mode non-interactif si les r�ponses � ses "
+#~ "questions debconf ont �t� pr�charg�es."
+
+# type: Plain text
+#~ msgid "Joey Hess E<lt>joey@kitenet.netE<gt>"
+#~ msgstr "Joey Hess E<lt>joey@kitenet.netE<gt>"
--- eglibc-2.13.orig/debian/local/manpages/es/validlocale.es.8
+++ eglibc-2.13/debian/local/manpages/es/validlocale.es.8
@@ -0,0 +1,54 @@
+.\" This file was generated with po4a. Translate the source file.
+.\" 
+.TH validlocale 8 0.1 "Petter Reinholdtsen" ""
+.SH NOMBRE
+.LP
+validlocale \- Comprueba si la opci�n de localizaci�n dada est� disponible
+.SH SINTAXIS
+.LP
+validlocale <\fIopci�n_de_localizaci�n\fP>
+.SH DESCRIPCI�N
+.LP
+Comprueba si la opci�n de localizaci�n dada como argumento es v�lida. Si no 
+lo es muestra en la stdout (salida est�ndar) la cadena de caracteres que se 
+necesita a�adir a /etc/locale.gen para que locale\-gen genere esa opci�n de 
+localizaci�n (si es que existe).
+.SH FICHEROS
+.LP
+\fI/usr/sbin/validlocale\fP
+.br
+\fI/usr/share/i18n/SUPPORTED\fP
+.SH "VARIABLES DE ENTORNO"
+.LP
+.TP  
+\fBDEFAULTCHARSET\fP
+El juego de caracteres que asume en caso de que la opci�n de localizaci�n 
+dada no est� entre la lista de opciones de localizaci�n soportadas.
+.SH EJEMPLOS
+.LP
+Si usted proporciona una opci�n de localizaci�n v�lida como par�metro, 
+muestra una cadena de caracteres especific�ndolo en stderr (salida de 
+errores est�ndar):
+.LP
+.IP
+% validlocale C
+.br
+locale 'C' valid and available
+.LP
+Cuando se proporcione una inv�lida (no ha sido generada o no existe), 
+muestra una cadena de caracteres en stderr diciendo que es inv�lida, y otra 
+a stdout con la cadena de caracteres que se necesita a�adir a 
+/etc/locale.gen para que se genere:
+.LP
+.IP
+% validlocale de_AU@euro
+.br
+locale 'de_AT@euro' not available
+.br
+de_AT@euro ISO\-8859\-15
+.SH AUTORES
+.LP
+Petter Reinholdtsen <pere@hungry.com>
+.SH "V�ASE ADEM�S"
+.LP
+locale\-gen(8), localedef(1), locale(1)
--- eglibc-2.13.orig/debian/local/manpages/es/addendum.es
+++ eglibc-2.13/debian/local/manpages/es/addendum.es
@@ -0,0 +1,3 @@
+
+.SH TRADUCTOR
+Traducci�n de Rub�n Porras Campo <debian-l10n-spanish@lists.debian.org>
--- eglibc-2.13.orig/debian/local/manpages/id/addendum.id
+++ eglibc-2.13/debian/local/manpages/id/addendum.id
@@ -0,0 +1,3 @@
+
+.SH PENERJEMAH
+Parlin Imanuel Toh <debian-l10n-id@gurame.fisika.ui.ac.id>
--- eglibc-2.13.orig/debian/local/memcpy-wrapper/memcpy-preload.c
+++ eglibc-2.13/debian/local/memcpy-wrapper/memcpy-preload.c
@@ -0,0 +1,61 @@
+/* Copyright (C) 2011, Aurelien Jarno <aurelien@aurel32.net>
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <dlfcn.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <syslog.h>
+#include <sys/time.h>
+
+void *memcpy(void *dst, const void *src, size_t n)
+{
+#ifndef NOLOG
+    uintptr_t usrc, udst;
+
+    /* Convert to unsigned as arithmetic on pointer is undefined */ 
+    udst = (uintptr_t) dst;
+    usrc = (uintptr_t) src;
+
+    /* Check if source and destination overlap */
+    if (((udst < usrc) && ((udst + n) > usrc)) ||
+        ((usrc < udst) && ((usrc + n) > udst))) {
+
+        static time_t lastlog = -1;
+        struct timeval tv;
+
+        /* gettimeofday() is not expensive for the conditions we target in 
+         * the Debian package (kernel >= 2.6.26, x86-64 architecture), this
+         * might need to be changed if this wrapper is later needed with 
+         * different conditions */
+        gettimeofday(&tv, NULL);
+
+        /* Don't spam syslog, limit to (roughly) one log entry per second. */
+        if (tv.tv_sec > lastlog) {
+            lastlog = tv.tv_sec;
+            syslog(LOG_WARNING | LOG_USER, 
+                   "source and destination overlap in memcpy() at ip %p",
+		   __builtin_return_address(0));
+        }
+    }
+#endif 
+
+    /* Call memmove() instead of memcpy() */
+    return memmove(dst, src, n);
+}
+
--- eglibc-2.13.orig/debian/local/memcpy-wrapper/README
+++ eglibc-2.13/debian/local/memcpy-wrapper/README
@@ -0,0 +1,18 @@
+This small wrapper has for goal to workaround issues with some programs
+calling memcpy() with source and destination overlap, causing issues on
+recent GNU libc versions, which might copy memory backward on some 
+x86-64 CPU. For more details, see
+    http://sourceware.org/bugzilla/show_bug.cgi?id=12518
+
+The wrapper is built in two versions, memcpy-preload.so for "production"
+usage, which just fix the wrong call by using memmove, and 
+memcpy-syslog-preload.so for "debugging" purposes which also logs the 
+issue through syslog (rate limited).
+
+To use them for a specific binary, you can use the LD_PRELOAD 
+environment variable:
+    LD_PRELOAD=./memcpy-preload.so /path/to/binary
+    LD_PRELOAD=./memcpy-syslog-preload.so /path/to/binary
+
+For system-wide usage, it is possible to add this wrapper in
+/etc/ld.so.preload.
--- eglibc-2.13.orig/debian/local/memcpy-wrapper/Makefile
+++ eglibc-2.13/debian/local/memcpy-wrapper/Makefile
@@ -0,0 +1,11 @@
+all: memcpy-preload.so memcpy-syslog-preload.so
+
+clean:
+	rm -f memcpy-preload.so memcpy-syslog-preload.so
+
+memcpy-preload.so: memcpy-preload.c 
+	$(CC) -D_GNU_SOURCE -DNOLOG -O2 -Wall -fPIC -shared -o memcpy-preload.so memcpy-preload.c
+
+memcpy-syslog-preload.so: memcpy-preload.c 
+	$(CC) -D_GNU_SOURCE -O2 -Wall -fPIC -shared -o memcpy-syslog-preload.so memcpy-preload.c
+
--- eglibc-2.13.orig/debian/rules.d/tarball.mk
+++ eglibc-2.13/debian/rules.d/tarball.mk
@@ -0,0 +1,28 @@
+EGLIBC_SVN = svn://svn.eglibc.org
+EGLIBC_BRANCH = branches/eglibc-$(shell echo $(EGLIBC_VERSION) | sed -e 's/\([0-9]\+\)\.\([0-9]\+\).*/\1_\2/')
+EGLIBC_CHECKOUT = eglibc-checkout
+EGLIBC_DIR = eglibc-$(EGLIBC_VERSION)
+DEB_ORIG = ../eglibc_$(EGLIBC_VERSION).orig.tar.gz
+DEB_ORIG_REVISION = $(shell cat .svn-revision 2> /dev/null)
+SVN_UPDATES_DIFF = debian/patches/svn-updates.diff
+
+get-orig-source: $(DEB_ORIG)
+$(DEB_ORIG):
+	dh_testdir
+	svn co $(EGLIBC_SVN)/$(EGLIBC_BRANCH) $(EGLIBC_CHECKOUT)
+	svn export $(EGLIBC_CHECKOUT)/libc $(EGLIBC_DIR)
+	svn export $(EGLIBC_CHECKOUT)/linuxthreads/linuxthreads $(EGLIBC_DIR)/linuxthreads
+	svn export $(EGLIBC_CHECKOUT)/linuxthreads/linuxthreads_db $(EGLIBC_DIR)/linuxthreads_db
+	svn export $(EGLIBC_CHECKOUT)/ports $(EGLIBC_DIR)/ports
+	svn status -v $(EGLIBC_CHECKOUT)/libc/ChangeLog | sed '1,1s/^ \+\([0-9]\+\).*/\1/g' > $(EGLIBC_DIR)/.svn-revision
+	rm -fr $(EGLIBC_DIR)/manual
+	tar -zcf $(DEB_ORIG) $(EGLIBC_DIR)
+	rm -rf $(EGLIBC_DIR) $(EGLIBC_CHECKOUT)
+
+update-from-upstream-svn:
+	dh_testdir
+	test -n "$(DEB_ORIG_REVISION)"
+	echo "SVN update of $(EGLIBC_SVN)/$(EGLIBC_BRANCH) from revision $(DEB_ORIG_REVISION)" > $(SVN_UPDATES_DIFF)
+	echo "" >> $(SVN_UPDATES_DIFF)
+	svn diff -r$(DEB_ORIG_REVISION) $(EGLIBC_SVN)/$(EGLIBC_BRANCH)/libc | filterdiff --addoldprefix=a/ --addnewprefix=b/ -x 'manual/*' >> $(SVN_UPDATES_DIFF)
+	svn diff -r$(DEB_ORIG_REVISION) $(EGLIBC_SVN)/$(EGLIBC_BRANCH)/ports | filterdiff --addoldprefix=a/ports/ --addnewprefix=b/ports/ >> $(SVN_UPDATES_DIFF)
--- eglibc-2.13.orig/debian/rules.d/stage1.mk
+++ eglibc-2.13/debian/rules.d/stage1.mk
@@ -0,0 +1,73 @@
+## This reuses various macros from the debian/rules.d/build.mk file
+
+ifeq ($(DEB_STAGE),stage1)
+
+override EGLIBC_PASSES = libc
+override DEB_ARCH_REGULAR_PACKAGES = $(libc)-dev
+override DEB_INDEP_REGULAR_PACKAGES =
+override DEB_UDEB_PACKAGES =
+
+## Development libraries we need to fake
+stage1_libfake.so :=		\
+	libc.so
+
+stage1_libfake.a :=		\
+	libanl.a		\
+	libBrokenLocale.a	\
+	libbsd-compat.a		\
+	libc.a			\
+	libc_nonshared.a	\
+	libcrypt.a		\
+	libdl.a			\
+	libg.a			\
+	libieee.a		\
+	libm.a			\
+	libmcheck.a		\
+	libnsl.a		\
+	libpthread.a		\
+	libpthread_nonshared.a	\
+	libresolv.a		\
+	librpcsvc.a		\
+	librt.a			\
+	libutil.a		\
+
+$(stamp)build_libc: $(stamp)configure_libc
+	@echo Building $(curpass)
+	@## Build the crtX.o init routines
+	$(call logme, -a $(log_build), $(MAKE) -C $(DEB_BUILDDIR) $(NJOBS) csu/subdir_lib)
+	$(call logme, -a $(log_build), $(AR) qcs $(DEB_BUILDDIR)/libfake.a)
+	$(call logme, -a $(log_build), $(CC) -nostdlib -nostartfiles -shared \
+				-o $(DEB_BUILDDIR)/libfake.so $(DEB_BUILDDIR)/libfake.a)
+	$(call logme, -a $(log_build), echo "---------------" ; echo -n "Build ended: " ; date --rfc-2822)
+	touch $@
+
+$(stamp)check_libc: $(stamp)build_libc
+	@echo Nothing to test for $(curpass)
+	touch $@
+
+$(stamp)install_libc: DESTDIR=$(CURDIR)/debian/tmp-$(curpass)
+$(stamp)install_libc: $(stamp)check_libc
+	@echo Installing $(curpass)
+	rm -rf $(CURDIR)/debian/tmp-$(curpass)
+	## These libc/ld-linux binaries are total garbage, but they allow
+	## a subsequent stage2 GCC build to succeed.
+	install -d $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)
+	for lib_a in $(stage1_libfake.a); do \
+		install -T $(DEB_BUILDDIR)/libfake.a $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/$$lib_a; \
+	done
+	for lib_so in $(stage1_libfake.so); do \
+		install -T $(DEB_BUILDDIR)/libfake.so $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/$$lib_so; \
+	done
+	$(MAKE) -C $(DEB_BUILDDIR) install_root=$(DESTDIR) install-bootstrap-headers=yes \
+		csu/subdir_install install-headers
+	mkdir -p $(DESTDIR)/usr/include/$(DEB_HOST_MULTIARCH)
+	mv $(DESTDIR)/usr/include/bits          $(DESTDIR)/usr/include/$(DEB_HOST_MULTIARCH)
+	mv $(DESTDIR)/usr/include/gnu           $(DESTDIR)/usr/include/$(DEB_HOST_MULTIARCH)
+	mv $(DESTDIR)/usr/include/sys           $(DESTDIR)/usr/include/$(DEB_HOST_MULTIARCH)
+	mv $(DESTDIR)/usr/include/fpu_control.h $(DESTDIR)/usr/include/$(DEB_HOST_MULTIARCH)
+	mv $(DESTDIR)/usr/include/a.out.h	$(DESTDIR)/usr/include/$(DEB_HOST_MULTIARCH)
+	mv $(DESTDIR)/usr/include/ieee754.h	$(DESTDIR)/usr/include/$(DEB_HOST_MULTIARCH)
+	$(call xx,extra_install)
+	touch $@
+
+endif
--- eglibc-2.13.orig/debian/rules.d/quilt.mk
+++ eglibc-2.13/debian/rules.d/quilt.mk
@@ -0,0 +1,51 @@
+# Implements the patch and unpatch targets, called when building packages.
+
+# -*- Makefile -*-, you silly Emacs!
+# vim: set ft=make:
+
+DEBQUILTRC = debian/quiltrc
+QUILTOPT   = --quiltrc $(DEBQUILTRC)
+QUILT      = quilt $(QUILTOPT)
+
+patch: $(stamp)patch
+$(stamp)patch:
+	@if $(QUILT) next >/dev/null 2>&1; then \
+	  echo "Applying patches... "; \
+	  $(QUILT) push -a -v ; \
+	fi
+	@if test -r debian/patches/series.$(DEB_HOST_ARCH); then \
+	  pc=".pc.$(DEB_HOST_ARCH)"; \
+	  mkdir -p "$$pc"; \
+	  ln -sf ../debian/patches/series.$(DEB_HOST_ARCH) $$pc/series; \
+	  QUILT_PC="$$pc" $(QUILT) upgrade || true; \
+	  if QUILT_PC="$$pc" $(QUILT) next >/dev/null 2>&1; then \
+	    echo "Applying architecture specific patches... "; \
+	    QUILT_PC="$$pc" $(QUILT) push -a -v ; \
+	  fi ; \
+	fi
+	touch $@
+
+unpatch:
+	@if test -r debian/patches/series.$(DEB_HOST_ARCH); then \
+	  pc=".pc.$(DEB_HOST_ARCH)"; \
+	  QUILT_PC="$$pc" $(QUILT) upgrade || true; \
+	  if QUILT_PC="$$pc" $(QUILT) previous >/dev/null 2>&1; then \
+	    echo "Unapplying architecture specific patches..."; \
+	    QUILT_PC="$$pc" $(QUILT) pop -a -v ; \
+	  fi ; \
+	  rm -rf $$pc ; \
+	fi
+	@if $(QUILT) previous >/dev/null 2>&1; then \
+	  echo "Unapplying patches..." ; \
+	  $(QUILT) pop -a -v ; \
+	fi ; \
+	rm -rf .pc
+	rm -f $(stamp)patch
+
+refresh: unpatch
+	@while $(QUILT) next ; do \
+	  $(QUILT) push ; \
+	  $(QUILT) refresh ; \
+	done ; \
+	$(QUILT) pop -a
+
--- eglibc-2.13.orig/debian/rules.d/debhelper.mk
+++ eglibc-2.13/debian/rules.d/debhelper.mk
@@ -0,0 +1,254 @@
+# This is so horribly wrong.  libc-pic does a whole pile of gratuitous
+# renames.  There's very little we can do for now.  Maybe after
+# Sarge releases we can consider breaking packages, but certainly not now.
+
+$(stamp)binaryinst_$(libc)-pic:: debhelper
+	@echo Running special kludge for $(libc)-pic
+	dh_testroot
+	dh_installdirs -p$(curpass)
+	install --mode=0644 build-tree/$(DEB_HOST_ARCH)-libc/libc_pic.a debian/$(libc)-pic/$(libdir)/.
+	install --mode=0644 build-tree/$(DEB_HOST_ARCH)-libc/libc.map debian/$(libc)-pic/$(libdir)/libc_pic.map
+	install --mode=0644 build-tree/$(DEB_HOST_ARCH)-libc/elf/soinit.os debian/$(libc)-pic/$(libdir)/libc_pic/soinit.o
+	install --mode=0644 build-tree/$(DEB_HOST_ARCH)-libc/elf/sofini.os debian/$(libc)-pic/$(libdir)/libc_pic/sofini.o
+
+	install --mode=0644 build-tree/$(DEB_HOST_ARCH)-libc/math/libm_pic.a debian/$(libc)-pic/$(libdir)/.
+	install --mode=0644 build-tree/$(DEB_HOST_ARCH)-libc/libm.map debian/$(libc)-pic/$(libdir)/libm_pic.map
+	install --mode=0644 build-tree/$(DEB_HOST_ARCH)-libc/resolv/libresolv_pic.a debian/$(libc)-pic/$(libdir)/.
+	install --mode=0644 build-tree/$(DEB_HOST_ARCH)-libc/libresolv.map debian/$(libc)-pic/$(libdir)/libresolv_pic.map
+
+# Some per-package extra files to install.
+define libc-bin_extra_debhelper_pkg_install
+  	# dh_installmanpages thinks that .so is a language.
+ 	install --mode=0644 debian/local/manpages/ld.so.8 debian/libc-bin/usr/share/man/man8/ld.so.8
+endef
+
+# Should each of these have per-package options?
+
+$(patsubst %,binaryinst_%,$(DEB_ARCH_REGULAR_PACKAGES) $(DEB_INDEP_REGULAR_PACKAGES)) :: binaryinst_% : $(stamp)binaryinst_%
+
+# Make sure the debug packages are built last, since other packages may add
+# files to them.
+debug-packages = $(filter %-dbg,$(DEB_ARCH_REGULAR_PACKAGES))
+non-debug-packages = $(filter-out %-dbg,$(DEB_ARCH_REGULAR_PACKAGES))
+$(patsubst %,$(stamp)binaryinst_%,$(debug-packages)):: $(patsubst %,$(stamp)binaryinst_%,$(non-debug-packages))
+
+$(patsubst %,$(stamp)binaryinst_%,$(DEB_ARCH_REGULAR_PACKAGES) $(DEB_INDEP_REGULAR_PACKAGES)):: $(patsubst %,$(stamp)install_%,$(EGLIBC_PASSES)) debhelper
+	@echo Running debhelper for $(curpass)
+	dh_testroot
+	dh_installdirs -p$(curpass)
+	dh_install -p$(curpass)
+	dh_installman -p$(curpass)
+	dh_installinfo -p$(curpass)
+	dh_installdebconf -p$(curpass)
+	if [ $(curpass) = glibc-doc ] ; then \
+		dh_installchangelogs -p$(curpass) ; \
+	else \
+		dh_installchangelogs -p$(curpass) debian/changelog.upstream ; \
+	fi
+	dh_installinit -p$(curpass)
+	dh_installdocs -p$(curpass) 
+	dh_lintian -p $(curpass)
+	dh_link -p$(curpass)
+	dh_bugfiles -p$(curpass)
+
+	# extra_debhelper_pkg_install is used for debhelper.mk only.
+	# when you want to install extra packages, use extra_pkg_install.
+	$(call xx,extra_debhelper_pkg_install)
+	$(call xx,extra_pkg_install)
+
+ifeq ($(filter nostrip,$(DEB_BUILD_OPTIONS)),)
+	# libpthread must be stripped specially; GDB needs the
+	# non-dynamic symbol table in order to load the thread
+	# debugging library.  We keep a full copy of the symbol
+	# table in libc6-dbg but basic thread debugging should
+	# work even without that package installed.
+
+	# strip *.o files as dh_strip does not (yet?) do it.
+	if test "$(NOSTRIP_$(curpass))" != 1; then				\
+	  if test "$(NODEBUG_$(curpass))" != 1; then				\
+	    dh_strip -p$(curpass) -Xlibpthread --dbg-package=$(libc)-dbg;	\
+	    (cd debian/$(curpass);						\
+	      find . -name libpthread-\*.so -exec objcopy			\
+	        --only-keep-debug '{}' ../$(libc)-dbg/usr/lib/debug/'{}'	\
+	        ';' || true;							\
+	      find . -name libpthread-\*.so -exec objcopy			\
+	        --add-gnu-debuglink=../$(libc)-dbg/usr/lib/debug/'{}'		\
+	        '{}' ';' || true);						\
+	    find debian/$(curpass) -name libpthread-\*.so -exec			\
+	      strip --strip-debug --remove-section=.comment			\
+	      --remove-section=.note '{}' ';' || true;				\
+	    									\
+	    (cd debian/$(curpass);						\
+	      find . -name \*crt\*.o -exec objcopy				\
+	        --only-keep-debug '{}' ../$(libc)-dbg/usr/lib/debug/'{}'	\
+	        ';' || true;							\
+	      find . -name \*crt\*.o -exec objcopy				\
+	        --add-gnu-debuglink=../$(libc)-dbg/usr/lib/debug/'{}'		\
+	        '{}' ';' || true);						\
+	    find debian/$(curpass) -name \*crt\*.o -exec			\
+	      strip --strip-debug --remove-section=.comment			\
+	      --remove-section=.note '{}' ';' || true;				\
+	  else									\
+	    dh_strip -p$(curpass) -Xlibpthread;					\
+	  fi									\
+	fi
+endif
+
+	dh_compress -p$(curpass)
+	dh_fixperms -p$(curpass) -Xpt_chown
+	# Use this instead of -X to dh_fixperms so that we can use
+	# an unescaped regular expression.  ld.so must be executable;
+	# libc.so and NPTL's libpthread.so print useful version
+	# information when executed.
+	find debian/$(curpass) -type f \( -regex '.*/ld.*so' \
+		-o -regex '.*/libpthread-.*so' \
+		-o -regex '.*/libc-.*so' \) \
+		-exec chmod a+x '{}' ';'
+	dh_makeshlibs -X/usr/lib/debug -p$(curpass) -V "$(call xx,shlib_dep)"
+	# Add relevant udeb: lines in shlibs files
+	chmod a+x debian/shlibs-add-udebs
+	./debian/shlibs-add-udebs $(curpass)
+
+	dh_installdeb -p$(curpass)
+	dh_shlibdeps -p$(curpass)
+	dh_gencontrol -p$(curpass)
+	if [ $(curpass) = nscd ] ; then \
+		sed -i -e "s/\(Depends:.*libc[0-9.]\+\)-[a-z0-9]\+/\1/" debian/nscd/DEBIAN/control ; \
+	fi
+	dh_md5sums -p$(curpass)
+
+	# We adjust the compression format depending on the package:
+	# - libc*-dbg and locales-all contains highly compressible data
+	# - other packages use the default gzip format
+	case $(curpass) in \
+	libc*-dbg | locales-all) \
+		dh_builddeb -p$(curpass) -- -Zxz -z7 ;; \
+	*) \
+		dh_builddeb -p$(curpass) ;; \
+	esac
+
+	touch $@
+
+$(patsubst %,binaryinst_%,$(DEB_UDEB_PACKAGES)) :: binaryinst_% : $(stamp)binaryinst_%
+$(patsubst %,$(stamp)binaryinst_%,$(DEB_UDEB_PACKAGES)): debhelper $(patsubst %,$(stamp)install_%,$(EGLIBC_PASSES))
+	@echo Running debhelper for $(curpass)
+	dh_testroot
+	dh_installdirs -p$(curpass)
+	dh_install -p$(curpass)
+	dh_strip -p$(curpass)
+	
+	# when you want to install extra packages, use extra_pkg_install.
+	$(call xx,extra_pkg_install)
+
+	dh_compress -p$(curpass)
+	dh_fixperms -p$(curpass)
+	find debian/$(curpass) -type f \( -regex '.*/ld.*so' \
+		-o -regex '.*/libpthread-.*so' \
+		-o -regex '.*/libc-.*so' \) \
+		-exec chmod a+x '{}' ';'
+	dh_installdeb -p$(curpass)
+	# dh_shlibdeps -p$(curpass)
+	dh_gencontrol -p$(curpass)
+	dh_builddeb -p$(curpass)
+
+	touch $@
+
+debhelper: $(stamp)debhelper-common $(patsubst %,$(stamp)debhelper_%,$(EGLIBC_PASSES))
+$(stamp)debhelper-common: 
+	for x in `find debian/debhelper.in -maxdepth 1 -type f`; do \
+	  y=debian/`basename $$x`; \
+	  cp $$x $$y; \
+	  sed -e "s#BUILD-TREE#$(build-tree)#" -i $$y; \
+	  sed -e "s#LIBC#$(libc)#" -i $$y; \
+	  sed -e "s#EXIT_CHECK##" -i $$y; \
+	  sed -e "s#DEB_HOST_ARCH#$(DEB_HOST_ARCH)#" -i $$y; \
+	  sed -e "/NSS_CHECK/r debian/script.in/nsscheck.sh" -i $$y; \
+	  sed -e "/NOHWCAP/r debian/script.in/nohwcap.sh" -i $$y; \
+	  sed -e "s#CURRENT_VER#$(DEB_VERSION)#" -i $$y; \
+	  case $$y in \
+	    *.install) \
+	      sed -e "s/^#.*//" -i $$y ; \
+	      ;; \
+	  esac; \
+	done
+
+	# Substitute __PROVIDED_LOCALES__.
+	perl -i -pe 'BEGIN {undef $$/; open(IN, "debian/tmp-libc/usr/share/i18n/SUPPORTED"); $$j=<IN>;} s/__PROVIDED_LOCALES__/$$j/g;' debian/locales.config debian/locales.postinst
+
+	# Generate common substvars files.
+	echo "locale:Depends=$(shell perl debian/debver2localesdep.pl $(LOCALES_DEP_VER))" > tmp.substvars
+	echo "locale-compat:Depends=$(shell perl debian/debver2localesdep.pl $(LOCALES_COMPAT_VER))" >> tmp.substvars
+
+	for pkg in $(DEB_ARCH_REGULAR_PACKAGES) $(DEB_INDEP_REGULAR_PACKAGES) $(DEB_UDEB_PACKAGES); do \
+	  cp tmp.substvars debian/$$pkg.substvars; \
+	done
+	rm -f tmp.substvars
+
+	touch $@
+
+$(patsubst %,debhelper_%,$(EGLIBC_PASSES)) :: debhelper_% : $(stamp)debhelper_%
+$(stamp)debhelper_%: $(stamp)debhelper-common $(stamp)install_%
+	libdir=$(call xx,libdir) ; \
+	slibdir=$(call xx,slibdir) ; \
+	rtlddir=$(call xx,rtlddir) ; \
+	curpass=$(curpass) ; \
+	rtld_so=`LANG=C LC_ALL=C readelf -l debian/tmp-$$curpass/usr/bin/iconv | grep "interpreter" | sed -e 's/.*interpreter: \(.*\)]/\1/g'`; \
+	case "$$curpass:$$slibdir" in \
+	  libc:*) \
+	    templates="libc libc-dev libc-pic libc-prof libc-udeb libnss-dns-udeb libnss-files-udeb" \
+	    pass="" \
+	    suffix="" \
+	    ;; \
+	  *:/lib32 | *:/lib64) \
+	    templates="libc libc-dev" \
+	    pass="-alt" \
+	    suffix="-$(curpass)" \
+	    ;; \
+	  *:*) \
+	    templates="libc" \
+	    pass="-otherbuild" \
+	    suffix="-$(curpass)" \
+	    ;; \
+	esac ; \
+	for t in $$templates ; do \
+	  for s in debian/$$t$$pass.* ; do \
+	    t=`echo $$s | sed -e "s#libc\(.*\)$$pass#$(libc)\1$$suffix#"` ; \
+	    if [ "$$s" != "$$t" ] ; then \
+	      cp $$s $$t ; \
+	    fi ; \
+	    sed -e "s#TMPDIR#debian/tmp-$$curpass#g" -i $$t; \
+	    sed -e "s#RTLDDIR#$$rtlddir#g" -i $$t; \
+	    sed -e "s#SLIBDIR#$$slibdir#g" -i $$t; \
+	    sed -e "s#LIBDIR#$$libdir#g" -i $$t; \
+	    sed -e "s#FLAVOR#$$curpass#g" -i $$t; \
+	    sed -e "s#RTLD_SO#$$rtld_so#g" -i $$t ; \
+	  done ; \
+	done
+
+	touch $@
+
+clean::
+	dh_clean 
+
+	rm -f debian/*.install*
+	rm -f debian/*.install.*
+	rm -f debian/*.manpages
+	rm -f debian/*.links
+	rm -f debian/*.postinst
+	rm -f debian/*.preinst
+	rm -f debian/*.postinst
+	rm -f debian/*.prerm
+	rm -f debian/*.postrm
+	rm -f debian/*.info
+	rm -f debian/*.init
+	rm -f debian/*.config
+	rm -f debian/*.templates
+	rm -f debian/*.dirs
+	rm -f debian/*.docs
+	rm -f debian/*.doc-base
+	rm -f debian/*.generated
+	rm -f debian/*.lintian-overrides
+	rm -f debian/*.NEWS
+	rm -f debian/*.README.Debian
+
+	rm -f $(stamp)binaryinst*
--- eglibc-2.13.orig/debian/rules.d/control.mk
+++ eglibc-2.13/debian/rules.d/control.mk
@@ -0,0 +1,43 @@
+libc_packages := libc6 libc6.1 libc0.1 libc0.3
+libc0_1_archs := kfreebsd-amd64 kfreebsd-i386
+libc0_3_archs := hurd-i386
+libc6_archs   := amd64 arm armel armhf hppa i386 m32r m68k mips mipsel powerpc powerpcspe ppc64 sparc sparc64 s390 s390x sh4
+libc6_1_archs := alpha ia64
+
+control_deps := $(wildcard debian/control.in/*) $(addprefix debian/control.in/, $(libc_packages))
+
+$(patsubst %,debian/control.in/%,$(libc_packages)) :: debian/control.in/% : debian/control.in/libc debian/rules.d/control.mk
+	sed -e "s%@libc@%$*%g" \
+	    -e "s%@archs@%$($(subst .,_,$*)_archs)%g" \
+	    -e "s%@libc-dev-conflict@%$(foreach arch,$(filter-out $*,$(libc_packages)),$(arch)-dev,)%g" \
+	    < $< > $@
+
+debian/control: $(stamp)control
+$(stamp)control: debian/rules.d/control.mk $(control_deps)
+
+	# Check that all files end with a new line
+	set -e ; for i in debian/control.in/* ; do \
+		tail -n1 $$i | grep -q "^$$" ; \
+	done
+
+	cat debian/control.in/main		>  $@T
+	cat debian/control.in/libc6		>> $@T
+	cat debian/control.in/libc6.1		>> $@T
+	cat debian/control.in/libc0.3		>> $@T
+	cat debian/control.in/libc0.1		>> $@T
+	cat debian/control.in/i386		>> $@T
+	cat debian/control.in/sparc64		>> $@T
+	cat debian/control.in/s390 		>> $@T
+	cat debian/control.in/s390x		>> $@T
+	cat debian/control.in/amd64		>> $@T
+	cat debian/control.in/powerpc		>> $@T
+	cat debian/control.in/ppc64		>> $@T
+	cat debian/control.in/mipsn32		>> $@T
+	cat debian/control.in/mips64		>> $@T
+	cat debian/control.in/kfreebsd-i386	>> $@T
+	cat debian/control.in/opt		>> $@T
+	cat debian/control.in/libnss-dns-udeb	>> $@T
+	cat debian/control.in/libnss-files-udeb	>> $@T
+	sed -e 's%@libc@%$(libc)%g' < $@T > debian/control
+	rm $@T
+	touch $@
--- eglibc-2.13.orig/debian/rules.d/build.mk
+++ eglibc-2.13/debian/rules.d/build.mk
@@ -0,0 +1,243 @@
+# Because variables can be masked at anypoint by declaring
+# PASS_VAR, we need to call all variables as $(call xx,VAR)
+# This little bit of magic makes it possible:
+xx=$(if $($(curpass)_$(1)),$($(curpass)_$(1)),$($(1)))
+
+# We want to log output to a logfile but we also need to preserve the
+# return code of the command being run.
+# This little bit of magic makes it possible:
+# $(call logme, [-a] <log file>, <cmd>)
+define logme
+(exec 3>&1; exit `( ( ( $(2) ) 2>&1 3>&-; echo $$? >&4) | tee $(1) >&3) 4>&1`)
+endef
+
+
+$(patsubst %,mkbuilddir_%,$(EGLIBC_PASSES)) :: mkbuilddir_% : $(stamp)mkbuilddir_%
+$(stamp)mkbuilddir_%: $(stamp)patch $(KERNEL_HEADER_DIR)
+	@echo Making builddir for $(curpass)
+	test -d $(DEB_BUILDDIR) || mkdir -p $(DEB_BUILDDIR)
+	touch $@
+
+$(patsubst %,configure_%,$(EGLIBC_PASSES)) :: configure_% : $(stamp)configure_%
+$(stamp)configure_%: $(stamp)mkbuilddir_%
+	@echo Configuring $(curpass)
+	rm -f $(DEB_BUILDDIR)/configparms
+	echo "CC = $(call xx,CC)"		>> $(DEB_BUILDDIR)/configparms
+	echo "CXX = $(call xx,CXX)"		>> $(DEB_BUILDDIR)/configparms
+	echo "BUILD_CC = $(BUILD_CC)"		>> $(DEB_BUILDDIR)/configparms
+	echo "BUILD_CXX = $(BUILD_CXX)"		>> $(DEB_BUILDDIR)/configparms
+	echo "CFLAGS = $(HOST_CFLAGS)"		>> $(DEB_BUILDDIR)/configparms
+	echo "ASFLAGS = $(HOST_CFLAGS)"		>> $(DEB_BUILDDIR)/configparms
+	echo "BUILD_CFLAGS = $(BUILD_CFLAGS)" 	>> $(DEB_BUILDDIR)/configparms
+	echo "LDFLAGS = "		 	>> $(DEB_BUILDDIR)/configparms
+	echo "BASH := /bin/bash"		>> $(DEB_BUILDDIR)/configparms
+	echo "KSH := /bin/bash"			>> $(DEB_BUILDDIR)/configparms
+	echo "SHELL := /bin/bash"		>> $(DEB_BUILDDIR)/configparms
+	echo "LIBGD = no"			>> $(DEB_BUILDDIR)/configparms
+	echo "have-fpie = $(fpie)"              >> $(DEB_BUILDDIR)/configparms
+	echo "bindir = $(bindir)"		>> $(DEB_BUILDDIR)/configparms
+	echo "datadir = $(datadir)"		>> $(DEB_BUILDDIR)/configparms
+	echo "localedir = $(localedir)" 	>> $(DEB_BUILDDIR)/configparms
+	echo "sysconfdir = $(sysconfdir)" 	>> $(DEB_BUILDDIR)/configparms
+	echo "libexecdir = $(libexecdir)" 	>> $(DEB_BUILDDIR)/configparms
+	echo "rootsbindir = $(rootsbindir)" 	>> $(DEB_BUILDDIR)/configparms
+	echo "includedir = $(call xx,includedir)" >> $(DEB_BUILDDIR)/configparms
+	echo "docdir = $(docdir)"		>> $(DEB_BUILDDIR)/configparms
+	echo "mandir = $(mandir)"		>> $(DEB_BUILDDIR)/configparms
+	echo "sbindir = $(sbindir)"		>> $(DEB_BUILDDIR)/configparms
+	echo "libdir = $(call xx,libdir)"	>> $(DEB_BUILDDIR)/configparms
+	echo "slibdir = $(call xx,slibdir)"	>> $(DEB_BUILDDIR)/configparms
+	echo "rtlddir = $(call xx,rtlddir)"	>> $(DEB_BUILDDIR)/configparms
+
+	# Prevent autoconf from running unexpectedly by setting it to false.
+	# Also explicitly pass CC down - this is needed to get -m64 on
+	# Sparc, et cetera.
+
+	configure_build=$(call xx,configure_build); \
+	if [ $(call xx,configure_target) = $$configure_build ]; then \
+	  echo "Checking that we're running at least kernel version: $(call xx,MIN_KERNEL_SUPPORTED)"; \
+	  if ! $(call kernel_check,$(call xx,MIN_KERNEL_SUPPORTED)); then \
+	    configure_build=`echo $$configure_build | sed 's/^\([^-]*\)-\([^-]*\)$$/\1-dummy-\2/'`; \
+	    echo "No.  Forcing cross-compile by setting build to $$configure_build."; \
+	  fi; \
+	fi; \
+	$(call logme, -a $(log_build), echo -n "Build started: " ; date --rfc-2822 ; echo "---------------") ; \
+	$(call logme, -a $(log_build), \
+		cd $(DEB_BUILDDIR) && \
+		CC="$(call xx,CC)" \
+		CXX="$(call xx,CXX)" \
+		AUTOCONF=false \
+		MAKEINFO=: \
+		$(CURDIR)/configure \
+		--host=$(call xx,configure_target) \
+		--build=$$configure_build --prefix=/usr --without-cvs \
+		--enable-add-ons=$(standard-add-ons)"$(call xx,add-ons)" \
+		--enable-profile \
+		--without-selinux \
+		--enable-stackguard-randomization \
+		--with-pkgversion="Debian EGLIBC $(DEB_VERSION)" \
+		--with-bugurl="http://www.debian.org/Bugs/" \
+		$(call xx,with_headers) $(call xx,extra_config_options))
+	touch $@
+
+$(patsubst %,build_%,$(EGLIBC_PASSES)) :: build_% : $(stamp)build_%
+$(stamp)build_%: $(stamp)configure_%
+	@echo Building $(curpass)
+	$(call logme, -a $(log_build), $(MAKE) -C $(DEB_BUILDDIR) $(NJOBS))
+	$(call logme, -a $(log_build), echo "---------------" ; echo -n "Build ended: " ; date --rfc-2822)
+	if [ $(curpass) = libc ]; then \
+	    I18NPATH=$(CURDIR)/localedata GCONV_PATH=$(DEB_BUILDDIR)/iconvdata localedef --quiet -c -f UTF-8 -i C $(CURDIR)/build-tree/C.UTF-8 ; \
+	fi
+	if [ $(curpass) = libc ]; then \
+	  $(MAKE) -C $(DEB_BUILDDIR) $(NJOBS) \
+	    objdir=$(DEB_BUILDDIR) install_root=$(CURDIR)/build-tree/locales-all \
+	    localedata/install-locales; \
+	  cd $(CURDIR)/build-tree/locales-all/usr/lib/locale ; \
+	  fdupes -1 -H -q -R . | while read line ; do \
+	    set -- $${line} ; \
+	    tgt="$${1##./}" ; \
+	    shift ; \
+	    while [ "$$#" != 0 ] ; do \
+	      link="$${1##./}" ; \
+	      reltgt="$$(echo $$link | sed -e 's,[^/]\+$$,,g' -e 's,[^/]\+,..,g')$${tgt}" ; \
+	      ln -sf $${reltgt} $${link} ; \
+	      shift ; \
+	    done ; \
+	  done ; \
+	fi
+	touch $@
+
+$(patsubst %,check_%,$(EGLIBC_PASSES)) :: check_% : $(stamp)check_%
+$(stamp)check_%: $(stamp)build_%
+	@set -e ; \
+	if [ -n "$(findstring nocheck,$(DEB_BUILD_OPTIONS))" ]; then \
+	  echo "Tests have been disabled via DEB_BUILD_OPTIONS." | tee $(log_results) ; \
+	elif [ $(call xx,configure_build) != $(call xx,configure_target) ] && \
+	     ! $(DEB_BUILDDIR)/elf/ld.so $(DEB_BUILDDIR)/libc.so >/dev/null 2>&1 ; then \
+	  echo "Flavour cross-compiled, tests have been skipped." | tee $(log_results) ; \
+	elif ! $(call kernel_check,$(call xx,MIN_KERNEL_SUPPORTED)); then \
+	  echo "Kernel too old, tests have been skipped." | tee $(log_results) ; \
+	elif [ $(call xx,RUN_TESTSUITE) != "yes" ]; then \
+	  echo "Testsuite disabled for $(curpass), skipping tests."; \
+	  echo "Tests have been disabled." > $(log_results) ; \
+	else \
+	  echo Testing $(curpass); \
+	  find $(DEB_BUILDDIR) -name '*.out' -exec rm {} ';' ; \
+	  LANG="" TIMEOUTFACTOR="50" $(MAKE) -C $(DEB_BUILDDIR) -k check 2>&1 | tee $(log_test); \
+	  chmod +x debian/testsuite-checking/convertlog.sh ; \
+	  debian/testsuite-checking/convertlog.sh $(log_test) | tee $(log_results) ; \
+	  if test -f $(log_expected) ; then \
+	    echo "***************" ; \
+	    chmod +x debian/testsuite-checking/compare.sh ; \
+	    debian/testsuite-checking/compare.sh $(log_expected) $(log_results) ; \
+	    echo "***************" ; \
+	  else \
+	    echo "*** WARNING ***" ; \
+	    echo "Please generate expected testsuite results for this arch!" ; \
+	    echo "*** WARNING ***" ; \
+	  fi ; \
+	fi
+	touch $@
+
+$(patsubst %,install_%,$(EGLIBC_PASSES)) :: install_% : $(stamp)install_%
+$(stamp)install_%: $(stamp)check_%
+	@echo Installing $(curpass)
+	rm -rf $(CURDIR)/debian/tmp-$(curpass)
+	$(MAKE) -C $(DEB_BUILDDIR) \
+	  install_root=$(CURDIR)/debian/tmp-$(curpass) install
+
+	# Generate gconv-modules.cache
+	case $(curpass)-$(call xx,slibdir) in libc-* | *-/lib32 | *-/lib64) \
+	  /usr/sbin/iconvconfig --nostdlib --prefix=$(CURDIR)/debian/tmp-$(curpass) \
+				-o $(CURDIR)/debian/tmp-$(curpass)/$(call xx,libdir)/gconv/gconv-modules.cache \
+				$(call xx,libdir)/gconv \
+	  ;; \
+	esac
+
+	# Generate the list of SUPPORTED locales
+	if [ $(curpass) = libc ]; then \
+	  $(MAKE) -f debian/generate-supported.mk IN=localedata/SUPPORTED \
+	    OUT=debian/tmp-$(curpass)/usr/share/i18n/SUPPORTED; \
+	fi
+
+	# Create the multiarch directories, and the configuration file in /etc/ld.so.conf.d
+	if [ $(curpass) = libc ]; then \
+	  mkdir -p debian/tmp-$(curpass)/etc/ld.so.conf.d; \
+	  conffile="debian/tmp-$(curpass)/etc/ld.so.conf.d/$(DEB_HOST_GNU_TYPE).conf"; \
+	  echo "# Multiarch support" > $$conffile; \
+	  echo "$(call xx,slibdir)" >> $$conffile; \
+	  echo "$(call xx,libdir)" >> $$conffile; \
+	  if [ "$(DEB_HOST_GNU_TYPE)" != "$(DEB_HOST_MULTIARCH)" ]; then \
+	    echo "/lib/$(DEB_HOST_GNU_TYPE)" >> $$conffile; \
+	    echo "/usr/lib/$(DEB_HOST_GNU_TYPE)" >> $$conffile; \
+	  fi; \
+	  mkdir -p debian/tmp-$(curpass)/usr/include/$(DEB_HOST_MULTIARCH); \
+	  mv debian/tmp-$(curpass)/usr/include/bits debian/tmp-$(curpass)/usr/include/$(DEB_HOST_MULTIARCH); \
+	  mv debian/tmp-$(curpass)/usr/include/gnu debian/tmp-$(curpass)/usr/include/$(DEB_HOST_MULTIARCH); \
+	  mv debian/tmp-$(curpass)/usr/include/sys debian/tmp-$(curpass)/usr/include/$(DEB_HOST_MULTIARCH); \
+	  mv debian/tmp-$(curpass)/usr/include/fpu_control.h debian/tmp-$(curpass)/usr/include/$(DEB_HOST_MULTIARCH); \
+	  mv debian/tmp-$(curpass)/usr/include/a.out.h debian/tmp-$(curpass)/usr/include/$(DEB_HOST_MULTIARCH); \
+	  mv debian/tmp-$(curpass)/usr/include/ieee754.h debian/tmp-$(curpass)/usr/include/$(DEB_HOST_MULTIARCH); \
+	fi
+
+	# For our biarch libc, add an ld.so.conf.d configuration; this
+	# is needed because multiarch libc Replaces: libc6-i386 for ld.so, and
+	# the multiarch ld.so doesn't look at the (non-standard) /lib32, so we
+	# need path compatibility when biarch and multiarch packages are both
+	# installed.
+	case $(call xx,slibdir) in /lib32 | /lib64) \
+	  mkdir -p debian/tmp-$(curpass)/etc/ld.so.conf.d; \
+	  conffile="debian/tmp-$(curpass)/etc/ld.so.conf.d/zz_$(curpass)-biarch-compat.conf"; \
+	  echo "# Legacy biarch compatibility support" > $$conffile; \
+	  echo "$(call xx,slibdir)" >> $$conffile; \
+	  echo "$(call xx,libdir)" >> $$conffile; \
+	  ;; \
+	esac
+
+	# handle the non-default multilib for arm targets
+	case $(curpass) in arm*) \
+	  mkdir -p debian/tmp-$(curpass)/etc/ld.so.conf.d; \
+	  conffile="debian/tmp-$(curpass)/etc/ld.so.conf.d/zz_$(curpass)-biarch-compat.conf"; \
+	  echo "# Multiarch support" > $$conffile; \
+	  echo "$(call xx,slibdir)" >> $$conffile; \
+	  echo "$(call xx,libdir)" >> $$conffile; \
+	esac
+
+	# ARM: add dynamic linker name for the non-default multilib in ldd
+	if [ $(curpass) = libc ]; then \
+	  case $(DEB_HOST_ARCH) in \
+	    armel) \
+	      sed -i '/RTLDLIST=/s,=\(.*\),="\1 /lib/ld-linux-armhf.so.3",' debian/tmp-$(curpass)/usr/bin/ldd;; \
+	    armhf) \
+	      sed -i '/RTLDLIST=/s,=\(.*\),="\1 /lib/ld-linux.so.3",' debian/tmp-$(curpass)/usr/bin/ldd;; \
+	  esac; \
+	fi
+
+	# Create the ld.so symlink to the multiarch directory
+	if [ $(curpass) = libc ]; then \
+	  rtld_so="$$(LANG=C LC_ALL=C readelf -l debian/tmp-$(curpass)/usr/bin/iconv | grep 'interpreter' | sed -e 's/.*interpreter: \(.*\)]/\1/g')" ; \
+	  rtld_so="$$(basename $$rtld_so)" ; \
+	  link_name="debian/tmp-$(curpass)/lib/$$rtld_so" ; \
+	  target="$(call xx,slibdir)/$$(readlink debian/tmp-$(curpass)/$(call xx,slibdir)/$$rtld_so)" ; \
+	  ln -s $$target $$link_name ;  \
+	fi
+	
+	$(call xx,extra_install)
+	touch $@
+
+$(stamp)doc: $(stamp)patch
+	make -C $(CURDIR)/linuxthreads/man
+	touch $@
+
+$(stamp)source: $(stamp)patch
+	mkdir -p $(build-tree)
+	tar -c -J -C .. \
+		-f $(build-tree)/eglibc-$(EGLIBC_VERSION).tar.xz \
+		$(EGLIBC_SOURCES)
+	mkdir -p debian/eglibc-source/usr/src/glibc
+	tar cf - --files-from debian/eglibc-source.filelist \
+	  | tar -x -C debian/eglibc-source/usr/src/glibc -f -
+
+	touch $@
+
+.NOTPARALLEL: $(patsubst %,check_%,$(EGLIBC_PASSES))
--- eglibc-2.13.orig/debian/rules.d/info.mk
+++ eglibc-2.13/debian/rules.d/info.mk
@@ -0,0 +1,16 @@
+#
+# Add here instructions to dump useful debug information
+#
+
+$(stamp)info:
+	@echo '------------------------------------------------------'
+	
+	uname -a
+	@echo
+
+	if [ -f /proc/cpuinfo ] ; then cat /proc/cpuinfo ; fi
+	@echo
+
+	@echo '------------------------------------------------------'
+
+	touch $@
--- eglibc-2.13.orig/debian/debhelper.in/locales.templates
+++ eglibc-2.13/debian/debhelper.in/locales.templates
@@ -0,0 +1,27 @@
+Template: locales/locales_to_be_generated
+Type: multiselect
+#flag:translate:1
+__Choices: All locales, ${locales}
+_Description: Locales to be generated:
+ Locales are a framework to switch between multiple languages and
+ allow users to use their language, country, characters, collation
+ order, etc.
+ .
+ Please choose which locales to generate. UTF-8 locales should be
+ chosen by default, particularly for new installations. Other
+ character sets may be useful for backwards compatibility with older
+ systems and software.
+
+Template: locales/default_environment_locale
+Type: select
+#flag:translate:1
+__Choices: None, ${locales}
+Default: None
+_Description: Default locale for the system environment:
+ Many packages in Debian use locales to display text in the correct
+ language for the user. You can choose a default locale for the system
+ from the generated locales.
+ .
+ This will select the default language for the entire system. If this
+ system is a multi-user system where not all users are able to speak
+ the default language, they will experience difficulties.
--- eglibc-2.13.orig/debian/debhelper.in/locales-all.NEWS
+++ eglibc-2.13/debian/debhelper.in/locales-all.NEWS
@@ -0,0 +1,8 @@
+locales-all (2.7-1) unstable; urgency=low
+
+  * Starting with locales 2.7-1 the deprecated no_NO locale has been 
+    removed. Users who have not yet switched to nb_NO should do it
+    after the installation of this package.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 26 Nov 2007 18:56:32 +0100
+
--- eglibc-2.13.orig/debian/debhelper.in/libc-dev.install
+++ eglibc-2.13/debian/debhelper.in/libc-dev.install
@@ -0,0 +1,21 @@
+TMPDIR/LIBDIR/libanl.a LIBDIR
+TMPDIR/LIBDIR/libBrokenLocale.a LIBDIR
+TMPDIR/LIBDIR/libbsd-compat.a LIBDIR
+TMPDIR/LIBDIR/libc.a LIBDIR
+TMPDIR/LIBDIR/libc_nonshared.a LIBDIR
+TMPDIR/LIBDIR/libcrypt.a LIBDIR
+TMPDIR/LIBDIR/libdl.a LIBDIR
+TMPDIR/LIBDIR/libg.a LIBDIR
+TMPDIR/LIBDIR/libieee.a LIBDIR
+TMPDIR/LIBDIR/libm.a LIBDIR
+TMPDIR/LIBDIR/libmcheck.a LIBDIR
+TMPDIR/LIBDIR/libnsl.a LIBDIR
+TMPDIR/LIBDIR/libpthread.a LIBDIR
+TMPDIR/LIBDIR/libpthread_nonshared.a LIBDIR
+TMPDIR/LIBDIR/libresolv.a LIBDIR
+TMPDIR/LIBDIR/librpcsvc.a LIBDIR
+TMPDIR/LIBDIR/librt.a LIBDIR
+TMPDIR/LIBDIR/libutil.a LIBDIR
+TMPDIR/LIBDIR/*.o LIBDIR
+TMPDIR/LIBDIR/*.so LIBDIR
+TMPDIR/usr/include/* usr/include
--- eglibc-2.13.orig/debian/debhelper.in/locales.postinst
+++ eglibc-2.13/debian/debhelper.in/locales.postinst
@@ -0,0 +1,80 @@
+#! /bin/sh
+set -e 
+
+# Files
+LG="/etc/locale.gen"
+EE="/etc/default/locale"
+
+# Sanitize environnement
+LC_ALL=C
+LANG=C
+
+if [ "$1" = configure ]; then
+    # Load debconf
+    . /usr/share/debconf/confmodule
+    db_version 2.0
+
+    db_get locales/default_environment_locale && DEFAULT_ENVIRONMENT="$RET"
+    db_get locales/locales_to_be_generated && SELECTED_LOCALES=$RET
+    SELECTED_LOCALES="$(echo $SELECTED_LOCALES | sed -e 's/, /\n/g')"
+
+    if [ "$SELECTED_LOCALES" = "All locales" ]; then
+        [ -e $LG ] && rm -f $LG
+        ln -s /usr/share/i18n/SUPPORTED $LG
+    else
+        [ -L $LG ] && [ "$(readlink $LG)" = "/usr/share/i18n/SUPPORTED" ] && rm -f $LG
+        if [ ! -e $LG ] ; then
+            cat > $LG << EOF
+# This file lists locales that you wish to have built. You can find a list
+# of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add
+# user defined locales to /usr/local/share/i18n/SUPPORTED. If you change
+# this file, you need to rerun locale-gen.
+#
+
+EOF
+        fi
+
+        # Comment previous defined locales
+        sed -i -e 's/^ *[a-zA-Z]/# &/' $LG
+
+        # Get list of supported locales
+        if [ -f "/usr/local/share/i18n/SUPPORTED" ] ; then
+            SUPPORTED_LOCALES="$(sed -e '/^[a-zA-Z]/!d' -e 's/ *$//g' /usr/share/i18n/SUPPORTED /usr/local/share/i18n/SUPPORTED | sort -u)"
+        else
+            SUPPORTED_LOCALES="$(sed -e '/^[a-zA-Z]/!d' -e 's/ *$//g' /usr/share/i18n/SUPPORTED | sort -u)"
+        fi
+
+        # Make sure all locales exist in locales.gen
+        echo "$SUPPORTED_LOCALES" | while read locale ; do
+           if ! grep -q "^[# ]*$locale *\$" $LG; then 
+             echo "# $locale" >> $LG
+           fi
+        done
+
+        # Uncomment selected locales
+        echo "$SELECTED_LOCALES" | while read locale ; do
+            sed -i -e "0,/^[# ]*$locale *$/ s/^[# ]*$locale *$/$locale/" $LG
+        done
+    fi
+
+    # Update requested locales if locales-all is not installed
+    if dpkg-query -s locales-all >/dev/null 2>&1 ; then
+        echo "locales-all installed, skipping locales generation"
+    else
+        locale-gen
+    fi
+
+    if ! [ -e $EE ] || [ -n "$DEBCONF_RECONFIGURE" ] ; then
+        # Remove previous definitions
+        update-locale --no-checks LANG
+
+        # Set default LANG environment variable
+        if [ -n "$DEFAULT_ENVIRONMENT" ] && [ "$DEFAULT_ENVIRONMENT" != "None" ]; then
+            update-locale "LANG=$DEFAULT_ENVIRONMENT"
+        fi
+    fi
+fi
+
+#DEBHELPER#
+
+exit 0
--- eglibc-2.13.orig/debian/debhelper.in/locales-all.prerm
+++ eglibc-2.13/debian/debhelper.in/locales-all.prerm
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    remove|purge)
+	# Is locales installed?
+	if [ -x /usr/sbin/locale-gen ] ; then
+		# If yes, generate locales selected in the debconf question
+		locale-gen
+	fi
+	;;
+    *)
+    	;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- eglibc-2.13.orig/debian/debhelper.in/libc.install
+++ eglibc-2.13/debian/debhelper.in/libc.install
@@ -0,0 +1,7 @@
+TMPDIR/lib/*.so* RTLDDIR
+TMPDIR/SLIBDIR/*.so* SLIBDIR
+TMPDIR/LIBDIR/gconv/* LIBDIR/gconv
+
+TMPDIR/etc/ld.so.conf.d /etc
+
+BUILD-TREE/test-results-*-libc usr/share/doc/LIBC
--- eglibc-2.13.orig/debian/debhelper.in/libc-dev-alt.lintian-overrides
+++ eglibc-2.13/debian/debhelper.in/libc-dev-alt.lintian-overrides
@@ -0,0 +1,4 @@
+# Those file are actually .o files not package in a ar archive, and
+# thus should not be stripped
+LIBC-dev-FLAVOR: unstripped-binary-or-object */libieee.a
+LIBC-dev-FLAVOR: unstripped-binary-or-object */libmcheck.a
--- eglibc-2.13.orig/debian/debhelper.in/locales.README.Debian
+++ eglibc-2.13/debian/debhelper.in/locales.README.Debian
@@ -0,0 +1,17 @@
+locales
+-------
+
+  * Starting with locales 2.7-3, users can provide their own locales in
+    addition to the ones provided by the package. They will be handled 
+    as other locales in the various scripts.
+
+    Each user defined locale has to be provided as a single file and 
+    placed in the /usr/local/share/i18n/locales/ directory. The list of
+    user defined locales should be placed, one by line, in the file
+    /usr/local/share/i18n/SUPPORTED. You can have a look to the locales
+    provided by the locales package in /usr/share/i18n/ for more details.
+
+    To enable the new locales, just run 'dpkg-reconfigure locales' and 
+    select the new locales.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu 29 Nov 2007 18:54:12 +0100
--- eglibc-2.13.orig/debian/debhelper.in/libc-dev.install.hurd-i386
+++ eglibc-2.13/debian/debhelper.in/libc-dev.install.hurd-i386
@@ -0,0 +1,23 @@
+TMPDIR/LIBDIR/libBrokenLocale.a LIBDIR
+TMPDIR/LIBDIR/libbsd-compat.a LIBDIR
+TMPDIR/LIBDIR/libc.a LIBDIR
+TMPDIR/LIBDIR/libcrt.a LIBDIR
+TMPDIR/LIBDIR/libcrt_nonshared.a LIBDIR
+TMPDIR/LIBDIR/libcrypt.a LIBDIR
+TMPDIR/LIBDIR/libdl.a LIBDIR
+TMPDIR/LIBDIR/libg.a LIBDIR
+TMPDIR/LIBDIR/libhurduser.a LIBDIR
+TMPDIR/LIBDIR/libieee.a LIBDIR
+TMPDIR/LIBDIR/libm.a LIBDIR
+TMPDIR/LIBDIR/libmachuser.a LIBDIR
+TMPDIR/LIBDIR/libmcheck.a LIBDIR
+TMPDIR/LIBDIR/libnsl.a LIBDIR
+TMPDIR/LIBDIR/libpthread.a LIBDIR
+TMPDIR/LIBDIR/libpthread2.a LIBDIR
+TMPDIR/LIBDIR/libresolv.a LIBDIR
+TMPDIR/LIBDIR/librpcsvc.a LIBDIR
+TMPDIR/LIBDIR/librt.a LIBDIR
+TMPDIR/LIBDIR/libutil.a LIBDIR
+TMPDIR/LIBDIR/*.o LIBDIR
+TMPDIR/LIBDIR/*.so LIBDIR
+TMPDIR/usr/include/* usr/include
--- eglibc-2.13.orig/debian/debhelper.in/eglibc-source.lintian-overrides
+++ eglibc-2.13/debian/debhelper.in/eglibc-source.lintian-overrides
@@ -0,0 +1,32 @@
+# all those files are part of Debian packaging which is provided as part
+# of eglibc-source binary package to allow re-use of it for cross
+# compiler packages.
+
+eglibc-source: missing-dep-for-interpreter make => make | build-essential | dpkg-dev (usr/src/glibc/debian/rules)
+eglibc-source: shell-script-fails-syntax-check usr/src/glibc/debian/debhelper.in/libc-otherbuild.postinst
+eglibc-source: shell-script-fails-syntax-check usr/src/glibc/debian/debhelper.in/libc-otherbuild.postrm
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc-alt.preinst
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc-alt.postrm
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc-dev-alt.preinst
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc-dev-alt.preinst.i386
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc-otherbuild.postinst
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc-otherbuild.postrm
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc.postinst
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc.postrm
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc.preinst
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/libc.prerm
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/locales-all.postinst
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/locales-all.prerm
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/locales.config
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/locales.postinst
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/locales.postrm
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/locales.prerm
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/nscd.init
+eglibc-source: script-not-executable usr/src/glibc/debian/debhelper.in/nscd.postrm
+eglibc-source: script-not-executable usr/src/glibc/debian/debver2localesdep.pl
+eglibc-source: script-not-executable usr/src/glibc/debian/generate-supported.mk
+eglibc-source: script-not-executable usr/src/glibc/debian/local/manpages/Makefile
+eglibc-source: script-not-executable usr/src/glibc/debian/local/usr_sbin/locale-gen
+eglibc-source: script-not-executable usr/src/glibc/debian/local/usr_sbin/update-locale
+eglibc-source: script-not-executable usr/src/glibc/debian/local/usr_sbin/validlocale
+eglibc-source: script-not-executable usr/src/glibc/debian/shlibs-add-udebs
--- eglibc-2.13.orig/debian/debhelper.in/nscd.manpages
+++ eglibc-2.13/debian/debhelper.in/nscd.manpages
@@ -0,0 +1,2 @@
+debian/local/manpages/nscd.conf.5
+debian/local/manpages/nscd.8
--- eglibc-2.13.orig/debian/debhelper.in/libc-bin.postinst
+++ eglibc-2.13/debian/debhelper.in/libc-bin.postinst
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -e
+export LC_ALL=C
+
+install_from_default() {
+  if [ ! -f $2 ]; then
+    cp -p $1 $2
+  fi
+}
+
+if [ "$1" = "configure" ] && [ "$2" = "" ] ; then
+  install_from_default /usr/share/libc-bin/nsswitch.conf /etc/nsswitch.conf
+fi
+
+#DEBHELPER#
+
+exit 0
+
--- eglibc-2.13.orig/debian/debhelper.in/locales.dirs
+++ eglibc-2.13/debian/debhelper.in/locales.dirs
@@ -0,0 +1 @@
+usr/lib/locale
--- eglibc-2.13.orig/debian/debhelper.in/libc-dev-bin.docs
+++ eglibc-2.13/debian/debhelper.in/libc-dev-bin.docs
@@ -0,0 +1,2 @@
+NOTES
+NAMESPACE
--- eglibc-2.13.orig/debian/debhelper.in/nscd.init
+++ eglibc-2.13/debian/debhelper.in/nscd.init
@@ -0,0 +1,126 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          nscd
+# Required-Start:    $remote_fs $syslog
+# Required-Stop:     $remote_fs $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Starts the Name Service Cache Daemon
+### END INIT INFO
+
+#
+# nscd:		Starts the Name Service Cache Daemon
+#
+# description:  This is a daemon which handles passwd and group lookups
+#		for running programs and caches the results for the next
+#		query.  You should start this daemon only if you use
+#		slow Services like NIS or NIS+
+
+PATH="/sbin:/usr/sbin:/bin:/usr/bin"
+NAME="nscd"
+DESC="Name Service Cache Daemon"
+DAEMON="/usr/sbin/nscd"
+PIDFILE="/var/run/nscd/nscd.pid"
+
+# Sanity checks.
+umask 022
+[ -f /etc/nscd.conf ] || exit 0
+[ -x "$DAEMON" ] || exit 0
+[ -d /var/run/nscd ] || mkdir -p /var/run/nscd
+. /lib/lsb/init-functions
+
+start_nscd()
+{
+	# Return
+	#   0 if daemon has been started or was already running
+	#   2 if daemon could not be started
+	start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec "$DAEMON" --test > /dev/null || return 0
+	start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec "$DAEMON" || return 2
+}
+
+stop_nscd()
+{
+	# Return
+	#   0 if daemon has been stopped
+	#   1 if daemon was already stopped
+	#   2 if daemon could not be stopped
+
+	# we try to stop using nscd --shutdown, that fails also if nscd is not present.
+	# in that case, fallback to "good old methods"
+	RETVAL=0
+	if ! $DAEMON --shutdown; then
+		start-stop-daemon --stop --quiet --pidfile "$PIDFILE" --name "$NAME" --test > /dev/null
+		RETVAL="$?"
+		[ "$?" -ne 0  -a  "$?" -ne 1 ] && return 2
+	fi
+
+	# Wait for children to finish too
+	start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec "$DAEMON" > /dev/null
+	[ "$?" -ne 0  -a  "$?" -ne 1 ] && return 2
+	rm -f "$PIDFILE"
+	return "$RETVAL"
+}
+
+status()
+{
+	# Return
+	#   0 if daemon is stopped
+	#   1 if daemon is running
+	start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec "$DAEMON" --test > /dev/null || return 1
+	return 0
+}
+
+case "$1" in
+start)
+	log_daemon_msg "Starting $DESC" "$NAME"
+	start_nscd
+	case "$?" in
+		0) log_end_msg 0 ; exit 0 ;;
+		1) log_warning_msg " (already running)." ; exit 0 ;;
+		*) log_end_msg 1 ; exit 1 ;;
+	esac
+	;;
+stop)
+	log_daemon_msg "Stopping $DESC" "$NAME"
+	stop_nscd
+	case "$?" in
+		0) log_end_msg 0 ; exit 0 ;;
+		1) log_warning_msg " (not running)." ; exit 0 ;;
+		*) log_end_msg 1 ; exit 1 ;;
+	esac
+	;;
+restart|force-reload)
+	log_daemon_msg "Restarting $DESC" "$NAME"
+	for table in passwd group hosts ; do
+		$DAEMON --invalidate $table
+	done
+	stop_nscd
+	case "$?" in
+	0|1)
+		start_nscd
+		case "$?" in
+			0) log_end_msg 0 ; exit 0 ;;
+			1) log_failure_msg " (failed -- old process is still running)." ; exit 1 ;;
+			*) log_failure_msg " (failed to start)." ; exit 1 ;;
+		esac
+		;;
+	*)
+		log_failure_msg " (failed to stop)."
+		exit 1
+		;;
+	esac
+	;;
+status)
+	log_daemon_msg "Status of $DESC service: "
+	status
+	case "$?" in
+		0) log_failure_msg "not running." ; exit 3 ;;
+		1) log_success_msg "running." ; exit 0 ;;
+	esac
+	;;
+*)
+	echo "Usage: /etc/init.d/$NAME {start|stop|force-reload|restart|status}" >&2
+	exit 1
+	;;
+esac
+
--- eglibc-2.13.orig/debian/debhelper.in/locales-all.postinst
+++ eglibc-2.13/debian/debhelper.in/locales-all.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+export LC_ALL=C
+
+if [ "$1" = "configure" ]; then
+	# Remove existing locale-archive, otherwise they are prefered
+	# to the ones in this package
+	rm -f /usr/lib/locale/locale-archive 2>/dev/null || true
+fi
+
+#DEBHELPER#
+
+exit 0
+
--- eglibc-2.13.orig/debian/debhelper.in/libc-otherbuild.lintian-overrides
+++ eglibc-2.13/debian/debhelper.in/libc-otherbuild.lintian-overrides
@@ -0,0 +1,15 @@
+# libpthread must be stripped specially; GDB needs the non-dynamic 
+# symbol table in order to load the thread debugging library.
+LIBC-FLAVOR: unstripped-binary-or-object */libpthread-2.13.so
+
+# ld.so must be executable, otherwise the system will not work
+LIBC-FLAVOR: shlib-with-executable-bit */ld-2.13.so 0755
+
+# It is normal that the ELF dynamic linker does not need any other 
+# library
+LIBC-FLAVOR: shared-lib-without-dependency-information */ld-2.13.so
+
+# The libraries are installed in an hwcap directory, which contrary
+# to what lintian thinks, is controlled by ldconfig
+LIBC-FLAVOR: postinst-has-useless-call-to-ldconfig
+LIBC-FLAVOR: postrm-has-useless-call-to-ldconfig
--- eglibc-2.13.orig/debian/debhelper.in/glibc-doc.install
+++ eglibc-2.13/debian/debhelper.in/glibc-doc.install
@@ -0,0 +1,4 @@
+ChangeLog*		/usr/share/doc/glibc-doc
+nptl/ChangeLog*		/usr/share/doc/glibc-doc/nptl
+nptl_db/ChangeLog*	/usr/share/doc/glibc-doc/nptl_db
+ports/ChangeLog*	/usr/share/doc/glibc-doc/ports
--- eglibc-2.13.orig/debian/debhelper.in/libc-alt.preinst
+++ eglibc-2.13/debian/debhelper.in/libc-alt.preinst
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+case $1 in
+	(upgrade|install)
+	if [ "$(readlink /lib32)" = "/emul/ia32-linux/lib" ]; then
+		rm /lib32
+	fi
+	if [ "$(readlink /usr/lib32)" = "/emul/ia32-linux/usr/lib" ]; then
+		rm /usr/lib32
+	fi
+	;;
+	(*)
+	;;
+esac
--- eglibc-2.13.orig/debian/debhelper.in/locales.postrm
+++ eglibc-2.13/debian/debhelper.in/locales.postrm
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    purge)
+	rm -f /etc/locale.gen
+	rm -f /etc/default/locale
+	;;
+    *)
+    	;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- eglibc-2.13.orig/debian/debhelper.in/libc-pic.dirs
+++ eglibc-2.13/debian/debhelper.in/libc-pic.dirs
@@ -0,0 +1 @@
+LIBDIR/libc_pic
--- eglibc-2.13.orig/debian/debhelper.in/libc-dev-alt.preinst.i386
+++ eglibc-2.13/debian/debhelper.in/libc-dev-alt.preinst.i386
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+case $1 in
+	(upgrade|install)
+	# We want /usr/include/{bits,fpu_control.h,gnu,sys} to become
+	# directories or files instead of symlinks.
+	for dir in bits fpu_control.h gnu sys ; do 
+		if test -h /usr/include/$dir ; then
+			rm -rf /usr/include/$dir
+		fi
+	done
+	;;
+	(*)
+	;;
+esac
--- eglibc-2.13.orig/debian/debhelper.in/libc-dev-alt.preinst
+++ eglibc-2.13/debian/debhelper.in/libc-dev-alt.preinst
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -e
+
+case $1 in
+	(upgrade|install)
+	# We want /usr/include/bits and /usr/include/gnu to become
+	# symlinks
+	if ! test -h /usr/include/bits ; then
+		rm -rf /usr/include/bits
+	fi
+	if ! test -h /usr/include/gnu ; then
+		rm -rf /usr/include/gnu
+	fi
+
+	# We want /usr/include/sys to be a normal directory instead
+	# of a symlink
+	if test -h /usr/include/sys ; then
+		rm -f /usr/include/sys
+	fi
+	;;
+	(*)
+	;;
+esac
--- eglibc-2.13.orig/debian/debhelper.in/libc-bin.dirs
+++ eglibc-2.13/debian/debhelper.in/libc-bin.dirs
@@ -0,0 +1,2 @@
+usr/lib/locale
+usr/share/libc-bin
--- eglibc-2.13.orig/debian/debhelper.in/libc-otherbuild.postrm
+++ eglibc-2.13/debian/debhelper.in/libc-otherbuild.postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ]; then
+    # /etc/ld.so.nohwcap code: NOHWCAP
+fi
+
+#DEBHELPER#
+
+exit 0
--- eglibc-2.13.orig/debian/debhelper.in/locales.links
+++ eglibc-2.13/debian/debhelper.in/locales.links
@@ -0,0 +1 @@
+etc/locale.alias usr/share/locale/locale.alias
--- eglibc-2.13.orig/debian/debhelper.in/eglibc-source.install
+++ eglibc-2.13/debian/debhelper.in/eglibc-source.install
@@ -0,0 +1 @@
+BUILD-TREE/eglibc-*.tar.xz /usr/src/glibc
--- eglibc-2.13.orig/debian/debhelper.in/libc-alt.install
+++ eglibc-2.13/debian/debhelper.in/libc-alt.install
@@ -0,0 +1,7 @@
+# This file is used for biarch libraries.
+TMPDIR/SLIBDIR/*.so* SLIBDIR
+TMPDIR/LIBDIR/gconv/* LIBDIR/gconv/
+
+TMPDIR/etc/ld.so.conf.d /etc
+
+BUILD-TREE/test-results-*-FLAVOR usr/share/doc/LIBC-FLAVOR
--- eglibc-2.13.orig/debian/debhelper.in/libc.docs
+++ eglibc-2.13/debian/debhelper.in/libc.docs
@@ -0,0 +1,4 @@
+BUGS
+FAQ
+NEWS
+hesiod/README.hesiod
--- eglibc-2.13.orig/debian/debhelper.in/glibc-doc.links
+++ eglibc-2.13/debian/debhelper.in/glibc-doc.links
@@ -0,0 +1,17 @@
+usr/share/man/man3/pthread_condattr_init.3.gz usr/share/man/man3/pthread_condattr_destroy.3.gz
+usr/share/man/man3/pthread_cond_init.3.gz usr/share/man/man3/pthread_cond_signal.3.gz
+usr/share/man/man3/pthread_cond_init.3.gz usr/share/man/man3/pthread_cond_broadcast.3.gz
+usr/share/man/man3/pthread_cond_init.3.gz usr/share/man/man3/pthread_cond_wait.3.gz
+usr/share/man/man3/pthread_cond_init.3.gz usr/share/man/man3/pthread_cond_timedwait.3.gz
+usr/share/man/man3/pthread_cond_init.3.gz usr/share/man/man3/pthread_cond_destroy.3.gz
+usr/share/man/man3/pthread_key_create.3.gz usr/share/man/man3/pthread_getspecific.3.gz
+usr/share/man/man3/pthread_key_create.3.gz usr/share/man/man3/pthread_key_delete.3.gz
+usr/share/man/man3/pthread_key_create.3.gz usr/share/man/man3/pthread_setspecific.3.gz
+usr/share/man/man3/pthread_mutexattr_init.3.gz usr/share/man/man3/pthread_mutexattr_destroy.3.gz
+usr/share/man/man3/pthread_mutexattr_init.3.gz usr/share/man/man3/pthread_mutexattr_settype.3.gz
+usr/share/man/man3/pthread_mutexattr_init.3.gz usr/share/man/man3/pthread_mutexattr_gettype.3.gz
+usr/share/man/man3/pthread_mutexattr_setkind_np.3.gz usr/share/man/man3/pthread_mutexattr_getkind_np.3.gz
+usr/share/man/man3/pthread_mutex_init.3.gz usr/share/man/man3/pthread_mutex_lock.3.gz
+usr/share/man/man3/pthread_mutex_init.3.gz usr/share/man/man3/pthread_mutex_trylock.3.gz
+usr/share/man/man3/pthread_mutex_init.3.gz usr/share/man/man3/pthread_mutex_unlock.3.gz
+usr/share/man/man3/pthread_mutex_init.3.gz usr/share/man/man3/pthread_mutex_destroy.3.gz
--- eglibc-2.13.orig/debian/debhelper.in/nscd.postrm
+++ eglibc-2.13/debian/debhelper.in/nscd.postrm
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    purge)
+	rm -rf /var/cache/nscd
+	;;
+    *)
+    	;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- eglibc-2.13.orig/debian/debhelper.in/libc.dirs
+++ eglibc-2.13/debian/debhelper.in/libc.dirs
@@ -0,0 +1 @@
+etc/ld.so.conf.d
--- eglibc-2.13.orig/debian/debhelper.in/nscd.dirs
+++ eglibc-2.13/debian/debhelper.in/nscd.dirs
@@ -0,0 +1 @@
+var/cache/nscd
--- eglibc-2.13.orig/debian/debhelper.in/libc-prof.install
+++ eglibc-2.13/debian/debhelper.in/libc-prof.install
@@ -0,0 +1 @@
+TMPDIR/LIBDIR/*_p.a LIBDIR
--- eglibc-2.13.orig/debian/debhelper.in/libc.preinst
+++ eglibc-2.13/debian/debhelper.in/libc.preinst
@@ -0,0 +1,479 @@
+#!/bin/sh
+set -e
+export LC_ALL=C
+
+type=$1
+preversion=$2
+
+package_name()
+{
+    if dpkg --assert-multi-arch 2>/dev/null; then
+        echo LIBC:${DPKG_MAINTSCRIPT_ARCH}
+    else
+        echo LIBC
+    fi
+}
+
+rm_conffile() {
+    local PKGNAME="$1"
+    local CONFFILE="$2"
+
+    [ -e "$CONFFILE" ] || return 0
+
+    local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')"
+    local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME | \
+            sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")"
+    if [ "$md5sum" != "$old_md5sum" ]; then
+        echo "Obsolete conffile $CONFFILE has been modified by you."
+        echo "Saving as $CONFFILE.dpkg-bak ..."
+        mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
+    else
+        echo "Removing obsolete conffile $CONFFILE ..."
+        rm -f "$CONFFILE"
+    fi
+}
+
+linux_compare_versions () {
+    verA=$(($(echo "$1" | sed 's/^\([0-9]*\.[0-9]*\)\([^.0-9]\|$\)/\1.0\2/; s/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/')))
+    verB=$(($(echo "$3" | sed 's/^\([0-9]*\.[0-9]*\)\([^.0-9]\|$\)/\1.0\2/; s/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/')))
+
+    test $verA -$2 $verB
+}
+
+kfreebsd_compare_versions () {
+    verA=$(($(echo "$1" | sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \* 100 + \2/')))
+    verB=$(($(echo "$3" | sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \* 100 + \2/')))
+
+    test $verA -$2 $verB
+}
+
+kernel26_help() {
+    echo ""
+    echo "The installation of a 2.6 kernel _could_ ask you to install a new libc"
+    echo "first, this is NOT a bug, and should *NOT* be reported. In that case,"
+    echo "please add lenny sources to your /etc/apt/sources.list and run:"
+    echo "  apt-get install -t lenny linux-image-2.6"
+    echo "Then reboot into this new kernel, and proceed with your upgrade"
+}
+
+# Sanity check.
+# If there are versions of glibc outside of the normal installation
+# location (/lib, /lib64, etc.) then things may break very badly
+# as soon as ld.so is replaced by a new version.  This check is not
+# foolproof, but it's pretty accurate.  This script ignores libraries
+# with different sonames, and libraries incompatible with the 
+# to-be-installed ld.so.
+check_dir () {
+    msg=$1
+    dir=$2
+
+    # Follow symlinks
+    dir=$(readlink -e $dir || true)
+
+    # Ignore inexistent directories
+    if ! test -d "$dir" ; then
+        return
+    fi
+  
+    # Detect possible candidates
+    files=$(ls $dir | egrep '^(ld|lib(d|c|m|pthread|rt|dl))-2.*.so' 2>/dev/null || true)
+    if test -z "$files" ; then
+        return
+    fi
+  
+    for file in $files ; do
+        lib=$dir/$file
+
+        # Skip if it is a symlink (as installed by lsb-core)
+        if test -L "$lib" ; then
+            continue
+        fi
+
+        # Skip if it is the currently dynamic loader
+        if test "$lib" = "$ldfile" ; then
+            continue
+        fi
+
+        # See if the found libraries are compatible with the system ld.so;
+        # if they aren't, they'll be ignored. Check e_ident, e_type (which
+        # will just be ET_DYN), and e_machine. If a match is found, there
+        # is a risk of breakage.
+        libbytes=`head -c 20 $lib | od -c`
+        if test "$ldbytes" != "$libbytes" ; then 
+          continue
+        fi
+
+        # Binaries owned packages are considered to do the right thing
+        # First try a quick lookup which should catch all cases on a 
+        # normal system
+        if echo $libcfiles | grep -q "[ ^]$lib[ $]" ; then 
+            continue
+        fi
+
+        # Slower lookup to confirm
+        if dpkg-query -S "$lib" >/dev/null 2>&1 ; then
+            continue
+        fi
+
+        # Output an error message and exit
+        echo
+        echo "A copy of the C library was found $msg:"
+        echo "  '$lib'"
+        echo "It is not safe to upgrade the C library in this situation;"
+        echo "please remove that copy of the C library or get it out of"
+        echo "'$dir' and try again."
+        echo
+        exit 1
+    done
+}
+
+# On upgrade, if /lib64 is a symlink, remove it and replace it with a real
+# directory so we can ensure biarch and multiarch packages play nicely
+# together
+remove_lib64_symlink() {
+    ldfile=$(readlink -e RTLD_SO)
+    # Test if libc is of the same architecture as /bin/mv
+    # If not, they almost surely have a multiarch system and we can use
+    # the native ELF interpreter
+    if ! $ldfile /bin/mv --version >/dev/null 2>&1; then
+        interpreter=
+    else
+        interpreter=$ldfile
+    fi
+
+    mkdir /lib64.eglibc-new
+    ln -s $ldfile /lib64.eglibc-new/$(basename RTLD_SO)
+    # sync before and after the operation to reduce the danger of hosing
+    # the system
+    sync
+    rm -f /lib64
+    $interpreter /bin/mv /lib64.eglibc-new /lib64
+    sync
+    rm -f /lib/$(basename RTLD_SO)
+}
+
+if [ "$type" = upgrade ]
+then
+    # Remove old /etc/init.d/glibc.sh init script
+    if dpkg --compare-versions "$preversion" le "2.9-22"; then
+        rm_conffile $(package_name) "/etc/init.d/glibc.sh"
+	update-rc.d glibc.sh remove >/dev/null
+    fi
+
+    # Load debconf module if available
+    if [ -f /usr/share/debconf/confmodule ] ; then
+        . /usr/share/debconf/confmodule
+    fi
+
+    if [ -n "$preversion" ]; then
+	# NSS authentication trouble guard
+	if dpkg --compare-versions "$preversion" lt 2.13; then
+	    if pidof xscreensaver xlockmore >/dev/null; then
+		if [ -f /usr/share/debconf/confmodule ] ; then
+		    db_version 2.0
+		    db_reset glibc/disable-screensaver
+		    db_input critical glibc/disable-screensaver || true
+		    db_go || true
+		else
+		    echo "xscreensaver and xlockmore must be restarted before upgrading"
+		    echo
+		    echo "One or more running instances of xscreensaver or xlockmore have been"
+		    echo "detected on this system. Because of incompatible library changes, the"
+		    echo "upgrade of the GNU C library will leave you unable to authenticate to"
+		    echo "these programs. You should arrange for these programs to be restarted"
+		    echo "or stopped before continuing this upgrade, to avoid locking your users"
+		    echo "out of their current sessions."
+		    echo
+		    frontend=`echo "$DEBIAN_FRONTEND" | tr '[:upper:]' '[:lower:]'`
+		    if [ "$frontend" = noninteractive ]; then
+			echo "Non-interactive mode, upgrade glibc forcibly"
+		    else
+		        echo -n "Press a key to continue"
+		        read answer
+		    fi
+		    echo
+		fi
+	    fi
+
+	    check="kdm postgresql xdm"
+	    # NSS services check: NSS_CHECK
+	    if [ -n "$services" ]; then 
+		if [ -f /usr/share/debconf/confmodule ] ; then
+	            db_version 2.0
+		    db_reset glibc/upgrade
+		    db_subst glibc/upgrade services $services
+		    db_input critical glibc/upgrade || true
+		    db_go || true
+		    db_get glibc/upgrade
+		    answer=$RET
+		else
+		    echo "Do you want to upgrade glibc now?"
+		    echo
+		    echo "Running services and programs that are using NSS need to be restarted,"
+		    echo "otherwise they might not be able to do lookup or authentication any more."
+		    echo "The installation process is able to restart some services (such as ssh or"
+		    echo "telnetd), but other programs cannot be restarted automatically.  One such"
+		    echo "program that needs manual stopping and restart after the glibc upgrade by"
+		    echo "yourself is xdm - because automatic restart might disconnect your active"
+		    echo "X11 sessions."
+		    echo
+		    echo "This script detected the following installed services which must be"
+		    echo "stopped before the upgrade: $services"
+		    echo
+		    echo "If you want to interrupt the upgrade now and continue later, please"
+		    echo "answer No to the question below."
+		    echo 
+		    frontend=`echo "$DEBIAN_FRONTEND" | tr '[:upper:]' '[:lower:]'`
+		    if [ "$frontend" = noninteractive ]; then
+			echo "Non-interactive mode, upgrade glibc forcibly"
+			answer=true
+		    else
+		        echo -n "Do you want to upgrade glibc now? [Y/n] "
+		        read answer
+		        case $answer in
+			    Y*|y*) answer=true ;;
+			    N*|n*) answer=false ;;
+			    *) answer=true ;;
+			esac
+		    fi
+		    echo
+		fi
+
+		if [ "x$answer" != "xtrue" ]; then
+	            echo "Stopped glibc upgrade.  Please retry the upgrade after you have"
+	            echo "checked or stopped services by hand."
+	            exit 1
+		fi
+	    fi
+	fi # end upgrading and $preversion lt 2.13
+    fi # Upgrading
+
+    # On upgrade from older glibc versions, our PI doesn't yet exist
+    # on-disk, despite the preinst wanting to play with it, so make one
+    if [ "${DPKG_MAINTSCRIPT_ARCH:-$(dpkg --print-architecture)}" = "armhf" ]; then
+	if dpkg --compare-versions "$preversion" lt 2.13-28; then
+	    ln -sf SLIBDIR/ld-linux.so.3 RTLD_SO
+	fi
+    fi
+
+    # This will keep us from using hwcap libs (optimized) during an
+    # upgrade.
+    touch /etc/ld.so.nohwcap
+
+    # Try to detect copies of the libc library in the various places
+    # the dynamic linker uses.
+    ldfile=$(readlink -m RTLD_SO)
+    if test -f "$file"; then
+        ldbytes=$(head -c 20 RTLD_SO | od -c)
+    else
+        # If the symlink to the dynamic linker is dangling or missing, set
+        # ldbytes to an empty string, the test below will fail and all the
+        # libraries found will be ignored.
+        ldbytes=""
+    fi
+    libcfiles=$(dpkg-query -L $(package_name) 2>/dev/null)
+
+    dirs="SLIBDIR /lib /lib/tls /lib32 /lib64 /usr/local/lib /usr/local/lib32 /usr/local/lib64"
+    for dir in $dirs ; do
+        check_dir "in an unexpected directory" $dir
+    done
+
+    if test -n "$LD_LIBRARY_PATH"; then
+        dirs=$(echo $LD_LIBRARY_PATH | sed 's/:/ /g')
+        for dir in $dirs ; do
+            check_dir "via LD_LIBRARY_PATH" $dir
+        done
+    fi
+
+    if test -e /etc/ld.so.conf; then
+        dirs=$(echo $(cat /etc/ld.so.conf))
+        if test -n "$dirs" ; then
+            for dir in $dirs ; do
+                check_dir "via /etc/ld.so.conf" $dir
+            done
+        fi
+    fi
+
+    if [ -e /lib/tls/i686/cmov/libc.so.6 ] || [ -e /lib/i686/cmov/libc.so.6 ] ; then
+        status_i686=$(dpkg -s libc6-i686 2>/dev/null | grep ^Status: | sed -e 's/^Status: \(.*\) \(.*\) \(.*\)/\3/g')
+        status_xen=$(dpkg -s libc6-xen 2>/dev/null | grep ^Status: | sed -e 's/^Status: \(.*\) \(.*\) \(.*\)/\3/g')
+        if ([ -z "$status_i686" ] || [ "$status_i686" = "not-installed" ] || [ "$status_i686" = "config-files" ]) && \
+             ([ -z "$status_xen" ] || [ "$status_xen" = "not-installed" ] || [ "$status_xen" = "config-files" ]); then
+            echo
+            echo "A non-dpkg owned copy of the libc6-i686 package was found."
+            echo "It is not safe to upgrade the C library in this situation;"
+            echo "please remove that copy of the C library and try again."
+            echo
+            exit 1
+        fi
+    fi
+
+    # ldconfig might have broken the ld.so symlink in case a biarch package
+    # of the same architecture than the native one has been installed (e.g.:
+    # libc6-amd64:i386 on amd64). Try to detect this by checking that the 
+    # ld.so symlink correctly points to ld-*.so in the slib directory, and 
+    # disabling ldconfig if it is not the case and the new version hasn't
+    # been unpacked yet. The symlink will be fixed when unpacking the new 
+    # libc version and ldconfig will be re-enabled when a new fixed version
+    # is unpacked.
+    if ! readlink -m RTLD_SO | grep -qE 'SLIBDIR/ld-[0-9.]+\.so' ; then
+        # The unpack order is not guaranteed, only disable ldconfig if 
+        # a "broken" version is installed.
+        libc_bin_version=$(dpkg-query -W -f='${Version}' libc-bin)
+        if dpkg --compare-versions "$libc_bin_version" lt "2.13-38+deb7u2"; then
+            echo "Warning: found a potentially broken dynamic loader symlink,"
+            echo "disabling ldconfig to avoid a possible system breakage. It"
+            echo "will be reenabled when a new version of libc-bin is unpacked." 
+            ln -sf /bin/true /sbin/ldconfig
+        fi
+    fi
+fi
+
+if [ "$type" != abort-upgrade ]
+then
+    # See if LD_LIBRARY_PATH contains the traditional /lib, but not the
+    # multiarch path
+    dirs=$(echo $LD_LIBRARY_PATH | sed 's/:/ /g')
+    for dir in $dirs ; do
+        dir=$(readlink -e $dir || true)
+        case "$dir" in
+        /lib)
+            seen_traditional=1
+            ;;
+        SLIBDIR)
+            seen_multiarch=1
+            ;;
+        esac
+    done
+    if test -n "$seen_traditional" && test -z "$seen_multiarch" ; then
+        echo
+        echo "LD_LIBRARY_PATH contains the traditional /lib directory,"
+        echo "but not the multiarch directory SLIBDIR."
+        echo "It is not safe to upgrade the C library in this situation;"
+        echo "please remove the /lib/directory from LD_LIBRARY_PATH and" 
+        echo "try again."
+        echo
+        exit 1
+    fi
+
+    if [ -n "$LD_ASSUME_KERNEL" ] ; then
+        if dpkg --compare-versions "$LD_ASSUME_KERNEL" le "2.6.1"; then
+           echo
+           echo "POSIX threads library NPTL requires kernel version 2.6.1"
+           echo "or later.  It appears that LD_ASSUME_KERNEL is set to $LD_ASSUME_KERNEL."
+           echo "It is not safe to upgrade the C library in this situation;"
+           echo "Please unset this environment variable and try again."
+           echo
+           exit 1
+       fi
+    fi
+
+    # glibc kernel version check
+    system=`uname -s`
+    if [ "$system" = "Linux" ]
+    then
+        # Test to make sure z < 255, in x.y.z-n form of kernel version
+        # Also make sure we don't trip on x.y.zFOO-n form
+        kernel_rev=$(uname -r | sed 's/\([0-9]*\.\)\{1,2\}\([0-9]*\)\(.*\)/\2/')
+        if [ "$kernel_rev" -ge 255 ]
+        then
+            echo "WARNING: Your kernel version indicates a revision number"
+            echo "of 255 or greater.  Glibc has a number of built in"
+            echo "assumptions that this revision number is less than 255."
+            echo "If you\'ve built your own kernel, please make sure that any"
+            echo "custom version numbers are appended to the upstream"
+            echo "kernel number with a dash or some other delimiter."
+            echo
+            exit 1
+        fi
+
+        # sanity checking for the appropriate kernel on each architecture.
+        realarch=`uname -m`
+        kernel_ver=`uname -r`
+
+        # convert "armv4l" and similar to just "arm", and "mips64" and similar
+        # to just "mips"
+        case $realarch in
+            arm*) realarch="arm";;
+            mips*) realarch="mips";;
+        esac
+
+        # The GNU libc requires a >= 2.6.26 kernel, except on m68k where a
+        # 2.6.32 kernel is needed.
+        if [ "$realarch" != m68k ]
+        then
+            vmin=2.6.26
+        else
+            vmin=2.6.32
+        fi
+        if linux_compare_versions "$kernel_ver" lt ${vmin}
+        then
+            echo WARNING: this version of the GNU libc requires kernel version
+            echo ${vmin} or later.  Please upgrade your kernel before installing
+            echo glibc.
+            kernel26_help
+
+            exit 1
+        fi
+
+        # From glibc 2.6-3 SPARC V8 support is dropped.
+        if [ "$realarch" = sparc ]
+        then
+            # The process could be run using linux32, check for /proc.
+            if [ -f /proc/cpuinfo ]
+            then
+               case "$(sed '/^type/!d;s/^type.*: //g' /proc/cpuinfo)" in
+                   sun4u)
+                      # UltraSPARC CPU
+                      ;;
+                   sun4v)
+                      # Niagara CPU
+                      ;;
+                   *)
+                      echo "WARNING: This machine has a SPARC V8 or earlier class processor."
+                      echo "Debian lenny and later does not support such old hardware"
+                      echo "any longer."
+                      exit 1
+                      ;;
+               esac
+            fi
+        fi
+    elif [ $system = "GNU/kFreeBSD" ] ; then
+        kernel_ver=`uname -r`
+        if kfreebsd_compare_versions "$kernel_ver" lt 8.1
+        then
+            echo WARNING: this version of the GNU libc requires kernel version
+            echo 8.1 or later.  Please upgrade your kernel before installing
+            echo glibc.
+            exit 1
+        fi
+    fi
+fi
+
+#DEBHELPER#
+
+case $type in
+    upgrade|abort-upgrade)
+        if test -L /lib64 && dpkg --compare-versions "$2" lt 2.13-17; then
+            case ${DPKG_MAINTSCRIPT_ARCH:-$(dpkg --print-architecture)} in
+                amd64 | ppc64 | sparc64)
+                    remove_lib64_symlink
+                    ;;
+            esac
+        fi
+        ;;
+esac
+
+if [ -n "$preversion" ]; then
+    if dpkg --compare-versions "$preversion" lt 2.13-38; then
+       # upgrading from a pre-multiarch libc to a multiarch libc; we have
+       # to blow away /etc/ld.so.cache, otherwise the old unpacked libc
+       # is still first in the cache and segfaults when combined with
+       # our newly-unpacked ld.so. Do this last to avoid slowing down the
+       # rest of the upgrade.  Version number bumped to 2.13-38 to also
+       # cover cache format upgrades for ARM.
+       rm -f /etc/ld.so.cache
+    fi
+fi
+
+exit 0
--- eglibc-2.13.orig/debian/debhelper.in/libc.templates
+++ eglibc-2.13/debian/debhelper.in/libc.templates
@@ -0,0 +1,62 @@
+Template: glibc/upgrade
+Type: boolean
+Default: true
+_Description: Do you want to upgrade glibc now?
+ Running services and programs that are using NSS need to be restarted,
+ otherwise they might not be able to do lookup or authentication any more.
+ The installation process is able to restart some services (such as ssh or
+ telnetd), but other programs cannot be restarted automatically. One such
+ program that needs manual stopping and restart after the glibc upgrade by
+ yourself is xdm - because automatic restart might disconnect your active
+ X11 sessions.
+ .
+ This script detected the following installed services which must be
+ stopped before the upgrade: ${services}
+ .
+ If you want to interrupt the upgrade now and continue later, please
+ answer No to the question below.
+
+Template: glibc/restart-services
+Type: string
+_Description: Services to restart for GNU libc library upgrade:
+ Running services and programs that are using NSS need to be restarted,
+ otherwise they might not be able to do lookup or authentication any more
+ (for services such as ssh, this can affect your ability to login).
+ Please review the following space-separated list of init.d scripts for
+ services to be restarted now, and correct it if needed.
+ .
+ Note: restarting sshd/telnetd should not affect any existing connections.
+
+Template: glibc/restart-failed
+Type: error
+#flag:translate!:3
+_Description: Failure restarting some services for GNU libc upgrade
+ The following services could not be restarted for the GNU libc library upgrade:
+ .
+ ${services}
+ .
+ You will need to start these manually by running
+ '/etc/init.d/<service> start'.
+
+Template: glibc/disable-screensaver
+Type: error
+_Description: xscreensaver and xlockmore must be restarted before upgrading
+ One or more running instances of xscreensaver or xlockmore have been
+ detected on this system. Because of incompatible library changes, the
+ upgrade of the GNU libc library will leave you unable to
+ authenticate to these programs. You should arrange for these programs
+ to be restarted or stopped before continuing this upgrade, to avoid
+ locking your users out of their current sessions.
+
+Template: libraries/restart-without-asking
+Type: boolean
+Default: false
+_Description: Restart services during package upgrades without asking?
+ There are services installed on your system which need to be restarted
+ when certain libraries, such as libpam, libc, and libssl, are upgraded.
+ Since these restarts may cause interruptions of service for the system,
+ you will normally be prompted on each upgrade for the list of services
+ you wish to restart.  You can choose this option to avoid being prompted;
+ instead, all necessary restarts will be done for you automatically so you
+ can avoid being asked questions on each library upgrade.
+
--- eglibc-2.13.orig/debian/debhelper.in/locales.install
+++ eglibc-2.13/debian/debhelper.in/locales.install
@@ -0,0 +1,7 @@
+debian/tmp-libc/usr/share/locale/[a-z][a-z] usr/share/locale
+debian/tmp-libc/usr/share/locale/[a-z][a-z]_[A-Z][A-Z] usr/share/locale
+debian/tmp-libc/usr/share/locale/locale.alias /etc
+debian/tmp-libc/usr/share/i18n/* usr/share/i18n
+debian/local/usr_sbin/locale-gen usr/sbin
+debian/local/usr_sbin/update-locale usr/sbin
+debian/local/usr_sbin/validlocale usr/sbin
--- eglibc-2.13.orig/debian/debhelper.in/libc.lintian-overrides
+++ eglibc-2.13/debian/debhelper.in/libc.lintian-overrides
@@ -0,0 +1,13 @@
+# libpthread must be stripped specially; GDB needs the non-dynamic 
+# symbol table in order to load the thread debugging library.
+LIBC: unstripped-binary-or-object */libpthread-2.13.so
+
+# ld.so must be executable, otherwise the system will not work
+LIBC: shlib-with-executable-bit */ld-2.13.so 0755
+
+# It is normal that the ELF dynamic linker does not need any other 
+# library
+LIBC: shared-lib-without-dependency-information */ld-2.13.so
+
+# dependency on debconf is not needed, as glibc has a fallback to tty 
+LIBC: missing-debconf-dependency-for-preinst
--- eglibc-2.13.orig/debian/debhelper.in/locales.prerm
+++ eglibc-2.13/debian/debhelper.in/locales.prerm
@@ -0,0 +1,19 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    remove|purge)
+    	# This test should be kept only for compatibility with old 
+	# locales-all packages, new ones don't use locale-archive.
+    	if ! [ -f /usr/lib/locales-all/supported.tar.lzma ] ; then
+		# If locales-all is not installed, clean the locales
+		rm -f /usr/lib/locale/locale-archive
+	fi
+	;;
+    *)
+    	;;
+esac
+
+#DEBHELPER#
+
+exit 0
--- eglibc-2.13.orig/debian/debhelper.in/libnss-files-udeb.install
+++ eglibc-2.13/debian/debhelper.in/libnss-files-udeb.install
@@ -0,0 +1,3 @@
+# FIXME: someday we may need to handle installing into non-lib.
+TMPDIR/SLIBDIR/libnss_files*.so* lib
+
--- eglibc-2.13.orig/debian/debhelper.in/locales.bug-presubj
+++ eglibc-2.13/debian/debhelper.in/locales.bug-presubj
@@ -0,0 +1,18 @@
+locales dependencies on glibc
+=============================
+
+  If at some point (in unstable) you get messages like:
+
+    The following packages have unmet dependencies:
+      locales: Depends: glibc-2.6-1 which is a virtual package.
+
+  then please check for example on [1] that the glibc of the _same_ version as
+  the `locales` package you are trying to upgrade is in state _installed_ for
+  your architecture, and for how long.
+
+  If it's not, it is very likely that the corresponding libc has not been
+  built _and_ uploaded to the mirrors for your architecture yet, and that the
+  dependencies will be fixed soon. Please wait for the package to be installed
+  for more than 24 hours before reporting a bug about `locales` dependencies.
+
+  [1] http://buildd.debian.org/~jeroen/status/package.php?p=glibc
--- eglibc-2.13.orig/debian/debhelper.in/libc-prof.README.Debian
+++ eglibc-2.13/debian/debhelper.in/libc-prof.README.Debian
@@ -0,0 +1,23 @@
+README.Debian for libc-prof
+---------------------------
+
+gprof is the GNU Profiler, a tool used when tracking which functions are
+eating CPU in your program. Anyway, you should already be familiar with
+it if you got interested by this package.
+
+This package provides a version of the GNU Libc compiled for profiling
+in order to get profiling information from standard library functions
+such as malloc, read or open.
+
+In order to use it, you have to use `-static-libgcc -lc_p' in addition 
+to the normal `-pg'. `-static-libgcc' is needed to ensure that libgcc
+does not pull the dynamic version of the GNU Libc.
+
+For instance here is how to compile and link myprog.c with profiling:
+  gcc -g -pg -o myprog.o -c myprog.c
+  gcc -pg -o myprog myprog.o -static-libgcc -lc_p
+
+This also works with a command that both compiles and links: 
+  gcc -g -pg -o myprog myprog.c -static-libgcc -lc_p
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sun, 06 Apr 2008 11:28:25 +0200
--- eglibc-2.13.orig/debian/debhelper.in/libc-bin.install
+++ eglibc-2.13/debian/debhelper.in/libc-bin.install
@@ -0,0 +1,20 @@
+debian/local/etc/bindresvport.blacklist etc
+debian/local/etc/ld.so.conf.d etc
+debian/local/etc/nsswitch.conf usr/share/libc-bin
+nis/nss etc/default
+posix/gai.conf etc
+debian/tmp-libc/sbin/ldconfig sbin
+debian/tmp-libc/usr/bin/catchsegv usr/bin
+debian/tmp-libc/usr/bin/getconf usr/bin
+debian/tmp-libc/usr/bin/getent usr/bin
+debian/tmp-libc/usr/bin/iconv usr/bin
+debian/tmp-libc/usr/bin/ldd usr/bin
+debian/tmp-libc/usr/bin/localedef usr/bin
+debian/tmp-libc/usr/bin/locale usr/bin
+debian/tmp-libc/usr/bin/tzselect usr/bin
+debian/tmp-libc/usr/lib/pt_chown usr/lib
+debian/tmp-libc/usr/sbin/iconvconfig usr/sbin
+debian/tmp-libc/usr/sbin/rpcinfo usr/bin
+debian/tmp-libc/usr/sbin/zdump usr/bin
+debian/tmp-libc/usr/sbin/zic usr/sbin
+BUILD-TREE/C.UTF-8 usr/lib/locale
--- eglibc-2.13.orig/debian/debhelper.in/libc.prerm
+++ eglibc-2.13/debian/debhelper.in/libc.prerm
@@ -0,0 +1,70 @@
+#!/bin/sh
+set -e
+export LC_ALL=C
+
+type=$1
+if [ "x$2" != "xin-favour" ]; then
+    preversion=$2
+fi
+
+restore_lib64_symlink() {
+# Downgrading from a version with a /lib64 directory to a version with
+# a /lib64 symlink is extremely dangerous.  We need to move the
+# directory aside and restore the symlink, otherwise the dynamic
+# linker gets lost after unpacking the replacing version.
+
+    ldfile=$(readlink -e RTLD_SO)
+    # Test if libc is of the same architecture as coreutils
+    # If not, they almost surely have a multiarch system and we can use
+    # the native ELF interpreter
+    if ! $ldfile /bin/true 2>/dev/null; then
+	interpreter=
+    else
+	interpreter=$ldfile
+    fi
+
+    # Create the symlink in /lib again
+    cp -a RTLD_SO /lib/
+
+    # sync before and after the operation to reduce the danger of hosing
+    # the system
+    sync
+    # See if they have anything in /lib64 besides the ELF interpreter.
+    # If yes, move the directory aside so they can restore it later,
+    # otherwise we just remove it.
+    if ls -1A /lib64 | grep -vq "^$(basename RTLD_SO)$"; then
+	echo "Warning: /lib64 not empty during libc downgrade, renaming it to /lib64.eglibc-old"
+	mv /lib64 /lib64.eglibc-old
+    else
+	rm -rf /lib64
+    fi
+
+    $interpreter /bin/ln -s /lib /lib64
+    sync
+}
+
+
+#DEBHELPER#
+
+if [ "$type" = upgrade ]; then
+    if dpkg --compare-versions "$preversion" lt 2.13-17; then
+	if ! test -L /lib64; then
+	    case ${DPKG_MAINTSCRIPT_ARCH:-$(dpkg --print-architecture)} in
+		amd64 | ppc64 | sparc64)
+		    restore_lib64_symlink ;;
+	    esac
+	fi
+    fi
+fi
+
+if [ -n "$preversion" ]; then
+    if dpkg --compare-versions "$preversion" lt 2.13-5; then
+        # downgrading from a multiarch libc to a pre-multiarch libc; we have
+        # to blow away /etc/ld.so.cache, otherwise the old unpacked libc
+        # is still first in the cache and segfaults when combined with
+        # our newly-unpacked ld.so. 
+        rm -f /etc/ld.so.cache
+    fi
+fi
+
+exit 0
--- eglibc-2.13.orig/debian/debhelper.in/libc.NEWS
+++ eglibc-2.13/debian/debhelper.in/libc.NEWS
@@ -0,0 +1,106 @@
+eglibc (2.13-25) unstable; urgency=medium
+
+  Starting with the eglibc package version 2.13-5, the libraries are 
+  shipped in the multiarch directory /lib/<triplet> instead of the more
+  traditional /lib, where <triplet> is the multiarch triplet and can be
+  retrieved with 'dpkg-architecture -qDEB_HOST_MULTIARCH'. Similarly the
+  includes are now shipped in /usr/include/<triplet> instead of the more
+  traditional /usr/include.
+  
+  The toolchain in Debian has been updated to cope with that, and most
+  build systems should be unaffected. If you are using a non-Debian 
+  toolchain to build your software and it is not able to cope with 
+  multiarch, you might try to pass the following options to your 
+  compiler:
+
+    -B/usr/lib/<triplet> -I/usr/include/<triplet>
+  
+  Alternatively if the build system makes hard to pass the above options,
+  you might try to set the LIBRARY_PATH and CPATH environment variables:                                                                                                                                                          
+    LIBRARY_PATH=/usr/lib/<triplet>
+    CPATH=/usr/include/<triplet>
+    export LIBRARY_PATH CPATH
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 09 Jan 2012 12:47:16 +0100 
+
+eglibc (2.13-7) unstable; urgency=low
+
+  Starting with version 2.13, eglibc provides an SSSE3 optimized version 
+  of memcpy() on the amd64 architecture. This version might copy memory 
+  backward in some conditions, which causes issues if the source and 
+  destination overlap. memmove() should be used in such cases, but some 
+  programs still wrongly use memcpy().
+
+  For this reason, on the amd64 architecture the Debian package provides 
+  two wrappers which can be use to workaround and/or debug the issue:
+  - /usr/lib/x86_64-linux-gnu/libc/memcpy-preload.so simply replace all 
+    calls to memcpy() by a call to memmove()
+  - /usr/lib/x86_64-linux-gnu/libc/memcpy-syslog-preload.so does the same,
+    but in addition logs (with rate limit) the issue to syslog, so that it 
+    can be detected and fixed.
+
+  To use these wrapper on a single binary, the easiest way is to use the
+  LD_PRELOAD environment variable:
+  - LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libc/memcpy-preload.so /path/to/binary
+  - LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libc/memcpy-syslog-preload.so /path/to/binary
+
+  For system-wide usage, it is possible to add the path of one of the 
+  wrapper to /etc/ld.so.preload.
+
+  For more details about the issue, please see:
+    http://bugs.debian.org/625521
+    http://sourceware.org/bugzilla/show_bug.cgi?id=12518
+
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 11 Jun 2011 18:02:52 +0200
+
+glibc (2.9-8) unstable; urgency=low
+
+  Starting with version 2.9-8, unified IPv4/IPv6 lookup have been enabled
+  in the glibc's resolver. This is faster, fixes numerous of bugs, but is
+  problematic on some broken DNS servers and/or wrongly configured 
+  firewalls. 
+  
+  If such a DNS server is detected, the resolver switches (permanently
+  for that process) to a mode where the second request is sent only when
+  the first answer has been received. This means the first request will
+  be timeout, but subsequent requests should be fast again. This 
+  behaviour can be enabled permanently by adding 'options single-request'
+  to /etc/resolv.conf.  
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 23 Apr 2009 21:14:32 +0200
+
+glibc (2.6.1-2) unstable; urgency=low
+
+  Starting with version 2.6.1, glibc ships a /etc/ld.so.conf.d/libc.conf that
+  enforces /usr/local/lib to take precedence over /usr/lib. This is the
+  intended behaviour (it works like the $PATH where /usr/local/bin takes
+  precedence over /usr/bin).
+
+  To revert that (though doing so is discouraged) you can add /usr/lib to the
+  beginning of /etc/ld.so.conf.d/libc.conf. (see bug#440394).
+
+ -- Pierre Habouzit <madcoder@debian.org>  Sat, 01 Sep 2007 16:58:15 +0200
+
+glibc (2.5-1) unstable; urgency=low
+
+  The script tzconfig has been removed from glibc 2.5-1 and following 
+  versions. Please use 'dpkg-reconfigure tzdata' instead to configure
+  the timezone.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Fri, 16 Nov 2007 15:38:54 +0100
+
+glibc (2.5-1) unstable; urgency=low
+
+  Starting with version 2.5-1, the glibc requires a 2.6.1 or later 
+  kernel.  If you use a 2.4 kernel, please upgrade it *before*
+  installing glibc.
+
+  This also means that it is not possible to use LD_ASSUME_KERNEL with a
+  version lower than 2.6.1. If you have set such a thing in /etc/profile, 
+  ~/.bashrc or any other initialization file (something you should have
+  never done!!!), please remove that *before* installing glibc.
+
+  Note: This does not apply to the m68k architecture and to non-Linux
+        kernels.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 24 Apr 2007 00:26:48 +0200
--- eglibc-2.13.orig/debian/debhelper.in/libc-dev.lintian-overrides
+++ eglibc-2.13/debian/debhelper.in/libc-dev.lintian-overrides
@@ -0,0 +1,4 @@
+# Those file are actually .o files not package in a ar archive, and
+# thus should not be stripped
+LIBC-dev: unstripped-binary-or-object */libieee.a
+LIBC-dev: unstripped-binary-or-object */libmcheck.a
--- eglibc-2.13.orig/debian/debhelper.in/libc.postinst
+++ eglibc-2.13/debian/debhelper.in/libc.postinst
@@ -0,0 +1,231 @@
+#!/bin/sh
+set -e
+export LC_ALL=C
+
+type=$1
+preversion=$2
+
+package_name()
+{
+    if dpkg --assert-multi-arch 2>/dev/null; then
+        echo LIBC:${DPKG_MAINTSCRIPT_ARCH}
+    else
+        echo LIBC
+    fi
+}
+
+# element() is a helper function for file-rc:
+element() {
+    local element list IFS
+
+    element="$1"
+
+    [ "$2" = "in" ] && shift
+    list="$2"
+    [ "$list" = "-" ] && return 1
+    [ "$list" = "*" ] && return 0
+
+    IFS=","
+    set -- $list
+    case $element in
+	"$1"|"$2"|"$3"|"$4"|"$5"|"$6"|"$7"|"$8"|"$9")
+	    return 0
+    esac
+    return 1
+}
+
+# filerc (runlevel, service) returns /etc/init.d/service, if service is
+# running in $runlevel:
+filerc() {
+    local runlevel basename
+    runlevel=$1
+    basename=$2
+    while read LINE
+    do
+	case $LINE in
+	    \#*|"") continue
+	esac
+
+	set -- $LINE
+	SORT_NO="$1"; STOP="$2"; START="$3"; CMD="$4"
+	[ "$CMD" = "/etc/init.d/$basename" ] || continue
+
+	if element "$runlevel" in "$START" || element "S" in "$START"
+	then
+	    echo "/etc/init.d/$basename"
+	    return 0
+	fi
+    done < /etc/runlevel.conf
+    echo ""
+}
+
+checkpkgver () {
+    local status pkg
+    pkg=$1
+    status=$(dpkg -s $pkg 2>/dev/null | grep ^Status: | sed -e 's/^Status: \(.*\) \(.*\) \(.*\)/\3/g')
+    if [ -n "$status" ] && [ "$status" != "not-installed" ] && [ "$status" != "config-files" ]; then
+	echo $(dpkg -s $pkg 2>/dev/null | grep ^Version: | sed -e 's/^Version: *//');
+    fi
+}
+
+if [ "$type" = "configure" ]
+then
+    # Add support for /etc/ld.so.conf.d
+    if [ -e /etc/ld.so.conf ]; then
+        [ -z "$(tail -n 1 /etc/ld.so.conf)" ] || echo >> /etc/ld.so.conf
+    else
+        touch /etc/ld.so.conf
+    fi
+    if ! grep -q '^include /etc/ld.so.conf.d/.*\.conf$' /etc/ld.so.conf ; then
+        echo 'include /etc/ld.so.conf.d/*.conf' >> /etc/ld.so.conf
+    fi
+
+    # We don't use a registry anymore, remove the old file
+    rm -f /etc/ld.so.hwcappkgs
+ 
+    # /etc/ld.so.nohwcap code: NOHWCAP
+
+    # Load debconf module if available
+    if [ -f /usr/share/debconf/confmodule ] ; then
+	. /usr/share/debconf/confmodule
+    fi
+
+    if [ -n "$preversion" ]; then
+	if [ ! -d /var/mail ] && [ ! -L /var/mail ]; then
+	    ln -sf spool/mail /var/mail
+	fi
+	if dpkg --compare-versions "$preversion" lt 2.13; then
+	    check="apache2.2-common apache apache-ssl apache-perl autofs at"
+	    check="$check boa cucipop courier-authdaemon cron cups exim"
+	    check="$check exim4-base dovecot-common cucipop incron lprng lpr"
+	    check="$check lpr-ppd mysql-server nis openbsd-inetd"
+	    check="$check openldapd proftpd postfix postfix-tls rsync samba"
+	    check="$check sasl2-bin slapd smail sendmail snmpd ssh"
+	    check="$check spamassassin vsftpd wu-ftpd wu-ftpd-academ wwwoffle"
+	    check="$check webmin dropbear gdm"
+	    # NSS services check: NSS_CHECK
+	    if [ -n "$services" ]; then
+
+	        if [ -f /usr/share/debconf/confmodule ] ; then
+		    db_version 2.0
+		    db_input critical libraries/restart-without-asking || true
+		    db_go || true
+		    db_get libraries/restart-without-asking
+		    if [ "$RET" != true ]; then
+			db_reset glibc/restart-services
+			db_set glibc/restart-services "$services"
+			db_input critical glibc/restart-services || true
+			db_go || true
+			db_get glibc/restart-services
+			if [ "x$RET" != "x" ]
+			then
+			    services="$RET"
+			else
+			    services=""
+			fi
+		    fi
+		else
+		    echo
+		    echo "Name Service Switch update in the C Library: post-installation question."
+		    echo
+		    echo "Running services and programs that are using NSS need to be restarted,"
+		    echo "otherwise they might not be able to do lookup or authentication any more"
+		    echo "(for services such as ssh, this can affect your ability to login)."
+		    echo "Note: restarting sshd/telnetd should not affect any existing connections."
+		    echo
+		    echo "The services detected are: "
+		    echo "        $services"
+		    echo
+		    echo "If other services have begun to fail mysteriously after this upgrade, it is"
+		    echo "probably necessary to restart them too.  We recommend that you reboot your"
+		    echo "machine after the upgrade to avoid NSS-related troubles."
+		    echo
+		    frontend=`echo "$DEBIAN_FRONTEND" | tr '[:upper:]' '[:lower:]'`
+		    if [ "$frontend" = noninteractive ]; then
+		    	echo "Non-interactive mode, restarting services"
+		    	answer=yes
+		    else
+		    	echo -n "Do you wish to restart services? [Y/n] "
+		    	read answer
+		    	case $answer in
+			    N*|n*) services="" ;;
+			    *) ;;
+		        esac
+		    fi
+		fi
+		echo
+		if [ "$services" != "" ]; then
+		    echo "Restarting services possibly affected by the upgrade:"
+		    failed=""
+		    for service in $services; do
+		    	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+			    idl="invoke-rc.d ${service}"
+			elif [ -f /usr/share/file-rc/rc ] || [ -f /usr/lib/file-rc/rc ] && [ -f /etc/runlevel.conf ]; then
+			    idl=$(filerc $rl $service)
+			else
+			    idl=$(ls /etc/rc${rl}.d/S??${service} 2> /dev/null | head -1)
+			fi
+			case "$service" in
+			    gdm)
+				echo -n "  $service: reloading..."
+				if $idl reload > /dev/null 2>&1; then
+				    echo "done."
+				else
+				    echo "FAILED! ($?)"
+				    failed="$service $failed"
+				fi
+				;;
+			    *)
+				echo -n "  $service: restarting..."
+				if $idl restart > /dev/null 2>&1; then
+				    echo "done."
+				else
+				    echo "FAILED! ($?)"
+				    failed="$service $failed"
+				fi
+				;;
+			esac
+		    done
+		    echo
+		    if [ -n "$failed" ]; then
+	        	if [ -f /usr/share/debconf/confmodule ] ; then
+		    	    db_fset glibc/restart-failed seen false
+			    db_subst glibc/restart-failed services "$failed"
+			    db_input critical glibc/restart-failed || true
+			    db_go || true
+			else
+			    echo "The following services failed to start: $failed"
+			    echo
+			    echo "You will need to start these manually by running \`/etc/init.d/<service> start'"
+			    echo "If the service still fails to start, you may need to file a bug on"
+			    echo "$(package_name) or the service involved."
+			    frontend=`echo "$DEBIAN_FRONTEND" | tr '[:upper:]' '[:lower:]'`
+			    if [ "$frontend" != noninteractive ]; then
+			    	echo
+			    	echo -n "Press ENTER to continue: "
+			    	read foo
+			    fi
+			fi
+		    else
+			echo "Services restarted successfully."
+                    fi
+		fi
+                # Shut down the frontend, to make sure none of the
+		# restarted services keep a connection open to it
+	        if [ -f /usr/share/debconf/confmodule ] ; then
+		    db_stop
+		fi
+	    else
+		echo "Nothing to restart."
+	    fi
+	fi # end upgrading and $preversion lt 2.13
+    fi # Upgrading
+
+    # Restart init. If it fails, there is nothing we can do, so 
+    # just ignore the error
+    telinit u 2> /dev/null || true ; sleep 1
+fi
+
+#DEBHELPER#
+
+exit 0
--- eglibc-2.13.orig/debian/debhelper.in/libc.postrm
+++ eglibc-2.13/debian/debhelper.in/libc.postrm
@@ -0,0 +1,42 @@
+#! /bin/sh
+set -e
+
+if [ "$1" = remove ]; then
+    if command -v suidunregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then
+	if [ -x /usr/lib/pt_chown ]; then
+	    suidunregister -s LIBC /usr/lib/pt_chown
+	elif [ -x /usr/libexec/pt_chown ]; then
+	    suidunregister -s LIBC /usr/libexec/pt_chown
+	fi
+    fi
+    # When both the multiarch and the corresponding biarch packages are
+    # installed, removing the multiarch package will remove the dynamic
+    # linker. Recreate it in the postinst.
+    ARCH=${DPKG_MAINTSCRIPT_ARCH:-$(dpkg --print-architecture)}
+    case "${ARCH}" in
+        kfreebsd-i386 | s390 | powerpc)
+            target="/lib32/ld.so.1"
+            ;;
+        i386 | sparc)
+            target="/lib32/ld-linux.so.2"
+            ;;
+        *)
+            target="$(dpkg-query -L LIBC-${ARCH} 2>/dev/null | grep -E '/lib.*/ld-[0-9.]+\.so$' || true)"
+            ;;
+    esac
+    if [ -f "$target" ] && ! [ -f RTLD_SO ] ; then
+        ln -sf ${target#$(dirname RTLD_SO)/} RTLD_SO
+    fi
+fi
+
+if [ "$1" = deconfigure ]; then
+    :; # blah, do something useful with ldso
+fi
+
+#if [ "$1" = purge ]; then
+#    update-rc.d mountkernfs remove > /dev/null
+#fi
+
+#DEBHELPER#
+
+exit 0
--- eglibc-2.13.orig/debian/debhelper.in/libc-otherbuild.install
+++ eglibc-2.13/debian/debhelper.in/libc-otherbuild.install
@@ -0,0 +1,5 @@
+# This file is used for making NPTL and other
+# optimized libraries.
+TMPDIR/SLIBDIR/*.so* SLIBDIR
+
+BUILD-TREE/test-results-*-FLAVOR usr/share/doc/LIBC-FLAVOR
--- eglibc-2.13.orig/debian/debhelper.in/libc-dev-bin.install
+++ eglibc-2.13/debian/debhelper.in/libc-dev-bin.install
@@ -0,0 +1,4 @@
+debian/tmp-libc/usr/bin/gencat usr/bin
+debian/tmp-libc/usr/bin/mtrace usr/bin
+debian/tmp-libc/usr/bin/rpcgen usr/bin
+debian/tmp-libc/usr/bin/sprof usr/bin
--- eglibc-2.13.orig/debian/debhelper.in/locales-all.install
+++ eglibc-2.13/debian/debhelper.in/locales-all.install
@@ -0,0 +1 @@
+BUILD-TREE/locales-all/usr/lib/locale/* /usr/lib/locale
--- eglibc-2.13.orig/debian/debhelper.in/locales.manpages
+++ eglibc-2.13/debian/debhelper.in/locales.manpages
@@ -0,0 +1,4 @@
+debian/local/manpages/locale-gen.8
+debian/local/manpages/locale.gen.5
+debian/local/manpages/update-locale.8
+debian/local/manpages/validlocale.8
--- eglibc-2.13.orig/debian/debhelper.in/libc-bin.lintian-overrides
+++ eglibc-2.13/debian/debhelper.in/libc-bin.lintian-overrides
@@ -0,0 +1,10 @@
+# ldconfig must be executable even when the libc is not configured, and
+# thus must be linked statically
+libc-bin: statically-linked-binary ./sbin/ldconfig
+
+# pt_chown must be setuid root, otherwise non-root users won't be able
+# to login
+libc-bin: setuid-binary usr/lib/pt_chown 4755 root/root
+
+# libc-bin depending on libc6 make apt crazy...
+libc-bin: missing-depends-line
--- eglibc-2.13.orig/debian/debhelper.in/libc-otherbuild.postinst
+++ eglibc-2.13/debian/debhelper.in/libc-otherbuild.postinst
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ]
+then
+    # /etc/ld.so.nohwcap code: NOHWCAP
+fi
+
+#DEBHELPER#
+
+exit 0
--- eglibc-2.13.orig/debian/debhelper.in/libc-bin.manpages
+++ eglibc-2.13/debian/debhelper.in/libc-bin.manpages
@@ -0,0 +1,13 @@
+debian/local/manpages/catchsegv.1
+debian/local/manpages/gai.conf.5
+debian/local/manpages/getconf.1
+debian/local/manpages/iconv.1
+debian/local/manpages/iconvconfig.8
+debian/local/manpages/ldconfig.8
+debian/local/manpages/ldd.1 
+debian/local/manpages/locale.1
+debian/local/manpages/localedef.1
+debian/local/manpages/rpcinfo.8
+debian/local/manpages/tzselect.1
+debian/local/manpages/zdump.1
+debian/local/manpages/zic.8
--- eglibc-2.13.orig/debian/debhelper.in/libc-dev.docs
+++ eglibc-2.13/debian/debhelper.in/libc-dev.docs
@@ -0,0 +1,5 @@
+CONFORMANCE
+FAQ
+NAMESPACE
+README.libm
+NOTES
--- eglibc-2.13.orig/debian/debhelper.in/locales.config
+++ eglibc-2.13/debian/debhelper.in/locales.config
@@ -0,0 +1,92 @@
+#! /bin/sh
+set -e
+
+# Files
+LG="/etc/locale.gen"
+EE="/etc/default/locale"
+
+# Sanitize environnement
+LC_ALL=C
+LANG=C
+
+# Load debconf
+. /usr/share/debconf/confmodule
+db_version 2.0
+db_capb backup multiselect
+
+# Conversion of locales that have been removed 
+convert_locale()
+{
+    echo "$1" | sed -e "s/no_NO/nb_NO/g" -e 's/ks_IN/ks_IN@devanagari/g'
+}
+
+# List of locales provided by the current version
+PROVIDED_LOCALES="__PROVIDED_LOCALES__"
+
+# List of locales provided by the user
+if [ -f /usr/local/share/i18n/SUPPORTED ] ; then
+    USER_LOCALES="$(sed -e '/^[a-zA-Z]/!d' -e 's/ *$//g' /usr/local/share/i18n/SUPPORTED)"
+fi
+
+# List of locales in /etc/locale.gen
+if [ -e $LG ]; then
+  GEN_LOCALES="$(sed -e '/^[a-zA-Z]/!d' -e 's/ *$//g' $LG)"
+  GEN_LOCALES="$(convert_locale "$GEN_LOCALES")"
+fi
+
+# List of supported locales (PROVIDED_LOCALES + USER_LOCALES + GEN_LOCALES)
+SUPPORTED_LOCALES="$(printf '%s\n' "$PROVIDED_LOCALES" "$USER_LOCALES" "$GEN_LOCALES" | grep -v "^$" | sort -u | tr '\n' ',' | sed -e 's/, */, /g' -e 's/, *$//g')"
+db_subst locales/locales_to_be_generated locales "$SUPPORTED_LOCALES"
+
+# Get the list of selected locales from /etc/locale.gen
+if [ -e /etc/locale.gen ]; then
+    if [ -L $LG ] && [ "$(readlink $LG)" = "/usr/share/i18n/SUPPORTED" ]; then
+        SELECTED_LOCALES="All locales"
+    else
+        SELECTED_LOCALES="$(echo "$GEN_LOCALES" | sort -u | tr '\n' ',' | sed -e 's/, */, /g' -e 's/, *$//g')"
+    fi
+    db_set locales/locales_to_be_generated "$SELECTED_LOCALES"
+fi
+
+DEFAULT_ENVIRONMENT="$(cat /etc/environment /etc/default/locale 2>/dev/null | awk '/^LANG=/ {gsub("\"", ""); sub("LANG=", ""); lang=$0;} END {print lang}')"
+DEFAULT_ENVIRONMENT="$(convert_locale "$DEFAULT_ENVIRONMENT")"
+if ! echo "$SUPPORTED_LOCALES" | grep -q -e "\b$DEFAULT_ENVIRONMENT\b" ; then
+    db_set locales/default_environment_locale "$DEFAULT_ENVIRONMENT"
+fi
+
+STATE=1
+while [ "$STATE" -ge 0 ]; do
+    case "$STATE" in
+    0)
+        exit 1
+        ;;
+    1)
+        db_input medium locales/locales_to_be_generated || true
+        ;;
+    2)
+        db_get locales/locales_to_be_generated || RET=
+        if expr ", $RET," : ".*, None,.*" >/dev/null 2>&1; then
+            # "None" was a choice in older packages
+            db_set locales/locales_to_be_generated ""
+            RET=
+        elif expr ", $RET," : ".*, All locales,.*" >/dev/null 2>&1; then
+            # When "All locales" is selected, other choices have to be dropped
+            db_set locales/locales_to_be_generated "All locales"
+            RET=$SUPPORTED_LOCALES
+        fi
+        DEFAULT_LOCALES="$(echo $RET | sed -e 's/ [^ ]*,/,/g' -e 's/ [^ ]*$//')"
+        if [ -n "$DEFAULT_LOCALES" ]; then
+            db_subst locales/default_environment_locale locales $DEFAULT_LOCALES
+            db_input medium locales/default_environment_locale || true
+        fi
+        ;;
+    *)
+        break
+        ;;
+    esac
+    if db_go; then
+        STATE=$(($STATE + 1))
+    else
+        STATE=$(($STATE - 1))
+    fi
+done
--- eglibc-2.13.orig/debian/debhelper.in/nscd.install
+++ eglibc-2.13/debian/debhelper.in/nscd.install
@@ -0,0 +1,3 @@
+debian/tmp-libc/usr/sbin/nscd usr/sbin
+nscd/nscd.conf /etc
+
--- eglibc-2.13.orig/debian/debhelper.in/libc-dev-bin.manpages
+++ eglibc-2.13/debian/debhelper.in/libc-dev-bin.manpages
@@ -0,0 +1,4 @@
+debian/local/manpages/gencat.1
+debian/local/manpages/mtrace.1
+debian/local/manpages/rpcgen.1 
+debian/local/manpages/sprof.1
--- eglibc-2.13.orig/debian/debhelper.in/libc-dev-alt.install
+++ eglibc-2.13/debian/debhelper.in/libc-dev-alt.install
@@ -0,0 +1,21 @@
+# This file is used for making biarch libraries development packages.
+TMPDIR/LIBDIR/libanl.a LIBDIR
+TMPDIR/LIBDIR/libBrokenLocale.a LIBDIR
+TMPDIR/LIBDIR/libbsd-compat.a LIBDIR
+TMPDIR/LIBDIR/libc.a LIBDIR
+TMPDIR/LIBDIR/libc_nonshared.a LIBDIR
+TMPDIR/LIBDIR/libcrypt.a LIBDIR
+TMPDIR/LIBDIR/libdl.a LIBDIR
+TMPDIR/LIBDIR/libg.a LIBDIR
+TMPDIR/LIBDIR/libieee.a LIBDIR
+TMPDIR/LIBDIR/libm.a LIBDIR
+TMPDIR/LIBDIR/libmcheck.a LIBDIR
+TMPDIR/LIBDIR/libnsl.a LIBDIR
+TMPDIR/LIBDIR/libpthread.a LIBDIR
+TMPDIR/LIBDIR/libpthread_nonshared.a LIBDIR
+TMPDIR/LIBDIR/libresolv.a LIBDIR
+TMPDIR/LIBDIR/librt.a LIBDIR
+TMPDIR/LIBDIR/libutil.a LIBDIR
+
+TMPDIR/LIBDIR/*.o LIBDIR
+TMPDIR/LIBDIR/*.so LIBDIR
--- eglibc-2.13.orig/debian/debhelper.in/libc-alt.lintian-overrides
+++ eglibc-2.13/debian/debhelper.in/libc-alt.lintian-overrides
@@ -0,0 +1,15 @@
+# libpthread must be stripped specially; GDB needs the non-dynamic 
+# symbol table in order to load the thread debugging library.
+LIBC-FLAVOR: unstripped-binary-or-object */libpthread-2.13.so
+
+# Those file are actually .o files not package in a ar archive, and
+# thus should not be stripped
+LIBC-FLAVOR: unstripped-binary-or-object */libieee.a
+LIBC-FLAVOR: unstripped-binary-or-object */libmcheck.a
+
+# ld.so must be executable, otherwise the system will not work
+LIBC-FLAVOR: shlib-with-executable-bit */ld-2.13.so 0755
+
+# It is normal that the ELF dynamic linker does not need any other 
+# library
+LIBC-FLAVOR: shared-lib-without-dependency-information */ld-2.13.so
--- eglibc-2.13.orig/debian/debhelper.in/locales.NEWS
+++ eglibc-2.13/debian/debhelper.in/locales.NEWS
@@ -0,0 +1,28 @@
+locales (2.7-3) unstable; urgency=low
+
+  * Starting with locales 2.7-3, users can provide their own locales in
+    /usr/local/share/i18n. See /usr/share/doc/locales/README.Debian for 
+    more information.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 29 Nov 2007 18:54:12 +0100
+
+locales (2.7-1) unstable; urgency=low
+
+  * Starting with locales 2.7-1 the deprecated no_NO locale has been 
+    removed. The switch to the nb_NO locale should be done automatically
+    by this package, however some applications may have to be restarted
+    in order to recognize the new locale settings.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Mon, 26 Nov 2007 18:56:32 +0100
+
+locales (2.3.6-7) unstable; urgency=low
+
+  * Locale variables are now stored in /etc/default/locale and no more
+    /etc/environment.  The reason is that Debian Policy forbids modifying
+    configuration files of other packages, and /etc/environment is a
+    configuration file for PAM.
+    Make sure to remove old definitions from /etc/environment, this file
+    is no more modified for the reason explained above.
+
+ -- Denis Barbier <barbier@debian.org>  Tue, 11 Apr 2006 21:24:13 +0200
+
--- eglibc-2.13.orig/debian/debhelper.in/libc-udeb.install
+++ eglibc-2.13/debian/debhelper.in/libc-udeb.install
@@ -0,0 +1,13 @@
+# FIXME: someday we may need to handle installing into non-lib.
+TMPDIR/SLIBDIR/ld*.so* lib
+TMPDIR/SLIBDIR/libm-*.so* lib
+TMPDIR/SLIBDIR/libm.so* lib
+TMPDIR/SLIBDIR/libdl*.so* lib
+TMPDIR/SLIBDIR/libresolv*.so* lib
+TMPDIR/SLIBDIR/libc-*.so* lib
+TMPDIR/SLIBDIR/libc.so* lib
+TMPDIR/SLIBDIR/libutil* lib
+TMPDIR/SLIBDIR/libcrypt* lib
+TMPDIR/SLIBDIR/librt*.so* lib
+TMPDIR/SLIBDIR/libpthread*.so* lib
+
--- eglibc-2.13.orig/debian/debhelper.in/locales-all.dirs
+++ eglibc-2.13/debian/debhelper.in/locales-all.dirs
@@ -0,0 +1 @@
+usr/lib/locale
--- eglibc-2.13.orig/debian/debhelper.in/libc-alt.postrm
+++ eglibc-2.13/debian/debhelper.in/libc-alt.postrm
@@ -0,0 +1,21 @@
+#! /bin/sh
+set -e
+
+if [ "$1" = remove ]; then
+    # Native multiarch packages declare a Replaces: on the corresponding
+    # biarch package. Therefore if both a biarch package and the corresponding
+    # multiarch package are installed, then the multiarch package is removed,
+    # and then the biarch package is removed, the dynamic linker symlink
+    # becomes a dangling symlink. Remove it in that case.
+    if [ -h RTLD_SO ] && [ ! -f RTLD_SO ]; then
+        rm RTLD_SO
+    fi
+fi
+
+if [ "$1" = deconfigure ]; then
+    :; # blah, do something useful with ldso
+fi
+
+#DEBHELPER#
+
+exit 0
--- eglibc-2.13.orig/debian/debhelper.in/libnss-dns-udeb.install
+++ eglibc-2.13/debian/debhelper.in/libnss-dns-udeb.install
@@ -0,0 +1,3 @@
+# FIXME: someday we may need to handle installing into non-lib.
+TMPDIR/SLIBDIR/libnss_dns*.so* lib
+
--- eglibc-2.13.orig/debian/debhelper.in/libc.README.Debian
+++ eglibc-2.13/debian/debhelper.in/libc.README.Debian
@@ -0,0 +1,117 @@
+Q1: Why does the Debian libc6-dev package create /usr/include/linux and 
+/usr/include/asm directories containing header files from a specific 
+kernel, instead of using the "established" convention of making those 
+directories into symlinks pointing to the currently installed kernel?
+
+A1: Occasionally, changes in the kernel headers cause problems with
+the compilation of libc and of programs that use libc.  To ensure that
+users are not affected by these problems, we configure libc to use the
+headers from a kernel that is known to work with libc and the programs
+that depend on stable kernel headers.
+
+[Note: /usr/include/linux is now in the linux-libc-dev package.]
+
+Q2: What if I want to compile a program that needs a feature from a
+later kernel than is used by libc?
+
+A2: In practice, most programs will not have this problem.  However,
+depending on the scope of the problem you have several options available:
+
+If the situation is one like "kernel driver development", where all use
+of the machine for development is expected to be against a different set
+of kernel headers than are supplied with the "stock" libc6-dev, rebuilding
+the glibc packages against that particular kernel will create a full set of
+libc6 packages that are "compliant" with the new kernel. All development 
+done on machines with these packages installed will be done against the 
+new kernel. To build libc6-dev against your particular kernel, export the
+environment variable LINUX_SOURCE, set to the path to that particular kernel
+source directory and then build the package.
+
+If you want this new glibc package to stick against further upgrades, simply 
+use dselect and place the packages on HOLD. This will keep them from being 
+upgraded against your wishes.
+
+If there is just one particular program/package that needs different headers,
+and your kernel of choice is installed in the usual place, you can use the
+-I/usr/src/linux/include option on the gcc command line, when compiling that
+specific program.
+
+Q3: My program is trying to use a kernel header that is in libc-dev, and
+it is causing problems. (or) Why are the kernel headers not the same for
+all architectures in Debian, for a given version of libc-dev?
+
+A3: For starters, you should never use kernel headers directly from user
+space programs. You cannot be guaranteed a consistent interface across
+different versions of the kernel, much less across architectures (even for
+the same version of kernel source).
+
+Kernel headers are included with libc-dev _only_ to support those headers
+in libc-dev. They are not there for userspace programs to include. If you
+need kernel headers, then use one of the provided kernel-headers-x.x.x
+packages provided for each architectures, or include the kernel headers
+(or just the parts of the headers) you need directly in your source for
+compilation. Only this way can you ensure a consistent state.
+
+Q4: Why does Debian's glibc seem to follow the stable CVS branch?
+
+A4: During our development cycle we follow the stable CVS branch so that
+we can cause as little disruption as possible, and catch problems easier.
+Differences between minor releases of glibc are known to be very large,
+contain many changes, and generally affect all architectures differently.
+We sync frequently with CVS so that we can take this large amount of
+changes in smaller chunks, simplifying the process, and allowing us to
+communicate problems to upstream much easier.
+
+Q5: How to setup my own language/regional (locale) setting?
+
+A5: Glibc provides "locale" defined in POSIX.  Locale is a framework
+to switch between multiple languages for users who can select to use
+their language, country, characters, collation order, etc.  For
+example, some program display messages in your own language, if you
+set the appropriate locale.  Default locale is C (or POSIX) which
+behaves traditional Unix with ASCII message.  For more information,
+look locale (5).
+
+If you want to use your own locale, install "locales" package.  With
+debconf interface, you can setup which locale is generated, and which
+locale is used in default on your machine.
+
+Q6: I get this message when I run a program:
+	ld.so: Incorrectly built binary which accesses errno or h_errno directly.
+	ld.so: See /usr/share/doc/libc6/FAQ.gz.
+A6:
+
+The program is broken.  It probably says "extern int errno" somewhere,
+instead of including <errno.h>.  Errno in recent glibc versions is a macro,
+which calls the function __errno_location; when glibc is built with
+thread-local storage enabled, there is no extern int variable named errno. 
+In addition, "extern int errno" is not thread-safe.
+
+NOTE: Currently this error message is suppressed, for the benefit of some
+truly buggy programs which redirect stderr into something important, like a
+network socket.
+
+Q7: I get this error when I compile an static linked application that's
+compiled with glibc 2.2 or before:
+	gcc -o foo.o libbar.a
+	libbar.a(obj.o): In function `func(char *)':
+	: undefined reference to `__ctype_toupper'
+
+A7: 
+During glibc 2.3.x development, some symbols (__ctype_b, __ctype_toupper,
+__ctype_tolower) are changed to hidden attributes.  This means old static
+linked applications/libraries built with glibc 2.2.x cannot be linked on glibc
+2.3.x systems any more.
+
+But it made a lot of user applications unusable, we applied a workaround patch
+for glibc in Sarge.  Therefore your applications worked OK, and you didn't
+need to consider about this problem.  However, most other distros already
+dropped such local modification.  For that reason, we decided to drop
+supporting such old static linked applications/libraries from Etch, you need
+to recompile them.
+
+If you want to keep this workaround that was applied in Sarge for the present,
+please recompile Debian glibc package with adding "glibc23-ctype-compat" line
+at the end of debian/patches/00list, and install it on your local machine.
+Note that we don't support this patch nowadays, please use it at your own
+risk.
--- eglibc-2.13.orig/debian/debhelper.in/glibc-doc.manpages
+++ eglibc-2.13/debian/debhelper.in/glibc-doc.manpages
@@ -0,0 +1,8 @@
+linuxthreads/man/pthread_atfork.3thr
+linuxthreads/man/pthread_condattr_init.3thr
+linuxthreads/man/pthread_cond_init.3thr
+linuxthreads/man/pthread_key_create.3thr
+linuxthreads/man/pthread_mutexattr_init.3thr
+linuxthreads/man/pthread_mutexattr_setkind_np.3thr
+linuxthreads/man/pthread_mutex_init.3thr
+linuxthreads/man/pthread_once.3thr
--- eglibc-2.13.orig/debian/script.in/nsscheck.sh
+++ eglibc-2.13/debian/script.in/nsscheck.sh
@@ -0,0 +1,36 @@
+	    echo -n "Checking for services that may need to be restarted..."
+	    # Only get the ones that are installed, and configured
+	    check=$(dpkg -s $check 2> /dev/null | egrep '^Package:|^Status:' | awk '{if ($1 ~ /^Package:/) { package=$2 } else if ($0 ~ /^Status: .* installed$/) { print package }}')
+	    # some init scripts don't match the package names
+	    check=$(echo $check | \
+	    	    sed -e's/\bapache2.2-common\b/apache2/g' \
+	    	    	-e's/\bat\b/atd/g' \
+	    	    	-e's/\bdovecot-common\b/dovecot/g' \
+	    	    	-e's/\bexim4-base\b/exim4/g' \
+	    	    	-e's/\blpr\b/lpd/g' \
+	    	    	-e's/\blpr-ppd\b/lpd-ppd/g' \
+	    	    	-e's/\bmysql-server\b/mysql/g' \
+	    	    	-e's/\bsasl2-bin\b/saslauthd/g' \
+	    )
+	    echo
+	    echo "Checking init scripts..."
+	    rl=$(runlevel | sed 's/.*\ //')
+	    for service in $check; do
+	    	if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+	    	    invoke-rc.d ${service} status >/dev/null 2>/dev/null && status=0 || status=$?
+	    	    if [ "$status" = "0" ] || [ "$status" = "2" ] ; then
+	    	    	services="$service $services"
+	    	    elif [ "$status" = "100" ] ; then
+	    	    	echo "WARNING: init script for $service not found."
+	    	    fi
+	    	else
+	    	    if [ -f /usr/share/file-rc/rc ] || [ -f /usr/lib/file-rc/rc ] && [ -f /etc/runlevel.conf ]; then
+	    	    	idl=$(filerc $rl $service)
+	    	    else
+	    	    	idl=$(ls /etc/rc${rl}.d/S??${service} 2> /dev/null | head -1)
+	    	    fi
+	    	    if [ -n "$idl" ] && [ -x $idl ]; then
+	    	    	services="$service $services"
+	    	    fi
+	    	fi
+	    done
--- eglibc-2.13.orig/debian/script.in/nohwcap.sh
+++ eglibc-2.13/debian/script.in/nohwcap.sh
@@ -0,0 +1,45 @@
+    # Handle upgrades when libc-opt package has been installed.
+    # When a /etc/ld.so.nohwcap file exists, ld.so only use libraries
+    # from /lib, and ignore all optimised libraries. This file is
+    # inconditionaly created in the preinst script of libc.
+ 
+    # Get the list of optimized packages for a given architecture
+    # Before removing a package from this list, make sure it appears
+    # in the Conflicts: line of libc.
+    case $(dpkg --print-architecture) in
+        alpha)
+            hwcappkgs="libc6-alphaev67"
+            ;;
+        i386)
+            hwcappkgs="libc6-i686 libc6-xen"
+            ;;
+        kfreebsd-i386)
+            hwcappkgs="libc0.1-i686"
+            ;;
+        mipsel)
+	    hwcappkgs="libc6-loongson2f"
+	    ;;
+        sparc)
+            hwcappkgs="libc6-sparcv9 libc6-sparcv9b"
+            ;;
+    esac
+ 
+    # We check the version between the current installed libc and
+    # all optimized packages (on architectures where such packages
+    # exists).
+    all_upgraded=yes
+    if [ -n "$hwcappkgs" ]; then
+        for pkg in $hwcappkgs ; do
+            ver=$(dpkg-query -l $pkg 2>/dev/null | sed -e '/^[a-z][a-z]\s/!d;/^.[nc]/d;' -e "s/^..\s\+$pkg\s\+//;s/\s.*//g")
+            if [ -n "$ver" ] && [ "$ver" != "CURRENT_VER" ]; then
+                all_upgraded=no
+            fi
+        done
+    fi
+
+    # If the versions of all optimized packages are the same as the libc
+    # one, we could remove /etc/ld.so.nohwcap. Otherwise, it will be removed
+    # when all optimized packages are upgraded or removed.
+    if [ "$all_upgraded" = yes ] ; then
+        rm -f /etc/ld.so.nohwcap
+    fi
--- eglibc-2.13.orig/debian/sysdeps/powerpc.mk
+++ eglibc-2.13/debian/sysdeps/powerpc.mk
@@ -0,0 +1,33 @@
+extra_config_options = --enable-multi-arch
+
+# build 64-bit (ppc64) alternative library
+EGLIBC_PASSES += ppc64
+DEB_ARCH_REGULAR_PACKAGES += libc6-ppc64 libc6-dev-ppc64
+ppc64_add-ons = nptl $(add-ons)
+ppc64_configure_target = powerpc64-linux-gnu
+ppc64_CC = $(CC) -m64
+ppc64_CXX = $(CXX) -m64
+libc6-ppc64_shlib_dep = libc6-ppc64 (>= $(shlib_dep_ver))
+ppc64_extra_config_options := $(extra_config_options) --disable-profile
+ppc64_rtlddir = /lib64
+ppc64_slibdir = /lib64
+ppc64_libdir = /usr/lib64
+
+define libc6-dev-ppc64_extra_pkg_install
+
+mkdir -p debian/libc6-dev-ppc64/usr/include
+ln -s powerpc-linux-gnu/bits debian/libc6-dev-ppc64/usr/include/
+ln -s powerpc-linux-gnu/gnu debian/libc6-dev-ppc64/usr/include/
+ln -s powerpc-linux-gnu/fpu_control.h debian/libc6-dev-ppc64/usr/include/
+
+mkdir -p debian/libc6-dev-ppc64/usr/include/powerpc-linux-gnu/gnu
+cp -a debian/tmp-ppc64/usr/include/gnu/stubs-64.h \
+        debian/libc6-dev-ppc64/usr/include/powerpc-linux-gnu/gnu
+
+mkdir -p debian/libc6-dev-ppc64/usr/include/sys
+for i in `ls debian/tmp-libc/usr/include/powerpc-linux-gnu/sys` ; do \
+        ln -s ../powerpc-linux-gnu/sys/$$i debian/libc6-dev-ppc64/usr/include/sys/$$i ; \
+done
+
+endef
+
--- eglibc-2.13.orig/debian/sysdeps/hppa.mk
+++ eglibc-2.13/debian/sysdeps/hppa.mk
@@ -0,0 +1,14 @@
+libc_add-ons = ports nptl $(add-ons)
+libc_extra_config_options = $(extra_config_options) --disable-sanity-checks
+
+# hppa64 needs symlink /usr/hppa64-linux/include to /usr/include
+# (See: Bug#239020)  In future we may drop this file with supporting hppa64.
+
+define libc6-dev_extra_pkg_install
+mkdir -p debian/$(curpass)/usr
+mkdir -p debian/$(curpass)/usr/hppa64-linux
+ln -sf ../include debian/$(curpass)/usr/hppa64-linux/include
+mkdir -p debian/$(curpass)/usr/hppa64-linux-gnu
+ln -sf ../include debian/$(curpass)/usr/hppa64-linux-gnu/include
+endef
+
--- eglibc-2.13.orig/debian/sysdeps/mips.mk
+++ eglibc-2.13/debian/sysdeps/mips.mk
@@ -0,0 +1,46 @@
+libc_add-ons = ports nptl $(add-ons)
+
+# build 32-bit (n32) alternative library
+EGLIBC_PASSES += mipsn32
+DEB_ARCH_REGULAR_PACKAGES += libc6-mipsn32 libc6-dev-mipsn32
+mipsn32_add-ons = ports nptl $(add-ons)
+mipsn32_configure_target = mips32-linux-gnu
+mipsn32_CC = $(CC) -mabi=n32
+mipsn32_CXX = $(CXX) -mabi=n32
+libc6-mipsn32_shlib_dep = libc6-mipsn32 (>= $(shlib_dep_ver))
+mipsn32_rtlddir = /lib32
+mipsn32_slibdir = /lib32
+mipsn32_libdir = /usr/lib32
+mipsn32_extra_config_options := $(extra_config_options) --disable-profile
+
+# build 64-bit alternative library
+EGLIBC_PASSES += mips64
+DEB_ARCH_REGULAR_PACKAGES += libc6-mips64 libc6-dev-mips64
+mips64_add-ons = ports nptl $(add-ons)
+mips64_configure_target = mips64-linux-gnu
+mips64_CC = $(CC) -mabi=64
+mips64_CXX = $(CXX) -mabi=64
+libc6-mips64_shlib_dep = libc6-mips64 (>= $(shlib_dep_ver))
+mips64_rtlddir = /lib64
+mips64_slibdir = /lib64
+mips64_libdir = /usr/lib64
+mips64_extra_config_options := $(extra_config_options) --disable-profile
+
+define libc6-dev-mips64_extra_pkg_install
+
+mkdir -p debian/libc6-dev-mips64/usr/include
+ln -s mips-linux-gnu/bits debian/libc6-dev-mips64/usr/include/
+ln -s mips-linux-gnu/gnu debian/libc6-dev-mips64/usr/include/
+ln -s mips-linux-gnu/fpu_control.h debian/libc6-dev-mips64/usr/include/
+
+mkdir -p debian/libc6-dev-mips64/usr/include/sys
+for i in `ls debian/tmp-libc/usr/include/mips-linux-gnu/sys` ; do \
+        ln -s ../mips-linux-gnu/sys/$$i debian/libc6-dev-mips64/usr/include/sys/$$i ; \
+done
+
+endef
+
+# Need to put a tri-arch aware version of ldd in the base package
+define mipsn32_extra_install
+cp debian/tmp-mipsn32/usr/bin/ldd debian/tmp-libc/usr/bin
+endef
--- eglibc-2.13.orig/debian/sysdeps/arm.mk
+++ eglibc-2.13/debian/sysdeps/arm.mk
@@ -0,0 +1 @@
+libc_add-ons = ports nptl $(add-ons)
--- eglibc-2.13.orig/debian/sysdeps/powerpcspe.mk
+++ eglibc-2.13/debian/sysdeps/powerpcspe.mk
@@ -0,0 +1 @@
+libc_add-ons = ports nptl $(add-ons)
--- eglibc-2.13.orig/debian/sysdeps/i386.mk
+++ eglibc-2.13/debian/sysdeps/i386.mk
@@ -0,0 +1,70 @@
+extra_config_options = --enable-multi-arch
+
+# We use -march=i686 and glibc's i686 routines use cmov, so require it.
+# A Debian-local glibc patch adds cmov to the search path.
+# The optimized libraries also use NPTL!
+EGLIBC_PASSES += i686
+DEB_ARCH_REGULAR_PACKAGES += libc6-i686
+i686_add-ons = nptl $(add-ons)
+i686_configure_target=i686-linux-gnu
+i686_extra_cflags = -march=i686 -mtune=generic
+i686_slibdir = /lib/$(DEB_HOST_MULTIARCH)/i686/cmov
+i686_extra_config_options = $(extra_config_options) --disable-profile
+
+# We use -mno-tls-direct-seg-refs to not wrap-around segments, as it
+# greatly increase the speed when running under the 32bit Xen hypervisor.
+EGLIBC_PASSES += xen
+DEB_ARCH_REGULAR_PACKAGES += libc6-xen
+xen_add-ons = nptl $(add-ons)
+xen_configure_target=i686-linux-gnu
+xen_extra_cflags = -march=i686 -mtune=generic -mno-tls-direct-seg-refs
+xen_slibdir = /lib/$(DEB_HOST_MULTIARCH)/i686/nosegneg
+xen_extra_config_options = $(extra_config_options) --disable-profile
+
+define libc6-xen_extra_pkg_install
+mkdir -p debian/libc6-xen/etc/ld.so.conf.d
+echo '# This directive teaches ldconfig to search in nosegneg subdirectories' >  debian/libc6-xen/etc/ld.so.conf.d/libc6-xen.conf
+echo '# and cache the DSOs there with extra bit 1 set in their hwcap match'   >> debian/libc6-xen/etc/ld.so.conf.d/libc6-xen.conf
+echo '# fields. In Xen guest kernels, the vDSO tells the dynamic linker to'   >> debian/libc6-xen/etc/ld.so.conf.d/libc6-xen.conf
+echo '# search in nosegneg subdirectories and to match this extra hwcap bit'  >> debian/libc6-xen/etc/ld.so.conf.d/libc6-xen.conf
+echo '# in the ld.so.cache file.'                                             >> debian/libc6-xen/etc/ld.so.conf.d/libc6-xen.conf
+echo 'hwcap 1 nosegneg'                                                       >> debian/libc6-xen/etc/ld.so.conf.d/libc6-xen.conf
+endef
+
+# build 64-bit (amd64) alternative library
+EGLIBC_PASSES += amd64
+DEB_ARCH_REGULAR_PACKAGES += libc6-amd64 libc6-dev-amd64
+libc6-amd64_shlib_dep = libc6-amd64 (>= $(shlib_dep_ver))
+amd64_add-ons = nptl $(add-ons)
+amd64_configure_target = x86_64-linux-gnu
+# __x86_64__ is defined here because Makeconfig uses -undef and the
+# /usr/include/asm wrappers need that symbol.
+amd64_CC = $(CC) -m64 -D__x86_64__
+amd64_CXX = $(CXX) -m64 -D__x86_64__
+amd64_extra_config_options = $(extra_config_options) --disable-profile
+amd64_rtlddir = /lib64
+amd64_slibdir = /lib64
+amd64_libdir = /usr/lib64
+
+define amd64_extra_install
+cp debian/tmp-amd64/usr/bin/ldd \
+	debian/tmp-libc/usr/bin
+endef
+
+define libc6-dev_extra_pkg_install
+mkdir -p debian/libc6-dev/$(libdir)/xen
+cp -af debian/tmp-xen/$(libdir)/*.a \
+	debian/libc6-dev/$(libdir)/xen
+endef
+
+define libc6-dev-amd64_extra_pkg_install
+mkdir -p debian/libc6-dev-amd64/usr/include
+cp -a debian/tmp-amd64/usr/include/bits \
+	debian/libc6-dev-amd64/usr/include/
+cp -a debian/tmp-amd64/usr/include/gnu \
+	debian/libc6-dev-amd64/usr/include/
+cp -a debian/tmp-amd64/usr/include/sys \
+	debian/libc6-dev-amd64/usr/include/
+cp debian/tmp-amd64/usr/include/fpu_control.h \
+	debian/libc6-dev-amd64/usr/include/
+endef
--- eglibc-2.13.orig/debian/sysdeps/m32r.mk
+++ eglibc-2.13/debian/sysdeps/m32r.mk
@@ -0,0 +1,2 @@
+libc_add-ons = ports linuxthreads $(add-ons)
+libc_extra_config_options = $(extra_config_options) --disable-sanity-checks
--- eglibc-2.13.orig/debian/sysdeps/s390x.mk
+++ eglibc-2.13/debian/sysdeps/s390x.mk
@@ -0,0 +1,35 @@
+libc_rtlddir = /lib
+
+# build 32-bit (s390) alternative library
+EGLIBC_PASSES += s390
+DEB_ARCH_REGULAR_PACKAGES += libc6-s390 libc6-dev-s390
+s390_add-ons = nptl $(add-ons)
+s390_configure_target = s390-linux-gnu
+s390_CC = $(CC) -m31
+s390_CXX = $(CXX) -m31
+s390_extra_config_options := $(extra_config_options) --disable-profile
+s390_slibdir = /lib32
+s390_libdir = /usr/lib32
+
+define libc6-dev-s390_extra_pkg_install
+
+mkdir -p debian/libc6-dev-s390/usr/include
+ln -s s390x-linux-gnu/bits debian/libc6-dev-s390/usr/include/
+ln -s s390x-linux-gnu/gnu debian/libc6-dev-s390/usr/include/
+ln -s s390x-linux-gnu/fpu_control.h debian/libc6-dev-s390/usr/include/
+
+mkdir -p debian/libc6-dev-s390/usr/include/s390x-linux-gnu/gnu
+cp -a debian/tmp-s390/usr/include/gnu/stubs-32.h \
+        debian/libc6-dev-s390/usr/include/s390x-linux-gnu/gnu
+
+mkdir -p debian/libc6-dev-s390/usr/include/sys
+for i in `ls debian/tmp-libc/usr/include/s390x-linux-gnu/sys` ; do \
+        ln -s ../s390x-linux-gnu/sys/$$i debian/libc6-dev-s390/usr/include/sys/$$i ; \
+done
+
+endef
+
+define libc6-s390_extra_pkg_install
+mkdir -p debian/$(curpass)/lib
+ln -s /lib32/ld.so.1 debian/$(curpass)/lib
+endef
--- eglibc-2.13.orig/debian/sysdeps/ppc64.mk
+++ eglibc-2.13/debian/sysdeps/ppc64.mk
@@ -0,0 +1,38 @@
+libc_rtlddir = /lib64
+extra_config_options = --enable-multi-arch
+
+# build 32-bit (powerpc) alternative library
+EGLIBC_PASSES += powerpc
+DEB_ARCH_REGULAR_PACKAGES += libc6-powerpc libc6-dev-powerpc
+libc6-powerpc_shlib_dep = libc6-powerpc (>= $(shlib_dep_ver))
+powerpc_add-ons = nptl $(add-ons)
+powerpc_configure_target = powerpc-linux-gnu
+powerpc_CC = $(CC) -m32
+powerpc_CXX = $(CXX) -m32
+powerpc_extra_config_options := $(extra_config_options) --disable-profile
+powerpc_slibdir = /lib32
+powerpc_libdir = /usr/lib32
+
+define libc6-dev-powerpc_extra_pkg_install
+
+mkdir -p debian/libc6-dev-powerpc/usr/include
+ln -s powerpc64-linux-gnu/bits debian/libc6-dev-powerpc/usr/include/
+ln -s powerpc64-linux-gnu/gnu debian/libc6-dev-powerpc/usr/include/
+ln -s powerpc64-linux-gnu/fpu_control.h debian/libc6-dev-powerpc/usr/include/
+
+mkdir -p debian/libc6-dev-powerpc/usr/include/powerpc64-linux-gnu/gnu
+cp -a debian/tmp-powerpc/usr/include/gnu/stubs-32.h \
+        debian/libc6-dev-powerpc/usr/include/powerpc64-linux-gnu/gnu
+
+mkdir -p debian/libc6-dev-powerpc/usr/include/sys
+for i in `ls debian/tmp-libc/usr/include/powerpc64-linux-gnu/sys` ; do \
+        ln -s ../powerpc64-linux-gnu/sys/$$i debian/libc6-dev-powerpc/usr/include/sys/$$i ; \
+done
+
+endef
+
+# create a symlink for the 32 bit dynamic linker in /lib
+define libc6-powerpc_extra_pkg_install
+mkdir -p debian/$(curpass)/lib
+ln -s /lib32/ld.so.1 debian/$(curpass)/lib
+endef
--- eglibc-2.13.orig/debian/sysdeps/kfreebsd-amd64.mk
+++ eglibc-2.13/debian/sysdeps/kfreebsd-amd64.mk
@@ -0,0 +1,43 @@
+# Main library
+extra_config_options = --disable-compatible-utmp --disable-multi-arch
+
+# build 32-bit (i386) alternative library
+EGLIBC_PASSES += i386
+DEB_ARCH_REGULAR_PACKAGES += libc0.1-i386 libc0.1-dev-i386
+libc0.1-i386_shlib_dep = libc0.1-i386 (>= $(shlib_dep_ver))
+
+i386_configure_target = i686-kfreebsd-gnu
+i386_CC = $(CC) -m32
+i386_CXX = $(CXX) -m32
+i386_add-ons = ports linuxthreads $(add-ons)
+i386_extra_cflags = -march=pentium4 -mtune=generic
+i386_extra_config_options = $(extra_config_options) --disable-profile
+i386_slibdir = /lib32
+i386_libdir = /usr/lib32
+
+define libc0.1-dev-i386_extra_pkg_install
+
+mkdir -p debian/libc0.1-dev-i386/usr/include
+ln -s x86_64-kfreebsd-gnu/bits debian/libc0.1-dev-i386/usr/include/
+ln -s x86_64-kfreebsd-gnu/gnu debian/libc0.1-dev-i386/usr/include/
+ln -s x86_64-kfreebsd-gnu/fpu_control.h debian/libc0.1-dev-i386/usr/include/
+
+mkdir -p debian/libc0.1-dev-i386/usr/include/x86_64-kfreebsd-gnu/gnu
+cp -a debian/tmp-i386/usr/include/gnu/stubs-32.h \
+        debian/libc0.1-dev-i386/usr/include/x86_64-kfreebsd-gnu/gnu
+
+mkdir -p debian/libc0.1-dev-i386/usr/include/sys
+for i in `ls debian/tmp-libc/usr/include/x86_64-kfreebsd-gnu/sys` ; do \
+        ln -s ../x86_64-kfreebsd-gnu/sys/$$i debian/libc0.1-dev-i386/usr/include/sys/$$i ; \
+done
+
+cp -a debian/tmp-i386/usr/include/sys/vm86.h \
+        debian/libc0.1-dev-i386/usr/include/sys
+
+endef
+
+define libc0.1-i386_extra_pkg_install
+mkdir -p debian/libc0.1-i386/lib
+ln -sf /lib32/ld.so.1 debian/libc0.1-i386/lib
+endef
+
--- eglibc-2.13.orig/debian/sysdeps/sparc.mk
+++ eglibc-2.13/debian/sysdeps/sparc.mk
@@ -0,0 +1,32 @@
+extra_config_options = --enable-multi-arch
+
+# build 64-bit (sparc64) alternative library
+EGLIBC_PASSES += sparc64
+DEB_ARCH_REGULAR_PACKAGES += libc6-sparc64 libc6-dev-sparc64
+sparc64_add-ons = nptl $(add-ons)
+sparc64_configure_target=sparc64-linux-gnu
+sparc64_CC = $(CC) -m64
+sparc64_CXX = $(CXX) -m64
+libc6-sparc64_shlib_dep = libc6-sparc64 (>= $(shlib_dep_ver))
+sparc64_extra_config_options = $(extra_config_options) --disable-profile
+sparc64_rtlddir = /lib64
+sparc64_slibdir = /lib64
+sparc64_libdir = /usr/lib64
+
+define libc6-dev-sparc64_extra_pkg_install
+
+mkdir -p debian/libc6-dev-sparc64/usr/include
+ln -s sparc-linux-gnu/bits debian/libc6-dev-sparc64/usr/include/
+ln -s sparc-linux-gnu/gnu debian/libc6-dev-sparc64/usr/include/
+ln -s sparc-linux-gnu/fpu_control.h debian/libc6-dev-sparc64/usr/include/
+
+mkdir -p debian/libc6-dev-sparc64/usr/include/sparc-linux-gnu/gnu
+cp -a debian/tmp-sparc64/usr/include/gnu/stubs-64.h \
+        debian/libc6-dev-sparc64/usr/include/sparc-linux-gnu/gnu
+
+mkdir -p debian/libc6-dev-sparc64/usr/include/sys
+for i in `ls debian/tmp-libc/usr/include/sparc-linux-gnu/sys` ; do \
+        ln -s ../sparc-linux-gnu/sys/$$i debian/libc6-dev-sparc64/usr/include/sys/$$i ; \
+done
+
+endef
--- eglibc-2.13.orig/debian/sysdeps/alpha.mk
+++ eglibc-2.13/debian/sysdeps/alpha.mk
@@ -0,0 +1,12 @@
+libc_add-ons = ports nptl $(add-ons)
+
+libc = libc6.1
+
+# build an ev67 optimized library
+EGLIBC_PASSES += alphaev67
+DEB_ARCH_REGULAR_PACKAGES += libc6.1-alphaev67
+alphaev67_add-ons = ports nptl $(add-ons)
+alphaev67_configure_target = alphaev67-linux-gnu
+alphaev67_extra_cflags = -mcpu=ev67 -mtune=ev67 -O2
+alphaev67_extra_config_options = $(extra_config_options) --disable-profile
+alphaev67_slibdir = /lib/$(DEB_HOST_MULTIARCH)/ev67
--- eglibc-2.13.orig/debian/sysdeps/kfreebsd.mk
+++ eglibc-2.13/debian/sysdeps/kfreebsd.mk
@@ -0,0 +1,57 @@
+EGLIBC_OVERLAYS ?= $(shell ls glibc-linuxthreads* glibc-ports* glibc-libidn*)
+MIN_KERNEL_SUPPORTED := 8.1.0
+libc = libc0.1
+
+# Linuxthreads Config
+threads = yes
+libc_add-ons = ports linuxthreads $(add-ons)
+libc_extra_config_options = $(extra_config_options)
+
+ifndef KFREEBSD_SOURCE
+  ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+    KFREEBSD_HEADERS := /usr/include
+  else
+    KFREEBSD_HEADERS := /usr/$(DEB_HOST_GNU_TYPE)/include
+  endif
+else
+  KFREEBSD_HEADERS := $(KFREEBSD_SOURCE)/sys
+endif
+
+# Minimum Kernel supported
+with_headers = --with-headers=$(shell pwd)/debian/include --enable-kernel=$(call xx,MIN_KERNEL_SUPPORTED)
+
+KERNEL_HEADER_DIR = $(stamp)mkincludedir
+$(stamp)mkincludedir:
+	rm -rf debian/include
+	mkdir debian/include
+	for file in bsm net netatalk netipx nfs osreldate.h sys x86 vm ; do \
+	    if test -e $(KFREEBSD_HEADERS)/$$file ; then \
+	        ln -s $(KFREEBSD_HEADERS)/$$file debian/include ; \
+	    fi ; \
+	done
+
+        # Link all machine directories.  We can't just link machine
+        # because of explicit references to <machine-amd64/*> and
+	# <machine-i386/*>.
+	find $(KFREEBSD_HEADERS) -maxdepth 1 -xtype d -name machine\* \
+		-exec ln -s '{}' debian/include ';'
+
+	# To make configure happy if libc0.1-dev is not installed.
+	touch debian/include/assert.h
+
+	touch $@
+
+# Also to make configure happy.
+export CPPFLAGS = -isystem $(shell pwd)/debian/include
+
+# This round of ugliness decomposes the FreeBSD kernel version number
+# into an integer so it can be easily compared and then does so.
+CURRENT_KERNEL_VERSION=$(shell uname -r)
+define kernel_check
+(minimum=$$((`echo $(1) | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1 \* 10000 + \2 \* 100 + \3/'`)); \
+current=$$((`echo $(CURRENT_KERNEL_VERSION) | sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100/'`)); \
+if [ $$current -lt $$minimum ]; then \
+  false; \
+fi)
+endef
+
--- eglibc-2.13.orig/debian/sysdeps/sparc64.mk
+++ eglibc-2.13/debian/sysdeps/sparc64.mk
@@ -0,0 +1,3 @@
+extra_config_options = --enable-multi-arch
+libc_rtlddir = /lib64
+libc_extra_cflags = -mcpu=ultrasparc
--- eglibc-2.13.orig/debian/sysdeps/hurd.mk
+++ eglibc-2.13/debian/sysdeps/hurd.mk
@@ -0,0 +1,23 @@
+# This is for the GNU OS.  Commonly known as the Hurd.
+
+EGLIBC_OVERLAYS ?= $(shell ls glibc-linuxthreads* glibc-ports* glibc-libidn*)
+
+# do not enable nscd
+threads = no
+libc = libc0.3
+
+# Glibc should really do this for us.
+define libc_extra_install
+mkdir -p debian/tmp-$(curpass)/lib
+ln -s ld.so.1 debian/tmp-$(curpass)/lib/ld.so
+endef
+
+# Do not care about kernel versions for now.
+define kernel_check
+true
+endef
+
+libc_extra_config_options := $(extra_config_options)
+
+libc_add-ons = libpthread $(add-ons)
+
--- eglibc-2.13.orig/debian/sysdeps/m68k.mk
+++ eglibc-2.13/debian/sysdeps/m68k.mk
@@ -0,0 +1,2 @@
+libc_MIN_KERNEL_SUPPORTED = 2.6.32
+libc_add-ons = ports nptl $(add-ons)
--- eglibc-2.13.orig/debian/sysdeps/sh4.mk
+++ eglibc-2.13/debian/sysdeps/sh4.mk
@@ -0,0 +1,4 @@
+libc_add-ons = ports nptl $(add-ons)
+
+# Renesas SH enabled -ffinte-math-only. Some software need -mieee.
+extra_cflags = -mieee
--- eglibc-2.13.orig/debian/sysdeps/amd64.mk
+++ eglibc-2.13/debian/sysdeps/amd64.mk
@@ -0,0 +1,56 @@
+libc_rtlddir = /lib64
+extra_config_options = --enable-multi-arch
+
+define libc6_extra_pkg_install
+
+make -C debian/local/memcpy-wrapper
+install -m 755 -o root -g root -d debian/libc6/$(libdir)/libc
+install -m 755 -o root -g root \
+	debian/local/memcpy-wrapper/memcpy-preload.so \
+	debian/libc6/$(libdir)/libc
+install -m 755 -o root -g root \
+	debian/local/memcpy-wrapper/memcpy-syslog-preload.so \
+	debian/libc6/$(libdir)/libc
+endef
+
+# build 32-bit (i386) alternative library
+EGLIBC_PASSES += i386
+DEB_ARCH_REGULAR_PACKAGES += libc6-i386 libc6-dev-i386
+libc6-i386_shlib_dep = libc6-i386 (>= $(shlib_dep_ver))
+i386_add-ons = nptl $(add-ons)
+i386_configure_target = i686-linux-gnu
+i386_CC = $(CC) -m32
+i386_CXX = $(CC) -m32
+i386_extra_cflags = -march=pentium4 -mtune=generic
+i386_extra_config_options = $(extra_config_options) --disable-profile
+i386_slibdir = /lib32
+i386_libdir = /usr/lib32
+
+define libc6-dev-i386_extra_pkg_install
+
+mkdir -p debian/libc6-dev-i386/usr/include
+ln -s x86_64-linux-gnu/bits debian/libc6-dev-i386/usr/include/
+ln -s x86_64-linux-gnu/gnu debian/libc6-dev-i386/usr/include/
+ln -s x86_64-linux-gnu/fpu_control.h debian/libc6-dev-i386/usr/include/
+
+mkdir -p debian/libc6-dev-i386/usr/include/x86_64-linux-gnu/gnu
+cp -a debian/tmp-i386/usr/include/gnu/stubs-32.h \
+        debian/libc6-dev-i386/usr/include/x86_64-linux-gnu/gnu
+
+mkdir -p debian/libc6-dev-i386/usr/include/sys
+for i in `ls debian/tmp-libc/usr/include/x86_64-linux-gnu/sys` ; do \
+	ln -s ../x86_64-linux-gnu/sys/$$i debian/libc6-dev-i386/usr/include/sys/$$i ; \
+done
+
+cp -a debian/tmp-i386/usr/include/sys/elf.h \
+	debian/libc6-dev-i386/usr/include/sys
+cp -a debian/tmp-i386/usr/include/sys/vm86.h \
+	debian/libc6-dev-i386/usr/include/sys
+
+endef
+
+define libc6-i386_extra_pkg_install
+mkdir -p debian/libc6-i386/lib
+ln -sf /lib32/ld-linux.so.2 debian/libc6-i386/lib
+endef
+
--- eglibc-2.13.orig/debian/sysdeps/armhf.mk
+++ eglibc-2.13/debian/sysdeps/armhf.mk
@@ -0,0 +1,44 @@
+libc_add-ons = ports nptl $(add-ons)
+
+# Use gcc-4.6 on armhf to get correct atomic operations in thumb-2 mode
+ifeq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
+CC     = gcc-4.6
+CXX    = g++-4.6
+endif
+
+# Install a compat symlink so old binaries keep working:
+define libc6_extra_pkg_install
+mkdir -p debian/libc6/lib/arm-linux-gnueabihf
+ln -sf ld-linux-armhf.so.3 debian/libc6/lib/arm-linux-gnueabihf/ld-linux.so.3
+endef
+
+define libc6-udeb_extra_pkg_install
+mkdir -p debian/libc6-udeb/lib/arm-linux-gnueabihf
+ln -sf /lib/ld-linux-armhf.so.3 debian/libc6-udeb/lib/arm-linux-gnueabihf/ld-linux.so.3
+endef
+
+#EGLIBC_PASSES += armel
+#DEB_ARCH_REGULAR_PACKAGES += libc6-armel libc6-dev-armel
+#armel_add-ons = ports nptl $(add-ons)
+#armel_configure_target = arm-linux-gnueabi
+#armel_CC = $(CC) -mfloat-abi=softfp
+#armel_CXX = $(CXX) -mfloat-abi=softfp
+#armel_slibdir = /lib/arm-linux-gnueabi
+#armel_libdir = /usr/lib/arm-linux-gnueabi
+#
+#define libc6-dev-armel_extra_pkg_install
+#mkdir -p debian/libc6-dev-armel/usr/include
+#cp -a debian/tmp-armel/usr/include/bits \
+#	debian/libc6-dev-armel/usr/include/
+#cp -a debian/tmp-armel/usr/include/gnu \
+#	debian/libc6-dev-armel/usr/include/
+#cp -a debian/tmp-armel/usr/include/sys \
+#	debian/libc6-dev-armel/usr/include/
+#cp debian/tmp-armel/usr/include/fpu_control.h \
+#	debian/libc6-dev-armel/usr/include/
+#endef
+#
+#define libc6-armel_extra_pkg_install
+#mkdir -p debian/libc6-armel/lib
+#ln -sf $(armel_slibdir)/ld-linux.so.3 debian/libc6-armel/lib
+#endef
--- eglibc-2.13.orig/debian/sysdeps/linux.mk
+++ eglibc-2.13/debian/sysdeps/linux.mk
@@ -0,0 +1,53 @@
+EGLIBC_OVERLAYS ?= $(shell ls glibc-linuxthreads* glibc-ports* glibc-libidn*)
+MIN_KERNEL_SUPPORTED := 2.6.26
+libc = libc6
+
+# NPTL Config
+threads = yes
+libc_add-ons = nptl $(add-ons)
+libc_extra_config_options = $(extra_config_options)
+
+ifndef LINUX_SOURCE
+  ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+    LINUX_HEADERS := /usr/include
+  else
+    LINUX_HEADERS := /usr/$(DEB_HOST_GNU_TYPE)/include
+  endif
+  LINUX_ARCH_HEADERS := /usr/include/$(DEB_HOST_MULTIARCH)
+else
+  LINUX_HEADERS := $(LINUX_SOURCE)/include
+endif
+
+# Minimum Kernel supported
+with_headers = --with-headers=$(shell pwd)/debian/include --enable-kernel=$(call xx,MIN_KERNEL_SUPPORTED)
+
+KERNEL_HEADER_DIR = $(stamp)mkincludedir
+$(stamp)mkincludedir:
+	rm -rf debian/include
+	mkdir debian/include
+	if [ -d "$(LINUX_ARCH_HEADERS)/asm" ]; then \
+		ln -s $(LINUX_ARCH_HEADERS)/asm debian/include; \
+	else \
+		ln -s $(LINUX_HEADERS)/asm debian/include; \
+	fi
+	ln -s $(LINUX_HEADERS)/asm-generic debian/include
+	ln -s $(LINUX_HEADERS)/linux debian/include
+
+	# To make configure happy if libc6-dev is not installed.
+	touch debian/include/assert.h
+
+	touch $@
+
+# Also to make configure happy.
+export CPPFLAGS = -isystem $(shell pwd)/debian/include
+
+# This round of ugliness decomposes the Linux kernel version number
+# into an integer so it can be easily compared and then does so.
+CURRENT_KERNEL_VERSION=$(shell uname -r)
+define kernel_check
+(minimum=$$((`echo $(1) | sed 's/^\([0-9]*\.[0-9]*\)\([^.0-9]\|$$\)/\1.0\2/; s/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/'`)); \
+current=$$((`echo $(CURRENT_KERNEL_VERSION) | sed 's/^\([0-9]*\.[0-9]*\)\([^.0-9]\|$$\)/\1.0\2/; s/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 10000 + \2 \* 100 + \3/'`)); \
+if [ $$current -lt $$minimum ]; then \
+  false; \
+fi)
+endef
--- eglibc-2.13.orig/debian/sysdeps/s390.mk
+++ eglibc-2.13/debian/sysdeps/s390.mk
@@ -0,0 +1,35 @@
+# build 64-bit (s390x) alternative library
+EGLIBC_PASSES += s390x
+DEB_ARCH_REGULAR_PACKAGES += libc6-s390x libc6-dev-s390x
+s390x_add-ons = nptl $(add-ons)
+s390x_configure_target = s390x-linux-gnu
+s390x_CC = $(CC) -m64
+s390x_CXX = $(CXX) -m64
+libc6-s390x_shlib_dep = libc6-s390x (>= $(shlib_dep_ver))
+s390x_extra_config_options := $(extra_config_options) --disable-profile
+s390x_rtlddir = /lib64
+s390x_slibdir = /lib64
+s390x_libdir = /usr/lib64
+
+define libc6-dev-s390x_extra_pkg_install
+
+mkdir -p debian/libc6-dev-s390x/usr/include
+ln -s s390-linux-gnu/bits debian/libc6-dev-s390x/usr/include/
+ln -s s390-linux-gnu/gnu debian/libc6-dev-s390x/usr/include/
+ln -s s390-linux-gnu/fpu_control.h debian/libc6-dev-s390x/usr/include/
+
+mkdir -p debian/libc6-dev-s390x/usr/include/s390-linux-gnu/gnu
+cp -a debian/tmp-s390x/usr/include/gnu/stubs-64.h \
+        debian/libc6-dev-s390x/usr/include/s390-linux-gnu/gnu
+
+mkdir -p debian/libc6-dev-s390x/usr/include/sys
+for i in `ls debian/tmp-libc/usr/include/s390-linux-gnu/sys` ; do \
+        ln -s ../s390-linux-gnu/sys/$$i debian/libc6-dev-s390x/usr/include/sys/$$i ; \
+done
+
+endef
+
+define libc6-s390x_extra_pkg_install
+mkdir -p debian/$(curpass)/lib
+ln -s /lib64/ld64.so.1 debian/$(curpass)/lib
+endef
--- eglibc-2.13.orig/debian/sysdeps/hurd-i386.mk
+++ eglibc-2.13/debian/sysdeps/hurd-i386.mk
@@ -0,0 +1,26 @@
+# We use -march=i686 and glibc's i686 routines use cmov, so require it.
+# A Debian-local glibc patch adds cmov to the search path.
+EGLIBC_PASSES += i686
+DEB_ARCH_REGULAR_PACKAGES += libc0.3-i686
+i686_add-ons = $(libc_add-ons)
+i686_configure_target=i686-gnu
+i686_extra_cflags = -march=i686 -mtune=generic
+i686_slibdir = /lib/$(DEB_HOST_MULTIARCH)/i686/cmov
+i686_extra_config_options = $(extra_config_options) --disable-profile --disable-compatible-utmp
+
+# We use -mno-tls-direct-seg-refs to not wrap-around segments, as it
+# greatly increase the speed when running under the 32bit Xen hypervisor.
+EGLIBC_PASSES += xen
+DEB_ARCH_REGULAR_PACKAGES += libc0.3-xen
+xen_add-ons = $(libc_add-ons)
+xen_configure_target=i686-gnu
+xen_extra_cflags = -march=i686 -mtune=generic -mno-tls-direct-seg-refs
+xen_slibdir = /lib/$(DEB_HOST_MULTIARCH)/i686/nosegneg
+xen_extra_config_options = $(extra_config_options) --disable-profile
+
+define libc0.3-dev_extra_pkg_install
+mkdir -p debian/libc0.3-dev/$(libdir)/xen
+cp -af debian/tmp-xen/$(libdir)/*.a \
+	debian/libc0.3-dev/$(libdir)/xen
+endef
+
--- eglibc-2.13.orig/debian/sysdeps/ia64.mk
+++ eglibc-2.13/debian/sysdeps/ia64.mk
@@ -0,0 +1 @@
+libc = libc6.1
--- eglibc-2.13.orig/debian/sysdeps/armel.mk
+++ eglibc-2.13/debian/sysdeps/armel.mk
@@ -0,0 +1,28 @@
+libc_add-ons = ports nptl $(add-ons)
+
+#EGLIBC_PASSES += armhf
+#DEB_ARCH_REGULAR_PACKAGES += libc6-armhf libc6-dev-armhf
+#armhf_add-ons = ports nptl $(add-ons)
+#armhf_configure_target = arm-linux-gnueabihf
+#armhf_CC = $(CC) -mfloat-abi=hard
+#armhf_CXX = $(CXX) -mfloat-abi=hard
+#armhf_slibdir = /lib/arm-linux-gnueabihf
+#armhf_libdir = /usr/lib/arm-linux-gnueabihf
+#
+#define libc6-dev-armhf_extra_pkg_install
+#mkdir -p debian/libc6-dev-armhf/usr/include
+#cp -a debian/tmp-armhf/usr/include/bits \
+#	debian/libc6-dev-armhf/usr/include/
+#cp -a debian/tmp-armhf/usr/include/gnu \
+#	debian/libc6-dev-armhf/usr/include/
+#cp -a debian/tmp-armhf/usr/include/sys \
+#	debian/libc6-dev-armhf/usr/include/
+#cp debian/tmp-armhf/usr/include/fpu_control.h \
+#	debian/libc6-dev-armhf/usr/include/
+#endef
+#
+#define libc6-armhf_extra_pkg_install
+#mkdir -p debian/libc6-armhf$(armhf_slibdir)
+#ln -sf $(armhf_slibdir)/ld-linux-armhf.so.3 debian/libc6-armhf/lib
+#ln -sf ld-linux-armhf.so.3 debian/libc6-armhf$(armhf_slibdir)/ld-linux.so.3 
+#endef
--- eglibc-2.13.orig/debian/sysdeps/mipsel.mk
+++ eglibc-2.13/debian/sysdeps/mipsel.mk
@@ -0,0 +1,57 @@
+libc_add-ons = ports nptl $(add-ons)
+
+# build 32-bit (n32) alternative library
+EGLIBC_PASSES += mipsn32
+DEB_ARCH_REGULAR_PACKAGES += libc6-mipsn32 libc6-dev-mipsn32
+mipsn32_add-ons = ports nptl $(add-ons)
+mipsn32_configure_target = mips32el-linux-gnu
+mipsn32_CC = $(CC) -mabi=n32
+mipsn32_CXX = $(CXX) -mabi=n32
+libc6-mipsn32_shlib_dep = libc6-mipsn32 (>= $(shlib_dep_ver))
+mipsn32_rtlddir = /lib32
+mipsn32_slibdir = /lib32
+mipsn32_libdir = /usr/lib32
+mipsn32_extra_config_options := $(extra_config_options) --disable-profile
+
+# build 64-bit alternative library
+EGLIBC_PASSES += mips64
+DEB_ARCH_REGULAR_PACKAGES += libc6-mips64 libc6-dev-mips64
+mips64_add-ons = ports nptl $(add-ons)
+mips64_configure_target = mips64el-linux-gnu
+mips64_CC = $(CC) -mabi=64
+mips64_CXX = $(CXX) -mabi=64
+libc6-mips64_shlib_dep = libc6-mips64 (>= $(shlib_dep_ver))
+mips64_rtlddir = /lib64
+mips64_slibdir = /lib64
+mips64_libdir = /usr/lib64
+mips64_extra_config_options := $(extra_config_options) --disable-profile
+
+define libc6-dev-mips64_extra_pkg_install
+
+mkdir -p debian/libc6-dev-mips64/usr/include
+ln -s mipsel-linux-gnu/bits debian/libc6-dev-mips64/usr/include/
+ln -s mipsel-linux-gnu/gnu debian/libc6-dev-mips64/usr/include/
+ln -s mipsel-linux-gnu/fpu_control.h debian/libc6-dev-mips64/usr/include/
+
+mkdir -p debian/libc6-dev-mips64/usr/include/sys
+for i in `ls debian/tmp-libc/usr/include/mipsel-linux-gnu/sys` ; do \
+        ln -s ../mipsel-linux-gnu/sys/$$i debian/libc6-dev-mips64/usr/include/sys/$$i ; \
+done
+
+endef
+
+# build a loongson-2f optimized library
+EGLIBC_PASSES += loongson2f
+DEB_ARCH_REGULAR_PACKAGES += libc6-loongson2f
+loongson2f_add-ons = ports nptl $(add-ons)
+loongson2f_configure_target = mips32el-linux-gnu
+loongson2f_CC = $(CC) -mabi=32
+loongson2f_CXX = $(CXX) -mabi=32
+loongson2f_extra_cflags = -march=loongson2f -mtune=loongson2f -O2
+loongson2f_extra_config_options = $(extra_config_options) --disable-profile
+loongson2f_slibdir = /lib/$(DEB_HOST_MULTIARCH)/loongson2f
+
+# Need to put a tri-arch aware version of ldd in the base package
+define mipsn32_extra_install
+cp debian/tmp-mipsn32/usr/bin/ldd debian/tmp-libc/usr/bin
+endef
--- eglibc-2.13.orig/debian/sysdeps/armeb.mk
+++ eglibc-2.13/debian/sysdeps/armeb.mk
@@ -0,0 +1 @@
+libc_add-ons = ports nptl $(add-ons)
--- eglibc-2.13.orig/debian/sysdeps/kfreebsd-i386.mk
+++ eglibc-2.13/debian/sysdeps/kfreebsd-i386.mk
@@ -0,0 +1,14 @@
+# Main library
+extra_config_options = --disable-compatible-utmp --disable-multi-arch
+
+# Build a 32-bit optimized library
+EGLIBC_PASSES += i686
+DEB_ARCH_REGULAR_PACKAGES += libc0.1-i686
+
+# We use -march=i686 and glibc's i686 routines use cmov, so require it.
+# A Debian-local glibc patch adds cmov to the search path.
+i686_add-ons = ports linuxthreads $(add-ons)
+i686_configure_target=i686-kfreebsd-gnu
+i686_extra_cflags = -march=i686 -mtune=generic
+i686_slibdir = /lib/$(DEB_HOST_MULTIARCH)/i686/cmov
+i686_extra_config_options = $(extra_config_options) --disable-profile
--- eglibc-2.13.orig/debian/po/pl.po
+++ eglibc-2.13/debian/po/pl.po
@@ -0,0 +1,243 @@
+#
+# Michał Kułach <michal.kulach@gmail.com>, 2012.
+msgid ""
+msgstr ""
+"Project-Id-Version: debconf-glibc-locales-pl\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2012-01-28 15:33+0100\n"
+"Last-Translator: Michał Kułach <michal.kulach@gmail.com>\n"
+"Language-Team: Polish <debian-l10n-polish@lists.debian.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.2\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2);\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Wszystkie dostępne"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Proszę wybrać ustawienia lokalne, które mają zostać wygenerowane:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Wybierane tutaj ustawienia lokalne stanowią podstawową strukturę dającą "
+"możliwość pracy systemu w specyficznym dla danego kraju środowisku (język, "
+"zestaw znaków, kolejność sortowania itp.)."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Proszę wybrać jakie ustawienia lokalne mają zostać wygenerowane. "
+"Najkorzystniej jest "
+"wybrać UTF-8, zwłaszcza na nowo instalowanych systemach. Pozostałe kodowania "
+"mogą być przydatne, aby utrzymać wsteczną kompatybilność ze starymi "
+"systemami lub programami."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Brak"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Proszę wybrać domyślne ustawienia lokalne do swojego systemu:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Wiele programów dostarczanych w pakietach Debiana wykorzystuje ustawienia "
+"lokalne, aby wyświetlać komunikaty we właściwym dla użytkownika języku. "
+"Można zmienić domyślne ustawienia lokalne dla całego systemu. Można wybrać "
+"tylko te ustawienia lokalne, które wcześniej zostały wygenerowane."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Proszę zwrócić uwagę na to, że wybrany tutaj język ma wpływ na na cały system "
+"i "
+"większość działających w nim programów. Jeżeli z tego systemu korzysta wielu "
+"użytkowników posłujących się różnymi językami, to mogą oni mieć problemy ze "
+"zrozumieniem komunikatów systemu."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Czy zaktualizować teraz glibc?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"Usługi i programy wykorzystujące NSS wymagają ponownego uruchomienia, aby "
+"operacje związane z autoryzacją działały prawidłowo. Proces instalacji może "
+"zrestartować część serwisów (jak np. ssh lub telnetd), jednak niektóre "
+"usługi będą wymagały ingerencji użytkownika. Przykładem takiego programu "
+"jest xdm, którego restart mógłby spowodować wyłączenie aktywnej sesji X11."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Skrypt wykrył następujące serwisy, które należy ręcznie zrestartować: "
+"${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr "Aby przerwać aktualizację i dokończyć ją później, proszę wybrać nie."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "Usługi wymagające restartu po aktualizacji GNU libc:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"Uruchomione usługi i programy wykorzystujące NSS wymagają restartu. W "
+"przeciwnym wypadku operacje związane z autoryzacją nie będą "
+"działały prawidłowo. Przy usługach takich jak ssh będzie to oznaczało brak "
+"możliwości zalogowania. \n"
+"Zalecane jest przejrzenie listy skryptów startowych i jej ewentualne "
+"poprawienie."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Uwaga: restart sshd/telnetd nie powinien mieć wpływu na nawiązane już "
+"połączenia."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr ""
+"Nastąpił błąd podczas restartowania niektórych usług po aktualizacji GNU "
+"libc"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr "Następujące usługi nie zostały zrestartowane po aktualizacji GNU libc:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Aby zrestartować te usługi ręcznie należy wywołać \"/etc/init.d/<service> "
+"start\"."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr "xscreensaver i xlockmore muszą zostać zrestartowane przed aktualizacją"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"Wykryto jedną lub więcej działających kopii programu xscreensaver lub "
+"xlockmore. Z powodu niekompatybilnych zmian biblioteki, aktualizacja "
+"biblioteki GNU libc uniemożliwiłaby autoryzację użytkownika do tych programów."
+" Należy zrestartować lub zatrzymać te programy przed aktualizacją, aby "
+"zapobiec utknięciu użytkowników poza ich aktualnymi sesjami."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr "Zrestartować usługi podczas aktualizacji pakietu bez pytania?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
+"Niektóre z zainstalowanych usług wymagają restartu, gdy są aktualizowane "
+"określone biblioteki (np. libpam, libc i libss1). Ponieważ restarty mogą "
+"spowodować przerwanie tych usług, użytkownik jest zwykle pytany podczas "
+"każdej aktualizacji o listę usług, które chce zrestartować. Można wybrać tę "
+"opcję, aby zapobiec takim pytaniom; wtedy wszystkie potrzebne restarty odbędą "
+"się automatycznie, a użytkownik uniknie pytania przy każdej aktualizacji "
+"biblioteki."
+
--- eglibc-2.13.orig/debian/po/nb.po
+++ eglibc-2.13/debian/po/nb.po
@@ -0,0 +1,241 @@
+# translation of glibc_nb.po to Norwegian Bokmål
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Bjørn Steensrud <bjornst@powertech.no>, 2007.
+# Bjørn Steensrud <bjornst@skogkatt.homelinux.org>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: glibc_nb\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2011-12-29 12:39+0100\n"
+"Last-Translator: Bjørn Steensrud <bjornst@skogkatt.homelinux.org>\n"
+"Language-Team: Norwegian Bokmål <i18n-nb@lister.ping.uio.no>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.2\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Alle lokaler"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Lokaler (stedstilpasninger) som skal opprettes:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Lokaler er et rammeverk som kan veksle mellom flere språk, slik at brukere "
+"kan velge sitt språk, land, tegnsett, sorteringsrekkefølge osv."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Velg hvilke lokaler som skal opprettes. Som standard er det best å opprette "
+"UTF-8-lokaler, spesielt for mye installasjoner. Andre tegnsett kan være "
+"nyttig for kompatibilitet bakover med eldre systemer og programvare."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Ingen"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Standardlokale for systemmiljøet:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Mange pakker i Debian bruker lokaler for å vise tekst i det riktige språket "
+"for brukerne. Du kan velge et standardlokale for systemet blant de lokalene "
+"som er opprettet."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Dette velger standard språk for hele systemet. Hvis dette er et "
+"flerbrukersystem der ikke alle brukerne forstår det valgte språket, så kan "
+"de komme opp i vansker."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Vil du oppgradere glibc nå?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"Tjenester og programmer som nå kjører og bruker NSS må startes på nytt, "
+"ellers vil de kanskje ikke kunne gjøre oppslag eller autentisering lenger. "
+"Installasjonsprosessen kan ta omstart på noen tjenester (slik som ssh eller "
+"telnetd), men andre programmer kan ikke restartes automatisk. xdm er et slikt "
+"program som du må stoppe og restarte manuelt etter glibc-oppgradering, fordi "
+"automatisk omstart vil kunne koble fra dine aktive X11-økter."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Dette skriptet oppdaget følgende installerte tjenester som må stoppes før "
+"oppgraderingen: $(services)"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Svar Nei på spørsmålet nedenfor hvis du vil avbryte oppgraderingen nå og "
+"fortsette senere."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "Tjenester som skal restartes for oppgradering av GNU libc-biblioteket:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"Tjenester og programmer som nå kjører og bruker NSS må startes på nytt, "
+"ellers vil de kanskje ikke kunne gjøre oppslag eller autentisering lenger "
+"(for tjenester slik som ssh kan dette påvirke din mulighet til å logge inn). "
+"Se gjennom denne lista over init.d-skripter som skal restartes nå, og rett "
+"opp hvis det trengs."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Merk: om sshd/telnetd restartes skulle det ikke påvirke eksisterende "
+"tilkoblinger."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "Noen tjenester kunne ikke restartes for GNU libc-oppgradering"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"Følgende tjenester kunne ikke restartes for oppgradering av GNU "
+"libc-biblioteket:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr "Du må starte disse manuelt ved å kjøre «/etc/init.d/<service> start»."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr "xscreensaver og xlockmore må restartes før oppgradering"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"En eller flere instanser av xsreensaver eller xlockmore kjører nå på dette "
+"systemet. På  grunn av  ikke-kompatible endringer i biblioteket vil "
+"oppgraderingen gjøre det umulig å autentisere til disse programmene. Du må "
+"sørge for at disse programmene blir stoppet eller restartet før denne "
+"oppgraderingen fortsetter, slik at dine brukere ikke blir utestengt fra sine "
+"gjeldende økter."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr "Skal tjenester restartes uten spørsmål under pakkeoppgraderinger?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
+"På systemet ditt finnes det tjenester som må startes på nytt når visse "
+"biblioteker, slik som libpam, libc og libssl, oppgraderes. Slike omstarter "
+"kan avbryte tjenester på systemet, og normalt blir du spurt ved hver "
+"oppgradering om hvilke tjenester du vil starte på nytt. Du kan slå på dette "
+"valget for å slippe å bli spurt, da blir i stedet alle nødvendige omstarter "
+"gjort automatisk slik at du ikke får spørsmål ved hver biblioteksoppgradering."
+
+
--- eglibc-2.13.orig/debian/po/tr.po
+++ eglibc-2.13/debian/po/tr.po
@@ -0,0 +1,206 @@
+# Turkish translation of locales.
+# This file is distributed under the same license as the locales package.
+# Erçin EKER <erc.caldera@gmx.net>, 2004,2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: locales\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2007-04-09 11:02+0300\n"
+"Last-Translator: Erçin EKER <ercin.eker@linux.org.tr>\n"
+"Language-Team: Türkçe <debian-l10n-turkish@lists.debian.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms:  nplurals=1; plural=0;\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Tüm yereller"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Oluşturulacak yereller: "
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Yerel (locale), kullanıcıların kullanmak istediği dil, ülke, karakter, "
+"sıralama şekli gibi dile özgü ayarlar arasında kolayca geçiş yapmasını "
+"sağlayan bir yapıdır."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Lütfen hangi yerellerin oluşturulacağını seçin. Yeni kurulum için UTF-8 "
+"yereller öntanımlı olarak seçilecektir. Diğer karakter setleri daha eski "
+"sistemler ve yazılımlar ile uyumluluk için yararlı olabilir."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Hiçbiri"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Sistem için öntanımlı yerel:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Çoğu Debian paketi mesajları göstermekte kullanacağı dili belirlemek için "
+"yerelleri kullanır. Oluşturulmak üzere seçtikleriniz arasından sistem için "
+"öntanımlı bir yerel seçebilirsiniz."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Bu ayar, sisteminizin bütününde kullanılacak dili belirleyecektir. Eğer "
+"farklı dilleri konuşan kullanıcıların da bulunduğu çok kullanıcılı bir "
+"sistem çalıştırıyorsanız, bu kullanıcılar bazı zorluklarla karşılaşabilir. "
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/nl.po
+++ eglibc-2.13/debian/po/nl.po
@@ -0,0 +1,246 @@
+# Dutch translation of eglibc po-debconf templates.
+# Copyright (C) 2008-2011 THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the eglibc package.
+# Bart Cornelis <cobaco@skolelinux.no>, 2008.
+# Vincent Zweije <vincent@zweije.nl>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: eglibc 2.13-23\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2011-12-19 13:23+0100\n"
+"Last-Translator: Vincent Zweije <vincent@zweije.nl>\n"
+"Language-Team: Debian l10n Dutch <debian-l10n-dutch@lists.debian.org>\n"
+"Language: nl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Alle lokalisaties"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Te genereren lokalisaties:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Lokalisatie is het raamwerk om om te schakelen tussen verschillende talen en "
+"laat gebruikers toe om hun eigen taal, land, karakterset, enzovoort te "
+"gebruiken."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Welke lokalisaties wilt u laten genereren? Standaard kiest u, zeker voor "
+"nieuwe installaties, best UTF-8 lokalisaties. Andere karaktersets kunnen "
+"nuttig zijn voor compatibiliteit met oudere systemen of software."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Geen"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Standaardlokalisatie voor dit systeem:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Veel Debian-pakketten gebruiken lokalisaties om de tekst in de voor de "
+"gebruiker juiste taal weer te geven. U kunt u de standaardlokalisatie voor "
+"het systeem kiezen uit de gegeneerde lokalisaties."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Dit bepaalt de standaardtaal voor het volledige systeem. Op systemen met "
+"meerdere gebruikers kunt u problemen krijgen als niet alle gebruikers de "
+"gekozen taal spreken; in dat geval kunt u misschien beter de "
+"standaardlokalisatie niet veranderen."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Wilt u glibc nu opwaarderen?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"actieve diensten en programma's die NSS gebruiken dienen herstart te worden. "
+"Zo niet kunnen ze mogelijk geen opzoekingen en authenticatie meer doen. Het "
+"Installatieproces kan sommige diensten (zoals ssh en telnetd) herstarten, "
+"maar andere diensten kunnen niet automatisch herstart worden. Een zo'n "
+"dienst die handmatig dient gestopt en gestart te worden na de opwaardering "
+"van glibc is xdm, dit omdat een automatische herstart uw actieve X11-sessies "
+"verbreekt."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Dit script heeft de volgende diensten ontdekt die gestopt moeten worden voor "
+"de opwaardering: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Als u de opwaardering nu wilt afbreken en hiermee later wilt verder gaan "
+"dient u zo meteen te weigeren."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "Tijdens 'GNU libc'-opwaardering te herstarten diensten:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"actieve diensten en programma's die NSS gebruiken dienen herstart te worden, "
+"zo niet kunnen ze mogelijk geen opzoekingen en authenticatie meer doen (voor "
+"diensten zoals ssh kan dit gevolgen hebben voor de mogelijkheid om in te "
+"loggen). Gelieve de volgende, met spaties gescheiden lijst van init.d-"
+"scripts voor diensten die herstart dienen te worden te controleren en indien "
+"nodig bij te werken."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Opmerking: herstarten van sshd/telnetd heeft normaal geen effect op "
+"bestaande verbindingen."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr ""
+"Herstarten van sommige diensten bij de opwaardering van GNU libc is mislukt."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"De volgende diensten konden niet herstart worden na de opwaardering van GNU "
+"libc:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"U dient deze diensten handmatig te herstarten via het commando '/etc/init.d/"
+"<dienst> start'."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr "xscreensaver en xlockmore moeten voor het opwaarderen worden herstart"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"Er zijn één of meer actieve instanties van xscreensaver of xlockmore op dit "
+"systeem gevonden. Vanwege niet-compatibele wijzigingen zal de opwaardering "
+"van de GNU libc bibliotheek het gebruikers onmogelijk maken om zich tegen "
+"deze actieve instanties te authenticeren. U wordt sterk aangeraden om deze "
+"instanties te herstarten of stoppen voordat u de opwaardering van GNU libc "
+"voortzet, anders kunnen gebruikers van hun sessies worden buitengesloten."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr "Diensten zonder vragen herstarten bij het opwaarderen van pakketten?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
+"Er zijn diensten op uw systeem geïnstalleerd die moeten worden herstart "
+"wanneer bepaalde bibliotheken, zoals libpam, libc en libssl, worden "
+"opgewaardeerd. Omdat deze herstarts dienstonderbrekingen op uw systeem "
+"kunnen veroorzaken wordt u normaal gesproken bij elke opwaardering gevraagd "
+"welke diensten u wilt herstarten. Als u voor deze optie kiest wordt dit niet "
+"meer aan u gevraagd. In plaats daarvan worden alle noodzakelijke herstarts "
+"automatisch gedaan zodat u geen vragen krijgt bij elke opwaardering van een "
+"bibliotheek."
--- eglibc-2.13.orig/debian/po/uk.po
+++ eglibc-2.13/debian/po/uk.po
@@ -0,0 +1,219 @@
+# translation of uk.po to Ukrainian
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans#
+#    Developers do not need to manually edit POT or PO files.
+#
+# Eugeniy Meshcheryakov <eugen@univ.kiev.ua>, 2004, 2006.
+msgid ""
+msgstr ""
+"Project-Id-Version: uk\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2006-02-21 10:12+0200\n"
+"Last-Translator: Eugeniy Meshcheryakov <eugen@univ.kiev.ua>\n"
+"Language-Team: Ukrainian\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.2\n"
+"Plural-Forms:  nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Всі локалі"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Локалі які потрібно згенерувати:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+#, fuzzy
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Локаль -- це механізм, що дозволяє перемикатися між кількома мовами для "
+"користувачів, які можуть використовувати свою мову, країну, символи порядок "
+"сортування і т.п."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Не встановлювати"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Локаль за замовчанням в системному оточенні:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+#, fuzzy
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"В Debian багато пакунків використовують локалі для відображення тексту на "
+"вибраній користувачем мові. Якщо ваша рідна мова не англійська, то ви можете "
+"змінити локаль за замовчанням. Список складений із локалей які ви вирішили "
+"згенерувати."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+#, fuzzy
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Примітка: цей пункт вибирає мову для всієї системи. Якщо в вашій системі "
+"працюють декілька користувачів, які не розмовляють мовою, яку ви вибрали, то "
+"вони можуть зіткнутися із труднощами, і тому, можливо, вам краще не "
+"встановлювати локаль за замовчанням."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/da.po
+++ eglibc-2.13/debian/po/da.po
@@ -0,0 +1,240 @@
+# Danish translation eglibc.
+# Copyright (C) 2012 eglibc & nedenstående oversættere.
+# This file is distributed under the same license as the eglibc package.
+# Morten Brix Pedersen <morten@wtf.dk>. 2006.
+# Joe Hansen <joedalton2@yahoo.dk>, 2010, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: eglibc\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2012-01-20 17:30+01:00\n"
+"Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n"
+"Language-Team: Danish <debian-l10n-danish@lists.debian.org> \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Alle lokalitetsfiler"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Lokalitetsfiler der skal genereres:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Lokalitetsfilerne er en ramme, så du kan skifte imellem forskellige sprog og "
+"give brugerne mulighed for at anvende deres eget sprog, land, tegn, "
+"sorteringsrækkefølge med mere."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Vælg venligst hvilken lokalitet der skal oprettes. UTF-8-lokaliteter bør "
+"vælges som standard, specielt for nyinstallationer. Andre tegnsæt kan være "
+"brugbare for kompatibilitet bagud med ældre systemer og programmer."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Ingen"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Standardlokalitet til systemmiljøet:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Mange pakker i Debian bruger lokaliteter til at vise tekst i det korrekte "
+"sprog til brugerne. Du kan vælge en standardlokalitet til systemet fra de "
+"oprettede lokaliteter."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Dette vil sætte sproget for hele systemet. Hvis dette system er et "
+"flerbrugersystem, hvor ikke alle brugerne er i stand til at tale "
+"standardsproget, vil de løbe ind i problemer."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Ønsker du at opgradere glibc nu?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"Kørende tjenester og programmer som bruger NSS skal genstartes, ellers vil "
+"de måske ikke mere kunne foretage opslag eller opnå godkendelse. "
+"Installationsprocessen er i stand til at genstarte nogle tjenester (såsom "
+"ssh eller telnetd), men andre programmer kan ikke genstartes automatisk. Et "
+"sådant program som kræver manuel stop og genstart efter glibc-opgraderingen "
+"er xdm - da automatisk genstart kan afbryde dine aktive X11-sessioner."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Dette skript registrerede de følgende installerede tjenester, som skal "
+"stoppes før opgradering: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Hvis du ønsker at afbryde opgraderingen nu og fortsætte senere, så svar "
+"venligst nej til spørgsmålet nedenfor."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "Tjenester til genstart for GNU libc-biblioteksopgradering:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"Kørende tjenester og programmer som bruger NSS skal genstartes, ellers vil "
+"de måske ikke mere kunne foretage opslag eller opnå godkendelse (for "
+"tjenester såsom ssh, kan dette påvirke din mulighed for at logge ind). "
+"Gennemse venligst den følgende kommaadskilte liste af init.d-skripter til "
+"tjenester som genstartes nu, og ret den hvis behovet er der."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Bemærk: Genstart af sshd/telnetd bør ikke påvirke eksisterende forbindelser."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "Kunne ikke genstarte udvalgte tjenester for GNU libc-opgraderingen"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"De følgende tjenester kunne ikke genstartes for GNU libc-"
+"biblioteksopgraderingen:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Du skal genstarte disse manuelt ved at køre »/etc/init.d/<service> start«."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr "xscreensaver og xlockmore skal genstartes før opgradering"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"En eller flere kørende instanser af xscreensaver eller xlockmore er blevet "
+"registreret på dette system. På grund af biblioteksændringer der ikke er "
+"kompatible, vil opgraderingen af GNU libc-biblioteket gøre, at du ikke kan "
+"godkende disse programmer. Du skal sørge for, at disse programmer bliver "
+"genstartet eller stoppet, før du fortsætter denne opgradering, så du undgår "
+"at lukke dine brugere ud af deres igangværende sessioner."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr "Genstart tjenester under pakkeopgraderinger uden at spørge?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
+"Der er tjenester installeret på dit system, som kræver at blive genstartet "
+"når bestemte biblioteker, såsom libpam, libc og libssl, opgraderes. Da disse "
+"genstarter kan medføre forstyrrelse af systemets tjenester, vil du normalt "
+"blive spurgt ved hver opgradering om listen over tjenester, du ønsker at "
+"genstarte. Du kan vælge denne indstilling for at undgå at blive spurgt; "
+"i stedet for vil alle nødvendige genstarter blive udført automatisk, så du "
+"kan undgå spørgsmål ved hver biblioteksopgradering."
+
--- eglibc-2.13.orig/debian/po/eu.po
+++ eglibc-2.13/debian/po/eu.po
@@ -0,0 +1,234 @@
+# translation of glibc 2.6.1-3 debconf to basque
+# Piarres Beobide <pi@beobide.net>, 2006.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+msgid ""
+msgstr ""
+"Project-Id-Version: eu\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2007-09-11 09:57+0100\n"
+"Last-Translator: Piarres Beobide <pi@beobide.net>\n"
+"Language-Team: librezale <librezale@librezale.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Lokal guztiak"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Sortu behar diren lokalak:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Lokalak hizkuntza anitz artean aldatzeko ingurugiroa da erabiltzaileek beren "
+"hizkuntza, herrialdea, karaktere-jokoa etab. erabiltzeko gaitasuna ematen "
+"dute."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Mesedez zein lokala sortuko diren hautatu. Lehenespen bezala UTF-8 locale-ak "
+"hautau beharko lirateke, bereiziki instalazio berri batetan. Beste karaktere "
+"joko batzuek sortzea erabilgarri izan liteke sistema eta software "
+"zaharragoekin bateragarritasuna mantentzeko."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Batez"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Sistema inguruneko lokal lehenetsia:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Debian pakete anitzek locale-ak erabiltzen dituzte erabiltzaileari dagokion "
+"hizkuntzan testuak bistaratzeko. Locale lehenetsia sortutako locale-en "
+"artean hautatu dezakezu."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Honek zure sistemako hizkuntza aukeratuko du. Hautatutako hizkuntza denek "
+"erabiltzen ez duten erabiltzaile anitzeko sistema bat bada, agian "
+"erabiltzaile horiek arazoetan aurki daitezke."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Glibc orain bertsio-berritu nahi al duzu?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"NSS erabiltzen duten abiaraziriko programa eta zerbitzuak berrabiarazi egin "
+"behar dira, bestela hauek ez dira bilaketak egin edo autentifikatzeko gai "
+"izango (ssh bezalako zerbitzuentzat, saio hasteko ahalmenean eragin dezake). "
+"Mesedez gainbegiratu berrabiaraziko diren zerbitzuen init.d script-en "
+"zuriunez bereiziriko zerrenda eta zuzendu behar izanez gero."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Skript honek bertsio-berritzea egin aurretik gelditu behar diren "
+"instalaturiko hurrengo zerbitzu hauek aurkitu ditu: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Bertsio-berritzea etzaeratu eta berandua jarraitu nahi izanez gero, ez "
+"erantzun behekaldeko galderari."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "GNU libc liburutegi eguneraketan berrabiarazi behar diren zerbitzuak:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"NSS erabiltzen duten abiaraziriko programa eta zerbitzuak berrabiarazi egin "
+"behar dira, besteka hauek ez dira bilaketak egin edo autentifikatzeko gai "
+"izango (ssh bezalako zerbitzuentzat, saio hasteko ahalmenean eragin dezake). "
+"Mesedez gainbegiratu berrabiaraziko diren zerbitzuen init.d script-en gakoz "
+"bereiziriko zerrenda eta zuzendu behar izanen gero."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Oharra: sshd/telnetd berrabiarazteak ez luke sorturik dauden konexioetan "
+"eragin beharko."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "Huts GNU glibc bertsio berritzerkoan zenbait zerbitzu berrabiaraztean"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"Hurrengo zerbitzuak ezin izan dira berrabiarazi GNU glibc liburutegi bertsio "
+"berritzerako:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Hauek eskuz abiarazi beharko dituzu '/etc/init.d/<zerbitzua> start' eginaz."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+"xscreensaver eta xlockmore berrabiarazi egin behar dira bertsio-berritu "
+"ondoren"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"Xscreensaver edo xlockmore instantzi bat edo gehiago antzeman dira sisteman. "
+"LKiburutegi aldaketa bateraezina direla eta GNU libc liburutegiak ez dizu "
+"programa hauetan autentifikatzen utziko. Programa hauek berrabiazi edo "
+"gelditzeko antolatu beharko zinateke erabiltzaileak beren saioetatik kanpo "
+"uztea sahiesteko."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/pt.po
+++ eglibc-2.13/debian/po/pt.po
@@ -0,0 +1,241 @@
+# Portuguese translation of glibc's debconf messages.
+# Copyright (C) 2007
+# This file is distributed under the same license as the glibc package.
+# Ricardo Silva <ardoric@gmail.com>, 2007.
+# Pedro Ribeiro <p.m42.ribeiro@gmail.com>, 2010, 2012
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: glibc\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2012-05-28 22:55+0100\n"
+"Last-Translator: Pedro Ribeiro <p.m42.ribeiro@gmail.com>\n"
+"Language-Team: Portuguese <traduz@debianpt.org>\n"
+"Language: pt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Todos os locales"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Locales a serem gerados:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Locales é uma framework para alternar entre várias línguas e permitir aos "
+"utilizadores utilizarem a sua língua, país, caracteres, etc."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Por favor escolha quais os locales a gerar. Os locales UTF-8 devem ser "
+"seleccionados, especialmente em instalações de raiz. Outros conjuntos de "
+"caracteres podem ser úteis para compatibilidade com sistemas e software "
+"antigo."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Nenhum"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Locale predefinido o ambiente do sistema:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Muitos pacotes em Debian usam locales para mostrar texto na língua correcta "
+"do utilizador. Pode escolher, de entre os locales gerados, o locale "
+"predefinido do sistema."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Isto irá escolher a língua padrão para todo o sistema. Se este é um sistema "
+"multi-utilizador em que nem todos os utilizadores são capazes de a falar, "
+"estes irão ter dificuldades."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Quer actualizar a glibc agora?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"Serviços e programas que estejam a correr que usem NSS têm de ser "
+"reiniciados, de outra forma podem deixar de ser capazes de resolver nomes ou "
+"de autenticar utilizadores. O processo de instalação é capaz de reiniciar "
+"alguns serviços (tais como ssh ou telnetd), mas há outros programas que não "
+"podem ser reiniciados automaticamente. Um dos programas que necessita de ser "
+"parado e reiniciado manualmente é o xdm - um reinício automático poderia "
+"desligar as suas sessões de X11 activas."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Este script detectou os seguintes serviços instalados que têm de ser parados "
+"antes da actualização: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Se quer interromper a actualização agora e continuar mais tarde, por favor "
+"responda Não à questão abaixo."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "Serviços a reiniciar para a actualização da biblioteca libc da GNU:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"Serviços e programas que estejam a correr que usem o NSS têm de ser "
+"reiniciados, de outra forma podem deixar de ser capazes de resolver nomes ou "
+"de autenticar utilizadores (para serviços como o ssh, isto pode afectar a "
+"sua capacidade de se ligar ao sistema). Por favor reveja a seguinte lista, "
+"separada por espaços, de scripts init.d para serviços a serem reiniciados "
+"agora, e corrija-a se for necessário."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Nota: reiniciar o sshd/telnetd não deve afectar nenhuma ligação existente."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "Falha ao reiniciar alguns serviços para a actualização da libc da GNU"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"Os seguintes serviços não puderam ser reiniciados para a actualização da "
+"biblioteca libc da GNU:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Terá de os inicializar manualmente correndo '/etc/init.d/<serviço> start'."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr "xscreensaver e xlockmore têm de ser reiniciados antes da actualização"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"Foram detectadas uma ou mais instâncias de xscreensaver ou xlockmore neste "
+"sistema. Devido a alterações incompatíveis da biblioteca, a actualização da "
+"biblioteca GNU libc deixá-lo-á incapaz de se autenticar para estes "
+"programas. Deve providenciar para que estes programas sejam reiniciados ou "
+"parados antes de continuar com esta actualização, para evitar que os seus "
+"utilizadores fiquem bloqueados e impedidos de aceder às suas sessões actuais."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr "Reiniciar serviços sem perguntar durante a actualização do pacote?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
+"Há serviços instalados no seu sistema que necessitam de ser reiniciados "
+"quando são actualizadas certas bibliotecas, como libpam, libc e libssl. Uma "
+"vez que estes reinícios podem causar interrupção de serviços no sistema, "
+"é-lhe normalmente perguntado em cada actualização que serviços deseja "
+"reiniciar. Pode escolher esta opção para que os reinícios necessários sejam "
+"automaticamente tratados pelo processo de actualização em vez de lhe serem "
+"colocadas questões."
--- eglibc-2.13.orig/debian/po/it.po
+++ eglibc-2.13/debian/po/it.po
@@ -0,0 +1,234 @@
+# Italian (it) translation of debconf templates for eglibc
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# This file is distributed under the same license as the eglibc package.
+# Luca Monducci <luca.mo@tiscali.it>, 2005-2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: eglibc 2.9 debconf templates\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2009-05-31 10:25+0200\n"
+"Last-Translator: Luca Monducci <luca.mo@tiscali.it>\n"
+"Language-Team: Italian <debian-l10n-italian@lists.debian.org>\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Tutti i «locale»"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "«Locale» da generare:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"I «locale» sono l'infrastruttura che permette di cambiare la lingua e "
+"consente agli utenti di utilizzare la propria lingua, paese, caratteri, "
+"criteri di ordinamento, ecc."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Scegliere quali «locale» generare. I «locale» UTF-8 dovrebbero essere già "
+"prescelti, in particolare sulle nuove installazioni. Gli altri set di "
+"caratteri potrebbero essere utili per risolvere problemi di compatibilità "
+"all'indietro con sistemi o programmi più vecchi."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Nessuno"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "«Locale» predefinito sul sistema:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Molti pacchetti Debian usano i «locale» per mostrare messaggi nella lingua "
+"dell'utente. È possibile scegliere, fra quelli generati, un «locale» come "
+"predefinito per il sistema."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Questo imposta la lingua predefinita per l'intero sistema. Se questo è un "
+"sistema multi-utente e non tutti gli utenti parlano la lingua predefinita "
+"alcuni di essi potrebbero avere delle difficoltà."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Aggiornare glibc adesso?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"I servizi e i programmi in esecuzione che usano NSS devono essere riavviati "
+"altrimenti potrebbero non essere più in grado di effettuare ricerche o "
+"autenticazioni. Il processo d'installazione è in grado di riavviare alcuni "
+"servizi (come ssh o telnetd), ma altri programmi non possono essere "
+"riavviati automaticamente. Uno dei programmi che devono essere fermati e "
+"riavviati manualmente dopo aver aggiornato glibc è xdm perché il riavvio "
+"automatico potrebbe disconnettere le sessioni X11 attive."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Questo script ha rilevato che i seguenti servizi devono essere fermati prima "
+"dell'aggiornamento: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Per interrompere adesso l'aggiornamento e riprenderlo in seguito, rispondere "
+"«No» alla questa domanda."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "Servizi da riavviare per l'aggiornamento della libreria GNU libc:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"I servizi e i programmi in esecuzione che usano NSS devono essere riavviati "
+"altrimenti potrebbero non essere più in grado di effettuare ricerche o "
+"autenticazioni (i servizi tipo ssh potrebbero avere problemi d'accesso). "
+"Controllare il seguente elenco di nomi di script per init.d separati da uno "
+"spazio relativi ai servizi che devono essere riavviati e, se necessario, "
+"correggerlo."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Nota: il riavvio di sshd/telnetd non ha alcun effetto sulle connessioni "
+"esistenti."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "Errore nel riavvio di alcuni servizi per l'aggiornamento di GNU libc"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"Non è stato possibile riavviare i seguenti servizi per l'aggiornamento della "
+"libreria GNU libc:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr "È necessario avviarli manualmente con «/etc/init.d/<servizio> start»."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr "Riavvio di xscreensaver e xlockmore prima dell'aggiornamento"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"Su questo sistema sono state rilevate una o più istanze di xscreensaver o "
+"xlockmore in esecuzione. A causa di modifiche incompatibili nella libreria, "
+"l'aggiornamento della libreria GNU libc impedirà di autenticarsi con questi "
+"programmi. È necessario riavviare o fermare questi servizi prima di "
+"proseguire con questo aggiornamento per evitare di buttare fuori gli utenti "
+"dalle sessioni attualmente aperte."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/de.po
+++ eglibc-2.13/debian/po/de.po
@@ -0,0 +1,245 @@
+# Translation of glibc debconf templates to German
+# Copyright (C) Helge Kreutzmann <debian@helgefjell.de>, 2006-2009, 2011.
+# This file is distributed under the same license as the glibc package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: glibc 2.13-22\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2011-12-14 19:39+0100\n"
+"Last-Translator: Helge Kreutzmann <debian@helgefjell.de>\n"
+"Language-Team: de <debian-l10n-german@lists.debian.org>\n"
+"Language: German\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Alle Standorteinstellungen"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Zu generierende Standorteinstellungen (�locales�):"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Standorteinstellungen ist ein System, um zwischen verschiedenen Sprachen "
+"umzuschalten. Benutzer k�nnen damit ihre Sprache, ihr Land, ihren "
+"Zeichensatz, ihre Sortierreihenfolge und anderes mehr festlegen."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Bitte w�hlen Sie aus, welche Standorteinstellungen erzeugt werden sollen. "
+"UTF-8-Standorteinstellungen sollten standardm��ig ausgew�hlt werden, "
+"insbesondere f�r neue Installationen. Andere Zeichens�tze k�nnten f�r "
+"R�ckkompatibilit�t mit �lteren Systemen und Software n�tzlich sein."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Keine"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Standard-Standorteinstellung f�r die Systemumgebung?"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Viele Debian-Pakete benutzen Standorteinstellungen, um Text in der f�r die "
+"Benutzer korrekten Sprache anzuzeigen. Sie k�nnen aus den generierten "
+"Standorteinstellungen einen Standard f�r Ihr System ausw�hlen."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Bemerkung: Dies w�hlt die Standardsprache f�r das gesamte System. Falls dies "
+"ein Mehrbenutzer-System ist und nicht alle Benutzer die Standardsprache "
+"sprechen, dann werden diese Schwierigkeiten haben."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "M�chten Sie das Upgrade von Glibc jetzt durchf�hren?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"Laufende Dienste und Programme, die NSS verwenden, m�ssen neu gestartet "
+"werden, da sie andernfalls keine �berpr�fungen oder Authentisierung mehr "
+"durchf�hren k�nnen. Der Installationsprozess kann einige Dienste neu starten "
+"(wie Ssh oder Telnetd), aber andere Programme k�nnen nicht automatisch neu "
+"gestartet werden. Eines dieser Programme, die nach dem Upgrade von Glibc ein "
+"manuelles Stoppen und Neustarten ben�tigen ist Xdm, da ein automatischer "
+"Neustart Sie von Ihren aktiven X11-Sitzung trennen k�nnte."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Dieses Skript erkannte die folgenden installierten Dienste, die vor dem "
+"Upgrade gestoppt werden m�ssen: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Falls Sie das Upgrade jetzt unterbrechen und sp�ter Fortfahren m�chten, "
+"antworten Sie bitte auf die unten folgende Frage mit Nein."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr ""
+"Dienste, die beim GNU Libc-Bibliotheks-Upgrade neu gestartet werden sollen:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"Laufende Dienste und Programme, die NSS verwenden, m�ssen neu gestartet "
+"werden, da sie andernfalls keine �berpr�fungen oder Authentisierung mehr "
+"durchf�hren k�nnen (f�r Dienste wie ssh kann dies die M�glichkeit der "
+"Anmeldung betreffen). Bitte pr�fen Sie, welche der Dienste in der folgenden, "
+"durch Leerzeichen getrennte Liste von init.d-Skripten neu gestartet werden "
+"sollen, und korrigieren Sie diese falls notwendig."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Hinweis: das Neustarten von sshd/telnetd sollte existierende Verbindungen "
+"nicht beeintr�chtigen."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "Fehler beim Neustarten einiger Dienste f�r das GNU Libc-Upgrade"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"Die folgenden Dienste konnten f�r das GNU Libc-Upgrade nicht neu gestartet "
+"werden:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Sie m�ssen diese manuell starten, indem Sie �/etc/init.d/<service> start� "
+"ausf�hren."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr "Xscreensaver und Xlockmore m�ssen vor dem Upgrade neu gestartet werden"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"Eine oder mehrere laufende Instanzen von Xscreensaver oder Xlockmore sind "
+"auf diesem System entdeckt worden. Aufgrund inkompatibler �nderungen in "
+"Bibliotheken wird das GNU Libc-Upgrade Sie au�erstande setzen, sich "
+"gegen�ber diesen Programmen zu authentifizieren. Sie sollten daf�r sorgen, "
+"dass diese Programme neu gestartet oder beendet werden, bevor Sie dieses "
+"Upgrade fortsetzen, damit Ihre Benutzer nicht aus ihren laufenden Sitzungen "
+"ausgesperrt werden."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr "Dienste bei Paket-Upgrades ohne R�ckfrage neu starten?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
+"Auf Ihrem System sind Dienste installiert, die beim Upgrade bestimmter "
+"Bibliotheken, wie Libpam, Libc und Libssl, neu gestartet werden m�ssen. Da "
+"diese Neustarts zu Unterbrechungen der Dienste f�r dieses System f�hren "
+"k�nnen, werden Sie normalerweise bei jedem Upgrade �ber die Liste der neu zu "
+"startenden Dienste befragt. Sie k�nnen diese Option w�hlen, um diese Abfrage "
+"zu vermeiden; stattdessen werden alle notwendigen Dienste-Neustarts f�r Sie "
+"automatisch vorgenommen und die Beantwortung von Fragen bei jedem Upgrade von "
+"Bibliotheken vermieden."
--- eglibc-2.13.orig/debian/po/ru.po
+++ eglibc-2.13/debian/po/ru.po
@@ -0,0 +1,250 @@
+# translation of ru.po to Russian
+# Translation of glibc debconf .po to Russian
+# This file is distributed under the same license as the eglibc package.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
+#
+# Yuri Kozlov <kozlov.y@gmail.com>, 2006.
+# Sergey Alyoshin <alyoshin.s@gmail.com>, 2007, 2008.
+# Yuri Kozlov <yuray@komyakino.ru>, 2009, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: eglibc 2.13-23\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2011-12-17 09:26+0400\n"
+"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
+"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.0\n"
+"Plural-Forms:  nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
+"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Все локали"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Локали, которые будут созданы:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Локаль -- это инфраструктура для поддержки в системе нескольких языков; она "
+"позволяет пользователю настроить язык сообщений, страну, алфавит, порядок "
+"сортировки и т.п."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Выберите создаваемые локали. Кодировка локали UTF-8 должна быть выбрана по "
+"умолчанию, особенно при новой инсталляции. Другие кодировки локали могут "
+"быть полезны для обратной совместимости со старыми системами и программами."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Нет"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Локаль по умолчанию в системном окружении:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Многие пакеты в Debian используют локали для отображения сообщений на языке "
+"пользователя. Вы можете выбрать из созданных локалей системную локаль по "
+"умолчанию."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Эта настройка устанавливает язык по умолчанию для всей системы. Если это "
+"многопользовательская система, где не все пользователи говорят на выбранном "
+"языке по умолчанию, то у них возникнут трудности."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Хотите выполнить обновление glibc сейчас?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"Запущенные службы и программы, которые используют NSS, должны быть "
+"перезапущены, иначе они не будут способны выполнять поиск или "
+"аутентификацию. В процессе установки возможно перезапустить некоторые "
+"службы (такие, как ssh или telnetd), но другие программы не могут быть "
+"автоматически перезапущены. Одна из таких программ, которая требует ручной "
+"остановки и перезапуска после обновления glibc, это xdm, так как её "
+"автоматический перезапуск может отключить ваши активные сессии X11."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Этот сценарий определил следующие установленные службы, которые должны быть "
+"остановлены перед обновлением: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Если вы желаете прервать процесс обновления сейчас и продолжить позже, "
+"ответьте Нет на следующий вопрос."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "Для обновления GNU libc должны быть перезапущены следующие службы:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"Запущенные службы и программы, которые используют NSS, должны быть "
+"перезапущены, иначе они не будут способны выполнять поиск или аутентификацию "
+"(для таких служб, как ssh, это может повлиять на возможность входа в "
+"систему). Просмотрите следующий разделённый пробелами список из скриптов "
+"init.d для служб, которые будут сейчас перезапущены и отредактируйте его "
+"при необходимости."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Примечание: перезапуск sshd/telnetd не должен повлиять на какие-либо из "
+"существующих соединений."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "Произошёл сбой при перезапуске некоторых служб для обновления GNU libc"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"Следующие службы не могут быть перезапущены для обновления библиотеки GNU "
+"libc:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Вам будет нужно запустить их вручную, для чего следует выполнить '/etc/init."
+"d/<служба> start'."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr "Перед обновлением требуется перезапустить xscreensaver и xlockmore"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"В системе обнаружен один или несколько экземпляров xscreensaver или "
+"xlockmore. Так данное обновление устанавливает несовместимую с прошлой "
+"версией библиотеку GNU libc, эти программы не смогут проводить "
+"аутентификацию. Перед тем как продолжить данное обновление вам нужно "
+"перезапустить или остановить эти программы, чтобы избежать блокировки "
+"имеющихся сеансов пользователей."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr "Перезапускать службы при обновлении пакета не задавая вопрос?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
+"В системе установлены службы, которые требуют перезапуска "
+"после обновления определённых библиотек (например, "
+"libpam, libc и libssl). Так как это может вызвать перерыв в работе службы, "
+"обычно, при каждом обновлении выдаётся список служб, которые "
+"нужно перезапустить. "
+"Чтобы этот вопрос не задавался, вы можете ответить утвердительно; "
+"в этом случае все необходимые службы будут перезапущены "
+"автоматически."
+
--- eglibc-2.13.orig/debian/po/sv.po
+++ eglibc-2.13/debian/po/sv.po
@@ -0,0 +1,242 @@
+# Translation of eglibc debconf template to Swedish
+# Copyright (C) 2011 Martin Bagge <brother@bsnet.se>
+# This file is distributed under the same license as the eglibc package.
+#
+# Martin Bagge <brother@bsnet.se>, 2008, 2011
+msgid ""
+msgstr ""
+"Project-Id-Version: glibc_2.7-11_sv\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2011-12-29 11:11+0100\n"
+"Last-Translator: Martin Bagge / brother <brother@bsnet.se>\n"
+"Language-Team: Swedish <debian-l10n-swedish@lists.debian.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"X-Poedit-Language: Swedish\n"
+"X-Poedit-Country: Sweden\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Alla lokalanpassningar"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Lokalanpassningar att generera:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Lokalanpassning (locale) är ett ramverk för att växla mellan flera språk för "
+"att låta användare använda sitt språk, land, tecken och sorteringsordning, "
+"etc."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Välj vilka lokalanpassningar som ska genereras. UTF-8-lokaler bör väljas som "
+"standard, speciellt för nya installationer. Andra teckenuppsättningar kan "
+"vara användbara för bakåtkompatibilitet med äldre system och programvara."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Ingen"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Välj lokalanpassning som ska vara standard i systemet:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Många paket i Debian använder lokalanpassningar för att visa text i det "
+"korrekta språket för användaren. Du kan välja en standardlokal för systemet "
+"från de genererade lokalerna."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Detta kommer att välja standardspråket för hela systemet. Om du kör ett "
+"system med flera användare där inte alla talar det valda språket, kan de få "
+"problem."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Vill du uppgradera glibc nu?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"Körande tjänster och program som använder NSS behöver startas om, annars "
+"kanske de inte kan köra uppslag eller autentisering längre. Installationen "
+"kan starta om några tjänster (ex. ssh och telnetd), andra program kan inte "
+"startas om automatiskt - xdm är ett sådant program som du måste starta om "
+"själv eftersom det skulle starta om din X-session."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Skriptet hittade följande installerade tjänster som måste stoppas före "
+"uppgraderingen: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Om du vill avbryta uppgraderingen nu och fortsätta senare anger du Nej på "
+"frågan nedan."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "Tjänster att starta om för uppgradering av GNU libc-biblioteket:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"Körande tjänster och program som använder NSS behöver startas om, annars "
+"kanske de inte kan köra uppslag eller autentisering längre (för tjänster "
+"såsom ssh kan det påverka din möjlighet att logga in). Granska följande "
+"blankstegsseparerade lista över init.d-skript för tjänster som ska startas "
+"om nu, och gör ändringar om det behövs."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Observera: omstart av sshd/telnetd ska inte påverka befintliga anslutningar."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr ""
+"Misslyckades med att starta om vissa tjänster för uppgraderingen av GNU libc"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"Följande tjänster kunde inte startas om för uppgraderingen av GNU libc-"
+"biblioteket:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Du behöver starta dessa manuellt genom att köra \"/etc/init.d/<tjänst> start"
+"\"."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+"xscreensaver och xlockmore måste startas om innan uppgraderingen påbörjas"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"En eller flera instanser av xscreensaver eller xlockmore har hittats på "
+"systemet. På grund av inkompatabilitet i och med förändringar av biblioteket "
+"kan uppgraderingen av GNU libc innebära att du inte kan autentisera med "
+"dessa program. Se till att alla instanser av programmen startas om eller "
+"stoppas innan du fortsätter med denna uppgradering för att undvika att "
+"användare blir utelåsta från sina sessioner."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr "Ska tjänster startas om vid paketuppgraderinger utan att först fråga?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
+"Det finns tjänster på installerade på systemet som behöver startas om när "
+"vissa bibliotek, exempelvis libpam, libc och libssl, uppgraderas. Eftersom "
+"dessa omstarter kan orsaka avbrott i tjänsten ställs normalt en fråga vid "
+"varje uppgradering där en lista med tjänster som ska startas om presenteras. "
+"Du kan välja att aktivera detta alternativ för att undvika att frågan "
+"ställs. Istället kommer alla nödvändiga omstarter att göras automatiskt."
--- eglibc-2.13.orig/debian/po/ml.po
+++ eglibc-2.13/debian/po/ml.po
@@ -0,0 +1,210 @@
+# Translation of glibc debconf template.
+# Copyright (C) 2007 Free Software Foundation, Inc
+# This file is distributed under the same license as the glibc package.
+# അനൂപ്|Anoop പി|P <gnuanu@gmail.com>, ലാലു|Lalu കെആര്‍|KR <frecolalu@gmail.com>, സജീവ്|Sajeev പിആര്‍|PR<saju_rrk@yahoo.com>, 2007
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Glibc 2007_05_26\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2007-05-26 15:09+0530\n"
+"Last-Translator: അനൂപ്|Anoop പി|P <gnuanu@gmail.com>, ലാലു|Lalu കെആര്‍|KR "
+"<frecolalu@gmail.com>,സജീവ് |Sajeev പിആര്‍|PR <saju_rrk@yahoo.com>\n"
+"Language-Team: Swathanthra|സ്വതന്ത്ര Malayalam|മലയാളം Computing|കമ്പ്യൂട്ടിങ്ങ്  <smc-"
+"discuss@googlegroups.com>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-Language: Malayalam\n"
+"X-Poedit-Country: INDIA\n"
+"X-Poedit-SearchPath-0: /home/mobin\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "എല്ലാ ലൊക്കേലുകളും"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "സൃഷ്ടിക്കപ്പെടേണ്ട ലൊക്കേലുകള്‍:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"വിവിധ ഭാഷകളില്‍ നിന്ന് സ്വന്തം ഭാഷ, രാജ്യം, അക്ഷരങ്ങള്‍, അക്ഷരക്രമം മുതലായവ ഉപയോഗിക്കാനായി "
+"ഉപയോക്താക്കളെ സഹായിക്കുന്ന ചട്ടക്കൂടുകളാണ്  ലൊക്കേലുകള്‍."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"ദയവായി സൃഷ്ടിക്കേണ്ട ലൊക്കേലുകള്‍ തിരഞ്ഞെടുക്കുക. പുതിയ ഇന്‍സ്റ്റാലേഷനുകള്‍ക്ക് സ്വതേ തിരഞ്ഞെടുക്കുന്നത് "
+"UTF-8 ലൊക്കേലുകള്‍ ആയിരിക്കും. മറ്റ്  അക്ഷരക്കൂട്ടങ്ങള്‍ പഴയ സിസ്റ്റങ്ങളും സോഫ്റ്റ്‌വെയറുകളുമായി "
+"പിന്നോട്ടുള്ള പൊരുത്തത്തിനായി ഉപയോഗപ്രദമായേയ്ക്കാം. "
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "ഒന്നുമില്ല"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "സിസ്റ്റം പരിസരത്തിനു വേണ്ടിയുളള സഹജമായ ലൊക്കേല്‍:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"ഉപയോക്താവിനുവേണ്ടി ശരിയായ ഭാഷയില്‍ ടെക്സ്റ്റ് പ്രദര്‍ശിപ്പിക്കുന്നതിനായി ഒരുപാട് ഡെബിയന്‍ "
+"പാക്കേജുകള്‍ ലൊക്കേല്‍ ഉപയോഗിക്കുന്നു. സൃഷ്ടിക്കപ്പെട്ട ലൊക്കേലുകളില്‍ നിന്ന് സഹജമായ ലൊക്കേല്‍ "
+"സിസ്റ്റത്തിനുവേണ്ടി നിങ്ങള്‍ക്ക് തിരഞ്ഞെടുക്കാവുന്നതാണ്."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"സിസ്റ്റത്തില്‍ എല്ലായിടത്തേയും സഹജമായ ഭാഷ ഇത്  തിരഞ്ഞെടുക്കും.  സഹജമായ ഭാഷ സംസാരിക്കാന്‍ "
+"കഴിയാത്ത ഒന്നിലധികം ഉപയോക്താക്കളുള്ള സിസ്റ്റമാണിതെങ്കില്‍ അവര്‍ക്ക് പ്രയാസങ്ങള്‍ അനുഭവപ്പെടും."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/ro.po
+++ eglibc-2.13/debian/po/ro.po
@@ -0,0 +1,231 @@
+# translation of po-debconf://kdebase.po to romanian
+# Romanian translation of glibc.
+# Copyright (C) 2006 THE glibc'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the glibc package.
+#
+# Stan Ioan-Eugen <stan.ieugen@gmail.com>, 2006, 2007, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2008-02-17 12:48+0200\n"
+"Last-Translator: stan ioan-eugen <stan.ieugen@gmail.com>\n"
+"Language-Team: romanian <debian-l10n-romanian@lists.debian.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Toate localele"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Localele ce vor fi generate:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Locale este un cadru de lucru pentru utilizatori, care le permite acestora "
+"să schimbe între mai multe limbi pentru a folosi propria lor limbă, țară, "
+"caractere, formatare a datei, etc."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Alegeți ce locale se generează. Localele UTF-8 ar trebui alese implicit, în "
+"special pentru instalări noi. Din motive de compatibilitate cu soft sau "
+"sisteme mai vechi, puteți alege să se genereze și alte seturi de caractere."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Nici una"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Locale implicite pentru sistem:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Multe pachete din Debian folosesc locale pentru a afișa text în limba "
+"corectă pentru utilizatori. Puteți alege o valoarea pentru locale, implicită "
+"pentru sistem, din localele generate."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Această opțiune va stabili limba pentru tot sistemul. Dacă aveți un sistem "
+"multi-utilizator unde nu toți utilizatorii vorbesc limba aleasă, atunci ei "
+"vor întâmpina dificultăți."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+#, fuzzy
+#| msgid ""
+#| "Running services and programs that are using NSS need to be restarted, "
+#| "otherwise they might not be able to do lookup or authentication any more "
+#| "(for services such as ssh, this can affect your ability to login). Please "
+#| "review the following space-separated list of init.d scripts for services "
+#| "to be restarted now, and correct it if needed."
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"Serviciile și programele care rulează și folosesc NSS trebuiesc repornite, "
+"altfel este posibil să nu mai poată efectua autentificarea sau căutarea "
+"numelor (în cazul serviciilor gen ssh, acest lucru poate determina "
+"imposibilitatea autentificării). Analizati următoarea listă ce conține, "
+"separate prin spațiu, scripturi init.d ale serviciilor ce trebuiesc "
+"repornite acum și corectați-o dacă este nevoie."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "Servicii ce trebuiesc repornite la înnoirea bibliotecii GNU libc:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"Serviciile și programele care rulează și folosesc NSS trebuiesc repornite, "
+"altfel este posibil să nu mai poată efectua autentificarea sau căutarea "
+"numelor (în cazul serviciilor gen ssh, acest lucru poate determina "
+"imposibilitatea autentificării). Analizati următoarea listă ce conține, "
+"separate prin spațiu, scripturi init.d ale serviciilor ce trebuiesc "
+"repornite acum și corectați-o dacă este nevoie."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Notă: repornirea sshd/telnetd nu ar trebui să afecteze conexiunile existente."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "Eșec la pornirea unor servicii pentru înnoirea GNU libc"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"Următoarele servicii nu ar trebui repornite la înnoirea bibliotecii GNU libc."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Va trebui să porniți aceste servicii manual executând comanda '/etc/init.d/"
+"<serviciu> start'."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/zh_CN.po
+++ eglibc-2.13/debian/po/zh_CN.po
@@ -0,0 +1,220 @@
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+# Hiei Xu <nicky@mail.edu.cn>, 2004.
+# Carlos Z.F. Liu <carlos_liu@yahoo.com>, 2004.
+# LI Daobing <lidaobing@gmail.com>, 2007, 2008.
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: glibc 2.7-9\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2008-02-28 23:44+0800\n"
+"Last-Translator: LI Daobing <lidaobing@gmail.com>\n"
+"Language-Team: Chinese (Simplified) <debian-chinese-gb@lists.debian.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "全部区域设置"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "请选择需要生成的区域设置(locale)。"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"区域设置(locale)是一种在多种语言之间切换的框架，用户可以通过它来设定自己的语"
+"言、国家、字符集、字符串排序方式等。"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"请选择需要生成的区域设置。通常应当选择 UTF-8 字符集的区域设置，特别是对于新安"
+"装的系统。其他的字符集一般用于兼容旧系统和旧软件。"
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "无"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "哪个将作为系统环境默认的区域设置(locale)？"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Debian 里的很多软件包都使用区域设置(locale)来以正确的语言向用户显示文本。你可"
+"以从生成的区域设置中选择一个缺省的区域设置。"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"注意：这将会把整个系统都设置为这种语言。如果您运行的是一个多用户系统，而且并"
+"不是系统内的所有用户都使用您选择的语言，那么他们将会遇到一些麻烦。"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "你想现在升级 glibc 么?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"使用 NSS 的服务和程序需要重启，否则可能无法继续查询或验证。安装过程能重启部分"
+"服务(如 ssh 和 telnetd)，但其他程序无法自动重启。xdm 就是需要在 glibc 升级完"
+"成后手动停止和重启的程序 - 因为自动重启可能会中断你的当前 X11 会话。"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr "脚本检测到以下的服务需要在升级前停止: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr "如果你想打断升级并在稍后继续，请对下面的问题答 No"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "GNU libc 库升级需要重启如下的服务："
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"使用 NSS 的服务和程序需要重启，否则可能无法查询或验证(对于 ssh 这类的服务，有"
+"可能导致你无法登录)。请检查下面需要重启的 init.d 脚本列表(空格分隔)，如有误请"
+"改正。"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr "提示：重启 sshd/telnetd 不会影响现有的连接。"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "因 GNU libc 升级而重启的部分服务重启失败"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr "GNU libc 库升级，但下列服务无法重启："
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr "你需要通过手动运行 '/etc/init.d/<service> start' 来启动这些服务。"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/el.po
+++ eglibc-2.13/debian/po/el.po
@@ -0,0 +1,222 @@
+# translation of el.po to Greek
+# translation of templates.po to Greek
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans#
+#    Developers do not need to manually edit POT or PO files.
+# Konstantinos Margaritis <markos@debian.org>, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: el\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2004-01-21 22:44EEST\n"
+"Last-Translator: Konstantinos Margaritis <markos@debian.org>\n"
+"Language-Team: Greek <debian-l10n-greek@lists.debian.org>\n"
+"Language: el\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.0.2\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr ""
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+#, fuzzy
+msgid "Locales to be generated:"
+msgstr "Επιλέξτε τα γλωσσικά περιβάλλοντα που θέλετε να δημιουργηθούν."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+#, fuzzy
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Το γλωσσικό περιβάλλον (locale) είναι ένα πλαίσιο υποστήριξης εναλλαγής "
+"πολλαπλών γλωσσών, ώστε οι χρήστες να μπορούν να χρησιμοποιούν τη γλώσσα "
+"τους, με όλα τα συνεπακόλουθα, χαρακτήρες, νόμισμα, τοπικές ρυθμίσεις, κλπ."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Κανένα"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+#, fuzzy
+msgid "Default locale for the system environment:"
+msgstr "Ποιο γλωσσικό περιβάλλον επιθυμείτε ως προκαθορισμένο για το σύστημα;"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+#, fuzzy
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Πολλά πακέτα στο Debiaν χρησιμοποιούν τη δυνατότητα των γλωσσικών "
+"περιβάλλοντων για να εμφανίζουν κείμενο στην επιλεγμένη γλώσσα του κάθε "
+"χρήστη. Μπορείτε να αλλάξετε το προκαθορισμένο γλωσσικό περιβάλλον αν η "
+"Αγγλική δεν είναι η μητρική σας γλώσσα. Αυτές οι επιλογές βασίζονται στα "
+"γλωσσικά περιβάλλοντα που επιλέξατε να δημιουργηθούν."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+#, fuzzy
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Σημείωση: Αυτή η επιλογή θα επιλέξει τη γλώσσα για ολόκληρο το σύστημά σας. "
+"Αν έχετε ένα πολυχρηστικό σύστημα, στο οποίο οι χρήστες δε μιλούν όλοι την "
+"γλώσσα που εσείς επιλέξατε, τότε πιθανόν να συναντήσουν δυσκολίες και για το "
+"λόγο αυτό ίσως να μη πρέπει να ορίσετε ένα προκαθορισμένο γλωσσικό "
+"περιβάλλον."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/ta.po
+++ eglibc-2.13/debian/po/ta.po
@@ -0,0 +1,205 @@
+# translation of glibc.po to TAMIL
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Dr.T.Vasudevan <agnihot3@gmail.com>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: glibc\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2007-04-24 19:42+0530\n"
+"Last-Translator: Dr.T.Vasudevan <agnihot3@gmail.com>\n"
+"Language-Team: TAMIL <ubuntu-l10n-tam@lists.ubuntu.com>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "எல்லா உள்ளார்ந்த இடங்களும்"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "உருவாக்க வேண்டிய உள்ளார்ந்த இடங்கள்"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"உள்ளார்ந்த இடங்கள் என்பது பல மொழிகளுக்கிடையே மாறவும் பயனர்களை அவரவர் மொழி, நாடு, "
+"குறிகள், முறைமைகள் ஆகியவற்றை பயன்படுத்தவும் பயனாகும் சட்ட அமைப்பு"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"எந்த உள்ளார்ந்த இடத்தை உருவாக்க வேண்டும் என தேர்வு செய்க. முன்னிருப்பாக UTF-8 உள்ளார்ந்த "
+"இடங்கள் தேர்வு செய்யபட வேண்டும். குறிப்பாக புதிய நிறுவல்களுக்கு. மற்ற குறியாக்க "
+"தொகுப்புகள் பழைய கணினிகள் மற்றும் மென்பொருட்களுடன் பின் நோக்கு இசைவுக்கு பயன்படும்."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "ஒன்றுமில்லை"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "கணினி சூழலுக்கு முன்னிருப்பு உள்ளார்ந்த இடம்"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"பயனருக்கு சரியான மொழியில் உரையை காட்ட டெபியனின் பல பொதிகள் உள்ளார்ந்த இடத்தை "
+"பயன்படுத்துகின்றன. உருவாக்கப்பட்டவற்றிலிருந்து கணினிக்கு முன்னிருப்பு உள்ளார்ந்த இடத்தை "
+"தேர்வு செய்யவும்."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"இது முழு கணினிக்கு முன்னிருப்பு மொழியை தேர்வு செய்யும். இது பலர் பயன் படுத்தும் "
+"கணினியானால் எல்லா பயனர்களும் முன்னிருப்பு மொழியை அறிந்திராவிடில் அவர்கள் துன்புறுவர்."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/POTFILES.in
+++ eglibc-2.13/debian/po/POTFILES.in
@@ -0,0 +1,2 @@
+[type: gettext/rfc822deb] debhelper.in/locales.templates
+[type: gettext/rfc822deb] debhelper.in/libc.templates
--- eglibc-2.13.orig/debian/po/fi.po
+++ eglibc-2.13/debian/po/fi.po
@@ -0,0 +1,239 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: glibc\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2008-04-01 21:12+0200\n"
+"Last-Translator: Esko Arajärvi <edu@iki.fi>\n"
+"Language-Team: Finnish <debian-l10n-finnish@lists.debian.org>\n"
+"Language: fi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Kaikki maa-asetukset"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Muodostettavat maa-asetukset."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Maa-asetusten avulla on mahdollista vaihtaa käytettävää kieltä ja antaa "
+"käyttäjien asettaa haluamansa kieli, maa, merkistö, aakkostustapa, jne."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Valitse mitkä maa-asetukset luodaan. Oletuksena tulisi valita UTF-8-tyypin "
+"asetuksia, erityisesti uusissa asennuksissa. Muut merkkijoukot voi olla "
+"tarpeen vanhempien järjestelmien ja ohjelmien kanssa yhteensopivuussyistä."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Ei mikään"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Järjestelmäympäristön oletusmaa-asetus:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Monet Debianin paketit käyttävät maa-asetuksia näyttääkseen tekstit "
+"käyttäjälle oikealla kielellä. Järjestelmän oletusmaa-asetus voidaan valita "
+"luoduista maa-asetuksista."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Tämä asettaa koko järjestelmän oletuskielen. Jos tällä järjestelmällä on "
+"useita käyttäjiä, eivätkä kaikki käyttäjät ymmärrä oletuskieltä, heillä "
+"tulee olemaan ongelmia."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Tulisiko glibc päivittää nyt?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"Käynnissä olevat palvelut ja ohjelmat, jotka käyttävät NSS:ää, täytyy "
+"käynnistää uudelleen. Muuten ne eivät välttämättä enää pysty tekemään "
+"etsintöjä tai tunnistautumisia. Asennusprosessi pystyy käynnistämään jotkin "
+"palvelut uudelleen (esimerkiksi ssh:n ja telnetdin), mutta muita ohjelmia ei "
+"voida käynnistää automaattisesti uudelleen. Yksi tällainen ohjelma, joka "
+"täytyy käsin pysäyttää ja käynnistää uudelleen glibcin päivityksen jälkeen, "
+"on xdm. Tämä johtuu siitä, että automaattinen uudelleenkäynnistys saattaisi "
+"keskeyttää aktiiviset X11-istunnot."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Tämä komentosarja löysi seuraavat asennetut palvelut, jotka tulee pysäyttää "
+"ennen päivitystä: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Jos päivitys halutaan keskeyttää nyt ja jatkaa myöhemmin, älä valitse tätä "
+"vaihtoehtoa."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr ""
+"Palvelut, jotka tulee käynnistää uudelleen GNU libc -kirjastoa "
+"päivitettäessä:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"Käynnissä olevat palvelut ja ohjelmat, jotka käyttävät NSS:ää, täytyy "
+"käynnistää uudelleen. Muuten ne eivät välttämättä enää pysty tekemään "
+"etsintöjä tai tunnistautumisia (esimerkiksi ssh:n kanssa kirjautuminen ei "
+"välttämättä onnistu). Tarkista alla oleva välilyönnein eroteltu lista niiden "
+"palveluiden init.d-komentosarjoista, jotka käynnistetään nyt uudelleen, ja "
+"korjaa sitä tarvittaessa."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Huomautus: sshd:n tai telnetd:n uudelleenkäynnistyksen ei pitäisi vaikuttaa "
+"olemassa oleviin yhteyksiin."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr ""
+"Joidenkin palveluiden käynnistys epäonnistui päivitettäessä GNU libc:tä"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"Seuraavia palveluita ei voitu käynnistää uudelleen päivitettäessä GNU libc -"
+"kirjastoa:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Nämä palvelut tulee käynnistää käsin ajamalla ”/etc/init.d/<palvelu> start”."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/cs.po
+++ eglibc-2.13/debian/po/cs.po
@@ -0,0 +1,243 @@
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: glibc\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2012-07-15 20:40+0200\n"
+"Last-Translator: Miroslav Kure <kurem@debian.cz>\n"
+"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Všechny locales"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Locales, které se mají vygenerovat:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Locales je systém pro přepínání mezi různými jazyky. Uživatelé si pak mohou "
+"zvolit svůj jazyk, zemi, znaky, způsob porovnávání, atd."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Vyberte, které locales se mají vygenerovat. Přednostně byste měli vybírat "
+"locales v kódování UTF-8 (obzvláště u nových instalací). Ostatní znakové "
+"sady jsou užitečné pro zpětnou kompatibilitu se staršími systémy a programy."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Žádné"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Výchozí locale pro tento systém:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Mnoho balíků v Debianu používá locales k zobrazení textu ve správném jazyce. "
+"Z vygenerovaných locales si můžete vybrat to, které bude v systému použito "
+"jako výchozí."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Tímto vyberete výchozí jazyk pro celý systém. Pokud se na počítač přihlašují "
+"i uživatelé nemluvící vybraným jazykem, zaznamenají jisté problémy."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Chcete nyní aktualizovat glibc?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"Běžící služby a programy využívající NSS se musí restartovat, protože jinak "
+"se může stát, že nebudou moci vyhledávat v systémových databázích nebo "
+"ověřovat uživatele. Instalační proces umí restartovat některé služby (např. "
+"ssh nebo telnetd) automaticky, ale jiné musíte restartovat ručně. Jednou "
+"takovou službou, kterou je třeba po aktualizaci glibc ručně zastavit a znovu "
+"spustit, je xdm. Automatický restart totiž může odpojit aktivní sezení X11."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Instalace rozpoznala následující nainstalované služby, které je třeba před "
+"aktualizací zastavit: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Chcete-li nyní aktualizaci přerušit a pokračovat později, odpovězte na "
+"otázku záporně."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "Služby, které se mají restartovat po aktualizaci knihovny GNU libc:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"Běžící služby a programy využívající NSS se musí restartovat, protože jinak "
+"se může stát, že nebudou moci vyhledávat v systémových databázích nebo "
+"ověřovat uživatele. (U služeb typu ssh to může ovlivnit možnost přihlášení "
+"se.) Zkontrolujte prosím následující mezerami oddělený seznam služeb, které "
+"se mají restartovat a v případě potřeby jej opravte. Služby jsou v seznamu "
+"zastoupeny svými init.d skripty."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr "Poznámka: restart sshd/telnetd by neměl ovlivnit probíhající spojení."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "Chyba při restartu některých služeb během aktualizace GNU libc"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"Následující služby nemohly být během aktualizace knihovny GNU libc "
+"restartovány:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr "Budete je muset spustit ručně příkazem „/etc/init.d/<služba> start“."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+"Programy xscreensaver a xlockmore musí být před aktualizací restartovány"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"Zdá se, že v systému běží jedna nebo více instancí programu xscreensaver "
+"resp. xlockmore. Z důvodu nekompatibilních změn v knihovnách se po "
+"aktualizaci knihovny GNU libc nebudete moci pomocí těchto programů "
+"autentizovat. To jinými slovy znamená, že se uživatelé nedostanou ke svým "
+"uzamčeným sezením. Abyste tomu předešli, měli byste před aktualizací zmíněné "
+"programy zastavit, nebo je ve vhodný čas restartovat."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr "Restartovat služby při aktualizaci balíku bez ptaní?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
+"V systému jsou nainstalovány služby, které je nutno při aktualizaci "
+"určitých knihoven (libpam, libc nebo libssl) restartovat. Během restartu "
+"služeb jsou tyto po nějakou dobu nedostupné. Abychom předešli nechtěné "
+"nedostupnosti, je při každé aktualizaci nabídnut seznam služeb, které se "
+"mají restartovat. Povolíte-li tuto možnost, budou se všechny potřebné "
+"služby restartovat při aktualizaci knihoven automaticky bez ptaní."
\ No newline at end of file
--- eglibc-2.13.orig/debian/po/hu.po
+++ eglibc-2.13/debian/po/hu.po
@@ -0,0 +1,204 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: glibc\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2007-04-20 10:55+0100\n"
+"Last-Translator: SZERVÁC Attila <sas@321.hu>\n"
+"Language-Team: Hungarian\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Poedit-Language: Hungarian\n"
+"X-Poedit-Country: HUNGARY\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Minden helyi beállítás"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Létrehozandó helyi beállítások:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"A helyi beállítások (locales) egy nyelveket váltó keretrendszer, mely "
+"lehetővé teszi, hogy a felhasználó saját nyelvét, országát, karaktereit "
+"használhassa."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Válaszd ki, milyen helyi beállításokat hozzunk létre. UTF-8 helyi "
+"beállításokat érdemes alapértelmezetten választani. Más karakter-készletek "
+"elavult rendszerekhez és szoftverekhez való kapcsolódáskor lehetnek jók."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Semmi"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "A rendszer alap helyi beállítása:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"A Debian számos csomagja helyi beállításokat használ a szövegek a "
+"felhasználó számára megfelelő nyelvű megjelenítésére . Választhatsz egy "
+"alapértelmezett."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Ez kiválasztja az egész rendszer alapértelmezett nyelvét. Több nyelvű "
+"rendszeren, ahol nem minden felhasználó beszéli az alapértelmezett nyelvet "
+"további beállítások kellenek."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/sk.po
+++ eglibc-2.13/debian/po/sk.po
@@ -0,0 +1,150 @@
+# Slovak translation of eglibc debconf templates.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the eglibc package.
+# Ivan Masár <helix84@centrum.sk>, 2007, 2008, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: eglibc\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2012-06-17 20:43+0100\n"
+"Last-Translator: Ivan Masár <helix84@centrum.sk>\n"
+"Language-Team: Slovak <debian-l10n-slovak@lists.debian.org>\n"
+"Language: sk\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Všetky locales"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Locales, ktoré sa majú vytvoriť:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales are a framework to switch between multiple languages and allow users to use their language, country, characters, collation order, etc."
+msgstr "Locales sú infraštruktúra na prepínanie medzi viacerými jazykmi a umožňujú používateľom používať ich jazyk, krajinu, poradie znakov atď."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Please choose which locales to generate. UTF-8 locales should be chosen by default, particularly for new installations. Other character sets may be useful for backwards compatibility with older systems and software."
+msgstr "Prosím zvoľte, ktoré locales sa majú vytvoriť. Štandardne by mali byť zvolené UTF-8 locales, zvlášť na nových inštaláciách. Iné znakové sady môžu byť užitočné pre spätnú kompatibilitu so staršími systémami a softvérom."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "žiadne"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Štandarné locale systémového prostredia:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Many packages in Debian use locales to display text in the correct language for the user. You can choose a default locale for the system from the generated locales."
+msgstr "Mnohé balíky v Debiane používajú locales pre zobrazovanie textu v správnom jazyku používateľa. Z vytvorených locales môžete zvoliť štandardné locale systému."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "This will select the default language for the entire system. If this system is a multi-user system where not all users are able to speak the default language, they will experience difficulties."
+msgstr "Týmto vyberiete štandardný jazyk pre celý systém. Ak je toto viacpoužívateľský systém, kde nie všetci používatelia hovoria štandarným jazykom, môžu mať ťažkosti."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Želáte si teraz aktualizovať glibc?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Running services and programs that are using NSS need to be restarted, otherwise they might not be able to do lookup or authentication any more. The installation process is able to restart some services (such as ssh or telnetd), but other programs cannot be restarted automatically. One such program that needs manual stopping and restart after the glibc upgrade by yourself is xdm - because automatic restart might disconnect your active X11 sessions."
+msgstr "Bežiace programy a služby, ktoré používajú NSS sa musia reštartovať, inak by viac neboli schopné vykonávať vyhľadávanie a autentifikáciu. Inštalátor je schopný sám reštartovať niektoré služby (ako ssh a telnet), ale iné programy nie je možné reštartovať automaticky. Jeden z takýchto programov, ktoré vyžadujú, aby ste ho manuálne zastavili a reštartovali po aktualizácii glibc, je xdm - pretože automatický reštart by mohol odpojiť vaše aktívne relácie X11."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "This script detected the following installed services which must be stopped before the upgrade: ${services}"
+msgstr "Tento skript zistil, že nasledovné služby je pred aktualizáciou potrebné zastaviť:${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "If you want to interrupt the upgrade now and continue later, please answer No to the question below."
+msgstr "Ak si teraz želáte prerušiť aktualizáciu a pokračovať neskôr, prosím, odpovedzte na túto otázku „Nie“."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "Služby, ktoré sa majú po aktualizácii knižnice GNU libc reštartovať:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Running services and programs that are using NSS need to be restarted, otherwise they might not be able to do lookup or authentication any more (for services such as ssh, this can affect your ability to login). Please review the following space-separated list of init.d scripts for services to be restarted now, and correct it if needed."
+msgstr "Bežiace programy a služby, ktoré používajú NSS a majú sa reštartovať, inak by viac neboli schopné vykonávať vyhľadávanie a autentifikáciu (pri službách ako ssh toto môže mať vplyv na schopnosť prihlásiť sa). Prosím, skontrolujte nasledovný zoznam (položky sú oddelené medzerami) init.d skriptov služieb, ktoré je treba reštartovať a ak je to potrebné, opravte ho."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr "Pozn.: reštartovanie sshd/telnetd by nemalo mať vplyv na už nadviazané spojenia."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "Nepodarilo sa reštartovať niektoré služby pri aktualizácii GNU libc"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "The following services could not be restarted for the GNU libc library upgrade:"
+msgstr "Nasledovné služby sa pri aktualizácii knižnice GNU libc nepodarilo sa reštartovať:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "You will need to start these manually by running '/etc/init.d/<service> start'."
+msgstr "Budete musieť tieto služby spustiť ručne pomocou „/etc/init.d/<service> start“."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr "xscreensaver a xlockmore je nutné pred aktualizáciou reštartovať"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "One or more running instances of xscreensaver or xlockmore have been detected on this system. Because of incompatible library changes, the upgrade of the GNU libc library will leave you unable to authenticate to these programs. You should arrange for these programs to be restarted or stopped before continuing this upgrade, to avoid locking your users out of their current sessions."
+msgstr "Bola zistená jedna alebo viacero bežiacich inštancií xscreensaver alebo xlockmore. Z dôvodu nekompatibilných zmien v knižniciach, aktualizácia GNU libc vás nechá bez možnosti overenia totožnosti týmto programom. Mali by ste zabezpečiť reštartovanie alebo zastavenie týchto programov predtým, než budete pokračovať v aktualizácii, aby ste sa vyhli zablokovaniu prístupu vašich používateľov k ich bežiacim reláciám."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr "Reštartovať služby počas aktualizácie balíka bez pýtania sa?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "There are services installed on your system which need to be restarted when certain libraries, such as libpam, libc, and libssl, are upgraded. Since these restarts may cause interruptions of service for the system, you will normally be prompted on each upgrade for the list of services you wish to restart.  You can choose this option to avoid being prompted; instead, all necessary restarts will be done for you automatically so you can avoid being asked questions on each library upgrade."
+msgstr "Na vašom systéme sú nainštalované služby, ktoré je potrebné reštartovať pri aktualizácii určitých knižníc ako libpam, libc, a libssl. Keďže tieto reštarty môžu spôsobiť prerušenie služby systému, za bežných okolností sa vám systém správy balíkov pri každej aktualizácii ponúkne zoznam služieb, ktoré chcete reštartovať. Môžete zvoliť, aby sa vás systém správy balíkov už viac nepýtal, ale aby sa namiesto toho všetky potrebné reštarty vykonávali automaticky, takže sa vyhnete kladeniu otázok pri každej aktualizácii knižnice."
+
--- eglibc-2.13.orig/debian/po/gl.po
+++ eglibc-2.13/debian/po/gl.po
@@ -0,0 +1,235 @@
+# translation of eglibc_2.11.2-2_gl.po to Galician
+# Galician translation of glibc's templates
+# This file is distributed under the same license as the glibc package.
+#
+# Jacobo Tarrio <jtarrio@debian.org>, 2006, 2007, 2008.
+# Jorge Barreiro <yortx.barry@gmail.com>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: eglibc_2.11.2-2_gl\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2010-08-13 01:43+0200\n"
+"Last-Translator: Jorge Barreiro <yortx.barry@gmail.com>\n"
+"Language-Team: Galician <proxecto@trasno.net>\n"
+"Language: gl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Todas as configuracións locais"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Configuracións locais a xerar:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"O sistema de configuracións locais permite ter varios idiomas, e que os "
+"usuarios poidan empregar o seu idioma, país, alfabeto, orde alfabética, etc."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Escolla as configuracións locais a xerar. Debería escoller configuracións "
+"locais UTF-8 por defecto, especialmente en instalacións novas. Os outros "
+"xogos de caracteres poden ser útiles para a compatibilidade con sistemas e "
+"software antigos."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Ningunha"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Configuración local por defecto para o ambiente:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Moitos paquetes de Debian empregan configuracións locais para amosar texto "
+"aos usuarios no idioma correcto. Pode escoller unha configuración local por "
+"defecto para o sistema entre as configuracións locais xeradas."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Con isto hase escoller o idioma de todo o sistema. Se este sistema ten "
+"varios usuarios e non todos coñecen o idioma por defecto, han ter "
+"dificultades."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "¿Quere actualizar glibc agora?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"É necesario reiniciar os servizos e programas que están a empregar NSS; se "
+"non se fai, é posible que deixen de poder realizar buscas ou autenticacións. "
+"O proceso de instalación ode reiniciar algúns servizos (tales coma ssh ou "
+"telnetd), pero outros programas non se poden reiniciar automaticamente. Un "
+"deses programas que precisa de detención e reinicio manuais trala "
+"actualización de glibc é xdm - xa que o reinicio automático podería "
+"desconectar as súas sesións de X11 activas."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Este script detectou os seguintes servizos instalados que se deben deter "
+"antes da actualización: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Se quere interromper agora a actualización e continuala despois, resposte "
+"negativamente á seguinte pregunta."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "Servizos a reiniciar para a actualización da biblioteca GNU libc:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"É necesario reiniciar os servizos e programas que están a empregar NSS; se "
+"non se fai, é posible que deixen de poder realizar buscas ou autenticacións "
+"(para algúns servizos, coma ssh, isto pode afectar á súa capacidade de se "
+"conectar á máquina). Revise a seguinte lista de scripts de init.d de "
+"servizos que se van reiniciar agora, e corríxaa se é preciso."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Nota: o reinicio de sshd/telnetd non debería afectar ás conexións existentes."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr ""
+"Problemas ao reiniciar algúns servizos para a actualización de GNU libc"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"Non se puido reiniciar os seguintes servizos para a actualización da "
+"biblioteca GNU libc:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Ha ter que reinicialos manualmente executando \"/etc/init.d/<servizo> start"
+"\"."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr "xscreensaver e xlockmore deben ser reiniciados antes de actualizar"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"Detectáronse unha ou máis instancias de xscreensaver ou xlockmore no "
+"sistema. Debido a cambios incompatibles, a actualización da biblioteca GNU "
+"libc non lle deixará autenticarse en eses programas. Debe encargarse de que "
+"eses programas sexan reiniciados ou parados antes de continuar con esta "
+"actualización para evitar que non poida volver a entrar nas sesións actuais."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/lt.po
+++ eglibc-2.13/debian/po/lt.po
@@ -0,0 +1,226 @@
+# translation of lt.po to Lithuanian
+# Copyright (C) 2006 The Free Software Foundation
+# This file is distributed under the same license as the glibc package.
+#
+# Gintautas Miliauskas <gintas@akl.lt>, 2006, 2007, 2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: lt\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2008-02-26 23:36+0200\n"
+"Last-Translator: Gintautas Miliauskas <gintas@akl.lt>\n"
+"Language-Team: Lithuanian <gnome-lt@lists.akl.lt>\n"
+"Language: lt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms:  nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
+"%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Visos lokalės"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Lokalės, kurios bus sugeneruotos:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Lokalės yra karkasas, kuriuo naudotojai gali nustatyti savo kalbą, "
+"informaciją apie savo šalį, simbolius, valiutą, rikiavimo tvarką ir t.t."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Pasirinkite, kurias lokales norite generuoti. Turėtų būti pasirinktos UTF-8 "
+"lokalės, ypač jei diegiate naują sistemą. Kiti simbolių rinkiniai gali būti "
+"naudingi atgaliniam suderinamumui su senesnėmis sistemomis ir programomis."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Jokia"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Sistemos lokalė pagal nutylėjimą"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Daug Debian paketų naudoja lokales tekstui reikiama kalba rodyti. Galite iš "
+"sugeneruotų lokalių išsirinkti standartinę sistemos lokalę."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Bus nustatyta kalba visai sistemai. Jei sistemą naudoja keletas naudotojų ir "
+"ne visi kalba pasirinkta kalba, gali kilti nepatogumų."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Ar norite dabar atnaujinti glibc?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"Veikiančios tarnybos ir programos, naudojančios NSS, turi būti paleistos iš "
+"naujo, kitaip jose gali sutrikti paieška ir autentikavimas. Diegimo procesas "
+"gali paleisti iš naujo kai kurias tarnybas (pavyzdžiui, ssh ir telnetd), "
+"tačiau kitos programos negali būti paleistos iš naujo automatiškai. Viena iš "
+"tokių programų, kurią reikia paleisti iš naujo rankiniu būdu po glibc "
+"atnaujinimo, yra xdm – automatinis restartavimas gali atjungti aktyvias X11 "
+"sesijas."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Rastos šios tarnybas, kurias būtina sustabdyti prieš atnaujinimą: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Jei norite dabar nutraukti atnaujinimą ir jį pratęsti vėliau, atsakykite "
+"neigiamai."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr ""
+"Tarnybos, kurias reikia paleisti iš naujo po GNU libc bibliotekos "
+"atnaujinimo:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"Veikiančios tarnybos ir programos, naudojančios NSS, turi būti paleistos iš "
+"naujo, kitaip jose gali sutrikti autentikavimas (tokioms tarnyboms kaip ssh "
+"tai gali reikšti, kad negalėsite prisijungti). Peržiūrėkite toliau esantį "
+"tarpeliais atskirtų init.d scenarijų, kurie dabar bus paleisti iš naujo, "
+"sąrašą, ir, jei reikia, pataisykite."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Pastaba: sshd/telnetd paleidimas iš naujo neturėtų paveikti aktyvių "
+"prisijungimų."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "Nepavyko paleisti iš naujo kai kurių tarnybų atnaujinus GNU libc"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr "Atnaujinus GNU libc nepavyko iš naujo paleisti šių procesų:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Jas reikės paleisti rankiniu būdu įvykdant „/etc/init.d/tarnyba start“."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/ca.po
+++ eglibc-2.13/debian/po/ca.po
@@ -0,0 +1,237 @@
+# Catalan translations for eglibc debconf templates.
+# Copyright (C) 2002, 2007, 2008, 2010 GNU Libc Maintainers.
+# This file is distributed under the same license as the eglibc package.
+# Jordi Mallach <jordi@debian.org>, 2002, 2008, 2010.
+# Jordà Polo <jorda@ettin.org>, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 2.11.2-6\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2010-10-23 11:57+0200\n"
+"Last-Translator: Jordi Mallach <jordi@debian.org>\n"
+"Language-Team: Catalan <debian-l10n-catalan@lists.debian.org>\n"
+"Language: ca\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Tots els locales"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Locales a generar:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Els locales són un entorn que permet que els usuaris canviïn la llengua, el "
+"país, els caràcters, la classificació alfabètica, etc."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Trieu els locales que vulgueu generar. Els locales UTF-8 haurien de ser "
+"l'opció predeterminada, especialment en noves instal·lacions. Altres jocs de "
+"caràcters us poden ser útils per motius de compatibilitat amb sistemes i "
+"programari antic."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Cap"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Locale predeterminat del sistema:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"A Debian, molts paquets fan servir els locales per mostrar el text en la "
+"llengua dels usuaris. Podeu canviar el locale predeterminat del sistema "
+"triant entre els locales generats."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Amb aquesta opció seleccioneu la llengua predeterminada de tot el sistema. "
+"Si aquest és un entorn multiusuari on no tothom parla la mateixa llengua, "
+"alguns usuaris poden tindre dificultats."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Voleu actualitzar la glibc ara?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"És necessari tornar a iniciar els serveis i programes que utilitzen NSS, ja "
+"que si no es fa això podrien deixar de poder fer cerques o autenticacions. "
+"El procés d'instal·lació pot tornar a iniciar alguns serveis (com l'ssh o el "
+"telnetd), però altres programes no es poden tornar a iniciar automàticament. "
+"Un programa que necessita una parada i inici manual després de "
+"l'actualització de la glibc és l'xdm, ja que un reinici automàtic podria "
+"desconnectar les vostres sessions X11 actives."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Aquest script ha detectat els següents serveis instal·lats que s'haurien de "
+"parar abans de l'actualització: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Si voleu interrompre ara l'actualització i continuar més tard, contesteu "
+"negativament la pregunta següent."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "Serveis a reiniciar per l'actualització de la biblioteca GNU libc:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"És necessari tornar a iniciar els serveis i programes que utilitzen NSS, ja "
+"que si no es fa això podrien deixar de poder fer cerques o autenticacions "
+"(per a serveis com l'ssh, això pot afectar la vostra capacitat per a entrar "
+"al sistema). Comproveu la següent llista separada per comes de scripts "
+"d'init.d amb serveis que s'han de tornar a iniciar ara, i corregiu-la si és "
+"necessari."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Nota: reiniciar l'ssh/telnetd no hauria d'afectar cap connexió existent."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr ""
+"No s'ha pogut reiniciar alguns serveis per a l'actualització de GNU libc"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"No s'ha pogut reiniciar els serveis següents per a l'actualització de la "
+"biblioteca GNU libc:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Haureu d'iniciar aquests serveis manualment executant «/etc/init.d/<servei> "
+"start»."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr "S'ha de reiniciar l'xscreensaver i l'xlockmore abans d'actualitzar"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"S'ha detectat al sistema una o més instàncies de l'xscreensaver o "
+"l'xlockmore en execució. Degut a alguns canvis de biblioteques "
+"incompatibles, l'actualització de la GNU libc causarà que no us pugueu "
+"autenticar contra aquests programes. Hauríeu d'assegurar-vos que aquests "
+"programes es reinicien o s'aturen abans de continuar aquesta actualització, "
+"per a evitar que els usuaris es queden blocats fora de les seues sessions "
+"actuals."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/ja.po
+++ eglibc-2.13/debian/po/ja.po
@@ -0,0 +1,241 @@
+# Kenshi Muto <kmuto@debian.org>, 2007
+# GOTO Masanori <gotom@debian.org>, -2007
+# Nobuhiro Iwamatsu <iwamatsu@debian.org>, 2010
+#
+#    Translators, if you are not familiar with the PO format, gettext
+#    documentation is worth reading, especially sections dedicated to
+#    this format, e.g. by running:
+#         info -n '(gettext)PO Files'
+#         info -n '(gettext)Header Entry'
+#
+#    Some information specific to po-debconf are available at
+#            /usr/share/doc/po-debconf/README-trans
+#         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#    Developers do not need to manually edit POT or PO files.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: glibc 2.11.2-7\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2010-11-21 17:14+0900\n"
+"Last-Translator: Nobuhiro Iwamatsu <iwamatsu@debian.org>\n"
+"Language-Team: Japanese <debian-japanese@lists.debian.org>\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "すべてのロケール"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "生成するロケールの選択:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"ロケールとは、複数の言語を切り替え、ユーザが自身の言語・国・文字・並べ替え順"
+"序などを使えるように許可するための仕組みです。"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"生成したいロケールを選択してください。UTF-8 ロケールは、特に新規にインストー"
+"ルしたものであれば、デフォルトで選択されているはずです。その他の文字セット"
+"は、より古いシステムおよびソフトウェアとの後方互換性のために役立つでしょう。"
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "なし"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "システム標準の環境変数として設定するデフォルトロケール:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"ユーザに正しい言語でテキストを表示するため、Debian では多くのパッケージがロ"
+"ケールを使用します。生成したロケールの中からシステムでのデフォルトロケールを"
+"選択できます。"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"これはシステム全体のデフォルトロケールを選ぶことになります。このシステムがマ"
+"ルチユーザシステムで、すべてのユーザがデフォルトの言語を話すことができるとい"
+"うわけではない場合は、そういった人々は困難を感じることになってしまいます。"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "glibc を今更新しますか?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"NSS を利用している実行中のサービスおよびプログラムは、再起動する必要がありま"
+"す。さもないと、ルックアップおよび認証がもう利用できないことになります。イン"
+"ストール手続きではいくつかのサービス (ssh や telnetd など) を再起動することが"
+"できますが、その他のプログラムは自動では再起動されません。手動での停止および "
+"glibc の更新のあとにあなた自身で再起動する必要のあるそのようなプログラムの 1 "
+"つとしては、xdm があります。というのも、自動再起動はあなたのアクティブな X11 "
+"のセッションを閉じてしまうことになるからです。"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"スクリプトは、更新前に停止されなければならない以下のインストールされたサービ"
+"スを検出しました: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"更新を今中止して後日続行したいのであれば、以下の質問で「いいえ」と答えてくだ"
+"さい。"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "GNU libc ライブラリの更新で再起動するサービス:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"NSS を利用している実行中のサービスおよびプログラムは、再起動する必要がありま"
+"す。さもないと、ルックアップおよび認証がもう利用できないことになります (ssh "
+"のようなサービスでは、これはログインできるかどうかに影響します)。以下のスペー"
+"スで区切られた、今再起動するサービスの init.d スクリプトのリストを見て、必要"
+"なら修正してください。"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr "補足: sshd/telnetd の再起動は既存の接続には影響しないはずです。"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "GNU libc 更新のためのいくつかのサービスの再起動で失敗"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"GNU libc ライブラリ更新のための、以下のサービスの再起動ができませんでした。"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"'/etc/init.d/<サービス> start' を実行することで、これらを手動で起動する必要が"
+"あります。"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+"xscreensaver と xlockmore はアップグレードする前に再起動する必要があります。"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"このシステムで 1 つ以上の xscreensaver あるいは xlockmore の動作が検出されま"
+"した。非互換のライブラリ変更のため、GNU libc パッケージの更新はこれらのプログ"
+"ラムでの認証ができなくなるという状態にするでしょう。ユーザが現在のセッション"
+"の外に締め出されるのを避けるため、このパッケージの更新を続ける前に、これらの"
+"プログラムを再起動するか停止するように手配すべきです。"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/templates.pot
+++ eglibc-2.13/debian/po/templates.pot
@@ -0,0 +1,195 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr ""
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr ""
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/ar.po
+++ eglibc-2.13/debian/po/ar.po
@@ -0,0 +1,226 @@
+# translation of ar.po to Arabic
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Ossama M. Khayat <okhayat@yahoo.com>, 2007, 2008.
+# Ossama Khayat <okhayat@yahoo.com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ar\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2010-09-09 01:07+0300\n"
+"Last-Translator: Ossama Khayat <okhayat@yahoo.com>\n"
+"Language-Team: Arabic <support@arabeyes.org>\n"
+"Language: ar\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: UTF-8\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: \n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "جميع المحليات"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "المحليات التي سيتم توليدها:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"المحليات هي إطار عمل يمكنك من التبديل بين اللغات المتعددة وتمكن المستخدمين "
+"من اختيار لغتهم، وبلدهم، ومجموعة الأحرف الخاصة بهم، إلخ."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"الرجاء اختيار المحليات التي تريد توليدها. يجب اختيار محليات UTF-8 بشكل "
+"افتراضي، وبالتحديد لعمليات التثبيت الجديدة. يمكن الاستفادة من مجموعات "
+"المحارف الأخرى للتوافق مع الأنظمة والبرامج القديمة."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "لا شيء"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "المحلية الافتراضية لبيئة النظام:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"في نظام ديبيان، تستخدم العديد من الحزم المحليات لعرض النصوص باللغة الصحيحة "
+"للمستخدم. يمكنك اختيار المحلية الافتراضية للنظام من هذه المحليات."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"سيحدد هذا الخيار اللغة الافتراضية للنظام بأكمله. إن كان هذا النظام مستخدماً "
+"من قبل عدة مستخدمين لا يستخدمون اللغة ذاتها، فسوف يواجهون بعض الصعوبات."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "أتريد ترقية glibc الآن؟"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"هناك بعض الخدمات والبرامج التي تستخدم NSS يجب إعادة تشغيلها، وإلا لن تستطيع "
+"تلك الخدمات البحث أو المصادقة بعد الآن. تستطيع عملية التثبيت إعادة تشغيل بعض "
+"الخدمات (مثل ssh أو telnetd)، إلا أن بعض الخدمات الأخرى لا يمكن إعادة "
+"تشغيلها آلياً. وإحدى تلك الخدمات هي xdm والتي يجب عليك تشغيلها يدوياً بعد "
+"عملية ترقية glibc ذلك أن عملية إعادة تشغيلها آلياً قد يوقف عمل جلسات X11 "
+"الحالية."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"عثر البرنامج على الخدمات المثبتة التالية والتي يجب إيقافها قبل عملية "
+"الترقية: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"إن كنت تريد ايقاف عملة الترقية الآن وإتمامها لاحقاً، الرجاء الإجابة بالنفي "
+"للسؤال أدناه."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "الخدمات المطلوب إعادة تشغيلها لتريقة مكتبة GNU libc:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"هناك بعض الخدمات والبرامج التي تستخدم NSS يجب إعادة تشغيلها، وإلا لن تستطيع "
+"تلك الخدمات البحث أو المصادقة بعد الآن. تستطيع عملية التثبيت إعادة تشغيل بعض "
+"الخدمات (مثل  ssh والتي قد تؤثر على قدرتك الدخول). الرجاء مراجعة قائمة برامج "
+"init.d هذه بالخدمات التي يجب إعادة تشغيلها الآن، وصححها إن كنت بحاجة إلى ذلك."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr "ملاحظة: إعادة تشغيل sshd/telnetd يجب أن لايؤثر على أية اتصالات جارية."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "فشلت عملية إعادة تشغيل بعض الخدمات لترقية GNU libc"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr "تعذر إعادة تشغيل الخدمات التالية لترقية مكتبة GNU libc:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"عليك بتشغيل هذه الخدمات يدوياً بتنفيذ الأمر '/etc/init.d/<service> start'."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr "يجب إعادة تشغيل xscreensaver و xlockmore قبل عملية الترقية"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"عُثر على نسخة أو أكثر لبرنامج xscreensaver أو xlockmore على هذا النظام. وبسبب "
+"تغييرات المكتبة الغير متوافقة، فإن ترقية مكتبة GNU libc ستتسبّب بعدم تمكّنك من "
+"المصادقة باستخدام هذه البرامج. لذا، يجب أن ترتب عملية إعادة تشغيل أو إيقاف "
+"هذه البرامج قبل الاستمرار في الترقية، كي تتفادى حجز المستخدمين عن جلساتهم."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/ko.po
+++ eglibc-2.13/debian/po/ko.po
@@ -0,0 +1,225 @@
+# Korean translations for glibc package
+# glibc 패키지에 대한 한국어 번역문.
+# Copyright (C) 2007 THE glibc'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the glibc package.
+# Sunjae Park <darehanl@gmail.com>, 2007 - 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: glibc\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2008-03-02 20:33-0500\n"
+"Last-Translator: Sunjae Park <darehanl@gmail.com>\n"
+"Language-Team: Korean <debian-l10n-korean@lists.debian.org>\n"
+"Language: ko\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "모든 로케일"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "생성할 로케일 목록:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"로케일이란 여러 언어 중에서 선택하여 사용자들이 자신의 언어, 국가, 문자, 정렬"
+"순서 등을 사용할 수 있도록 해주는 구성틀입니다."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"생성하고자 하는 로케일을 선택하여 주십시오. 기본적으로는 UTF-8 로케일을 선택"
+"하시고, 특히 새로 설치하는 시스템에서는 더더욱 이를 선택하십시오. 기존 시스템"
+"이나 소프트웨어와의 역호환성을 위해서는 다른 문제셋을 선택하셔도 됩니다."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "없음"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "시스템 환경의 기본 로케일:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"데비안에 있는 많은 꾸러미들은 사용자에게 맞는 언어로 출력하기 위해 로케일을 "
+"사용합니다. 생성된 로케일 중에서 시스템의 기본 로케일로 사용할 로케일을 선택"
+"하실 수 있습니다."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"이 선택은 시스템 전체의 기본 언어를 결정합니다. 기본 언어를 사용할 수 없는 사"
+"용자도 있는 복수 사용자 시스템일 경우에는 그 사용자들이 시스템 사용에 어려움"
+"을 겪으실 수 있습니다."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "지금 glibc를 업그레이드 하시겠습니까?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"NSS를 사용중인 서비스와 프로그램들을 다시 시작시키지 않으면 색인 작업이나 인"
+"증 작업을 더 이상 사용할 수 없게 됩니다. ssh이나 telnetd 등의 서비스들 일부"
+"는 설치 과정이 다시 시작을 시킵니다만, 자동으로 다시 시작시키지 못하는 프로그"
+"램도 있습니다. glibc 업그레이드 후 사용자가 직접 다시 정지시킨 후 다시 시작시"
+"켜야 하는 대표적인 프로그램으로 xdm이 있습니다. 자동으로 다시 시작을 시키면 "
+"사용중인 X11 세션을 중지시킬 수 있기 때문입니다."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"업그레이드 하기 전에 멈춰야 하는 다음 서비스들을 스크립트가 감지했습니다: "
+"${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"업그레이드를 일단 중지시키고 나중에 계속하시려면 다음 질문에 No라고 답해주시"
+"기 바랍니다."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "GNU libc 라이브러리 업그레이드로 인해 다시 시작시킬 서비스 목록:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"NSS를 사용중인 서비스와 프로그램들을 다시 시작시키지 않으면 색인 작업이나 인"
+"증 작업을 더 이상 사용할 수 없게 됩니다(ssh와 같은 서비스의 경우 로그인에 영"
+"향을 줄 수 있습니다). 다시 시작시킬 init.d 스크립트 서비스를 빈칸으로 연결시"
+"킨 이 목록을 검토하여 필요한 경우 수정해주십시오."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"참고: sshd/telnetd를 다시 시작시키더라도 기존 연결에는 영향이 없을 것입니다."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "GNU libc 업그레이드로 인한 서비스 다시 시작에 실패"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"다음 서비스들은 GNU libc 라이브러리 업그레이드로 인한 다시 시작에 실패하였습"
+"니다:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"이 서비스들은 '/etc/init.d/<service> start'로 직접 다시 시작시키셔야 합니다."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/vi.po
+++ eglibc-2.13/debian/po/vi.po
@@ -0,0 +1,236 @@
+# Vietnamese Translation for eGlibC.
+# Copyright © 2010 Free Software Foundation, Inc.
+# Clytie Siddall <clytie@riverland.net.au>, 2005-2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: eglibc 2.11.2-6\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2010-10-27 14:55+1030\n"
+"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
+"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
+"Language: vi\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: LocFactoryEditor 1.8\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Mọi miền địa phương"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Miền địa phương cần tạo ra:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Miền địa phương (locale) là một khuôn khổ để chuyển đổi giữa các ngôn ngữ "
+"khác nhau, cũng cho phép người dùng chọn sử dụng ngôn ngữ, quốc gia, ký tự, "
+"thứ tự sắp xếp v.v. của quê."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Hãy chọn những miền địa phương cần tạo ra. Có nên chọn miền địa phương kiểu "
+"UTF-8 theo mặc định, đặc biệt cho việc cài đặt mới. (Ghi chú : tiếng Việt "
+"cần thiết UTF-8.) Bộ ký tự khác có thể hữu ích để tương thích ngược với hệ "
+"thống/phần mềm cũ."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Không có"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Miền địa phương mặc định cho môi trường hệ thống:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Nhiều gói của Debian có dùng miền địa phương để hiển thị văn bản bằng ngôn "
+"ngữ thích hợp với người dùng. Bạn có dịp chọn miền địa phương mặc định cho "
+"hệ thống, trong những miền địa phương được tạo ra."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Ghi chú : việc này sẽ chọn ngôn ngữ mặc định cho toàn hệ thống. Nếu hệ thống "
+"này có nhiều người dùng và không phải tất cả có khả năng nói ngôn ngữ mặc "
+"định, họ sẽ gặp khó khăn."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Bạn có muốn nâng cấp glibc ngay bây giờ không?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"Các dịch vụ và chương trình đều đang chạy dựa vào NSS thì cần phải được khởi "
+"chạy lại: không thì chúng không còn có khả năng tra tìm hay xác thực lại. "
+"Tiến trình cài đặt có khả năng khởi chạy lại một số dịch vụ riêng (v.d. ssh "
+"hoặc têlnetd) nhưng không thể tự động khởi chạy lại các chương trình khác. "
+"Một chương trình như vậy mà cần phải bị dừng chạy rồi được khởi chạy lại "
+"bằng sau khi nâng cấp glibc là xdm, vì việc tự động cài đặt có thể ngắt kết "
+"nối đến phiên chạy X11 đang hoạt động."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Văn lệnh này đã phát hiện những dịch vụ đã cài đặt sau mà phải bị dừng chạy "
+"trước khi nâng cấp: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Nếu bạn muốn làm gián đoạn tiến trình nâng cấp ngay bây giờ và tiếp tục sau, "
+"hãy trả lời « Không » bên dưới."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "Các dịch vụ cần khởi chạy lại để nâng cấp thư viện libc GNU:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"Các dịch vụ và chương trình đều đang chạy khi sử dụng NSS thì cần phải được "
+"khởi chạy lại: không thì không còn có khả năng tra tìm hay xác thực lại (đối "
+"với dịch vụ như SSH, trường hợp này có thể ngăn cản bạn đăng nhập). Hãy xem "
+"lại danh sách định giới bằng dấu cách các văn lệnh init.d cho dịch vụ cần "
+"khởi chạy lại ngay bây giờ, và sửa nếu thích hợp."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Ghi chú : khởi chạy lại sshd/telnetd không nên có tác động kết nối đang chạy."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "Lỗi khởi chạy lại một số dịch vụ để nâng cấp libc GNU."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"Những dịch vụ theo đây không thể được khởi chạy lại để nâng cấp thư viện "
+"libc GNU:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Bạn sẽ cần phải tự khởi chạy lại các dịch vụ này, bằng cách chạy lệnh « /etc/"
+"init.d/<service> start »."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+"Trước khi nâng cấp thì cần phải khởi chạy lại xscreensaver và xlockmore"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"Một hay nhiều tiến trình đang chạy của xscreensaver hay xlockmore đã được "
+"phát hiện trên hệ thống này. Do thay đổi không tương thích nhau trong các "
+"thư viện, việc nâng cấp thư viện libc của GNU có thể dẫn đến hai chương "
+"trình này không cho phép xác thực. Để tránh trường hợp này, dừng chạy hay "
+"khởi chạy lại tiến trình nào đang chạy của hai chương trình này trước khi "
+"tiếp tục nâng cấp."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/pt_BR.po
+++ eglibc-2.13/debian/po/pt_BR.po
@@ -0,0 +1,232 @@
+# Brazilian Portuguese translation (glibc)
+# Copyright (C) 2007 THE glibc'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the glibc package.
+# Felipe Augusto van de Wiel (faw) <faw@debian.org>, 2007-2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libc6\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2008-06-09 01:17-0300\n"
+"Last-Translator: Felipe Augusto van de Wiel (faw) <faw@debian.org>\n"
+"Language-Team: Brazilian Portuguese <debian-l10n-portuguese@lists.debian."
+"org>\n"
+"Language: pt_BR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"pt_BR utf-8\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Todos os \"locales\""
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "\"Locales\" a serem gerados:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Locales são uma infra-estrutura para alternar entre múltiplos idiomas e "
+"permite aos usuários utilizar o seu idioma, país, caracteres, ordem de "
+"colação, etc."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Por favor, escolha quais locales serão gerados. Locales UTF-8 deveriam ser "
+"escolhidos por padrão, particularmente para novas instalações. Outros "
+"conjuntos de caracteres podem ser úteis para compatibilidade com sistemas e "
+"softwares antigos."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Nenhum"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Locale padrão para o ambiente do sistema:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Muitos pacotes no Debian usam locales para exibir texto aos usuários no "
+"idioma correto. Você pode escolher um locale padrão para o sistema a partir "
+"dos locales gerados."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Isto selecionará o idioma padrão para o sistema inteiro. Se este sistema é "
+"um sistema multiusuário no qual nem todos os usuários são capazes de falar o "
+"idioma padrão, eles vão enfrentar dificuldades."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Você quer atualizar a glibc agora?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"Serviços em execução e programas que usam NSS precisam ser reiniciados, caso "
+"contrário eles podem não ser capazes de realizar consultas ou autenticação. "
+"O processo de instalação é capaz de reiniciar alguns desses serviços (como "
+"ssh, isto pode afetar sua habilidade de fazer login). Por favor, reveja a "
+"seguinte lista separada por espaços de scripts init.d que serão reiniciados "
+"agora, e corrija-a se necessário."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Este script detectou os seguintes serviços instalados que devem ser parados "
+"antes da atualização: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Se você quer interromper a atualização agora e continuar posteriormente, por "
+"favor, responda Não para a questão abaixo."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr ""
+"Serviços para reiniciar por causa da atualização da biblioteca GNU libc:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"Serviços em execução e programas que usam NSS precisam ser reiniciados, caso "
+"contrário eles podem não ser capazes de realizar consultas ou autenticação "
+"(para serviços como ssh, isto pode afetar sua habilidade de fazer login). "
+"Por favor, reveja a seguinte lista separada por espaços de scripts init.d "
+"que serão reiniciados agora, e corrija se necessário."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Nota: reiniciar sshd/telnetd não deveria afetar quaisquer conexões "
+"existentes."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr ""
+"Falha ao reiniciar alguns serviços por causa da atualização da GNU libc"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"Os seguintes serviços não puderam ser reiniciados por causa da atualização "
+"da biblioteca GNU libc:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Você terá que iniciar esses serviços manualmente executando '/etc/init.d/"
+"<serviço> start'."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
--- eglibc-2.13.orig/debian/po/es.po
+++ eglibc-2.13/debian/po/es.po
@@ -0,0 +1,275 @@
+# eglibc debconf translation to spanish
+# Copyright (C) 2003, 2006, 2007, 2008, 2010, 2012 Software in the Public Interest
+# This file is distributed under the same license as the eglibc-source package.
+#
+# Changes:
+#   - Initial translation
+#       Carlos Valdivia Yagüe <valyag@dat.etsit.upm.es>, 2003
+#
+#   - Updates
+#       Carlos Valdivia Yagüe <valyag@dat.etsit.upm.es>, 2006, 2007, 2008
+#       Omar Campagne <ocampagne@gmail.com> 2010, 2012.
+#
+# Traductores, si no conocen el formato PO, merece la pena leer la
+# documentación de gettext, especialmente las secciones dedicadas a este
+# formato, por ejemplo ejecutando:
+#       info -n '(gettext)PO Files'
+#       info -n '(gettext)Header Entry'
+#
+# Equipo de traducción al español, por favor lean antes de traducir
+# los siguientes documentos:
+#
+#   - El proyecto de traducción de Debian al español
+#     http://www.debian.org/intl/spanish/
+#     especialmente las notas y normas de traducción en
+#     http://www.debian.org/intl/spanish/notas
+#
+#   - La guía de traducción de po's de debconf:
+#     /usr/share/doc/po-debconf/README-trans
+#     o http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: glibc 2.13-24\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2012-01-14 11:44+0100\n"
+"Last-Translator: Omar Campagne <ocampagne@gmail.com>\n"
+"Language-Team: Debian L10n Spanish <debian-l10n-spanish@lists.debian.org>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Virtaal 0.7.1-rc1\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Todas las configuraciones regionales («locales»)"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Seleccione las configuraciones regionales que desea generar:"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Las configuraciones regionales componen un sistema para cambiar entre varios "
+"idiomas, y permite a los usuarios utilizar su idioma, país, juego de "
+"caracteres, ordenación alfanumérica, etc."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Por favor, elija las configuraciones regionales que desea generar. Se "
+"recomiendan las configuraciones regionales UTF-8, especialmente para "
+"instalaciones nuevas. Otros juegos de caracteres pueden resultar útiles por "
+"compatibilidad con sistemas y software antiguo."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Ninguno"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Configuración regional predeterminada para el entorno del sistema:"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"Muchos paquetes en Debian utilizan las configuraciones regionales para "
+"mostrar el texto en el idioma de los usuarios. Puede elegir la opción "
+"predeterminada de entre las configuraciones regionales que ha generado."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Esto seleccionará el idioma predeterminado de todo el sistema. Si se trata "
+"de un sistema con varios usuarios en el que no todos hablan el idioma "
+"elegido, pueden tener problemas."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "¿Desea actualizar glibc ahora?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"Los servicios y programas en ejecución que utilicen NSS necesitan "
+"reiniciarse, o por el contrario puede que ya no sean capaces de realizar "
+"búsquedas o autenticación. El proceso de instalación puede reiniciar algunos "
+"servicios (tales como «ssh» o «telnetd»), pero otros programas no pueden "
+"reiniciarse automáticamente. Uno de dichos programas que se necesitan parar "
+"y reiniciar manualmente tras la actualización de glibc es xdm, puesto que un "
+"reinicio automático podría desconectar sus sesiones X11 activas."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Este programa detectó los siguientes servicios instalados que se deben "
+"detener antes de la actualización: ${services}"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Si desea interrumpir la actualización y continuar más tarde, conteste «No» a "
+"continuación."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr ""
+"Servicios a reiniciar para la actualización de la biblioteca libc de GNU:"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"Los servicios y programas en ejecución que utilicen NSS se necesitan "
+"reiniciar, o por el contrario puede que ya no sean capaces de realizar "
+"búsquedas o autenticación (para servicios como «ssh», esto puede afectar a "
+"su capacidad para iniciar sesión en el sistema). Por favor, revise la "
+"siguiente lista de scripts de «init.d», separada por espacios, de los "
+"servicios a reiniciar ahora y corríjala si es necesario."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Aviso: reiniciar «sshd»/«telnetd» no debería afectar a las conexiones "
+"activas."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr ""
+"Fallo al reiniciar algunos servicios para la actualización de la biblioteca "
+"libc de GNU"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"Los siguientes servicios no se pudieron reiniciar para la actualización de "
+"la biblioteca libc de GNU:"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Tendrá que iniciarlos manualmente ejecutando «/etc/init.d/<servicio> start»."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr "Se deben reiniciar xscreensaver y xlockmore antes de actualizar"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"Se han detectado una o más instancias de los programas xscreensaver o "
+"xlockmore. La actualización de la biblioteca libc de GNU podría impedir que "
+"pueda autenticarse en estos programas debido a cambios incompatibles en las "
+"bibliotecas. Debería procurar que estos programas se reinicien o se paren "
+"antes de continuar con la actualización. Así evitará que los usuarios queden "
+"bloqueados sin poder reanudar sus sesiones actuales."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+"¿Quiere que los servicios se actualicen durante una actualización de paquete "
+"sin solicitar confirmación?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
+"Hay algunos servicios instalados en el sistema que requieren reiniciarse al "
+"actualizar paquetes como libpam, libc, y libssl. Ya que reiniciar estos "
+"servicios puede provocar una interrupción de servicio del sistema, "
+"habitualmente se le solicitará en cada actualización una lista de los "
+"servicios que desea reiniciar. Puede seleccionar esta opción para impedir "
+"que se le solicite esta información; en su lugar, cada reinicio de servicio "
+"se hará de forma automática de forma que evitará que se le planteen "
+"preguntas cada vez que se actualice una biblioteca."
--- eglibc-2.13.orig/debian/po/fr.po
+++ eglibc-2.13/debian/po/fr.po
@@ -0,0 +1,250 @@
+# Translation of glibc debconf templates to French
+# Copyright (C) 2005-2009 Debian French l10n team <debian-l10n-french@lists.debian.org>
+# This file is distributed under the same license as the glibc package.
+#
+# Translators:
+# Denis Barbier 2001-2006.
+# Christian Perrier <bubulle@debian.org>, 2007, 2008, 2009, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: fr\n"
+"Report-Msgid-Bugs-To: eglibc@packages.debian.org\n"
+"POT-Creation-Date: 2011-10-30 11:52-0700\n"
+"PO-Revision-Date: 2011-12-15 06:54+0100\n"
+"Last-Translator: Christian Perrier <bubulle@debian.org>\n"
+"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.2\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. Type: multiselect
+#. Choices
+#: ../debhelper.in/locales.templates:1001
+msgid "All locales"
+msgstr "Tous les choix possibles"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid "Locales to be generated:"
+msgstr "Jeux de paramètres régionaux à créer :"
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Locales are a framework to switch between multiple languages and allow users "
+"to use their language, country, characters, collation order, etc."
+msgstr ""
+"Les jeux de paramètres régionaux (aussi appelés « locales ») permettent de "
+"gérer des langues multiples et offrent aux utilisateurs la possibilité de "
+"choisir la langue, le pays, le jeu de caractères, l'ordre de tri, etc."
+
+#. Type: multiselect
+#. Description
+#: ../debhelper.in/locales.templates:1002
+msgid ""
+"Please choose which locales to generate. UTF-8 locales should be chosen by "
+"default, particularly for new installations. Other character sets may be "
+"useful for backwards compatibility with older systems and software."
+msgstr ""
+"Veuillez choisir les paramètres régionaux à créer. Des paramètres régionaux "
+"utilisant l'encodage UTF-8 devraient être le choix par défaut, notamment "
+"pour de nouvelles installations. Les autres jeux de caractères peuvent être "
+"utiles pour conserver la compatibilité avec d'anciens systèmes ou logiciels."
+
+#. Type: select
+#. Choices
+#: ../debhelper.in/locales.templates:2001
+msgid "None"
+msgstr "Aucun"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid "Default locale for the system environment:"
+msgstr "Jeu de paramètres régionaux actif par défaut :"
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"Many packages in Debian use locales to display text in the correct language "
+"for the user. You can choose a default locale for the system from the "
+"generated locales."
+msgstr ""
+"De nombreux paquets utilisent le mécanisme de localisation pour afficher les "
+"messages destinés aux utilisateurs dans la langue adéquate. Vous pouvez "
+"changer la valeur par défaut de l'ensemble du système pour utiliser un des "
+"jeux de paramètres régionaux qui seront créés."
+
+#. Type: select
+#. Description
+#: ../debhelper.in/locales.templates:2002
+msgid ""
+"This will select the default language for the entire system. If this system "
+"is a multi-user system where not all users are able to speak the default "
+"language, they will experience difficulties."
+msgstr ""
+"Veuillez noter que cette valeur modifiera la langue utilisée par le système. "
+"Si l'environnement est multi-utilisateurs et que certains utilisateurs ne "
+"parlent pas votre langue, ils risquent d'avoir des difficultés."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid "Do you want to upgrade glibc now?"
+msgstr "Faut-il mettre à jour le paquet glibc maintenant ?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more. "
+"The installation process is able to restart some services (such as ssh or "
+"telnetd), but other programs cannot be restarted automatically. One such "
+"program that needs manual stopping and restart after the glibc upgrade by "
+"yourself is xdm - because automatic restart might disconnect your active X11 "
+"sessions."
+msgstr ""
+"Les services et programmes qui utilisent NSS (« Name Service Switch ») "
+"doivent être redémarrés car leur système d'authentification risque de ne "
+"plus fonctionner. Il est possible de redémarrer certains services (comme SSH "
+"ou telnetd) pendant l'installation, mais d'autres ne peuvent l'être "
+"automatiquement. Il est notamment indispensable d'arrêter et redémarrer "
+"manuellement xdm car un redémarrage automatique pourrait interrompre une "
+"session X11 active."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"This script detected the following installed services which must be stopped "
+"before the upgrade: ${services}"
+msgstr ""
+"Les services identifiés comme devant être redémarrés et qui doivent être "
+"arrêtés avant la mise à jour sont les suivants : ${services}."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:1001
+msgid ""
+"If you want to interrupt the upgrade now and continue later, please answer "
+"No to the question below."
+msgstr ""
+"Si vous préférez interrompre la mise à jour maintenant et la reprendre plus "
+"tard, ne choisissez pas cette option."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid "Services to restart for GNU libc library upgrade:"
+msgstr "Services à redémarrer lors de la mise à jour de la bibliothèque C :"
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Running services and programs that are using NSS need to be restarted, "
+"otherwise they might not be able to do lookup or authentication any more "
+"(for services such as ssh, this can affect your ability to login). Please "
+"review the following space-separated list of init.d scripts for services to "
+"be restarted now, and correct it if needed."
+msgstr ""
+"Les services et programmes qui utilisent NSS (« Name Service Switch ») "
+"doivent être redémarrés car leur système d'authentification risque de ne "
+"plus fonctionner (pour des services comme SSH, cela peut empêcher les "
+"connexions). Veuillez contrôler et éventuellement corriger la liste des "
+"services qui seront redémarrés maintenant (identifiés par le nom de leur "
+"script de démarrage)."
+
+#. Type: string
+#. Description
+#: ../debhelper.in/libc.templates:2001
+msgid ""
+"Note: restarting sshd/telnetd should not affect any existing connections."
+msgstr ""
+"Veuillez noter que le redémarrage de telnetd ou sshd n'affectera pas les "
+"connexions existantes."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid "Failure restarting some services for GNU libc upgrade"
+msgstr "Échec du redémarrage de certains services"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"The following services could not be restarted for the GNU libc library "
+"upgrade:"
+msgstr ""
+"Les services suivants n'ont pas pu être redémarrés lors de la mise à jour de "
+"la bibliothèque C :"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:3001
+msgid ""
+"You will need to start these manually by running '/etc/init.d/<service> "
+"start'."
+msgstr ""
+"Il est nécessaire de les redémarrer vous-même avec la commande « /etc/init.d/"
+"<service> start »."
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid "xscreensaver and xlockmore must be restarted before upgrading"
+msgstr "Redémarrage nécessaire de xscreensaver et xlockmore avant mise à jour"
+
+#. Type: error
+#. Description
+#: ../debhelper.in/libc.templates:4001
+msgid ""
+"One or more running instances of xscreensaver or xlockmore have been "
+"detected on this system. Because of incompatible library changes, the "
+"upgrade of the GNU libc library will leave you unable to authenticate to "
+"these programs. You should arrange for these programs to be restarted or "
+"stopped before continuing this upgrade, to avoid locking your users out of "
+"their current sessions."
+msgstr ""
+"Une ou plusieurs instances de xscreensaver et/ou de xlockmore ont été "
+"détectées sur le système. À cause de la modification de certaines "
+"bibliothèques, la mise à niveau de la bibliothèque C entrainera "
+"l'impossibilité de s'authentifier. Avant de poursuivre la mise à niveau, ces "
+"programmes doivent être redémarrés ou arrêtés pour éviter que des "
+"utilisateurs ne puissent plus accéder à leurs sessions."
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid "Restart services during package upgrades without asking?"
+msgstr ""
+"Redémarrer inconditionnellement les services lors des mises à jour de "
+"paquets ?"
+
+#. Type: boolean
+#. Description
+#: ../debhelper.in/libc.templates:5001
+msgid ""
+"There are services installed on your system which need to be restarted when "
+"certain libraries, such as libpam, libc, and libssl, are upgraded. Since "
+"these restarts may cause interruptions of service for the system, you will "
+"normally be prompted on each upgrade for the list of services you wish to "
+"restart.  You can choose this option to avoid being prompted; instead, all "
+"necessary restarts will be done for you automatically so you can avoid being "
+"asked questions on each library upgrade."
+msgstr ""
+"Certains services installés sur le système doivent être redémarrés lorsque "
+"certaines bibliothèques, comme libpam, libc ou libssl, sont mises à jour. "
+"Comme ces redémarrages peuvent conduire à une interruption du service, le "
+"choix de les redémarrer ou non est en général offert lors de ces mises à "
+"jour. Vous pouvez choisir ici que ce choix ne soit plus offert et que les "
+"redémarrages aient lieu systématiquement lors des mises à jour de "
+"bibliothèques."
--- eglibc-2.13.orig/debian/source/format
+++ eglibc-2.13/debian/source/format
@@ -0,0 +1 @@
+1.0
--- eglibc-2.13.orig/debian/source/lintian-overrides
+++ eglibc-2.13/debian/source/lintian-overrides
@@ -0,0 +1,7 @@
+eglibc source: debhelper-but-no-misc-depends libc0.1
+eglibc source: debhelper-but-no-misc-depends libc6
+eglibc source: debhelper-but-no-misc-depends libc6.1
+eglibc source: debhelper-but-no-misc-depends libc0.3
+eglibc source: outdated-autotools-helper-file scripts/config.sub 2006-02-27
+eglibc source: outdated-autotools-helper-file scripts/config.guess 2006-02-27
+
--- eglibc-2.13.orig/debian/control.in/powerpc
+++ eglibc-2.13/debian/control.in/powerpc
@@ -0,0 +1,24 @@
+Package: libc6-powerpc
+Architecture: ppc64
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: 32bit powerpc shared libraries for ppc64
+ This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ This is the 32bit version of the library, meant for ppc64 systems.
+
+Package: libc6-dev-powerpc
+Architecture: ppc64
+Section: libdevel
+Priority: optional
+Provides: lib32c-dev
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-powerpc (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 32bit powerpc development libraries for ppc64
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 32bit version of the
+ library, meant for ppc64 systems.
+
--- eglibc-2.13.orig/debian/control.in/s390x
+++ eglibc-2.13/debian/control.in/s390x
@@ -0,0 +1,24 @@
+Package: libc6-s390x
+Architecture: s390
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: 64bit Shared libraries for IBM zSeries
+ This package includes shared versions of the standard C library and the
+ standard math library, as well as many others. This is the 64bit version
+ of the library, meant for zSeries systems.
+
+Package: libc6-dev-s390x
+Architecture: s390
+Section: libdevel
+Priority: optional
+Provides: lib64c-dev
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-s390x (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 64bit Development Libraries for IBM zSeries
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 64bit version of the
+ library, meant for zSeries systems.
+
--- eglibc-2.13.orig/debian/control.in/mips64
+++ eglibc-2.13/debian/control.in/mips64
@@ -0,0 +1,24 @@
+Package: libc6-mips64
+Architecture: mips mipsel
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: 64bit Shared libraries for MIPS64
+ This package includes shared versions of the standard C library and the
+ standard math library, as well as many others. This is the 64bit version
+ of the library, meant for MIPS64 systems.
+
+Package: libc6-dev-mips64
+Architecture: mips mipsel
+Section: libdevel
+Priority: optional
+Provides: lib64c-dev
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-mips64 (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 64bit Development Libraries for MIPS64
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 64bit version of the
+ library, meant for MIPS64 systems.
+
--- eglibc-2.13.orig/debian/control.in/kfreebsd-i386
+++ eglibc-2.13/debian/control.in/kfreebsd-i386
@@ -0,0 +1,24 @@
+Package: libc0.1-i386
+Architecture: kfreebsd-amd64
+Section: libs
+Priority: optional
+Depends: libc0.1 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: 32bit shared libraries for AMD64
+ This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ This is the 32bit version of the library, meant for AMD64 systems.
+
+Package: libc0.1-dev-i386
+Architecture: kfreebsd-amd64
+Section: libdevel
+Priority: optional
+Provides: lib32c-dev
+Conflicts: libc0.1-dev (<< 2.13-14)
+Replaces: libc0.1-dev (<< 2.13-11)
+Depends: libc0.1-i386 (= ${binary:Version}), libc0.1-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 32bit development libraries for AMD64
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 32bit version of the
+ library, meant for AMD64 systems.
+
--- eglibc-2.13.orig/debian/control.in/libnss-files-udeb
+++ eglibc-2.13/debian/control.in/libnss-files-udeb
@@ -0,0 +1,13 @@
+Package: libnss-files-udeb
+XC-Package-Type: udeb
+Architecture: any
+Section: debian-installer
+Priority: extra
+Description: Embedded GNU C Library: NSS helper for files - udeb
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C library
+ and the standard math library, as well as many others.
+ .
+ This package contains the files NSS helper needed for the Debian installer.
+ Do not install it on a normal system.
+
--- eglibc-2.13.orig/debian/control.in/s390
+++ eglibc-2.13/debian/control.in/s390
@@ -0,0 +1,24 @@
+Package: libc6-s390
+Architecture: s390x
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: 32bit Shared libraries for IBM zSeries
+ This package includes shared versions of the standard C library and the
+ standard math library, as well as many others. This is the 32bit version
+ of the library.
+
+Package: libc6-dev-s390
+Architecture: s390x
+Section: libdevel
+Priority: optional
+Provides: lib32c-dev
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-s390 (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 32bit Development Libraries for IBM zSeries
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 32bit version of the
+ library.
+
--- eglibc-2.13.orig/debian/control.in/libc
+++ eglibc-2.13/debian/control.in/libc
@@ -0,0 +1,89 @@
+Package: @libc@
+Architecture: @archs@
+Section: libs
+Priority: required
+Multi-Arch: same
+Depends: libc-bin (= ${binary:Version}), hurd (>= 20070606-1+SVN) [hurd-i386], libgcc1 [!hppa !m68k], libgcc2 [m68k], libgcc4 [hppa]
+Recommends: libc6-i686 [i386], libc0.1-i686 [kfreebsd-i386], libc0.3-i686 [hurd-i386]
+Suggests: glibc-doc, debconf | debconf-2.0, locales [!hurd-i386]
+Provides: ${locale-compat:Depends}, libc6-sparcv9b [sparc sparc64]
+Conflicts: tzdata-etch, tzdata (<< 2007k-1), prelink (<= 0.0.20090311-1)
+Breaks: nscd (<< 2.13), locales (<< 2.13), locales-all (<< 2.13), lsb-core (<= 3.2-27) [amd64 ppc64 sparc64]
+Replaces: libc6-amd64 [amd64],
+          libc6-i386 [i386],
+          libc0.1-i386 [kfreebsd-i386],
+          libc6-powerpc [powerpc],
+          libc6-ppc64 [ppc64],
+          libc6-s390x [s390x],
+          libc6-sparc64 [sparc64],
+          hurd (<< 20120408-3) [hurd-i386]
+Description: Embedded GNU C Library: Shared libraries
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C library
+ and the standard math library, as well as many others.
+
+Package: @libc@-dev
+Architecture: @archs@
+Section: libdevel
+Priority: optional
+Multi-Arch: same
+Depends: @libc@ (= ${binary:Version}), libc-dev-bin (= ${binary:Version}), ${misc:Depends}, linux-libc-dev [linux-any], kfreebsd-kernel-headers (>= 0.11) [kfreebsd-any], gnumach-dev [hurd-i386], hurd-dev (>= 20080607-3) [hurd-i386]
+Replaces: hurd-dev (<< 20120408-3) [hurd-i386]
+Recommends: gcc | c-compiler
+Suggests: glibc-doc, manpages-dev
+Provides: libc-dev, libc6-dev [alpha ia64 hurd-i386 kfreebsd-i386 kfreebsd-amd64]
+Breaks: binutils (<< 2.20.1-1), binutils-gold (<< 2.20.1-11), cmake (<< 2.8.4+dfsg.1-5), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2), gcc-4.6 (<< 4.6.0-12), make (<< 3.81-8.1), pkg-config (<< 0.26-1), libjna-java (<< 3.2.7-4), liblouis-dev (<< 2.3.0-2), liblouisxml-dev (<< 2.4.0-2), libhwloc-dev (<< 1.2-3)
+Conflicts: @libc-dev-conflict@
+Description: Embedded GNU C Library: Development Libraries and Header Files
+ Contains the symlinks, headers, and object files needed to compile
+ and link programs which use the standard C library.
+
+Package: @libc@-dbg
+Architecture: @archs@
+Section: debug
+Priority: extra
+Multi-Arch: same
+Provides: libc-dbg
+Depends: @libc@ (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: detached debugging symbols
+ This package contains the detached debugging symbols for the GNU C
+ library.
+
+Package: @libc@-prof
+Architecture: @archs@
+Section: libdevel
+Priority: extra
+Multi-Arch: same
+Depends: @libc@ (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: Profiling Libraries
+ Static libraries compiled with profiling info (-pg) suitable for use
+ with gprof.
+
+Package: @libc@-pic
+Architecture: @archs@
+Section: libdevel
+Priority: optional
+Multi-Arch: same
+Conflicts: libc-pic
+Provides: libc-pic, glibc-pic
+Depends: @libc@ (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: PIC archive library
+ Contains an archive library (ar file) composed of individual shared objects.
+ This is used for creating a library which is a smaller subset of the
+ standard libc shared library. The reduced library is used by debian-installer
+ and may be useful for custom installation media and in embedded systems.
+
+Package: @libc@-udeb
+XC-Package-Type: udeb
+Architecture: @archs@
+Section: debian-installer
+Priority: extra
+Provides: @libc@, libc-udeb, ${locale-compat:Depends}
+Description: Embedded GNU C Library: Shared libraries - udeb
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C library
+ and the standard math library, as well as many others.
+ .
+ This package contains a minimal set of libraries needed for the Debian
+ installer.  Do not install it on a normal system.
+
--- eglibc-2.13.orig/debian/control.in/ppc64
+++ eglibc-2.13/debian/control.in/ppc64
@@ -0,0 +1,24 @@
+Package: libc6-ppc64
+Architecture: powerpc
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: 64bit Shared libraries for PowerPC64
+ This package includes shared versions of the standard C library and the
+ standard math library, as well as many others. This is the 64bit version
+ of the library, meant for PowerPC64 systems.
+
+Package: libc6-dev-ppc64
+Architecture: powerpc
+Section: libdevel
+Priority: optional
+Provides: lib64c-dev
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-ppc64 (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 64bit Development Libraries for PowerPC64
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 64bit version of the
+ library, meant for PowerPC64 systems.
+
--- eglibc-2.13.orig/debian/control.in/libnss-dns-udeb
+++ eglibc-2.13/debian/control.in/libnss-dns-udeb
@@ -0,0 +1,13 @@
+Package: libnss-dns-udeb
+XC-Package-Type: udeb
+Architecture: any
+Section: debian-installer
+Priority: extra
+Description: Embedded GNU C Library: NSS helper for DNS - udeb
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C library
+ and the standard math library, as well as many others.
+ .
+ This package contains the DNS NSS helper needed for the Debian installer.
+ Do not install it on a normal system.
+
--- eglibc-2.13.orig/debian/control.in/sparc64
+++ eglibc-2.13/debian/control.in/sparc64
@@ -0,0 +1,25 @@
+Package: libc6-sparc64
+Architecture: sparc
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Conflicts: gcc-3.0 (<< 1:3.0.4ds3-11), libgcc1 (<< 1:3.0.4ds3-11), fakeroot (<< 0.4.5-2.7)
+Description: Embedded GNU C Library: 64bit Shared libraries for UltraSPARC
+ This package includes shared versions of the standard C library and the
+ standard math library, as well as many others. This is the 64bit version
+ of the library, meant for UltraSPARC systems.
+
+Package: libc6-dev-sparc64
+Architecture: sparc
+Section: libdevel
+Priority: optional
+Provides: lib64c-dev
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-sparc64 (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 64bit Development Libraries for UltraSPARC
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 64bit version of the
+ library, meant for UltraSPARC systems.
+
--- eglibc-2.13.orig/debian/control.in/opt
+++ eglibc-2.13/debian/control.in/opt
@@ -0,0 +1,116 @@
+Package: libc6-i686
+Architecture: i386
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc6 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries [i686 optimized]
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for i686 machines, and will only be
+ used on an i686 class CPU (check the output of `uname -m').  This includes 
+ Pentium Pro, Pentium II/III/IV, Celeron CPU's and similar class CPU's
+ (including clones such as AMD Athlon/Opteron, VIA C3 Nehemiah, but not VIA 
+ C3 Ezra).  
+
+Package: libc6-xen
+Architecture: i386
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc6 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries [Xen version]
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for the Xen hypervisor, and will be
+ selected instead when running under Xen.
+
+Package: libc0.1-i686
+Architecture: kfreebsd-i386
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc0.1 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries [i686 optimized]
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for i686 machines, and will only be
+ used on an i686 class CPU (check the output of `uname -m').  This includes 
+ Pentium Pro, Pentium II/III/IV, Celeron CPU's and similar class CPU's
+ (including clones such as AMD Athlon/Opteron, VIA C3 Nehemiah, but not VIA 
+ C3 Ezra).  
+
+Package: libc0.3-i686
+Architecture: hurd-i386
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc0.3 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries [i686 optimized]
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for i686 machines, and will only be
+ used on an i686 class CPU (check the output of `uname -m').  This includes 
+ Pentium Pro, Pentium II/III/IV, Celeron CPU's and similar class CPU's
+ (including clones such as AMD Athlon/Opteron, VIA C3 Nehemiah, but not VIA 
+ C3 Ezra).  
+
+Package: libc0.3-xen
+Architecture: hurd-i386
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc0.3 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries [Xen version]
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for the Xen hypervisor, and will be
+ selected instead when running under Xen.
+
+Package: libc6.1-alphaev67
+Architecture: alpha
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc6.1 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries (EV67 optimized)
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for the Alpha EV67. It only
+ needs to be installed on Alpha EV67/68 and EV7 machines. If you install
+ this on an older machine, it won't even be used.
+
+Package: libc6-loongson2f
+Architecture: mipsel
+Section: libs
+Priority: extra
+Multi-Arch: same
+Pre-Depends: libc6 (= ${binary:Version})
+Depends: ${misc:Depends}
+Description: Embedded GNU C Library: Shared libraries (Loongson 2F optimized)
+ Contains the standard libraries that are used by nearly all programs on
+ the system. This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ .
+ This set of libraries is optimized for the Loongson 2F. It only
+ needs to be installed on Lemote Loongson 2F machines. If you install
+ this on a non-Loongson, it won't even be used.
+
--- eglibc-2.13.orig/debian/control.in/i386
+++ eglibc-2.13/debian/control.in/i386
@@ -0,0 +1,26 @@
+Package: libc6-i386
+Architecture: amd64
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Replaces: libc6-dev-i386
+Breaks: fakeroot (<< 1.12.3), gnu-efi (<< 3.0e-3), fakechroot (<< 2.9-1.1), fglrx-glx-ia32 (<< 1:9-6-1), ia32-libs (<< 20090804), ia32-libs-gtk (<< 20090804), lib32asound2 (<< 1.0.20-3), lib32asound2-dev (<< 1.0.20-3), lib32bz2-1.0 (<< 1.0.5-3), lib32bz2-dev (<< 1.0.5-3), lib32ffi-dev (<< 3.0.9~rc9-1), lib32ffi5 (<< 3.0.9~rc9-1), lib32g2c0 (<< 1:3.4.6-10), lib32gcc1 (<< 1:4.4.0-7), lib32gfortran3 (<< 4.4.0-7), lib32gmp3 (<< 2:4.3.1+dfsg-3), lib32gmp3-dev (<< 2:4.3.1+dfsg-3), lib32gmpxx4 (<< 2:4.3.1+dfsg-3), lib32gomp1 (<< 4.4.0-7), lib32icu-dev (<< 4.0.1-3), lib32icu40 (<< 4.0.1-3), lib32mudflap0 (<< 4.4.0-7), lib32ncurses5 (<< 5.7+20090523-1), lib32ncurses5-dev (<< 5.7+20090530-1), lib32ncursesw5 (<< 5.7+20090530-1), lib32ncursesw5-dev (<< 5.7+20090530-1), lib32nss-mdns (<< 0.10-3.1), lib32objc2 (<< 4.4.0-7), lib32readline5 (<< 5.2-5), lib32readline5-dev (<< 5.2-5), lib32stdc++6 (<< 4.4.0-7), lib32stdc++6-4.4-dbg (<< 4.4.0-7), lib32z1 (<< 1:1.2.3.3.dfsg-14), lib32z1-dev (<< 1:1.2.3.3.dfsg-14), libc6-dev-i386 (<< 2.9-15), nvidia-glx-ia32 (<< 185.18.14-2), nvidia-libvdpau1-ia32 (<< 185.18.14-2)
+Description: Embedded GNU C Library: 32-bit shared libraries for AMD64
+ This package includes shared versions of the standard C
+ library and the standard math library, as well as many others.
+ This is the 32bit version of the library, meant for AMD64 systems.
+
+Package: libc6-dev-i386
+Architecture: amd64
+Section: libdevel
+Priority: optional
+Provides: lib32c-dev
+Conflicts: libc6-i386 (<= 2.9-18), libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-i386 (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: 32-bit development libraries for AMD64
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 32bit version of the
+ library, meant for AMD64 systems.
+
--- eglibc-2.13.orig/debian/control.in/mipsn32
+++ eglibc-2.13/debian/control.in/mipsn32
@@ -0,0 +1,24 @@
+Package: libc6-mipsn32
+Architecture: mips mipsel
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Description: Embedded GNU C Library: n32 Shared libraries for MIPS64
+ This package includes shared versions of the standard C library and the
+ standard math library, as well as many others. This is the n32 version
+ of the library, meant for MIPS64 systems.
+
+Package: libc6-dev-mipsn32
+Architecture: mips mipsel
+Section: libdevel
+Priority: optional
+Provides: libn32c-dev
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: libc6-dev (<< 2.13-11)
+Depends: libc6-mipsn32 (= ${binary:Version}), libc6-dev-mips64 (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Description: Embedded GNU C Library: n32 Development Libraries for MIPS64
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the n32 version of the
+ library, meant for MIPS64 systems.
+
--- eglibc-2.13.orig/debian/control.in/amd64
+++ eglibc-2.13/debian/control.in/amd64
@@ -0,0 +1,25 @@
+Package: libc6-amd64
+Architecture: i386
+Section: libs
+Priority: optional
+Depends: libc6 (= ${binary:Version}), ${misc:Depends}
+Conflicts: amd64-libs (<= 1.2)
+Description: Embedded GNU C Library: 64bit Shared libraries for AMD64
+ This package includes shared versions of the standard C library and the
+ standard math library, as well as many others. This is the 64bit version
+ of the library, meant for AMD64 systems.
+
+Package: libc6-dev-amd64
+Architecture: i386
+Section: libdevel
+Priority: optional
+Depends: libc6-amd64 (= ${binary:Version}), libc6-dev (= ${binary:Version}), ${misc:Depends}
+Recommends: gcc-multilib
+Conflicts: libc6-dev (<< 2.13-14)
+Replaces: amd64-libs-dev (<= 1.2), libc6-dev (<< 2.13-11)
+Provides: lib64c-dev
+Description: Embedded GNU C Library: 64bit Development Libraries for AMD64
+ Contains the symlinks and object files needed to compile and link programs
+ which use the standard C library. This is the 64bit version of the
+ library, meant for AMD64 systems.
+
--- eglibc-2.13.orig/debian/control.in/main
+++ eglibc-2.13/debian/control.in/main
@@ -0,0 +1,135 @@
+Source: eglibc
+Section: libs
+Priority: required
+Build-Depends: gettext, make (>= 3.80), dpkg-dev (>= 1.16.0), bzip2, xz-utils, file, quilt,
+ autoconf, sed (>= 4.0.5-4), gawk, debhelper (>= 7.4.3), tar (>= 1.22), fdupes,
+ linux-libc-dev (>= 3.2.1) [linux-any],
+ mig (>= 1.3-2) [hurd-i386], hurd-dev (>= 20120520-2~) [hurd-i386], gnumach-dev (>= 2:1.3.99.dfsg.git20120923~) [hurd-i386],
+ kfreebsd-kernel-headers [kfreebsd-any],
+ binutils (>= 2.20-3), binutils (>= 2.21) [sparc sparc64],
+ g++-4.4 (>= 4.4.2-2) [!armhf], g++-4.6 [armhf], g++-4.4-multilib [amd64 i386 kfreebsd-amd64 mips mipsel powerpc ppc64 s390 s390x sparc]
+Build-Depends-Indep: perl, po-debconf (>= 1.0)
+Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
+Uploaders: Clint Adams <clint@debian.org>, Aurelien Jarno <aurel32@debian.org>, Adam Conrad <adconrad@0c3.net>
+Standards-Version: 3.9.3
+Vcs-Browser: http://svn.debian.org/wsvn/pkg-glibc/glibc-package/
+Vcs-Svn: svn://svn.debian.org/pkg-glibc/glibc-package/
+Homepage: http://www.eglibc.org
+
+Package: libc-bin
+Architecture: any
+Section: libs
+Priority: required
+Essential: yes
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Breaks: libc0.1 (<< 2.10), libc0.3 (<< 2.10), libc6 (<< 2.10), libc6.1 (<< 2.10)
+Replaces: libc0.1, libc0.3, libc6, libc6.1
+Description: Embedded GNU C Library: Binaries
+ This package contains utility programs related to the GNU C Library.
+ .
+  * catchsegv: catch segmentation faults in programs
+  * getconf: query system configuration variables
+  * getent: get entries from administrative databases
+  * iconv, iconvconfig: convert between character encodings
+  * ldd, ldconfig: print/configure shared library dependencies
+  * locale, localedef: show/generate locale definitions
+  * rpcinfo: report RPC information
+  * tzselect, zdump, zic: select/dump/compile time zones
+
+Package: libc-dev-bin
+Architecture: any
+Section: libdevel
+Priority: optional
+Multi-Arch: foreign
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: manpages-dev
+Replaces: libc0.1-dev, libc0.3-dev, libc6-dev, libc6.1-dev
+Description: Embedded GNU C Library: Development binaries
+ This package contains utility programs related to the GNU C Library
+ development package.
+
+Package: glibc-doc
+Architecture: all
+Section: doc
+Priority: optional
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Suggests: glibc-doc-reference
+Description: Embedded GNU C Library: Documentation
+ Contains man pages for libpthread functions and the complete GNU C Library
+ ChangeLog.  The GNU C Library Reference manual has been moved into
+ glibc-doc-reference for licensing reasons.
+
+Package: eglibc-source
+Architecture: all
+Section: devel
+Priority: optional
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Recommends: xz-utils
+Description: Embedded GNU C Library: sources
+ This package contains the sources and patches which are needed to
+ build eglibc.
+
+Package: locales
+Architecture: all
+Section: localization
+Priority: standard
+Depends: ${locale:Depends}, ${misc:Depends}, debconf | debconf-2.0
+Conflicts: base-config, belocs-locales-bin, belocs-locales-data
+Replaces: base-config, lliurex-belocs-locales-data
+Description: Embedded GNU C Library: National Language (locale) data [support]
+ Machine-readable data files, shared objects and programs used by the
+ C library for localization (l10n) and internationalization (i18n) support.
+ .
+ This package contains the libc.mo i18n files, plus tools to generate
+ locale definitions from source files (included in this package). It
+ allows you to customize which definitions actually get
+ generated. This is a space-saver over how this package used to be,
+ with all locales generated by default. This created a package that
+ unpacked to an excess of 30 megs.
+
+Package: locales-all
+Architecture: any
+Section: localization
+Priority: extra
+Multi-Arch: foreign
+Depends: ${locale:Depends}, ${misc:Depends}
+Breaks: locales (<< 2.13-17)
+Provides: locales
+Description: Embedded GNU C Library: Precompiled locale data
+ This package contains the precompiled locale data for all supported locales.
+ A better alternative is to install the locales package and only select
+ desired locales, but it can be useful on a low-memory machine because some
+ locale files take a lot of memory to be compiled.
+
+Package: nscd
+Architecture: any
+Section: admin
+Multi-Arch: foreign
+Priority: optional
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Embedded GNU C Library: Name Service Cache Daemon
+ A daemon which handles passwd, group and host lookups
+ for running programs and caches the results for the next
+ query. You should install this package only if you use
+ slow services like LDAP, NIS or NIS+.
+
+Package: multiarch-support
+Architecture: any
+Multi-Arch: foreign
+Depends: ${misc:Depends},
+	 libc6 (>= 2.3.6-2) [!any-i386 !alpha !armhf !ia64 !hurd-any !kfreebsd-any],
+         libc6.1 (>= 2.3.6-2) [alpha ia64],
+         libc0.3 (>= 2.3.6-2) [!linux-any !kfreebsd-any !hurd-i386],
+         libc0.1 (>= 2.3.6-2) [!linux-any !hurd-any !kfreebsd-i386],
+         libc6 (>= 2.13-5) [armhf i386],
+         libc0.3 (>= 2.13-5) [hurd-i386],
+         libc0.1 (>= 2.13-5) [kfreebsd-i386],
+Priority: required
+Description: Transitional package to ensure multiarch compatibility
+ This is a transitional package used to ensure multiarch support is present
+ in ld.so before unpacking libraries to the multiarch directories.  It can
+ be removed once nothing on the system depends on it.
+
--- eglibc-2.13.orig/debian/patches/series.hurd-i386
+++ eglibc-2.13/debian/patches/series.hurd-i386
@@ -0,0 +1,9 @@
+hurd-i386/submitted-net.diff
+hurd-i386/tg-gscope.diff
+hurd-i386/tg-bits_atomic.h_multiple_threads.diff
+hurd-i386/tg-unlockpt-chroot.diff
+hurd-i386/local-msg-nosignal.diff
+hurd-i386/unsubmitted-pthread.diff
+hurd-i386/local-clock_gettime_MONOTONIC.diff
+hurd-i386/submitted-AF_LINK.diff
+hurd-i386/unsubmitted-mremap.diff
--- eglibc-2.13.orig/debian/patches/svn-updates.diff
+++ eglibc-2.13/debian/patches/svn-updates.diff
@@ -0,0 +1,1155 @@
+SVN update of svn://svn.eglibc.org/branches/eglibc-2_13 from revision 12776
+
+---
+ ChangeLog                                                   |   43 ++++
+ ChangeLog.eglibc                                            |   34 +++
+ NEWS                                                        |    4 
+ elf/Makefile                                                |    1 
+ elf/dl-deps.c                                               |   93 +++++-----
+ elf/dl-fini.c                                               |   10 -
+ elf/dl-lookup.c                                             |    2 
+ elf/dl-support.c                                            |    1 
+ elf/rtld.c                                                  |   12 -
+ ports/ChangeLog.arm                                         |   30 +++
+ ports/ChangeLog.eglibc                                      |   10 +
+ ports/ChangeLog.mips                                        |   18 ++
+ ports/sysdeps/arm/eabi/__longjmp.S                          |    8 
+ ports/sysdeps/arm/eabi/bits/fenv.h                          |    8 
+ ports/sysdeps/arm/eabi/bits/predefs.h                       |    8 
+ ports/sysdeps/arm/eabi/fclrexcpt.c                          |    8 
+ ports/sysdeps/arm/eabi/fedisblxcpt.c                        |    8 
+ ports/sysdeps/arm/eabi/feenablxcpt.c                        |    8 
+ ports/sysdeps/arm/eabi/fegetenv.c                           |    8 
+ ports/sysdeps/arm/eabi/fegetexcept.c                        |    8 
+ ports/sysdeps/arm/eabi/fegetround.c                         |    8 
+ ports/sysdeps/arm/eabi/feholdexcpt.c                        |    8 
+ ports/sysdeps/arm/eabi/fesetenv.c                           |    8 
+ ports/sysdeps/arm/eabi/fesetround.c                         |    8 
+ ports/sysdeps/arm/eabi/fpu_control.h                        |    8 
+ ports/sysdeps/arm/eabi/fraiseexcpt.c                        |    8 
+ ports/sysdeps/arm/eabi/fsetexcptflg.c                       |    8 
+ ports/sysdeps/arm/eabi/ftestexcept.c                        |    8 
+ ports/sysdeps/arm/eabi/setjmp.S                             |    8 
+ ports/sysdeps/arm/elf/start.S                               |    1 
+ ports/sysdeps/arm/sysdep.h                                  |   16 +
+ ports/sysdeps/powerpc/powerpc32/e500/fpu/s_fma.c            |    1 
+ ports/sysdeps/powerpc/powerpc32/e500/fpu/s_fmaf.c           |    1 
+ ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S         |    8 
+ ports/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S    |   21 +-
+ ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c   |    1 
+ ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c         |    1 
+ ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c       |    1 
+ ports/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c    |    1 
+ ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list |    5 
+ resolv/res_libc.c                                           |    6 
+ sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S              |    2 
+ sysdeps/i386/i686/multiarch/memcpy-ssse3.S                  |    2 
+ sysdeps/powerpc/powerpc32/dl-trampoline.S                   |    4 
+ sysdeps/powerpc/powerpc64/power7/Makefile                   |    5 
+ sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h          |    4 
+ sysdeps/wordsize-64/Makefile                                |    6 
+ sysdeps/wordsize-64/tst-writev.c                            |  107 ++++++++++++
+ sysdeps/x86_64/multiarch/memcpy-ssse3-back.S                |    2 
+ sysdeps/x86_64/multiarch/memcpy-ssse3.S                     |    2 
+ 50 files changed, 447 insertions(+), 144 deletions(-)
+
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,46 @@
++2011-05-30  Ulrich Drepper  <drepper@gmail.com>
++
++	[BZ #12454]
++	* elf/dl-deps.c (_dl_map_object_deps): Run initializer sorting only
++	when there are multiple maps.
++	* elf/dl-fini.c (_dl_sort_fini): Check for list of one.
++	(_dl_fini): Remove test here.
++
++	* elf/rtld.c (dl_main): Don't allow the loader to load itself.
++
++2011-02-06  Mike Frysinger  <vapier@gentoo.org>
++
++	[BZ #12653]
++	* sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S: Only protect
++	MEMCPY_CHK with USE_AS_BCOPY ifdef check.
++	* sysdeps/i386/i686/multiarch/memcpy-ssse3.S: Likewise.
++	* sysdeps/x86_64/multiarch/memcpy-ssse3.S: Likewise.
++	* sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: Likewise.
++
++2010-09-28  Andreas Schwab  <schwab@redhat.com>
++	    Ulrich Drepper  <drepper@gmail.com>
++
++	[BZ #12489]
++	* elf/rtld.c (dl_main): Move setting of GLRO(dl_init_all_dirs)
++	before performing relro protection.  At old place add assertion
++	to make sure nothing changed.
++
++2011-02-16  Ryan S. Arnold  <rsa@us.ibm.com>
++
++	* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h:
++	(INTERNAL_VSYSCALL_NCS INTERNAL_SYSCALL_NCS): Remove erroneous (int)
++	cast from r3.
++	* sysdeps/wordsize-64/Makefile: New file.  Add tst-writev to
++	'tests' variable.
++	* sysdeps/wordsize-64/tst-writev.c: New file.
++
++2011-02-15  Ryan S. Arnold  <rsa@us.ibm.com>
++
++	* sysdeps/powerpc/powerpc64/power7/Makefile: New file which adds
++	-mno-vsx to the CFLAGS-rtld.c variable to avoid using VSX registers and
++	insns in _dl_start to prevent a TOC reference before relocs are
++	resolved.
++
+ 2011-02-02  Ulrich Drepper  <drepper@gmail.com>
+ 
+ 	* elf/dl-runtime.c (_dl_call_pltexit): Pass correct address of the
+--- a/sysdeps/powerpc/powerpc32/dl-trampoline.S
++++ b/sysdeps/powerpc/powerpc32/dl-trampoline.S
+@@ -137,6 +137,7 @@
+ 	stw r9,40(r1)
+ 	stw r10,44(r1)
+ 	stw r0,8(r1)
++#ifndef __NO_FPRS__
+  # Save the floating point registers
+ 	stfd fp1,48(r1)
+ 	stfd fp2,56(r1)
+@@ -146,6 +147,7 @@
+ 	stfd fp6,88(r1)
+ 	stfd fp7,96(r1)
+ 	stfd fp8,104(r1)
++#endif
+  # XXX TODO: store vmx registers
+  # Load the extra parameters.
+ 	addi r6,r1,16
+@@ -169,6 +171,7 @@
+ 	lwz r4,20(r1)
+ 	lwz r3,16(r1)
+         lwz r0,12(r1)
++#ifndef __NO_FPRS__
+  # Load the floating point registers.
+ 	lfd fp1,48(r1)
+ 	lfd fp2,56(r1)
+@@ -178,6 +181,7 @@
+ 	lfd fp6,88(r1)
+ 	lfd fp7,96(r1)
+ 	lfd fp8,104(r1)
++#endif
+  # ...unwind the stack frame, and jump to the PLT entry we updated.
+ 	addi r1,r1,320
+ 	bctr
+--- /dev/null
++++ b/sysdeps/powerpc/powerpc64/power7/Makefile
+@@ -0,0 +1,5 @@
++ifeq ($(subdir),elf)
++# Prevent the use of VSX registers and insns in _dl_start, which under -O3
++# optimization may require a TOC reference before relocations are resolved.
++CFLAGS-rtld.c += -mno-vsx
++endif
+--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
+@@ -172,7 +172,7 @@
+        : "r9", "r10", "r11", "r12",					\
+          "cr0", "ctr", "lr", "memory");					\
+ 	  err = (long int) r0;						\
+-    (int) r3;								\
++    r3;								\
+   })
+ 
+ #undef INLINE_SYSCALL
+@@ -219,7 +219,7 @@
+        : "r9", "r10", "r11", "r12",					\
+          "cr0", "ctr", "memory");					\
+ 	  err = r0;  \
+-    (int) r3;  \
++    r3;  \
+   })
+ #define INTERNAL_SYSCALL(name, err, nr, args...)			\
+   INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, args)
+--- a/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
++++ b/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
+@@ -110,7 +110,7 @@
+ #endif
+ 
+ 	.section .text.ssse3,"ax",@progbits
+-#if defined SHARED && !defined NOT_IN_libc && !defined USE_AS_BCOPY
++#if !defined USE_AS_BCOPY
+ ENTRY (MEMCPY_CHK)
+ 	movl	12(%esp), %eax
+ 	cmpl	%eax, 16(%esp)
+--- a/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S
++++ b/sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S
+@@ -110,7 +110,7 @@
+ #endif
+ 
+ 	.section .text.ssse3,"ax",@progbits
+-#if defined SHARED && !defined NOT_IN_libc && !defined USE_AS_BCOPY
++#if !defined USE_AS_BCOPY
+ ENTRY (MEMCPY_CHK)
+ 	movl	12(%esp), %eax
+ 	cmpl	%eax, 16(%esp)
+--- /dev/null
++++ b/sysdeps/wordsize-64/tst-writev.c
+@@ -0,0 +1,107 @@
++/* Copyright (C) 2011 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ryan S. Arnold <rsa@us.ibm.com>, 2011.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <fcntl.h>
++#include <paths.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <sys/uio.h>
++
++
++/* The purpose of this test is to verify that the INTERNAL_[V]SYSCALL_NCS
++   macros on 64-bit platforms don't cast the return type to (int) which would
++   erroneously sign extend the return value should the high bit of the bottom
++   half of the word be '1'.  */
++
++#if 0
++/* Used to test the non power-of-2 code path.  */
++#undef IOV_MAX
++#define IOV_MAX 1000
++#endif
++
++/* writev() should report that it has written EXPECTED number of bytes.  */
++#define EXPECTED ((size_t) INT32_MAX + 1)
++
++static int
++do_test (void)
++{
++  struct iovec iv[IOV_MAX];
++  /* POSIX doesn't guarantee that IOV_MAX is pow of 2 but we're optimistic.  */
++  size_t bufsz = EXPECTED / IOV_MAX;
++  size_t bufrem = EXPECTED % IOV_MAX;
++
++  /* If there's a remainder then IOV_MAX probably isn't a power of 2 and we
++     need to make bufsz bigger so that the last iovec, iv[IOV_MAX-1], is free
++     for the remainder.  */
++  if (bufrem)
++    {
++      bufsz = bufsz + 1;
++      bufrem = EXPECTED - (bufsz * (IOV_MAX - 1));
++    }
++
++  /* We writev to /dev/null since we're just testing writev's return value.  */
++  int fd = open (_PATH_DEVNULL, O_WRONLY);
++  if (fd == -1)
++    {
++      printf ("Unable to open /dev/null for writing.\n");
++      return -1;
++    }
++
++  iv[0].iov_base = malloc (bufsz);
++  if (iv[0].iov_base == NULL)
++    {
++      printf ("malloc (%zu) failed.\n", bufsz);
++      close (fd);
++      return -1;
++    }
++  iv[0].iov_len = bufsz;
++
++  /* We optimistically presume that there isn't a remainder and set all iovec
++     instances to the same base and len as the first instance.  */
++  for (int i = 1; i < IOV_MAX; i++)
++    {
++      /* We don't care what the data is so reuse the allocation from iv[0];  */
++      iv[i].iov_base = iv[0].iov_base;
++      iv[i].iov_len = iv[0].iov_len;
++    }
++
++  /* If there is a remainder then we correct the last iov_len.  */
++  if (bufrem)
++    iv[IOV_MAX - 1].iov_len = bufrem;
++
++  /* Write junk to /dev/null with the writev syscall in order to get a return
++     of INT32_MAX+1 bytes to verify that the INTERNAL_SYSCALL wrappers aren't
++     mangling the result if the signbit of a 32-bit number is set.  */
++  ssize_t ret = writev (fd, iv, IOV_MAX);
++
++  free (iv[0].iov_base);
++  close (fd);
++
++  if (ret != (ssize_t) EXPECTED)
++    {
++      printf ("writev() return value: %zd != EXPECTED: %zd\n", ret, EXPECTED);
++      return 1;
++    }
++
++  return 0;
++}
++
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+--- /dev/null
++++ b/sysdeps/wordsize-64/Makefile
+@@ -0,0 +1,6 @@
++ifeq ($(subdir),misc)
++tests += tst-writev
++
++# Time enough for a large writev syscall to complete.
++tst-writev-ENV = TIMEOUTFACTOR="10"
++endif
+--- a/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
++++ b/sysdeps/x86_64/multiarch/memcpy-ssse3-back.S
+@@ -49,7 +49,7 @@
+   ud2
+ 
+ 	.section .text.ssse3,"ax",@progbits
+-#if defined SHARED && !defined NOT_IN_libc
++#if !defined USE_AS_BCOPY
+ ENTRY (MEMCPY_CHK)
+ 	cmpq	%rdx, %rcx
+ 	jb	HIDDEN_JUMPTARGET (__chk_fail)
+--- a/sysdeps/x86_64/multiarch/memcpy-ssse3.S
++++ b/sysdeps/x86_64/multiarch/memcpy-ssse3.S
+@@ -49,7 +49,7 @@
+   ud2
+ 
+ 	.section .text.ssse3,"ax",@progbits
+-#if defined SHARED && !defined NOT_IN_libc
++#if !defined USE_AS_BCOPY
+ ENTRY (MEMCPY_CHK)
+ 	cmpq	%rdx, %rcx
+ 	jb	HIDDEN_JUMPTARGET (__chk_fail)
+--- a/NEWS
++++ b/NEWS
+@@ -1,4 +1,4 @@
+-GNU C Library NEWS -- history of user-visible changes.  2011-1-19
++GNU C Library NEWS -- history of user-visible changes.  2011-5-30
+ Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
+ See the end for copying conditions.
+ 
+@@ -13,7 +13,7 @@
+   11655, 11701, 11840, 11856, 11883, 11903, 11904, 11968, 11979, 12005,
+   12037, 12067, 12077, 12078, 12092, 12093, 12107, 12108, 12113, 12140,
+   12159, 12167, 12191, 12194, 12201, 12204, 12205, 12207, 12348, 12378,
+-  12394, 12397
++  12394, 12397, 12489, 12653, 12454
+ 
+ * New Linux interfaces: prlimit, prlimit64, fanotify_init, fanotify_mark
+ 
+--- a/resolv/res_libc.c
++++ b/resolv/res_libc.c
+@@ -28,6 +28,7 @@
+    out) since res_init() should go into libc.so but the rest of that
+    file should not.  */
+ 
++__libc_lock_define_initialized (static, lock);
+ extern unsigned long long int __res_initstamp attribute_hidden;
+ /* We have atomic increment operations on 64-bit platforms.  */
+ #if __WORDSIZE == 64
+@@ -35,7 +36,6 @@
+ # define atomicincunlock(lock) (void) 0
+ # define atomicinc(var) catomic_increment (&(var))
+ #else
+-__libc_lock_define_initialized (static, lock);
+ # define atomicinclock(lock) __libc_lock_lock (lock)
+ # define atomicincunlock(lock) __libc_lock_unlock (lock)
+ # define atomicinc(var) ++var
+@@ -100,12 +100,12 @@
+ 
+ 	if (resp->options & RES_INIT) {
+ 		ret = stat (_PATH_RESCONF, &statbuf);
++		__libc_lock_lock (lock);
+ 		if ((ret == 0) && (last_mtime != statbuf.st_mtime)) {
+ 			last_mtime = statbuf.st_mtime;
+-			atomicinclock (lock);
+ 			atomicinc (__res_initstamp);
+-			atomicincunlock (lock);
+ 		}
++		__libc_lock_unlock (lock);
+ 		if (__res_initstamp != resp->_u._ext.initstamp) {
+ 			if (resp->nscount > 0)
+ 				__res_iclose (resp, true);
+--- a/ChangeLog.eglibc
++++ b/ChangeLog.eglibc
+@@ -1,3 +1,37 @@
++2011-10-11  Maxim Kuvyrkov  <maxim@codesourcery.com>
++
++	Backport from trunk:
++
++	2011-10-07  Michael Hope  <michael.hope@linaro.org>
++	* manual/Makefile (stamp-pkgvers): Escape PKGVERSION.  Fix the
++	escaping of REPORT_BUGS_TO.
++
++2011-09-06  Dr. David Alan Gilbert  <david.gilbert@linaro.org>
++
++	* elf/Makefile: Push tst-initorder through cross-test-wrapper.
++
++2011-07-22  Denis Zaitceff  <zaitceff@gmail.com>
++
++	* elf/dl-support.c, elf/rtld.c: Include <gnu/option-groups.h>.
++
++2011-07-06  Sebastan Andrzej Siewior  <bigeasy@linutronix.de>
++
++	* sysdeps/powerpc/powerpc32/dl-trampoline.S: Put __NO_FPRS__
++	around floating point opcodes.
++
++2011-06-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
++
++	Backport from trunk:
++	2011-06-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
++	* resolv/res_libc.c (__res_initstamp): Declare unconditionally.
++	(__res_maybe_init): Avoid double-checked locking.
++
++2011-06-10  Maxim Kuvyrkov  <maxim@codesourcery.com>
++
++	Backport from trunk:
++	2011-02-28  Denis Zaitceff  <zaitceff@gmail.com>
++	* elf/dl-lookup.c (GLRO_dl_debug_mask): Apply the forgotten one.
++
+ 2010-12-19  Gordon Schumacher  <whiplash@pobox.com>
+ 
+ 	* locale/xlocale.x (DEFINE_CATEGORY): Fix merge issue.
+--- a/elf/dl-support.c
++++ b/elf/dl-support.c
+@@ -20,6 +20,7 @@
+ /* This file defines some things that for the dynamic linker are defined in
+    rtld.c and dl-sysdep.c in ways appropriate to bootstrap dynamic linking.  */
+ 
++#include <gnu/option-groups.h>
+ #include <errno.h>
+ #include <libintl.h>
+ #include <stdlib.h>
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -1191,6 +1191,7 @@
+ $(objpfx)tst-unique2.out: $(objpfx)tst-unique2mod2.so
+ 
+ $(objpfx)tst-initorder.out: $(objpfx)tst-initorder
++	$(cross-test-wrapper) \
+ 	$(elf-objpfx)${rtld-installed-name} \
+ 	  --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
+ 	  $< > $@
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -1,5 +1,5 @@
+ /* Run time dynamic linker.
+-   Copyright (C) 1995-2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
++   Copyright (C) 1995-2010, 2011 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+@@ -17,6 +17,7 @@
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
++#include <gnu/option-groups.h>
+ #include <errno.h>
+ #include <dlfcn.h>
+ #include <fcntl.h>
+@@ -2179,6 +2180,10 @@
+      we need it in the memory handling later.  */
+   GLRO(dl_initial_searchlist) = *GL(dl_ns)[LM_ID_BASE]._ns_main_searchlist;
+ 
++  /* Remember the last search directory added at startup, now that
++     malloc will no longer be the one from dl-minimal.c.  */
++  GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
++
+   if (prelinked)
+     {
+       if (main_map->l_info [ADDRIDX (DT_GNU_CONFLICT)] != NULL)
+@@ -2298,9 +2303,8 @@
+ 			  lossage);
+     }
+ 
+-  /* Remember the last search directory added at startup, now that
+-     malloc will no longer be the one from dl-minimal.c.  */
+-  GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
++  /* Make sure no new search directories have been added.  */
++  assert (GLRO(dl_init_all_dirs) == GL(dl_all_dirs));
+ 
+   if (! prelinked && rtld_multiple_ref)
+     {
+--- a/elf/dl-fini.c
++++ b/elf/dl-fini.c
+@@ -33,9 +33,12 @@
+ _dl_sort_fini (struct link_map *l, struct link_map **maps, size_t nmaps,
+ 	       char *used, Lmid_t ns)
+ {
++  /* A list of one element need not be sorted.  */
++  if (nmaps == 1)
++    return;
++
+   /* We can skip looking for the binary itself which is at the front
+      of the search list for the main namespace.  */
+-  assert (nmaps > 1);
+   unsigned int i = ns == LM_ID_BASE;
+   bool seen[nmaps];
+   memset (seen, false, nmaps * sizeof (seen[0]));
+@@ -195,9 +198,8 @@
+       assert (ns == LM_ID_BASE || i == nloaded || i == nloaded - 1);
+       nmaps = i;
+ 
+-      if (nmaps > 1)
+-	/* Now we have to do the sorting.  */
+-	_dl_sort_fini (GL(dl_ns)[ns]._ns_loaded, maps, nmaps, NULL, ns);
++      /* Now we have to do the sorting.  */
++      _dl_sort_fini (GL(dl_ns)[ns]._ns_loaded, maps, nmaps, NULL, ns);
+ 
+       /* We do not rely on the linked list of loaded object anymore from
+ 	 this point on.  We have our own list here (maps).  The various
+--- a/elf/dl-deps.c
++++ b/elf/dl-deps.c
+@@ -613,61 +613,64 @@
+ 	map->l_searchlist.r_list[i]->l_reserved = 0;
+     }
+ 
+-  /* Now determine the order in which the initialization has to happen.  */
++  /* Sort the initializer list to take dependencies into account.  The binary
++     itself will always be initialize last.  */
+   memcpy (l_initfini, map->l_searchlist.r_list,
+ 	  nlist * sizeof (struct link_map *));
+-
+-  /* We can skip looking for the binary itself which is at the front
+-     of the search list.  */
+-  assert (nlist > 1);
+-  i = 1;
+-  bool seen[nlist];
+-  memset (seen, false, nlist * sizeof (seen[0]));
+-  while (1)
++  if (__builtin_expect (nlist > 1, 1))
+     {
+-      /* Keep track of which object we looked at this round.  */
+-      seen[i] = true;
+-      struct link_map *thisp = l_initfini[i];
+-
+-      /* Find the last object in the list for which the current one is
+-	 a dependency and move the current object behind the object
+-	 with the dependency.  */
+-      unsigned int k = nlist - 1;
+-      while (k > i)
++      /* We can skip looking for the binary itself which is at the front
++	 of the search list.  */
++      i = 1;
++      bool seen[nlist];
++      memset (seen, false, nlist * sizeof (seen[0]));
++      while (1)
+ 	{
+-	  struct link_map **runp = l_initfini[k]->l_initfini;
+-	  if (runp != NULL)
+-	    /* Look through the dependencies of the object.  */
+-	    while (*runp != NULL)
+-	      if (__builtin_expect (*runp++ == thisp, 0))
+-		{
+-		  /* Move the current object to the back past the last
+-		     object with it as the dependency.  */
+-		  memmove (&l_initfini[i], &l_initfini[i + 1],
+-			   (k - i) * sizeof (l_initfini[0]));
+-		  l_initfini[k] = thisp;
+-
+-		  if (seen[i + 1])
++	  /* Keep track of which object we looked at this round.  */
++	  seen[i] = true;
++	  struct link_map *thisp = l_initfini[i];
++
++	  /* Find the last object in the list for which the current one is
++	     a dependency and move the current object behind the object
++	     with the dependency.  */
++	  unsigned int k = nlist - 1;
++	  while (k > i)
++	    {
++	      struct link_map **runp = l_initfini[k]->l_initfini;
++	      if (runp != NULL)
++		/* Look through the dependencies of the object.  */
++		while (*runp != NULL)
++		  if (__builtin_expect (*runp++ == thisp, 0))
+ 		    {
+-		      ++i;
+-		      goto next_clear;
++		      /* Move the current object to the back past the last
++			 object with it as the dependency.  */
++		      memmove (&l_initfini[i], &l_initfini[i + 1],
++			       (k - i) * sizeof (l_initfini[0]));
++		      l_initfini[k] = thisp;
++
++		      if (seen[i + 1])
++			{
++			  ++i;
++			  goto next_clear;
++			}
++
++		      memmove (&seen[i], &seen[i + 1],
++			       (k - i) * sizeof (seen[0]));
++		      seen[k] = true;
++
++		      goto next;
+ 		    }
+ 
+-		  memmove (&seen[i], &seen[i + 1], (k - i) * sizeof (seen[0]));
+-		  seen[k] = true;
++	      --k;
++	    }
+ 
+-		  goto next;
+-		}
++	  if (++i == nlist)
++	    break;
++	next_clear:
++	  memset (&seen[i], false, (nlist - i) * sizeof (seen[0]));
+ 
+-	  --k;
++	next:;
+ 	}
+-
+-      if (++i == nlist)
+-	break;
+-    next_clear:
+-      memset (&seen[i], false, (nlist - i) * sizeof (seen[0]));
+-
+-    next:;
+     }
+ 
+   /* Terminate the list of dependencies.  */
+--- a/elf/dl-lookup.c
++++ b/elf/dl-lookup.c
+@@ -423,7 +423,7 @@
+ 		     hash table.  */
+ 		  if (__builtin_expect (tab->size, 0))
+ 		    {
+-		      assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
++		      assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK);
+ 		      __rtld_lock_unlock_recursive (tab->lock);
+ 		      goto success;
+ 		    }
+--- a/ports/sysdeps/arm/sysdep.h
++++ b/ports/sysdeps/arm/sysdep.h
+@@ -18,6 +18,7 @@
+    02111-1307 USA.  */
+ 
+ #include <sysdeps/generic/sysdep.h>
++#include <features.h>
+ 
+ #if (!defined (__ARM_ARCH_2__) && !defined (__ARM_ARCH_3__) \
+      && !defined (__ARM_ARCH_3M__) && !defined (__ARM_ARCH_4__))
+@@ -92,6 +93,16 @@
+ 
+ /* If compiled for profiling, call `mcount' at the start of each function.  */
+ #ifdef	PROF
++/* Call __gnu_mcount_nc if GCC >= 4.4 and abi = EABI.  */
++#if __GNUC_PREREQ(4,4) && defined(__ARM_EABI__)
++#define CALL_MCOUNT \
++  str	lr,[sp, #-4]!; \
++  cfi_adjust_cfa_offset (4); \
++  cfi_rel_offset (lr, 0); \
++  bl PLTJMP(mcount); \
++  cfi_adjust_cfa_offset (-4); \
++  cfi_restore (lr)
++#else /* else call _mcount */
+ #define CALL_MCOUNT \
+   str	lr,[sp, #-4]!; \
+   cfi_adjust_cfa_offset (4); \
+@@ -100,6 +111,7 @@
+   ldr lr, [sp], #4; \
+   cfi_adjust_cfa_offset (-4); \
+   cfi_restore (lr)
++#endif
+ #else
+ #define CALL_MCOUNT		/* Do nothing.  */
+ #endif
+@@ -109,8 +121,12 @@
+    on this system, the asm identifier `syscall_error' intrudes on the
+    C name space.  Make sure we use an innocuous name.  */
+ #define	syscall_error	__syscall_error
++#if __GNUC_PREREQ(4,4) && defined(__ARM_EABI__)
++#define mcount		__gnu_mcount_nc
++#else
+ #define mcount		_mcount
+ #endif
++#endif
+ 
+ #if defined(__ARM_EABI__)
+ /* Tag_ABI_align8_preserved: This code preserves 8-byte
+--- a/ports/sysdeps/arm/eabi/fsetexcptflg.c
++++ b/ports/sysdeps/arm/eabi/fsetexcptflg.c
+@@ -12,10 +12,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <fenv.h>
+ #include <math.h>
+--- a/ports/sysdeps/arm/eabi/fegetround.c
++++ b/ports/sysdeps/arm/eabi/fegetround.c
+@@ -12,10 +12,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <fenv.h>
+ #include <fpu_control.h>
+--- a/ports/sysdeps/arm/eabi/fegetenv.c
++++ b/ports/sysdeps/arm/eabi/fegetenv.c
+@@ -12,10 +12,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <fenv.h>
+ #include <fpu_control.h>
+--- a/ports/sysdeps/arm/eabi/fesetround.c
++++ b/ports/sysdeps/arm/eabi/fesetround.c
+@@ -12,10 +12,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <fenv.h>
+ #include <fpu_control.h>
+--- a/ports/sysdeps/arm/eabi/fesetenv.c
++++ b/ports/sysdeps/arm/eabi/fesetenv.c
+@@ -12,10 +12,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <fenv.h>
+ #include <fpu_control.h>
+--- a/ports/sysdeps/arm/eabi/setjmp.S
++++ b/ports/sysdeps/arm/eabi/setjmp.S
+@@ -12,10 +12,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <sysdep.h>
+ #define _SETJMP_H
+--- a/ports/sysdeps/arm/eabi/ftestexcept.c
++++ b/ports/sysdeps/arm/eabi/ftestexcept.c
+@@ -12,10 +12,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <fenv.h>
+ #include <fpu_control.h>
+--- a/ports/sysdeps/arm/eabi/fpu_control.h
++++ b/ports/sysdeps/arm/eabi/fpu_control.h
+@@ -12,10 +12,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #ifndef _FPU_CONTROL_H
+ #define _FPU_CONTROL_H
+--- a/ports/sysdeps/arm/eabi/fegetexcept.c
++++ b/ports/sysdeps/arm/eabi/fegetexcept.c
+@@ -13,10 +13,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <fenv.h>
+ #include <fpu_control.h>
+--- a/ports/sysdeps/arm/eabi/feholdexcpt.c
++++ b/ports/sysdeps/arm/eabi/feholdexcpt.c
+@@ -12,10 +12,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <fenv.h>
+ #include <fpu_control.h>
+--- a/ports/sysdeps/arm/eabi/fedisblxcpt.c
++++ b/ports/sysdeps/arm/eabi/fedisblxcpt.c
+@@ -13,10 +13,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <fenv.h>
+ #include <fpu_control.h>
+--- a/ports/sysdeps/arm/eabi/fraiseexcpt.c
++++ b/ports/sysdeps/arm/eabi/fraiseexcpt.c
+@@ -12,10 +12,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <fpu_control.h>
+ #include <fenv.h>
+--- a/ports/sysdeps/arm/eabi/bits/fenv.h
++++ b/ports/sysdeps/arm/eabi/bits/fenv.h
+@@ -11,10 +11,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #ifndef _FENV_H
+ # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+--- a/ports/sysdeps/arm/eabi/bits/predefs.h
++++ b/ports/sysdeps/arm/eabi/bits/predefs.h
+@@ -11,10 +11,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #ifndef _FEATURES_H
+ # error "Never use <bits/predefs.h> directly; include <features.h> instead."
+--- a/ports/sysdeps/arm/eabi/__longjmp.S
++++ b/ports/sysdeps/arm/eabi/__longjmp.S
+@@ -13,10 +13,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <sysdep.h>
+ #define _SETJMP_H
+--- a/ports/sysdeps/arm/eabi/fclrexcpt.c
++++ b/ports/sysdeps/arm/eabi/fclrexcpt.c
+@@ -12,10 +12,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <fenv.h>
+ #include <fpu_control.h>
+--- a/ports/sysdeps/arm/eabi/feenablxcpt.c
++++ b/ports/sysdeps/arm/eabi/feenablxcpt.c
+@@ -13,10 +13,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <fenv.h>
+ #include <fpu_control.h>
+--- a/ports/sysdeps/arm/elf/start.S
++++ b/ports/sysdeps/arm/elf/start.S
+@@ -134,6 +134,7 @@
+ 	bl abort
+ 
+ #ifdef SHARED
++	.align 2
+ .L_GOT:
+ 	.word _GLOBAL_OFFSET_TABLE_ - .L_GOT
+ 	.word __libc_csu_fini(GOT)
+--- /dev/null
++++ b/ports/sysdeps/powerpc/powerpc32/e500/fpu/s_fma.c
+@@ -0,0 +1 @@
++#include <math/s_fma.c>
+--- /dev/null
++++ b/ports/sysdeps/powerpc/powerpc32/e500/fpu/s_fmaf.c
+@@ -0,0 +1 @@
++#include <math/s_fmaf.c>
+--- a/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S
++++ b/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S
+@@ -11,10 +11,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <sysdep.h>
+ 
+--- a/ports/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
++++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
+@@ -11,10 +11,10 @@
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+-   You should have received a copy of the GNU General Public License
+-   along with GCC; see the file COPYING.  If not, write to the Free
+-   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+-   02110-1301, USA.  */
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
+ 
+ #include <sysdep.h>
+ 
+@@ -52,13 +52,15 @@
+ 	cfi_remember_state;			\
+ 	cmp	sp, reg;			\
+ 	bls	.Lok;				\
++	str	r7, [sp, #-4]!;			\
++	cfi_adjust_cfa_offset (4);		\
++	cfi_rel_offset (r7, 0);			\
+ 	mov	r5, r0;				\
+ 	cfi_undefined (r5);			\
+ 	mov	r7, #SYS_ify(sigaltstack);	\
+-	cfi_undefined (r7);			\
+ 	mov	r0, #0;				\
+-	sub	sp, sp, #16; /* >= sizeof (stack_t) */ \
+-	cfi_adjust_cfa_offset (16);		\
++	sub	sp, sp, #12; /* == sizeof (stack_t) */ \
++	cfi_adjust_cfa_offset (12);		\
+ 	cfi_remember_state;			\
+ 	mov	r1, sp;				\
+ 	swi	#0;				\
+@@ -74,6 +76,11 @@
+ 	cmp	r2, r3;				\
+ 	bhi	.Lok2;				\
+ .Lfail:						\
++	add	sp, sp, #12;			\
++	cfi_adjust_cfa_offset (-12);		\
++	ldr	r7, [sp], #4;			\
++	cfi_adjust_cfa_offset (-4);		\
++	cfi_restore (r7);			\
+ 	CALL_FAIL				\
+ 	cfi_restore_state;			\
+ .Lok2:						\
+--- /dev/null
++++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c
+@@ -0,0 +1 @@
++#include <io/ftw.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c
+@@ -0,0 +1 @@
++#include <io/ftw64.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c
+@@ -0,0 +1 @@
++/* Empty.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c
+@@ -0,0 +1 @@
++/* Empty.  */
+--- a/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
++++ b/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
+@@ -1,5 +1,10 @@
+ # File name	Caller	Syscall name	# args	Strong name	Weak names
+ 
++sync_file_range	-	sync_file_range	i:iiii	sync_file_range
++
+ prlimit		EXTRA	prlimit64	i:iipp	prlimit		prlimit64
+ 
+ fanotify_mark	EXTRA	fanotify_mark	i:iiiis	fanotify_mark
++
++fstatfs		-	fstatfs		i:ip	__fstatfs	fstatfs fstatfs64 __fstatfs64
++statfs		-	statfs		i:sp	__statfs	statfs statfs64 __statfs64
+--- a/ports/ChangeLog.mips
++++ b/ports/ChangeLog.mips
+@@ -1,3 +1,21 @@
++2011-11-17  Joseph Myers  <joseph@codesourcery.com>
++
++	* sysdeps/unix/sysv/linux/mips/mips64/n64/ftw.c,
++	sysdeps/unix/sysv/linux/mips/mips64/n64/ftw64.c: New.
++
++2011-09-06  Joseph Myers  <joseph@codesourcery.com>
++
++	[BZ #13109]
++	* sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list (fstatfs)
++	(statfs): New.
++	* sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c,
++	sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c: New.
++
++2011-04-01  Joseph Myers  <joseph@codesourcery.com>
++
++	* sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Add
++	sync_file_range.
++
+ 2011-01-25  Joseph Myers  <joseph@codesourcery.com>
+ 
+ 	* sysdeps/unix/sysv/linux/mips/bits/mman.h (MADV_HUGEPAGE,
+--- a/ports/ChangeLog.arm
++++ b/ports/ChangeLog.arm
+@@ -1,3 +1,33 @@
++2011-06-30  Richard Sandiford  <richard.sandiford@linaro.org>
++
++	* sysdeps/arm/elf/start.S (_start): Align the constant pool to 4 bytes.
++
++2011-04-01  Ryosei Takagi  <ryosei@sm.sony.co.jp>
++
++	* sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S:
++	Save and restore r7, and also adjust sp.
++
++2011-03-21  Joseph Myers  <joseph@codesourcery.com>
++
++	* sysdeps/arm/eabi/__longjmp.S, sysdeps/arm/eabi/bits/fenv.h,
++	sysdeps/arm/eabi/fclrexcpt.c, sysdeps/arm/eabi/fedisblxcpt.c,
++	sysdeps/arm/eabi/feenablxcpt.c, sysdeps/arm/eabi/fegetenv.c,
++	sysdeps/arm/eabi/fegetexcept.c, sysdeps/arm/eabi/fegetround.c,
++	sysdeps/arm/eabi/feholdexcpt.c, sysdeps/arm/eabi/fesetenv.c,
++	sysdeps/arm/eabi/fesetround.c, sysdeps/arm/eabi/fpu_control.h,
++	sysdeps/arm/eabi/fraiseexcpt.c, sysdeps/arm/eabi/fsetexcptflg.c,
++	sysdeps/arm/eabi/ftestexcept.c, sysdeps/arm/eabi/setjmp.S,
++	sysdeps/unix/sysv/linux/arm/____longjmp_chk.S,
++	sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S: Correct
++	license reference in last paragraph of license notice.
++
++2011-02-16  Manjunath Matti  <manjunath81@gmail.com>
++
++	* sysdeps/arm/sysdep.h (CALL_MCOUNT): Use __gnu_mcount_nc
++	interface for EABI with GCC 4.4 or later.
++	(mcount): Define to __gnu_mcount_nc for EABI with GCC 4.4 or
++	later.
++
+ 2011-01-25  Joseph Myers  <joseph@codesourcery.com>
+ 
+ 	* sysdeps/unix/sysv/linux/arm/bits/mman.h (MADV_HUGEPAGE,
+--- a/ports/ChangeLog.eglibc
++++ b/ports/ChangeLog.eglibc
+@@ -1,3 +1,13 @@
++2011-07-06  David Kuehling  <dvdkhlng@gmx.de>
++
++	* ports/sysdeps/powerpc/powerpc32/e500/fpu/s_fma.c,
++	ports/sysdeps/powerpc/powerpc32/e500/fpu/s_fmaf.c: New files.
++
++2011-03-21  Joseph Myers  <joseph@codesourcery.com>
++
++	* sysdeps/arm/eabi/bits/predefs.h: Correct license reference in
++	last paragraph of license notice.
++
+ 2010-10-12  Joseph Myers  <joseph@codesourcery.com>
+ 
+ 	* sysdeps/powerpc/powerpc32/e500/fpu/feupdateenv.c (feupdateenv):
--- eglibc-2.13.orig/debian/patches/README
+++ eglibc-2.13/debian/patches/README
@@ -0,0 +1,20 @@
+For the patch directory we follow this naming scheme:
+
+  {ARCH|all|any}/{local|branch|cvs|submitted|unsubmitted}-"Description"
+  
+Branch means commited in the upstream branch.
+CVS means committed in the upstream trunk.
+Submitted means we're hopeful that it will go in.
+Unsubmitted means we have not submitted upstream yet because patch is not ready
+for upstream yet, but we want to eventually
+Local means that it's not going upstream.
+
+The goal is to get all patches to "Branch".  Patches should be split by
+arch so that it's easy to send just the relevant bits to various
+arch maintainers if needed. 
+
+The difference between 'all' and 'any' is that the latter touches several
+architecture dependent files (usually in the sysdeps directory), whereas
+the former only modifies architecture independent files.  Porters are
+supposed to have an eye on their arch patches and on 'any'.
+
--- eglibc-2.13.orig/debian/patches/series
+++ eglibc-2.13/debian/patches/series
@@ -0,0 +1,405 @@
+svn-updates.diff
+
+locale/check-unknown-symbols.diff
+locale/fix-LC_COLLATE-rules.diff
+locale/preprocessor-collate-uli-sucks.diff
+locale/preprocessor-collate.diff  # should not be needed anymore, but keep it anyways.
+locale/locale-print-LANGUAGE.diff
+locale/LC_IDENTIFICATION-optional-fields.diff
+locale/LC_COLLATE-keywords-ordering.diff
+localedata/local-all-no-archive.diff
+localedata/sort-UTF8-first.diff
+localedata/supported.diff
+localedata/locale-eo_EO.diff
+localedata/locale-eu_FR.diff
+localedata/new-valencian-locale.diff
+localedata/locale-ku_TR.diff
+localedata/tl_PH-yesexpr.diff
+localedata/fo_FO-date_fmt.diff
+localedata/locales_CH.diff
+localedata/locales-fr.diff
+localedata/locales_GB.diff
+localedata/locale-en_DK.diff
+localedata/locale-csb_PL.diff
+localedata/submitted-bz9732-dz_BT-collation.diff
+localedata/locale-ia.diff
+localedata/locale-zh_TW.diff
+localedata/locale-se_NO.diff
+localedata/tailor-iso14651_t1.diff
+localedata/locale-hsb_DE.diff
+localedata/tailor-iso14651_t1-common.diff
+localedata/fix-lang.diff
+localedata/fr_CA-first_weekday.diff
+localedata/fr_CH-first_weekday.diff
+localedata/fr_LU-first_weekday.diff
+localedata/cy_GB-first_weekday.diff
+localedata/locale-de_LI.diff
+localedata/submitted-bz9725-locale-sv_SE.diff
+localedata/first_weekday.diff
+localedata/submitted-bz9912-locale-ru_UA.diff
+localedata/locale-et_EE.diff
+localedata/submitted-translit-colon.diff
+localedata/locale-C.diff
+localedata/locale-bem-en_ZA.diff
+localedata/locale-ff_SN.diff
+localedata/locale-sw.diff
+localedata/locale-sv_FI.diff
+localedata/locale-os_RU.diff
+localedata/cvs-rupee.diff
+localedata/locale-nb_NO.diff
+localedata/cvs-es-lc_numeric.diff
+localedata/submitted-de_AT-mon.diff
+localedata/submitted-en_AU-date_fmt.diff
+localedata/cvs-rupeesign.diff
+localedata/submitted-es_MX-decimal_point.diff
+localedata/cvs-de_AT-Februar.diff
+
+alpha/local-gcc4.1.diff
+alpha/submitted-creat64.diff
+alpha/submitted-dl-support.diff
+alpha/submitted-rtld-fPIC.diff
+alpha/local-lowlevellock.diff
+alpha/submitted-syscall.diff
+alpha/submitted-fcntl_h.diff
+alpha/submitted-stackinfo.diff
+alpha/submitted-statfs.diff
+alpha/submitted-libm-hidden.diff
+alpha/submitted-fxstatat.patch
+alpha/submitted-____longjmp_chk.diff
+alpha/submitted-PTR_MANGLE.diff
+alpha/local-strncmp.diff
+alpha/submitted-sysconf-cache.diff
+alpha/submitted-statfs64.patch
+alpha/submitted-fallocated.diff
+alpha/submitted-epoll_create1.diff
+
+amd64/local-biarch.diff
+amd64/local-clone.diff
+amd64/local-linuxthreads-gscope.diff
+amd64/submitted-tst-audit6-avx.diff
+amd64/submitted-rwlock-stack-imbalance.diff
+amd64/cvs-getcontext.diff
+amd64/cvs-memset.diff
+amd64/cvs-powl.diff
+amd64/cvs-pthread-stack-alignment.diff
+amd64/cvs-avx-detection.diff
+amd64/cvs-dl_trampoline-cfi.diff
+amd64/cvs-avx-osxsave.diff
+
+arm/local-atomic.diff
+arm/local-eabi-wchar.diff
+arm/local-ioperm.diff
+arm/local-lowlevellock.diff
+arm/local-sigaction.diff
+arm/submitted-armhf-triplet.diff
+arm/cvs-clone-cantunwind.diff
+arm/unsubmitted-ldconfig-cache-abi.diff
+arm/unsubmitted-ldso-abi-check.diff
+arm/cvs-syscall-mcount.diff
+arm/cvs-ucontext.diff
+arm/unsubmitted-armhf-linker.diff
+arm/local-soname-hack.diff
+arm/cvs-make-get-set-swap-context.diff
+arm/cvs-ldconfig-cache-abi.diff
+
+hppa/local-inlining.diff
+hppa/local-linuxthreads.diff
+hppa/local-linuxthreads-gscope.diff
+hppa/submitted-fadvise64_64.diff
+hppa/submitted-lt.diff
+hppa/submitted-nptl-carlos.diff
+hppa/local-stack-grows-up.diff
+hppa/local-dlfptr.diff
+hppa/local-longjmp-chk.diff
+hppa/local-lowlevellock.diff
+hppa/submitted-fcntl_h.diff
+hppa/submitted-libm-hidden.diff
+hppa/cvs-stackinfo.diff
+hppa/local-EAGAIN.diff
+hppa/cvs-sys_procfs_h.diff
+hppa/cvs-test-tls-support.diff
+hppa/cvs-cloexec-nonblock.diff
+hppa/cvs-prlimit64.diff
+
+hurd-i386/local-dl-dynamic-weak.diff
+hurd-i386/local-enable-ldconfig.diff
+hurd-i386/cvs-mlock.diff
+hurd-i386/unsubmitted-tls.diff
+hurd-i386/tg-tls.diff
+hurd-i386/tg-tlsdesc.sym.diff
+hurd-i386/unsubmitted-gcc-4.1-init-first.diff
+hurd-i386/cvs-posix_opt.h.diff
+hurd-i386/cvs-ioctl-decode-argument.diff
+hurd-i386/tg-libc_once.diff
+hurd-i386/tg-ptrmangle.diff
+hurd-i386/cvs-struct_stat.diff
+hurd-i386/cvs-strtoul_PLT.diff
+hurd-i386/tg-sysvshm.diff
+hurd-i386/tg-ioctl-base-types.diff
+hurd-i386/tg-regenerate_errno.h.diff
+hurd-i386/cvs-IPV6_PKTINFO.diff
+hurd-i386/tg-extern_inline.diff
+hurd-i386/cvs-critical-sections.diff
+hurd-i386/cvs-dup3.diff
+hurd-i386/cvs-dup3-lock.diff
+hurd-i386/tg-check_native.diff
+hurd-i386/cvs-dl-sysdep.c_SHARED.diff
+hurd-i386/cvs-itimer-lock.diff
+hurd-i386/tg-_dl_random.diff
+hurd-i386/cvs-null-pathname.diff
+hurd-i386/cvs-sbrk.diff
+hurd-i386/tg-thread-cancel.diff
+hurd-i386/cvs-readlinkat.diff
+hurd-i386/cvs-SOL_IP.diff
+hurd-i386/tg-bigmem.diff
+hurd-i386/local-disable-ioctls.diff
+hurd-i386/cvs-____longjmp_chk.diff
+hurd-i386/tg-locarchive.diff
+hurd-i386/submitted-regex_internal.diff
+hurd-i386/cvs-mkdir_root.diff
+hurd-i386/tg-__i686_defined.diff
+hurd-i386/tg-no-hp-timing.diff
+hurd-i386/cvs-catch-signal.diff
+hurd-i386/tg-sendmsg-SCM_RIGHTS.diff
+hurd-i386/cvs-header-prot.diff
+hurd-i386/cvs-psiginfo.diff
+hurd-i386/tg-grantpt.diff
+hurd-i386/cvs-if_freereq.diff
+hurd-i386/submitted-add-needed.diff
+hurd-i386/local-ED.diff
+hurd-i386/unsubmitted-pthread_posix-option.diff
+hurd-i386/local-madvise_warn.diff
+hurd-i386/cvs-ldsodefs.h.diff
+hurd-i386/tg-elfosabi_gnu.diff
+hurd-i386/submitted-init-first.diff
+hurd-i386/tg-hurdsig-fixes.diff
+hurd-i386/tg-hurdsig-global-dispositions.diff
+hurd-i386/local-hurdsig-global-dispositions-version.diff
+hurd-i386/tg-hurdsig-SA_SIGINFO.diff
+hurd-i386/tg-hurdsig-fixes-2.diff
+hurd-i386/cvs-libc_stack_end.diff
+hurd-i386/tg-ttyname_ERANGE.diff
+hurd-i386/cvs-DEV_BSIZE.diff
+hurd-i386/cvs-fork_ports.diff
+hurd-i386/cvs-setresid.diff
+hurd-i386/cvs-sgttyb.diff
+hurd-i386/cvs-hurd_socket_server_indexcheck.diff
+hurd-i386/cvs-hurd-recvfrom.diff
+hurd-i386/cvs-select-inputcheck.diff
+hurd-i386/local-select.diff
+hurd-i386/cvs-posix2008.diff
+hurd-i386/cvs-mach-nanosleep.diff
+hurd-i386/cvs-mmap.diff
+hurd-i386/cvs-hurd-socket-EAFNOSUPPORT.diff
+hurd-i386/cvs-symlink_dealloc.diff
+hurd-i386/tg-hooks.diff
+hurd-i386/libpthread.diff
+hurd-i386/libpthread_fix.diff
+hurd-i386/libpthread_globsigdisp.diff
+hurd-i386/libpthread_sigmask.diff
+hurd-i386/libpthread_stubs.diff
+hurd-i386/libpthread_clean.diff
+hurd-i386/tg-libpthread_depends.diff
+hurd-i386/libpthread_nort.diff
+hurd-i386/libpthread_version.diff
+hurd-i386/cvs-O_CLOEXEC.diff
+hurd-i386/submitted-getgroups.diff
+hurd-i386/submitted-getlogin_r.diff
+hurd-i386/submitted-ptsname.diff
+hurd-i386/submitted-sendto.diff
+hurd-i386/tg-chflags.diff
+hurd-i386/submitted-exec_filename.diff
+hurd-i386/unsubmitted-gnumach.defs.diff
+hurd-i386/submitted-fork_port_leak.diff
+hurd-i386/libpthread_hurd_cond_wait.diff
+hurd-i386/tg-hurdsig-boot-fix.diff
+hurd-i386/unsubmitted-single-hurdselect-timeout.diff
+hurd-i386/unsubmitted-setitimer_fix.diff
+
+kfreebsd/submitted-libc_once.diff
+kfreebsd/local-getaddrinfo-freebsd-kernel.diff
+
+ia64/local-dlfptr.diff
+ia64/submitted-sysconf.diff
+ia64/submitted-libm.diff
+
+i386/local-biarch.diff
+i386/local-clone.diff
+i386/local-cmov.diff
+i386/local-cpuid-level2.diff
+i386/local-linuxthreads-gscope.diff
+i386/local-pthread_cond_wait.diff
+i386/submitted-i686-timing.diff
+i386/cvs-cacheinfo.diff
+
+m68k/local-compat.diff
+m68k/local-dwarf2-buildfix.diff
+m68k/local-fpic.diff
+# m68k/local-mathinline_h.diff
+m68k/local-reloc.diff
+m68k/submitted-gcc34-seccomment.diff
+m68k/cvs-byteswap.diff
+
+mips/local-lowlevellock.diff
+mips/local-r10k.diff
+mips/submitted-rld_map.diff
+mips/submitted-dl-platform.diff
+mips/cvs-dlopen-lazy.diff
+mips/cvs-prlimit64.diff
+mips/cvs-backtrace.diff
+
+powerpc/local-libgcc_eh-ld.so.diff
+
+s390/submitted-nexttowardf.diff
+s390/cvs-iconv-z9-109.diff
+s390/cvs-vsyscalls.diff
+s390/cvs-libm-ulps.diff
+
+sparc/local-fork.diff
+sparc/local-sparcv9-target.diff
+sparc/submitted-timing.diff
+sparc/submitted-bzero.diff
+sparc/cvs-ifunc.diff
+sparc/cvs-rlimits.diff
+sparc/cvs-fcntl_h.diff
+
+all/local-alias-UTF-8.diff
+all/local-alias-et_EE.diff
+all/local-pthread-manpages.diff
+all/local-remove-manual.diff
+all/local-ru_RU.diff
+all/local-ldd.diff
+all/local-nis-shadow.diff
+
+any/local-asserth-decls.diff
+any/local-bindresvport_blacklist.diff
+any/local-allocalim-header.diff
+any/local-fhs-linux-paths.diff
+any/local-fhs-nscd.diff
+# any/local-ipv6-lookup.diff -p1               # has issues
+any/local-ld-multiarch.diff
+any/local-ldso-disable-hwcap.diff
+any/local-ldconfig.diff
+any/local-ldconfig-fsync.diff
+any/local-libgcc-compat-main.diff
+any/local-libgcc-compat-ports.diff
+any/local-linuxthreads-defines.diff
+any/local-linuxthreads-fd.diff
+any/local-linuxthreads-gscope.diff
+any/local-linuxthreads-kill_other.diff
+any/local-linuxthreads-lowlevellock.diff
+any/local-linuxthreads-fatalprepare.diff
+any/local-linuxthreads-ptw.diff
+any/local-linuxthreads-semaphore_h.diff
+any/local-linuxthreads-signals.diff
+any/local-linuxthreads-stacksize.diff
+any/local-linuxthreads-tst-sighandler.diff
+any/local-linuxthreads-unwind.diff
+any/local-linuxthreads-weak.diff
+any/local-localedef-fix-trampoline.diff
+any/local-mktemp.diff
+any/local-no-pagesize.diff
+any/local-nss-upgrade.diff
+any/local-o_cloexec.diff
+any/local-rtld.diff
+any/local-stubs_h.diff
+any/local-stdio-lock.diff
+any/local-tcsetaddr.diff
+any/local-disable-test-tgmath2.diff
+any/local-tst-mktime2.diff
+any/submitted-nis-netgrp.diff
+any/submitted-clock-settime.diff
+any/submitted-longdouble.diff
+any/cvs-sched_h.diff
+#any/submitted-fileops-and-signals.diff		# has issues
+any/local-missing-linux_types.h.diff
+any/local-nss-overflow.diff
+any/submitted-popen.diff
+any/local-linuxthreads-thread_self.diff
+#any/local-disable-gethostbyname4.diff
+any/submitted-getaddrinfo-lo.diff
+any/local-getaddrinfo-interface.diff
+any/submitted-autotools.diff
+any/submitted-accept4-hidden.diff
+any/submitted-localedef-mmap.diff
+any/submitted-missing-etc-hosts.diff
+any/submitted-bits-fcntl_h-at.diff
+any/local-no-SOCK_NONBLOCK.diff
+any/submitted-stack-guard-quick-randomization.diff
+any/submitted-leading-zero-stack-guard.diff
+any/submitted-nptl-invalid-td.patch
+any/local-gai-rfc1918-scope-global.patch
+any/local-dlfptr.diff
+any/submitted-string2-strcmp.diff
+any/submitted-ldsodefs_rtld_debug.diff
+any/local-relro-mprotect.diff
+any/local-linuxthreads-deps.diff
+any/local-ldconfig-multiarch.diff
+any/cvs-fopen.diff
+any/submitted-fwrite-wur.diff
+any/cvs-resolv-tld.diff
+any/cvs-sys-param-ARG_MAX.diff
+any/submitted-at-pagesize.diff
+any/cvs-setlocale.diff
+any/submitted-rlimit-rttime.diff
+any/local-tst-writev.diff
+any/cvs-regex-oom.diff
+any/cvs-getaddrinfo-single-lookup.diff
+any/cvs-unique_sym_table-corruptions.diff
+any/submitted-mqueue-throw.diff
+any/cvs-addmntent.diff
+any/cvs-resolv-different-nameserver.diff
+any/submitted-resolv-assert.diff
+any/cvs-fnmatch.diff
+any/cvs-ifunc.diff
+any/submitted-resolv-init.diff
+powerpc/submitted-ifunc.diff
+any/cvs-dlopen-tls.diff
+any/submitted-glob_h-ifdef.diff
+any/cvs-dl_close-scope-handling.diff
+any/cvs-nptl-pthread-race.diff
+any/local-linuxthreads-XPG7.diff
+any/cvs-tzfile.diff
+any/cvs-vfscanf.diff
+any/cvs-fmtmsg-lock.diff
+any/cvs-reloc-sort.diff
+any/submitted-resolv-first-query-failure.diff
+any/cvs-getaddrinfo-AI_V4MAPPED.diff
+any/local-linuxthreads-setclock.diff
+any/cvs-FORTIFY_SOURCE-format-strings.diff
+any/cvs-regex.diff
+any/cvs-getpwuid-nsswitch.diff
+any/local-sunrpc-dos.diff
+any/cvs-ld.so-rpath-origin.diff
+any/cvs-pthread-builtin-expect.diff
+any/cvs-vfprintf-positional.diff
+any/cvs-vfprintf-many-format-strings.diff
+any/cvs-strtod-overflow.diff
+any/cvs-arch-lowlevellock.diff
+any/local-tst-eintr1-eagain.diff
+any/cvs-CVE-2012-44xx.diff
+any/cvs-CVE-2013-0242.diff
+any/cvs-CVE-2013-1914.diff
+any/cvs-CVE-2013-4237.diff
+any/cvs-CVE-2013-4332.diff
+any/cvs-CVE-2013-4458.diff
+any/cvs-CVE-2013-4788.diff
+any/cvs-findlocale-div-by-zero.diff
+any/local-ldconfig-ignore-ld.so.diff
+any/cvs-nl_langinfo-static.diff
+any/cvs-socketcall-syscall.diff
+any/submitted-setlocale-alloca.diff
+any/submitted-CVE-2014-0475.diff
+any/cvs-CVE-2014-5119.diff
+any/cvs-resolv-reuse-fd.diff
+any/cvs-CVE-2013-4357.diff
+any/cvs-dlopen-tls-memleak.patch
+any/cvs-gethostbyname.diff
+any/cvs-iconvdata-ibm930.diff
+any/cvs-iconvdata-ibm.diff
+any/cvs-wordexp.diff
+any/cvs-wscanf.diff
+any/cvs-vfprintf.diff
+any/cvs-posix_spawn_file_actions_addopen.diff
+any/cvs-getnetbyname.diff
+any/cvs-getaddrinfo-idn.diff
--- eglibc-2.13.orig/debian/patches/series.kfreebsd-amd64
+++ eglibc-2.13/debian/patches/series.kfreebsd-amd64
@@ -0,0 +1,12 @@
+kfreebsd/local-config_h_in.patch
+kfreebsd/local-grantpt.diff
+kfreebsd/local-linuxthreads29.diff
+kfreebsd/local-nosavesse.diff
+kfreebsd/local-memusage_no_mremap.diff
+kfreebsd/local-pthread_at_fork.diff
+kfreebsd/local-scripts.diff
+kfreebsd/local-sys_queue_h.diff
+kfreebsd/local-sysdeps.diff
+kfreebsd/local-undef-glibc.diff
+kfreebsd/local-use-thr-primitives.diff
+kfreebsd/local-initgroups-order.diff
--- eglibc-2.13.orig/debian/patches/series.kfreebsd-i386
+++ eglibc-2.13/debian/patches/series.kfreebsd-i386
@@ -0,0 +1,12 @@
+kfreebsd/local-config_h_in.patch
+kfreebsd/local-grantpt.diff
+kfreebsd/local-linuxthreads29.diff
+kfreebsd/local-nosavesse.diff
+kfreebsd/local-memusage_no_mremap.diff
+kfreebsd/local-pthread_at_fork.diff
+kfreebsd/local-scripts.diff
+kfreebsd/local-sys_queue_h.diff
+kfreebsd/local-sysdeps.diff
+kfreebsd/local-undef-glibc.diff
+kfreebsd/local-use-thr-primitives.diff
+kfreebsd/local-initgroups-order.diff
--- eglibc-2.13.orig/debian/patches/powerpc/submitted-ifunc.diff
+++ eglibc-2.13/debian/patches/powerpc/submitted-ifunc.diff
@@ -0,0 +1,51 @@
+2011-07-04  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/powerpc/dl-tls.h: Add _PPC_DL_TLS_H inclusion
+	protection macro.
+	* sysdeps/powerpc/powerpc64/dl-irel.h(Elf64_FuncDesc): include
+	<ldsodefs.h> and <dl-machine.h>.
+	* sysdeps/powerpc/powerpc64/dl-irel.h(Elf64_FuncDesc): remove.
+
+---
+ sysdeps/powerpc/dl-tls.h            |    4 ++++
+ sysdeps/powerpc/powerpc64/dl-irel.h |    9 ++-------
+ 2 files changed, 6 insertions(+), 7 deletions(-)
+
+--- a/sysdeps/powerpc/dl-tls.h
++++ b/sysdeps/powerpc/dl-tls.h
+@@ -17,6 +17,8 @@
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
++#ifndef _PPC_DL_TLS_H
++# define _PPC_DL_TLS_H 1
+ 
+ /* Type used for the representation of TLS information in the TOC.  */
+ typedef struct
+@@ -47,3 +49,5 @@
+ # define GET_ADDR_OFFSET	(ti->ti_offset + TLS_DTV_OFFSET)
+ # define __TLS_GET_ADDR(__ti)	(__tls_get_addr (__ti) - TLS_DTV_OFFSET)
+ #endif
++
++#endif /* dl-tls.h */
+--- a/sysdeps/powerpc/powerpc64/dl-irel.h
++++ b/sysdeps/powerpc/powerpc64/dl-irel.h
+@@ -23,16 +23,11 @@
+ 
+ #include <stdio.h>
+ #include <unistd.h>
++#include <ldsodefs.h>
++#include <dl-machine.h>
+ 
+ #define ELF_MACHINE_IRELA	1
+ 
+-typedef struct
+-{
+-  Elf64_Addr fd_func;
+-  Elf64_Addr fd_toc;
+-  Elf64_Addr fd_aux;
+-} Elf64_FuncDesc;
+-
+ static inline Elf64_Addr
+ __attribute ((always_inline))
+ elf_ifunc_invoke (Elf64_Addr addr)
--- eglibc-2.13.orig/debian/patches/powerpc/local-libgcc_eh-ld.so.diff
+++ eglibc-2.13/debian/patches/powerpc/local-libgcc_eh-ld.so.diff
@@ -0,0 +1,25 @@
+On PowerPC, unwind-dw2 needs __libc_stack_end to find the AUX
+Vector AT_HWCAP. The HWCAP is required to check for the presence of FPU
+or Altivec registers.  But `__libc_stack_end' is only exported by ld.so
+and ld.so is not included in this link.
+
+This seems to be a gcc-4.4 bug, not reproducible with gcc-4.5. It should
+probably be removed at some point.
+
+diff a/dlfcn/Makefile b/dlfcn/Makefile
+---
+ dlfcn/Makefile |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/dlfcn/Makefile
++++ b/dlfcn/Makefile
+@@ -130,7 +130,8 @@
+ $(objpfx)bug-atexit2: $(libdl)
+ $(objpfx)bug-atexit2.out: $(objpfx)bug-atexit2-lib.so
+ 
+-LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh $(common-objpfx)libc_nonshared.a
++LDLIBS-bug-atexit3-lib.so = -lstdc++ -lgcc_eh $(common-objpfx)libc_nonshared.a \
++			    $(elfobjdir)/ld.so
+ $(objpfx)bug-atexit3: $(libdl)
+ $(objpfx)bug-atexit3.out: $(objpfx)bug-atexit3-lib.so
+ 
--- eglibc-2.13.orig/debian/patches/any/local-base.diff
+++ eglibc-2.13/debian/patches/any/local-base.diff
@@ -0,0 +1,64 @@
+# All lines beginning with `# DP:' are a description of the patch.
+# DP: Description: hjl libc-base patch
+ 
+2003-05-15  <hongjiu.lu@intel.com>
+
+	* elf/do-lookup.h (FCT): Try the base version, the first
+	version and then the default version, in that order, for
+	the old unversioned reference.
+
+--- elf/do-lookup.h.base	2003-05-15 09:29:25.000000000 -0700
++++ elf/do-lookup.h	2003-05-15 09:24:24.000000000 -0700
+@@ -52,7 +52,8 @@ FCT (const char *undef_name, unsigned lo
+       const ElfW(Sym) *sym;
+ #if ! VERSIONED
+       int num_versions = 0;
+-      const ElfW(Sym) *versioned_sym = NULL;
++      const ElfW(Sym) *default_version = NULL;
++      const ElfW(Sym) *first_version = NULL;
+ #endif
+ 
+       map = list[i];
+@@ -155,16 +156,29 @@ FCT (const char *undef_name, unsigned lo
+ 	     public interface should be returned.  */
+ 	  if (verstab != NULL)
+ 	    {
+-	      if ((verstab[symidx] & 0x7fff)
+-		  >= ((flags & DL_LOOKUP_RETURN_NEWEST) ? 2 : 3))
++	      ElfW(Half) ndx = verstab[symidx] & 0x7fff;
++	      if (ndx >= ((flags & DL_LOOKUP_RETURN_NEWEST) ? 2 : 3))
+ 		{
+ 		  /* Don't accept hidden symbols.  */
+ 		  if ((verstab[symidx] & 0x8000) == 0 && num_versions++ == 0)
+ 		    /* No version so far.  */
+-		    versioned_sym = sym;
++		    default_version = sym;
+ 
+ 		  continue;
+ 		}
++	      if ((flags & DL_LOOKUP_RETURN_NEWEST) == 0 && ndx != 0)
++		{
++		  /* ndx == 1 is the base version. We will use it for
++		     old unversioned application.  */
++		  if (ndx != 1)
++		    {
++		      /* We remember the first version and keep looking
++			 for the base version.  */
++		      if (ndx == 2)
++			first_version = sym;
++		      continue;
++		    }
++		}
+ 	    }
+ #endif
+ 
+@@ -179,7 +193,8 @@ FCT (const char *undef_name, unsigned lo
+ #if VERSIONED
+       sym = NULL;
+ #else
+-      sym = num_versions == 1 ? versioned_sym : NULL;
++      sym = first_version ?: (num_versions == 1
++			      ? default_version : NULL);
+ #endif
+ 
+       if (sym != NULL)
--- eglibc-2.13.orig/debian/patches/any/cvs-CVE-2013-1914.diff
+++ eglibc-2.13/debian/patches/any/cvs-CVE-2013-1914.diff
@@ -0,0 +1,48 @@
+2013-04-03  Andreas Schwab  <schwab@suse.de>
+
+	[BZ #15330]
+	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Allocate results and
+	order arrays from heap if bigger than alloca cutoff.
+
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -2207,11 +2207,27 @@
+       __typeof (once) old_once = once;
+       __libc_once (once, gaiconf_init);
+       /* Sort results according to RFC 3484.  */
+-      struct sort_result results[nresults];
+-      size_t order[nresults];
++      struct sort_result *results;
++      size_t *order;
+       struct addrinfo *q;
+       struct addrinfo *last = NULL;
+       char *canonname = NULL;
++      bool malloc_results;
++
++      malloc_results
++	= !__libc_use_alloca (nresults * (sizeof (*results) + sizeof (size_t)));
++      if (malloc_results)
++	{
++	  results = malloc (nresults * (sizeof (*results) + sizeof (size_t)));
++	  if (results == NULL)
++	    {
++	      free (in6ai);
++	      return EAI_MEMORY;
++	    }
++	}
++      else
++	results = alloca (nresults * (sizeof (*results) + sizeof (size_t)));
++      order = (size_t *) (results + nresults);
+ 
+       /* If we have information about deprecated and temporary addresses
+ 	 sort the array now.  */
+@@ -2397,6 +2413,9 @@
+ 
+       /* Fill in the canonical name into the new first entry.  */
+       p->ai_canonname = canonname;
++
++      if (malloc_results)
++	free (results);
+     }
+ 
+   free (in6ai);
--- eglibc-2.13.orig/debian/patches/any/cvs-posix_spawn_file_actions_addopen.diff
+++ eglibc-2.13/debian/patches/any/cvs-posix_spawn_file_actions_addopen.diff
@@ -0,0 +1,135 @@
+2014-06-12  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
+	* posix/spawn_faction_addopen.c: Include string.h.
+
+2014-06-11  Florian Weimer  <fweimer@redhat.com>
+
+	[BZ #17048]
+	* posix/spawn_int.h (struct __spawn_action): Make the path string
+	non-const to support deallocation.
+	* posix/spawn_faction_addopen.c
+	(posix_spawn_file_actions_addopen): Make a copy of the pathname.
+	* posix/spawn_faction_destroy.c
+	(posix_spawn_file_actions_destroy): Adjust comment.  Deallocate
+	path in all spawn_do_open actions.
+	* posix/tst-spawn.c (do_test): Exercise the copy operation in
+	posix_spawn_file_actions_addopen.
+
+--- a/posix/spawn_faction_addopen.c
++++ b/posix/spawn_faction_addopen.c
+@@ -19,6 +19,7 @@
+ #include <errno.h>
+ #include <spawn.h>
+ #include <unistd.h>
++#include <string.h>
+ 
+ #include "spawn_int.h"
+ 
+@@ -36,17 +37,24 @@
+   if (fd < 0 || fd >= maxfd)
+     return EBADF;
+ 
++  char *path_copy = strdup (path);
++  if (path_copy == NULL)
++    return ENOMEM;
++
+   /* Allocate more memory if needed.  */
+   if (file_actions->__used == file_actions->__allocated
+       && __posix_spawn_file_actions_realloc (file_actions) != 0)
+-    /* This can only mean we ran out of memory.  */
+-    return ENOMEM;
++    {
++      /* This can only mean we ran out of memory.  */
++      free (path_copy);
++      return ENOMEM;
++    }
+ 
+   /* Add the new value.  */
+   rec = &file_actions->__actions[file_actions->__used];
+   rec->tag = spawn_do_open;
+   rec->action.open_action.fd = fd;
+-  rec->action.open_action.path = path;
++  rec->action.open_action.path = path_copy;
+   rec->action.open_action.oflag = oflag;
+   rec->action.open_action.mode = mode;
+ 
+--- a/posix/spawn_faction_destroy.c
++++ b/posix/spawn_faction_destroy.c
+@@ -19,11 +19,29 @@
+ #include <spawn.h>
+ #include <stdlib.h>
+ 
+-/* Initialize data structure for file attribute for `spawn' call.  */
++#include "spawn_int.h"
++
++/* Deallocate the file actions.  */
+ int
+ posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *file_actions)
+ {
+-  /* Free the memory allocated.  */
++  /* Free the paths in the open actions.  */
++  for (int i = 0; i < file_actions->__used; ++i)
++    {
++      struct __spawn_action *sa = &file_actions->__actions[i];
++      switch (sa->tag)
++	{
++	case spawn_do_open:
++	  free (sa->action.open_action.path);
++	  break;
++	case spawn_do_close:
++	case spawn_do_dup2:
++	  /* No cleanup required.  */
++	  break;
++	}
++    }
++
++  /* Free the array of actions.  */
+   free (file_actions->__actions);
+   return 0;
+ }
+--- a/posix/spawn_int.h
++++ b/posix/spawn_int.h
+@@ -22,7 +22,7 @@
+     struct
+     {
+       int fd;
+-      const char *path;
++      char *path;
+       int oflag;
+       mode_t mode;
+     } open_action;
+--- a/posix/tst-spawn.c
++++ b/posix/tst-spawn.c
+@@ -169,6 +169,7 @@
+   char fd2name[18];
+   char fd3name[18];
+   char fd4name[18];
++  char *name3_copy;
+   char *spargv[12];
+ 
+   /* We must have
+@@ -222,9 +223,15 @@
+    if (posix_spawn_file_actions_addclose (&actions, fd1) != 0)
+      error (EXIT_FAILURE, errno, "posix_spawn_file_actions_addclose");
+    /* We want to open the third file.  */
+-   if (posix_spawn_file_actions_addopen (&actions, fd3, name3,
++   name3_copy = strdup (name3);
++   if (name3_copy == NULL)
++     error (EXIT_FAILURE, errno, "strdup");
++   if (posix_spawn_file_actions_addopen (&actions, fd3, name3_copy,
+ 					 O_RDONLY, 0666) != 0)
+      error (EXIT_FAILURE, errno, "posix_spawn_file_actions_addopen");
++   /* Overwrite the name to check that a copy has been made.  */
++   memset (name3_copy, 'X', strlen (name3_copy));
++
+    /* We dup the second descriptor.  */
+    fd4 = MAX (2, MAX (fd1, MAX (fd2, fd3))) + 1;
+    if (posix_spawn_file_actions_adddup2 (&actions, fd2, fd4) != 0)
+@@ -255,6 +262,7 @@
+    /* Cleanup.  */
+    if (posix_spawn_file_actions_destroy (&actions) != 0)
+      error (EXIT_FAILURE, errno, "posix_spawn_file_actions_destroy");
++   free (name3_copy);
+ 
+   /* Wait for the child.  */
+   if (waitpid (pid, &status, 0) != pid)
--- eglibc-2.13.orig/debian/patches/any/local-no-pagesize.diff
+++ eglibc-2.13/debian/patches/any/local-no-pagesize.diff
@@ -0,0 +1,116 @@
+---
+ ports/sysdeps/unix/sysv/linux/mips/sys/user.h |    4 ++--
+ sysdeps/unix/sysv/linux/check_native.c        |    6 ------
+ sysdeps/unix/sysv/linux/check_pf.c            |    6 ------
+ sysdeps/unix/sysv/linux/ia64/sys/user.h       |    3 ++-
+ sysdeps/unix/sysv/linux/ifaddrs.c             |    6 ------
+ sysdeps/unix/sysv/linux/x86_64/sys/user.h     |    4 ++--
+ 6 files changed, 6 insertions(+), 23 deletions(-)
+
+--- a/sysdeps/unix/sysv/linux/ia64/sys/user.h
++++ b/sysdeps/unix/sysv/linux/ia64/sys/user.h
+@@ -21,6 +21,7 @@
+ 
+ #include <features.h>
+ #include <sys/types.h>
++#include <unistd.h>
+ 
+ /* This definition comes directly from the kernel headers.  If
+    anything changes in them this header has to be changed, too.  */
+@@ -45,7 +46,7 @@
+   char u_comm[32];				/* User command name.  */
+ };
+ 
+-#define NBPG			PAGE_SIZE
++#define NBPG			(sysconf(_SC_PAGESIZE))
+ #define UPAGES			1
+ #define HOST_TEXT_START_ADDR	(u.start_code)
+ #define HOST_DATA_START_ADDR	(u.start_data)
+--- a/ports/sysdeps/unix/sysv/linux/mips/sys/user.h
++++ b/ports/sysdeps/unix/sysv/linux/mips/sys/user.h
+@@ -20,6 +20,7 @@
+ #define _SYS_USER_H	1
+ 
+ #include <sgidefs.h>
++#include <unistd.h>
+ 
+ /* The whole purpose of this file is for GDB and GDB only.  Don't read
+    too much into it.  Don't use it for anything other than GDB unless
+@@ -207,8 +208,7 @@
+ 
+ #endif
+ 
+-#define PAGE_SHIFT		12
+-#define PAGE_SIZE		(1UL << PAGE_SHIFT)
++#define PAGE_SIZE		(sysconf(_SC_PAGESIZE))
+ #define PAGE_MASK		(~(PAGE_SIZE-1))
+ #define NBPG			PAGE_SIZE
+ #define UPAGES			1
+--- a/sysdeps/unix/sysv/linux/x86_64/sys/user.h
++++ b/sysdeps/unix/sysv/linux/x86_64/sys/user.h
+@@ -24,6 +24,7 @@
+    you know what you are doing.  */
+ 
+ #include <bits/wordsize.h>
++#include <unistd.h>
+ 
+ #if __WORDSIZE == 64
+ 
+@@ -164,8 +165,7 @@
+ };
+ #endif  /* __WORDSIZE */
+ 
+-#define PAGE_SHIFT		12
+-#define PAGE_SIZE		(1UL << PAGE_SHIFT)
++#define PAGE_SIZE		(sysconf(_SC_PAGESIZE))
+ #define PAGE_MASK		(~(PAGE_SIZE-1))
+ #define NBPG			PAGE_SIZE
+ #define UPAGES			1
+--- a/sysdeps/unix/sysv/linux/check_native.c
++++ b/sysdeps/unix/sysv/linux/check_native.c
+@@ -77,13 +77,7 @@
+   memset (&nladdr, '\0', sizeof (nladdr));
+   nladdr.nl_family = AF_NETLINK;
+ 
+-#ifdef PAGE_SIZE
+-  /* Help the compiler optimize out the malloc call if PAGE_SIZE
+-     is constant and smaller or equal to PTHREAD_STACK_MIN/4.  */
+-  const size_t buf_size = PAGE_SIZE;
+-#else
+   const size_t buf_size = __getpagesize ();
+-#endif
+   bool use_malloc = false;
+   char *buf;
+ 
+--- a/sysdeps/unix/sysv/linux/check_pf.c
++++ b/sysdeps/unix/sysv/linux/check_pf.c
+@@ -73,13 +73,7 @@
+   memset (&nladdr, '\0', sizeof (nladdr));
+   nladdr.nl_family = AF_NETLINK;
+ 
+-#ifdef PAGE_SIZE
+-  /* Help the compiler optimize out the malloc call if PAGE_SIZE
+-     is constant and smaller or equal to PTHREAD_STACK_MIN/4.  */
+-  const size_t buf_size = PAGE_SIZE;
+-#else
+   const size_t buf_size = __getpagesize ();
+-#endif
+   bool use_malloc = false;
+   char *buf;
+ 
+--- a/sysdeps/unix/sysv/linux/ifaddrs.c
++++ b/sysdeps/unix/sysv/linux/ifaddrs.c
+@@ -144,13 +144,7 @@
+   ssize_t read_len;
+   bool done = false;
+ 
+-#ifdef PAGE_SIZE
+-  /* Help the compiler optimize out the malloc call if PAGE_SIZE
+-     is constant and smaller or equal to PTHREAD_STACK_MIN/4.  */
+-  const size_t buf_size = PAGE_SIZE;
+-#else
+   const size_t buf_size = __getpagesize ();
+-#endif
+   bool use_malloc = false;
+   char *buf;
+ 
--- eglibc-2.13.orig/debian/patches/any/cvs-ifunc.diff
+++ eglibc-2.13/debian/patches/any/cvs-ifunc.diff
@@ -0,0 +1,321 @@
+2011-06-30  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/generic/dl-irel.h: fix protection against multiple
+	inclusions.
+	* sysdeps/generic/dl-irel.h (elf_ifunc_invoke): New.
+
+2011-06-20  David S. Miller  <davem@davemloft.net>
+
+	* sysdeps/sparc/sparc32/dl-plt.h: Protect against multiple
+	inclusions.
+	* sysdeps/sparc/sparc64/dl-plt.h: Likewise.
+
+	* sysdeps/i386/dl-irel.h (elf_ifunc_invoke): New.
+	(elf_irel): Use it.
+	* sysdeps/powerpc/powerpc32/dl-irel.h: Likewise.
+	* sysdeps/powerpc/powerpc64/dl-irel.h: Likewise.
+	* sysdeps/sparc/sparc32/dl-irel.h: Likewise.
+	* sysdeps/sparc/sparc64/dl-irel.h: Likewise.
+	* sysdeps/x86_64/dl-irel.h: Likewise.
+
+	* elf/dl-runtime.c: Use elf_ifunc_invoke.
+	* elf/dl-sym.c: Likewise.
+
+---
+ elf/dl-runtime.c                    |    9 ++++-----
+ elf/dl-sym.c                        |    4 ++--
+ sysdeps/generic/dl-irel.h           |    9 ++++++++-
+ sysdeps/i386/dl-irel.h              |    9 ++++++++-
+ sysdeps/powerpc/powerpc32/dl-irel.h |    9 ++++++++-
+ sysdeps/powerpc/powerpc64/dl-irel.h |   11 +++++++++--
+ sysdeps/sparc/sparc32/dl-irel.h     |   11 +++++++++--
+ sysdeps/sparc/sparc32/dl-plt.h      |    5 +++++
+ sysdeps/sparc/sparc64/dl-irel.h     |   11 +++++++++--
+ sysdeps/sparc/sparc64/dl-plt.h      |    5 +++++
+ sysdeps/x86_64/dl-irel.h            |    9 ++++++++-
+ 11 files changed, 75 insertions(+), 17 deletions(-)
+
+--- a/elf/dl-runtime.c
++++ b/elf/dl-runtime.c
+@@ -27,6 +27,7 @@
+ #include <sysdep-cancel.h>
+ #include "dynamic-link.h"
+ #include <tls.h>
++#include <dl-irel.h>
+ 
+ 
+ #if (!defined ELF_MACHINE_NO_RELA && !defined ELF_MACHINE_PLT_REL) \
+@@ -146,7 +147,7 @@
+ 
+   if (sym != NULL
+       && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0))
+-    value = ((DL_FIXUP_VALUE_TYPE (*) (void)) DL_FIXUP_VALUE_ADDR (value)) ();
++    value = elf_ifunc_invoke (DL_FIXUP_VALUE_ADDR (value));
+ 
+   /* Finally, fix up the plt itself.  */
+   if (__builtin_expect (GLRO(dl_bind_not), 0))
+@@ -235,8 +236,7 @@
+ 	  if (defsym != NULL
+ 	      && __builtin_expect (ELFW(ST_TYPE) (defsym->st_info)
+ 				   == STT_GNU_IFUNC, 0))
+-	    value = ((DL_FIXUP_VALUE_TYPE (*) (void))
+-		     DL_FIXUP_VALUE_ADDR (value)) ();
++	    value = elf_ifunc_invoke (DL_FIXUP_VALUE_ADDR (value));
+ 	}
+       else
+ 	{
+@@ -246,8 +246,7 @@
+ 
+ 	  if (__builtin_expect (ELFW(ST_TYPE) (refsym->st_info)
+ 				== STT_GNU_IFUNC, 0))
+-	    value = ((DL_FIXUP_VALUE_TYPE (*) (void))
+-		     DL_FIXUP_VALUE_ADDR (value)) ();
++	    value = elf_ifunc_invoke (DL_FIXUP_VALUE_ADDR (value));
+ 
+ 	  result = l;
+ 	}
+--- a/elf/dl-sym.c
++++ b/elf/dl-sym.c
+@@ -27,6 +27,7 @@
+ #include <dl-hash.h>
+ #include <sysdep-cancel.h>
+ #include <dl-tls.h>
++#include <dl-irel.h>
+ 
+ 
+ #ifdef SHARED
+@@ -196,8 +197,7 @@
+ 	{
+ 	  DL_FIXUP_VALUE_TYPE fixup
+ 	    = DL_FIXUP_MAKE_VALUE (result, (ElfW(Addr)) value);
+-	  fixup =
+-	    ((DL_FIXUP_VALUE_TYPE (*) (void)) DL_FIXUP_VALUE_ADDR (fixup)) ();
++	  fixup = elf_ifunc_invoke (DL_FIXUP_VALUE_ADDR (fixup));
+ 	  value = (void *) DL_FIXUP_VALUE_CODE_ADDR (fixup);
+ 	}
+ 
+--- a/sysdeps/i386/dl-irel.h
++++ b/sysdeps/i386/dl-irel.h
+@@ -26,6 +26,13 @@
+ 
+ #define ELF_MACHINE_IREL	1
+ 
++static inline Elf32_Addr
++__attribute ((always_inline))
++elf_ifunc_invoke (Elf32_Addr addr)
++{
++  return ((Elf32_Addr (*) (void)) (addr)) ();
++}
++
+ static inline void
+ __attribute ((always_inline))
+ elf_irel (const Elf32_Rel *reloc)
+@@ -35,7 +42,7 @@
+ 
+   if (__builtin_expect (r_type == R_386_IRELATIVE, 1))
+     {
+-      Elf32_Addr value = ((Elf32_Addr (*) (void)) (*reloc_addr)) ();
++      Elf32_Addr value = elf_ifunc_invoke(*reloc_addr);
+       *reloc_addr = value;
+     }
+   else
+--- a/sysdeps/powerpc/powerpc32/dl-irel.h
++++ b/sysdeps/powerpc/powerpc32/dl-irel.h
+@@ -26,6 +26,13 @@
+ 
+ #define ELF_MACHINE_IRELA	1
+ 
++static inline Elf32_Addr
++__attribute ((always_inline))
++elf_ifunc_invoke (Elf32_Addr addr)
++{
++  return ((Elf32_Addr (*) (void)) (addr)) ();
++}
++
+ static inline void
+ __attribute ((always_inline))
+ elf_irela (const Elf32_Rela *reloc)
+@@ -35,7 +42,7 @@
+   if (__builtin_expect (r_type == R_PPC_IRELATIVE, 1))
+     {
+       Elf32_Addr *const reloc_addr = (void *) reloc->r_offset;
+-      Elf32_Addr value = ((Elf32_Addr (*) (void)) reloc->r_addend) ();
++      Elf32_Addr value = elf_ifunc_invoke(reloc->r_addend);
+       *reloc_addr = value;
+     }
+   else
+--- a/sysdeps/powerpc/powerpc64/dl-irel.h
++++ b/sysdeps/powerpc/powerpc64/dl-irel.h
+@@ -33,6 +33,13 @@
+   Elf64_Addr fd_aux;
+ } Elf64_FuncDesc;
+ 
++static inline Elf64_Addr
++__attribute ((always_inline))
++elf_ifunc_invoke (Elf64_Addr addr)
++{
++  return ((Elf64_Addr (*) (void)) (addr)) ();
++}
++
+ static inline void
+ __attribute ((always_inline))
+ elf_irela (const Elf64_Rela *reloc)
+@@ -42,13 +49,13 @@
+   if (__builtin_expect (r_type == R_PPC64_IRELATIVE, 1))
+     {
+       Elf64_Addr *const reloc_addr = (void *) reloc->r_offset;
+-      Elf64_Addr value = ((Elf64_Addr (*) (void)) reloc->r_addend) ();
++      Elf64_Addr value = elf_ifunc_invoke(reloc->r_addend);
+       *reloc_addr = value;
+     }
+   else if (__builtin_expect (r_type == R_PPC64_JMP_IREL, 1))
+     {
+       Elf64_Addr *const reloc_addr = (void *) reloc->r_offset;
+-      Elf64_Addr value = ((Elf64_Addr (*) (void)) reloc->r_addend) ();
++      Elf64_Addr value = elf_ifunc_invoke(reloc->r_addend);
+       *(Elf64_FuncDesc *) reloc_addr = *(Elf64_FuncDesc *) value;
+     }
+   else
+--- a/sysdeps/sparc/sparc32/dl-irel.h
++++ b/sysdeps/sparc/sparc32/dl-irel.h
+@@ -28,6 +28,13 @@
+ 
+ #define ELF_MACHINE_IRELA	1
+ 
++static inline Elf32_Addr
++__attribute ((always_inline))
++elf_ifunc_invoke (Elf32_Addr addr)
++{
++  return ((Elf32_Addr (*) (int)) (addr)) (GLRO(dl_hwcap));
++}
++
+ static inline void
+ __attribute ((always_inline))
+ elf_irela (const Elf32_Rela *reloc)
+@@ -37,13 +44,13 @@
+   if (__builtin_expect (r_type == R_SPARC_IRELATIVE, 1))
+     {
+       Elf32_Addr *const reloc_addr = (void *) reloc->r_offset;
+-      Elf32_Addr value = ((Elf32_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
++      Elf32_Addr value = elf_ifunc_invoke(reloc->r_addend);
+       *reloc_addr = value;
+     }
+   else if (__builtin_expect (r_type == R_SPARC_JMP_IREL, 1))
+     {
+       Elf32_Addr *const reloc_addr = (void *) reloc->r_offset;
+-      Elf32_Addr value = ((Elf32_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
++      Elf32_Addr value = elf_ifunc_invoke(reloc->r_addend);
+ 
+       sparc_fixup_plt (reloc, reloc_addr, value, 0, 1);
+     }
+--- a/sysdeps/sparc/sparc32/dl-plt.h
++++ b/sysdeps/sparc/sparc32/dl-plt.h
+@@ -18,6 +18,9 @@
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
++#ifndef _DL_PLT_H
++#define _DL_PLT_H
++
+ /* Some SPARC opcodes we need to use for self-modifying code.  */
+ #define OPCODE_NOP	0x01000000 /* nop */
+ #define OPCODE_CALL	0x40000000 /* call ?; add PC-rel word address */
+@@ -95,3 +98,5 @@
+ 
+   return value;
+ }
++
++#endif /* dl-plt.h */
+--- a/sysdeps/sparc/sparc64/dl-irel.h
++++ b/sysdeps/sparc/sparc64/dl-irel.h
+@@ -28,6 +28,13 @@
+ 
+ #define ELF_MACHINE_IRELA	1
+ 
++static inline Elf64_Addr
++__attribute ((always_inline))
++elf_ifunc_invoke (Elf64_Addr addr)
++{
++  return ((Elf64_Addr (*) (int)) (addr)) (GLRO(dl_hwcap));
++}
++
+ static inline void
+ __attribute ((always_inline))
+ elf_irela (const Elf64_Rela *reloc)
+@@ -37,13 +44,13 @@
+   if (__builtin_expect (r_type == R_SPARC_IRELATIVE, 1))
+     {
+       Elf64_Addr *const reloc_addr = (void *) reloc->r_offset;
+-      Elf64_Addr value = ((Elf64_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
++      Elf64_Addr value = elf_ifunc_invoke(reloc->r_addend);
+       *reloc_addr = value;
+     }
+   else if (__builtin_expect (r_type == R_SPARC_JMP_IREL, 1))
+     {
+       Elf64_Addr *const reloc_addr = (void *) reloc->r_offset;
+-      Elf64_Addr value = ((Elf64_Addr (*) (int)) reloc->r_addend) (GLRO(dl_hwcap));
++      Elf64_Addr value = elf_ifunc_invoke(reloc->r_addend);
+       struct link_map map = { .l_addr = 0 };
+ 
+       /* 'high' is always zero, for large PLT entries the linker
+--- a/sysdeps/sparc/sparc64/dl-plt.h
++++ b/sysdeps/sparc/sparc64/dl-plt.h
+@@ -17,6 +17,9 @@
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
++#ifndef _DL_PLT_H
++#define _DL_PLT_H
++
+ /* We have 4 cases to handle.  And we code different code sequences
+    for each one.  I love V9 code models...  */
+ static inline void __attribute__ ((always_inline))
+@@ -161,3 +164,5 @@
+       __asm __volatile ("flush %0" : : "r" (insns));
+     }
+ }
++
++#endif /* dl-plt.h */
+--- a/sysdeps/x86_64/dl-irel.h
++++ b/sysdeps/x86_64/dl-irel.h
+@@ -26,6 +26,13 @@
+ 
+ #define ELF_MACHINE_IRELA	1
+ 
++static inline Elf64_Addr
++__attribute ((always_inline))
++elf_ifunc_invoke (Elf64_Addr addr)
++{
++  return ((Elf64_Addr (*) (void)) (addr)) ();
++}
++
+ static inline void
+ __attribute ((always_inline))
+ elf_irela (const Elf64_Rela *reloc)
+@@ -35,7 +42,7 @@
+ 
+   if (__builtin_expect (r_type == R_X86_64_IRELATIVE, 1))
+     {
+-      Elf64_Addr value = ((Elf64_Addr (*) (void)) reloc->r_addend) ();
++      Elf64_Addr value = elf_ifunc_invoke(reloc->r_addend);
+       *reloc_addr = value;
+     }
+   else
+--- a/sysdeps/generic/dl-irel.h
++++ b/sysdeps/generic/dl-irel.h
+@@ -17,7 +17,14 @@
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+-#ifndef _DL_IREL_h
++#ifndef _DL_IREL_H
+ #define _DL_IREL_H
+ 
++static inline DL_FIXUP_VALUE_TYPE
++__attribute ((always_inline))
++elf_ifunc_invoke (ElfW(Addr) addr)
++{
++  return ((DL_FIXUP_VALUE_TYPE (*) (void)) (addr)) ();
++}
++
+ #endif /* dl-irel.h */
--- eglibc-2.13.orig/debian/patches/any/submitted-nptl-invalid-td.patch
+++ eglibc-2.13/debian/patches/any/submitted-nptl-invalid-td.patch
@@ -0,0 +1,22 @@
+2010-02-27  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* pthreadP.h(INVALID_TD_P, INVALID_NOT_TERMINATED_TD_P): detect
+	NULL pointers.
+
+---
+ nptl/pthreadP.h |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/nptl/pthreadP.h
++++ b/nptl/pthreadP.h
+@@ -207,8 +207,8 @@
+ /* Simplified test.  This will not catch all invalid descriptors but
+    is better than nothing.  And if the test triggers the thread
+    descriptor is guaranteed to be invalid.  */
+-# define INVALID_TD_P(pd) __builtin_expect ((pd)->tid <= 0, 0)
+-# define INVALID_NOT_TERMINATED_TD_P(pd) __builtin_expect ((pd)->tid < 0, 0)
++# define INVALID_TD_P(pd) __builtin_expect (!pd || ((pd)->tid <= 0), 0)
++# define INVALID_NOT_TERMINATED_TD_P(pd) __builtin_expect (!pd || ((pd)->tid < 0), 0)
+ #endif
+ 
+ 
--- eglibc-2.13.orig/debian/patches/any/submitted-leading-zero-stack-guard.diff
+++ eglibc-2.13/debian/patches/any/submitted-leading-zero-stack-guard.diff
@@ -0,0 +1,58 @@
+Description: require that the first byte in the stack guard in a NULL byte,
+ to improve mitigation of NULL-terminated string overflows.
+Bug: http://sourceware.org/bugzilla/show_bug.cgi?id=10149
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/413278
+Author: Kees Cook <kees.cook@canonical.com>
+
+---
+ sysdeps/unix/sysv/linux/dl-osinfo.h |   21 +++++++++++++--------
+ 1 file changed, 13 insertions(+), 8 deletions(-)
+
+--- a/sysdeps/unix/sysv/linux/dl-osinfo.h
++++ b/sysdeps/unix/sysv/linux/dl-osinfo.h
+@@ -65,7 +65,12 @@
+ static inline uintptr_t __attribute__ ((always_inline))
+ _dl_setup_stack_chk_guard (void *dl_random)
+ {
+-  uintptr_t ret;
++  uintptr_t ret = 0;
++  /* Having a leading zero byte protects the stack guard from being
++     overwritten with str* write operations or exposed by an
++     unterminated str* read operation. */
++  unsigned char *p = ((unsigned char *) &ret) + 1;
++  int size = sizeof (ret) - 1;
+ #ifndef __ASSUME_AT_RANDOM
+   if (__builtin_expect (dl_random == NULL, 0))
+     {
+@@ -73,16 +78,16 @@
+       int fd = __open ("/dev/urandom", O_RDONLY);
+       if (fd >= 0)
+ 	{
+-	  ssize_t reslen = __read (fd, &ret, sizeof (ret));
++	  ssize_t reslen = __read (fd, p, size);
+ 	  __close (fd);
+-	  if (reslen == (ssize_t) sizeof (ret))
++	  if (reslen == (ssize_t) size)
+ 	    return ret;
+ 	}
+ # endif
+-      ret = 0;
+-      unsigned char *p = (unsigned char *) &ret;
+-      p[sizeof (ret) - 1] = 255;
+-      p[sizeof (ret) - 2] = '\n';
++      /* Lacking any other form of randomized stack guard, add other
++         terminators in an attempt to block things like fgets, etc. */
++      p[size - 1] = 255;
++      p[size - 2] = '\n';
+ #ifdef HP_TIMING_NOW
+       hp_timing_t hpt;
+       HP_TIMING_NOW (hpt);
+@@ -115,7 +120,7 @@
+     /* We need in the moment only 8 bytes on 32-bit platforms and 16
+        bytes on 64-bit platforms.  Therefore we can use the data
+        directly and not use the kernel-provided data to seed a PRNG.  */
+-    memcpy (&ret, dl_random, sizeof (ret));
++    memcpy (p, dl_random, size);
+   return ret;
+ }
+ 
--- eglibc-2.13.orig/debian/patches/any/submitted-bits-fcntl_h-at.diff
+++ eglibc-2.13/debian/patches/any/submitted-bits-fcntl_h-at.diff
@@ -0,0 +1,427 @@
+2009-11-19  Aurelien Jarno  <aurelien@aurel32.net>
+    
+	* io/fcntl.h: Move AT_* defines to...
+	* sysdeps/mach/hurd/bits/fcntl.h: ...here.
+	* sysdeps/unix/sysv/linux/i386/bits/fcntl.h: ...here.
+	* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: ...here.
+	* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: ...here.
+	* sysdeps/unix/sysv/linux/s390/bits/fcntl.h: ...here.
+	* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: ...here.
+	* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: ...here.
+	* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: ...here.
+
+2009-11-19  Aurelien Jarno  <aurelien@aurel32.net>
+    
+	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Define AT_*
+	constants.
+	* sysdeps/unix/sysv/linux/am33/bits/fcntl.h: Define AT_*
+	constants.
+	* sysdeps/unix/sysv/linux/arm/bits/fcntl.h: Define AT_*
+	constants.
+	* sysdeps/unix/sysv/linux/cris/bits/fcntl.h: Define AT_*
+	constants.
+	* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Define AT_*
+	constants.
+	* sysdeps/unix/sysv/linux/m68k/bits/fcntl.h: Define AT_*
+	constants.
+	* sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Define AT_*
+	constants.
+
+---
+ io/fcntl.h                                       |   14 --------------
+ ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h |   15 +++++++++++++++
+ ports/sysdeps/unix/sysv/linux/am33/bits/fcntl.h  |   17 +++++++++++++++++
+ ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h   |   15 +++++++++++++++
+ ports/sysdeps/unix/sysv/linux/cris/bits/fcntl.h  |   15 +++++++++++++++
+ ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h  |   15 +++++++++++++++
+ ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h  |   15 +++++++++++++++
+ ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h  |   15 +++++++++++++++
+ sysdeps/mach/hurd/bits/fcntl.h                   |   15 +++++++++++++++
+ sysdeps/unix/sysv/linux/i386/bits/fcntl.h        |   15 +++++++++++++++
+ sysdeps/unix/sysv/linux/ia64/bits/fcntl.h        |   15 +++++++++++++++
+ sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h     |   15 +++++++++++++++
+ sysdeps/unix/sysv/linux/s390/bits/fcntl.h        |   15 +++++++++++++++
+ sysdeps/unix/sysv/linux/sh/bits/fcntl.h          |   15 +++++++++++++++
+ sysdeps/unix/sysv/linux/sparc/bits/fcntl.h       |   15 +++++++++++++++
+ sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h      |   15 +++++++++++++++
+ 16 files changed, 227 insertions(+), 14 deletions(-)
+
+--- a/io/fcntl.h
++++ b/io/fcntl.h
+@@ -102,20 +102,6 @@
+ # define SEEK_END	2	/* Seek from end of file.  */
+ #endif	/* XPG */
+ 
+-#ifdef __USE_ATFILE
+-# define AT_FDCWD		-100	/* Special value used to indicate
+-					   the *at functions should use the
+-					   current working directory. */
+-# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
+-# define AT_REMOVEDIR		0x200	/* Remove directory instead of
+-					   unlinking file.  */
+-# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
+-# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
+-					   traversal.  */
+-# define AT_EACCESS		0x200	/* Test access permitted for
+-					   effective IDs, not real IDs.  */
+-#endif
+-
+ /* Do the file control operation described by CMD on FD.
+    The remaining arguments are interpreted depending on CMD.
+ 
+--- a/sysdeps/mach/hurd/bits/fcntl.h
++++ b/sysdeps/mach/hurd/bits/fcntl.h
+@@ -220,3 +220,18 @@
+ # define POSIX_FADV_DONTNEED	4 /* Don't need these pages.  */
+ # define POSIX_FADV_NOREUSE	5 /* Data will be accessed once.  */
+ #endif
++
++/* Values for `*at' functions.  */
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
++# define AT_REMOVEDIR		0x200	/* Remove directory instead of
++					   unlinking file.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
++					   traversal.  */
++# define AT_EACCESS		0x200	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++#endif
+--- a/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
++++ b/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
+@@ -234,6 +234,21 @@
+ # define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
+ #endif
+ 
++/* Values for `*at' functions.  */
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
++# define AT_REMOVEDIR		0x200	/* Remove directory instead of
++					   unlinking file.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
++					   traversal.  */
++# define AT_EACCESS		0x200	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++#endif
++
+ __BEGIN_DECLS
+ 
+ #ifdef __USE_GNU
+--- a/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
++++ b/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
+@@ -229,6 +229,21 @@
+ # define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
+ #endif
+ 
++/* Values for `*at' functions.  */
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
++# define AT_REMOVEDIR		0x200	/* Remove directory instead of
++					   unlinking file.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
++					   traversal.  */
++# define AT_EACCESS		0x200	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++#endif
++
+ __BEGIN_DECLS
+ 
+ #ifdef __USE_GNU
+--- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
++++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
+@@ -234,6 +234,21 @@
+ # define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
+ #endif
+ 
++/* Values for `*at' functions.  */
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
++# define AT_REMOVEDIR		0x200	/* Remove directory instead of
++					   unlinking file.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
++					   traversal.  */
++# define AT_EACCESS		0x200	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++#endif
++
+ __BEGIN_DECLS
+ 
+ #ifdef __USE_GNU
+--- a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
++++ b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
+@@ -255,6 +255,21 @@
+ # define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
+ #endif
+ 
++/* Values for `*at' functions.  */
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
++# define AT_REMOVEDIR		0x200	/* Remove directory instead of
++					   unlinking file.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
++					   traversal.  */
++# define AT_EACCESS		0x200	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++#endif
++
+ __BEGIN_DECLS
+ 
+ #ifdef __USE_GNU
+--- a/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
++++ b/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
+@@ -235,6 +235,21 @@
+ # define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
+ #endif
+ 
++/* Values for `*at' functions.  */
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
++# define AT_REMOVEDIR		0x200	/* Remove directory instead of
++					   unlinking file.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
++					   traversal.  */
++# define AT_EACCESS		0x200	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++#endif
++
+ __BEGIN_DECLS
+ 
+ #ifdef __USE_GNU
+--- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
++++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
+@@ -246,6 +246,21 @@
+ # define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
+ #endif
+ 
++/* Values for `*at' functions.  */
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
++# define AT_REMOVEDIR		0x200	/* Remove directory instead of
++					   unlinking file.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
++					   traversal.  */
++# define AT_EACCESS		0x200	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++#endif
++
+ __BEGIN_DECLS
+ 
+ #ifdef __USE_GNU
+--- a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
++++ b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
+@@ -249,6 +249,21 @@
+ # define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
+ #endif
+ 
++/* Values for `*at' functions.  */
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
++# define AT_REMOVEDIR		0x200	/* Remove directory instead of
++					   unlinking file.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
++					   traversal.  */
++# define AT_EACCESS		0x200	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++#endif
++
+ __BEGIN_DECLS
+ 
+ #ifdef __USE_GNU
+--- a/ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
++++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+@@ -225,6 +225,21 @@
+ # define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
+ #endif
+ 
++/* Values for `*at' functions.  */
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
++# define AT_REMOVEDIR		0x200	/* Remove directory instead of
++					   unlinking file.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
++					   traversal.  */
++# define AT_EACCESS		0x200	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++#endif
++
+ __BEGIN_DECLS
+ 
+ #ifdef __USE_GNU
+--- a/ports/sysdeps/unix/sysv/linux/am33/bits/fcntl.h
++++ b/ports/sysdeps/unix/sysv/linux/am33/bits/fcntl.h
+@@ -179,3 +179,20 @@
+ # define POSIX_FADV_DONTNEED	4 /* Don't need these pages.  */
+ # define POSIX_FADV_NOREUSE	5 /* Data will be accessed once.  */
+ #endif
++
++/* Values for `*at' functions.  */
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
++# define AT_REMOVEDIR		0x200	/* Remove directory instead of
++					   unlinking file.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
++					   traversal.  */
++# define AT_EACCESS		0x200	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++#endif
++
++
+--- a/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
++++ b/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
+@@ -234,6 +234,21 @@
+ # define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
+ #endif
+ 
++/* Values for `*at' functions.  */
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
++# define AT_REMOVEDIR		0x200	/* Remove directory instead of
++					   unlinking file.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
++					   traversal.  */
++# define AT_EACCESS		0x200	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++#endif
++
+ __BEGIN_DECLS
+ 
+ #ifdef __USE_GNU
+--- a/ports/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
++++ b/ports/sysdeps/unix/sysv/linux/cris/bits/fcntl.h
+@@ -182,6 +182,21 @@
+ # define POSIX_FADV_NOREUSE	5 /* Data will be accessed once.  */
+ #endif
+ 
++/* Values for `*at' functions.  */
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
++# define AT_REMOVEDIR		0x200	/* Remove directory instead of
++					   unlinking file.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
++					   traversal.  */
++# define AT_EACCESS		0x200	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++#endif
++
+ __BEGIN_DECLS
+ 
+ /* Provide kernel hint to read ahead.  */
+--- a/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
++++ b/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+@@ -235,6 +235,21 @@
+ # define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
+ #endif
+ 
++/* Values for `*at' functions.  */
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
++# define AT_REMOVEDIR		0x200	/* Remove directory instead of
++					   unlinking file.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
++					   traversal.  */
++# define AT_EACCESS		0x200	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++#endif
++
+ __BEGIN_DECLS
+ 
+ #ifdef __USE_GNU
+--- a/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
++++ b/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
+@@ -233,6 +233,21 @@
+ # define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
+ #endif
+ 
++/* Values for `*at' functions.  */
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
++# define AT_REMOVEDIR		0x200	/* Remove directory instead of
++					   unlinking file.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
++					   traversal.  */
++# define AT_EACCESS		0x200	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++#endif
++
+ __BEGIN_DECLS
+ 
+ #ifdef __USE_GNU
+--- a/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
++++ b/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
+@@ -247,6 +247,21 @@
+ # define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
+ #endif
+ 
++/* Values for `*at' functions.  */
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_SYMLINK_NOFOLLOW	0x100	/* Do not follow symbolic links.  */
++# define AT_REMOVEDIR		0x200	/* Remove directory instead of
++					   unlinking file.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_NO_AUTOMOUNT	0x800	/* Suppress terminal automount
++					   traversal.  */
++# define AT_EACCESS		0x200	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++#endif
++
+ __BEGIN_DECLS
+ 
+ #ifdef __USE_GNU
--- eglibc-2.13.orig/debian/patches/any/submitted-glob_h-ifdef.diff
+++ eglibc-2.13/debian/patches/any/submitted-glob_h-ifdef.diff
@@ -0,0 +1,20 @@
+2011-08-30  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* posix/glob.h: Use #if defined to not receive warnings about
+	  undefined symbols.
+
+---
+ posix/glob.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/posix/glob.h
++++ b/posix/glob.h
+@@ -143,7 +143,7 @@
+   } glob64_t;
+ #endif
+ 
+-#if __USE_FILE_OFFSET64 && __GNUC__ < 2
++#if defined __USE_FILE_OFFSET64 && __GNUC__ < 2
+ # define glob glob64
+ # define globfree globfree64
+ #endif
--- eglibc-2.13.orig/debian/patches/any/local-fhs-nscd.diff
+++ eglibc-2.13/debian/patches/any/local-fhs-nscd.diff
@@ -0,0 +1,21 @@
+---
+ nscd/nscd.h |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/nscd/nscd.h
++++ b/nscd/nscd.h
+@@ -103,10 +103,10 @@
+ 
+ 
+ /* Paths of the file for the persistent storage.  */
+-#define _PATH_NSCD_PASSWD_DB	"/var/db/nscd/passwd"
+-#define _PATH_NSCD_GROUP_DB	"/var/db/nscd/group"
+-#define _PATH_NSCD_HOSTS_DB	"/var/db/nscd/hosts"
+-#define _PATH_NSCD_SERVICES_DB	"/var/db/nscd/services"
++#define _PATH_NSCD_PASSWD_DB	"/var/cache/nscd/passwd"
++#define _PATH_NSCD_GROUP_DB	"/var/cache/nscd/group"
++#define _PATH_NSCD_HOSTS_DB	"/var/cache/nscd/hosts"
++#define _PATH_NSCD_SERVICES_DB	"/var/cache/nscd/services"
+ 
+ /* Path used when not using persistent storage.  */
+ #define _PATH_NSCD_XYZ_DB_TMP	"/var/run/nscd/dbXXXXXX"
--- eglibc-2.13.orig/debian/patches/any/cvs-vfscanf.diff
+++ eglibc-2.13/debian/patches/any/cvs-vfscanf.diff
@@ -0,0 +1,278 @@
+2012-01-05  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
+	* stdio-common/vfscanf.c (_IO_vfscanf_internal): Use alloca when
+	appropriate.
+
+2011-09-09  Ulrich Drepper  <drepper@gmail.com>
+ 
+	[BZ #13138]
+	* stdio-common/vfscanf.c (ADDW): Allocate large memory block with
+	realloc.
+	(_IO_vfscanf_internal): Remove reteof.  Use errout after setting done.
+	Free memory block if necessary.
+
+---
+ stdio-common/vfscanf.c |  124 ++++++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 97 insertions(+), 27 deletions(-)
+
+--- a/stdio-common/vfscanf.c
++++ b/stdio-common/vfscanf.c
+@@ -272,16 +272,39 @@
+   CHAR_T *wp = NULL;		/* Workspace.  */
+   size_t wpmax = 0;		/* Maximal size of workspace.  */
+   size_t wpsize;		/* Currently used bytes in workspace.  */
++  bool use_malloc = false;
+ #define ADDW(Ch)							    \
+   do									    \
+     {									    \
+-      if (wpsize == wpmax)						    \
++      if (__builtin_expect (wpsize == wpmax, 0))			    \
+ 	{								    \
+ 	  CHAR_T *old = wp;						    \
+-	  wpmax = (UCHAR_MAX + 1 > 2 * wpmax ? UCHAR_MAX + 1 : 2 * wpmax);  \
+-	  wp = (CHAR_T *) alloca (wpmax * sizeof (CHAR_T));		    \
+-	  if (old != NULL)						    \
+-	    MEMCPY (wp, old, wpsize);					    \
++	  size_t newsize = (UCHAR_MAX + 1 > 2 * wpmax			    \
++			    ? UCHAR_MAX + 1 : 2 * wpmax);		    \
++	  if (use_malloc || !__libc_use_alloca (newsize))		    \
++	    {								    \
++	      wp = realloc (use_malloc ? wp : NULL, newsize);		    \
++	      if (wp == NULL)						    \
++		{							    \
++		  if (use_malloc)					    \
++		    free (old);						    \
++		  done = EOF;						    \
++		  goto errout;						    \
++		}							    \
++	      if (! use_malloc)						    \
++		MEMCPY (wp, old, wpsize);				    \
++	      wpmax = newsize;						    \
++	      use_malloc = true;					    \
++	    }								    \
++	  else								    \
++	    {								    \
++	      size_t s = wpmax * sizeof (CHAR_T);			    \
++	      wp = (CHAR_T *) extend_alloca (wp, s,			    \
++					     newsize * sizeof (CHAR_T));    \
++	      wpmax = s / sizeof (CHAR_T);				    \
++	      if (old != NULL)						    \
++		MEMCPY (wp, old, wpsize);				    \
++	    }								    \
+ 	}								    \
+       wp[wpsize++] = (Ch);						    \
+     }									    \
+@@ -690,7 +713,10 @@
+ 		      if (Str != NULL)					      \
+ 			add_ptr_to_free (strptr);			      \
+ 		      else if (flags & POSIX_MALLOC)			      \
+-			goto reteof;					      \
++			{						      \
++			  done = EOF;					      \
++			  goto errout;					      \
++			}						      \
+ 		    }							      \
+ 		  else							      \
+ 		    Str = ARG (Type *);					      \
+@@ -731,8 +757,11 @@
+ 			  newstr = (char *) realloc (*strptr,
+ 						     strleng + MB_CUR_MAX);
+ 			  if (newstr == NULL)
+-			    /* c can't have `a' flag, only `m'.  */
+-			    goto reteof;
++			    {
++			      /* c can't have `a' flag, only `m'.  */
++			      done = EOF;
++			      goto errout;
++			    }
+ 			  else
+ 			    {
+ 			      *strptr = newstr;
+@@ -778,8 +807,11 @@
+ 				 effort.  */
+ 			      str = (char *) realloc (*strptr, strsize + 1);
+ 			      if (str == NULL)
+-				/* c can't have `a' flag, only `m'.  */
+-				goto reteof;
++				{
++				  /* c can't have `a' flag, only `m'.  */
++				  done = EOF;
++				  goto errout;
++				}
+ 			      else
+ 				{
+ 				  *strptr = (char *) str;
+@@ -850,8 +882,12 @@
+ 						      (strsize + 1)
+ 						      * sizeof (wchar_t));
+ 			  if (wstr == NULL)
+-			    /* C or lc can't have `a' flag, only `m' flag.  */
+-			    goto reteof;
++			    {
++			      /* C or lc can't have `a' flag, only `m'
++				 flag.  */
++			      done = EOF;
++			      goto errout;
++			    }
+ 			  else
+ 			    {
+ 			      *strptr = (char *) wstr;
+@@ -901,8 +937,11 @@
+ 						    ((strsize + 1)
+ 						     * sizeof (wchar_t)));
+ 			if (wstr == NULL)
+-			  /* C or lc can't have `a' flag, only `m' flag.  */
+-			  goto reteof;
++			  {
++			    /* C or lc can't have `a' flag, only `m' flag.  */
++			    done = EOF;
++			    goto errout;
++			  }
+ 			else
+ 			  {
+ 			    *strptr = (char *) wstr;
+@@ -1014,7 +1053,10 @@
+ 			    if (newstr == NULL)
+ 			      {
+ 				if (flags & POSIX_MALLOC)
+-				  goto reteof;
++				  {
++				    done = EOF;
++				    goto errout;
++				  }
+ 				/* We lose.  Oh well.  Terminate the
+ 				   string and stop converting,
+ 				   so at least we don't skip any input.  */
+@@ -1064,7 +1106,10 @@
+ 			      if (str == NULL)
+ 				{
+ 				  if (flags & POSIX_MALLOC)
+-				    goto reteof;
++				    {
++				      done = EOF;
++				      goto errout;
++				    }
+ 				  /* We lose.  Oh well.  Terminate the
+ 				     string and stop converting,
+ 				     so at least we don't skip any input.  */
+@@ -1110,7 +1155,10 @@
+ 		      if (newstr == NULL)
+ 			{
+ 			  if (flags & POSIX_MALLOC)
+-			    goto reteof;
++			    {
++			      done = EOF;
++			      goto errout;
++			    }
+ 			  /* We lose.  Oh well.  Terminate the string
+ 			     and stop converting, so at least we don't
+ 			     skip any input.  */
+@@ -1194,7 +1242,10 @@
+ 			    if (wstr == NULL)
+ 			      {
+ 				if (flags & POSIX_MALLOC)
+-				  goto reteof;
++				  {
++				    done = EOF;
++				    goto errout;
++				  }
+ 				/* We lose.  Oh well.  Terminate the string
+ 				   and stop converting, so at least we don't
+ 				   skip any input.  */
+@@ -1266,7 +1317,10 @@
+ 			  if (wstr == NULL)
+ 			    {
+ 			      if (flags & POSIX_MALLOC)
+-				goto reteof;
++				{
++				  done = EOF;
++				  goto errout;
++				}
+ 			      /* We lose.  Oh well.  Terminate the
+ 				 string and stop converting, so at
+ 				 least we don't skip any input.  */
+@@ -2470,7 +2524,10 @@
+ 			      if (wstr == NULL)
+ 				{
+ 				  if (flags & POSIX_MALLOC)
+-				    goto reteof;
++				    {
++				      done = EOF;
++				      goto errout;
++				    }
+ 				  /* We lose.  Oh well.  Terminate the string
+ 				     and stop converting, so at least we don't
+ 				     skip any input.  */
+@@ -2552,7 +2609,10 @@
+ 			      if (wstr == NULL)
+ 				{
+ 				  if (flags & POSIX_MALLOC)
+-				    goto reteof;
++				    {
++				      done = EOF;
++				      goto errout;
++				    }
+ 				  /* We lose.  Oh well.  Terminate the
+ 				     string and stop converting,
+ 				     so at least we don't skip any input.  */
+@@ -2694,7 +2754,10 @@
+ 			      if (newstr == NULL)
+ 				{
+ 				  if (flags & POSIX_MALLOC)
+-				    goto reteof;
++				    {
++				      done = EOF;
++				      goto errout;
++				    }
+ 				  /* We lose.  Oh well.  Terminate the string
+ 				     and stop converting, so at least we don't
+ 				     skip any input.  */
+@@ -2759,7 +2822,10 @@
+ 				  goto allocagain;
+ 				}
+ 			      if (flags & POSIX_MALLOC)
+-				goto reteof;
++				{
++				  done = EOF;
++				  goto errout;
++				}
+ 			      /* We lose.  Oh well.  Terminate the
+ 				 string and stop converting,
+ 				 so at least we don't skip any input.  */
+@@ -2802,7 +2868,10 @@
+ 		      if (newstr == NULL)
+ 			{
+ 			  if (flags & POSIX_MALLOC)
+-			    goto reteof;
++			    {
++			      done = EOF;
++			      goto errout;
++			    }
+ 			  /* We lose.  Oh well.  Terminate the string
+ 			     and stop converting, so at least we don't
+ 			     skip any input.  */
+@@ -2865,12 +2934,14 @@
+   /* Unlock stream.  */
+   UNLOCK_STREAM (s);
+ 
++  if (use_malloc)
++    free (wp);
++
+   if (errp != NULL)
+     *errp |= errval;
+ 
+-  if (done == EOF)
++  if (__builtin_expect (done == EOF, 0))
+     {
+-  reteof:
+       if (__builtin_expect (ptrs_to_free != NULL, 0))
+ 	{
+ 	  struct ptrs_to_free *p = ptrs_to_free;
+@@ -2885,7 +2956,6 @@
+ 	      ptrs_to_free = p;
+ 	    }
+ 	}
+-      return EOF;
+     }
+   else if (__builtin_expect (strptr != NULL, 0))
+     {
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-semaphore_h.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-semaphore_h.diff
@@ -0,0 +1,186 @@
+---
+ linuxthreads/semaphore.h                 |   87 ------------------------------
+ linuxthreads/sysdeps/pthread/semaphore.h |   88 ++++++++++++++++++++++++++++++-
+ 2 files changed, 87 insertions(+), 88 deletions(-)
+
+--- a/linuxthreads/semaphore.h
++++ /dev/null
+@@ -1,87 +0,0 @@
+-/* Linuxthreads - a simple clone()-based implementation of Posix        */
+-/* threads for Linux.                                                   */
+-/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr)              */
+-/*                                                                      */
+-/* This program is free software; you can redistribute it and/or        */
+-/* modify it under the terms of the GNU Library General Public License  */
+-/* as published by the Free Software Foundation; either version 2       */
+-/* of the License, or (at your option) any later version.               */
+-/*                                                                      */
+-/* This program is distributed in the hope that it will be useful,      */
+-/* but WITHOUT ANY WARRANTY; without even the implied warranty of       */
+-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        */
+-/* GNU Library General Public License for more details.                 */
+-
+-#ifndef _SEMAPHORE_H
+-#define _SEMAPHORE_H    1
+-
+-#include <features.h>
+-#include <sys/types.h>
+-#ifdef __USE_XOPEN2K
+-# define __need_timespec
+-# include <time.h>
+-#endif
+-
+-#ifndef _PTHREAD_DESCR_DEFINED
+-/* Thread descriptors.  Needed for `sem_t' definition.  */
+-typedef struct _pthread_descr_struct *_pthread_descr;
+-# define _PTHREAD_DESCR_DEFINED
+-#endif
+-
+-/* System specific semaphore definition.  */
+-typedef struct
+-{
+-  struct _pthread_fastlock __sem_lock;
+-  int __sem_value;
+-  _pthread_descr __sem_waiting;
+-} sem_t;
+-
+-
+-
+-/* Value returned if `sem_open' failed.  */
+-#define SEM_FAILED	((sem_t *) 0)
+-
+-/* Maximum value the semaphore can have.  */
+-#define SEM_VALUE_MAX 	(2147483647)
+-
+-
+-__BEGIN_DECLS
+-
+-/* Initialize semaphore object SEM to VALUE.  If PSHARED then share it
+-   with other processes.  */
+-extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value) __THROW;
+-
+-/* Free resources associated with semaphore object SEM.  */
+-extern int sem_destroy (sem_t *__sem) __THROW;
+-
+-/* Open a named semaphore NAME with open flaot OFLAG.  */
+-extern sem_t *sem_open (__const char *__name, int __oflag, ...) __THROW;
+-
+-/* Close descriptor for named semaphore SEM.  */
+-extern int sem_close (sem_t *__sem) __THROW;
+-
+-/* Remove named semaphore NAME.  */
+-extern int sem_unlink (__const char *__name) __THROW;
+-
+-/* Wait for SEM being posted.  */
+-extern int sem_wait (sem_t *__sem);
+-
+-#ifdef __USE_XOPEN2K
+-/* Similar to `sem_wait' but wait only until ABSTIME.  */
+-extern int sem_timedwait (sem_t *__restrict __sem,
+-			  __const struct timespec *__restrict __abstime);
+-#endif
+-
+-/* Test whether SEM is posted.  */
+-extern int sem_trywait (sem_t *__sem) __THROW;
+-
+-/* Post SEM.  */
+-extern int sem_post (sem_t *__sem) __THROW;
+-
+-/* Get current value of SEM and store it in *SVAL.  */
+-extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval)
+-     __THROW;
+-
+-__END_DECLS
+-
+-#endif  /* semaphore.h */
+--- a/linuxthreads/sysdeps/pthread/semaphore.h
++++ b/linuxthreads/sysdeps/pthread/semaphore.h
+@@ -1 +1,87 @@
+-#include <linuxthreads/semaphore.h>
++/* Linuxthreads - a simple clone()-based implementation of Posix        */
++/* threads for Linux.                                                   */
++/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr)              */
++/*                                                                      */
++/* This program is free software; you can redistribute it and/or        */
++/* modify it under the terms of the GNU Library General Public License  */
++/* as published by the Free Software Foundation; either version 2       */
++/* of the License, or (at your option) any later version.               */
++/*                                                                      */
++/* This program is distributed in the hope that it will be useful,      */
++/* but WITHOUT ANY WARRANTY; without even the implied warranty of       */
++/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        */
++/* GNU Library General Public License for more details.                 */
++
++#ifndef _SEMAPHORE_H
++#define _SEMAPHORE_H    1
++
++#include <features.h>
++#include <sys/types.h>
++#ifdef __USE_XOPEN2K
++# define __need_timespec
++# include <time.h>
++#endif
++
++#ifndef _PTHREAD_DESCR_DEFINED
++/* Thread descriptors.  Needed for `sem_t' definition.  */
++typedef struct _pthread_descr_struct *_pthread_descr;
++# define _PTHREAD_DESCR_DEFINED
++#endif
++
++/* System specific semaphore definition.  */
++typedef struct
++{
++  struct _pthread_fastlock __sem_lock;
++  int __sem_value;
++  _pthread_descr __sem_waiting;
++} sem_t;
++
++
++
++/* Value returned if `sem_open' failed.  */
++#define SEM_FAILED	((sem_t *) 0)
++
++/* Maximum value the semaphore can have.  */
++#define SEM_VALUE_MAX 	(2147483647)
++
++
++__BEGIN_DECLS
++
++/* Initialize semaphore object SEM to VALUE.  If PSHARED then share it
++   with other processes.  */
++extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value) __THROW;
++
++/* Free resources associated with semaphore object SEM.  */
++extern int sem_destroy (sem_t *__sem) __THROW;
++
++/* Open a named semaphore NAME with open flaot OFLAG.  */
++extern sem_t *sem_open (__const char *__name, int __oflag, ...) __THROW;
++
++/* Close descriptor for named semaphore SEM.  */
++extern int sem_close (sem_t *__sem) __THROW;
++
++/* Remove named semaphore NAME.  */
++extern int sem_unlink (__const char *__name) __THROW;
++
++/* Wait for SEM being posted.  */
++extern int sem_wait (sem_t *__sem);
++
++#ifdef __USE_XOPEN2K
++/* Similar to `sem_wait' but wait only until ABSTIME.  */
++extern int sem_timedwait (sem_t *__restrict __sem,
++			  __const struct timespec *__restrict __abstime);
++#endif
++
++/* Test whether SEM is posted.  */
++extern int sem_trywait (sem_t *__sem) __THROW;
++
++/* Post SEM.  */
++extern int sem_post (sem_t *__sem) __THROW;
++
++/* Get current value of SEM and store it in *SVAL.  */
++extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval)
++     __THROW;
++
++__END_DECLS
++
++#endif  /* semaphore.h */
--- eglibc-2.13.orig/debian/patches/any/cvs-dlopen-tls.diff
+++ eglibc-2.13/debian/patches/any/cvs-dlopen-tls.diff
@@ -0,0 +1,242 @@
+2011-05-14  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #12453]
+	* elf/dl-open.c (dl_open_worker): Delay calls to _dl_update_slotinfo
+	until all modules are registered in the DTV.
+	* elf/Makefile: Add rules to build and run tst-tls19.
+	* elf/tst-tls19.c: New file.
+	* elf/tst-tls19mod1.c: New file.
+	* elf/tst-tls19mod2.c: New file.
+	* elf/tst-tls19mod3.c: New file.
+	Patch mostly by Martin von Gagern <Martin.vGagern@gmx.net>.
+
+---
+ elf/Makefile        |    9 ++++++-
+ elf/dl-open.c       |   64 +++++++++++++++++++++++++++++++---------------------
+ elf/tst-tls19.c     |   27 +++++++++++++++++++++
+ elf/tst-tls19mod1.c |   15 ++++++++++++
+ elf/tst-tls19mod2.c |   13 ++++++++++
+ elf/tst-tls19mod3.c |   16 +++++++++++++
+ 6 files changed, 118 insertions(+), 26 deletions(-)
+
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -80,6 +80,7 @@
+ 		   tst-tlsmod12.c tst-tls10.h tst-alignmod.c tst-alignmod2.c \
+ 		   circlemod1.c circlemod1a.c circlemod2.c circlemod2a.c \
+ 		   circlemod3.c circlemod3a.c nodlopenmod2.c \
++		   tst-tls19mod1.c tst-tls19mod2.c tst-tls19mod3.c \
+ 		   tls-macros.h \
+ 		   reldep8mod1.c reldep8mod2.c reldep8mod3.c \
+ 		   nodel2mod1.c nodel2mod2.c nodel2mod3.c \
+@@ -199,7 +200,7 @@
+ 	 restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \
+ 	 circleload1 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 tst-tls8 \
+ 	 tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-tls15 \
+-	 tst-tls16 tst-tls17 tst-tls18 tst-tls-dlinfo \
++	 tst-tls16 tst-tls17 tst-tls18 tst-tls19 tst-tls-dlinfo \
+ 	 tst-align tst-align2 $(tests-execstack-$(have-z-execstack)) \
+ 	 tst-dlmodcount tst-dlopenrpath tst-deep1 \
+ 	 tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \
+@@ -245,6 +246,7 @@
+ 		tst-tlsmod13 tst-tlsmod13a tst-tlsmod14a tst-tlsmod14b \
+ 		tst-tlsmod15a tst-tlsmod15b tst-tlsmod16a tst-tlsmod16b \
+ 		$(tlsmod17a-modules) tst-tlsmod17b $(tlsmod18a-modules) \
++		tst-tls19mod1 tst-tls19mod2 tst-tls19mod3 \
+ 		circlemod1 circlemod1a circlemod2 circlemod2a \
+ 		circlemod3 circlemod3a \
+ 		reldep8mod1 reldep8mod2 reldep8mod3 \
+@@ -531,6 +533,8 @@
+ # For tst-tls9-static, make sure the modules it dlopens have libc.so in DT_NEEDED
+ $(objpfx)tst-tlsmod5.so: $(common-objpfx)libc.so
+ $(objpfx)tst-tlsmod6.so: $(common-objpfx)libc.so
++$(objpfx)tst-tls19mod1.so: $(objpfx)tst-tls19mod2.so $(objpfx)tst-tls19mod3.so
++$(objpfx)tst-tls19mod3.so: $(objpfx)ld.so
+ $(objpfx)reldep8mod3.so: $(objpfx)reldep8mod1.so $(objpfx)reldep8mod2.so
+ $(objpfx)nodel2mod3.so: $(objpfx)nodel2mod1.so $(objpfx)nodel2mod2.so
+ $(objpfx)reldep9mod2.so: $(objpfx)reldep9mod1.so
+@@ -828,6 +832,9 @@
+ 	$(compile-command.c) -DN=$*
+ $(patsubst %,$(objpfx)%.so,$(tlsmod18a-modules)): $(objpfx)tst-tlsmod18a%.so: $(objpfx)ld.so
+ 
++$(objpfx)tst-tls19: $(libdl)
++$(objpfx)tst-tls19.out: $(objpfx)tst-tls19mod1.so
++
+ CFLAGS-tst-align.c = $(stack-align-test-flags)
+ CFLAGS-tst-align2.c = $(stack-align-test-flags)
+ CFLAGS-tst-alignmod.c = $(stack-align-test-flags)
+--- a/elf/dl-open.c
++++ b/elf/dl-open.c
+@@ -1,5 +1,5 @@
+ /* Load a shared object at runtime, relocate it, and run its initializer.
+-   Copyright (C) 1996-2007, 2009, 2010 Free Software Foundation, Inc.
++   Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+@@ -347,6 +347,7 @@
+   /* If the file is not loaded now as a dependency, add the search
+      list of the newly loaded object to the scope.  */
+   bool any_tls = false;
++  unsigned int first_static_tls = new->l_searchlist.r_nlist;
+   for (unsigned int i = 0; i < new->l_searchlist.r_nlist; ++i)
+     {
+       struct link_map *imap = new->l_searchlist.r_list[i];
+@@ -425,30 +426,9 @@
+ 	     might have to increase its size.  */
+ 	  _dl_add_to_slotinfo (imap);
+ 
+-	  if (imap->l_need_tls_init)
+-	    {
+-	      /* For static TLS we have to allocate the memory here
+-		 and now.  This includes allocating memory in the DTV.
+-		 But we cannot change any DTV other than our own. So,
+-		 if we cannot guarantee that there is room in the DTV
+-		 we don't even try it and fail the load.
+-
+-		 XXX We could track the minimum DTV slots allocated in
+-		 all threads.  */
+-	      if (! RTLD_SINGLE_THREAD_P && imap->l_tls_modid > DTV_SURPLUS)
+-		_dl_signal_error (0, "dlopen", NULL, N_("\
+-cannot load any more object with static TLS"));
+-
+-	      imap->l_need_tls_init = 0;
+-#ifdef SHARED
+-	      /* Update the slot information data for at least the
+-		 generation of the DSO we are allocating data for.  */
+-	      _dl_update_slotinfo (imap->l_tls_modid);
+-#endif
+-
+-	      GL(dl_init_static_tls) (imap);
+-	      assert (imap->l_need_tls_init == 0);
+-	    }
++	  if (imap->l_need_tls_init
++	      && first_static_tls == new->l_searchlist.r_nlist)
++	    first_static_tls = i;
+ 
+ 	  /* We have to bump the generation counter.  */
+ 	  any_tls = true;
+@@ -460,6 +440,40 @@
+     _dl_fatal_printf (N_("\
+ TLS generation counter wrapped!  Please report this."));
+ 
++  /* We need a second pass for static tls data, because _dl_update_slotinfo
++     must not be run while calls to _dl_add_to_slotinfo are still pending. */
++  for (unsigned int i = first_static_tls; i < new->l_searchlist.r_nlist; ++i)
++    {
++      struct link_map *imap = new->l_searchlist.r_list[i];
++
++      if (imap->l_need_tls_init
++	  && ! imap->l_init_called
++	  && imap->l_tls_blocksize > 0)
++	{
++	  /* For static TLS we have to allocate the memory here and
++	     now.  This includes allocating memory in the DTV.  But we
++	     cannot change any DTV other than our own. So, if we
++	     cannot guarantee that there is room in the DTV we don't
++	     even try it and fail the load.
++
++	     XXX We could track the minimum DTV slots allocated in
++	     all threads.  */
++	  if (! RTLD_SINGLE_THREAD_P && imap->l_tls_modid > DTV_SURPLUS)
++	    _dl_signal_error (0, "dlopen", NULL, N_("\
++cannot load any more object with static TLS"));
++
++	  imap->l_need_tls_init = 0;
++#ifdef SHARED
++	  /* Update the slot information data for at least the
++	     generation of the DSO we are allocating data for.  */
++	  _dl_update_slotinfo (imap->l_tls_modid);
++#endif
++
++	  GL(dl_init_static_tls) (imap);
++	  assert (imap->l_need_tls_init == 0);
++	}
++    }
++
+   /* Run the initializer functions of new objects.  */
+   _dl_init (new, args->argc, args->argv, args->env);
+ 
+--- /dev/null
++++ b/elf/tst-tls19.c
+@@ -0,0 +1,27 @@
++// BZ 12453
++#include <stdio.h>
++#include <dlfcn.h>
++
++
++static int
++do_test (void)
++{
++  void* dl = dlopen ("tst-tls19mod1.so", RTLD_LAZY | RTLD_GLOBAL);
++  if (dl == NULL)
++    {
++      printf ("Error loading tst-tls19mod1.so: %s\n", dlerror ());
++      return 1;
++    }
++
++  int (*fn) (void) = dlsym (dl, "foo");
++  if (fn == NULL)
++    {
++      printf("Error obtaining symbol foo\n");
++      return 1;
++    }
++
++  return fn ();
++}
++
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+--- /dev/null
++++ b/elf/tst-tls19mod1.c
+@@ -0,0 +1,15 @@
++#include <stdio.h>
++
++extern int bar (void);
++extern int baz (void);
++
++int
++foo (void)
++{
++  int v1 = bar ();
++  int v2 = baz ();
++
++  printf ("bar=%d, baz=%d\n", v1, v2);
++
++  return v1 != 666 || v2 != 42;
++}
+--- /dev/null
++++ b/elf/tst-tls19mod2.c
+@@ -0,0 +1,13 @@
++static int __thread tbar __attribute__ ((tls_model ("initial-exec"))) = 666;
++
++void
++setter (int a)
++{
++  tbar = a;
++}
++
++int
++bar (void)
++{
++  return tbar;
++}
+--- /dev/null
++++ b/elf/tst-tls19mod3.c
+@@ -0,0 +1,16 @@
++#include <stdio.h>
++
++static int __thread tbaz __attribute__ ((tls_model ("local-dynamic"))) = 42;
++
++void
++setter2 (int a)
++{
++  tbaz = a;
++}
++
++int
++baz (void)
++{
++  printf ("&tbaz=%p\n", &tbaz);
++  return tbaz;
++}
--- eglibc-2.13.orig/debian/patches/any/cvs-regex-oom.diff
+++ eglibc-2.13/debian/patches/any/cvs-regex-oom.diff
@@ -0,0 +1,103 @@
+2011-05-28  Ulrich Drepper  <drepper@gmail.com>
+ 
+	[BZ #12811]
+	* posix/regex_internal.c (build_wcs_buffer): Don't signal we have to
+	grow the buffers more if it already has to be sufficient.
+	(build_wcs_upper_buffer): Likewise.
+	* posix/regexec.c (check_matching): Likewise.
+	(clean_state_log_if_needed): Likewise.
+	(extend_buffers): Don't enlarge buffers beyond size of the input
+	buffer.
+	Patches mostly by Emil Wojak <emil@wojak.eu>.
+
+---
+ posix/regex_internal.c |   24 ++++++++++++++----------
+ posix/regexec.c        |    8 +++++---
+ 2 files changed, 19 insertions(+), 13 deletions(-)
+
+--- a/posix/regex_internal.c
++++ b/posix/regex_internal.c
+@@ -237,13 +237,8 @@
+       else
+ 	p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx;
+       mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
+-      if (BE (mbclen == (size_t) -2, 0))
+-	{
+-	  /* The buffer doesn't have enough space, finish to build.  */
+-	  pstr->cur_state = prev_st;
+-	  break;
+-	}
+-      else if (BE (mbclen == (size_t) -1 || mbclen == 0, 0))
++      if (BE (mbclen == (size_t) -1 || mbclen == 0
++	      || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len), 0))
+ 	{
+ 	  /* We treat these cases as a singlebyte character.  */
+ 	  mbclen = 1;
+@@ -252,6 +247,12 @@
+ 	    wc = pstr->trans[wc];
+ 	  pstr->cur_state = prev_st;
+ 	}
++      else if (BE (mbclen == (size_t) -2, 0))
++	{
++	  /* The buffer doesn't have enough space, finish to build.  */
++	  pstr->cur_state = prev_st;
++	  break;
++	}
+ 
+       /* Write wide character and padding.  */
+       pstr->wcs[byte_idx++] = wc;
+@@ -334,9 +335,11 @@
+ 	      for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
+ 		pstr->wcs[byte_idx++] = WEOF;
+ 	    }
+-	  else if (mbclen == (size_t) -1 || mbclen == 0)
++	  else if (mbclen == (size_t) -1 || mbclen == 0
++		   || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len))
+ 	    {
+-	      /* It is an invalid character or '\0'.  Just use the byte.  */
++	      /* It is an invalid character, an incomplete character
++		 at the end of the string, or '\0'.  Just use the byte.  */
+ 	      int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
+ 	      pstr->mbs[byte_idx] = ch;
+ 	      /* And also cast it to wide char.  */
+@@ -449,7 +452,8 @@
+ 	    for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
+ 	      pstr->wcs[byte_idx++] = WEOF;
+ 	  }
+-	else if (mbclen == (size_t) -1 || mbclen == 0)
++	else if (mbclen == (size_t) -1 || mbclen == 0
++		 || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len))
+ 	  {
+ 	    /* It is an invalid character or '\0'.  Just use the byte.  */
+ 	    int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx];
+--- a/posix/regexec.c
++++ b/posix/regexec.c
+@@ -1142,7 +1142,8 @@
+       re_dfastate_t *old_state = cur_state;
+       int next_char_idx = re_string_cur_idx (&mctx->input) + 1;
+ 
+-      if (BE (next_char_idx >= mctx->input.bufs_len, 0)
++      if ((BE (next_char_idx >= mctx->input.bufs_len, 0)
++	   && mctx->input.bufs_len < mctx->input.len)
+ 	  || (BE (next_char_idx >= mctx->input.valid_len, 0)
+ 	      && mctx->input.valid_len < mctx->input.len))
+ 	{
+@@ -1718,7 +1719,8 @@
+ {
+   int top = mctx->state_log_top;
+ 
+-  if (next_state_log_idx >= mctx->input.bufs_len
++  if ((next_state_log_idx >= mctx->input.bufs_len
++       && mctx->input.bufs_len < mctx->input.len)
+       || (next_state_log_idx >= mctx->input.valid_len
+ 	  && mctx->input.valid_len < mctx->input.len))
+     {
+@@ -4105,7 +4107,7 @@
+     return REG_ESPACE;
+ 
+   /* Double the lengthes of the buffers.  */
+-  ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
++  ret = re_string_realloc_buffers (pstr, MIN (pstr->len, pstr->bufs_len * 2));
+   if (BE (ret != REG_NOERROR, 0))
+     return ret;
+ 
--- eglibc-2.13.orig/debian/patches/any/cvs-FORTIFY_SOURCE-format-strings.diff
+++ eglibc-2.13/debian/patches/any/cvs-FORTIFY_SOURCE-format-strings.diff
@@ -0,0 +1,90 @@
+2012-03-02  Kees Cook  <keescook@chromium.org>
+
+        [BZ #13656]
+        * stdio-common/vfprintf.c (vfprintf): Check for nargs overflow and
+        possibly allocate from heap instead of stack.
+
+---
+ stdio-common/vfprintf.c |   47 ++++++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 38 insertions(+), 9 deletions(-)
+
+--- a/stdio-common/vfprintf.c
++++ b/stdio-common/vfprintf.c
+@@ -248,6 +248,9 @@
+      0 if unknown.  */
+   int readonly_format = 0;
+ 
++  /* For the argument descriptions, which may be allocated on the heap.  */
++  void *args_malloced = NULL;
++
+   /* This table maps a character into a number representing a
+      class.  In each step there is a destination label for each
+      class.  */
+@@ -1668,9 +1671,10 @@
+        determine the size of the array needed to store the argument
+        attributes.  */
+     size_t nargs = 0;
+-    int *args_type;
+-    union printf_arg *args_value = NULL;
++    size_t bytes_per_arg;
++    union printf_arg *args_value;
+     int *args_size;
++    int *args_type;
+ 
+     /* Positional parameters refer to arguments directly.  This could
+        also determine the maximum number of arguments.  Track the
+@@ -1721,13 +1725,38 @@
+ 
+     /* Determine the number of arguments the format string consumes.  */
+     nargs = MAX (nargs, max_ref_arg);
++    /* Calculate total size needed to represent a single argument across
++       all three argument-related arrays.  */
++    bytes_per_arg = sizeof (*args_value) + sizeof (*args_size)
++                    + sizeof (*args_type);
++
++    /* Check for potential integer overflow.  */
++    if (__builtin_expect (nargs > SIZE_MAX / bytes_per_arg, 0))
++      {
++         __set_errno (ERANGE);
++         done = -1;
++         goto all_done;
++      }
+ 
+-    /* Allocate memory for the argument descriptions.  */
+-    args_type = alloca (nargs * sizeof (int));
++    /* Allocate memory for all three argument arrays.  */
++    if (__libc_use_alloca (nargs * bytes_per_arg))
++        args_value = alloca (nargs * bytes_per_arg);
++    else
++      {
++        args_value = args_malloced = malloc (nargs * bytes_per_arg);
++        if (args_value == NULL)
++          {
++            done = -1;
++            goto all_done;
++          }
++      }
++
++    /* Set up the remaining two arrays to each point past the end of the
++       prior array, since space for all three has been allocated now.  */
++    args_size = &args_value[nargs].pa_int;
++    args_type = &args_size[nargs];
+     memset (args_type, s->_flags2 & _IO_FLAGS2_FORTIFY ? '\xff' : '\0',
+-	    nargs * sizeof (int));
+-    args_value = alloca (nargs * sizeof (union printf_arg));
+-    args_size = alloca (nargs * sizeof (int));
++	    nargs * sizeof (*args_type));
+ 
+     /* XXX Could do sanity check here: If any element in ARGS_TYPE is
+        still zero after this loop, format is invalid.  For now we
+@@ -1996,8 +2025,8 @@
+   }
+ 
+ all_done:
+-  if (__builtin_expect (workstart != NULL, 0))
+-    free (workstart);
++  free (args_malloced);
++  free (workstart);
+   /* Unlock the stream.  */
+   _IO_funlockfile (s);
+   _IO_cleanup_region_end (0);
--- eglibc-2.13.orig/debian/patches/any/submitted-ldsodefs_rtld_debug.diff
+++ eglibc-2.13/debian/patches/any/submitted-ldsodefs_rtld_debug.diff
@@ -0,0 +1,18 @@
+2011-02-11  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/generic/ldsodefs.h: include <gnu/option-groups.h>.
+
+---
+ sysdeps/generic/ldsodefs.h |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sysdeps/generic/ldsodefs.h
++++ b/sysdeps/generic/ldsodefs.h
+@@ -39,6 +39,7 @@
+ #include <hp-timing.h>
+ #include <tls.h>
+ #include <kernel-features.h>
++#include <gnu/option-groups.h> /* For __OPTION_EGLIBC_RTLD_DEBUG.  */
+ 
+ __BEGIN_DECLS
+ 
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-fatalprepare.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-fatalprepare.diff
@@ -0,0 +1,46 @@
+---
+ linuxthreads/sysdeps/unix/sysv/linux/fatal-prepare.h |   39 +++++++++++++++++++
+ 1 file changed, 39 insertions(+)
+
+--- /dev/null
++++ b/linuxthreads/sysdeps/unix/sysv/linux/fatal-prepare.h
+@@ -0,0 +1,39 @@
++/* Copyright (C) 2003, 2007 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <pthread.h>
++
++/* We have to completely disable cancellation.  assert() must not be a
++   cancellation point but the implementation uses write() etc.  */
++#ifdef SHARED
++# include <pthread-functions.h>
++# define FATAL_PREPARE \
++  {									      \
++    int (*fp) (int, int *);                                                   \
++    fp = __libc_pthread_functions.ptr_pthread_setcancelstate;                 \
++    if (fp != NULL)                                                           \
++      fp (PTHREAD_CANCEL_DISABLE, NULL);                                      \
++  }
++#else
++# pragma weak pthread_setcancelstate
++# define FATAL_PREPARE \
++  {									      \
++    if (pthread_setcancelstate != NULL)					      \
++      pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL);		      \
++  }
++#endif
--- eglibc-2.13.orig/debian/patches/any/local-tst-writev.diff
+++ eglibc-2.13/debian/patches/any/local-tst-writev.diff
@@ -0,0 +1,19 @@
+2010-05-24  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/wordsize-64/tst-writev.c: include <limits.h>. 
+
+diff a/sysdeps/wordsize-64/tst-writev.c b/sysdeps/wordsize-64/tst-writev.c
+---
+ sysdeps/wordsize-64/tst-writev.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sysdeps/wordsize-64/tst-writev.c
++++ b/sysdeps/wordsize-64/tst-writev.c
+@@ -18,6 +18,7 @@
+    02111-1307 USA.  */
+ 
+ #include <fcntl.h>
++#include <limits.h>
+ #include <paths.h>
+ #include <stdio.h>
+ #include <stdlib.h>
--- eglibc-2.13.orig/debian/patches/any/cvs-arch-lowlevellock.diff
+++ eglibc-2.13/debian/patches/any/cvs-arch-lowlevellock.diff
@@ -0,0 +1,16 @@
+2012-03-16  David S. Miller  <davem@davemloft.net>
+
+	[BZ #13844]
+	* sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
+	instead of "...".
+
+diff --git a/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c b/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c
+index 28672a6..4883765 100644
+--- a/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c
++++ b/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c
+@@ -18,4 +18,4 @@
+    02111-1307 USA.  */
+ 
+ /* No difference to lowlevellock.c, except we lose a couple of functions.  */
+-#include "lowlevellock.c"
++#include <lowlevellock.c>
--- eglibc-2.13.orig/debian/patches/any/submitted-rlimit-rttime.diff
+++ eglibc-2.13/debian/patches/any/submitted-rlimit-rttime.diff
@@ -0,0 +1,83 @@
+2011-05-22  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/unix/sysv/linux/bits/resource.h (RLIMIT_RTTIME): Add.
+	* sysdeps/unix/sysv/linux/sparc/bits/resource.h: Likewise.
+	* ports/sysdeps/unix/sysv/linux/mips/bits/resource.h: Likewise.
+	* ports/sysdeps/unix/sysv/linux/alpha/bits/resource.h: Likewise.
+
+diff a/sysdeps/unix/sysv/linux/bits/resource.h b/sysdeps/unix/sysv/linux/bits/resource.h
+---
+ ports/sysdeps/unix/sysv/linux/alpha/bits/resource.h |    8 +++++++-
+ ports/sysdeps/unix/sysv/linux/mips/bits/resource.h  |    8 +++++++-
+ sysdeps/unix/sysv/linux/bits/resource.h             |    8 +++++++-
+ sysdeps/unix/sysv/linux/sparc/bits/resource.h       |    8 +++++++-
+ 4 files changed, 28 insertions(+), 4 deletions(-)
+
+--- a/sysdeps/unix/sysv/linux/bits/resource.h
++++ b/sysdeps/unix/sysv/linux/bits/resource.h
+@@ -100,7 +100,13 @@
+   __RLIMIT_RTPRIO = 14,
+ #define RLIMIT_RTPRIO __RLIMIT_RTPRIO
+ 
+-  __RLIMIT_NLIMITS = 15,
++  /* Maximum CPU time that a process scheduled under a real-time
++     scheduling policy may consume without making a blocking
++     system call.  */
++  __RLIMIT_RTTIME = 15,
++#define RLIMIT_RTTIME __RLIMIT_RTTIME
++
++  __RLIMIT_NLIMITS = 16,
+   __RLIM_NLIMITS = __RLIMIT_NLIMITS
+ #define RLIMIT_NLIMITS __RLIMIT_NLIMITS
+ #define RLIM_NLIMITS __RLIM_NLIMITS
+--- a/sysdeps/unix/sysv/linux/sparc/bits/resource.h
++++ b/sysdeps/unix/sysv/linux/sparc/bits/resource.h
+@@ -100,7 +100,13 @@
+   __RLIMIT_RTPRIO = 14,
+ #define RLIMIT_RTPRIO __RLIMIT_RTPRIO
+ 
+-  __RLIMIT_NLIMITS = 15,
++  /* Maximum CPU time that a process scheduled under a real-time
++     scheduling policy may consume without making a blocking
++     system call.  */
++  __RLIMIT_RTTIME = 15,
++#define RLIMIT_RTTIME __RLIMIT_RTTIME
++
++  __RLIMIT_NLIMITS = 16,
+   __RLIM_NLIMITS = __RLIMIT_NLIMITS
+ #define RLIMIT_NLIMITS __RLIMIT_NLIMITS
+ #define RLIM_NLIMITS __RLIM_NLIMITS
+--- a/ports/sysdeps/unix/sysv/linux/mips/bits/resource.h
++++ b/ports/sysdeps/unix/sysv/linux/mips/bits/resource.h
+@@ -100,7 +100,13 @@
+   __RLIMIT_RTPRIO = 14,
+ #define RLIMIT_RTPRIO __RLIMIT_RTPRIO
+ 
+-  __RLIMIT_NLIMITS = 15,
++  /* Maximum CPU time that a process scheduled under a real-time
++     scheduling policy may consume without making a blocking
++     system call.  */
++  __RLIMIT_RTTIME = 15,
++#define RLIMIT_RTTIME __RLIMIT_RTTIME
++
++  __RLIMIT_NLIMITS = 16,
+   __RLIM_NLIMITS = __RLIMIT_NLIMITS
+ #define RLIMIT_NLIMITS __RLIMIT_NLIMITS
+ #define RLIM_NLIMITS __RLIM_NLIMITS
+--- a/ports/sysdeps/unix/sysv/linux/alpha/bits/resource.h
++++ b/ports/sysdeps/unix/sysv/linux/alpha/bits/resource.h
+@@ -100,7 +100,13 @@
+   __RLIMIT_RTPRIO = 14,
+ #define RLIMIT_RTPRIO __RLIMIT_RTPRIO
+ 
+-  __RLIMIT_NLIMITS = 15,
++  /* Maximum CPU time that a process scheduled under a real-time
++     scheduling policy may consume without making a blocking
++     system call.  */
++  __RLIMIT_RTTIME = 15,
++#define RLIMIT_RTTIME __RLIMIT_RTTIME
++
++  __RLIMIT_NLIMITS = 16,
+   __RLIM_NLIMITS = __RLIMIT_NLIMITS
+ #define RLIMIT_NLIMITS __RLIMIT_NLIMITS
+ #define RLIM_NLIMITS __RLIM_NLIMITS
--- eglibc-2.13.orig/debian/patches/any/local-relro-mprotect.diff
+++ eglibc-2.13/debian/patches/any/local-relro-mprotect.diff
@@ -0,0 +1,21 @@
+http://sources.redhat.com/bugzilla/show_bug.cgi?id=12492
+
+---
+ elf/dl-load.c |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/elf/dl-load.c
++++ b/elf/dl-load.c
+@@ -1388,7 +1388,11 @@
+ 	  if (__builtin_expect (p + s <= relro_end, 1))
+ 	    {
+ 	      /* The variable lies in the region protected by RELRO.  */
+-	      __mprotect ((void *) p, s, PROT_READ|PROT_WRITE);
++	      if (__mprotect ((void *) p, s, PROT_READ|PROT_WRITE) < 0)
++		{
++		  errstring = N_("cannot change memory protections");
++		  goto call_lose_errno;
++		}
+ 	      __stack_prot |= PROT_READ|PROT_WRITE|PROT_EXEC;
+ 	      __mprotect ((void *) p, s, PROT_READ);
+ 	    }
--- eglibc-2.13.orig/debian/patches/any/cvs-CVE-2013-4332.diff
+++ eglibc-2.13/debian/patches/any/cvs-CVE-2013-4332.diff
@@ -0,0 +1,110 @@
+2013-10-30  Will Newton  <will.newton@linaro.org>
+
+	[BZ #16038]
+	* malloc/hooks.c (memalign_check): Limit alignment to the
+	maximum representable power of two.
+	* malloc/malloc.c (__libc_memalign): Likewise.
+
+2013-10-10  Will Newton  <will.newton@linaro.org>
+
+	* malloc/hooks.c (memalign_check): Ensure the value of bytes
+	passed to _int_memalign does not overflow.
+ 
+2013-09-11  Will Newton  <will.newton@linaro.org>
+ 
+	[BZ #15857]
+	* malloc/malloc.c (__libc_memalign): Check the value of bytes
+	does not overflow.
+
+2013-09-11  Will Newton  <will.newton@linaro.org>
+
+ 	[BZ #15856]
+ 	* malloc/malloc.c (__libc_valloc): Check the value of bytes
+ 	does not overflow.
+
+2013-09-11  Will Newton  <will.newton@linaro.org>
+
+	[BZ #15855]
+	* malloc/malloc.c (__libc_pvalloc): Check the value of bytes
+	does not overflow.
+
+--- a/malloc/malloc.c
++++ b/malloc/malloc.c
+@@ -3874,6 +3874,21 @@
+   /* Otherwise, ensure that it is at least a minimum chunk size */
+   if (alignment <  MINSIZE) alignment = MINSIZE;
+ 
++  /* If the alignment is greater than SIZE_MAX / 2 + 1 it cannot be a
++     power of 2 and will cause overflow in the check below.  */
++  if (alignment > SIZE_MAX / 2 + 1)
++    {
++      __set_errno (EINVAL);
++      return 0;
++    }
++
++  /* Check for overflow.  */
++  if (bytes > SIZE_MAX - alignment - MINSIZE)
++    {
++      __set_errno (ENOMEM);
++      return 0;
++    }
++
+   arena_get(ar_ptr, bytes + alignment + MINSIZE);
+   if(!ar_ptr)
+     return 0;
+@@ -3919,6 +3934,13 @@
+ 
+   size_t pagesz = mp_.pagesize;
+ 
++  /* Check for overflow.  */
++  if (bytes > SIZE_MAX - pagesz - MINSIZE)
++    {
++      __set_errno (ENOMEM);
++      return 0;
++    }
++
+   __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
+ 					__const __malloc_ptr_t)) =
+     force_reg (__memalign_hook);
+@@ -3967,6 +3989,13 @@
+   size_t page_mask = mp_.pagesize - 1;
+   size_t rounded_bytes = (bytes + page_mask) & ~(page_mask);
+ 
++  /* Check for overflow.  */
++  if (bytes > SIZE_MAX - 2*pagesz - MINSIZE)
++    {
++      __set_errno (ENOMEM);
++      return 0;
++    }
++
+   __malloc_ptr_t (*hook) __MALLOC_PMT ((size_t, size_t,
+ 					__const __malloc_ptr_t)) =
+     force_reg (__memalign_hook);
+--- a/malloc/hooks.c
++++ b/malloc/hooks.c
+@@ -404,10 +404,21 @@
+   if (alignment <= MALLOC_ALIGNMENT) return malloc_check(bytes, NULL);
+   if (alignment <  MINSIZE) alignment = MINSIZE;
+ 
+-  if (bytes+1 == 0) {
+-    MALLOC_FAILURE_ACTION;
+-    return NULL;
+-  }
++  /* If the alignment is greater than SIZE_MAX / 2 + 1 it cannot be a
++     power of 2 and will cause overflow in the check below.  */
++  if (alignment > SIZE_MAX / 2 + 1)
++    {
++      __set_errno (EINVAL);
++      return 0;
++    }
++
++  /* Check for overflow.  */
++  if (bytes > SIZE_MAX - alignment - MINSIZE)
++    {
++      MALLOC_FAILURE_ACTION;
++      return 0;
++    }
++
+   checked_request2size(bytes+1, nb);
+   (void)mutex_lock(&main_arena.mutex);
+   mem = (top_check() >= 0) ? _int_memalign(&main_arena, alignment, bytes+1) :
--- eglibc-2.13.orig/debian/patches/any/local-nss-upgrade.diff
+++ eglibc-2.13/debian/patches/any/local-nss-upgrade.diff
@@ -0,0 +1,33 @@
+# DP: This patch makes future upgrades easier. It resolves problems with
+# DP: running daemons having NSS modules upgraded out from under them.
+
+---
+ nss/nsswitch.c |   17 ++++++++++++++---
+ 1 file changed, 14 insertions(+), 3 deletions(-)
+
+--- a/nss/nsswitch.c
++++ b/nss/nsswitch.c
+@@ -409,9 +409,20 @@
+ 	      ni->library->lib_handle = __libc_dlopen (shlib_name);
+ 	      if (ni->library->lib_handle == NULL)
+ 		{
+-		  /* Failed to load the library.  */
+-		  ni->library->lib_handle = (void *) -1l;
+-		  __set_errno (saved_errno);
++		  /* Failed to load the library. Try a fallback.  */
++		  int n = __snprintf(shlib_name, shlen, "libnss_%s.so.%d.%d",
++				   ni->library->name, __GLIBC__, __GLIBC_MINOR__);
++		  if (n >= shlen)
++		    ni->library->lib_handle = NULL;
++		  else
++		    ni->library->lib_handle = __libc_dlopen (shlib_name);
++
++		  if (ni->library->lib_handle == NULL)
++		    {
++		      /* Ok, really fail now.  */
++		      ni->library->lib_handle = (void *) -1l;
++		      __set_errno (saved_errno);
++		    }
+ 		}
+ 	    }
+ 
--- eglibc-2.13.orig/debian/patches/any/cvs-CVE-2013-4237.diff
+++ eglibc-2.13/debian/patches/any/cvs-CVE-2013-4237.diff
@@ -0,0 +1,164 @@
+2013-10-10  David S. Miller  <davem@davemloft.net>
+
+	* sysdeps/posix/dirstream.h (struct __dirstream): Fix alignment of
+	directory block.
+
+2013-08-16  Florian Weimer  <fweimer@redhat.com>
+
+	[BZ #14699]
+	CVE-2013-4237
+	* sysdeps/posix/dirstream.h (struct __dirstream): Add errcode
+	member.
+	* sysdeps/posix/opendir.c (__alloc_dir): Initialize errcode
+	member.
+	* sysdeps/posix/rewinddir.c (rewinddir): Reset errcode member.
+	* sysdeps/posix/readdir_r.c (__READDIR_R): Enforce NAME_MAX limit.
+	Return delayed error code.  Remove GETDENTS_64BIT_ALIGNED
+	conditional.
+	* sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c: Do not define
+	GETDENTS_64BIT_ALIGNED.
+	* sysdeps/unix/sysv/linux/i386/readdir64_r.c: Likewise.
+	* manual/filesys.texi (Reading/Closing Directory): Document
+	ENAMETOOLONG return value of readdir_r.  Recommend readdir more
+	strongly.
+	* manual/conf.texi (Limits for Files): Add portability note to
+	NAME_MAX, PATH_MAX.
+	(Pathconf): Add portability note for _PC_NAME_MAX, _PC_PATH_MAX.
+
+--- a/sysdeps/unix/dirstream.h
++++ b/sysdeps/unix/dirstream.h
+@@ -40,8 +40,15 @@
+ 
+     off_t filepos;		/* Position of next entry to read.  */
+ 
+-    /* Directory block.  */
+-    char data[0] __attribute__ ((aligned (__alignof__ (void*))));
++    int errcode;		/* Delayed error code.  */
++
++    /* Directory block.  We must make sure that this block starts
++       at an address that is aligned adequately enough to store
++       dirent entries.  Using the alignment of "void *" is not
++       sufficient because dirents on 32-bit platforms can require
++       64-bit alignment.  We use "long double" here to be consistent
++       with what malloc uses.  */
++    char data[0] __attribute__ ((aligned (__alignof__ (long double))));
+   };
+ 
+ #define _DIR_dirfd(dirp)	((dirp)->fd)
+--- a/sysdeps/unix/opendir.c
++++ b/sysdeps/unix/opendir.c
+@@ -210,6 +210,7 @@
+   dirp->size = 0;
+   dirp->offset = 0;
+   dirp->filepos = 0;
++  dirp->errcode = 0;
+ 
+   return dirp;
+ }
+--- a/sysdeps/unix/readdir_r.c
++++ b/sysdeps/unix/readdir_r.c
+@@ -42,6 +42,7 @@
+   DIRENT_TYPE *dp;
+   size_t reclen;
+   const int saved_errno = errno;
++  int ret;
+ 
+   __libc_lock_lock (dirp->lock);
+ 
+@@ -72,10 +73,10 @@
+ 		  bytes = 0;
+ 		  __set_errno (saved_errno);
+ 		}
++	      if (bytes < 0)
++		dirp->errcode = errno;
+ 
+ 	      dp = NULL;
+-	      /* Reclen != 0 signals that an error occurred.  */
+-	      reclen = bytes != 0;
+ 	      break;
+ 	    }
+ 	  dirp->size = (size_t) bytes;
+@@ -108,29 +109,46 @@
+       dirp->filepos += reclen;
+ #endif
+ 
+-      /* Skip deleted files.  */
++#ifdef NAME_MAX
++      if (reclen > offsetof (DIRENT_TYPE, d_name) + NAME_MAX + 1)
++	{
++	  /* The record is very long.  It could still fit into the
++	     caller-supplied buffer if we can skip padding at the
++	     end.  */
++	  size_t namelen = _D_EXACT_NAMLEN (dp);
++	  if (namelen <= NAME_MAX)
++	    reclen = offsetof (DIRENT_TYPE, d_name) + namelen + 1;
++	  else
++	    {
++	      /* The name is too long.  Ignore this file.  */
++	      dirp->errcode = ENAMETOOLONG;
++	      dp->d_ino = 0;
++	      continue;
++	    }
++	}
++#endif
++
++      /* Skip deleted and ignored files.  */
+     }
+   while (dp->d_ino == 0);
+ 
+   if (dp != NULL)
+     {
+-#ifdef GETDENTS_64BIT_ALIGNED
+-      /* The d_reclen value might include padding which is not part of
+-	 the DIRENT_TYPE data structure.  */
+-      reclen = MIN (reclen,
+-		    offsetof (DIRENT_TYPE, d_name) + sizeof (dp->d_name));
+-#endif
+       *result = memcpy (entry, dp, reclen);
+-#ifdef GETDENTS_64BIT_ALIGNED
++#ifdef _DIRENT_HAVE_D_RECLEN
+       entry->d_reclen = reclen;
+ #endif
++      ret = 0;
+     }
+   else
+-    *result = NULL;
++    {
++      *result = NULL;
++      ret = dirp->errcode;
++    }
+ 
+   __libc_lock_unlock (dirp->lock);
+ 
+-  return dp != NULL ? 0 : reclen ? errno : 0;
++  return ret;
+ }
+ 
+ #ifdef __READDIR_R_ALIAS
+--- a/sysdeps/unix/rewinddir.c
++++ b/sysdeps/unix/rewinddir.c
+@@ -33,5 +33,6 @@
+   dirp->filepos = 0;
+   dirp->offset = 0;
+   dirp->size = 0;
++  dirp->errcode = 0;
+   __libc_lock_unlock (dirp->lock);
+ }
+--- a/sysdeps/unix/sysv/linux/i386/readdir64_r.c
++++ b/sysdeps/unix/sysv/linux/i386/readdir64_r.c
+@@ -19,7 +19,6 @@
+ #define __READDIR_R __readdir64_r
+ #define __GETDENTS __getdents64
+ #define DIRENT_TYPE struct dirent64
+-#define GETDENTS_64BIT_ALIGNED 1
+ 
+ #include <sysdeps/unix/readdir_r.c>
+ 
+--- a/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c
++++ b/sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c
+@@ -1,5 +1,4 @@
+ #define readdir64_r __no_readdir64_r_decl
+-#define GETDENTS_64BIT_ALIGNED 1
+ #include <sysdeps/unix/readdir_r.c>
+ #undef readdir64_r
+ weak_alias (__readdir_r, readdir64_r)
--- eglibc-2.13.orig/debian/patches/any/cvs-nl_langinfo-static.diff
+++ eglibc-2.13/debian/patches/any/cvs-nl_langinfo-static.diff
@@ -0,0 +1,97 @@
+2014-05-06  Aurelien Jarno  <aurelien@aurel32.net>
+ 
+	* locale/nl_langinfo_l.c: Make direct reference to every
+	_nl_current_CATEGORY symbol.
+	* localedata/Makefile (test-srcs): Add tst-langinfo-static.
+	(tests-static): Add tst-langinfo-static.
+	(tests-special): Add tst-langinfo-static.out.
+	($(objpfx)tst-langinfo.out): Redirect output.
+	($(objpfx)tst-langinfo-static.out): New.
+	* localedata/tst-langinfo.sh: Send output to stdout.
+	* localedata/tst-langinfo-static.c: New file.
+
+diff --git a/locale/nl_langinfo_l.c b/locale/nl_langinfo_l.c
+--- a/locale/nl_langinfo_l.c
++++ b/locale/nl_langinfo_l.c
+@@ -20,6 +20,7 @@
+ #include <locale.h>
+ #include <errno.h>
+ #include <stddef.h>
++#include <stdlib.h>
+ #include "localeinfo.h"
+
+
+@@ -43,7 +43,21 @@ __nl_langinfo_l (item, l)
+   if (index == _NL_ITEM_INDEX (_NL_LOCALE_NAME (category)))
+     return (char *) l->__names[category];
+ 
++#if defined NL_CURRENT_INDIRECT
++  /* Make direct reference to every _nl_current_CATEGORY symbol,
++     since we know only at runtime which categories are used.  */
++  switch (category)
++    {
++# define DEFINE_CATEGORY(category, category_name, items, a) \
++      case category: data = *_nl_current_##category; break;
++# include "categories.def"
++# undef DEFINE_CATEGORY
++    default:                   /* Should be impossible.  */
++      abort();
++    }
++#else
+   data = l->__locales[category];
++#endif
+ 
+   if (index >= data->nstrings)
+     /* Bogus index for this category: bogus item.  */
+diff --git a/localedata/Makefile b/localedata/Makefile
+--- a/localedata/Makefile
++++ b/localedata/Makefile
+@@ -50,7 +50,7 @@
+ 
+ test-srcs := collate-test xfrm-test tst-fmon tst-rpmatch tst-trans \
+ 	     tst-mbswcs1 tst-mbswcs2 tst-mbswcs3 tst-mbswcs4 tst-mbswcs5 \
+-	     tst-ctype tst-wctype tst-langinfo tst-numeric
++	     tst-ctype tst-wctype tst-langinfo tst-langinfo-static tst-numeric
+ test-input := de_DE.ISO-8859-1 en_US.ISO-8859-1 da_DK.ISO-8859-1 \
+ 	      hr_HR.ISO-8859-2 sv_SE.ISO-8859-1 tr_TR.UTF-8 fr_FR.UTF-8 \
+ 	      si_LK.UTF-8
+@@ -178,7 +178,8 @@
+ tests: $(objpfx)sort-test.out $(objpfx)tst-fmon.out $(objpfx)tst-locale.out \
+        $(objpfx)tst-rpmatch.out $(objpfx)tst-trans.out \
+        $(objpfx)tst-mbswcs.out $(objpfx)tst-ctype.out \
+-       $(objpfx)tst-langinfo.out $(objpfx)tst-numeric.out
++       $(objpfx)tst-langinfo.out $(objpfx)tst-langinfo-static.out\
++       $(objpfx)tst-numeric.out
+ ifeq (y,$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO))
+ tests: $(objpfx)tst-wctype.out
+ endif
+@@ -224,7 +225,11 @@
+ $(objpfx)tst-langinfo.out: tst-langinfo.sh $(objpfx)tst-langinfo \
+ 			$(objpfx)sort-test.out \
+ 			$(addprefix $(objpfx),$(CTYPE_FILES))
+-	$(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)'
++	$(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)' > $@
++$(objpfx)tst-langinfo-static.out: tst-langinfo.sh $(objpfx)tst-langinfo-static \
++			$(objpfx)sort-test.out \
++			$(addprefix $(objpfx),$(CTYPE_FILES))
++	$(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)' > $@
+ $(objpfx)tst-digits.out: $(objpfx)tst-locale.out
+ $(objpfx)tst-mbswcs6.out: $(addprefix $(objpfx),$(CTYPE_FILES))
+ # eglibc: endif
+diff --git a/localedata/tst-langinfo-static.c b/localedata/tst-langinfo-static.c
+--- /dev/null
++++ b/localedata/tst-langinfo-static.c
+@@ -0,0 +1 @@
++#include "tst-langinfo.c"
+diff --git a/localedata/tst-langinfo.sh b/localedata/tst-langinfo.sh
+--- a/localedata/tst-langinfo.sh
++++ b/localedata/tst-langinfo.sh
+@@ -341,7 +341,6 @@
+ EOF
+ LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \
+ LC_ALL=tt_TT ${run_program_prefix} \
+-  ${common_objpfx}localedata/tst-langinfo \
+-    > ${common_objpfx}localedata/tst-langinfo.out
++  ${common_objpfx}localedata/tst-langinfo
+ 
+ exit $?
--- eglibc-2.13.orig/debian/patches/any/submitted-mqueue-throw.diff
+++ eglibc-2.13/debian/patches/any/submitted-mqueue-throw.diff
@@ -0,0 +1,43 @@
+2011-06-04  Jakub Jelinek  <jakub@redhat.com>
+
+	[BZ #12841]
+	* rt/bits/mqueue2.h (__mq_open_2): Add __THROW.
+	(__mq_open_alias): Use __REDIRECT_NTH instead of __REDIRECT.
+	(mq_open): Add __NTH.
+
+---
+ rt/bits/mqueue2.h |   12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+--- a/rt/bits/mqueue2.h
++++ b/rt/bits/mqueue2.h
+@@ -1,5 +1,5 @@
+ /* Checking macros for mq functions.
+-   Copyright (C) 2007 Free Software Foundation, Inc.
++   Copyright (C) 2007, 2011 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+@@ -25,16 +25,18 @@
+    parameter.  */
+ extern mqd_t mq_open (__const char *__name, int __oflag, ...)
+      __THROW __nonnull ((1));
+-extern mqd_t __mq_open_2 (__const char *__name, int __oflag) __nonnull ((1));
+-extern mqd_t __REDIRECT (__mq_open_alias, (__const char *__name, int __oflag, ...),
+-			 mq_open) __nonnull ((1));
++extern mqd_t __mq_open_2 (__const char *__name, int __oflag)
++     __THROW __nonnull ((1));
++extern mqd_t __REDIRECT_NTH (__mq_open_alias, (__const char *__name,
++					       int __oflag, ...), mq_open)
++     __nonnull ((1));
+ __errordecl (__mq_open_wrong_number_of_args,
+ 	     "mq_open can be called either with 2 or 4 arguments");
+ __errordecl (__mq_open_missing_mode_and_attr,
+ 	     "mq_open with O_CREAT in second argument needs 4 arguments");
+ 
+ __extern_always_inline mqd_t
+-mq_open (__const char *__name, int __oflag, ...)
++__NTH (mq_open (__const char *__name, int __oflag, ...))
+ {
+   if (__va_arg_pack_len () != 0 && __va_arg_pack_len () != 2)
+     __mq_open_wrong_number_of_args ();
--- eglibc-2.13.orig/debian/patches/any/local-dlfptr.diff
+++ eglibc-2.13/debian/patches/any/local-dlfptr.diff
@@ -0,0 +1,57 @@
+---
+ elf/dl-fptr.c             |   18 +++++++++++++++++-
+ sysdeps/generic/dl-fptr.h |    3 +++
+ 2 files changed, 20 insertions(+), 1 deletion(-)
+
+--- a/elf/dl-fptr.c
++++ b/elf/dl-fptr.c
+@@ -1,5 +1,5 @@
+ /* Manage function descriptors.  Generic version.
+-   Copyright (C) 1999-2004, 2006 Free Software Foundation, Inc.
++   Copyright (C) 1999-2004, 2006, 2010 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+@@ -56,7 +56,12 @@
+   }
+ local =
+   {
++#ifndef SHARED
+     .root = &local.boot_table,
++#else
++    /* Address of .boot_table is not known until runtime.  */
++    .root = 0,
++#endif
+     .npages = 2,
+     .boot_table =
+       {
+@@ -93,6 +98,17 @@
+   return new_table;
+ }
+ 
++/* Must call _dl_fptr_init before using any other function.  */
++void 
++_dl_fptr_init (void)
++{
++  struct local *l;
++
++  ELF_MACHINE_LOAD_ADDRESS (l, local);
++  /* Initialize root once.  */
++  if (__builtin_expect (l->root == 0, 0))
++    l->root = &l->boot_table;
++}
+ 
+ static ElfW(Addr)
+ make_fdesc (ElfW(Addr) ip, ElfW(Addr) gp)
+--- a/sysdeps/generic/dl-fptr.h
++++ b/sysdeps/generic/dl-fptr.h
+@@ -40,6 +40,9 @@
+ 
+ extern ElfW(Addr) _dl_boot_fptr_table [];
+ 
++/* Must be called before any other function.  */
++extern void _dl_fptr_init (void);
++
+ extern ElfW(Addr) _dl_make_fptr (struct link_map *, const ElfW(Sym) *,
+ 				 ElfW(Addr));
+ 
--- eglibc-2.13.orig/debian/patches/any/submitted-stack-guard-quick-randomization.diff
+++ eglibc-2.13/debian/patches/any/submitted-stack-guard-quick-randomization.diff
@@ -0,0 +1,115 @@
+Description: when AT_RANDOM is not available, attempt to build randomization
+ of stack guard value from the ASLR of stack and heap locations, and finally
+ the hp_timing_t value.  Upstream glibc does not want this patch, as they
+ feel AT_RANDOM is sufficient.
+Author: Jakub Jelinek
+Origin: http://cvs.fedora.redhat.com/viewvc/devel/glibc/
+Forwarded: not-needed
+
+---
+ elf/tst-stackguard1.c               |    8 ++++++--
+ nptl/tst-stackguard1.c              |    8 ++++++--
+ sysdeps/unix/sysv/linux/dl-osinfo.h |   29 +++++++++++++++++++++++++++++
+ 3 files changed, 41 insertions(+), 4 deletions(-)
+
+--- a/sysdeps/unix/sysv/linux/dl-osinfo.h
++++ b/sysdeps/unix/sysv/linux/dl-osinfo.h
+@@ -17,10 +17,13 @@
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
++#include <errno.h>
+ #include <kernel-features.h>
+ #include <dl-sysdep.h>
+ #include <fcntl.h>
+ #include <stdint.h>
++#include <hp-timing.h>
++#include <endian.h>
+ 
+ #ifndef MIN
+ # define MIN(a,b) (((a)<(b))?(a):(b))
+@@ -80,6 +83,32 @@
+       unsigned char *p = (unsigned char *) &ret;
+       p[sizeof (ret) - 1] = 255;
+       p[sizeof (ret) - 2] = '\n';
++#ifdef HP_TIMING_NOW
++      hp_timing_t hpt;
++      HP_TIMING_NOW (hpt);
++      hpt = (hpt & 0xffff) << 8;
++      ret ^= hpt;
++#endif
++      uintptr_t stk;
++      /* Avoid GCC being too smart.  */
++      asm ("" : "=r" (stk) : "r" (p));
++      stk &= 0x7ffff0;
++#if __BYTE_ORDER == __LITTLE_ENDIAN
++      stk <<= (__WORDSIZE - 23);
++#elif __WORDSIZE == 64
++      stk <<= 31;
++#endif
++      ret ^= stk;
++      /* Avoid GCC being too smart.  */
++      p = (unsigned char *) &errno;
++      asm ("" : "=r" (stk) : "r" (p));
++      stk &= 0x7fff00;
++#if __BYTE_ORDER == __LITTLE_ENDIAN
++      stk <<= (__WORDSIZE - 29);
++#else
++      stk >>= 8;
++#endif
++      ret ^= stk;
+     }
+   else
+ #endif
+--- a/elf/tst-stackguard1.c
++++ b/elf/tst-stackguard1.c
+@@ -160,17 +160,21 @@
+      the 16 runs, something is very wrong.  */
+   int ndifferences = 0;
+   int ndefaults = 0;
++  int npartlyrandomized = 0;
+   for (i = 0; i < N; ++i) 
+     {
+       if (child_stack_chk_guards[i] != child_stack_chk_guards[i+1])
+ 	ndifferences++;
+       else if (child_stack_chk_guards[i] == default_guard)
+ 	ndefaults++;
++      else if (*(char *) &child_stack_chk_guards[i] == 0)
++	npartlyrandomized++;
+     }
+ 
+-  printf ("differences %d defaults %d\n", ndifferences, ndefaults);
++  printf ("differences %d defaults %d partly randomized %d\n",
++	  ndifferences, ndefaults, npartlyrandomized);
+ 
+-  if (ndifferences < N / 2 && ndefaults < N / 2)
++  if ((ndifferences + ndefaults + npartlyrandomized) < 3 * N / 4)
+     {
+       puts ("stack guard canaries are not randomized enough");
+       puts ("nor equal to the default canary value");
+--- a/nptl/tst-stackguard1.c
++++ b/nptl/tst-stackguard1.c
+@@ -190,17 +190,21 @@
+      the 16 runs, something is very wrong.  */
+   int ndifferences = 0;
+   int ndefaults = 0;
++  int npartlyrandomized = 0;
+   for (i = 0; i < N; ++i) 
+     {
+       if (child_stack_chk_guards[i] != child_stack_chk_guards[i+1])
+ 	ndifferences++;
+       else if (child_stack_chk_guards[i] == default_guard)
+ 	ndefaults++;
++      else if (*(char *) &child_stack_chk_guards[i] == 0)
++	npartlyrandomized++;
+     }
+ 
+-  printf ("differences %d defaults %d\n", ndifferences, ndefaults);
++  printf ("differences %d defaults %d partly randomized %d\n",
++	  ndifferences, ndefaults, npartlyrandomized);
+ 
+-  if (ndifferences < N / 2 && ndefaults < N / 2)
++  if ((ndifferences + ndefaults + npartlyrandomized) < 3 * N / 4)
+     {
+       puts ("stack guard canaries are not randomized enough");
+       puts ("nor equal to the default canary value");
--- eglibc-2.13.orig/debian/patches/any/cvs-CVE-2014-5119.diff
+++ eglibc-2.13/debian/patches/any/cvs-CVE-2014-5119.diff
@@ -0,0 +1,199 @@
+commit a1a6a401ab0a3c9f15fb7eaebbdcee24192254e8
+Author: Florian Weimer <fweimer@redhat.com>
+Date:   Tue Aug 26 19:38:59 2014 +0200
+
+    __gconv_translit_find: Disable function [BZ #17187]
+    
+    This functionality has never worked correctly, and the implementation
+    contained a security vulnerability (CVE-2014-5119).
+
+diff --git a/iconv/gconv_trans.c b/iconv/gconv_trans.c
+index 1e25854..e0835fc 100644
+--- a/iconv/gconv_trans.c
++++ b/iconv/gconv_trans.c
+@@ -242,181 +242,12 @@ __gconv_transliterate (struct __gconv_step *step,
+   return __GCONV_ILLEGAL_INPUT;
+ }
+ 
+-
+-/* Structure to represent results of found (or not) transliteration
+-   modules.  */
+-struct known_trans
+-{
+-  /* This structure must remain the first member.  */
+-  struct trans_struct info;
+-
+-  char *fname;
+-  void *handle;
+-  int open_count;
+-};
+-
+-
+-/* Tree with results of previous calls to __gconv_translit_find.  */
+-static void *search_tree;
+-
+-/* We modify global data.   */
+-__libc_lock_define_initialized (static, lock);
+-
+-
+-/* Compare two transliteration entries.  */
+-static int
+-trans_compare (const void *p1, const void *p2)
+-{
+-  const struct known_trans *s1 = (const struct known_trans *) p1;
+-  const struct known_trans *s2 = (const struct known_trans *) p2;
+-
+-  return strcmp (s1->info.name, s2->info.name);
+-}
+-
+-
+-/* Open (maybe reopen) the module named in the struct.  Get the function
+-   and data structure pointers we need.  */
+-static int
+-open_translit (struct known_trans *trans)
+-{
+-  __gconv_trans_query_fct queryfct;
+-
+-  trans->handle = __libc_dlopen (trans->fname);
+-  if (trans->handle == NULL)
+-    /* Not available.  */
+-    return 1;
+-
+-  /* Find the required symbol.  */
+-  queryfct = __libc_dlsym (trans->handle, "gconv_trans_context");
+-  if (queryfct == NULL)
+-    {
+-      /* We cannot live with that.  */
+-    close_and_out:
+-      __libc_dlclose (trans->handle);
+-      trans->handle = NULL;
+-      return 1;
+-    }
+-
+-  /* Get the context.  */
+-  if (queryfct (trans->info.name, &trans->info.csnames, &trans->info.ncsnames)
+-      != 0)
+-    goto close_and_out;
+-
+-  /* Of course we also have to have the actual function.  */
+-  trans->info.trans_fct = __libc_dlsym (trans->handle, "gconv_trans");
+-  if (trans->info.trans_fct == NULL)
+-    goto close_and_out;
+-
+-  /* Now the optional functions.  */
+-  trans->info.trans_init_fct =
+-    __libc_dlsym (trans->handle, "gconv_trans_init");
+-  trans->info.trans_context_fct =
+-    __libc_dlsym (trans->handle, "gconv_trans_context");
+-  trans->info.trans_end_fct =
+-    __libc_dlsym (trans->handle, "gconv_trans_end");
+-
+-  trans->open_count = 1;
+-
+-  return 0;
+-}
+-
+-
+ int
+ internal_function
+ __gconv_translit_find (struct trans_struct *trans)
+ {
+-  struct known_trans **found;
+-  const struct path_elem *runp;
+-  int res = 1;
+-
+-  /* We have to have a name.  */
+-  assert (trans->name != NULL);
+-
+-  /* Acquire the lock.  */
+-  __libc_lock_lock (lock);
+-
+-  /* See whether we know this module already.  */
+-  found = __tfind (trans, &search_tree, trans_compare);
+-  if (found != NULL)
+-    {
+-      /* Is this module available?  */
+-      if ((*found)->handle != NULL)
+-	{
+-	  /* Maybe we have to reopen the file.  */
+-	  if ((*found)->handle != (void *) -1)
+-	    /* The object is not unloaded.  */
+-	    res = 0;
+-	  else if (open_translit (*found) == 0)
+-	    {
+-	      /* Copy the data.  */
+-	      *trans = (*found)->info;
+-	      (*found)->open_count++;
+-	      res = 0;
+-	    }
+-	}
+-    }
+-  else
+-    {
+-      size_t name_len = strlen (trans->name) + 1;
+-      int need_so = 0;
+-      struct known_trans *newp;
+-
+-      /* We have to continue looking for the module.  */
+-      if (__gconv_path_elem == NULL)
+-	__gconv_get_path ();
+-
+-      /* See whether we have to append .so.  */
+-      if (name_len <= 4 || memcmp (&trans->name[name_len - 4], ".so", 3) != 0)
+-	need_so = 1;
+-
+-      /* Create a new entry.  */
+-      newp = (struct known_trans *) malloc (sizeof (struct known_trans)
+-					    + (__gconv_max_path_elem_len
+-					       + name_len + 3)
+-					    + name_len);
+-      if (newp != NULL)
+-	{
+-	  char *cp;
+-
+-	  /* Clear the struct.  */
+-	  memset (newp, '\0', sizeof (struct known_trans));
+-
+-	  /* Store a copy of the module name.  */
+-	  newp->info.name = cp = (char *) (newp + 1);
+-	  cp = __mempcpy (cp, trans->name, name_len);
+-
+-	  newp->fname = cp;
+-
+-	  /* Search in all the directories.  */
+-	  for (runp = __gconv_path_elem; runp->name != NULL; ++runp)
+-	    {
+-	      cp = __mempcpy (__stpcpy ((char *) newp->fname, runp->name),
+-			      trans->name, name_len);
+-	      if (need_so)
+-		memcpy (cp, ".so", sizeof (".so"));
+-
+-	      if (open_translit (newp) == 0)
+-		{
+-		  /* We found a module.  */
+-		  res = 0;
+-		  break;
+-		}
+-	    }
+-
+-	  if (res)
+-	    newp->fname = NULL;
+-
+-	  /* In any case we'll add the entry to our search tree.  */
+-	  if (__tsearch (newp, &search_tree, trans_compare) == NULL)
+-	    {
+-	      /* Yickes, this should not happen.  Unload the object.  */
+-	      res = 1;
+-	      /* XXX unload here.  */
+-	    }
+-	}
+-    }
+-
+-  __libc_lock_unlock (lock);
+-
+-  return res;
++  /* Transliteration module loading has been removed because it never
++     worked as intended and suffered from a security vulnerability.
++     Consequently, this function always fails.  */
++  return 1;
+ }
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-lowlevellock.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-lowlevellock.diff
@@ -0,0 +1,160 @@
+---
+ linuxthreads/sysdeps/unix/sysv/linux/rtld-lowlevel.h |  153 +++++++++++++++++++
+ 1 file changed, 153 insertions(+)
+
+--- /dev/null
++++ b/linuxthreads/sysdeps/unix/sysv/linux/rtld-lowlevel.h
+@@ -0,0 +1,153 @@
++/* Defintions for lowlevel handling in ld.so.
++   Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _RTLD_LOWLEVEL_H
++#define  _RTLD_LOWLEVEL_H 1
++
++#include <atomic.h>
++#include <lowlevellock.h>
++
++
++/* Special multi-reader lock used in ld.so.  */
++#define __RTLD_MRLOCK_WRITER 1
++#define __RTLD_MRLOCK_RWAIT 2
++#define __RTLD_MRLOCK_WWAIT 4
++#define __RTLD_MRLOCK_RBITS \
++  ~(__RTLD_MRLOCK_WRITER | __RTLD_MRLOCK_RWAIT | __RTLD_MRLOCK_WWAIT)
++#define __RTLD_MRLOCK_INC 8
++#define __RTLD_MRLOCK_TRIES 5
++
++
++typedef int __rtld_mrlock_t;
++
++
++#define __rtld_mrlock_define(CLASS,NAME) \
++  CLASS __rtld_mrlock_t NAME;
++
++
++#define _RTLD_MRLOCK_INITIALIZER 0
++#define __rtld_mrlock_initialize(NAME) \
++  (void) ((NAME) = 0)
++
++
++#define __rtld_mrlock_lock(lock) \
++  do {									      \
++    __label__ out;							      \
++    while (1)								      \
++      {									      \
++	int oldval;							      \
++	for (int tries = 0; tries < __RTLD_MRLOCK_TRIES; ++tries)	      \
++	  {								      \
++	    oldval = lock;						      \
++	    while (__builtin_expect ((oldval				      \
++				      & (__RTLD_MRLOCK_WRITER		      \
++					 | __RTLD_MRLOCK_WWAIT))	      \
++				     == 0, 1))				      \
++	      {								      \
++		int newval = ((oldval & __RTLD_MRLOCK_RBITS)		      \
++			      + __RTLD_MRLOCK_INC);			      \
++		int ret = atomic_compare_and_exchange_val_acq (&(lock),	      \
++							       newval,	      \
++							       oldval);	      \
++		if (__builtin_expect (ret == oldval, 1))		      \
++		  goto out;						      \
++		oldval = ret;						      \
++	      }								      \
++	    atomic_delay ();						      \
++	  }								      \
++	if ((oldval & __RTLD_MRLOCK_RWAIT) == 0)			      \
++	  {								      \
++	    atomic_or (&(lock), __RTLD_MRLOCK_RWAIT);			      \
++	    oldval |= __RTLD_MRLOCK_RWAIT;				      \
++	  }								      \
++	lll_futex_wait (lock, oldval);					      \
++      }									      \
++  out:;									      \
++  } while (0)
++
++
++#define __rtld_mrlock_unlock(lock) \
++  do {									      \
++    int oldval = atomic_exchange_and_add (&(lock), -__RTLD_MRLOCK_INC);	      \
++    if (__builtin_expect ((oldval					      \
++			   & (__RTLD_MRLOCK_RBITS | __RTLD_MRLOCK_WWAIT))     \
++			  == (__RTLD_MRLOCK_INC | __RTLD_MRLOCK_WWAIT), 0))   \
++      /* We have to wake all threads since there might be some queued	      \
++	 readers already.  */						      \
++      lll_futex_wake (&(lock), 0x7fffffff);				      \
++  } while (0)
++
++
++/* There can only ever be one thread trying to get the exclusive lock.  */
++#define __rtld_mrlock_change(lock) \
++  do {									      \
++    __label__ out;							      \
++    while (1)								      \
++      {									      \
++	int oldval;							      \
++	for (int tries = 0; tries < __RTLD_MRLOCK_TRIES; ++tries)	      \
++	  {								      \
++	    oldval = lock;						      \
++	    while (__builtin_expect ((oldval & __RTLD_MRLOCK_RBITS) == 0, 1)) \
++	      {								      \
++		int newval = ((oldval & __RTLD_MRLOCK_RWAIT)		      \
++			      + __RTLD_MRLOCK_WRITER);			      \
++		int ret = atomic_compare_and_exchange_val_acq (&(lock),	      \
++							       newval,	      \
++							       oldval);	      \
++		if (__builtin_expect (ret == oldval, 1))		      \
++		  goto out;						      \
++		oldval = ret;						      \
++	      }								      \
++	    atomic_delay ();						      \
++	  }								      \
++	atomic_or (&(lock), __RTLD_MRLOCK_WWAIT);			      \
++	oldval |= __RTLD_MRLOCK_WWAIT;					      \
++	lll_futex_wait (lock, oldval);					      \
++      }									      \
++  out:;									      \
++  } while (0)
++
++
++#define __rtld_mrlock_done(lock) \
++  do {				 \
++    int oldval = atomic_exchange_and_add (&(lock), -__RTLD_MRLOCK_WRITER);    \
++    if (__builtin_expect ((oldval & __RTLD_MRLOCK_RWAIT) != 0, 0))	      \
++      lll_futex_wake (&(lock), 0x7fffffff);				      \
++  } while (0)
++
++
++/* Function to wait for variable become zero.  Used in ld.so for
++   reference counters.  */
++#define __rtld_waitzero(word) \
++  do {									      \
++    while (1)								      \
++      {									      \
++	int val = word;							      \
++	if (val == 0)							      \
++	  break;							      \
++	lll_futex_wait (&(word), val);					      \
++      }									      \
++  } while (0)
++
++
++#define __rtld_notify(word) \
++  lll_futex_wake (&(word), 1)
++
++#endif
--- eglibc-2.13.orig/debian/patches/any/cvs-fnmatch.diff
+++ eglibc-2.13/debian/patches/any/cvs-fnmatch.diff
@@ -0,0 +1,37 @@
+2011-03-18  Ulrich Drepper  <drepper@gmail.com>
+
+	* posix/fnmatch.c (fnmatch): Check size of pattern in wide
+	character representation.
+	Partly based on a patch by Tomas Hoger <thoger@redhat.com>.
+
+---
+ posix/fnmatch.c |   11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/posix/fnmatch.c
++++ b/posix/fnmatch.c
+@@ -379,6 +379,11 @@
+ 	       XXX Do we have to set `errno' to something which mbsrtows hasn't
+ 	       already done?  */
+ 	    return -1;
++	  if (__builtin_expect (n >= (size_t) -1 / sizeof (wchar_t), 0))
++	    {
++	      __set_errno (ENOMEM);
++	      return -2;
++	    }
+ 	  wpattern_malloc = wpattern
+ 	    = (wchar_t *) malloc ((n + 1) * sizeof (wchar_t));
+ 	  assert (mbsinit (&ps));
+@@ -423,6 +428,12 @@
+ 	       XXX Do we have to set `errno' to something which mbsrtows hasn't
+ 	       already done?  */
+ 	    goto free_return;
++	  if (__builtin_expect (n >= (size_t) -1 / sizeof (wchar_t), 0))
++	    {
++	      free (wpattern_malloc);
++	      __set_errno (ENOMEM);
++	      return -2;
++	    }
+ 
+ 	  wstring_malloc = wstring
+ 	    = (wchar_t *) malloc ((n + 1) * sizeof (wchar_t));
--- eglibc-2.13.orig/debian/patches/any/local-tst-eintr1-eagain.diff
+++ eglibc-2.13/debian/patches/any/local-tst-eintr1-eagain.diff
@@ -0,0 +1,25 @@
+2012-06-06  Jonathan Nieder  <jrnieder@gmail.com>
+
+	* nptl/tst-eintr1.c (tf1): Tolerate EAGAIN from pthread_create.
+
+---
+
+--- a/nptl/tst-eintr1.c
++++ b/nptl/tst-eintr1.c
+@@ -49,6 +49,16 @@
+ 	      puts ("pthread_create returned EINTR");
+ 	      exit (1);
+ 	    }
++	  if (e == EAGAIN)
++	    {
++	      /* The kernel might not have processed the last few
++	         pthread_join()s yet.  Tolerate that, but record the
++	         event in test output so attentive people reading
++	         logs can notice if pthread_join() stops working
++	         altogether.  */
++	      write (STDOUT_FILENO, "!", 1);
++	      continue;
++	    }
+ 
+ 	  char buf[100];
+ 	  printf ("tf1: pthread_create failed: %s\n",
--- eglibc-2.13.orig/debian/patches/any/local-stdio-lock.diff
+++ eglibc-2.13/debian/patches/any/local-stdio-lock.diff
@@ -0,0 +1,32 @@
+---
+ bits/stdio-lock.h |   17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+--- a/bits/stdio-lock.h
++++ b/bits/stdio-lock.h
+@@ -47,12 +47,21 @@
+ 
+ #if defined _LIBC && !defined NOT_IN_libc
+ # define _IO_acquire_lock(_fp) \
+-  _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp));      \
+-  _IO_flockfile (_fp)
++  { \
++  _IO_FILE *_IO_acquire_lock_file = _fp; \
++  __libc_cleanup_region_start (1, (void (*) (void *)) _IO_acquire_lock_fct, &_IO_acquire_lock_file); \
++  _IO_flockfile (_IO_acquire_lock_file)
++
++# define _IO_acquire_lock_clear_flags2(_fp) \
++  { \
++  _IO_FILE *_IO_acquire_lock_file = _fp; \
++  __libc_cleanup_region_start (1, (void (*) (void *)) _IO_acquire_lock_clear_flags2_fct, &_IO_acquire_lock_file); \
++  _IO_flockfile (_IO_acquire_lock_file)
+ 
+ # define _IO_release_lock(_fp) \
+-  _IO_funlockfile (_fp);						      \
+-  _IO_cleanup_region_end (0)
++  __libc_cleanup_region_end (1); \
++   }
++   
+ #endif
+ 
+ #endif /* bits/stdio-lock.h */
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-gscope.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-gscope.diff
@@ -0,0 +1,38 @@
+---
+ linuxthreads/descr.h |   12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/linuxthreads/descr.h
++++ b/linuxthreads/descr.h
+@@ -23,6 +23,7 @@
+ #include <stdint.h>
+ #include <sys/types.h>
+ #include <hp-timing.h>
++#include <lowlevellock.h>
+ #include <tls.h>
+ 
+ /* Fast thread-specific data internal to libc.  */
+@@ -123,12 +124,23 @@
+       uintptr_t sysinfo;
+       uintptr_t stack_guard;
+       uintptr_t pointer_guard;
++# ifdef __FreeBSD_kernel__
++      long gscope_flag;
++# else
++      int gscope_flag;
++# endif
+     } data;
+     void *__padding[16];
+   } p_header;
+ # define p_multiple_threads p_header.data.multiple_threads
++# define p_gscope_flag p_header.data.gscope_flag
+ #elif TLS_MULTIPLE_THREADS_IN_TCB
+   int p_multiple_threads;
++# ifdef __FreeBSD_kernel__
++  long p_gscope_flag;
++# else
++  int p_gscope_flag;
++# endif
+ #endif
+ 
+   pthread_descr p_nextlive, p_prevlive;
--- eglibc-2.13.orig/debian/patches/any/cvs-getaddrinfo-single-lookup.diff
+++ eglibc-2.13/debian/patches/any/cvs-getaddrinfo-single-lookup.diff
@@ -0,0 +1,49 @@
+2011-06-27  Ulrich Drepper  <drepper@gmail.com>
+ 
+	[BZ #12350]
+	* nscd/aicache.c (addhstaiX):  Restore only RES_USE_INET6
+	bit from old_res_options.
+
+2011-05-29  Ulrich Drepper  <drepper@gmail.com>
+ 
+	[BZ #12350]
+	* sysdeps/posix/getaddrinfo.c (gethosts): Restore only RES_USE_IENT6
+	bit from old_res_options.
+	(gaih_inet): Likewise.
+
+---
+ nscd/aicache.c              |    2 +-
+ sysdeps/posix/getaddrinfo.c |    4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -207,7 +207,7 @@
+       if (herrno == NETDB_INTERNAL)					      \
+ 	{								      \
+ 	  __set_h_errno (herrno);					      \
+-	  _res.options = old_res_options;				      \
++	  _res.options |= old_res_options & RES_USE_INET6;		      \
+ 	  return -EAI_SYSTEM;						      \
+ 	}								      \
+       if (herrno == TRY_AGAIN)						      \
+@@ -844,7 +844,7 @@
+ 		nip = nip->next;
+ 	    }
+ 
+-	  _res.options = old_res_options;
++	  _res.options |= old_res_options & RES_USE_INET6;
+ 
+ 	  if (no_data != 0 && no_inet6_data != 0)
+ 	    {
+--- a/nscd/aicache.c
++++ b/nscd/aicache.c
+@@ -528,7 +528,7 @@
+    }
+ 
+  out:
+-  _res.options = old_res_options;
++  _res.options |= old_res_options & RES_USE_INET6;
+ 
+   if (dataset != NULL && !alloca_used)
+     {
--- eglibc-2.13.orig/debian/patches/any/submitted-getaddrinfo-lo.diff
+++ eglibc-2.13/debian/patches/any/submitted-getaddrinfo-lo.diff
@@ -0,0 +1,27 @@
+2009-03-15  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/posix/getaddrinfo.c (getaddrinfo): correctly detect 
+	interface for all 127.X.Y.Z addresses.
+
+---
+ sysdeps/posix/getaddrinfo.c |    9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -2265,7 +2265,14 @@
+ 			  tmp.addr[0] = 0;
+ 			  tmp.addr[1] = 0;
+ 			  tmp.addr[2] = htonl (0xffff);
+-			  tmp.addr[3] = sinp->sin_addr.s_addr;
++			  /* Special case for lo interface, the source address
++			     being possibly different than the interface 
++			     address. */
++			  if ((ntohl(sinp->sin_addr.s_addr) & 0xff000000)
++			      == 0x7f000000)
++			    tmp.addr[3] = htonl(0x7f000001);
++			  else
++			    tmp.addr[3] = sinp->sin_addr.s_addr;
+ 			}
+ 		      else
+ 			{
--- eglibc-2.13.orig/debian/patches/any/submitted-clock-settime.diff
+++ eglibc-2.13/debian/patches/any/submitted-clock-settime.diff
@@ -0,0 +1,16 @@
+http://sourceware.org/bugzilla/show_bug.cgi?id=4026
+
+---
+ sysdeps/unix/sysv/linux/clock_settime.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sysdeps/unix/sysv/linux/clock_settime.c
++++ b/sysdeps/unix/sysv/linux/clock_settime.c
+@@ -18,6 +18,7 @@
+ 
+ #include <errno.h>
+ #include <sysdep.h>
++#include <time.h>
+ 
+ #include "kernel-posix-cpu-timers.h"
+ #include <kernel-features.h>
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-tst-sighandler.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-tst-sighandler.diff
@@ -0,0 +1,15 @@
+---
+ linuxthreads/Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/linuxthreads/Makefile
++++ b/linuxthreads/Makefile
+@@ -111,7 +111,7 @@
+ 	ex17 ex18 tst-cancel tst-context bug-sleep \
+ 	tst-cancel1 tst-cancel2 tst-cancel3 tst-cancel4 tst-cancel5 \
+ 	tst-cancel6 tst-cancel7 tst-cancel8 tst-popen tst-popen2 tst-attr1 \
+-	tst-stack1 tst-align tst-tsd1 tst-sighandler1 tst-sighandler2
++	tst-stack1 tst-align tst-tsd1
+ test-srcs = tst-signal
+ # These tests are linked with libc before libpthread
+ tests-reverse += tst-cancel5
--- eglibc-2.13.orig/debian/patches/any/cvs-vfprintf-positional.diff
+++ eglibc-2.13/debian/patches/any/cvs-vfprintf-positional.diff
@@ -0,0 +1,20 @@
+2011-01-27  Petr Baudis  <pasky@suse.cz>
+	    Ulrich Drepper  <drepper@gmail.com>
+
+	* stdio-common/vfprintf.c (vfprintf): Pass correct newlen
+	to extend_alloca().
+ 
+diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
+index fc370e8..cfa4c30 100644
+--- a/stdio-common/vfprintf.c
++++ b/stdio-common/vfprintf.c
+@@ -1682,7 +1682,8 @@ do_positional:
+ 	  {
+ 	    /* Extend the array of format specifiers.  */
+ 	    struct printf_spec *old = specs;
+-	    specs = extend_alloca (specs, nspecs_max, 2 * nspecs_max);
++	    specs = extend_alloca (specs, nspecs_max,
++				   2 * nspecs_max * sizeof (*specs));
+ 
+ 	    /* Copy the old array's elements to the new space.  */
+ 	    memmove (specs, old, nspecs * sizeof (struct printf_spec));
--- eglibc-2.13.orig/debian/patches/any/cvs-wordexp.diff
+++ eglibc-2.13/debian/patches/any/cvs-wordexp.diff
@@ -0,0 +1,149 @@
+2014-11-19  Carlos O'Donell  <carlos@redhat.com>
+	    Florian Weimer  <fweimer@redhat.com>
+	    Joseph Myers  <joseph@codesourcery.com>
+	    Adam Conrad  <adconrad@0c3.net>
+	    Andreas Schwab  <schwab@suse.de>
+	    Brooks  <bmoses@google.com>
+
+	[BZ #17625]
+	* wordexp-test.c (__dso_handle): Add prototype.
+	(__register_atfork): Likewise.
+	(__app_register_atfork): New function.
+	(registered_forks): New global.
+	(register_fork): New function.
+	(test_case): Add 3 new tests for WRDE_CMDSUB.
+	(main): Call __app_register_atfork.
+	(testit): If WRDE_NOCMD set registered_forks to zero, run test, and if
+	fork count is non-zero fail the test.
+	* posix/wordexp.c (exec_comm): Return WRDE_CMDSUB if WRDE_NOCMD flag
+	is set.
+	(parse_dollars): Remove check for WRDE_NOCMD.
+	(parse_dquote): Likewise.
+
+--- a/posix/wordexp-test.c
++++ b/posix/wordexp-test.c
+@@ -27,6 +27,25 @@
+ 
+ #define IFS " \n\t"
+ 
++extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden")));
++extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *);
++
++static int __app_register_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void))
++{
++  return __register_atfork (prepare, parent, child,
++			    &__dso_handle == NULL ? NULL : __dso_handle);
++}
++
++/* Number of forks seen.  */
++static int registered_forks;
++
++/* For each fork increment the fork count.  */
++static void
++register_fork (void)
++{
++  registered_forks++;
++}
++
+ struct test_case_struct
+ {
+   int retval;
+@@ -206,6 +225,12 @@ struct test_case_struct
+     { WRDE_SYNTAX, NULL, "$((2+))", 0, 0, { NULL, }, IFS },
+     { WRDE_SYNTAX, NULL, "`", 0, 0, { NULL, }, IFS },
+     { WRDE_SYNTAX, NULL, "$((010+4+))", 0, 0, { NULL }, IFS },
++    /* Test for CVE-2014-7817. We test 3 combinations of command
++       substitution inside an arithmetic expression to make sure that
++       no commands are executed and error is returned.  */
++    { WRDE_CMDSUB, NULL, "$((`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS },
++    { WRDE_CMDSUB, NULL, "$((1+`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS },
++    { WRDE_CMDSUB, NULL, "$((1+$((`echo 1`))))", WRDE_NOCMD, 0, { NULL, }, IFS },
+ 
+     { -1, NULL, NULL, 0, 0, { NULL, }, IFS },
+   };
+@@ -258,6 +283,15 @@ main (int argc, char *argv[])
+ 	  return -1;
+     }
+ 
++  /* If we are not allowed to do command substitution, we install
++     fork handlers to verify that no forks happened.  No forks should
++     happen at all if command substitution is disabled.  */
++  if (__app_register_atfork (register_fork, NULL, NULL) != 0)
++    {
++      printf ("Failed to register fork handler.\n");
++      return -1;
++    }
++
+   for (test = 0; test_case[test].retval != -1; test++)
+     if (testit (&test_case[test]))
+       ++fail;
+@@ -367,6 +401,9 @@ testit (struct test_case_struct *tc)
+ 
+   printf ("Test %d (%s): ", ++tests, tc->words);
+ 
++  if (tc->flags & WRDE_NOCMD)
++    registered_forks = 0;
++
+   if (tc->flags & WRDE_APPEND)
+     {
+       /* initial wordexp() call, to be appended to */
+@@ -378,6 +415,13 @@ testit (struct test_case_struct *tc)
+     }
+   retval = wordexp (tc->words, &we, tc->flags);
+ 
++  if ((tc->flags & WRDE_NOCMD)
++      && (registered_forks > 0))
++    {
++	  printf ("FAILED fork called for WRDE_NOCMD\n");
++	  return 1;
++    }
++
+   if (tc->flags & WRDE_DOOFFS)
+       start_offs = sav_we.we_offs;
+ 
+--- a/posix/wordexp.c
++++ b/posix/wordexp.c
+@@ -893,6 +893,10 @@ exec_comm (char *comm, char **word, size_t *word_length, size_t *max_length,
+   pid_t pid;
+   int noexec = 0;
+ 
++  /* Do nothing if command substitution should not succeed.  */
++  if (flags & WRDE_NOCMD)
++    return WRDE_CMDSUB;
++
+   /* Don't fork() unless necessary */
+   if (!comm || !*comm)
+     return 0;
+@@ -2082,9 +2086,6 @@ parse_dollars (char **word, size_t *word_length, size_t *max_length,
+ 	    }
+ 	}
+ 
+-      if (flags & WRDE_NOCMD)
+-	return WRDE_CMDSUB;
+-
+       (*offset) += 2;
+       return parse_comm (word, word_length, max_length, words, offset, flags,
+ 			 quoted? NULL : pwordexp, ifs, ifs_white);
+@@ -2196,9 +2197,6 @@ parse_dquote (char **word, size_t *word_length, size_t *max_length,
+ 	  break;
+ 
+ 	case '`':
+-	  if (flags & WRDE_NOCMD)
+-	    return WRDE_CMDSUB;
+-
+ 	  ++(*offset);
+ 	  error = parse_backtick (word, word_length, max_length, words,
+ 				  offset, flags, NULL, NULL, NULL);
+@@ -2357,12 +2355,6 @@ wordexp (const char *words, wordexp_t *pwordexp, int flags)
+ 	break;
+ 
+       case '`':
+-	if (flags & WRDE_NOCMD)
+-	  {
+-	    error = WRDE_CMDSUB;
+-	    goto do_error;
+-	  }
+-
+ 	++words_offset;
+ 	error = parse_backtick (&word, &word_length, &max_length, words,
+ 				&words_offset, flags, pwordexp, ifs,
--- eglibc-2.13.orig/debian/patches/any/local-ipv6-lookup.diff
+++ eglibc-2.13/debian/patches/any/local-ipv6-lookup.diff
@@ -0,0 +1,43 @@
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -263,7 +263,7 @@ extern service_user *__nss_hosts_database attribute_hidden;
+ static int
+ gaih_inet (const char *name, const struct gaih_service *service,
+ 	   const struct addrinfo *req, struct addrinfo **pai,
+-	   unsigned int *naddrs)
++	   unsigned int *naddrs, bool usable_ipv6)
+ {
+   const struct gaih_typeproto *tp = gaih_inet_typeproto;
+   struct gaih_servtuple *st = (struct gaih_servtuple *) &nullserv;
+@@ -706,7 +706,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
+ 	      if (fct != NULL)
+ 		{
+ 		  if (req->ai_family == AF_INET6
+-		      || req->ai_family == AF_UNSPEC)
++		      || (req->ai_family == AF_UNSPEC && usable_ipv6))
+ 		    {
+ 		      gethosts (AF_INET6, struct in6_addr);
+ 		      no_inet6_data = no_data;
+@@ -1903,7 +1903,7 @@ getaddrinfo (const char *name, const char *service,
+   if (hints->ai_family == AF_UNSPEC || hints->ai_family == AF_INET
+       || hints->ai_family == AF_INET6)
+     {
+-      last_i = gaih_inet (name, pservice, hints, end, &naddrs);
++      last_i = gaih_inet (name, pservice, hints, end, &naddrs, seen_ipv6);
+       if (last_i != 0)
+ 	{
+ 	  freeaddrinfo (p);
+--- a/sysdeps/unix/sysv/linux/check_pf.c
++++ b/sysdeps/unix/sysv/linux/check_pf.c
+@@ -146,7 +146,10 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
+ 		  *seen_ipv4 = true;
+ 		  break;
+ 		case AF_INET6:
+-		  *seen_ipv6 = true;
++		  if (ifam->ifa_scope < RT_SCOPE_LINK)
++		    {
++		      *seen_ipv6 = true;
++		    }
+ 
+ 		  if (ifam->ifa_flags & (IFA_F_DEPRECATED
+ 					 | IFA_F_TEMPORARY
--- eglibc-2.13.orig/debian/patches/any/cvs-CVE-2013-4357.diff
+++ eglibc-2.13/debian/patches/any/cvs-CVE-2013-4357.diff
@@ -0,0 +1,855 @@
+2011-05-31  Andreas Schwab  <schwab@redhat.com>
+
+	* nscd/nscd_getserv_r.c (nscd_getserv_r): Don't free non-malloced
+	memory.  Use alloca_account.  Fix memory leak when retrying.
+
+2011-05-22  Ulrich Drepper  <drepper@gmail.com>
+ 
+	[BZ #12671]
+	* nis/nss_nis/nis-alias.c (_nss_nis_getaliasbyname_r): Use malloc in
+	some situations.
+	* nscd/nscd_getserv_r.c (nscd_getserv_r): Likewise.
+	* posix/glob.c (glob_in_dir): Take additional parameter alloca_used.
+	add in in __libc_use_alloca calls.  Adjust callers.
+	(glob): Use malloc in some situations.
+
+--- a/nis/nss_nis/nis-alias.c
++++ b/nis/nss_nis/nis-alias.c
+@@ -142,10 +142,10 @@ internal_nis_getaliasent_r (struct aliasent *alias, char *buffer,
+       int yperr;
+ 
+       if (new_start)
+-        yperr = yp_first (domain, "mail.aliases", &outkey, &keylen, &result,
++	yperr = yp_first (domain, "mail.aliases", &outkey, &keylen, &result,
+ 			  &len);
+       else
+-        yperr = yp_next (domain, "mail.aliases", oldkey, oldkeylen, &outkey,
++	yperr = yp_next (domain, "mail.aliases", oldkey, oldkeylen, &outkey,
+ 			 &keylen, &result, &len);
+ 
+       if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
+@@ -153,20 +153,20 @@ internal_nis_getaliasent_r (struct aliasent *alias, char *buffer,
+ 	  enum nss_status retval = yperr2nss (yperr);
+ 
+ 	  if (retval == NSS_STATUS_TRYAGAIN)
+-            *errnop = errno;
+-          return retval;
+-        }
++	    *errnop = errno;
++	  return retval;
++	}
+ 
+       if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
+-        {
++	{
+ 	  free (result);
+-          *errnop = ERANGE;
+-          return NSS_STATUS_TRYAGAIN;
+-        }
++	  *errnop = ERANGE;
++	  return NSS_STATUS_TRYAGAIN;
++	}
+       char *p = strncpy (buffer, result, len);
+       buffer[len] = '\0';
+       while (isspace (*p))
+-        ++p;
++	++p;
+       free (result);
+ 
+       parse_res = _nss_nis_parse_aliasent (outkey, p, alias, buffer,
+@@ -213,13 +213,25 @@ _nss_nis_getaliasbyname_r (const char *name, struct aliasent *alias,
+       return NSS_STATUS_UNAVAIL;
+     }
+ 
+-  size_t namlen = strlen (name);
+-  char name2[namlen + 1];
+-
+   char *domain;
+   if (__builtin_expect (yp_get_default_domain (&domain), 0))
+     return NSS_STATUS_UNAVAIL;
+ 
++  size_t namlen = strlen (name);
++  char *name2;
++  int use_alloca = __libc_use_alloca (namlen + 1);
++  if (use_alloca)
++    name2 = __alloca (namlen + 1);
++  else
++    {
++      name2 = malloc (namlen + 1);
++      if (name2 == NULL)
++	{
++	  *errnop = ENOMEM;
++	  return NSS_STATUS_TRYAGAIN;
++	}
++    }
++
+   /* Convert name to lowercase.  */
+   size_t i;
+   for (i = 0; i < namlen; ++i)
+@@ -230,6 +242,9 @@ _nss_nis_getaliasbyname_r (const char *name, struct aliasent *alias,
+   int len;
+   int yperr = yp_match (domain, "mail.aliases", name2, namlen, &result, &len);
+ 
++  if (!use_alloca)
++    free (name2);
++
+   if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
+     {
+       enum nss_status retval = yperr2nss (yperr);
+--- a/nscd/nscd_getserv_r.c
++++ b/nscd/nscd_getserv_r.c
+@@ -17,6 +17,7 @@
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
++#include <assert.h>
+ #include <errno.h>
+ #include <string.h>
+ #include <not-cancel.h>
+@@ -80,6 +81,7 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
+ {
+   int gc_cycle;
+   int nretries = 0;
++  size_t alloca_used = 0;
+ 
+   /* If the mapping is available, try to search there instead of
+      communicating with the nscd.  */
+@@ -88,13 +90,23 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
+ 			       &gc_cycle);
+   size_t protolen = proto == NULL ? 0 : strlen (proto);
+   size_t keylen = critlen + 1 + protolen + 1;
+-  char *key = alloca (keylen);
++  int alloca_key = __libc_use_alloca (keylen);
++  char *key;
++  if (alloca_key)
++    key = alloca_account (keylen, alloca_used);
++  else
++    {
++      key = malloc (keylen);
++      if (key == NULL)
++	return -1;
++    }
+   memcpy (__mempcpy (__mempcpy (key, crit, critlen),
+ 		     "/", 1), proto ?: "", protolen + 1);
+ 
+  retry:;
+   const char *s_name = NULL;
+   const char *s_proto = NULL;
++  int alloca_aliases_len = 0;
+   const uint32_t *aliases_len = NULL;
+   const char *aliases_list = NULL;
+   int retval = -1;
+@@ -112,6 +124,7 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
+ 	  s_name = (char *) (&found->data[0].servdata + 1);
+ 	  serv_resp = found->data[0].servdata;
+ 	  s_proto = s_name + serv_resp.s_name_len;
++	  alloca_aliases_len = 1;
+ 	  aliases_len = (uint32_t *) (s_proto + serv_resp.s_proto_len);
+ 	  aliases_list = ((char *) aliases_len
+ 			  + serv_resp.s_aliases_cnt * sizeof (uint32_t));
+@@ -136,8 +149,24 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
+ 	  if (((uintptr_t) aliases_len & (__alignof__ (*aliases_len) - 1))
+ 	      != 0)
+ 	    {
+-	      uint32_t *tmp = alloca (serv_resp.s_aliases_cnt
+-				      * sizeof (uint32_t));
++	      uint32_t *tmp;
++	      alloca_aliases_len
++		= __libc_use_alloca (alloca_used
++				     + (serv_resp.s_aliases_cnt
++					* sizeof (uint32_t)));
++	      if (alloca_aliases_len)
++		tmp = alloca_account (serv_resp.s_aliases_cnt
++				      * sizeof (uint32_t),
++				      alloca_used);
++	      else
++		{
++		  tmp = malloc (serv_resp.s_aliases_cnt * sizeof (uint32_t));
++		  if (tmp == NULL)
++		    {
++		      retval = ENOMEM;
++		      goto out;
++		    }
++		}
+ 	      aliases_len = memcpy (tmp, aliases_len,
+ 				    serv_resp.s_aliases_cnt
+ 				    * sizeof (uint32_t));
+@@ -217,8 +246,25 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
+ 
+ 	  if (serv_resp.s_aliases_cnt > 0)
+ 	    {
+-	      aliases_len = alloca (serv_resp.s_aliases_cnt
+-				    * sizeof (uint32_t));
++	      assert (alloca_aliases_len == 0);
++	      alloca_aliases_len
++		= __libc_use_alloca (alloca_used
++				     + (serv_resp.s_aliases_cnt
++					* sizeof (uint32_t)));
++	      if (alloca_aliases_len)
++		aliases_len = alloca_account (serv_resp.s_aliases_cnt
++					      * sizeof (uint32_t),
++					      alloca_used);
++	      else
++		{
++		  aliases_len = malloc (serv_resp.s_aliases_cnt
++					* sizeof (uint32_t));
++		  if (aliases_len == NULL)
++		    {
++		      retval = ENOMEM;
++		      goto out_close;
++		    }
++		}
+ 	      vec[n].iov_base = (void *) aliases_len;
+ 	      vec[n].iov_len = serv_resp.s_aliases_cnt * sizeof (uint32_t);
+ 
+@@ -326,8 +372,17 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto,
+ 	}
+ 
+       if (retval != -1)
+-	goto retry;
++	{
++	  if (!alloca_aliases_len)
++	    free (aliases_len);
++	  goto retry;
++	}
+     }
+ 
++  if (!alloca_aliases_len)
++    free ((void *) aliases_len);
++  if (!alloca_key)
++    free (key);
++
+   return retval;
+ }
+--- a/posix/glob.c
++++ b/posix/glob.c
+@@ -199,7 +199,7 @@ static const char *next_brace_sub (const char *begin, int flags) __THROW;
+ 
+ static int glob_in_dir (const char *pattern, const char *directory,
+ 			int flags, int (*errfunc) (const char *, int),
+-			glob_t *pglob);
++			glob_t *pglob, size_t alloca_used);
+ extern int __glob_pattern_type (const char *pattern, int quote)
+     attribute_hidden;
+ 
+@@ -253,13 +253,18 @@ glob (pattern, flags, errfunc, pglob)
+      glob_t *pglob;
+ {
+   const char *filename;
+-  const char *dirname;
++  char *dirname = NULL;
+   size_t dirlen;
+   int status;
+   size_t oldcount;
+   int meta;
+   int dirname_modified;
++  int malloc_dirname = 0;
+   glob_t dirs;
++  int retval = 0;
++#ifdef _LIBC
++  size_t alloca_used = 0;
++#endif
+ 
+   if (pattern == NULL || pglob == NULL || (flags & ~__GLOB_FLAGS) != 0)
+     {
+@@ -308,20 +313,26 @@ glob (pattern, flags, errfunc, pglob)
+ 	  const char *next;
+ 	  const char *rest;
+ 	  size_t rest_len;
+-#ifdef __GNUC__
+-	  char onealt[strlen (pattern) - 1];
+-#else
+-	  char *onealt = (char *) malloc (strlen (pattern) - 1);
+-	  if (onealt == NULL)
++	  char *onealt;
++	  size_t pattern_len = strlen (pattern) - 1;
++#ifdef _LIBC
++	  int alloca_onealt = __libc_use_alloca (alloca_used + pattern_len);
++	  if (alloca_onealt)
++	    onealt = alloca_account (pattern_len, alloca_used);
++	  else
++#endif
+ 	    {
+-	      if (!(flags & GLOB_APPEND))
++	      onealt = (char *) malloc (pattern_len);
++	      if (onealt == NULL)
+ 		{
+-		  pglob->gl_pathc = 0;
+-		  pglob->gl_pathv = NULL;
++		  if (!(flags & GLOB_APPEND))
++		    {
++		      pglob->gl_pathc = 0;
++		      pglob->gl_pathv = NULL;
++		    }
++		  return GLOB_NOSPACE;
+ 		}
+-	      return GLOB_NOSPACE;
+ 	    }
+-#endif
+ 
+ 	  /* We know the prefix for all sub-patterns.  */
+ 	  alt_start = mempcpy (onealt, pattern, begin - pattern);
+@@ -332,9 +343,11 @@ glob (pattern, flags, errfunc, pglob)
+ 	  if (next == NULL)
+ 	    {
+ 	      /* It is an illegal expression.  */
+-#ifndef __GNUC__
+-	      free (onealt);
++	    illegal_brace:
++#ifdef _LIBC
++	      if (__builtin_expect (!alloca_onealt, 0))
+ #endif
++		free (onealt);
+ 	      return glob (pattern, flags & ~GLOB_BRACE, errfunc, pglob);
+ 	    }
+ 
+@@ -344,13 +357,8 @@ glob (pattern, flags, errfunc, pglob)
+ 	    {
+ 	      rest = next_brace_sub (rest + 1, flags);
+ 	      if (rest == NULL)
+-		{
+-		  /* It is an illegal expression.  */
+-#ifndef __GNUC__
+-		  free (onealt);
+-#endif
+-		  return glob (pattern, flags & ~GLOB_BRACE, errfunc, pglob);
+-		}
++		/* It is an illegal expression.  */
++		goto illegal_brace;
+ 	    }
+ 	  /* Please note that we now can be sure the brace expression
+ 	     is well-formed.  */
+@@ -386,9 +394,10 @@ glob (pattern, flags, errfunc, pglob)
+ 	      /* If we got an error, return it.  */
+ 	      if (result && result != GLOB_NOMATCH)
+ 		{
+-#ifndef __GNUC__
+-		  free (onealt);
++#ifdef _LIBC
++		  if (__builtin_expect (!alloca_onealt, 0))
+ #endif
++		    free (onealt);
+ 		  if (!(flags & GLOB_APPEND))
+ 		    {
+ 		      globfree (pglob);
+@@ -406,9 +415,10 @@ glob (pattern, flags, errfunc, pglob)
+ 	      assert (next != NULL);
+ 	    }
+ 
+-#ifndef __GNUC__
+-	  free (onealt);
++#ifdef _LIBC
++	  if (__builtin_expect (!alloca_onealt, 0))
+ #endif
++	    free (onealt);
+ 
+ 	  if (pglob->gl_pathc != firstc)
+ 	    /* We found some entries.  */
+@@ -455,7 +465,7 @@ glob (pattern, flags, errfunc, pglob)
+ 	 case is nothing but a notation for a directory.  */
+       if ((flags & (GLOB_TILDE|GLOB_TILDE_CHECK)) && pattern[0] == '~')
+ 	{
+-	  dirname = pattern;
++	  dirname = (char *) pattern;
+ 	  dirlen = strlen (pattern);
+ 
+ 	  /* Set FILENAME to NULL as a special flag.  This is ugly but
+@@ -473,9 +483,9 @@ glob (pattern, flags, errfunc, pglob)
+ 
+ 	  filename = pattern;
+ #ifdef _AMIGA
+-	  dirname = "";
++	  dirname = (char *) "";
+ #else
+-	  dirname = ".";
++	  dirname = (char *) ".";
+ #endif
+ 	  dirlen = 0;
+ 	}
+@@ -485,7 +495,7 @@ glob (pattern, flags, errfunc, pglob)
+ 	       && (flags & GLOB_NOESCAPE) == 0))
+     {
+       /* "/pattern" or "\\/pattern".  */
+-      dirname = "/";
++      dirname = (char *) "/";
+       dirlen = 1;
+       ++filename;
+     }
+@@ -511,7 +521,17 @@ glob (pattern, flags, errfunc, pglob)
+ 	     from "d:/", since "d:" and "d:/" are not the same.*/
+ 	}
+ #endif
+-      newp = (char *) __alloca (dirlen + 1);
++#ifdef _LIBC
++      if (__libc_use_alloca (alloca_used + dirlen + 1))
++	newp = alloca_account (dirlen + 1, alloca_used);
++      else
++#endif
++	{
++	  newp = malloc (dirlen + 1);
++	  if (newp == NULL)
++	    return GLOB_NOSPACE;
++	  malloc_dirname = 1;
++	}
+       *((char *) mempcpy (newp, pattern, dirlen)) = '\0';
+       dirname = newp;
+       ++filename;
+@@ -551,7 +571,8 @@ glob (pattern, flags, errfunc, pglob)
+ 	      oldcount = pglob->gl_pathc + pglob->gl_offs;
+ 	      goto no_matches;
+ 	    }
+-	  return val;
++	  retval = val;
++	  goto out;
+ 	}
+     }
+ 
+@@ -563,7 +584,8 @@ glob (pattern, flags, errfunc, pglob)
+ 	      && (dirname[2] == '\0' || dirname[2] == '/')))
+ 	{
+ 	  /* Look up home directory.  */
+-	  const char *home_dir = getenv ("HOME");
++	  char *home_dir = getenv ("HOME");
++	  int malloc_home_dir = 0;
+ # ifdef _AMIGA
+ 	  if (home_dir == NULL || home_dir[0] == '\0')
+ 	    home_dir = "SYS:";
+@@ -582,7 +604,7 @@ glob (pattern, flags, errfunc, pglob)
+ 		/* `sysconf' does not support _SC_LOGIN_NAME_MAX.  Try
+ 		   a moderate value.  */
+ 		buflen = 20;
+-	      name = (char *) __alloca (buflen);
++	      name = alloca_account (buflen, alloca_used);
+ 
+ 	      success = getlogin_r (name, buflen) == 0;
+ 	      if (success)
+@@ -592,6 +614,7 @@ glob (pattern, flags, errfunc, pglob)
+ 		  long int pwbuflen = GETPW_R_SIZE_MAX ();
+ 		  char *pwtmpbuf;
+ 		  struct passwd pwbuf;
++		  int malloc_pwtmpbuf = 0;
+ 		  int save = errno;
+ 
+ #     ifndef _LIBC
+@@ -600,7 +623,18 @@ glob (pattern, flags, errfunc, pglob)
+ 		       Try a moderate value.  */
+ 		    pwbuflen = 1024;
+ #     endif
+-		  pwtmpbuf = (char *) __alloca (pwbuflen);
++		  if (__libc_use_alloca (alloca_used + pwbuflen))
++		    pwtmpbuf = alloca_account (pwbuflen, alloca_used);
++		  else
++		    {
++		      pwtmpbuf = malloc (pwbuflen);
++		      if (pwtmpbuf == NULL)
++			{
++			  retval = GLOB_NOSPACE;
++			  goto out;
++			}
++		      malloc_pwtmpbuf = 1;
++		    }
+ 
+ 		  while (getpwnam_r (name, &pwbuf, pwtmpbuf, pwbuflen, &p)
+ 			 != 0)
+@@ -610,47 +644,116 @@ glob (pattern, flags, errfunc, pglob)
+ 			  p = NULL;
+ 			  break;
+ 			}
+-#     ifdef _LIBC
+-		      pwtmpbuf = extend_alloca (pwtmpbuf, pwbuflen,
++
++		      if (!malloc_pwtmpbuf
++			  && __libc_use_alloca (alloca_used
++						+ 2 * pwbuflen))
++			pwtmpbuf = extend_alloca_account (pwtmpbuf, pwbuflen,
++							  2 * pwbuflen,
++							  alloca_used);
++		      else
++			{
++			  char *newp = realloc (malloc_pwtmpbuf
++						? pwtmpbuf : NULL,
+ 						2 * pwbuflen);
+-#     else
+-		      pwbuflen *= 2;
+-		      pwtmpbuf = (char *) __alloca (pwbuflen);
+-#     endif
++			  if (newp == NULL)
++			    {
++			      if (__builtin_expect (malloc_pwtmpbuf, 0))
++				free (pwtmpbuf);
++			      retval = GLOB_NOSPACE;
++			      goto out;
++			    }
++			  pwtmpbuf = newp;
++			  pwbuflen = 2 * pwbuflen;
++			  malloc_pwtmpbuf = 1;
++			}
+ 		      __set_errno (save);
+ 		    }
+ #    else
+ 		  p = getpwnam (name);
+ #    endif
+ 		  if (p != NULL)
+-		    home_dir = p->pw_dir;
++		    {
++		      if (!malloc_pwtmpbuf)
++			home_dir = p->pw_dir;
++		      else
++			{
++			  size_t home_dir_len = strlen (p->pw_dir) + 1;
++			  if (__libc_use_alloca (alloca_used + home_dir_len))
++			    home_dir = alloca_account (home_dir_len,
++						       alloca_used);
++			  else
++			    {
++			      home_dir = malloc (home_dir_len);
++			      if (home_dir == NULL)
++				{
++				  free (pwtmpbuf);
++				  retval = GLOB_NOSPACE;
++				  goto out;
++				}
++			      malloc_home_dir = 1;
++			    }
++			  memcpy (home_dir, p->pw_dir, home_dir_len);
++
++			  free (pwtmpbuf);
++			}
++		    }
+ 		}
+ 	    }
+ #   endif /* ! _LIBC || __OPTION_EGLIBC_GETLOGIN */
+ 	  if (home_dir == NULL || home_dir[0] == '\0')
+ 	    {
+ 	      if (flags & GLOB_TILDE_CHECK)
+-		return GLOB_NOMATCH;
++		{
++		  if (__builtin_expect (malloc_home_dir, 0))
++		    free (home_dir);
++		  retval = GLOB_NOMATCH;
++		  goto out;
++		}
+ 	      else
+-		home_dir = "~"; /* No luck.  */
++		home_dir = (char *) "~"; /* No luck.  */
+ 	    }
+ #  endif /* WINDOWS32 */
+ # endif
+ 	  /* Now construct the full directory.  */
+ 	  if (dirname[1] == '\0')
+ 	    {
++	      if (__builtin_expect (malloc_dirname, 0))
++		free (dirname);
++
+ 	      dirname = home_dir;
+ 	      dirlen = strlen (dirname);
++	      malloc_dirname = malloc_home_dir;
+ 	    }
+ 	  else
+ 	    {
+ 	      char *newp;
+ 	      size_t home_len = strlen (home_dir);
+-	      newp = (char *) __alloca (home_len + dirlen);
++	      int use_alloca = __libc_use_alloca (alloca_used
++						  + home_len + dirlen);
++	      if (use_alloca)
++		newp = alloca_account (home_len + dirlen, alloca_used);
++	      else
++		{
++		  newp = malloc (home_len + dirlen);
++		  if (newp == NULL)
++		    {
++		      if (__builtin_expect (malloc_home_dir, 0))
++			free (home_dir);
++		      retval = GLOB_NOSPACE;
++		      goto out;
++		    }
++		}
++
+ 	      mempcpy (mempcpy (newp, home_dir, home_len),
+ 		       &dirname[1], dirlen);
++
++	      if (__builtin_expect (malloc_dirname, 0))
++		free (dirname);
++
+ 	      dirname = newp;
+ 	      dirlen += home_len - 1;
++	      malloc_dirname = !use_alloca;
+ 	    }
+ 	  dirname_modified = 1;
+ 	}
+@@ -657,7 +760,8 @@ glob (pattern, flags, errfunc, pglob)
+       else
+ 	{
+ 	  char *end_name = strchr (dirname, '/');
+-	  const char *user_name;
++	  char *user_name;
++	  int malloc_user_name = 0;
+ 	  const char *home_dir;
+ 	  char *unescape = NULL;
+ 
+@@ -677,7 +781,18 @@ glob (pattern, flags, errfunc, pglob)
+ 	  else
+ 	    {
+ 	      char *newp;
+-	      newp = (char *) __alloca (end_name - dirname);
++	      if (__libc_use_alloca (alloca_used + (end_name - dirname)))
++		newp = alloca_account (end_name - dirname, alloca_used);
++	      else
++		{
++		  newp = malloc (end_name - dirname);
++		  if (newp == NULL)
++		    {
++		      retval = GLOB_NOSPACE;
++		      goto out;
++		    }
++		  malloc_user_name = 1;
++		}
+ 	      if (unescape != NULL)
+ 		{
+ 		  char *p = mempcpy (newp, dirname + 1,
+@@ -714,6 +829,7 @@ glob (pattern, flags, errfunc, pglob)
+ #  if defined HAVE_GETPWNAM_R || defined _LIBC
+ 	    long int buflen = GETPW_R_SIZE_MAX ();
+ 	    char *pwtmpbuf;
++	    int malloc_pwtmpbuf = 0;
+ 	    struct passwd pwbuf;
+ 	    int save = errno;
+ 
+@@ -723,7 +839,21 @@ glob (pattern, flags, errfunc, pglob)
+ 		 moderate value.  */
+ 	      buflen = 1024;
+ #   endif
+-	    pwtmpbuf = (char *) __alloca (buflen);
++	    if (__libc_use_alloca (alloca_used + buflen))
++	      pwtmpbuf = alloca_account (buflen, alloca_used);
++	    else
++	      {
++		pwtmpbuf = malloc (buflen);
++		if (pwtmpbuf == NULL)
++		  {
++		  nomem_getpw:
++		    if (__builtin_expect (malloc_user_name, 0))
++		      free (user_name);
++		    retval = GLOB_NOSPACE;
++		    goto out;
++		  }
++		malloc_pwtmpbuf = 1;
++	      }
+ 
+ 	    while (getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) != 0)
+ 	      {
+@@ -732,40 +862,77 @@ glob (pattern, flags, errfunc, pglob)
+ 		    p = NULL;
+ 		    break;
+ 		  }
+-#   ifdef _LIBC
+-		pwtmpbuf = extend_alloca (pwtmpbuf, buflen, 2 * buflen);
+-#   else
+-		buflen *= 2;
+-		pwtmpbuf = __alloca (buflen);
+-#   endif
++		if (!malloc_pwtmpbuf
++		    && __libc_use_alloca (alloca_used + 2 * buflen))
++		  pwtmpbuf = extend_alloca_account (pwtmpbuf, buflen,
++						    2 * buflen, alloca_used);
++		else
++		  {
++		    char *newp = realloc (malloc_pwtmpbuf ? pwtmpbuf : NULL,
++					  2 * buflen);
++		    if (newp == NULL)
++		      {
++			if (__builtin_expect (malloc_pwtmpbuf, 0))
++			  free (pwtmpbuf);
++			goto nomem_getpw;
++		      }
++		    pwtmpbuf = newp;
++		    malloc_pwtmpbuf = 1;
++		  }
+ 		__set_errno (save);
+ 	      }
+ #  else
+ 	    p = getpwnam (user_name);
+ #  endif
++
++	    if (__builtin_expect (malloc_user_name, 0))
++	      free (user_name);
++
++	    /* If we found a home directory use this.  */
+ 	    if (p != NULL)
+-	      home_dir = p->pw_dir;
++	      {
++		size_t home_len = strlen (p->pw_dir);
++		size_t rest_len = end_name == NULL ? 0 : strlen (end_name);
++
++		if (__builtin_expect (malloc_dirname, 0))
++		  free (dirname);
++		malloc_dirname = 0;
++
++		if (__libc_use_alloca (alloca_used + home_len + rest_len + 1))
++		  dirname = alloca_account (home_len + rest_len + 1,
++					    alloca_used);
++		else
++		  {
++		    dirname = malloc (home_len + rest_len + 1);
++		    if (dirname == NULL)
++		      {
++			if (__builtin_expect (malloc_pwtmpbuf, 0))
++			  free (pwtmpbuf);
++			retval = GLOB_NOSPACE;
++			goto out;
++		      }
++		    malloc_dirname = 1;
++		  }
++		*((char *) mempcpy (mempcpy (dirname, p->pw_dir, home_len),
++				    end_name, rest_len)) = '\0';
++
++		dirlen = home_len + rest_len;
++		dirname_modified = 1;
++
++		if (__builtin_expect (malloc_pwtmpbuf, 0))
++		  free (pwtmpbuf);
++	      }
+ 	    else
+-	      home_dir = NULL;
++	      {
++		if (__builtin_expect (malloc_pwtmpbuf, 0))
++		  free (pwtmpbuf);
++
++		if (flags & GLOB_TILDE_CHECK)
++		  /* We have to regard it as an error if we cannot find the
++		     home directory.  */
++		  return GLOB_NOMATCH;
++	      }
+ 	  }
+-	  /* If we found a home directory use this.  */
+-	  if (home_dir != NULL)
+-	    {
+-	      char *newp;
+-	      size_t home_len = strlen (home_dir);
+-	      size_t rest_len = end_name == NULL ? 0 : strlen (end_name);
+-	      newp = (char *) __alloca (home_len + rest_len + 1);
+-	      *((char *) mempcpy (mempcpy (newp, home_dir, home_len),
+-				  end_name, rest_len)) = '\0';
+-	      dirname = newp;
+-	      dirlen = home_len + rest_len;
+-	      dirname_modified = 1;
+-	    }
+-	  else
+-	    if (flags & GLOB_TILDE_CHECK)
+-	      /* We have to regard it as an error if we cannot find the
+-		 home directory.  */
+-	      return GLOB_NOMATCH;
+ 	}
+ # endif	/* Not Amiga && not WINDOWS32.  */
+     }
+@@ -899,7 +1066,7 @@ glob (pattern, flags, errfunc, pglob)
+ 	  status = glob_in_dir (filename, dirs.gl_pathv[i],
+ 				((flags | GLOB_APPEND)
+ 				 & ~(GLOB_NOCHECK | GLOB_NOMAGIC)),
+-				errfunc, pglob);
++				errfunc, pglob, alloca_used);
+ 	  if (status == GLOB_NOMATCH)
+ 	    /* No matches in this directory.  Try the next.  */
+ 	    continue;
+@@ -1000,7 +1167,8 @@ glob (pattern, flags, errfunc, pglob)
+ 	}
+       if (dirname_modified)
+ 	flags &= ~(GLOB_NOCHECK | GLOB_NOMAGIC);
+-      status = glob_in_dir (filename, dirname, flags, errfunc, pglob);
++      status = glob_in_dir (filename, dirname, flags, errfunc, pglob,
++			    alloca_used);
+       if (status != 0)
+ 	{
+ 	  if (status == GLOB_NOMATCH && flags != orig_flags
+@@ -1063,7 +1231,11 @@ glob (pattern, flags, errfunc, pglob)
+ 	     sizeof (char *), collated_compare);
+     }
+ 
+-  return 0;
++ out:
++  if (__builtin_expect (malloc_dirname, 0))
++    free (dirname);
++
++  return retval;
+ }
+ #if defined _LIBC && !defined glob
+ libc_hidden_def (glob)
+@@ -1273,7 +1445,7 @@ link_exists2_p (const char *dir, size_t dirlen, const char *fname,
+ static int
+ glob_in_dir (const char *pattern, const char *directory, int flags,
+ 	     int (*errfunc) (const char *, int),
+-	     glob_t *pglob)
++	     glob_t *pglob, size_t alloca_used)
+ {
+   size_t dirlen = strlen (directory);
+   void *stream = NULL;
+@@ -1288,11 +1460,12 @@ glob_in_dir (const char *pattern, const char *directory, int flags,
+   struct globnames *names = &init_names;
+   struct globnames *names_alloca = &init_names;
+   size_t nfound = 0;
+-  size_t allocasize = sizeof (init_names);
+   size_t cur = 0;
+   int meta;
+   int save;
+ 
++  alloca_used += sizeof (init_names);
++
+   init_names.next = NULL;
+   init_names.count = INITIAL_COUNT;
+ 
+@@ -1308,20 +1481,36 @@ glob_in_dir (const char *pattern, const char *directory, int flags,
+     {
+       /* Since we use the normal file functions we can also use stat()
+ 	 to verify the file is there.  */
+-      struct stat st;
+-      struct_stat64 st64;
++      union
++      {
++	struct stat st;
++	struct_stat64 st64;
++      } ust;
+       size_t patlen = strlen (pattern);
+-      char *fullname = (char *) __alloca (dirlen + 1 + patlen + 1);
++      int alloca_fullname = __libc_use_alloca (alloca_used
++					       + dirlen + 1 + patlen + 1);
++      char *fullname;
++      if (alloca_fullname)
++	fullname = alloca_account (dirlen + 1 + patlen + 1, alloca_used);
++      else
++	{
++	  fullname = malloc (dirlen + 1 + patlen + 1);
++	  if (fullname == NULL)
++	    return GLOB_NOSPACE;
++	}
+ 
+       mempcpy (mempcpy (mempcpy (fullname, directory, dirlen),
+ 			"/", 1),
+ 	       pattern, patlen + 1);
+       if ((__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)
+-	   ? (*pglob->gl_stat) (fullname, &st)
+-	   : __stat64 (fullname, &st64)) == 0)
++	   ? (*pglob->gl_stat) (fullname, &ust.st)
++	   : __stat64 (fullname, &ust.st64)) == 0)
+ 	/* We found this file to be existing.  Now tell the rest
+ 	   of the function to copy this name into the result.  */
+ 	flags |= GLOB_NOCHECK;
++
++      if (__builtin_expect (!alloca_fullname, 0))
++	free (fullname);
+     }
+   else
+     {
+@@ -1409,9 +1598,9 @@ glob_in_dir (const char *pattern, const char *directory, int flags,
+ 			  size_t size = (sizeof (struct globnames)
+ 					 + ((count - INITIAL_COUNT)
+ 					    * sizeof (char *)));
+-			  allocasize += size;
+-			  if (__libc_use_alloca (allocasize))
+-			    newnames = names_alloca = __alloca (size);
++			  if (__libc_use_alloca (alloca_used + size))
++			    newnames = names_alloca
++			      = alloca_account (size, alloca_used);
+ 			  else if ((newnames = malloc (size))
+ 				   == NULL)
+ 			    goto memory_error;
--- eglibc-2.13.orig/debian/patches/any/local-globfree-clear.diff
+++ eglibc-2.13/debian/patches/any/local-globfree-clear.diff
@@ -0,0 +1,24 @@
+# DP: Description: Workaround patch to make globfree() clear pglob->gl_pathc
+# DP: Related bugs: #264884
+# DP: Dpatch author: Jeff Licquia
+# DP: Patch author: Jeff Licquia <licquia@progeny.com>
+# DP: Upstream status: Not submitted
+# DP: Status Details: (gotom) I think it's harmless, but I doubt it's sanity.
+#		      It's applied for sarge LFS conformance.
+#		      However my test does not show any problems.  Moreover,
+#		      if gl_pathv is not cleared after GLOB_ABORTED under
+#		      gl_pathc == 0, it's glob() bug.
+#		      This patch should be reconsidered to apply after sarge.
+# DP: Date: 2004-07-22
+
+--- glibc-2.3.2-old/sysdeps/generic/glob.c	2004-07-26 17:49:07.000000000 -0400
++++ glibc-2.3.2/sysdeps/generic/glob.c	2004-07-26 17:51:14.000000000 -0400
+@@ -1105,6 +1105,8 @@
+ 	if (pglob->gl_pathv[pglob->gl_offs + i] != NULL)
+ 	  free ((__ptr_t) pglob->gl_pathv[pglob->gl_offs + i]);
+       free ((__ptr_t) pglob->gl_pathv);
++      pglob->gl_pathc = 0;
++      pglob->gl_pathv = NULL;
+     }
+ }
+ #if defined _LIBC && !defined globfree
--- eglibc-2.13.orig/debian/patches/any/local-sunrpc-dos.diff
+++ eglibc-2.13/debian/patches/any/local-sunrpc-dos.diff
@@ -0,0 +1,86 @@
+Origin: Red Hat, glibc-2.12-1.47.el6_2.5.src.rpm:glibc-rh767692-2.patch
+Bug: https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/901716
+Subject: DoS in RPC implementation
+
+CVE-2011-4069
+
+
+---
+ sunrpc/svc_tcp.c  |    6 ++++++
+ sunrpc/svc_udp.c  |   13 +++++++++++--
+ sunrpc/svc_unix.c |    6 ++++++
+ 3 files changed, 23 insertions(+), 2 deletions(-)
+
+--- a/sunrpc/svc_tcp.c
++++ b/sunrpc/svc_tcp.c
+@@ -44,6 +44,7 @@
+ #include <sys/poll.h>
+ #include <errno.h>
+ #include <stdlib.h>
++#include <time.h>
+ 
+ #ifdef USE_IN_LIBIO
+ # include <wchar.h>
+@@ -243,6 +244,11 @@
+     {
+       if (errno == EINTR)
+ 	goto again;
++      if (errno == EMFILE)
++        {
++          struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
++          __nanosleep(&ts , NULL);
++        }
+       return FALSE;
+     }
+   /*
+--- a/sunrpc/svc_udp.c
++++ b/sunrpc/svc_udp.c
+@@ -40,6 +40,7 @@
+ #include <sys/socket.h>
+ #include <errno.h>
+ #include <libintl.h>
++#include <time.h>
+ 
+ #ifdef IP_PKTINFO
+ #include <sys/uio.h>
+@@ -272,8 +273,16 @@
+ 		       (int) su->su_iosz, 0,
+ 		       (struct sockaddr *) &(xprt->xp_raddr), &len);
+   xprt->xp_addrlen = len;
+-  if (rlen == -1 && errno == EINTR)
+-    goto again;
++  if (rlen == -1)
++    {
++      if (errno == EINTR)
++        goto again;
++      if (errno == EMFILE)
++        {
++          struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
++          __nanosleep(&ts , NULL);
++        }
++    }
+   if (rlen < 16)		/* < 4 32-bit ints? */
+     return FALSE;
+   xdrs->x_op = XDR_DECODE;
+--- a/sunrpc/svc_unix.c
++++ b/sunrpc/svc_unix.c
+@@ -46,6 +46,7 @@
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <libintl.h>
++#include <time.h>
+ 
+ #ifdef USE_IN_LIBIO
+ # include <wchar.h>
+@@ -245,6 +246,11 @@
+     {
+       if (errno == EINTR)
+ 	goto again;
++      if (errno == EMFILE)
++        {
++          struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
++          __nanosleep(&ts , NULL);
++        }
+       return FALSE;
+     }
+   /*
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-XPG7.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-XPG7.diff
@@ -0,0 +1,44 @@
+2011-12-09  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
+
+---
+ linuxthreads/sysdeps/pthread/pthread.h |    6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/linuxthreads/sysdeps/pthread/pthread.h
++++ b/linuxthreads/sysdeps/pthread/pthread.h
+@@ -86,7 +86,7 @@
+   PTHREAD_MUTEX_RECURSIVE_NP,
+   PTHREAD_MUTEX_ERRORCHECK_NP,
+   PTHREAD_MUTEX_ADAPTIVE_NP
+-#ifdef __USE_UNIX98
++#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
+   ,
+   PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
+   PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
+@@ -241,7 +241,6 @@
+ extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
+ 				  int *__restrict __scope) __THROW;
+ 
+-#ifdef __USE_UNIX98
+ /* Set the size of the guard area at the bottom of the thread.  */
+ extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
+ 				      size_t __guardsize) __THROW;
+@@ -250,7 +249,6 @@
+ extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict
+ 				      __attr, size_t *__restrict __guardsize)
+      __THROW;
+-#endif
+ 
+ /* Set the starting address of the stack of the thread to be created.
+    Depending on whether the stack grows up or down the value must either
+@@ -371,7 +369,7 @@
+ extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
+ 					 int __pshared) __THROW;
+ 
+-#ifdef __USE_UNIX98
++#if defined __USE_UNIX98 || defined __USE_XOPEN2K8
+ /* Set the mutex kind attribute in *ATTR to KIND (either PTHREAD_MUTEX_NORMAL,
+    PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_ERRORCHECK, or
+    PTHREAD_MUTEX_DEFAULT).  */
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-deps.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-deps.diff
@@ -0,0 +1,20 @@
+2011-03-01  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
+
+---
+ linuxthreads/Makefile |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/linuxthreads/Makefile
++++ b/linuxthreads/Makefile
+@@ -314,7 +314,8 @@
+ 
+ ifeq (yes,$(build-shared))
+ $(objpfx)tst-_res1mod2.so: $(objpfx)tst-_res1mod1.so
+-$(objpfx)tst-_res1: $(objpfx)tst-_res1mod2.so $(shared-thread-library)
++$(objpfx)tst-_res1: $(objpfx)tst-_res1mod1.so $(objpfx)tst-_res1mod2.so \
++		    $(shared-thread-library)
+ 
+ $(objpfx)tst-tls1: $(objpfx)tst-tls1mod.so $(shared-thread-library)
+ 
--- eglibc-2.13.orig/debian/patches/any/local-nss-overflow.diff
+++ eglibc-2.13/debian/patches/any/local-nss-overflow.diff
@@ -0,0 +1,51 @@
+2009-01-12  Arthur Loiret  <aloiret@debian.org>
+
+	nss/nss_files/files-parse.c: Include <limits.h>.
+	(INT_FIELD): Convert field to uintmax_t and check for 32-bit overflow.
+	(INT_FIELD_MAYBE_NULL): Likewise.
+
+---
+ nss/nss_files/files-parse.c |   15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+--- a/nss/nss_files/files-parse.c
++++ b/nss/nss_files/files-parse.c
+@@ -21,6 +21,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <limits.h>
+ 
+ /* These symbols are defined by the including source file:
+ 
+@@ -160,7 +161,12 @@
+ # define INT_FIELD(variable, terminator_p, swallow, base, convert)	      \
+   {									      \
+     char *endp;								      \
+-    variable = convert (strtou32 (line, &endp, base));			      \
++    unsigned long long tmp;						      \
++    /* Prevent from 32-bit overflow.  */				      \
++    tmp = __strtoull_internal (line, &endp, base, 0);			      \
++    if (tmp > UINT_MAX)						      \
++      return 0;								      \
++    variable = convert ((unsigned long int)tmp);			      \
+     if (endp == line)							      \
+       return 0;								      \
+     else if (terminator_p (*endp))					      \
+@@ -175,10 +181,15 @@
+ # define INT_FIELD_MAYBE_NULL(variable, terminator_p, swallow, base, convert, default)	      \
+   {									      \
+     char *endp;								      \
++    unsigned long long tmp;						      \
+     if (*line == '\0')							      \
+       /* We expect some more input, so don't allow the string to end here. */ \
+       return 0;								      \
+-    variable = convert (strtou32 (line, &endp, base));			      \
++    /* Prevent from 32-bit overflow.  */				      \
++    tmp = __strtoull_internal (line, &endp, base, 0);		      \
++    if (tmp > UINT_MAX)						      \
++      return 0;								      \
++    variable = convert ((unsigned long int)tmp);			      \
+     if (endp == line)							      \
+       variable = default;						      \
+     if (terminator_p (*endp))						      \
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-unwind.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-unwind.diff
@@ -0,0 +1,84 @@
+---
+ linuxthreads/sysdeps/pthread/Makefile        |    6 ++
+ linuxthreads/sysdeps/pthread/unwind-resume.c |   64 +++++++++++++++++++++++++++
+ 2 files changed, 70 insertions(+)
+
+--- /dev/null
++++ b/linuxthreads/sysdeps/pthread/unwind-resume.c
+@@ -0,0 +1,64 @@
++/* Copyright (C) 2003 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Jakub Jelinek <jakub@redhat.com>.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <dlfcn.h>
++#include <stdio.h>
++#include <unwind.h>
++
++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
++static _Unwind_Reason_Code (*libgcc_s_personality)
++  (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
++   struct _Unwind_Context *);
++
++static void
++init (void)
++{
++  void *resume, *personality;
++  void *handle;
++
++  handle = __libc_dlopen ("libgcc_s.so.1");
++
++  if (handle == NULL
++      || (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL
++      || (personality = __libc_dlsym (handle, "__gcc_personality_v0")) == NULL)
++    __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n");
++
++  libgcc_s_resume = resume;
++  libgcc_s_personality = personality;
++}
++
++void
++_Unwind_Resume (struct _Unwind_Exception *exc)
++{
++  if (__builtin_expect (libgcc_s_resume == NULL, 0))
++    init ();
++  libgcc_s_resume (exc);
++}
++
++_Unwind_Reason_Code
++__gcc_personality_v0 (int version, _Unwind_Action actions,
++		      _Unwind_Exception_Class exception_class,
++                      struct _Unwind_Exception *ue_header,
++                      struct _Unwind_Context *context)
++{
++  if (__builtin_expect (libgcc_s_personality == NULL, 0))
++    init ();
++  return libgcc_s_personality (version, actions, exception_class,
++			       ue_header, context);
++}
+--- a/linuxthreads/sysdeps/pthread/Makefile
++++ b/linuxthreads/sysdeps/pthread/Makefile
+@@ -1,3 +1,9 @@
++ifeq ($(subdir),csu)
++routines += unwind-resume
++shared-only-routines += unwind-resume
++CFLAGS-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables
++endif
++
+ ifeq ($(subdir),rt)
+ librt-sysdep_routines += timer_routines
+ CPPFLAGS += -DBROKEN_THREAD_SIGNALS
--- eglibc-2.13.orig/debian/patches/any/cvs-fmtmsg-lock.diff
+++ eglibc-2.13/debian/patches/any/cvs-fmtmsg-lock.diff
@@ -0,0 +1,21 @@
+2012-01-16  Ulrich Drepper  <drepper@gmail.com>
+
+	* stdlib/fmtmsg.c (init): Add missing unlock.
+	Patch by Peng Haitao <penght@cn.fujitsu.com>.
+
+
+---
+ stdlib/fmtmsg.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/stdlib/fmtmsg.c
++++ b/stdlib/fmtmsg.c
+@@ -282,6 +282,8 @@
+ 
+ 	  sevlevel_var = end + (*end == ':' ? 1 : 0);
+ 	}
++
++      __libc_lock_unlock (lock);
+     }
+ }
+ 
--- eglibc-2.13.orig/debian/patches/any/cvs-dlopen-tls-memleak.patch
+++ eglibc-2.13/debian/patches/any/cvs-dlopen-tls-memleak.patch
@@ -0,0 +1,142 @@
+2011-04-10  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #12650]
+	* sysdeps/i386/dl-tls.h: Define TLS_DTV_UNALLOCATED.
+	* sysdeps/ia64/dl-tls.h: Likewise.
+	* sysdeps/powerpc/dl-tls.h: Likewise.
+	* sysdeps/s390/dl-tls.h: Likewise.
+	* sysdeps/sh/dl-tls.h: Likewise.
+	* sysdeps/sparc/dl-tls.h: Likewise.
+	* sysdeps/x86_64/dl-tls.h: Likewise.
+	* elf/dl-tls.c: Don't define TLS_DTV_UNALLOCATED here.
+
+nptl/
+2011-04-10  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #12650]
+	* allocatestack.c (get_cached_stack): Deallocate DTV entries before
+	clearing memory.
+	Patch partly by Robert Rex <robert.rex@exasol.com>.
+
+ports/
+2011-04-11  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/arm/dl-tls.h (TLS_DTV_UNALLOCATED): Define.
+	* sysdeps/mips/dl-tls.h (TLS_DTV_UNALLOCATED): Define.
+
+
+--- a/elf/dl-tls.c
++++ b/elf/dl-tls.c
+@@ -33,9 +33,6 @@
+    to allow dynamic loading of modules defining IE-model TLS data.  */
+ #define TLS_STATIC_SURPLUS	64 + DL_NNS * 100
+ 
+-/* Value used for dtv entries for which the allocation is delayed.  */
+-#define TLS_DTV_UNALLOCATED	((void *) -1l)
+-
+ 
+ /* Out-of-memory handler.  */
+ #ifdef SHARED
+--- a/nptl/allocatestack.c
++++ b/nptl/allocatestack.c
+@@ -26,6 +26,7 @@
+ #include <sys/mman.h>
+ #include <sys/param.h>
+ #include <dl-sysdep.h>
++#include <dl-tls.h>
+ #include <tls.h>
+ #include <list.h>
+ #include <lowlevellock.h>
+@@ -242,6 +243,10 @@
+ 
+   /* Clear the DTV.  */
+   dtv_t *dtv = GET_DTV (TLS_TPADJ (result));
++  for (size_t cnt = 0; cnt < dtv[-1].counter; ++cnt)
++    if (! dtv[1 + cnt].pointer.is_static
++	&& dtv[1 + cnt].pointer.val != TLS_DTV_UNALLOCATED)
++      free (dtv[1 + cnt].pointer.val);
+   memset (dtv, '\0', (dtv[-1].counter + 1) * sizeof (dtv_t));
+ 
+   /* Re-initialize the TLS.  */
+--- a/sysdeps/i386/dl-tls.h
++++ b/sysdeps/i386/dl-tls.h
+@@ -58,3 +58,6 @@
+ 
+ # endif
+ #endif
++
++/* Value used for dtv entries for which the allocation is delayed.  */
++#define TLS_DTV_UNALLOCATED	((void *) -1l)
+--- a/sysdeps/ia64/dl-tls.h
++++ b/sysdeps/ia64/dl-tls.h
+@@ -28,3 +28,6 @@
+ #define DONT_USE_TLS_INDEX	1
+ 
+ extern void *__tls_get_addr (size_t m, size_t offset);
++
++/* Value used for dtv entries for which the allocation is delayed.  */
++#define TLS_DTV_UNALLOCATED	((void *) -1l)
+--- a/sysdeps/powerpc/dl-tls.h
++++ b/sysdeps/powerpc/dl-tls.h
+@@ -50,4 +50,7 @@
+ # define __TLS_GET_ADDR(__ti)	(__tls_get_addr (__ti) - TLS_DTV_OFFSET)
+ #endif
+ 
++/* Value used for dtv entries for which the allocation is delayed.  */
++#define TLS_DTV_UNALLOCATED	((void *) -1l)
++
+ #endif /* dl-tls.h */
+--- a/sysdeps/s390/dl-tls.h
++++ b/sysdeps/s390/dl-tls.h
+@@ -75,3 +75,6 @@
+      + (unsigned long) __builtin_thread_pointer (); }) 
+ 
+ #endif
++
++/* Value used for dtv entries for which the allocation is delayed.  */
++#define TLS_DTV_UNALLOCATED	((void *) -1l)
+--- a/sysdeps/sh/dl-tls.h
++++ b/sysdeps/sh/dl-tls.h
+@@ -27,3 +27,6 @@
+ 
+ 
+ extern void *__tls_get_addr (tls_index *ti);
++
++/* Value used for dtv entries for which the allocation is delayed.  */
++#define TLS_DTV_UNALLOCATED	((void *) -1l)
+--- a/sysdeps/sparc/dl-tls.h
++++ b/sysdeps/sparc/dl-tls.h
+@@ -27,3 +27,6 @@
+ 
+ 
+ extern void *__tls_get_addr (tls_index *ti);
++
++/* Value used for dtv entries for which the allocation is delayed.  */
++#define TLS_DTV_UNALLOCATED	((void *) -1l)
+--- a/sysdeps/x86_64/dl-tls.h
++++ b/sysdeps/x86_64/dl-tls.h
+@@ -27,3 +27,6 @@
+ 
+ 
+ extern void *__tls_get_addr (tls_index *ti);
++
++/* Value used for dtv entries for which the allocation is delayed.  */
++#define TLS_DTV_UNALLOCATED	((void *) -1l)
+--- a/ports/sysdeps/arm/dl-tls.h
++++ b/ports/sysdeps/arm/dl-tls.h
+@@ -27,3 +27,6 @@
+ 
+ 
+ extern void *__tls_get_addr (tls_index *ti);
++
++/* Value used for dtv entries for which the allocation is delayed.  */
++#define TLS_DTV_UNALLOCATED	((void *) -1l)
+--- a/ports/sysdeps/mips/dl-tls.h
++++ b/ports/sysdeps/mips/dl-tls.h
+@@ -44,3 +44,6 @@
+ 
+ # define GET_ADDR_OFFSET	(ti->ti_offset + TLS_DTV_OFFSET)
+ # define __TLS_GET_ADDR(__ti)	(__tls_get_addr (__ti) - TLS_DTV_OFFSET)
++
++/* Value used for dtv entries for which the allocation is delayed.  */
++#define TLS_DTV_UNALLOCATED	((void *) -1l)
--- eglibc-2.13.orig/debian/patches/any/cvs-CVE-2012-44xx.diff
+++ eglibc-2.13/debian/patches/any/cvs-CVE-2012-44xx.diff
@@ -0,0 +1,1107 @@
+2013-09-23  Siddhesh Poyarekar  <siddhesh@redhat.com>
+ 
+	[BZ #14547]
+	* string/tst-strcoll-overflow.c: New test case.
+	* string/Makefile (xtests): Add tst-strcoll-overflow.
+	* string/strcoll_l.c (STRCOLL): Skip allocating memory for
+	cache if string sizes may cause integer overflow.
+
+	[BZ #14547]
+	* string/strcoll_l.c (coll_seq): New members rule, idx,
+	save_idx and back_us.
+	(get_next_seq_nocache): New function.
+	(do_compare_nocache): New function.
+	(STRCOLL): Use get_next_seq_nocache and do_compare_nocache
+	when malloc fails.
+
+2013-08-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+	* string/strcoll_l.c (coll_seq): New structure.
+	(get_next_seq_cached): New function.
+	(get_next_seq): New function.
+	(do_compare): New function.
+	(STRCOLL): Use GNU style definition.  Simplify implementation
+	by using get_next_seq, get_next_seq_cached and do_compare.
+
+--- a/string/Makefile
++++ b/string/Makefile
+@@ -67,6 +67,8 @@
+ 		   str-two-way.h
+ 
+ 
++xtests = tst-strcoll-overflow
++
+ include ../Rules
+ 
+ 
+--- a/string/strcoll_l.c
++++ b/string/strcoll_l.c
+@@ -26,6 +26,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <gnu/option-groups.h>
++#include <sys/param.h>
+ 
+ #ifndef STRING_TYPE
+ # define STRING_TYPE char
+@@ -43,11 +44,434 @@
+ 
+ #include "../locale/localeinfo.h"
+ 
++/* Track status while looking for sequences in a string.  */
++typedef struct
++{
++  int len;			/* Length of the current sequence.  */
++  size_t val;			/* Position of the sequence relative to the
++				   previous non-ignored sequence.  */
++  size_t idxnow;		/* Current index in sequences.  */
++  size_t idxmax;		/* Maximum index in sequences.  */
++  size_t idxcnt;		/* Current count of indices.  */
++  size_t backw;			/* Current Backward sequence index.  */
++  size_t backw_stop;		/* Index where the backward sequences stop.  */
++  const USTRING_TYPE *us;	/* The string.  */
++  int32_t *idxarr;		/* Array to cache weight indices.  */
++  unsigned char *rulearr;	/* Array to cache rules.  */
++  unsigned char rule;		/* Saved rule for the first sequence.  */
++  int32_t idx;			/* Index to weight of the current sequence.  */
++  int32_t save_idx;		/* Save looked up index of a forward
++				   sequence after the last backward
++				   sequence.  */
++  const USTRING_TYPE *back_us;	/* Beginning of the backward sequence.  */
++} coll_seq;
++
++/* Get next sequence.  The weight indices are cached, so we don't need to
++   traverse the string.  */
++static void
++get_next_seq_cached (coll_seq *seq, int nrules, int pass,
++		     const unsigned char *rulesets,
++		     const USTRING_TYPE *weights)
++{
++  size_t val = seq->val = 0;
++  int len = seq->len;
++  size_t backw_stop = seq->backw_stop;
++  size_t backw = seq->backw;
++  size_t idxcnt = seq->idxcnt;
++  size_t idxmax = seq->idxmax;
++  size_t idxnow = seq->idxnow;
++  unsigned char *rulearr = seq->rulearr;
++  int32_t *idxarr = seq->idxarr;
++
++  while (len == 0)
++    {
++      ++val;
++      if (backw_stop != ~0ul)
++	{
++	  /* There is something pushed.  */
++	  if (backw == backw_stop)
++	    {
++	      /* The last pushed character was handled.  Continue
++		 with forward characters.  */
++	      if (idxcnt < idxmax)
++		{
++		  idxnow = idxcnt;
++		  backw_stop = ~0ul;
++		}
++	      else
++		{
++		  /* Nothing any more.  The backward sequence
++		     ended with the last sequence in the string.  */
++		  idxnow = ~0ul;
++		  break;
++		}
++	    }
++	  else
++	    idxnow = --backw;
++	}
++      else
++	{
++	  backw_stop = idxcnt;
++
++	  while (idxcnt < idxmax)
++	    {
++	      if ((rulesets[rulearr[idxcnt] * nrules + pass]
++		   & sort_backward) == 0)
++		/* No more backward characters to push.  */
++		break;
++	      ++idxcnt;
++	    }
++
++	  if (backw_stop == idxcnt)
++	    {
++	      /* No sequence at all or just one.  */
++	      if (idxcnt == idxmax)
++		/* Note that LEN is still zero.  */
++		break;
++
++	      backw_stop = ~0ul;
++	      idxnow = idxcnt++;
++	    }
++	  else
++	    /* We pushed backward sequences.  */
++	    idxnow = backw = idxcnt - 1;
++	}
++      len = weights[idxarr[idxnow]++];
++    }
++
++  /* Update the structure.  */
++  seq->val = val;
++  seq->len = len;
++  seq->backw_stop = backw_stop;
++  seq->backw = backw;
++  seq->idxcnt = idxcnt;
++  seq->idxnow = idxnow;
++}
++
++/* Get next sequence.  Traverse the string as required.  */
++static void
++get_next_seq (coll_seq *seq, int nrules, const unsigned char *rulesets,
++	      const USTRING_TYPE *weights, const int32_t *table,
++	      const USTRING_TYPE *extra, const int32_t *indirect)
++{
++#include WEIGHT_H
++  size_t val = seq->val = 0;
++  int len = seq->len;
++  size_t backw_stop = seq->backw_stop;
++  size_t backw = seq->backw;
++  size_t idxcnt = seq->idxcnt;
++  size_t idxmax = seq->idxmax;
++  size_t idxnow = seq->idxnow;
++  unsigned char *rulearr = seq->rulearr;
++  int32_t *idxarr = seq->idxarr;
++  const USTRING_TYPE *us = seq->us;
++
++  while (len == 0)
++    {
++      ++val;
++      if (backw_stop != ~0ul)
++	{
++	  /* There is something pushed.  */
++	  if (backw == backw_stop)
++	    {
++	      /* The last pushed character was handled.  Continue
++		 with forward characters.  */
++	      if (idxcnt < idxmax)
++		{
++		  idxnow = idxcnt;
++		  backw_stop = ~0ul;
++		}
++	      else
++		/* Nothing any more.  The backward sequence ended with
++		   the last sequence in the string.  Note that LEN
++		   is still zero.  */
++		break;
++	    }
++	  else
++	    idxnow = --backw;
++	}
++      else
++	{
++	  backw_stop = idxmax;
++
++	  while (*us != L('\0'))
++	    {
++	      int32_t tmp = findidx (&us, -1);
++	      rulearr[idxmax] = tmp >> 24;
++	      idxarr[idxmax] = tmp & 0xffffff;
++	      idxcnt = idxmax++;
++
++	      if ((rulesets[rulearr[idxcnt] * nrules]
++		   & sort_backward) == 0)
++		/* No more backward characters to push.  */
++		break;
++	      ++idxcnt;
++	    }
++
++	  if (backw_stop >= idxcnt)
++	    {
++	      /* No sequence at all or just one.  */
++	      if (idxcnt == idxmax || backw_stop > idxcnt)
++		/* Note that LEN is still zero.  */
++		break;
++
++	      backw_stop = ~0ul;
++	      idxnow = idxcnt;
++	    }
++	  else
++	    /* We pushed backward sequences.  */
++	    idxnow = backw = idxcnt - 1;
++	}
++      len = weights[idxarr[idxnow]++];
++    }
++
++  /* Update the structure.  */
++  seq->val = val;
++  seq->len = len;
++  seq->backw_stop = backw_stop;
++  seq->backw = backw;
++  seq->idxcnt = idxcnt;
++  seq->idxmax = idxmax;
++  seq->idxnow = idxnow;
++  seq->us = us;
++}
++
++/* Get next sequence.  Traverse the string as required.  This function does not
++   set or use any index or rule cache.  */
++static void
++get_next_seq_nocache (coll_seq *seq, int nrules, const unsigned char *rulesets,
++		      const USTRING_TYPE *weights, const int32_t *table,
++		      const USTRING_TYPE *extra, const int32_t *indirect,
++		      int pass)
++{
++#include WEIGHT_H
++  size_t val = seq->val = 0;
++  int len = seq->len;
++  size_t backw_stop = seq->backw_stop;
++  size_t backw = seq->backw;
++  size_t idxcnt = seq->idxcnt;
++  size_t idxmax = seq->idxmax;
++  int32_t idx = seq->idx;
++  const USTRING_TYPE *us = seq->us;
++
++  while (len == 0)
++    {
++      ++val;
++      if (backw_stop != ~0ul)
++	{
++	  /* There is something pushed.  */
++	  if (backw == backw_stop)
++	    {
++	      /* The last pushed character was handled.  Continue
++		 with forward characters.  */
++	      if (idxcnt < idxmax)
++		{
++		  idx = seq->save_idx;
++		  backw_stop = ~0ul;
++		}
++	      else
++		{
++		  /* Nothing anymore.  The backward sequence ended with
++		     the last sequence in the string.  Note that len is
++		     still zero.  */
++		  idx = 0;
++		  break;
++	        }
++	    }
++	  else
++	    {
++	      /* XXX Traverse BACKW sequences from the beginning of
++		 BACKW_STOP to get the next sequence.  Is ther a quicker way
++	         to do this?  */
++	      size_t i = backw_stop;
++	      us = seq->back_us;
++	      while (i < backw)
++		{
++		  int32_t tmp = findidx (&us, -1);
++		  idx = tmp & 0xffffff;
++		  i++;
++		}
++	      --backw;
++	      us = seq->us;
++	    }
++	}
++      else
++	{
++	  backw_stop = idxmax;
++	  int32_t prev_idx = idx;
++
++	  while (*us != L('\0'))
++	    {
++	      int32_t tmp = findidx (&us, -1);
++	      unsigned char rule = tmp >> 24;
++	      prev_idx = idx;
++	      idx = tmp & 0xffffff;
++	      idxcnt = idxmax++;
++
++	      /* Save the rule for the first sequence.  */
++	      if (__glibc_unlikely (idxcnt == 0))
++	        seq->rule = rule;
++
++	      if ((rulesets[rule * nrules + pass]
++		   & sort_backward) == 0)
++		/* No more backward characters to push.  */
++		break;
++	      ++idxcnt;
++	    }
++
++	  if (backw_stop >= idxcnt)
++	    {
++	      /* No sequence at all or just one.  */
++	      if (idxcnt == idxmax || backw_stop > idxcnt)
++		/* Note that len is still zero.  */
++		break;
++
++	      backw_stop = ~0ul;
++	    }
++	  else
++	    {
++	      /* We pushed backward sequences.  If the stream ended with the
++		 backward sequence, then we process the last sequence we
++		 found.  Otherwise we process the sequence before the last
++		 one since the last one was a forward sequence.  */
++	      seq->back_us = seq->us;
++	      seq->us = us;
++	      backw = idxcnt;
++	      if (idxmax > idxcnt)
++		{
++		  backw--;
++		  seq->save_idx = idx;
++		  idx = prev_idx;
++		}
++	      if (backw > backw_stop)
++		backw--;
++	    }
++	}
++
++      len = weights[idx++];
++      /* Skip over indices of previous levels.  */
++      for (int i = 0; i < pass; i++)
++	{
++	  idx += len;
++	  len = weights[idx];
++	  idx++;
++	}
++    }
++
++  /* Update the structure.  */
++  seq->val = val;
++  seq->len = len;
++  seq->backw_stop = backw_stop;
++  seq->backw = backw;
++  seq->idxcnt = idxcnt;
++  seq->idxmax = idxmax;
++  seq->us = us;
++  seq->idx = idx;
++}
++
++/* Compare two sequences.  This version does not use the index and rules
++   cache.  */
++static int
++do_compare_nocache (coll_seq *seq1, coll_seq *seq2, int position,
++		    const USTRING_TYPE *weights)
++{
++  int seq1len = seq1->len;
++  int seq2len = seq2->len;
++  size_t val1 = seq1->val;
++  size_t val2 = seq2->val;
++  int idx1 = seq1->idx;
++  int idx2 = seq2->idx;
++  int result = 0;
++
++  /* Test for position if necessary.  */
++  if (position && val1 != val2)
++    {
++      result = val1 > val2 ? 1 : -1;
++      goto out;
++    }
++
++  /* Compare the two sequences.  */
++  do
++    {
++      if (weights[idx1] != weights[idx2])
++	{
++	  /* The sequences differ.  */
++	  result = weights[idx1] - weights[idx2];
++	  goto out;
++	}
++
++      /* Increment the offsets.  */
++      ++idx1;
++      ++idx2;
++
++      --seq1len;
++      --seq2len;
++    }
++  while (seq1len > 0 && seq2len > 0);
++
++  if (position && seq1len != seq2len)
++    result = seq1len - seq2len;
++
++out:
++  seq1->len = seq1len;
++  seq2->len = seq2len;
++  seq1->idx = idx1;
++  seq2->idx = idx2;
++  return result;
++}
++
++/* Compare two sequences using the index cache.  */
++static int
++do_compare (coll_seq *seq1, coll_seq *seq2, int position,
++	    const USTRING_TYPE *weights)
++{
++  int seq1len = seq1->len;
++  int seq2len = seq2->len;
++  size_t val1 = seq1->val;
++  size_t val2 = seq2->val;
++  int32_t *idx1arr = seq1->idxarr;
++  int32_t *idx2arr = seq2->idxarr;
++  int idx1now = seq1->idxnow;
++  int idx2now = seq2->idxnow;
++  int result = 0;
++
++  /* Test for position if necessary.  */
++  if (position && val1 != val2)
++    {
++      result = val1 > val2 ? 1 : -1;
++      goto out;
++    }
++
++  /* Compare the two sequences.  */
++  do
++    {
++      if (weights[idx1arr[idx1now]] != weights[idx2arr[idx2now]])
++	{
++	  /* The sequences differ.  */
++	  result = weights[idx1arr[idx1now]] - weights[idx2arr[idx2now]];
++	  goto out;
++	}
++
++      /* Increment the offsets.  */
++      ++idx1arr[idx1now];
++      ++idx2arr[idx2now];
++
++      --seq1len;
++      --seq2len;
++    }
++  while (seq1len > 0 && seq2len > 0);
++
++  if (position && seq1len != seq2len)
++    result = seq1len - seq2len;
++
++out:
++  seq1->len = seq1len;
++  seq2->len = seq2len;
++  return result;
++}
++
+ int
+-STRCOLL (s1, s2, l)
+-     const STRING_TYPE *s1;
+-     const STRING_TYPE *s2;
+-     __locale_t l;
++STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l)
+ {
+   struct __locale_data *current = l->__locales[LC_COLLATE];
+ #if __OPTION_EGLIBC_LOCALE_CODE
+@@ -62,34 +486,6 @@
+   const USTRING_TYPE *weights;
+   const USTRING_TYPE *extra;
+   const int32_t *indirect;
+-  uint_fast32_t pass;
+-  int result = 0;
+-  const USTRING_TYPE *us1;
+-  const USTRING_TYPE *us2;
+-  size_t s1len;
+-  size_t s2len;
+-  int32_t *idx1arr;
+-  int32_t *idx2arr;
+-  unsigned char *rule1arr;
+-  unsigned char *rule2arr;
+-  size_t idx1max;
+-  size_t idx2max;
+-  size_t idx1cnt;
+-  size_t idx2cnt;
+-  size_t idx1now;
+-  size_t idx2now;
+-  size_t backw1_stop;
+-  size_t backw2_stop;
+-  size_t backw1;
+-  size_t backw2;
+-  int val1;
+-  int val2;
+-  int position;
+-  int seq1len;
+-  int seq2len;
+-  int use_malloc;
+-
+-#include WEIGHT_H
+ 
+   if (nrules == 0)
+     return STRCMP (s1, s2);
+@@ -104,7 +500,6 @@
+     current->values[_NL_ITEM_INDEX (CONCAT(_NL_COLLATE_EXTRA,SUFFIX))].string;
+   indirect = (const int32_t *)
+     current->values[_NL_ITEM_INDEX (CONCAT(_NL_COLLATE_INDIRECT,SUFFIX))].string;
+-  use_malloc = 0;
+ 
+   assert (((uintptr_t) table) % __alignof__ (table[0]) == 0);
+   assert (((uintptr_t) weights) % __alignof__ (weights[0]) == 0);
+@@ -112,18 +507,13 @@
+   assert (((uintptr_t) indirect) % __alignof__ (indirect[0]) == 0);
+ 
+   /* We need this a few times.  */
+-  s1len = STRLEN (s1);
+-  s2len = STRLEN (s2);
++  size_t s1len = STRLEN (s1);
++  size_t s2len = STRLEN (s2);
+ 
+   /* Catch empty strings.  */
+-  if (__builtin_expect (s1len == 0, 0) || __builtin_expect (s2len == 0, 0))
++  if (__glibc_unlikely (s1len == 0) || __glibc_unlikely (s2len == 0))
+     return (s1len != 0) - (s2len != 0);
+ 
+-  /* We need the elements of the strings as unsigned values since they
+-     are used as indeces.  */
+-  us1 = (const USTRING_TYPE *) s1;
+-  us2 = (const USTRING_TYPE *) s2;
+-
+   /* Perform the first pass over the string and while doing this find
+      and store the weights for each character.  Since we want this to
+      be as fast as possible we are using `alloca' to store the temporary
+@@ -133,411 +523,122 @@
+ 
+      Please note that the localedef programs makes sure that `position'
+      is not used at the first level.  */
+-  if (! __libc_use_alloca ((s1len + s2len) * (sizeof (int32_t) + 1)))
+-    {
+-      idx1arr = (int32_t *) malloc ((s1len + s2len) * (sizeof (int32_t) + 1));
+-      idx2arr = &idx1arr[s1len];
+-      rule1arr = (unsigned char *) &idx2arr[s2len];
+-      rule2arr = &rule1arr[s1len];
+ 
+-      if (idx1arr == NULL)
+-	/* No memory.  Well, go with the stack then.
++  coll_seq seq1, seq2;
++  bool use_malloc = false;
++  int result = 0;
+ 
+-	   XXX Once this implementation is stable we will handle this
+-	   differently.  Instead of precomputing the indeces we will
+-	   do this in time.  This means, though, that this happens for
+-	   every pass again.  */
+-	goto try_stack;
+-      use_malloc = 1;
+-    }
+-  else
++  memset (&seq1, 0, sizeof (seq1));
++  seq2 = seq1;
++
++  size_t size_max = SIZE_MAX / (sizeof (int32_t) + 1);
++
++  if (MIN (s1len, s2len) > size_max
++      || MAX (s1len, s2len) > size_max - MIN (s1len, s2len))
+     {
+-    try_stack:
+-      idx1arr = (int32_t *) alloca (s1len * sizeof (int32_t));
+-      idx2arr = (int32_t *) alloca (s2len * sizeof (int32_t));
+-      rule1arr = (unsigned char *) alloca (s1len);
+-      rule2arr = (unsigned char *) alloca (s2len);
++      /* If the strings are long enough to cause overflow in the size request,
++         then skip the allocation and proceed with the non-cached routines.  */
+     }
+-
+-  idx1cnt = 0;
+-  idx2cnt = 0;
+-  idx1max = 0;
+-  idx2max = 0;
+-  idx1now = 0;
+-  idx2now = 0;
+-  backw1_stop = ~0ul;
+-  backw2_stop = ~0ul;
+-  backw1 = ~0ul;
+-  backw2 = ~0ul;
+-  seq1len = 0;
+-  seq2len = 0;
+-  position = rulesets[0] & sort_position;
+-  while (1)
++  else if (! __libc_use_alloca ((s1len + s2len) * (sizeof (int32_t) + 1)))
+     {
+-      val1 = 0;
+-      val2 = 0;
+-
+-      /* Get the next non-IGNOREd element for string `s1'.  */
+-      if (seq1len == 0)
+-	do
+-	  {
+-	    ++val1;
+-
+-	    if (backw1_stop != ~0ul)
+-	      {
+-		/* The is something pushed.  */
+-		if (backw1 == backw1_stop)
+-		  {
+-		    /* The last pushed character was handled.  Continue
+-		       with forward characters.  */
+-		    if (idx1cnt < idx1max)
+-		      {
+-			idx1now = idx1cnt;
+-			backw1_stop = ~0ul;
+-		      }
+-		    else
+-		      /* Nothing anymore.  The backward sequence ended with
+-			 the last sequence in the string.  Note that seq1len
+-			 is still zero.  */
+-		      break;
+-		  }
+-		else
+-		  idx1now = --backw1;
+-	      }
+-	    else
+-	      {
+-		backw1_stop = idx1max;
+-
+-		while (*us1 != L('\0'))
+-		  {
+-		    int32_t tmp = findidx (&us1, -1);
+-		    rule1arr[idx1max] = tmp >> 24;
+-		    idx1arr[idx1max] = tmp & 0xffffff;
+-		    idx1cnt = idx1max++;
+-
+-		    if ((rulesets[rule1arr[idx1cnt] * nrules]
+-			 & sort_backward) == 0)
+-		      /* No more backward characters to push.  */
+-		      break;
+-		    ++idx1cnt;
+-		  }
+-
+-		if (backw1_stop >= idx1cnt)
+-		  {
+-		    /* No sequence at all or just one.  */
+-		    if (idx1cnt == idx1max || backw1_stop > idx1cnt)
+-		      /* Note that seq1len is still zero.  */
+-		      break;
+-
+-		    backw1_stop = ~0ul;
+-		    idx1now = idx1cnt;
+-		  }
+-		else
+-		  /* We pushed backward sequences.  */
+-		  idx1now = backw1 = idx1cnt - 1;
+-	      }
+-	  }
+-	while ((seq1len = weights[idx1arr[idx1now]++]) == 0);
+-
+-      /* And the same for string `s2'.  */
+-      if (seq2len == 0)
+-	do
+-	  {
+-	    ++val2;
+-
+-	    if (backw2_stop != ~0ul)
+-	      {
+-		/* The is something pushed.  */
+-		if (backw2 == backw2_stop)
+-		  {
+-		    /* The last pushed character was handled.  Continue
+-		       with forward characters.  */
+-		    if (idx2cnt < idx2max)
+-		      {
+-			idx2now = idx2cnt;
+-			backw2_stop = ~0ul;
+-		      }
+-		    else
+-		      /* Nothing anymore.  The backward sequence ended with
+-			 the last sequence in the string.  Note that seq2len
+-			 is still zero.  */
+-		      break;
+-		  }
+-		else
+-		  idx2now = --backw2;
+-	      }
+-	    else
+-	      {
+-		backw2_stop = idx2max;
+-
+-		while (*us2 != L('\0'))
+-		  {
+-		    int32_t tmp = findidx (&us2, -1);
+-		    rule2arr[idx2max] = tmp >> 24;
+-		    idx2arr[idx2max] = tmp & 0xffffff;
+-		    idx2cnt = idx2max++;
+-
+-		    if ((rulesets[rule2arr[idx2cnt] * nrules]
+-			 & sort_backward) == 0)
+-		      /* No more backward characters to push.  */
+-		      break;
+-		    ++idx2cnt;
+-		  }
+-
+-		if (backw2_stop >= idx2cnt)
+-		  {
+-		    /* No sequence at all or just one.  */
+-		    if (idx2cnt == idx2max || backw2_stop > idx2cnt)
+-		      /* Note that seq1len is still zero.  */
+-		      break;
+-
+-		    backw2_stop = ~0ul;
+-		    idx2now = idx2cnt;
+-		  }
+-		else
+-		  /* We pushed backward sequences.  */
+-		  idx2now = backw2 = idx2cnt - 1;
+-	      }
+-	  }
+-	while ((seq2len = weights[idx2arr[idx2now]++]) == 0);
+-
+-      /* See whether any or both strings are empty.  */
+-      if (seq1len == 0 || seq2len == 0)
+-	{
+-	  if (seq1len == seq2len)
+-	    /* Both ended.  So far so good, both strings are equal at the
+-	       first level.  */
+-	    break;
+-
+-	  /* This means one string is shorter than the other.  Find out
+-	     which one and return an appropriate value.  */
+-	  result = seq1len == 0 ? -1 : 1;
+-	  goto free_and_return;
+-	}
++      seq1.idxarr = (int32_t *) malloc ((s1len + s2len) * (sizeof (int32_t) + 1));
+ 
+-      /* Test for position if necessary.  */
+-      if (position && val1 != val2)
++      /* If we failed to allocate memory, we leave everything as NULL so that
++	 we use the nocache version of traversal and comparison functions.  */
++      if (seq1.idxarr != NULL)
+ 	{
+-	  result = val1 - val2;
+-	  goto free_and_return;
++	  seq2.idxarr = &seq1.idxarr[s1len];
++	  seq1.rulearr = (unsigned char *) &seq2.idxarr[s2len];
++	  seq2.rulearr = &seq1.rulearr[s1len];
++	  use_malloc = true;
+ 	}
++    }
++  else
++    {
++      seq1.idxarr = (int32_t *) alloca (s1len * sizeof (int32_t));
++      seq2.idxarr = (int32_t *) alloca (s2len * sizeof (int32_t));
++      seq1.rulearr = (unsigned char *) alloca (s1len);
++      seq2.rulearr = (unsigned char *) alloca (s2len);
++    }
+ 
+-      /* Compare the two sequences.  */
+-      do
+-	{
+-	  if (weights[idx1arr[idx1now]] != weights[idx2arr[idx2now]])
+-	    {
+-	      /* The sequences differ.  */
+-	      result = weights[idx1arr[idx1now]] - weights[idx2arr[idx2now]];
+-	      goto free_and_return;
+-	    }
+-
+-	  /* Increment the offsets.  */
+-	  ++idx1arr[idx1now];
+-	  ++idx2arr[idx2now];
++  int rule = 0;
+ 
+-	  --seq1len;
+-	  --seq2len;
+-	}
+-      while (seq1len > 0 && seq2len > 0);
++  /* Cache values in the first pass and if needed, use them in subsequent
++     passes.  */
++  for (int pass = 0; pass < nrules; ++pass)
++    {
++      seq1.idxcnt = 0;
++      seq1.idx = 0;
++      seq2.idx = 0;
++      seq1.backw_stop = ~0ul;
++      seq1.backw = ~0ul;
++      seq2.idxcnt = 0;
++      seq2.backw_stop = ~0ul;
++      seq2.backw = ~0ul;
+ 
+-      if (position && seq1len != seq2len)
+-	{
+-	  result = seq1len - seq2len;
+-	  goto free_and_return;
+-	}
+-    }
++      /* We need the elements of the strings as unsigned values since they
++	 are used as indices.  */
++      seq1.us = (const USTRING_TYPE *) s1;
++      seq2.us = (const USTRING_TYPE *) s2;
+ 
+-  /* Now the remaining passes over the weights.  We now use the
+-     indeces we found before.  */
+-  for (pass = 1; pass < nrules; ++pass)
+-    {
+       /* We assume that if a rule has defined `position' in one section
+ 	 this is true for all of them.  */
+-      idx1cnt = 0;
+-      idx2cnt = 0;
+-      backw1_stop = ~0ul;
+-      backw2_stop = ~0ul;
+-      backw1 = ~0ul;
+-      backw2 = ~0ul;
+-      position = rulesets[rule1arr[0] * nrules + pass] & sort_position;
++      int position = rulesets[rule * nrules + pass] & sort_position;
+ 
+       while (1)
+ 	{
+-	  val1 = 0;
+-	  val2 = 0;
+-
+-	  /* Get the next non-IGNOREd element for string `s1'.  */
+-	  if (seq1len == 0)
+-	    do
+-	      {
+-		++val1;
+-
+-		if (backw1_stop != ~0ul)
+-		  {
+-		    /* The is something pushed.  */
+-		    if (backw1 == backw1_stop)
+-		      {
+-			/* The last pushed character was handled.  Continue
+-			   with forward characters.  */
+-			if (idx1cnt < idx1max)
+-			  {
+-			    idx1now = idx1cnt;
+-			    backw1_stop = ~0ul;
+-			  }
+-			else
+-			  {
+-			    /* Nothing anymore.  The backward sequence
+-			       ended with the last sequence in the string.  */
+-			    idx1now = ~0ul;
+-			    break;
+-			  }
+-		      }
+-		    else
+-		      idx1now = --backw1;
+-		  }
+-		else
+-		  {
+-		    backw1_stop = idx1cnt;
+-
+-		    while (idx1cnt < idx1max)
+-		      {
+-			if ((rulesets[rule1arr[idx1cnt] * nrules + pass]
+-			     & sort_backward) == 0)
+-			  /* No more backward characters to push.  */
+-			  break;
+-			++idx1cnt;
+-		      }
+-
+-		    if (backw1_stop == idx1cnt)
+-		      {
+-			/* No sequence at all or just one.  */
+-			if (idx1cnt == idx1max)
+-			  /* Note that seq1len is still zero.  */
+-			  break;
+-
+-			backw1_stop = ~0ul;
+-			idx1now = idx1cnt++;
+-		      }
+-		    else
+-		      /* We pushed backward sequences.  */
+-		      idx1now = backw1 = idx1cnt - 1;
+-		  }
+-	      }
+-	    while ((seq1len = weights[idx1arr[idx1now]++]) == 0);
+-
+-	  /* And the same for string `s2'.  */
+-	  if (seq2len == 0)
+-	    do
+-	      {
+-		++val2;
+-
+-		if (backw2_stop != ~0ul)
+-		  {
+-		    /* The is something pushed.  */
+-		    if (backw2 == backw2_stop)
+-		      {
+-			/* The last pushed character was handled.  Continue
+-			   with forward characters.  */
+-			if (idx2cnt < idx2max)
+-			  {
+-			    idx2now = idx2cnt;
+-			    backw2_stop = ~0ul;
+-			  }
+-			else
+-			  {
+-			    /* Nothing anymore.  The backward sequence
+-			       ended with the last sequence in the string.  */
+-			    idx2now = ~0ul;
+-			    break;
+-			  }
+-		      }
+-		    else
+-		      idx2now = --backw2;
+-		  }
+-		else
+-		  {
+-		    backw2_stop = idx2cnt;
+-
+-		    while (idx2cnt < idx2max)
+-		      {
+-			if ((rulesets[rule2arr[idx2cnt] * nrules + pass]
+-			     & sort_backward) == 0)
+-			  /* No more backward characters to push.  */
+-			  break;
+-			++idx2cnt;
+-		      }
+-
+-		    if (backw2_stop == idx2cnt)
+-		      {
+-			/* No sequence at all or just one.  */
+-			if (idx2cnt == idx2max)
+-			  /* Note that seq2len is still zero.  */
+-			  break;
+-
+-			backw2_stop = ~0ul;
+-			idx2now = idx2cnt++;
+-		      }
+-		    else
+-		      /* We pushed backward sequences.  */
+-		      idx2now = backw2 = idx2cnt - 1;
+-		  }
+-	      }
+-	    while ((seq2len = weights[idx2arr[idx2now]++]) == 0);
++	  if (__glibc_unlikely (seq1.idxarr == NULL))
++	    {
++	      get_next_seq_nocache (&seq1, nrules, rulesets, weights, table,
++				    extra, indirect, pass);
++	      get_next_seq_nocache (&seq2, nrules, rulesets, weights, table,
++				    extra, indirect, pass);
++	    }
++	  else if (pass == 0)
++	    {
++	      get_next_seq (&seq1, nrules, rulesets, weights, table, extra,
++			    indirect);
++	      get_next_seq (&seq2, nrules, rulesets, weights, table, extra,
++			    indirect);
++	    }
++	  else
++	    {
++	      get_next_seq_cached (&seq1, nrules, pass, rulesets, weights);
++	      get_next_seq_cached (&seq2, nrules, pass, rulesets, weights);
++	    }
+ 
+ 	  /* See whether any or both strings are empty.  */
+-	  if (seq1len == 0 || seq2len == 0)
++	  if (seq1.len == 0 || seq2.len == 0)
+ 	    {
+-	      if (seq1len == seq2len)
++	      if (seq1.len == seq2.len)
+ 		/* Both ended.  So far so good, both strings are equal
+ 		   at this level.  */
+ 		break;
+ 
+ 	      /* This means one string is shorter than the other.  Find out
+ 		 which one and return an appropriate value.  */
+-	      result = seq1len == 0 ? -1 : 1;
+-	      goto free_and_return;
+-	    }
+-
+-	  /* Test for position if necessary.  */
+-	  if (position && val1 != val2)
+-	    {
+-	      result = val1 - val2;
++	      result = seq1.len == 0 ? -1 : 1;
+ 	      goto free_and_return;
+ 	    }
+ 
+-	  /* Compare the two sequences.  */
+-	  do
+-	    {
+-	      if (weights[idx1arr[idx1now]] != weights[idx2arr[idx2now]])
+-		{
+-		  /* The sequences differ.  */
+-		  result = (weights[idx1arr[idx1now]]
+-			    - weights[idx2arr[idx2now]]);
+-		  goto free_and_return;
+-		}
+-
+-	      /* Increment the offsets.  */
+-	      ++idx1arr[idx1now];
+-	      ++idx2arr[idx2now];
+-
+-	      --seq1len;
+-	      --seq2len;
+-	    }
+-	  while (seq1len > 0 && seq2len > 0);
+-
+-	  if (position && seq1len != seq2len)
+-	    {
+-	      result = seq1len - seq2len;
+-	      goto free_and_return;
+-	    }
++	  if (__glibc_unlikely (seq1.idxarr == NULL))
++	    result = do_compare_nocache (&seq1, &seq2, position, weights);
++	  else
++	    result = do_compare (&seq1, &seq2, position, weights);
++	  if (result != 0)
++	    goto free_and_return;
+ 	}
++
++      if (__builtin_expect ((seq1.rulearr != NULL), 1))
++	rule = seq1.rulearr[0];
++      else
++	rule = seq1.rule;
+     }
+ 
+   /* Free the memory if needed.  */
+  free_and_return:
+   if (use_malloc)
+-    free (idx1arr);
++    free (seq1.idxarr);
+ 
+   return result;
+ }
+--- a/string/tst-strcoll-overflow.c
++++ b/string/tst-strcoll-overflow.c
+@@ -0,0 +1,61 @@
++/* Copyright (C) 2013 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, see
++   <http://www.gnu.org/licenses/>.  */
++
++#include <locale.h>
++#include <stdio.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++
++/* Verify that strcoll does not crash for large strings for which it cannot
++   cache weight lookup results.  The size is large enough to cause integer
++   overflows on 32-bit as well as buffer overflows on 64-bit.  The test should
++   work reasonably reliably when overcommit is disabled, but it obviously
++   depends on how much memory the system has.  There's a limitation to this
++   test in that it does not run to completion.  Actually collating such a
++   large string can take days and we can't have xcheck running that long.  For
++   that reason, we run the test for about 5 minutes and then assume that
++   everything is fine if there are no crashes.  */
++#define SIZE 0x40000000ul
++
++int
++do_test (void)
++{
++  if (setlocale (LC_COLLATE, "en_GB.UTF-8") == NULL)
++    {
++      puts ("setlocale failed, cannot test for overflow");
++      return 0;
++    }
++
++  char *p = malloc (SIZE);
++
++  if (p == NULL)
++    {
++      puts ("could not allocate memory");
++      return 1;
++    }
++
++  memset (p, 'x', SIZE - 1);
++  p[SIZE - 1] = 0;
++  printf ("%d\n", strcoll (p, p));
++  return 0;
++}
++
++#define TIMEOUT 300
++#define EXPECTED_SIGNAL SIGALRM
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
--- eglibc-2.13.orig/debian/patches/any/cvs-CVE-2013-4788.diff
+++ eglibc-2.13/debian/patches/any/cvs-CVE-2013-4788.diff
@@ -0,0 +1,420 @@
+2013-09-25  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
+
+	* sysdeps/powerpc/powerpc64/stackguard-macros.h (POINTER_CHK_GUARD:
+	Fix thread ID register.
+
+2013-09-23  Carlos O'Donell  <carlos@redhat.com>
+
+ 	[BZ #15754]
+	* sysdeps/generic/stackguard-macros.h: If PTRGUARD_LOCAL use
+	__pointer_chk_guard_local, otherwise __pointer_chk_guard.
+	* elf/Makefile: Define CFLAGS-tst-ptrguard1-static.c.
+
+	[BZ #15754]
+	* elf/Makefile (tests): Add tst-ptrguard1.
+	(tests-static): Add tst-ptrguard1-static.
+	(tst-ptrguard1-ARGS): Define.
+	(tst-ptrguard1-static-ARGS): Define.
+	* elf/tst-ptrguard1.c: New file.
+	* elf/tst-ptrguard1-static.c: New file.
+	* sysdeps/x86_64/stackguard-macros.h: Define POINTER_CHK_GUARD.
+	* sysdeps/i386/stackguard-macros.h: Likewise.
+	* sysdeps/powerpc/powerpc32/stackguard-macros.h: Likewise.
+	* sysdeps/powerpc/powerpc64/stackguard-macros.h: Likewise.
+	* sysdeps/s390/s390-32/stackguard-macros.h: Likewise.
+	* sysdeps/s390/s390-64/stackguard-macros.h: Likewise.
+	* sysdeps/sparc/sparc32/stackguard-macros.h: Likewise.
+	* sysdeps/sparc/sparc64/stackguard-macros.h: Likewise.
+
+2013-09-23  Hector Marco  <hecmargi@upv.es>
+	    Ismael Ripoll  <iripoll@disca.upv.es>
+	    Carlos O'Donell  <carlos@redhat.com>
+
+	[BZ #15754]
+	* sysdeps/generic/stackguard-macros.h: Define
+	__pointer_chk_guard_local and POINTER_CHK_GUARD.
+	* csu/libc-start.c [!SHARED && !THREAD_SET_POINTER_GUARD]:
+	Define __pointer_chk_guard_local.
+	(LIBC_START_MAIN) [!SHARED]: Call _dl_setup_pointer_guard.
+	Use THREAD_SET_POINTER_GUARD or set __pointer_chk_guard_local.
+
+2013-09-22  Carlos O'Donell  <carlos@redhat.com>
+
+	[BZ #15754]
+	* sysdeps/ia64/stackguard-macros.h: Define POINTER_CHK_GUARD.
+
+
+--- a/csu/libc-start.c
++++ b/csu/libc-start.c
+@@ -39,6 +39,12 @@
+    in thread local area.  */
+ uintptr_t __stack_chk_guard attribute_relro;
+ # endif
++# ifndef  THREAD_SET_POINTER_GUARD
++/* Only exported for architectures that don't store the pointer guard
++   value in thread local area.  */
++uintptr_t __pointer_chk_guard_local
++	attribute_relro attribute_hidden __attribute__ ((nocommon));
++# endif
+ #endif
+ 
+ #ifdef HAVE_PTR_NTHREADS
+@@ -154,6 +160,16 @@
+ # else
+   __stack_chk_guard = stack_chk_guard;
+ # endif
++
++  /* Set up the pointer guard value.  */
++  uintptr_t pointer_chk_guard = _dl_setup_pointer_guard (_dl_random,
++							 stack_chk_guard);
++# ifdef THREAD_SET_POINTER_GUARD
++  THREAD_SET_POINTER_GUARD (pointer_chk_guard);
++# else
++  __pointer_chk_guard_local = pointer_chk_guard;
++# endif
++
+ #endif
+ 
+   /* Register the destructor of the dynamic linker if there is any.  */
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -179,7 +179,7 @@
+ tests += tst-array1 tst-array2 tst-array3 tst-array4 tst-array5
+ endif
+ ifeq (yes,$(build-static))
+-tests-static = tst-tls1-static tst-tls2-static tst-stackguard1-static
++tests-static = tst-tls1-static tst-tls2-static tst-stackguard1-static tst-ptrguard1-static
+ ifeq (yesyesyes,$(build-static)$(build-shared)$(elf))
+ tests-static += tst-tls9-static
+ tst-tls9-static-ENV = \
+@@ -208,7 +208,8 @@
+ 	 tst-audit1 tst-audit2 \
+ 	 tst-stackguard1 tst-addr1 tst-thrlock \
+ 	 tst-unique1 tst-unique2 \
+-	 tst-initorder
++	 tst-initorder \
++	 tst-ptrguard1
+ #	 reldep9
+ test-srcs = tst-pathopt
+ tests-execstack-yes = tst-execstack tst-execstack-needed tst-execstack-prog
+@@ -1076,6 +1077,12 @@
+ tst-stackguard1-ARGS = --command "$(local-built-program-cmd) --child"
+ tst-stackguard1-static-ARGS = --command "$(objpfx)tst-stackguard1-static --child"
+ 
++tst-ptrguard1-ARGS = --command "$(local-built-program-cmd) --child"
++# When built statically, the pointer guard interface uses
++# __pointer_chk_guard_local.
++CFLAGS-tst-ptrguard1-static.c = -DPTRGUARD_LOCAL
++tst-ptrguard1-static-ARGS = --command "$(objpfx)tst-ptrguard1-static --child"
++
+ $(objpfx)tst-leaks1: $(libdl)
+ $(objpfx)tst-leaks1-mem: $(objpfx)tst-leaks1.out
+ 	$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1.mtrace > $@
+--- /dev/null
++++ b/elf/tst-ptrguard1-static.c
+@@ -0,0 +1 @@
++#include "tst-ptrguard1.c"
+--- /dev/null
++++ b/elf/tst-ptrguard1.c
+@@ -0,0 +1,202 @@
++/* Copyright (C) 2013 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, see
++   <http://www.gnu.org/licenses/>.  */
++
++#include <errno.h>
++#include <stdbool.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/wait.h>
++#include <stackguard-macros.h>
++#include <tls.h>
++#include <unistd.h>
++
++#ifndef POINTER_CHK_GUARD
++extern uintptr_t __pointer_chk_guard;
++# define POINTER_CHK_GUARD __pointer_chk_guard
++#endif
++
++static const char *command;
++static bool child;
++static uintptr_t ptr_chk_guard_copy;
++static bool ptr_chk_guard_copy_set;
++static int fds[2];
++
++static void __attribute__ ((constructor))
++con (void)
++{
++  ptr_chk_guard_copy = POINTER_CHK_GUARD;
++  ptr_chk_guard_copy_set = true;
++}
++
++static int
++uintptr_t_cmp (const void *a, const void *b)
++{
++  if (*(uintptr_t *) a < *(uintptr_t *) b)
++    return 1;
++  if (*(uintptr_t *) a > *(uintptr_t *) b)
++    return -1;
++  return 0;
++}
++
++static int
++do_test (void)
++{
++  if (!ptr_chk_guard_copy_set)
++    {
++      puts ("constructor has not been run");
++      return 1;
++    }
++
++  if (ptr_chk_guard_copy != POINTER_CHK_GUARD)
++    {
++      puts ("POINTER_CHK_GUARD changed between constructor and do_test");
++      return 1;
++    }
++
++  if (child)
++    {
++      write (2, &ptr_chk_guard_copy, sizeof (ptr_chk_guard_copy));
++      return 0;
++    }
++
++  if (command == NULL)
++    {
++      puts ("missing --command or --child argument");
++      return 1;
++    }
++
++#define N 16
++  uintptr_t child_ptr_chk_guards[N + 1];
++  child_ptr_chk_guards[N] = ptr_chk_guard_copy;
++  int i;
++  for (i = 0; i < N; ++i)
++    {
++      if (pipe (fds) < 0)
++	{
++	  printf ("couldn't create pipe: %m\n");
++	  return 1;
++	}
++
++      pid_t pid = fork ();
++      if (pid < 0)
++	{
++	  printf ("fork failed: %m\n");
++	  return 1;
++	}
++
++      if (!pid)
++	{
++	  if (ptr_chk_guard_copy != POINTER_CHK_GUARD)
++	    {
++	      puts ("POINTER_CHK_GUARD changed after fork");
++	      exit (1);
++	    }
++
++	  close (fds[0]);
++	  close (2);
++	  dup2 (fds[1], 2);
++	  close (fds[1]);
++
++	  system (command);
++	  exit (0);
++	}
++
++      close (fds[1]);
++
++      if (TEMP_FAILURE_RETRY (read (fds[0], &child_ptr_chk_guards[i],
++				    sizeof (uintptr_t))) != sizeof (uintptr_t))
++	{
++	  puts ("could not read ptr_chk_guard value from child");
++	  return 1;
++	}
++
++      close (fds[0]);
++
++      pid_t termpid;
++      int status;
++      termpid = TEMP_FAILURE_RETRY (waitpid (pid, &status, 0));
++      if (termpid == -1)
++	{
++	  printf ("waitpid failed: %m\n");
++	  return 1;
++	}
++      else if (termpid != pid)
++	{
++	  printf ("waitpid returned %ld != %ld\n",
++		  (long int) termpid, (long int) pid);
++	  return 1;
++	}
++      else if (!WIFEXITED (status) || WEXITSTATUS (status))
++	{
++	  puts ("child hasn't exited with exit status 0");
++	  return 1;
++	}
++    }
++
++  qsort (child_ptr_chk_guards, N + 1, sizeof (uintptr_t), uintptr_t_cmp);
++
++  /* The default pointer guard is the same as the default stack guard.
++     They are only set to default if dl_random is NULL.  */
++  uintptr_t default_guard = 0;
++  unsigned char *p = (unsigned char *) &default_guard;
++  p[sizeof (uintptr_t) - 1] = 255;
++  p[sizeof (uintptr_t) - 2] = '\n';
++  p[0] = 0;
++
++  /* Test if the pointer guard canaries are either randomized,
++     or equal to the default pointer guard value.
++     Even with randomized pointer guards it might happen
++     that the random number generator generates the same
++     values, but if that happens in more than half from
++     the 16 runs, something is very wrong.  */
++  int ndifferences = 0;
++  int ndefaults = 0;
++  for (i = 0; i < N; ++i)
++    {
++      if (child_ptr_chk_guards[i] != child_ptr_chk_guards[i+1])
++	ndifferences++;
++      else if (child_ptr_chk_guards[i] == default_guard)
++	ndefaults++;
++    }
++
++  printf ("differences %d defaults %d\n", ndifferences, ndefaults);
++
++  if (ndifferences < N / 2 && ndefaults < N / 2)
++    {
++      puts ("pointer guard values are not randomized enough");
++      puts ("nor equal to the default value");
++      return 1;
++    }
++
++  return 0;
++}
++
++#define OPT_COMMAND	10000
++#define OPT_CHILD	10001
++#define CMDLINE_OPTIONS	\
++  { "command", required_argument, NULL, OPT_COMMAND },  \
++  { "child", no_argument, NULL, OPT_CHILD },
++#define CMDLINE_PROCESS	\
++  case OPT_COMMAND:	\
++    command = optarg;	\
++    break;		\
++  case OPT_CHILD:	\
++    child = true;	\
++    break;
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+--- a/elf/stackguard-macros.h
++++ b/elf/stackguard-macros.h
+@@ -3,31 +3,96 @@
+ #ifdef __i386__
+ # define STACK_CHK_GUARD \
+   ({ uintptr_t x; asm ("movl %%gs:0x14, %0" : "=r" (x)); x; })
++#define POINTER_CHK_GUARD \
++  ({							\
++     uintptr_t x;					\
++     asm ("movl %%gs:%c1, %0" : "=r" (x)		\
++	  : "i" (offsetof (tcbhead_t, pointer_guard)));	\
++     x;							\
++   })
+ #elif defined __x86_64__
+ # define STACK_CHK_GUARD \
+   ({ uintptr_t x; asm ("movq %%fs:0x28, %0" : "=r" (x)); x; })
++#define POINTER_CHK_GUARD \
++  ({ uintptr_t x;						\
++     asm ("mov %%fs:%c1, %0" : "=r" (x)				\
++	  : "i" (offsetof (tcbhead_t, pointer_guard))); x; })
+ #elif defined __powerpc64__
+ # define STACK_CHK_GUARD \
+   ({ uintptr_t x; asm ("ld %0,-28688(13)" : "=r" (x)); x; })
++#define POINTER_CHK_GUARD \
++  ({												\
++     uintptr_t x;										\
++     asm ("ld %0,%1(13)"									\
++	  : "=r" (x)										\
++	  : "i" (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t))	\
++         );											\
++     x;												\
++   })
+ #elif defined __powerpc__
+ # define STACK_CHK_GUARD \
+   ({ uintptr_t x; asm ("lwz %0,-28680(2)" : "=r" (x)); x; })
++#define POINTER_CHK_GUARD \
++  ({												\
++     uintptr_t x;										\
++     asm ("lwz %0,%1(2)"									\
++	  : "=r" (x)										\
++	  : "i" (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t))	\
++         );											\
++     x;												\
++   })
+ #elif defined __sparc__ && defined __arch64__
+ # define STACK_CHK_GUARD \
+   ({ uintptr_t x; asm ("ldx [%%g7+0x28], %0" : "=r" (x)); x; })
++#define POINTER_CHK_GUARD \
++  ({ uintptr_t x; asm ("ldx [%%g7+0x30], %0" : "=r" (x)); x; })
+ #elif defined __sparc__
+ # define STACK_CHK_GUARD \
+   ({ uintptr_t x; asm ("ld [%%g7+0x14], %0" : "=r" (x)); x; })
++#define POINTER_CHK_GUARD \
++  ({ uintptr_t x; asm ("ld [%%g7+0x18], %0" : "=r" (x)); x; })
+ #elif defined __s390x__
+ # define STACK_CHK_GUARD \
+   ({ uintptr_t x; asm ("ear %0,%%a0; sllg %0,%0,32; ear %0,%%a1; lg %0,0x28(%0)" : "=a" (x)); x; })
++/* On s390/s390x there is no unique pointer guard, instead we use the
++   same value as the stack guard.  */
++#define POINTER_CHK_GUARD \
++  ({							\
++     uintptr_t x;					\
++     asm ("ear %0,%%a0;"				\
++	  "sllg %0,%0,32;"				\
++	  "ear %0,%%a1;"				\
++	  "lg %0,%1(%0)"				\
++	 : "=a" (x)					\
++	 : "i" (offsetof (tcbhead_t, stack_guard)));	\
++     x;							\
++   })
+ #elif defined __s390__
+ # define STACK_CHK_GUARD \
+   ({ uintptr_t x; asm ("ear %0,%%a0; l %0,0x14(%0)" : "=a" (x)); x; })
++/* On s390/s390x there is no unique pointer guard, instead we use the
++   same value as the stack guard.  */
++#define POINTER_CHK_GUARD \
++  ({							\
++     uintptr_t x;					\
++     asm ("ear %0,%%a0; l %0,%1(%0)"			\
++	  : "=a" (x)					\
++	  : "i" (offsetof (tcbhead_t, stack_guard)));	\
++     x;							\
++   })
+ #elif defined __ia64__
+ # define STACK_CHK_GUARD \
+   ({ uintptr_t x; asm ("adds %0 = -8, r13;; ld8 %0 = [%0]" : "=r" (x)); x; })
++#define POINTER_CHK_GUARD \
++  ({ uintptr_t x; asm ("adds %0 = -16, r13;; ld8 %0 = [%0]" : "=r" (x)); x; })
+ #else
+ extern uintptr_t __stack_chk_guard;
+ # define STACK_CHK_GUARD __stack_chk_guard
++#ifdef PTRGUARD_LOCAL
++extern uintptr_t __pointer_chk_guard_local;
++# define POINTER_CHK_GUARD __pointer_chk_guard_local
++#else
++extern uintptr_t __pointer_chk_guard;
++# define POINTER_CHK_GUARD __pointer_chk_guard
++#endif
+ #endif
--- eglibc-2.13.orig/debian/patches/any/submitted-popen.diff
+++ eglibc-2.13/debian/patches/any/submitted-popen.diff
@@ -0,0 +1,58 @@
+http://bugs.gentoo.org/250342
+http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685
+
+we cant assume sock_cloexec and pipe2 are bound together as the former defines
+are found in glibc only while the latter are a combo of kernel headers and
+glibc.  so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub
+inside of glibc, we hit a problem.  for example:
+
+#include <grp.h>
+#include <stdio.h>
+main()
+{
+	getgrnam("portage");
+	if (!popen("ls", "r"))
+		perror("popen()");
+}
+
+getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both
+__have_sock_cloexec and __have_pipe2 to true.  but if glibc was built against
+older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS
+stub for it.  so popen() will always fail as glibc assumes pipe2() works.
+
+---
+ include/unistd.h           |    5 +----
+ socket/have_sock_cloexec.c |    5 +++++
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+--- a/include/unistd.h
++++ b/include/unistd.h
+@@ -173,10 +173,7 @@
+ extern int __pause_nocancel (void) attribute_hidden;
+ 
+ extern int __have_sock_cloexec;
+-/* At lot of other functionality became available at the same time as
+-   SOCK_CLOEXEC.  Avoid defining separate variables for all of them
+-   unless it is really necessary.  */
+-#define __have_pipe2 __have_sock_cloexec
++extern int __have_pipe2;
+ 
+ extern int __getlogin_r_loginuid (char *name, size_t namesize)
+      attribute_hidden;
+--- a/socket/have_sock_cloexec.c
++++ b/socket/have_sock_cloexec.c
+@@ -16,9 +16,14 @@
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
++#include <fcntl.h>
+ #include <sys/socket.h>
+ #include <kernel-features.h>
+ 
+ #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC
+ int __have_sock_cloexec;
+ #endif
++
++#if defined O_CLOEXEC && !defined __ASSUME_PIPE2
++int __have_pipe2;
++#endif
--- eglibc-2.13.orig/debian/patches/any/cvs-regex.diff
+++ eglibc-2.13/debian/patches/any/cvs-regex.diff
@@ -0,0 +1,207 @@
+2011-11-29  Andreas Schwab  <schwab@redhat.com>
+
+	* locale/weight.h (findidx): Add parameter len.
+	* locale/weightwc.h (findidx): Likewise.
+	* posix/fnmatch_loop.c (FCT): Adjust caller.
+	* posix/regcomp.c (build_equiv_class): Likewise.
+	* posix/regex_internal.h (re_string_elem_size_at): Likewise.
+	* posix/regexec.c (check_node_accept_bytes): Likewise.
+	* string/strcoll_l.c (STRCOLL): Likewise.
+	* string/strxfrm_l.c (STRXFRM): Likewise.
+
+---
+ locale/weight.h        |    9 +++++----
+ locale/weightwc.h      |    7 ++++---
+ posix/fnmatch_loop.c   |    4 ++--
+ posix/regcomp.c        |    7 +++----
+ posix/regex_internal.h |    2 +-
+ posix/regexec.c        |    2 +-
+ string/strcoll_l.c     |    6 +++---
+ string/strxfrm_l.c     |    2 +-
+ 8 files changed, 20 insertions(+), 19 deletions(-)
+
+--- a/locale/weight.h
++++ b/locale/weight.h
+@@ -20,7 +20,7 @@
+ /* Find index of weight.  */
+ auto inline int32_t
+ __attribute ((always_inline))
+-findidx (const unsigned char **cpp)
++findidx (const unsigned char **cpp, size_t len)
+ {
+   int_fast32_t i = table[*(*cpp)++];
+   const unsigned char *cp;
+@@ -34,6 +34,7 @@
+      Search for the correct one.  */
+   cp = &extra[-i];
+   usrc = *cpp;
++  --len;
+   while (1)
+     {
+       size_t nhere;
+@@ -56,7 +57,7 @@
+ 	     already.  */
+ 	  size_t cnt;
+ 
+-	  for (cnt = 0; cnt < nhere; ++cnt)
++	  for (cnt = 0; cnt < nhere && cnt < len; ++cnt)
+ 	    if (cp[cnt] != usrc[cnt])
+ 	      break;
+ 
+@@ -79,13 +80,13 @@
+ 	  size_t cnt;
+ 	  size_t offset = 0;
+ 
+-	  for (cnt = 0; cnt < nhere; ++cnt)
++	  for (cnt = 0; cnt < nhere && cnt < len; ++cnt)
+ 	    if (cp[cnt] != usrc[cnt])
+ 	      break;
+ 
+ 	  if (cnt != nhere)
+ 	    {
+-	      if (cp[cnt] > usrc[cnt])
++	      if (cnt == len || cp[cnt] > usrc[cnt])
+ 		{
+ 		  /* Cannot be in this range.  */
+ 		  cp += 2 * nhere;
+--- a/locale/weightwc.h
++++ b/locale/weightwc.h
+@@ -20,7 +20,7 @@
+ /* Find index of weight.  */
+ auto inline int32_t
+ __attribute ((always_inline))
+-findidx (const wint_t **cpp)
++findidx (const wint_t **cpp, size_t len)
+ {
+   wint_t ch = *(*cpp)++;
+   int32_t i = __collidx_table_lookup ((const char *) table, ch);
+@@ -32,6 +32,7 @@
+   /* Oh well, more than one sequence starting with this byte.
+      Search for the correct one.  */
+   const int32_t *cp = (const int32_t *) &extra[-i];
++  --len;
+   while (1)
+     {
+       size_t nhere;
+@@ -54,7 +55,7 @@
+ 	     already.  */
+ 	  size_t cnt;
+ 
+-	  for (cnt = 0; cnt < nhere; ++cnt)
++	  for (cnt = 0; cnt < nhere && cnt < len; ++cnt)
+ 	    if (cp[cnt] != usrc[cnt])
+ 	      break;
+ 
+@@ -75,7 +76,7 @@
+ 	  size_t cnt;
+ 	  size_t offset;
+ 
+-	  for (cnt = 0; cnt < nhere - 1; ++cnt)
++	  for (cnt = 0; cnt < nhere - 1 && cnt < len; ++cnt)
+ 	    if (cp[cnt] != usrc[cnt])
+ 	      break;
+ 
+--- a/posix/fnmatch_loop.c
++++ b/posix/fnmatch_loop.c
+@@ -419,7 +419,7 @@
+ 			  _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
+ # endif
+ 
+-			idx = findidx (&cp);
++			idx = findidx (&cp, 1);
+ 			if (idx != 0)
+ 			  {
+ 			    /* We found a table entry.  Now see whether the
+@@ -429,7 +429,7 @@
+ 			    int32_t idx2;
+ 			    const UCHAR *np = (const UCHAR *) n;
+ 
+-			    idx2 = findidx (&np);
++			    idx2 = findidx (&np, string_end - n);
+ 			    if (idx2 != 0
+ 				&& (idx >> 24) == (idx2 >> 24)
+ 				&& len == weights[idx2 & 0xffffff])
+--- a/posix/regcomp.c
++++ b/posix/regcomp.c
+@@ -3438,19 +3438,18 @@
+ 						   _NL_COLLATE_EXTRAMB);
+       indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
+ 						_NL_COLLATE_INDIRECTMB);
+-      idx1 = findidx (&cp);
+-      if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0))
++      idx1 = findidx (&cp, -1);
++      if (BE (idx1 == 0 || *cp != '\0', 0))
+ 	/* This isn't a valid character.  */
+ 	return REG_ECOLLATE;
+ 
+       /* Build single byte matcing table for this equivalence class.  */
+-      char_buf[1] = (unsigned char) '\0';
+       len = weights[idx1 & 0xffffff];
+       for (ch = 0; ch < SBC_MAX; ++ch)
+ 	{
+ 	  char_buf[0] = ch;
+ 	  cp = char_buf;
+-	  idx2 = findidx (&cp);
++	  idx2 = findidx (&cp, 1);
+ /*
+ 	  idx2 = table[ch];
+ */
+--- a/posix/regex_internal.h
++++ b/posix/regex_internal.h
+@@ -776,7 +776,7 @@
+       indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
+ 						_NL_COLLATE_INDIRECTMB);
+       p = pstr->mbs + idx;
+-      tmp = findidx (&p);
++      tmp = findidx (&p, pstr->len - idx);
+       return p - pstr->mbs - idx;
+     }
+   else
+--- a/posix/regexec.c
++++ b/posix/regexec.c
+@@ -3913,7 +3913,7 @@
+ 		_NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
+ 	      indirect = (const int32_t *)
+ 		_NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
+-	      int32_t idx = findidx (&cp);
++	      int32_t idx = findidx (&cp, elem_len);
+ 	      if (idx > 0)
+ 		for (i = 0; i < cset->nequiv_classes; ++i)
+ 		  {
+--- a/string/strcoll_l.c
++++ b/string/strcoll_l.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1995-1997,2002,2004,2007,2010 Free Software Foundation, Inc.
++/* Copyright (C) 1995-1997,2002,2004,2007,2010,2011 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+    Written by Ulrich Drepper <drepper@gnu.org>, 1995.
+ 
+@@ -210,7 +210,7 @@
+ 
+ 		while (*us1 != L('\0'))
+ 		  {
+-		    int32_t tmp = findidx (&us1);
++		    int32_t tmp = findidx (&us1, -1);
+ 		    rule1arr[idx1max] = tmp >> 24;
+ 		    idx1arr[idx1max] = tmp & 0xffffff;
+ 		    idx1cnt = idx1max++;
+@@ -272,7 +272,7 @@
+ 
+ 		while (*us2 != L('\0'))
+ 		  {
+-		    int32_t tmp = findidx (&us2);
++		    int32_t tmp = findidx (&us2, -1);
+ 		    rule2arr[idx2max] = tmp >> 24;
+ 		    idx2arr[idx2max] = tmp & 0xffffff;
+ 		    idx2cnt = idx2max++;
+--- a/string/strxfrm_l.c
++++ b/string/strxfrm_l.c
+@@ -180,7 +180,7 @@
+   idxmax = 0;
+   do
+     {
+-      int32_t tmp = findidx (&usrc);
++      int32_t tmp = findidx (&usrc, -1);
+       rulearr[idxmax] = tmp >> 24;
+       idxarr[idxmax] = tmp & 0xffffff;
+ 
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-fd.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-fd.diff
@@ -0,0 +1,36 @@
+---
+ linuxthreads/pthread.c |   23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+--- a/linuxthreads/pthread.c
++++ b/linuxthreads/pthread.c
+@@ -662,6 +662,29 @@
+     free(__pthread_manager_thread_bos);
+     return -1;
+   }
++  /* Make sure the file descriptors of the pipe doesn't collide
++     with stdin, stdout or stderr if they have been closed. */
++  if (manager_pipe[0] < 3) {
++    int new_fd;
++    new_fd = fcntl(manager_pipe[0], F_DUPFD, 3);
++    close(manager_pipe[0]);
++    if (new_fd == -1) {
++      free(__pthread_manager_thread_bos);
++      return -1;
++    }
++    manager_pipe[0] = new_fd;
++  }
++  if (manager_pipe[1] < 3) {
++    int new_fd;
++    new_fd = fcntl(manager_pipe[1], F_DUPFD, 3);
++    close(manager_pipe[1]);
++    if (new_fd == -1) {
++      close(manager_pipe[0]);
++      free(__pthread_manager_thread_bos);
++      return -1;
++    }
++    manager_pipe[1] = new_fd;
++  }
+ 
+ #ifdef USE_TLS
+   /* Allocate memory for the thread descriptor and the dtv.  */
--- eglibc-2.13.orig/debian/patches/any/local-ldconfig-fsync.diff
+++ eglibc-2.13/debian/patches/any/local-ldconfig-fsync.diff
@@ -0,0 +1,14 @@
+---
+ elf/cache.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/elf/cache.c
++++ b/elf/cache.c
+@@ -428,6 +428,7 @@
+     }
+ 
+   if (write (fd, strings, total_strlen) != (ssize_t) total_strlen
++      || fsync (fd)
+       || close (fd))
+     error (EXIT_FAILURE, errno, _("Writing of cache data failed"));
+ 
--- eglibc-2.13.orig/debian/patches/any/local-tst-mktime2.diff
+++ eglibc-2.13/debian/patches/any/local-tst-mktime2.diff
@@ -0,0 +1,14 @@
+---
+ time/tst-mktime2.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/time/tst-mktime2.c
++++ b/time/tst-mktime2.c
+@@ -2,6 +2,7 @@
+ #include <time.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <limits.h>
+ 
+ static time_t time_t_max;
+ static time_t time_t_min;
--- eglibc-2.13.orig/debian/patches/any/submitted-at-pagesize.diff
+++ eglibc-2.13/debian/patches/any/submitted-at-pagesize.diff
@@ -0,0 +1,20 @@
+2010-06-10  Andreas Schwab  <schwab@redhat.com>
+
+	* sysdeps/unix/sysv/linux/getpagesize.c: Don't assume AT_PAGESIZE
+	is always available.
+
+---
+ sysdeps/unix/sysv/linux/getpagesize.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sysdeps/unix/sysv/linux/getpagesize.c
++++ b/sysdeps/unix/sysv/linux/getpagesize.c
+@@ -28,7 +28,7 @@
+ int
+ __getpagesize ()
+ {
+-#ifdef __ASSUME_AT_PAGESIZE
++#if 0 && defined __ASSUME_AT_PAGESIZE
+   assert (GLRO(dl_pagesize) != 0);
+   return GLRO(dl_pagesize);
+ #else
--- eglibc-2.13.orig/debian/patches/any/cvs-findlocale-div-by-zero.diff
+++ eglibc-2.13/debian/patches/any/cvs-findlocale-div-by-zero.diff
@@ -0,0 +1,33 @@
+commit 18d1425127e5712dda888bb280d5d1a038a45c7f
+Author: Aurelien Jarno <aurelien@aurel32.net>
+Date:   Tue Dec 3 11:16:16 2013 +0100
+
+    locale: don't crash if locale-archive contains all zeros
+
+    In case of power failure followed by filesystem issues locale-archive
+    can end-up containing all zeros. In that case all calls to setlocale()
+    generate a SIGFPE. This renders a system with a default non-C locale
+    unbootable.
+
+    Avoid this by ignoring the locale instead of generating a SIGFPE.
+
+2013-12-03  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* locale/loadarchive.c (_nl_load_locale_from_archive): Avoid
+	division by 0.
+
+diff --git a/locale/loadarchive.c b/locale/loadarchive.c
+index 70136dc..f723780 100644
+--- a/locale/loadarchive.c
++++ b/locale/loadarchive.c
+@@ -274,6 +274,10 @@ _nl_load_locale_from_archive (int category, const char **namep)
+   namehashtab = (struct namehashent *) ((char *) head
+ 					+ head->namehash_offset);
+ 
++  /* Avoid division by 0 if the file is corrupted.  */
++  if (__glibc_unlikely (head->namehash_size == 0))
++    goto close_and_out;
++
+   idx = hval % head->namehash_size;
+   incr = 1 + hval % (head->namehash_size - 2);
+ 
--- eglibc-2.13.orig/debian/patches/any/local-allocalim-header.diff
+++ eglibc-2.13/debian/patches/any/local-allocalim-header.diff
@@ -0,0 +1,15 @@
+---
+ sysdeps/unix/sysv/linux/check_pf.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sysdeps/unix/sysv/linux/check_pf.c
++++ b/sysdeps/unix/sysv/linux/check_pf.c
+@@ -25,6 +25,8 @@
+ #include <string.h>
+ #include <time.h>
+ #include <unistd.h>
++#include <alloca.h>
++#include <stdlib.h>
+ #include <sys/socket.h>
+ 
+ #include <asm/types.h>
--- eglibc-2.13.orig/debian/patches/any/cvs-getnetbyname.diff
+++ eglibc-2.13/debian/patches/any/cvs-getnetbyname.diff
@@ -0,0 +1,19 @@
+2014-12-16  Florian Weimer  <fweimer@redhat.com>
+
+	[BZ #17630]
+	* resolv/nss_dns/dns-network.c (getanswer_r): Iterate over alias
+	names.
+
+--- a/resolv/nss_dns/dns-network.c
++++ b/resolv/nss_dns/dns-network.c
+@@ -398,8 +398,8 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result,
+ 
+ 	case BYNAME:
+ 	  {
+-	    char **ap = result->n_aliases++;
+-	    while (*ap != NULL)
++	    char **ap;
++	    for (ap = result->n_aliases; *ap != NULL; ++ap)
+ 	      {
+ 		/* Check each alias name for being of the forms:
+ 		   4.3.2.1.in-addr.arpa		= net 1.2.3.4
--- eglibc-2.13.orig/debian/patches/any/submitted-resolv-assert.diff
+++ eglibc-2.13/debian/patches/any/submitted-resolv-assert.diff
@@ -0,0 +1,61 @@
+2011-07-21  Aurelien Jarno  <aurel32@debian.org>
+
+	* resolv/res_query.c(__libc_res_nquery): Assign hp and hp2 
+	depending n and resplen2 to catch cases where answer 
+	equals answerp2.
+
+---
+ resolv/res_query.c |   30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+--- a/resolv/res_query.c
++++ b/resolv/res_query.c
+@@ -122,6 +122,7 @@
+ 		  int *resplen2)
+ {
+ 	HEADER *hp = (HEADER *) answer;
++	HEADER *hp2;
+ 	int n, use_malloc = 0;
+ 	u_int oflags = statp->_flags;
+ 
+@@ -239,26 +240,25 @@
+ 	  /* __libc_res_nsend might have reallocated the buffer.  */
+ 	  hp = (HEADER *) *answerp;
+ 
+-	/* We simplify the following tests by assigning HP to HP2.  It
+-	   is easy to verify that this is the same as ignoring all
+-	   tests of HP2.  */
+-	HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
+-
+-	if (n < (int) sizeof (HEADER) && answerp2 != NULL
+-	    && *resplen2 > (int) sizeof (HEADER))
++	/* We simplify the following tests by assigning HP to HP2 or
++	   vice versa.  It is easy to verify that this is the same as
++	   ignoring all tests of HP or HP2.  */
++	if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER))
+ 	  {
+-	    /* Special case of partial answer.  */
+-	    assert (hp != hp2);
+-	    hp = hp2;
++	    hp2 = hp;
+ 	  }
+-	else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
+-		 && n > (int) sizeof (HEADER))
++	else
+ 	  {
+-	    /* Special case of partial answer.  */
+-	    assert (hp != hp2);
+-	    hp2 = hp;
++	    hp2 = (HEADER *) *answerp2;
++	    if (n < (int) sizeof (HEADER))
++	      {
++	        hp = hp2;
++	      }
+ 	  }
+ 
++	/* Make sure both hp and hp2 are defined */
++	assert((hp != NULL) && (hp2 != NULL));
++
+ 	if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
+ 	    && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) {
+ #ifdef DEBUG
--- eglibc-2.13.orig/debian/patches/any/cvs-dl_close-scope-handling.diff
+++ eglibc-2.13/debian/patches/any/cvs-dl_close-scope-handling.diff
@@ -0,0 +1,25 @@
+2011-08-24  Andreas Schwab  <schwab@redhat.com>
+
+	* elf/dl-close.c (_dl_close_worker): Reset private search list if
+	it wasn't used.
+
+---
+ elf/dl-close.c |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/elf/dl-close.c
++++ b/elf/dl-close.c
+@@ -421,6 +421,13 @@
+ 
+ 	      imap->l_scope_max = new_size;
+ 	    }
++	  else if (new_list != NULL)
++	    {
++	      /* We didn't change the scope array, so reset the search
++		 list.  */
++	      imap->l_searchlist.r_list = NULL;
++	      imap->l_searchlist.r_nlist = 0;
++	    }
+ 
+ 	  /* The loader is gone, so mark the object as not having one.
+ 	     Note: l_idx != IDX_STILL_USED -> object will be removed.  */
--- eglibc-2.13.orig/debian/patches/any/local-missing-linux_types.h.diff
+++ eglibc-2.13/debian/patches/any/local-missing-linux_types.h.diff
@@ -0,0 +1,14 @@
+---
+ sysdeps/unix/sysv/linux/netinet/if_fddi.h |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sysdeps/unix/sysv/linux/netinet/if_fddi.h
++++ b/sysdeps/unix/sysv/linux/netinet/if_fddi.h
+@@ -23,6 +23,7 @@
+ #include <sys/types.h>
+ #include <asm/types.h>
+ 
++#include <linux/types.h>
+ #include <linux/if_fddi.h>
+ 
+ #ifdef __USE_BSD
--- eglibc-2.13.orig/debian/patches/any/cvs-strtod-overflow.diff
+++ eglibc-2.13/debian/patches/any/cvs-strtod-overflow.diff
@@ -0,0 +1,348 @@
+2012-08-27  Joseph Myers  <joseph@codesourcery.com>
+  
+	[BZ #14519]
+	* stdlib/strtod_l.c (round_and_return): Return -0.0 for
+	underflowing exponent in case of negative sign.
+	* stdlib/tst-strtod-round-data: Add more tests.
+	* stdlib/tst-strtod-round.c (tests): Regenerated.
+
+2012-08-27  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #14459]
+	* stdlib/strtod_l.c: Include <stdint.h>.
+	(NDEBUG): Do not define.
+	(round_and_return): Change EXPONENT parameter to type intmax_t.
+	Rearrange calculations to avoid internal overflow possibilities.
+	(str_to_mpn): Change EXPONENT parameter to type intmax_t *.
+	Rearrange calculations to avoid internal overflow possibilities.
+	Assert that number fits inside MPNSIZE limbs.
+	(____STRTOF_INTERNAL): Change EXPONENT variable to type intmax_t.
+	Change DIG_NO, INT_NO and LEAD_ZERO to type size_t.  Rearrange
+	calculations and add assertions to avoid internal overflow
+	possibilities.  Add casts to avoid signed/unsigned operations.
+
+2011-06-22  Marek Polacek  <mpolacek@redhat.com>
+
+       [BZ #9696]
+       * stdlib/strtod_l.c (round_and_return): Set ERANGE instead of EDOM.
+
+diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
+index 2166a08..a8a7ea8 100644
+--- a/stdlib/strtod_l.c
++++ b/stdlib/strtod_l.c
+@@ -60,6 +60,7 @@ extern unsigned long long int ____strtoull_l_internal (const char *, char **,
+ #include <math.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <stdint.h>
+ 
+ /* The gmp headers need some configuration frobs.  */
+ #define HAVE_ALLOCA 1
+@@ -72,7 +73,6 @@ extern unsigned long long int ____strtoull_l_internal (const char *, char **,
+ #include "longlong.h"
+ #include "fpioconst.h"
+ 
+-#define NDEBUG 1
+ #include <assert.h>
+ 
+ 
+@@ -174,19 +174,19 @@ extern const mp_limb_t _tens_in_limb[MAX_DIG_PER_LIMB + 1];
+ /* Return a floating point number of the needed type according to the given
+    multi-precision number after possible rounding.  */
+ static FLOAT
+-round_and_return (mp_limb_t *retval, int exponent, int negative,
++round_and_return (mp_limb_t *retval, intmax_t exponent, int negative,
+ 		  mp_limb_t round_limb, mp_size_t round_bit, int more_bits)
+ {
+   if (exponent < MIN_EXP - 1)
+     {
+-      mp_size_t shift = MIN_EXP - 1 - exponent;
+-
+-      if (shift > MANT_DIG)
++      if (exponent < MIN_EXP - 1 - MANT_DIG)
+ 	{
+-	  __set_errno (EDOM);
+-	  return 0.0;
++	  __set_errno (ERANGE);
++	  return negative ? -0.0 : 0.0;
+ 	}
+ 
++      mp_size_t shift = MIN_EXP - 1 - exponent;
++
+       more_bits |= (round_limb & ((((mp_limb_t) 1) << round_bit) - 1)) != 0;
+       if (shift == MANT_DIG)
+ 	/* This is a special case to handle the very seldom case where
+@@ -233,6 +233,9 @@ round_and_return (mp_limb_t *retval, int exponent, int negative,
+       __set_errno (ERANGE);
+     }
+ 
++  if (exponent > MAX_EXP)
++    goto overflow;
++
+   if ((round_limb & (((mp_limb_t) 1) << round_bit)) != 0
+       && (more_bits || (retval[0] & 1) != 0
+ 	  || (round_limb & ((((mp_limb_t) 1) << round_bit) - 1)) != 0))
+@@ -258,6 +261,7 @@ round_and_return (mp_limb_t *retval, int exponent, int negative,
+     }
+ 
+   if (exponent > MAX_EXP)
++  overflow:
+     return negative ? -FLOAT_HUGE_VAL : FLOAT_HUGE_VAL;
+ 
+   return MPN2FLOAT (retval, exponent, negative);
+@@ -271,7 +275,7 @@ round_and_return (mp_limb_t *retval, int exponent, int negative,
+    factor for the resulting number (see code) multiply by it.  */
+ static const STRING_TYPE *
+ str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize,
+-	    int *exponent
++	    intmax_t *exponent
+ #ifndef USE_WIDE_CHAR
+ 	    , const char *decimal, size_t decimal_len, const char *thousands
+ #endif
+@@ -301,6 +305,7 @@ str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize,
+ 	      cy += __mpn_add_1 (n, n, *nsize, low);
+ 	      if (cy != 0)
+ 		{
++		  assert (*nsize < MPNSIZE);
+ 		  n[*nsize] = cy;
+ 		  ++(*nsize);
+ 		}
+@@ -335,7 +340,7 @@ str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize,
+     }
+   while (--digcnt > 0);
+ 
+-  if (*exponent > 0 && cnt + *exponent <= MAX_DIG_PER_LIMB)
++  if (*exponent > 0 && *exponent <= MAX_DIG_PER_LIMB - cnt)
+     {
+       low *= _tens_in_limb[*exponent];
+       start = _tens_in_limb[cnt + *exponent];
+@@ -355,7 +360,10 @@ str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize,
+       cy = __mpn_mul_1 (n, n, *nsize, start);
+       cy += __mpn_add_1 (n, n, *nsize, low);
+       if (cy != 0)
+-	n[(*nsize)++] = cy;
++	{
++	  assert (*nsize < MPNSIZE);
++	  n[(*nsize)++] = cy;
++	}
+     }
+ 
+   return str;
+@@ -413,7 +421,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
+ {
+   int negative;			/* The sign of the number.  */
+   MPN_VAR (num);		/* MP representation of the number.  */
+-  int exponent;			/* Exponent of the number.  */
++  intmax_t exponent;		/* Exponent of the number.  */
+ 
+   /* Numbers starting `0X' or `0x' have to be processed with base 16.  */
+   int base = 10;
+@@ -435,7 +443,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
+   /* Points at the character following the integer and fractional digits.  */
+   const STRING_TYPE *expp;
+   /* Total number of digit and number of digits in integer part.  */
+-  int dig_no, int_no, lead_zero;
++  size_t dig_no, int_no, lead_zero;
+   /* Contains the last character read.  */
+   CHAR_TYPE c;
+ 
+@@ -767,7 +775,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
+      are all or any is really a fractional digit will be decided
+      later.  */
+   int_no = dig_no;
+-  lead_zero = int_no == 0 ? -1 : 0;
++  lead_zero = int_no == 0 ? (size_t) -1 : 0;
+ 
+   /* Read the fractional digits.  A special case are the 'american
+      style' numbers like `16.' i.e. with decimal point but without
+@@ -789,12 +797,13 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
+ 	     (base == 16 && ({ CHAR_TYPE lo = TOLOWER (c);
+ 			       lo >= L_('a') && lo <= L_('f'); })))
+ 	{
+-	  if (c != L_('0') && lead_zero == -1)
++	  if (c != L_('0') && lead_zero == (size_t) -1)
+ 	    lead_zero = dig_no - int_no;
+ 	  ++dig_no;
+ 	  c = *++cp;
+ 	}
+     }
++  assert (dig_no <= (uintmax_t) INTMAX_MAX);
+ 
+   /* Remember start of exponent (if any).  */
+   expp = cp;
+@@ -817,24 +826,80 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
+ 
+       if (c >= L_('0') && c <= L_('9'))
+ 	{
+-	  int exp_limit;
++	  intmax_t exp_limit;
+ 
+ 	  /* Get the exponent limit. */
+ 	  if (base == 16)
+-	    exp_limit = (exp_negative ?
+-			 -MIN_EXP + MANT_DIG + 4 * int_no :
+-			 MAX_EXP - 4 * int_no + 4 * lead_zero + 3);
++	    {
++	      if (exp_negative)
++		{
++		  assert (int_no <= (uintmax_t) (INTMAX_MAX
++						 + MIN_EXP - MANT_DIG) / 4);
++		  exp_limit = -MIN_EXP + MANT_DIG + 4 * (intmax_t) int_no;
++		}
++	      else
++		{
++		  if (int_no)
++		    {
++		      assert (lead_zero == 0
++			      && int_no <= (uintmax_t) INTMAX_MAX / 4);
++		      exp_limit = MAX_EXP - 4 * (intmax_t) int_no + 3;
++		    }
++		  else if (lead_zero == (size_t) -1)
++		    {
++		      /* The number is zero and this limit is
++			 arbitrary.  */
++		      exp_limit = MAX_EXP + 3;
++		    }
++		  else
++		    {
++		      assert (lead_zero
++			      <= (uintmax_t) (INTMAX_MAX - MAX_EXP - 3) / 4);
++		      exp_limit = (MAX_EXP
++				   + 4 * (intmax_t) lead_zero
++				   + 3);
++		    }
++		}
++	    }
+ 	  else
+-	    exp_limit = (exp_negative ?
+-			 -MIN_10_EXP + MANT_DIG + int_no :
+-			 MAX_10_EXP - int_no + lead_zero + 1);
++	    {
++	      if (exp_negative)
++		{
++		  assert (int_no
++			  <= (uintmax_t) (INTMAX_MAX + MIN_10_EXP - MANT_DIG));
++		  exp_limit = -MIN_10_EXP + MANT_DIG + (intmax_t) int_no;
++		}
++	      else
++		{
++		  if (int_no)
++		    {
++		      assert (lead_zero == 0
++			      && int_no <= (uintmax_t) INTMAX_MAX);
++		      exp_limit = MAX_10_EXP - (intmax_t) int_no + 1;
++		    }
++		  else if (lead_zero == (size_t) -1)
++		    {
++		      /* The number is zero and this limit is
++			 arbitrary.  */
++		      exp_limit = MAX_10_EXP + 1;
++		    }
++		  else
++		    {
++		      assert (lead_zero
++			      <= (uintmax_t) (INTMAX_MAX - MAX_10_EXP - 1));
++		      exp_limit = MAX_10_EXP + (intmax_t) lead_zero + 1;
++		    }
++		}
++	    }
++
++	  if (exp_limit < 0)
++	    exp_limit = 0;
+ 
+ 	  do
+ 	    {
+-	      exponent *= 10;
+-	      exponent += c - L_('0');
+-
+-	      if (__builtin_expect (exponent > exp_limit, 0))
++	      if (__builtin_expect ((exponent > exp_limit / 10
++				     || (exponent == exp_limit / 10
++					 && c - L_('0') > exp_limit % 10)), 0))
+ 		/* The exponent is too large/small to represent a valid
+ 		   number.  */
+ 		{
+@@ -843,7 +908,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
+ 		  /* We have to take care for special situation: a joker
+ 		     might have written "0.0e100000" which is in fact
+ 		     zero.  */
+-		  if (lead_zero == -1)
++		  if (lead_zero == (size_t) -1)
+ 		    result = negative ? -0.0 : 0.0;
+ 		  else
+ 		    {
+@@ -862,6 +927,9 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
+ 		  /* NOTREACHED */
+ 		}
+ 
++	      exponent *= 10;
++	      exponent += c - L_('0');
++
+ 	      c = *++cp;
+ 	    }
+ 	  while (c >= L_('0') && c <= L_('9'));
+@@ -930,7 +998,14 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
+ 	}
+ #endif
+       startp += lead_zero + decimal_len;
+-      exponent -= base == 16 ? 4 * lead_zero : lead_zero;
++      assert (lead_zero <= (base == 16
++			    ? (uintmax_t) INTMAX_MAX / 4
++			    : (uintmax_t) INTMAX_MAX));
++      assert (lead_zero <= (base == 16
++			    ? ((uintmax_t) exponent
++			       - (uintmax_t) INTMAX_MIN) / 4
++			    : ((uintmax_t) exponent - (uintmax_t) INTMAX_MIN)));
++      exponent -= base == 16 ? 4 * (intmax_t) lead_zero : (intmax_t) lead_zero;
+       dig_no -= lead_zero;
+     }
+ 
+@@ -972,7 +1047,10 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
+ 	}
+ 
+       /* Adjust the exponent for the bits we are shifting in.  */
+-      exponent += bits - 1 + (int_no - 1) * 4;
++      assert (int_no <= (uintmax_t) (exponent < 0
++				     ? (INTMAX_MAX - bits + 1) / 4
++				     : (INTMAX_MAX - exponent - bits + 1) / 4));
++      exponent += bits - 1 + ((intmax_t) int_no - 1) * 4;
+ 
+       while (--dig_no > 0 && idx >= 0)
+ 	{
+@@ -1024,13 +1102,15 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
+      really integer digits or belong to the fractional part; i.e. we normalize
+      123e-2 to 1.23.  */
+   {
+-    register int incr = (exponent < 0 ? MAX (-int_no, exponent)
+-			 : MIN (dig_no - int_no, exponent));
++    register intmax_t incr = (exponent < 0
++			      ? MAX (-(intmax_t) int_no, exponent)
++			      : MIN ((intmax_t) dig_no - (intmax_t) int_no,
++				     exponent));
+     int_no += incr;
+     exponent -= incr;
+   }
+ 
+-  if (__builtin_expect (int_no + exponent > MAX_10_EXP + 1, 0))
++  if (__builtin_expect (exponent > MAX_10_EXP + 1 - (intmax_t) int_no, 0))
+     {
+       __set_errno (ERANGE);
+       return negative ? -FLOAT_HUGE_VAL : FLOAT_HUGE_VAL;
+@@ -1215,7 +1295,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
+        digits we should have enough bits for the result.  The remaining
+        decimal digits give us the information that more bits are following.
+        This can be used while rounding.  (Two added as a safety margin.)  */
+-    if (dig_no - int_no > (MANT_DIG - bits + 2) / 3 + 2)
++    if ((intmax_t) dig_no > (intmax_t) int_no + (MANT_DIG - bits + 2) / 3 + 2)
+       {
+ 	dig_no = int_no + (MANT_DIG - bits + 2) / 3 + 2;
+ 	more_bits = 1;
+@@ -1223,7 +1303,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
+     else
+       more_bits = 0;
+ 
+-    neg_exp = dig_no - int_no - exponent;
++    neg_exp = (intmax_t) dig_no - (intmax_t) int_no - exponent;
+ 
+     /* Construct the denominator.  */
+     densize = 0;
--- eglibc-2.13.orig/debian/patches/any/local-ldconfig-multiarch.diff
+++ eglibc-2.13/debian/patches/any/local-ldconfig-multiarch.diff
@@ -0,0 +1,55 @@
+Description: make ldconfig use the built-in system paths
+ Make ldconfig use the same view of built-in system paths that ld.so does,
+ instead of just using SLIBDIR and LIBDIR; this corrects a failure of
+ ldconfig to cache libraries in non-multiarch directories when building for
+ multiarch, even though they're on the system path.
+Author: Steve Langasek <steve.langasek@linaro.org>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/736932
+
+---
+ elf/ldconfig.c |   24 +++++++++++++++++++++---
+ 1 file changed, 21 insertions(+), 3 deletions(-)
+
+--- a/elf/ldconfig.c
++++ b/elf/ldconfig.c
+@@ -63,6 +63,17 @@
+ #define PATH_MAX 1024
+ #endif
+ 
++/* Get the generated information about the trusted/standard directories.  */
++#include "trusted-dirs.h"
++
++static const char system_dirs[] = SYSTEM_DIRS;
++static const size_t system_dirs_len[] =
++{
++  SYSTEM_DIRS_LEN
++};
++#define nsystem_dirs_len \
++  (sizeof (system_dirs_len) / sizeof (system_dirs_len[0]))
++
+ static const struct
+ {
+   const char *name;
+@@ -1357,12 +1368,19 @@
+ 
+   if (!opt_only_cline)
+     {
++      const char *strp = system_dirs;
++      size_t idx = 0;
++
+       parse_conf (config_file, true);
+ 
+       /* Always add the standard search paths.  */
+-      add_system_dir (SLIBDIR);
+-      if (strcmp (SLIBDIR, LIBDIR))
+-	add_system_dir (LIBDIR);
++      do
++        {
++          add_system_dir (strp);
++          strp += system_dirs_len[idx] + 1;
++          idx++;
++        }
++      while (idx < nsystem_dirs_len);
+     }
+ 
+   const char *aux_cache_file = _PATH_LDCONFIG_AUX_CACHE;
--- eglibc-2.13.orig/debian/patches/any/local-gai-rfc1918-scope-global.patch
+++ eglibc-2.13/debian/patches/any/local-gai-rfc1918-scope-global.patch
@@ -0,0 +1,30 @@
+---
+ posix/gai.conf              |    3 ---
+ sysdeps/posix/getaddrinfo.c |    4 ----
+ 2 files changed, 7 deletions(-)
+
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -1101,10 +1101,6 @@
+     /* Link-local addresses: scope 2.  */
+     { { { 169, 254, 0, 0 } }, htonl_c (0xffff0000), 2 },
+     { { { 127, 0, 0, 0 } }, htonl_c (0xff000000), 2 },
+-    /* Site-local addresses: scope 5.  */
+-    { { { 10, 0, 0, 0 } }, htonl_c (0xff000000), 5 },
+-    { { { 172, 16, 0, 0 } }, htonl_c (0xfff00000), 5 },
+-    { { { 192, 168, 0, 0 } }, htonl_c (0xffff0000), 5 },
+     /* Default: scope 14.  */
+     { { { 0, 0, 0, 0 } }, htonl_c (0x00000000), 14 }
+   };
+--- a/posix/gai.conf
++++ b/posix/gai.conf
+@@ -62,9 +62,6 @@
+ #
+ #scopev4 ::ffff:169.254.0.0/112  2
+ #scopev4 ::ffff:127.0.0.0/104    2
+-#scopev4 ::ffff:10.0.0.0/104     5
+-#scopev4 ::ffff:172.16.0.0/108   5
+-#scopev4 ::ffff:192.168.0.0/112  5
+ #scopev4 ::ffff:0.0.0.0/96       14
+ #
+ #    For sites which use site-local IPv4 addresses behind NAT there is
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-setclock.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-setclock.diff
@@ -0,0 +1,247 @@
+---
+ linuxthreads/Makefile                            |    1 
+ linuxthreads/Versions                            |    3 +
+ linuxthreads/condvar.c                           |    4 +
+ linuxthreads/internals.h                         |    1 
+ linuxthreads/pthread.c                           |   14 +++--
+ linuxthreads/pthread_condattr_getclock.c         |   30 ++++++++++
+ linuxthreads/pthread_condattr_setclock.c         |   63 +++++++++++++++++++++++
+ linuxthreads/sysdeps/pthread/bits/pthreadtypes.h |   11 ++--
+ linuxthreads/sysdeps/pthread/pthread.h           |    2 
+ 9 files changed, 120 insertions(+), 9 deletions(-)
+
+--- a/linuxthreads/Makefile
++++ b/linuxthreads/Makefile
+@@ -51,6 +51,7 @@
+ 		       ptw-open ptw-open64 ptw-pause ptw-pread ptw-pread64 \
+ 		       ptw-pwrite ptw-pwrite64 ptw-tcdrain ptw-wait \
+ 		       ptw-waitpid pt-system old_pthread_atfork pthread_atfork \
++		       pthread_condattr_getclock pthread_condattr_setclock \
+ 		       ptcleanup
+ #		       pthread_setuid pthread_seteuid pthread_setreuid \
+ #		       pthread_setresuid \
+--- a/linuxthreads/pthread.c
++++ b/linuxthreads/pthread.c
+@@ -1322,6 +1322,7 @@
+ 	struct timespec reltime;
+ 
+ 	/* Compute a time offset relative to now.  */
++#error "gettimeofday() ignores pthread_condattr_setclock() setting"
+ 	__gettimeofday (&now, NULL);
+ 	reltime.tv_nsec = abstime->tv_nsec - now.tv_usec * 1000;
+ 	reltime.tv_sec = abstime->tv_sec - now.tv_sec;
+@@ -1392,6 +1393,12 @@
+ int
+ __pthread_timedsuspend_new(pthread_descr self, const struct timespec *abstime)
+ {
++  return __pthread_timedsuspend_new_clk (self, abstime, CLOCK_REALTIME);
++}
++
++int
++__pthread_timedsuspend_new_clk(pthread_descr self, const struct timespec *abstime, clockid_t clock_id)
++{
+   sigset_t unblock, initial_mask;
+   int was_signalled = 0;
+   sigjmp_buf jmpbuf;
+@@ -1405,12 +1412,11 @@
+     sigprocmask(SIG_UNBLOCK, &unblock, &initial_mask);
+ 
+     while (1) {
+-      struct timeval now;
+-      struct timespec reltime;
++      struct timespec now, reltime;
+ 
+       /* Compute a time offset relative to now.  */
+-      __gettimeofday (&now, NULL);
+-      reltime.tv_nsec = abstime->tv_nsec - now.tv_usec * 1000;
++      INLINE_SYSCALL (clock_gettime, 2, clock_id, &now);
++      reltime.tv_nsec = abstime->tv_nsec - now.tv_nsec;
+       reltime.tv_sec = abstime->tv_sec - now.tv_sec;
+       if (reltime.tv_nsec < 0) {
+ 	reltime.tv_nsec += 1000000000;
+--- /dev/null
++++ b/linuxthreads/pthread_condattr_getclock.c
+@@ -0,0 +1,30 @@
++/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <pthread.h>
++
++int
++pthread_condattr_getclock (attr, clock_id)
++     const pthread_condattr_t *attr;
++     clockid_t *clock_id;
++{
++  *clock_id = attr->__clock_id;
++
++  return 0;
++}
+--- /dev/null
++++ b/linuxthreads/pthread_condattr_setclock.c
+@@ -0,0 +1,63 @@
++/* Copyright (C) 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <assert.h>
++#include <errno.h>
++#include <stdbool.h>
++#include <time.h>
++#include <sysdep.h>
++#include <pthread.h>
++#include <kernel-features.h>
++
++int
++pthread_condattr_setclock (attr, clock_id)
++     pthread_condattr_t *attr;
++     clockid_t clock_id;
++{
++  /* Only a few clocks are allowed.  CLOCK_REALTIME is always allowed.
++     CLOCK_MONOTONIC only if the kernel has the necessary support.  */
++  if (clock_id == CLOCK_MONOTONIC)
++    {
++#ifndef __ASSUME_POSIX_TIMERS
++# ifdef SYS_clock_getres
++      /* Check whether the clock is available.  */
++      static int avail;
++
++      if (avail == 0)
++	{
++	  struct timespec ts;
++
++	  avail = INLINE_SYSCALL (clock_getres, 2, CLOCK_MONOTONIC, &ts);
++	}
++
++      if (avail < 0)
++# endif
++	/* Not available.  */
++	return EINVAL;
++#endif
++    }
++  else if (clock_id != CLOCK_REALTIME)
++    /* If more clocks are allowed some day the storing of the clock ID
++       in the pthread_cond_t structure needs to be adjusted.  */
++    return EINVAL;
++
++  attr->__clock_id = clock_id;
++
++  return 0;
++}
+--- a/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h
++++ b/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h
+@@ -66,16 +66,21 @@
+ {
+   struct _pthread_fastlock __c_lock; /* Protect against concurrent access */
+   _pthread_descr __c_waiting;        /* Threads waiting on this condition */
+-  char __padding[48 - sizeof (struct _pthread_fastlock)
++  /* Since we only support two clock_id types in pthread_condattr_setclock(),
++   * this can be shrinked into a single bit if we need more space.  */
++  int __clock_id;
++  char __padding[48 - sizeof (struct _pthread_fastlock) - sizeof (int)
+ 		 - sizeof (_pthread_descr) - sizeof (__pthread_cond_align_t)];
+   __pthread_cond_align_t __align;
+ } pthread_cond_t;
+ 
+ 
+ /* Attribute for conditionally variables.  */
+-typedef struct
++typedef struct pthread_condattr
+ {
+-  int __dummy;
++  /* Since we only support two clock_id types in pthread_condattr_setclock(),
++   * this can be shrinked into a single bit if we need more space.  */
++  int __clock_id;
+ } pthread_condattr_t;
+ 
+ /* Keys for thread-specific data */
+--- a/linuxthreads/condvar.c
++++ b/linuxthreads/condvar.c
+@@ -31,6 +31,7 @@
+ {
+   __pthread_init_lock(&cond->__c_lock);
+   cond->__c_waiting = NULL;
++  cond->__clock_id = cond_attr ? cond_attr->__clock_id : CLOCK_REALTIME;
+   return 0;
+ }
+ versioned_symbol (libpthread, __pthread_cond_init, pthread_cond_init,
+@@ -198,7 +199,7 @@
+   spurious_wakeup_count = 0;
+   while (1)
+     {
+-      if (!timedsuspend(self, abstime)) {
++      if (!__pthread_timedsuspend_new_clk(self, abstime, cond->__clock_id)) {
+ 	int was_on_queue;
+ 
+ 	/* __pthread_lock will queue back any spurious restarts that
+@@ -312,6 +313,7 @@
+ 
+ int __pthread_condattr_init(pthread_condattr_t *attr)
+ {
++  attr->__clock_id = CLOCK_REALTIME;
+   return 0;
+ }
+ strong_alias (__pthread_condattr_init, pthread_condattr_init)
+--- a/linuxthreads/internals.h
++++ b/linuxthreads/internals.h
+@@ -381,6 +381,7 @@
+ extern void __pthread_restart_new(pthread_descr th);
+ extern void __pthread_suspend_new(pthread_descr self);
+ extern int __pthread_timedsuspend_new(pthread_descr self, const struct timespec *abs);
++extern int __pthread_timedsuspend_new_clk(pthread_descr self, const struct timespec *abs, clockid_t clock_id);
+ 
+ extern void __pthread_wait_for_restart_signal(pthread_descr self);
+ 
+--- a/linuxthreads/Versions
++++ b/linuxthreads/Versions
+@@ -172,6 +172,9 @@
+     pthread_cond_wait; pthread_cond_timedwait;
+     pthread_cond_signal; pthread_cond_broadcast;
+   }
++  GLIBC_2.3.3 {
++    pthread_condattr_getclock; pthread_condattr_setclock;
++  }
+ 
+   # Hey you!!  Yes, YOU!  Do not add new symbols here!
+   # The linuxthreads libpthread ABI froze at GLIBC_2.3.2 and lacks
+--- a/linuxthreads/sysdeps/pthread/pthread.h
++++ b/linuxthreads/sysdeps/pthread/pthread.h
+@@ -41,7 +41,7 @@
+   {0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __LOCK_ALT_INITIALIZER}
+ #endif
+ 
+-#define PTHREAD_COND_INITIALIZER {__LOCK_ALT_INITIALIZER, 0, "", 0}
++#define PTHREAD_COND_INITIALIZER {__LOCK_ALT_INITIALIZER, 0, CLOCK_REALTIME, "", 0}
+ 
+ #if defined __USE_UNIX98 || defined __USE_XOPEN2K
+ # define PTHREAD_RWLOCK_INITIALIZER \
--- eglibc-2.13.orig/debian/patches/any/cvs-getaddrinfo-AI_V4MAPPED.diff
+++ eglibc-2.13/debian/patches/any/cvs-getaddrinfo-AI_V4MAPPED.diff
@@ -0,0 +1,64 @@
+2011-06-22  Andreas Schwab  <schwab@redhat.com>
+
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Fix last change.
+
+2011-06-21  Ulrich Drepper  <drepper@gmail.com>
+ 
+	[BZ #12885]
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): When looking up only IPv6
+	addresses using gethostbyname4_r ignore IPv4 addresses.
+
+---
+ sysdeps/posix/getaddrinfo.c |   34 +++++++++++++++++++++++++++++++---
+ 1 file changed, 31 insertions(+), 3 deletions(-)
+
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -732,16 +732,44 @@
+ 					      tmpbuflen, 2 * tmpbuflen);
+ 		    }
+ 
+-		  no_inet6_data = no_data;
+-
+ 		  if (status == NSS_STATUS_SUCCESS)
+ 		    {
++		      assert (!no_data);
++		      no_data = 1;
++
+ 		      if ((req->ai_flags & AI_CANONNAME) != 0 && canon == NULL)
+ 			canon = (*pat)->name;
+ 
+ 		      while (*pat != NULL)
+-			pat = &((*pat)->next);
++			{
++			  if ((*pat)->family == AF_INET
++			      && req->ai_family == AF_INET6
++			      && (req->ai_flags & AI_V4MAPPED) != 0)
++			    {
++			      uint32_t *pataddr = (*pat)->addr;
++			      (*pat)->family = AF_INET6;
++			      pataddr[3] = pataddr[0];
++			      pataddr[2] = htonl (0xffff);
++			      pataddr[1] = 0;
++			      pataddr[0] = 0;
++			      pat = &((*pat)->next);
++			      no_data = 0;
++			    }
++			  else if (req->ai_family == AF_UNSPEC
++				   || (*pat)->family == req->ai_family)
++			    {
++			      pat = &((*pat)->next);
++
++			      no_data = 0;
++			      if (req->ai_family == AF_INET6)
++				got_ipv6 = true;
++			    }
++			  else
++			    *pat = ((*pat)->next);
++			}
+ 		    }
++
++		  no_inet6_data = no_data;
+ 		}
+ 	      else
+ 		{
--- eglibc-2.13.orig/debian/patches/any/cvs-vfprintf-many-format-strings.diff
+++ eglibc-2.13/debian/patches/any/cvs-vfprintf-many-format-strings.diff
@@ -0,0 +1,41 @@
+2011-12-17  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #13446]
+	* stdio-common/vfprintf.c (vfprintf): Fix extension of specs array.
+
+diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
+index 753a5ac..952886b 100644
+--- a/stdio-common/vfprintf.c
++++ b/stdio-common/vfprintf.c
+@@ -1640,9 +1640,9 @@ do_positional:
+     /* Array with information about the needed arguments.  This has to
+        be dynamically extensible.  */
+     size_t nspecs = 0;
+-    size_t nspecs_max = 32;	/* A more or less arbitrary start value.  */
+-    struct printf_spec *specs
+-      = alloca (nspecs_max * sizeof (struct printf_spec));
++    /* A more or less arbitrary start value.  */
++    size_t nspecs_size = 32 * sizeof (struct printf_spec);
++    struct printf_spec *specs = alloca (nspecs_size);
+ 
+     /* The number of arguments the format string requests.  This will
+        determine the size of the array needed to store the argument
+@@ -1679,15 +1679,14 @@ do_positional:
+ 
+     for (f = lead_str_end; *f != L_('\0'); f = specs[nspecs++].next_fmt)
+       {
+-	if (nspecs >= nspecs_max)
++	if (nspecs * sizeof (*specs) >= nspecs_size)
+ 	  {
+ 	    /* Extend the array of format specifiers.  */
+ 	    struct printf_spec *old = specs;
+-	    specs = extend_alloca (specs, nspecs_max,
+-				   2 * nspecs_max * sizeof (*specs));
++	    specs = extend_alloca (specs, nspecs_size, 2 * nspecs_size);
+ 
+ 	    /* Copy the old array's elements to the new space.  */
+-	    memmove (specs, old, nspecs * sizeof (struct printf_spec));
++	    memmove (specs, old, nspecs * sizeof (*specs));
+ 	  }
+ 
+ 	/* Parse the format specifier.  */
--- eglibc-2.13.orig/debian/patches/any/cvs-socketcall-syscall.diff
+++ eglibc-2.13/debian/patches/any/cvs-socketcall-syscall.diff
@@ -0,0 +1,387 @@
+2014-02-20  Joseph Myers  <joseph@codesourcery.com>
+ 
+	[BZ #16610]
+	* sysdeps/unix/sysv/linux/kernel-features.h
+	[__LINUX_KERNEL_VERSION >= 0x020621 && __ASSUME_SOCKETCALL]
+	(__ASSUME_RECVMMSG_SOCKETCALL): Define.
+	[(__LINUX_KERNEL_VERSION >= 0x020621 && (__i386__ || __x86_64__ ||
+	__sparc__ || __ia64) || (__LINUX_KERNEL_VERSION >= 0x020625 && 
+	(__powerpc__ || __sh__))] (__ASSUME_RECVMMSG_SYSCALL): Likewise.
+	[__i386__ || __sparc__]
+	(__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL): Likewise.
+	[__ASSUME_RECVMMSG_SOCKETCALL || __ASSUME_RECVMMSG_SYSCALL]
+	(__ASSUME_RECVMMSG): Define instead of using previous
+	[__LINUX_KERNEL_VERSION >= 0x020621] condition.
+	* ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
+	[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL):
+	Likewise.
+	* ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
+	[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL):
+	Likewise.
+	* sysdeps/unix/sysv/linux/internal_recvmmsg.S [__ASSUME_SOCKETCALL
+	&& !__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL &&
+	!__ASSUME_RECVMMSG_SYSCALL] (__NR_recvmmsg): Undefine.
+	[__ASSUME_RECVMMSG]: Change condition to
+	[__ASSUME_RECVMMSG_SOCKETCALL].
+	* ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
+	[__LINUX_KERNEL_VERSION >= 0x020621] (__ASSUME_RECVMMSG_SYSCALL):
+	Likewise.
+	* sysdeps/unix/sysv/linux/recvmmsg.c [__ASSUME_SOCKETCALL &&
+	!__ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL &&
+	!__ASSUME_RECVMMSG_SYSCALL] (__NR_recvmmsg): Undefine.
+	[!__ASSUME_RECVMMSG]: Change condition to
+	[!__ASSUME_RECVMMSG_SOCKETCALL].
+	* ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h
+	[__LINUX_KERNEL_VERSION >= 0x020622] (__ASSUME_RECVMMSG_SYSCALL):
+	Define.
+
+	[BZ #16609]
+	* sysdeps/unix/sysv/linux/kernel-features.h [__i386__ ||
+	__powerpc__ || __s390__ || __sh__ || __sparc__]
+	(__ASSUME_SOCKETCALL): Define.
+	[__LINUX_KERNEL_VERSION && __ASSUME_SOCKETCALL]
+	(__ASSUME_ACCEPT4_SOCKETCALL): Likewise.
+	[(__LINUX_KERNEL_VERSION >= 0x02061c && (__x86_64__ || __sparc__))
+	|| (__LINUX_KERNEL_VERSION >= 0x020625 && (__powerpc__ ||
+	__sh__)) || (__LINUX_KERNEL_VERSION >= 0x030300 && (__ia64__))] 
+	(__ASSUME_ACCEPT4_SYSCALL): Likewise.
+	[__sparc__] (__ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL): Likewise.
+	[__ASSUME_ACCEPT4_SOCKETCALL || __ASSUME_ACCEPT4_SYSCALL]
+	(__ASSUME_ACCEPT4): Define instead of using previous
+	[__LINUX_KERNEL_VERSION >= 0x02061c && (__i386__ || __x86_64__ ||
+	__powerpc__ || __sparc__ || __s390__)] condition.
+	* sysdeps/unix/sysv/linux/accept4.c [__ASSUME_SOCKETCALL &&
+	!__ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL &&
+	!__ASSUME_ACCEPT4_SYSCALL] (__NR_accept4): Undefine.
+	[!__ASSUME_ACCEPT4]: Change condition to
+	[!__ASSUME_ACCEPT4_SOCKETCALL].
+	* ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
+	(__ASSUME_ACCEPT4): Change to __ASSUME_ACCEPT4_SYSCALL.  Correct
+	condition to [__LINUX_KERNEL_VERSION >= 0x030200].
+	* ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
+	[__LINUX_KERNEL_VERSION >= 0x020624] (__ASSUME_ACCEPT4_SYSCALL):
+	Define.
+	* sysdeps/unix/sysv/linux/i386/accept4.S [__ASSUME_ACCEPT4]:
+	Change conditions to [__ASSUME_ACCEPT4_SOCKETCALL].
+	* sysdeps/unix/sysv/linux/internal_accept4.S [__ASSUME_SOCKETCALL
+	&& !__ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL &&
+	!__ASSUME_ACCEPT4_SYSCALL] (__NR_accept4): Undefine.
+	[__ASSUME_ACCEPT4]: Change condition to
+	[__ASSUME_ACCEPT4_SOCKETCALL].
+	* ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h
+	(__ASSUME_SOCKETCALL): Define.
+	* ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
+	[__LINUX_KERNEL_VERSION >= 0x02061f] (__ASSUME_ACCEPT4_SYSCALL):
+	Likewise.
+ 	* ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h
+ 	[__LINUX_KERNEL_VERSION >= 0x020622] (__ASSUME_ACCEPT4_SYSCALL):
+
+--- a/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h
++++ b/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h
+@@ -36,4 +36,10 @@
+ # define __ASSUME_LWS_CAS		1
+ #endif
+ 
++/* Support for the accept4 and recvmmsg syscalls was added in 2.6.34.  */
++#if __LINUX_KERNEL_VERSION >= 0x020622
++# define __ASSUME_ACCEPT4_SYSCALL	1
++# define __ASSUME_RECVMMSG_SYSCALL	1
++#endif
++
+ #include_next <kernel-features.h>
+--- a/sysdeps/unix/sysv/linux/accept4.c
++++ b/sysdeps/unix/sysv/linux/accept4.c
+@@ -25,6 +25,14 @@
+ #include <sys/syscall.h>
+ #include <kernel-features.h>
+ 
++/* Do not use the accept4 syscall on socketcall architectures unless
++   it was added at the same time as the socketcall support or can be
++   assumed to be present.  */
++#if defined __ASSUME_SOCKETCALL \
++    && !defined __ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL \
++    && !defined __ASSUME_ACCEPT4_SYSCALL
++# undef __NR_accept4
++#endif
+ 
+ #ifdef __NR_accept4
+ int
+@@ -43,7 +51,7 @@
+   return result;
+ }
+ #elif defined __NR_socketcall
+-# ifndef __ASSUME_ACCEPT4
++# ifndef __ASSUME_ACCEPT4_SOCKETCALL
+ extern int __internal_accept4 (int fd, __SOCKADDR_ARG addr,
+ 			       socklen_t *addr_len, int flags)
+      attribute_hidden;
+@@ -84,7 +92,8 @@
+   return -1;
+ }
+ # else
+-/* When __ASSUME_ACCEPT4 accept4 is defined in internal_accept4.S.  */
++/* When __ASSUME_ACCEPT4_SOCKETCALL accept4 is defined in
++   internal_accept4.S.  */
+ # endif
+ #else
+ int
+--- a/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
++++ b/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
+@@ -61,9 +61,14 @@
+ # define __ASSUME_SIGNALFD4 1
+ #endif
+ 
+-/* Support for accept4 was added for alpha after 2.6.33-rc1.  */
++/* Support for recvmmsg was added for alpha in 2.6.33.  */
+ #if __LINUX_KERNEL_VERSION >= 0x020621
+-# define __ASSUME_ACCEPT4      1
++# define __ASSUME_RECVMMSG_SYSCALL       1
++#endif
++
++/* Support for accept4 was added for alpha in 3.2.  */
++#if __LINUX_KERNEL_VERSION >= 0x030200
++# define __ASSUME_ACCEPT4_SYSCALL      1
+ #endif
+ 
+ #include_next <kernel-features.h>
+--- a/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
++++ b/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
+@@ -57,6 +57,16 @@
+ # define __ASSUME_SIGNALFD4	1
+ #endif
+ 
++/* Support for the recvmmsg syscall was added in 2.6.33.  */
++#if __LINUX_KERNEL_VERSION >= 0x020621
++# define __ASSUME_RECVMMSG_SYSCALL	1
++#endif
++
++/* Support for the accept4 syscall was added in 2.6.36.  */
++#if __LINUX_KERNEL_VERSION >= 0x020624
++# define __ASSUME_ACCEPT4_SYSCALL	1
++#endif
++
+ #include_next <kernel-features.h>
+ 
+ /* Support for pselect6, ppoll and epoll_pwait was added in 2.6.32.  */
+--- a/sysdeps/unix/sysv/linux/i386/accept4.S
++++ b/sysdeps/unix/sysv/linux/i386/accept4.S
+@@ -24,7 +24,7 @@
+ #define EINVAL	22
+ #define ENOSYS	38
+ 
+-#ifdef __ASSUME_ACCEPT4
++#ifdef __ASSUME_ACCEPT4_SOCKETCALL
+ # define errlabel SYSCALL_ERROR_LABEL
+ #else
+ # define errlabel .Lerr
+@@ -116,7 +116,7 @@
+ 	ret
+ #endif
+ 
+-#ifndef __ASSUME_ACCEPT4
++#ifndef __ASSUME_ACCEPT4_SOCKETCALL
+ 	/* The kernel returns -EINVAL for unknown socket operations.
+ 	   We need to convert that error to an ENOSYS error.  */
+ .Lerr:	cmpl $-EINVAL, %eax
+--- a/sysdeps/unix/sysv/linux/internal_accept4.S
++++ b/sysdeps/unix/sysv/linux/internal_accept4.S
+@@ -1,8 +1,18 @@
+ #include <kernel-features.h>
+ #include <sys/syscall.h>
++
++/* Do not use the accept4 syscall on socketcall architectures unless
++   it was added at the same time as the socketcall support or can be
++   assumed to be present.  */
++#if defined __ASSUME_SOCKETCALL \
++    && !defined __ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL \
++    && !defined __ASSUME_ACCEPT4_SYSCALL
++# undef __NR_accept4
++#endif
++
+ #if !defined __NR_accept4 && defined __NR_socketcall
+ # define socket	accept4
+-# ifdef __ASSUME_ACCEPT4
++# ifdef __ASSUME_ACCEPT4_SOCKETCALL
+ #  define __socket accept4
+ # else
+ #  define __socket __internal_accept4
+--- a/sysdeps/unix/sysv/linux/kernel-features.h
++++ b/sysdeps/unix/sysv/linux/kernel-features.h
+@@ -85,6 +85,18 @@
+ # define __ASSUME_SENDFILE		1
+ #endif
+ 
++/* Some architectures use the socketcall multiplexer for some or all
++   socket-related operations, via a socket.S file in glibc, instead of
++   separate syscalls.  __ASSUME_SOCKETCALL is defined for such
++   architectures.  */
++#if defined __i386__ \
++    || defined __powerpc__ \
++    || defined __s390__ \
++    || defined __sh__ \
++    || defined __sparc__
++# define __ASSUME_SOCKETCALL		1
++#endif
++
+ /* Only very old kernels had no real symlinks for terminal descriptors
+    in /proc/self/fd.  */
+ #if __LINUX_KERNEL_VERSION >= 131584
+@@ -498,10 +510,36 @@
+ # define __ASSUME_SIGNALFD4	1
+ #endif
+ 
+-/* Support for the accept4 syscall was added in 2.6.28.  */
+-#if __LINUX_KERNEL_VERSION >= 0x02061c \
+-    && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
+-	|| defined __sparc__ || defined __s390__)
++/* Support for accept4 functionality was added in 2.6.28, but for some
++   architectures using a separate syscall rather than socketcall that
++   syscall was only added later, and some architectures first had
++   socketcall support then a separate syscall.  Define
++   __ASSUME_ACCEPT4_SOCKETCALL if glibc uses socketcall on this
++   architecture and accept4 is available through socketcall,
++   __ASSUME_ACCEPT4_SYSCALL if it is available through a separate
++   syscall, __ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL if it became
++   available through a separate syscall at the same time as through
++   socketcall, and __ASSUME_ACCEPT4 if the accept4 function is known
++   to work.  */
++#if __LINUX_KERNEL_VERSION >= 0x02061c && defined __ASSUME_SOCKETCALL
++# define __ASSUME_ACCEPT4_SOCKETCALL	1
++#endif
++
++/* The accept4 syscall was added for x86_64 and SPARC in 2.6.28,
++   for PowerPC and SH in 2.6.37, and for IA64 in 3.3.  */
++#if (__LINUX_KERNEL_VERSION >= 0x02061c			\
++     && (defined __x86_64__ || defined __sparc__))	\
++    || (__LINUX_KERNEL_VERSION >= 0x020625		\
++	&& (defined __powerpc__ || defined __sh__))	\
++    || (__LINUX_KERNEL_VERSION >= 0x030300		\
++	&& (defined __ia64))
++# define __ASSUME_ACCEPT4_SYSCALL	1
++#endif
++#ifdef __sparc__
++# define __ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL	1
++#endif
++
++#if defined __ASSUME_ACCEPT4_SOCKETCALL || defined __ASSUME_ACCEPT4_SYSCALL
+ # define __ASSUME_ACCEPT4	1
+ #endif
+ 
+@@ -526,8 +564,26 @@
+ # define __ASSUME_F_GETOWN_EX	1
+ #endif
+ 
+-/* Support for the recvmmsg syscall was added in 2.6.33.  */
+-#if __LINUX_KERNEL_VERSION >= 0x020621
++/* Support for recvmmsg functionality was added in 2.6.33.  The macros
++   defined correspond to those for accept4.  */
++#if __LINUX_KERNEL_VERSION >= 0x020621 && defined __ASSUME_SOCKETCALL
++# define __ASSUME_RECVMMSG_SOCKETCALL	1
++#endif
++
++/* The recvmmsg syscall was added for i386, x86_64n SPARC and IA64 in
++   2.6.33, and for PowerPC and SH in 2.6.37.  */
++#if (__LINUX_KERNEL_VERSION >= 0x020621			\
++     && (defined __i386__ || defined __x86_64__ || defined __sparc__	 \
++	 || defined __ia64__))	 \
++    || (__LINUX_KERNEL_VERSION >= 0x020625		\
++	&& (defined __powerpc__ || defined __sh__))
++# define __ASSUME_RECVMMSG_SYSCALL	1
++#endif
++#if defined __i386__ || defined __sparc__
++# define __ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL	1
++#endif
++
++#if defined __ASSUME_RECVMMSG_SOCKETCALL || defined __ASSUME_RECVMMSG_SYSCALL
+ # define __ASSUME_RECVMMSG	1
+ #endif
+ 
+--- a/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h
++++ b/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h
+@@ -27,6 +27,9 @@
+ # define __ASSUME_VFORK_SYSCALL		1
+ #endif
+ 
++/* m68k uses socketcall.  */
++#define __ASSUME_SOCKETCALL	1
++
+ /* Many syscalls were added in 2.6.10 for m68k.  */
+ #if __LINUX_KERNEL_VERSION >= 132618
+ # define __ASSUME_TGKILL	1
+--- a/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
++++ b/ports/sysdeps/unix/sysv/linux/mips/kernel-features.h
+@@ -37,6 +37,16 @@
+ # define __ASSUME_SIGNALFD4	1
+ #endif
+ 
++/* Support for the accept4 syscall was added in 2.6.31.  */
++#if __LINUX_KERNEL_VERSION >= 0x02061f
++# define __ASSUME_ACCEPT4_SYSCALL	1
++#endif
++
++/* Support for the recvmmsg syscall was added in 2.6.33.  */
++#if __LINUX_KERNEL_VERSION >= 0x020621
++# define __ASSUME_RECVMMSG_SYSCALL	1
++#endif
++
+ #include_next <kernel-features.h>
+ 
+ /* The n32 syscall ABI did not have a getdents64 syscall until
+--- a/sysdeps/unix/sysv/linux/internal_recvmmsg.S
++++ b/sysdeps/unix/sysv/linux/internal_recvmmsg.S
+@@ -1,8 +1,18 @@
+ #include <kernel-features.h>
+ #include <sys/syscall.h>
++
++/* Do not use the recvmmsg syscall on socketcall architectures unless
++   it was added at the same time as the socketcall support or can be
++   assumed to be present.  */
++#if defined __ASSUME_SOCKETCALL \
++    && !defined __ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL \
++    && !defined __ASSUME_RECVMMSG_SYSCALL
++# undef __NR_recvmmsg
++#endif
++
+ #if !defined __NR_recvmmsg && defined __NR_socketcall
+ # define socket	recvmmsg
+-# ifdef __ASSUME_RECVMMSG
++# ifdef __ASSUME_RECVMMSG_SOCKETCALL
+ #  define __socket recvmmsg
+ # else
+ #  define __socket __internal_recvmmsg
+--- a/sysdeps/unix/sysv/linux/recvmmsg.c
++++ b/sysdeps/unix/sysv/linux/recvmmsg.c
+@@ -24,6 +24,14 @@
+ #include <sys/syscall.h>
+ #include <kernel-features.h>
+ 
++/* Do not use the recvmmsg syscall on socketcall architectures unless
++   it was added at the same time as the socketcall support or can be
++   assumed to be present.  */
++#if defined __ASSUME_SOCKETCALL \
++    && !defined __ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL \
++    && !defined __ASSUME_RECVMMSG_SYSCALL
++# undef __NR_recvmmsg
++#endif
+ 
+ #ifdef __NR_recvmmsg
+ int
+@@ -42,7 +50,7 @@
+   return result;
+ }
+ #elif defined __NR_socketcall
+-# ifndef __ASSUME_RECVMMSG
++# ifndef __ASSUME_RECVMMSG_SOCKETCALL
+ extern int __internal_recvmmsg (int fd, struct mmsghdr *vmessages,
+ 				unsigned int vlen, int flags,
+ 				const struct timespec *tmo)
+@@ -86,7 +94,8 @@
+   return -1;
+ }
+ # else
+-/* When __ASSUME_RECVMMSG recvmmsg is defined in internal_recvmmsg.S.  */
++/* When __ASSUME_RECVMMSG_SOCKETCALL recvmmsg is defined in
++   internal_recvmmsg.S.  */
+ # endif
+ #else
+ int
--- eglibc-2.13.orig/debian/patches/any/submitted-missing-etc-hosts.diff
+++ eglibc-2.13/debian/patches/any/submitted-missing-etc-hosts.diff
@@ -0,0 +1,15 @@
+---
+ nss/nss_files/files-hosts.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/nss/nss_files/files-hosts.c
++++ b/nss/nss_files/files-hosts.c
+@@ -480,7 +480,7 @@
+   else
+     {
+       *errnop = errno;
+-      *herrnop = NO_DATA;
++      *herrnop = HOST_NOT_FOUND;
+     }
+ 
+   __libc_lock_unlock (lock);
--- eglibc-2.13.orig/debian/patches/any/local-disable-gethostbyname4.diff
+++ eglibc-2.13/debian/patches/any/local-disable-gethostbyname4.diff
@@ -0,0 +1,13 @@
+https://bugzilla.redhat.com/show_bug.cgi?id=459756
+
+--- a/resolv/Versions
++++ b/resolv/Versions
+@@ -102,7 +102,7 @@
+     _nss_dns_gethostbyname_r; _nss_dns_getnetbyaddr_r;
+     _nss_dns_getnetbyname_r; _nss_dns_getcanonname_r;
+     _nss_dns_gethostbyaddr2_r;
+-    _nss_dns_gethostbyname4_r;
++#    _nss_dns_gethostbyname4_r;
+   }
+ }
+ 
--- eglibc-2.13.orig/debian/patches/any/local-stubs_h.diff
+++ eglibc-2.13/debian/patches/any/local-stubs_h.diff
@@ -0,0 +1,15 @@
+---
+ include/stubs-prologue.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/stubs-prologue.h
++++ b/include/stubs-prologue.h
+@@ -8,7 +8,7 @@
+    every time called, usually setting errno to ENOSYS.  */
+ 
+ #ifdef _LIBC
+- #error Applications may not define the macro _LIBC
++# error Applications may not define the macro _LIBC
+ #endif
+ 
+ @ Placeholder line so we remember to keep the preceding blank line here.
--- eglibc-2.13.orig/debian/patches/any/cvs-sched_h.diff
+++ eglibc-2.13/debian/patches/any/cvs-sched_h.diff
@@ -0,0 +1,137 @@
+2011-01-30  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+Synchronize bits/sched.h with ./sysdeps/unix/sysv/linux/bits/sched.h
+
+This brings the variable-size cpu_set_t manipulation macros from
+./sysdeps/unix/sysv/linux/bits/sched.h
+
+* bits/sched.h (__CPU_ZERO, __CPU_SET, __CPU_CLR, __CPU_ISSET,
+__CPU_COUNT): Remove old macros.
+(__CPU_ZERO_S, __CPU_SET_S, __CPU_CLR_S, __CPU_ISSET_S, __CPU_COUNT,
+__CPU_EQUAL_S, __CPU_OP_S, __CPU_ALLOC_SIZE, __CPU_ALLOC, __CPU_FREE): Add
+macros.
+(__sched_cpualloc, __sched_cpufree): Add declarations.
+
+---
+http://sourceware.org/ml/libc-alpha/2011-01/msg00054.html
+
+ bits/sched.h |   87 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 72 insertions(+), 15 deletions(-)
+
+--- a/bits/sched.h
++++ b/bits/sched.h
+@@ -1,6 +1,7 @@
+ /* Definitions of constants and data structure for POSIX 1003.1b-1993
+    scheduling interface.
+-   Copyright (C) 1996, 1997, 2001, 2003, 2007 Free Software Foundation, Inc.
++   Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008,2009
++   Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+@@ -56,7 +57,7 @@
+ # define __CPU_SETSIZE	1024
+ # define __NCPUBITS	(8 * sizeof (__cpu_mask))
+ 
+-/* Type for array elements in 'cpu_set'.  */
++/* Type for array elements in 'cpu_set_t'.  */
+ typedef unsigned long int __cpu_mask;
+ 
+ /* Basic access functions.  */
+@@ -70,27 +71,83 @@
+ } cpu_set_t;
+ 
+ /* Access functions for CPU masks.  */
+-# define __CPU_ZERO(cpusetp) \
++# if __GNUC_PREREQ (2, 91)
++#  define __CPU_ZERO_S(setsize, cpusetp) \
++  do __builtin_memset (cpusetp, '\0', setsize); while (0)
++# else
++#  define __CPU_ZERO_S(setsize, cpusetp) \
+   do {									      \
+-    unsigned int __i;							      \
+-    cpu_set *__arr = (cpusetp);						      \
+-    for (__i = 0; __i < sizeof (cpu_set) / sizeof (__cpu_mask); ++__i)	      \
+-      __arr->__bits[__i] = 0;						      \
++    size_t __i;								      \
++    size_t __imax = (setsize) / sizeof (__cpu_mask);			      \
++    __cpu_mask *__bits = (cpusetp)->__bits;				      \
++    for (__i = 0; __i < __imax; ++__i)					      \
++      __bits[__i] = 0;							      \
+   } while (0)
+-# define __CPU_SET(cpu, cpusetp) \
+-  ((cpusetp)->__bits[__CPUELT (cpu)] |= __CPUMASK (cpu))
+-# define __CPU_CLR(cpu, cpusetp) \
+-  ((cpusetp)->__bits[__CPUELT (cpu)] &= ~__CPUMASK (cpu))
+-# define __CPU_ISSET(cpu, cpusetp) \
+-  (((cpusetp)->__bits[__CPUELT (cpu)] & __CPUMASK (cpu)) != 0)
++# endif
++# define __CPU_SET_S(cpu, setsize, cpusetp) \
++  (__extension__							      \
++   ({ size_t __cpu = (cpu);						      \
++      __cpu < 8 * (setsize)						      \
++      ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]		      \
++	 |= __CPUMASK (__cpu))						      \
++      : 0; }))
++# define __CPU_CLR_S(cpu, setsize, cpusetp) \
++  (__extension__							      \
++   ({ size_t __cpu = (cpu);						      \
++      __cpu < 8 * (setsize)						      \
++      ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]		      \
++	 &= ~__CPUMASK (__cpu))						      \
++      : 0; }))
++# define __CPU_ISSET_S(cpu, setsize, cpusetp) \
++  (__extension__							      \
++   ({ size_t __cpu = (cpu);						      \
++      __cpu < 8 * (setsize)						      \
++      ? ((((__const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]      \
++	  & __CPUMASK (__cpu))) != 0					      \
++      : 0; }))
++
++# define __CPU_COUNT_S(setsize, cpusetp) \
++  __sched_cpucount (setsize, cpusetp)
++
++# if __GNUC_PREREQ (2, 91)
++#  define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
++  (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
++# else
++#  define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
++  (__extension__							      \
++   ({ __const __cpu_mask *__arr1 = (cpusetp1)->__bits;			      \
++      __const __cpu_mask *__arr2 = (cpusetp2)->__bits;			      \
++      size_t __imax = (setsize) / sizeof (__cpu_mask);			      \
++      size_t __i;							      \
++      for (__i = 0; __i < __imax; ++__i)				      \
++	if (__bits[__i] != __bits[__i])					      \
++	  break;							      \
++      __i == __imax; }))
++# endif
++
++# define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \
++  (__extension__							      \
++   ({ cpu_set_t *__dest = (destset);					      \
++      __const __cpu_mask *__arr1 = (srcset1)->__bits;			      \
++      __const __cpu_mask *__arr2 = (srcset2)->__bits;			      \
++      size_t __imax = (setsize) / sizeof (__cpu_mask);			      \
++      size_t __i;							      \
++      for (__i = 0; __i < __imax; ++__i)				      \
++	((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i];    \
++      __dest; }))
++
++# define __CPU_ALLOC_SIZE(count) \
++  ((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask))
++# define __CPU_ALLOC(count) __sched_cpualloc (count)
++# define __CPU_FREE(cpuset) __sched_cpufree (cpuset)
+ 
+ __BEGIN_DECLS
+ 
+ extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
+      __THROW;
++extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur;
++extern void __sched_cpufree (cpu_set_t *__set) __THROW;
+ 
+ __END_DECLS
+ 
+-# define __CPU_COUNT(cpusetp) \
+-  __sched_cpucount (sizeof (cpu_set_t), cpusetp)
+ #endif
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-ptw.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-ptw.diff
@@ -0,0 +1,15 @@
+---
+ linuxthreads/Makeconfig |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/linuxthreads/Makeconfig
++++ b/linuxthreads/Makeconfig
+@@ -9,3 +9,8 @@
+ bounded-thread-library = $(common-objpfx)linuxthreads/libpthread_b.a
+ 
+ rpath-dirs += linuxthreads
++
++# This makes for ptw-*.? object rules in sysd-rules.
++ptw-CPPFLAGS := -DPTW
++sysd-rules-patterns += ptw-%:%
++
--- eglibc-2.13.orig/debian/patches/any/cvs-nptl-pthread-race.diff
+++ eglibc-2.13/debian/patches/any/cvs-nptl-pthread-race.diff
@@ -0,0 +1,167 @@
+2011-09-15  Andreas Schwab  <schwab@redhat.com>
+
+	* sysdeps/pthread/list.h: Define only list_t if __need_list_t is
+	defined.
+	(list_add): Add atomic_write_barrier.
+	* descr.h: Define __need_list_t before including <list.h>.
+	* nptl-init.c: Include <list.h>
+	* allocatestack.c: Likewise.
+
+---
+ nptl/allocatestack.c        |    1 +
+ nptl/descr.h                |    1 +
+ nptl/nptl-init.c            |    1 +
+ nptl/sysdeps/pthread/list.h |   31 +++++++++++++++++++++++--------
+ nptl_db/ChangeLog           |    4 ++++
+ nptl_db/thread_dbP.h        |    3 ++-
+ 6 files changed, 32 insertions(+), 9 deletions(-)
+
+--- a/nptl/allocatestack.c
++++ b/nptl/allocatestack.c
+@@ -27,6 +27,7 @@
+ #include <sys/param.h>
+ #include <dl-sysdep.h>
+ #include <tls.h>
++#include <list.h>
+ #include <lowlevellock.h>
+ #include <kernel-features.h>
+ 
+--- a/nptl/descr.h
++++ b/nptl/descr.h
+@@ -26,6 +26,7 @@
+ #include <stdbool.h>
+ #include <sys/types.h>
+ #include <hp-timing.h>
++#define __need_list_t
+ #include <list.h>
+ #include <lowlevellock.h>
+ #include <pthreaddef.h>
+--- a/nptl/nptl-init.c
++++ b/nptl/nptl-init.c
+@@ -29,6 +29,7 @@
+ #include <atomic.h>
+ #include <ldsodefs.h>
+ #include <tls.h>
++#include <list.h>
+ #include <fork.h>
+ #include <version.h>
+ #include <shlib-compat.h>
+--- a/nptl/sysdeps/pthread/list.h
++++ b/nptl/sysdeps/pthread/list.h
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 2002, 2009 Free Software Foundation, Inc.
++/* Copyright (C) 2002, 2009, 2011 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
+ 
+@@ -18,27 +18,39 @@
+    02111-1307 USA.  */
+ 
+ #ifndef _LIST_H
+-#define _LIST_H	1
++
++#ifndef __need_list_t
++# define _LIST_H	1
++#endif
+ 
+ /* The definitions of this file are adopted from those which can be
+    found in the Linux kernel headers to enable people familiar with
+    the latter find their way in these sources as well.  */
+ 
+ 
++#if defined __need_list_t || defined _LIST_H
++# ifndef __list_t_defined
++#  define __list_t_defined
+ /* Basic type for the double-link list.  */
+ typedef struct list_head
+ {
+   struct list_head *next;
+   struct list_head *prev;
+ } list_t;
++# endif
++# undef __need_list_t
++#endif
++
++#ifdef _LIST_H
+ 
++# include <atomic.h>
+ 
+ /* Define a variable with the head and tail of the list.  */
+-#define LIST_HEAD(name) \
++# define LIST_HEAD(name) \
+   list_t name = { &(name), &(name) }
+ 
+ /* Initialize a new list head.  */
+-#define INIT_LIST_HEAD(ptr) \
++# define INIT_LIST_HEAD(ptr) \
+   (ptr)->next = (ptr)->prev = (ptr)
+ 
+ 
+@@ -49,6 +61,7 @@
+   newp->next = head->next;
+   newp->prev = head;
+   head->next->prev = newp;
++  atomic_write_barrier ();
+   head->next = newp;
+ }
+ 
+@@ -78,26 +91,28 @@
+ 
+ 
+ /* Get typed element from list at a given position.  */
+-#define list_entry(ptr, type, member) \
++# define list_entry(ptr, type, member) \
+   ((type *) ((char *) (ptr) - (unsigned long) (&((type *) 0)->member)))
+ 
+ 
+ 
+ /* Iterate forward over the elements of the list.  */
+-#define list_for_each(pos, head) \
++# define list_for_each(pos, head) \
+   for (pos = (head)->next; pos != (head); pos = pos->next)
+ 
+ 
+ /* Iterate forward over the elements of the list.  */
+-#define list_for_each_prev(pos, head) \
++# define list_for_each_prev(pos, head) \
+   for (pos = (head)->prev; pos != (head); pos = pos->prev)
+ 
+ 
+ /* Iterate backwards over the elements list.  The list elements can be
+    removed from the list while doing this.  */
+-#define list_for_each_prev_safe(pos, p, head) \
++# define list_for_each_prev_safe(pos, p, head) \
+   for (pos = (head)->prev, p = pos->prev; \
+        pos != (head); \
+        pos = p, p = pos->prev)
+ 
++#endif /* _LIST_H */
++
+ #endif	/* list.h */
+--- a/nptl_db/ChangeLog
++++ b/nptl_db/ChangeLog
+@@ -1,3 +1,7 @@
++2011-09-15  Andreas Schwab  <schwab@redhat.com>
++
++	* thread_dbP.h: Include <list.h>
++
+ 2009-08-23  Roland McGrath  <roland@redhat.com>
+ 
+ 	* td_ta_map_lwp2thr.c (__td_ta_lookup_th_unique): Move ta_ok check
+--- a/nptl_db/thread_dbP.h
++++ b/nptl_db/thread_dbP.h
+@@ -1,5 +1,5 @@
+ /* Private header for thread debug library
+-   Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
++   Copyright (C) 2003, 2004, 2007, 2011 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+@@ -29,6 +29,7 @@
+ #include "proc_service.h"
+ #include "thread_db.h"
+ #include "../nptl/pthreadP.h"  	/* This is for *_BITMASK only.  */
++#include <list.h>
+ 
+ /* Indeces for the symbol names.  */
+ enum
--- eglibc-2.13.orig/debian/patches/any/submitted-fwrite-wur.diff
+++ eglibc-2.13/debian/patches/any/submitted-fwrite-wur.diff
@@ -0,0 +1,26 @@
+http://sourceware.org/bugzilla/show_bug.cgi?id=11959
+
+---
+ libio/stdio.h |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/libio/stdio.h
++++ b/libio/stdio.h
+@@ -706,7 +706,7 @@
+    This function is a possible cancellation points and therefore not
+    marked with __THROW.  */
+ extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
+-		      size_t __n, FILE *__restrict __s) __wur;
++		      size_t __n, FILE *__restrict __s);
+ __END_NAMESPACE_STD
+ 
+ #ifdef __USE_GNU
+@@ -730,7 +730,7 @@
+ extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
+ 			      size_t __n, FILE *__restrict __stream) __wur;
+ extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
+-			       size_t __n, FILE *__restrict __stream) __wur;
++			       size_t __n, FILE *__restrict __stream);
+ #endif
+ 
+ 
--- eglibc-2.13.orig/debian/patches/any/local-asserth-decls.diff
+++ eglibc-2.13/debian/patches/any/local-asserth-decls.diff
@@ -0,0 +1,36 @@
+# DP: Description: /usr/include/assert.h
+# DP:	One must be allowed to include <assert.h> multiple times with different
+# DP:	values for NDEBUG, so the file is not protected against multiple
+# DP:	inclusions.  Unfortunately this means that the declarations for
+# DP:	__assert_fail() and the like may occur multiple times in a compilation
+# DP:	unit, causing gcc to issue a batch of warnings.
+# DP:	I believe this can be fixed by protecting the declarations (but only
+# DP:	those declarations) against repetition.
+# DP: Author: Jeroen T. Vermeulen <jtv@xs4all.nl>
+# DP: Upstream status: Not submitted
+# DP: Status Details: Plan to submit
+# DP: Date: 2003-01-01
+
+---
+ assert/assert.h |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/assert/assert.h
++++ b/assert/assert.h
+@@ -63,6 +63,8 @@
+ 
+ #else /* Not NDEBUG.  */
+ 
++#ifndef _ASSERT_H_DECLS
++#define _ASSERT_H_DECLS
+ __BEGIN_DECLS
+ 
+ /* This prints an "Assertion failed" message and aborts.  */
+@@ -84,6 +86,7 @@
+ 
+ 
+ __END_DECLS
++#endif /* Not _ASSERT_H_DECLS */
+ 
+ # define assert(expr)							\
+   ((expr)								\
--- eglibc-2.13.orig/debian/patches/any/submitted-localedef-mmap.diff
+++ eglibc-2.13/debian/patches/any/submitted-localedef-mmap.diff
@@ -0,0 +1,39 @@
+2009-10-27  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* locale/programs/locarchive.c: use MMAP_SHARED to reserve memory
+	used later with MMAP_FIXED | MMAP_SHARED to cope with different
+	alignment restrictions.
+
+---
+ locale/programs/locarchive.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/locale/programs/locarchive.c
++++ b/locale/programs/locarchive.c
+@@ -134,7 +134,7 @@
+   size_t reserved = RESERVE_MMAP_SIZE;
+   int xflags = 0;
+   if (total < reserved
+-      && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
++      && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
+ 		       -1, 0)) != MAP_FAILED))
+     xflags = MAP_FIXED;
+   else
+@@ -397,7 +397,7 @@
+   size_t reserved = RESERVE_MMAP_SIZE;
+   int xflags = 0;
+   if (total < reserved
+-      && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
++      && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
+ 		       -1, 0)) != MAP_FAILED))
+     xflags = MAP_FIXED;
+   else
+@@ -633,7 +633,7 @@
+   int xflags = 0;
+   void *p;
+   if (st.st_size < reserved
+-      && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
++      && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON,
+ 		       -1, 0)) != MAP_FAILED))
+     xflags = MAP_FIXED;
+   else
--- eglibc-2.13.orig/debian/patches/any/cvs-getpwuid-nsswitch.diff
+++ eglibc-2.13/debian/patches/any/cvs-getpwuid-nsswitch.diff
@@ -0,0 +1,169 @@
+2012-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
+	[BZ #14122]
+	* nss/nsswitch.c (defconfig_entries): New variable.
+	(__nss_database_lookup): Don't leak defconfig entries.
+	(nss_parse_service_list): Don't leak on error paths.
+	(free_database_entries): New function.
+	(free_defconfig): New function.
+	(free_mem): Move common code to free_database_entries.
+
+---
+ nss/nsswitch.c |   90 +++++++++++++++++++++++++++++++++++++++++++--------------
+ 1 file changed, 69 insertions(+), 21 deletions(-)
+
+--- a/nss/nsswitch.c
++++ b/nss/nsswitch.c
+@@ -98,6 +98,12 @@
+ /* The root of the whole data base.  */
+ static name_database *service_table;
+ 
++/* List of default service lists that were generated by glibc because
++   /etc/nsswitch.conf did not provide a value.
++   The list is only maintained so we can free such service lists in
++   __libc_freeres.  */
++static name_database_entry *defconfig_entries;
++
+ #else /* __OPTION_EGLIBC_NSSWITCH */
+ 
+ /* Bring in the statically initialized service table we generated at
+@@ -164,8 +170,27 @@
+      DEFCONFIG specifies the default service list for this database,
+      or null to use the most common default.  */
+   if (*ni == NULL)
+-    *ni = nss_parse_service_list (defconfig
+-				  ?: "nis [NOTFOUND=return] files");
++    {
++      *ni = nss_parse_service_list (defconfig
++				    ?: "nis [NOTFOUND=return] files");
++      if (*ni != NULL)
++	{
++	  /* Record the memory we've just allocated in defconfig_entries list,
++	     so we can free it later.  */
++	  name_database_entry *entry;
++
++	  /* Allocate ENTRY plus size of name (1 here).  */
++	  entry = (name_database_entry *) malloc (sizeof (*entry) + 1);
++
++	  if (entry != NULL)
++	    {
++	      entry->next = defconfig_entries;
++	      entry->service = *ni;
++	      entry->name = "";
++	      defconfig_entries = entry;
++	    }
++	}
++    }
+ #else
+   /* Without the dynamic behavior, we can't process defconfig.  The
+      databases the user specified at library build time are all you
+@@ -677,7 +702,7 @@
+ 		  else if (__strncasecmp (name, "UNAVAIL", 7) == 0)
+ 		    status = NSS_STATUS_UNAVAIL;
+ 		  else
+-		    return result;
++		    goto finish;
+ 		}
+ 	      else if (line - name == 8)
+ 		{
+@@ -686,15 +711,15 @@
+ 		  else if (__strncasecmp (name, "TRYAGAIN", 8) == 0)
+ 		    status = NSS_STATUS_TRYAGAIN;
+ 		  else
+-		    return result;
++		    goto finish;
+ 		}
+ 	      else
+-		return result;
++		goto finish;
+ 
+ 	      while (isspace (line[0]))
+ 		++line;
+ 	      if (line[0] != '=')
+-		return result;
++		goto finish;
+ 	      do
+ 		++line;
+ 	      while (isspace (line[0]));
+@@ -710,7 +735,7 @@
+ 		       && __strncasecmp (name, "CONTINUE", 8) == 0)
+ 		action = NSS_ACTION_CONTINUE;
+ 	      else
+-		return result;
++		goto finish;
+ 
+ 	      if (not)
+ 		{
+@@ -738,6 +763,11 @@
+ 
+       *nextp = new_service;
+       nextp = &new_service->next;
++      continue;
++
++    finish:
++      free (new_service);
++      return result;
+     }
+ }
+ 
+@@ -825,21 +855,9 @@
+ 
+ 
+ #if __OPTION_EGLIBC_NSSWITCH
+-/* Free all resources if necessary.  */
+-libc_freeres_fn (free_mem)
++static void
++free_database_entries (name_database_entry *entry)
+ {
+-  name_database *top = service_table;
+-  name_database_entry *entry;
+-  service_library *library;
+-
+-  if (top == NULL)
+-    /* Maybe we have not read the nsswitch.conf file.  */
+-    return;
+-
+-  /* Don't disturb ongoing other threads (if there are any).  */
+-  service_table = NULL;
+-
+-  entry = top->entry;
+   while (entry != NULL)
+     {
+       name_database_entry *olde = entry;
+@@ -859,6 +877,36 @@
+       entry = entry->next;
+       free (olde);
+     }
++}
++
++/* Free all resources if necessary.  */
++libc_freeres_fn (free_defconfig)
++{
++  name_database_entry *entry = defconfig_entries;
++
++  if (entry == NULL)
++    /* defconfig was not used.  */
++    return;
++
++  /* Don't disturb ongoing other threads (if there are any).  */
++  defconfig_entries = NULL;
++
++  free_database_entries (entry);
++}
++
++libc_freeres_fn (free_mem)
++{
++  name_database *top = service_table;
++  service_library *library;
++
++  if (top == NULL)
++    /* Maybe we have not read the nsswitch.conf file.  */
++    return;
++
++  /* Don't disturb ongoing other threads (if there are any).  */
++  service_table = NULL;
++
++  free_database_entries (top->entry);
+ 
+   library = top->library;
+   while (library != NULL)
--- eglibc-2.13.orig/debian/patches/any/cvs-tzfile.diff
+++ eglibc-2.13/debian/patches/any/cvs-tzfile.diff
@@ -0,0 +1,87 @@
+2011-12-17  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #13506]
+	* time/tzfile.c (__tzfile_read): Check values from file header.
+
+---
+ time/tzfile.c |   54 +++++++++++++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 45 insertions(+), 9 deletions(-)
+
+--- a/time/tzfile.c
++++ b/time/tzfile.c
+@@ -26,6 +26,7 @@
+ #include <time.h>
+ #include <unistd.h>
+ #include <sys/stat.h>
++#include <stdint.h>
+ 
+ #define	NOID
+ #include <timezone/tzfile.h>
+@@ -234,23 +235,58 @@
+       goto read_again;
+     }
+ 
++  if (__builtin_expect (num_transitions
++			> ((SIZE_MAX - (__alignof__ (struct ttinfo) - 1))
++			   / (sizeof (time_t) + 1)), 0))
++    goto lose;
+   total_size = num_transitions * (sizeof (time_t) + 1);
+   total_size = ((total_size + __alignof__ (struct ttinfo) - 1)
+ 		& ~(__alignof__ (struct ttinfo) - 1));
+   types_idx = total_size;
+-  total_size += num_types * sizeof (struct ttinfo) + chars;
++  if (__builtin_expect (num_types
++			> (SIZE_MAX - total_size) / sizeof (struct ttinfo), 0))
++    goto lose;
++  total_size += num_types * sizeof (struct ttinfo);
++  if (__builtin_expect (chars > SIZE_MAX - total_size, 0))
++    goto lose;
++  total_size += chars;
++  if (__builtin_expect (__alignof__ (struct leap) - 1
++			> SIZE_MAX - total_size, 0))
++    goto lose;
+   total_size = ((total_size + __alignof__ (struct leap) - 1)
+ 		& ~(__alignof__ (struct leap) - 1));
+   leaps_idx = total_size;
++  if (__builtin_expect (num_leaps
++			> (SIZE_MAX - total_size) / sizeof (struct leap), 0))
++    goto lose;
+   total_size += num_leaps * sizeof (struct leap);
+-  tzspec_len = (sizeof (time_t) == 8 && trans_width == 8
+-		? st.st_size - (ftello (f)
+-				+ num_transitions * (8 + 1)
+-				+ num_types * 6
+-				+ chars
+-				+ num_leaps * 12
+-				+ num_isstd
+-				+ num_isgmt) - 1 : 0);
++  tzspec_len = 0;
++  if (sizeof (time_t) == 8 && trans_width == 8)
++    {
++      off_t rem = st.st_size - ftello (f);
++      if (__builtin_expect (rem < 0
++			    || (size_t) rem < (num_transitions * (8 + 1)
++					       + num_types * 6
++					       + chars), 0))
++	goto lose;
++      tzspec_len = (size_t) rem - (num_transitions * (8 + 1)
++				   + num_types * 6
++				   + chars);
++      if (__builtin_expect (num_leaps > SIZE_MAX / 12
++			    || tzspec_len < num_leaps * 12, 0))
++	goto lose;
++      tzspec_len -= num_leaps * 12;
++      if (__builtin_expect (tzspec_len < num_isstd, 0))
++	goto lose;
++      tzspec_len -= num_isstd;
++      if (__builtin_expect (tzspec_len == 0 || tzspec_len - 1 < num_isgmt, 0))
++	goto lose;
++      tzspec_len -= num_isgmt + 1;
++      if (__builtin_expect (SIZE_MAX - total_size < tzspec_len, 0))
++	goto lose;
++    }
++  if (__builtin_expect (SIZE_MAX - total_size - tzspec_len < extra, 0))
++    goto lose;
+ 
+   /* Allocate enough memory including the extra block requested by the
+      caller.  */
--- eglibc-2.13.orig/debian/patches/any/cvs-addmntent.diff
+++ eglibc-2.13/debian/patches/any/cvs-addmntent.diff
@@ -0,0 +1,22 @@
+2011-05-11  Ulrich Drepper  <drepper@gmail.com>
+ 
+	[BZ #12625]
+	* misc/mntent_r.c (addmntent): Flush the stream after the output
+
+---
+ misc/mntent_r.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/misc/mntent_r.c
++++ b/misc/mntent_r.c
+@@ -263,8 +263,8 @@
+ 		   mntcopy.mnt_type,
+ 		   mntcopy.mnt_opts,
+ 		   mntcopy.mnt_freq,
+-		   mntcopy.mnt_passno)
+-	  < 0 ? 1 : 0);
++		   mntcopy.mnt_passno) < 0
++	  || fflush (stream) != 0);
+ }
+ weak_alias (__addmntent, addmntent)
+ 
--- eglibc-2.13.orig/debian/patches/any/cvs-resolv-different-nameserver.diff
+++ eglibc-2.13/debian/patches/any/cvs-resolv-different-nameserver.diff
@@ -0,0 +1,61 @@
+2011-06-15  Ulrich Drepper  <drepper@gmail.com>
+
+	* resolv/res_send.c (__libc_res_nsend): Fix typos in last patch.  We
+	need to dereference resplen2.
+
+2011-05-30  Ulrich Drepper  <drepper@gmail.com>
+ 
+	[BZ #12684]
+	* resolv/res_send.c (__libc_res_nsend): Only go to the next name server
+	if both request failed.
+	(send_dg): In case of server errors clear resplen or *resplen2.
+
+---
+ resolv/res_send.c |   12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+--- a/resolv/res_send.c
++++ b/resolv/res_send.c
+@@ -549,7 +549,7 @@
+ 				    ns, ansp, ansp2, nansp2, resplen2);
+ 			if (n < 0)
+ 				return (-1);
+-			if (n == 0)
++			if (n == 0 && (buf2 == NULL || *resplen2 == 0))
+ 				goto next_ns;
+ 		} else {
+ 			/* Use datagrams. */
+@@ -559,7 +559,7 @@
+ 				    ansp2, nansp2, resplen2);
+ 			if (n < 0)
+ 				return (-1);
+-			if (n == 0)
++			if (n == 0 && (buf2 == NULL || *resplen2 == 0))
+ 				goto next_ns;
+ 			if (v_circuit)
+ 			  // XXX Check whether both requests failed or
+@@ -1283,10 +1283,14 @@
+ 				(*thisresplenp > *thisanssizp)
+ 				? *thisanssizp : *thisresplenp);
+ 
+-			if (recvresp1 || (buf2 != NULL && recvresp2))
++			if (recvresp1 || (buf2 != NULL && recvresp2)) {
++			  *resplen2 = 0;
+ 			  return resplen;
++			}
+ 			if (buf2 != NULL)
+ 			  {
++			    /* No data from the first reply.  */
++			    resplen = 0;
+ 			    /* We are waiting for a possible second reply.  */
+ 			    if (hp->id == anhp->id)
+ 			      recvresp1 = 1;
+@@ -1352,7 +1356,7 @@
+ 		goto err_out;
+ 	}
+ 	else {
+-	  	/* poll should not have returned > 0 in this case.  */
++		/* poll should not have returned > 0 in this case.  */
+ 		abort ();
+ 	}
+ }
--- eglibc-2.13.orig/debian/patches/any/submitted-accept4-hidden.diff
+++ eglibc-2.13/debian/patches/any/submitted-accept4-hidden.diff
@@ -0,0 +1,19 @@
+2009-05-23  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* socket/accept4.c (accept4): Remove libc_hidden_def.
+
+---
+ socket/accept4.c |    2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/socket/accept4.c
++++ b/socket/accept4.c
+@@ -35,8 +35,6 @@
+   __set_errno (ENOSYS);
+   return -1;
+ }
+-libc_hidden_def (accept4)
+-
+ 
+ stub_warning (accept4)
+ #include <stub-tag.h>
--- eglibc-2.13.orig/debian/patches/any/local-rtld.diff
+++ eglibc-2.13/debian/patches/any/local-rtld.diff
@@ -0,0 +1,60 @@
+2011-02-08  Steve Langasek  <steve.langasek@ubuntu.com>
+	* elf/Makefile: use the correct path in the ldd script as well
+
+2006-01-21  Aurelien Jarno  <aurel32@debian.org> 
+
+	* Makeconfig: new configuration variable rtlddir to change the
+	  dynamic linker in the ELF binaries, which defaults to slibdir
+	  
+2005-08-30  Andreas Jochen  <Andreas Jochens>
+	* Makeconfig: use rtlddir instead of slibdir
+	* elf/Makefile: likewise
+
+---
+ Makeconfig   |    7 ++++++-
+ elf/Makefile |    4 ++--
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+--- a/Makeconfig
++++ b/Makeconfig
+@@ -202,6 +202,11 @@
+ endif
+ inst_slibdir = $(install_root)$(slibdir)
+ 
++# Directory of the dynamic linker in the ELF binaries
++ifndef rtlddir
++rtlddir := $(slibdir)
++endif
++
+ # Prefix to put on files installed in $(libdir).  For libraries `libNAME.a',
+ # the prefix is spliced between `lib' and the name, so the linker switch
+ # `-l$(libprefix)NAME' finds the library; for other files the prefix is
+@@ -486,7 +491,7 @@
+ endif
+ ifndef config-LDFLAGS
+ ifeq (yesyes,$(build-shared)$(elf))
+-config-LDFLAGS = -Wl,-dynamic-linker=$(slibdir)/$(rtld-installed-name)
++config-LDFLAGS = -Wl,-dynamic-linker=$(rtlddir)/$(rtld-installed-name)
+ endif
+ endif
+ ifndef link-libc
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -397,7 +397,7 @@
+ 	  | $(AWK) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
+ 
+ # interp.c exists just to get this string into the libraries.
+-CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"' \
++CFLAGS-interp.c = -D'RUNTIME_LINKER="$(rtlddir)/$(rtld-installed-name)"' \
+ 		  -DNOT_IN_libc=1
+ $(objpfx)interp.os: $(common-objpfx)config.make
+ 
+@@ -440,7 +440,7 @@
+ endif
+ 
+ 
+-common-ldd-rewrite = -e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
++common-ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \
+ 		     -e 's%@VERSION@%$(version)%g' \
+ 		     -e 's%@PKGVERSION@%$(PKGVERSION)%g' \
+ 		     -e 's%@REPORT_BUGS_TO@%$(REPORT_BUGS_TO)%g'
--- eglibc-2.13.orig/debian/patches/any/cvs-resolv-tld.diff
+++ eglibc-2.13/debian/patches/any/cvs-resolv-tld.diff
@@ -0,0 +1,131 @@
+2011-05-07  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #12734]
+	* resolv/resolv.h: Define RES_NOTLDQUERY.
+	* resolv/res_init.c (res_setoptions): Recognize no_tld_query and
+	no-tld-query and set RES_NOTLDQUERY.
+	* resolv/res_debug.c (p_option): Handle RES_NOTLDQUERY.
+	* resolv/res_query.c (__libc_res_nsearch): Backport changes from
+	modern BIND to search name as TLD unless forbidden.
+ 
+---
+ resolv/res_debug.c |    5 +++--
+ resolv/res_init.c  |    5 +++++
+ resolv/res_query.c |   14 ++++++++------
+ resolv/resolv.h    |    4 +++-
+ 4 files changed, 19 insertions(+), 9 deletions(-)
+
+--- a/resolv/res_debug.c
++++ b/resolv/res_debug.c
+@@ -189,7 +189,7 @@
+ 						buf = malloc(buflen += 1024);
+ 					if (buf == NULL) {
+ 						fprintf(file,
+-				              ";; memory allocation failure\n");
++					      ";; memory allocation failure\n");
+ 					      return;
+ 					}
+ 					continue;
+@@ -356,7 +356,7 @@
+ 	{C_HS,		"HESIOD"},
+ 	{C_ANY,		"ANY"},
+ 	{C_NONE,	"NONE"},
+-	{C_IN, 		(char *)0}
++	{C_IN,		(char *)0}
+ };
+ libresolv_hidden_data_def (__p_class_syms)
+ 
+@@ -588,6 +588,7 @@
+ 	case RES_USEBSTRING:	return "ip6-bytstring";
+ 	case RES_USE_EDNS0:	return "edns0";
+ 	case RES_USE_DNSSEC:	return "dnssec";
++	case RES_NOTLDQUERY:	return "no-tld-query";
+ 				/* XXX nonreentrant */
+ 	default:		sprintf(nbuf, "?0x%lx?", (u_long)option);
+ 				return (nbuf);
+--- a/resolv/res_init.c
++++ b/resolv/res_init.c
+@@ -545,6 +545,11 @@
+ 		} else if (!strncmp(cp, "single-request",
+ 				    sizeof("single-request") - 1)) {
+ 			statp->options |= RES_SNGLKUP;
++		} else if (!strncmp(cp, "no_tld_query",
++				    sizeof("no_tld_query") - 1) ||
++			   !strncmp(cp, "no-tld-query",
++				    sizeof("no-tld-query") - 1)) {
++			statp->options |= RES_NOTLDQUERY;
+ 		} else {
+ 			/* XXX - print a warning here? */
+ 		}
+--- a/resolv/res_query.c
++++ b/resolv/res_query.c
+@@ -123,7 +123,7 @@
+ {
+ 	HEADER *hp = (HEADER *) answer;
+ 	int n, use_malloc = 0;
+-        u_int oflags = statp->_flags;
++	u_int oflags = statp->_flags;
+ 
+ 	size_t bufsize = (type == T_UNSPEC ? 2 : 1) * QUERYSIZE;
+ 	u_char *buf = alloca (bufsize);
+@@ -210,7 +210,7 @@
+ 			if (statp->options & RES_DEBUG)
+ 				printf(";; res_nquery: retry without EDNS0\n");
+ #endif
+-                        goto again;
++			goto again;
+ 		}
+ #ifdef DEBUG
+ 		if (statp->options & RES_DEBUG)
+@@ -344,6 +344,7 @@
+ 	int trailing_dot, ret, saved_herrno;
+ 	int got_nodata = 0, got_servfail = 0, root_on_list = 0;
+ 	int tried_as_is = 0;
++	int searched = 0;
+ 
+ 	__set_errno (0);
+ 	RES_SET_H_ERRNO(statp, HOST_NOT_FOUND);  /* True if we never query. */
+@@ -406,6 +407,7 @@
+ 		for (domain = (const char * const *)statp->dnsrch;
+ 		     *domain && !done;
+ 		     domain++) {
++			searched = 1;
+ 
+ 			if (domain[0][0] == '\0' ||
+ 			    (domain[0][0] == '.' && domain[0][1] == '\0'))
+@@ -477,11 +479,11 @@
+ 	}
+ 
+ 	/*
+-	 * If the name has any dots at all, and no earlier 'as-is' query
+-	 * for the name, and "." is not on the search list, then try an as-is
+-	 * query now.
++	 * f the query has not already been tried as is then try it
++	 * unless RES_NOTLDQUERY is set and there were no dots.
+ 	 */
+-	if (dots && !(tried_as_is || root_on_list)) {
++	if ((dots || !searched || (statp->options & RES_NOTLDQUERY) == 0)
++	    && !(tried_as_is || root_on_list)) {
+ 		ret = __libc_res_nquerydomain(statp, name, NULL, class, type,
+ 					      answer, anslen, answerp,
+ 					      answerp2, nanswerp2, resplen2);
+--- a/resolv/resolv.h
++++ b/resolv/resolv.h
+@@ -102,7 +102,7 @@
+ # define RES_MAXTIME		65535	/* Infinity, in milliseconds. */
+ 
+ struct __res_state {
+-	int	retrans;	 	/* retransmition time interval */
++	int	retrans;		/* retransmition time interval */
+ 	int	retry;			/* number of times to retransmit */
+ 	u_long	options;		/* option flags - see below. */
+ 	int	nscount;		/* number of name servers */
+@@ -219,6 +219,8 @@
+ #define RES_SNGLKUPREOP	0x00400000	/* -"-, but open new socket for each
+ 					   request */
+ #define RES_USE_DNSSEC	0x00800000	/* use DNSSEC using OK bit in OPT */
++#define RES_NOTLDQUERY	0x01000000	/* Do not look up unqualified name
++					   as a TLD.  */
+ 
+ #define RES_DEFAULT	(RES_RECURSE|RES_DEFNAMES|RES_DNSRCH|RES_NOIP6DOTINT)
+ 
--- eglibc-2.13.orig/debian/patches/any/local-no-SOCK_NONBLOCK.diff
+++ eglibc-2.13/debian/patches/any/local-no-SOCK_NONBLOCK.diff
@@ -0,0 +1,105 @@
+---
+ nscd/connections.c |    9 ++++++++-
+ resolv/res_send.c  |   12 ++++++++++--
+ 2 files changed, 18 insertions(+), 3 deletions(-)
+
+--- a/resolv/res_send.c
++++ b/resolv/res_send.c
+@@ -103,13 +103,13 @@
+ #define MAXPACKET       65536
+ #endif
+ 
+-
++#ifdef SOCK_NONBLOCK
+ #ifndef __ASSUME_SOCK_CLOEXEC
+ static int __have_o_nonblock;
+ #else
+ # define __have_o_nonblock 0
+ #endif
+-
++#endif
+ 
+ /* From ev_streams.c.  */
+ 
+@@ -917,6 +917,7 @@
+ 
+ 		/* only try IPv6 if IPv6 NS and if not failed before */
+ 		if (nsap->sa_family == AF_INET6 && !statp->ipv6_unavail) {
++#ifdef SOCK_NONBLOCK
+ 			if (__builtin_expect (__have_o_nonblock >= 0, 1)) {
+ 				EXT(statp).nssocks[ns] =
+ 				  socket(PF_INET6, SOCK_DGRAM|SOCK_NONBLOCK,
+@@ -929,12 +930,14 @@
+ #endif
+ 			}
+ 			if (__builtin_expect (__have_o_nonblock < 0, 0))
++#endif
+ 				EXT(statp).nssocks[ns] =
+ 				  socket(PF_INET6, SOCK_DGRAM, 0);
+ 			if (EXT(statp).nssocks[ns] < 0)
+ 			    statp->ipv6_unavail = errno == EAFNOSUPPORT;
+ 			slen = sizeof (struct sockaddr_in6);
+ 		} else if (nsap->sa_family == AF_INET) {
++#ifdef SOCK_NONBLOCK
+ 			if (__builtin_expect (__have_o_nonblock >= 0, 1)) {
+ 				EXT(statp).nssocks[ns]
+ 				  = socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK,
+@@ -947,6 +950,7 @@
+ #endif
+ 			}
+ 			if (__builtin_expect (__have_o_nonblock < 0, 0))
++#endif
+ 				EXT(statp).nssocks[ns]
+ 				  = socket(PF_INET, SOCK_DGRAM, 0);
+ 			slen = sizeof (struct sockaddr_in);
+@@ -973,7 +977,11 @@
+ 			__res_iclose(statp, false);
+ 			return (0);
+ 		}
++#ifdef SOCK_NONBLOCK
+ 		if (__builtin_expect (__have_o_nonblock < 0, 0)) {
++#else
++                {
++#endif
+ 			/* Make socket non-blocking.  */
+ 			int fl = __fcntl (EXT(statp).nssocks[ns], F_GETFL);
+ 			if  (fl != -1)
+--- a/nscd/connections.c
++++ b/nscd/connections.c
+@@ -1834,6 +1834,7 @@
+ 	      /* We have a new incoming connection.  Accept the connection.  */
+ 	      int fd;
+ 
++#ifdef SOCK_NONBLOCK
+ #ifndef __ASSUME_ACCEPT4
+ 	      fd = -1;
+ 	      if (have_accept4 >= 0)
+@@ -1850,6 +1851,9 @@
+ 	      if (have_accept4 < 0)
+ 		fd = TEMP_FAILURE_RETRY (accept (sock, NULL, NULL));
+ #endif
++#else
++		fd = TEMP_FAILURE_RETRY (accept (sock, NULL, NULL));
++#endif
+ 
+ 	      /* Use the descriptor if we have not reached the limit.  */
+ 	      if (fd >= 0)
+@@ -2039,7 +2043,7 @@
+ 	  {
+ 	    /* A new connection.  */
+ 	    int fd;
+-
++#ifdef SOCK_NONBLOCK
+ # ifndef __ASSUME_ACCEPT4
+ 	    fd = -1;
+ 	    if (have_accept4 >= 0)
+@@ -2056,6 +2060,9 @@
+ 	    if (have_accept4 < 0)
+ 	      fd = TEMP_FAILURE_RETRY (accept (sock, NULL, NULL));
+ # endif
++#else
++	    fd = TEMP_FAILURE_RETRY (accept (sock, NULL, NULL));
++#endif
+ 
+ 	    /* Use the descriptor if we have not reached the limit.  */
+ 	    if (fd >= 0)
--- eglibc-2.13.orig/debian/patches/any/local-bindresvport_blacklist.diff
+++ eglibc-2.13/debian/patches/any/local-bindresvport_blacklist.diff
@@ -0,0 +1,156 @@
+Patch from the OpenSUSE glibc
+
+---
+ sunrpc/bindrsvprt.c |  107 ++++++++++++++++++++++++++++++++++++++++++++++++----
+ 1 file changed, 99 insertions(+), 8 deletions(-)
+
+--- a/sunrpc/bindrsvprt.c
++++ b/sunrpc/bindrsvprt.c
+@@ -29,28 +29,108 @@
+  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
++#include <stdio.h>
++#include <ctype.h>
+ #include <errno.h>
++#include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ 
++#define STARTPORT 600
++#define LOWPORT 512
++#define ENDPORT (IPPORT_RESERVED - 1)
++#define NPORTS	(ENDPORT - STARTPORT + 1)
++
++/*
++ * Read the file /etc/rpc.blacklisted, so that we don't bind
++ * to this ports.
++ */
++
++static int blacklist_read;
++static int *list;
++static int list_size = 0;
++
++static void
++load_blacklist (void)
++{
++  FILE *fp;
++  char *buf = NULL;
++  size_t buflen = 0;
++  int size = 0, ptr = 0;
++
++  blacklist_read = 1;
++
++  fp = fopen ("/etc/bindresvport.blacklist", "r");
++  if (NULL == fp)
++    return;
++
++  while (!feof_unlocked (fp))
++    {
++      unsigned long port;
++      char *tmp, *cp;
++      ssize_t n = __getline (&buf, &buflen, fp);
++      if (n < 1)
++        break;
++
++      cp = buf;
++      tmp = strchr (cp, '#');  /* remove comments */
++      if (tmp)
++        *tmp = '\0';
++      while (isspace ((int)*cp))    /* remove spaces and tabs */
++        ++cp;
++      if (*cp == '\0')        /* ignore empty lines */
++        continue;
++      if (cp[strlen (cp) - 1] == '\n')
++        cp[strlen (cp) - 1] = '\0';
++
++      port = strtoul (cp, &tmp, 0);
++      while (isspace(*tmp))
++        ++tmp;
++      if (*tmp != '\0' || (port == ULONG_MAX && errno == ERANGE))
++	continue;
++
++      /* Don't bother with out-of-range ports */
++      if (port < LOWPORT || port > ENDPORT)
++        continue;
++
++      if (ptr >= size)
++	{
++	  size += 10;
++	  list = realloc (list, size * sizeof (int));
++	  if (list == NULL)
++	    {
++	      free (buf);
++	      return;
++	    }
++	}
++
++      list[ptr++] = port;
++    }
++
++  fclose (fp);
++
++  if (buf)
++    free (buf);
++
++  list_size = ptr;
++}
++
+ /*
+  * Bind a socket to a privileged IP port
+  */
+ int
+ bindresvport (int sd, struct sockaddr_in *sin)
+ {
++  static short startport = STARTPORT;
+   static short port;
+   struct sockaddr_in myaddr;
+   int i;
+ 
+-#define STARTPORT 600
+-#define LOWPORT 512
+-#define ENDPORT (IPPORT_RESERVED - 1)
+-#define NPORTS	(ENDPORT - STARTPORT + 1)
+-  static short startport = STARTPORT;
++  if (!blacklist_read)
++    load_blacklist ();
+ 
+   if (sin == (struct sockaddr_in *) 0)
+     {
+@@ -69,6 +149,7 @@
+       port = (__getpid () % NPORTS) + STARTPORT;
+     }
+ 
++  __set_errno (EADDRINUSE);
+   /* Initialize to make gcc happy.  */
+   int res = -1;
+ 
+@@ -77,12 +158,22 @@
+  again:
+   for (i = 0; i < nports; ++i)
+     {
+-      sin->sin_port = htons (port++);
+-      if (port > endport)
+-	port = startport;
++      int j;
++
++      sin->sin_port = htons (port);
++
++      /* Check, if this port is not blacklisted.  */
++      for (j = 0; j < list_size; j++)
++	if (port == list[j])
++	  goto try_next_port;
++
+       res = __bind (sd, sin, sizeof (struct sockaddr_in));
+       if (res >= 0 || errno != EADDRINUSE)
+ 	break;
++
++try_next_port:
++      if (++port > endport)
++	port = startport;
+     }
+ 
+   if (i == nports && startport != LOWPORT)
--- eglibc-2.13.orig/debian/patches/any/local-tcsetaddr.diff
+++ eglibc-2.13/debian/patches/any/local-tcsetaddr.diff
@@ -0,0 +1,83 @@
+# All lines beginning with `# DP:' are a description of the patch.
+# DP: Description: tcsetattr sanity check on PARENB/CREAD/CSIZE for ptys
+# DP: Related bugs: 218131
+# DP: Author: Jeff Licquia <licquia@progeny.com>
+# DP: Upstream status: [In CVS | Debian-Specific | Pending | Not submitted ]
+# DP: Status Details: 
+# DP: Date: 2003-10-29
+
+---
+ sysdeps/unix/sysv/linux/tcsetattr.c |   55 +++++++++++++++++++++++++++++++++++-
+ 1 file changed, 54 insertions(+), 1 deletion(-)
+
+--- a/sysdeps/unix/sysv/linux/tcsetattr.c
++++ b/sysdeps/unix/sysv/linux/tcsetattr.c
+@@ -48,7 +48,12 @@
+      const struct termios *termios_p;
+ {
+   struct __kernel_termios k_termios;
++  struct __kernel_termios k_termios_old;
+   unsigned long int cmd;
++  int retval, old_retval;
++
++  /* Preserve the previous termios state if we can. */
++  old_retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios_old);
+ 
+   switch (optional_actions)
+     {
+@@ -80,6 +85,54 @@
+   memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
+ 	  __KERNEL_NCCS * sizeof (cc_t));
+ 
+-  return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
++  retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
++
++  /* The Linux kernel silently ignores the invalid c_cflag on pty. 
++     We have to check it here, and return an error.  But if some other
++     setting was successfully changed, POSIX requires us to report
++     success. */
++  if ((retval == 0) && (old_retval == 0))
++    {
++      int save = errno;
++      retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios);
++      if (retval)
++	{
++	  /* We cannot verify if the setting is ok. We don't return
++	     an error (?). */
++	  __set_errno (save);
++	  retval = 0;
++	}
++      else if ((k_termios_old.c_oflag != k_termios.c_oflag) ||
++	       (k_termios_old.c_lflag != k_termios.c_lflag) ||
++	       (k_termios_old.c_line != k_termios.c_line) ||
++	       ((k_termios_old.c_iflag | IBAUD0) != (k_termios.c_iflag | IBAUD0)))
++	{
++	  /* Some other setting was successfully changed, which
++	     means we should not return an error. */
++	  __set_errno (save);
++	  retval = 0;
++	}
++      else if ((k_termios_old.c_cflag | (PARENB & CREAD & CSIZE)) !=
++	       (k_termios.c_cflag | (PARENB & CREAD & CSIZE)))
++	{
++	  /* Some other c_cflag setting was successfully changed, which
++	     means we should not return an error. */
++	  __set_errno (save);
++	  retval = 0;
++	}
++      else if ((termios_p->c_cflag & (PARENB | CREAD))
++			!= (k_termios.c_cflag & (PARENB | CREAD))
++	       || ((termios_p->c_cflag & CSIZE)
++		   && (termios_p->c_cflag & CSIZE)
++			!= (k_termios.c_cflag & CSIZE)))
++	{
++	  /* It looks like the Linux kernel silently changed the
++	     PARENB/CREAD/CSIZE bits in c_cflag. Report it as an
++	     error. */
++	  __set_errno (EINVAL);
++	  retval = -1;
++	}
++    }
++   return retval;
+ }
+ libc_hidden_def (tcsetattr)
--- eglibc-2.13.orig/debian/patches/any/cvs-fopen.diff
+++ eglibc-2.13/debian/patches/any/cvs-fopen.diff
@@ -0,0 +1,77 @@
+2011-04-22  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #12685]
+	* libio/fileops.c (_IO_new_file_fopen): Scan up to 7 bytes of the
+	mode string.
+	Patch by Eric Blake <eblake@redhat.com>.
+
+---
+ libio/fileops.c |   32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+--- a/libio/fileops.c
++++ b/libio/fileops.c
+@@ -291,7 +291,7 @@
+ #ifdef _LIBC
+   last_recognized = mode;
+ #endif
+-  for (i = 1; i < 6; ++i)
++  for (i = 1; i < 7; ++i)
+     {
+       switch (*++mode)
+ 	{
+@@ -1005,18 +1005,18 @@
+       /* Adjust for read-ahead (bytes is buffer). */
+       offset -= fp->_IO_read_end - fp->_IO_read_ptr;
+       if (fp->_offset == _IO_pos_BAD)
+-        {
+-          if (mode != 0)
+-            goto dumb;
+-          else
+-            {
+-              result = _IO_SYSSEEK (fp, 0, dir);
+-              if (result == EOF)
+-                return result;
+-
+-              fp->_offset = result;
+-            }
+-        }
++	{
++	  if (mode != 0)
++	    goto dumb;
++	  else
++	    {
++	      result = _IO_SYSSEEK (fp, 0, dir);
++	      if (result == EOF)
++		return result;
++
++	      fp->_offset = result;
++	    }
++	}
+       /* Make offset absolute, assuming current pointer is file_ptr(). */
+       offset += fp->_offset;
+       if (offset < 0)
+@@ -1278,7 +1278,7 @@
+ 	{
+ 	  f->_flags |= _IO_ERR_SEEN;
+ 	  break;
+-        }
++	}
+       to_do -= count;
+       data = (void *) ((char *) data + count);
+     }
+@@ -1366,12 +1366,12 @@
+       do_write = to_do - (block_size >= 128 ? to_do % block_size : 0);
+ 
+       if (do_write)
+-        {
++	{
+ 	  count = new_do_write (f, s, do_write);
+ 	  to_do -= count;
+ 	  if (count < do_write)
+ 	    return n - to_do;
+-        }
++	}
+ 
+       /* Now write out the remainder.  Normally, this will fit in the
+ 	 buffer, but it's somewhat messier for line-buffered files,
--- eglibc-2.13.orig/debian/patches/any/local-sysctl.diff
+++ eglibc-2.13/debian/patches/any/local-sysctl.diff
@@ -0,0 +1,81 @@
+--- linuxthreads/sysdeps/unix/sysv/linux/smp.h.orig
++++ linuxthreads/sysdeps/unix/sysv/linux/smp.h
+@@ -25,24 +25,6 @@
+ static inline int
+ is_smp_system (void)
+ {
+-  static const int sysctl_args[] = { CTL_KERN, KERN_VERSION };
+-  char buf[512];
+-  size_t reslen = sizeof (buf);
+-
+-  /* Try reading the number using `sysctl' first.  */
+-  if (__sysctl ((int *) sysctl_args,
+-		sizeof (sysctl_args) / sizeof (sysctl_args[0]),
+-		buf, &reslen, NULL, 0) < 0)
+-    {
+-      /* This was not successful.  Now try reading the /proc filesystem.  */
+-      int fd = __open ("/proc/sys/kernel/version", O_RDONLY);
+-      if (__builtin_expect (fd, 0) == -1
+-	  || (reslen = __read (fd, buf, sizeof (buf))) <= 0)
+-	/* This also didn't work.  We give up and say it's a UP machine.  */
+-	buf[0] = '\0';
+-
+-      __close (fd);
+-    }
+-
+-  return strstr (buf, "SMP") != NULL;
++  /* Assume all machines are SMP and/or CMT and/or SMT.  */
++  return 1;
+ }
+--- ports/sysdeps/unix/sysv/linux/arm/ioperm.c.orig
++++ ports/sysdeps/unix/sysv/linux/arm/ioperm.c
+@@ -49,6 +49,8 @@
+ 
+ #define PATH_ARM_SYSTYPE	"/etc/arm_systype"
+ #define PATH_CPUINFO		"/proc/cpuinfo"
++#define PATH_PORTBASE		"/proc/bus/isa/portbase"
++#define PATH_PORTSHIFT		"/proc/bus/isa/portshift"
+ 
+ #define MAX_PORT	0x10000
+ 
+@@ -100,15 +102,25 @@
+ {
+   char systype[256];
+   int i, n;
+-  static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
+-  static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
++  FILE * fp;
++
+   size_t len = sizeof(io.base);
+ 
+-  if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
+-      && ! sysctl (ioshift_name, 3, &io.shift, &len, NULL, 0))
++  if ((fp = fopen (PATH_PORTBASE, "r")))
+     {
+-      io.initdone = 1;
+-      return 0;
++      n = fscanf (fp, "%li", &io.io_base);
++      fclose(fp);
++
++      if (n == 1 && (fp = fopen(PATH_PORTSHIFT, "r")))
++        {
++          n = fscanf (fp, "%i", &io.shift);
++          fclose(fp);
++          if (n == 1)
++	    {
++	      io.initdone = 1;
++              return 0;
++	    }
++	}
+     }
+ 
+   n = readlink (PATH_ARM_SYSTYPE, systype, sizeof (systype) - 1);
+@@ -127,8 +139,6 @@
+     }
+   else
+     {
+-      FILE * fp;
+-
+       fp = fopen (PATH_CPUINFO, "r");
+       if (! fp)
+ 	return -1;
--- eglibc-2.13.orig/debian/patches/any/local-mktemp.diff
+++ eglibc-2.13/debian/patches/any/local-mktemp.diff
@@ -0,0 +1,12 @@
+---
+ misc/mktemp.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/misc/mktemp.c
++++ b/misc/mktemp.c
+@@ -33,4 +33,4 @@
+   return template;
+ }
+ 
+-link_warning (mktemp, "the use of `mktemp' is dangerous, better use `mkstemp'")
++link_warning (mktemp, "the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'")
--- eglibc-2.13.orig/debian/patches/any/submitted-CVE-2014-0475.diff
+++ eglibc-2.13/debian/patches/any/submitted-CVE-2014-0475.diff
@@ -0,0 +1,143 @@
+From: Florian Weimer <fweimer@redhat.com>
+Date: Mon, 12 May 2014 15:24:12 +0200
+Subject: [PATCH 2/3] _nl_find_locale: Improve handling of crafted locale names
+
+Index: eglibc-2.13/locale/findlocale.c
+===================================================================
+--- eglibc-2.13.orig/locale/findlocale.c	2010-01-26 12:27:38.000000000 +0100
++++ eglibc-2.13/locale/findlocale.c	2014-07-08 20:57:26.329498374 +0200
+@@ -18,6 +18,7 @@
+    02111-1307 USA.  */
+ 
+ #include <assert.h>
++#include <errno.h>
+ #include <locale.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -58,6 +59,45 @@
+ 
+ const char _nl_default_locale_path[] attribute_hidden = LOCALEDIR;
+ 
++/* Checks if the name is actually present, that is, not NULL and not
++   empty.  */
++static inline int
++name_present (const char *name)
++{
++  return name != NULL && name[0] != '\0';
++}
++
++/* Checks that the locale name neither extremely long, nor contains a
++   ".." path component (to prevent directory traversal).  */
++static inline int
++valid_locale_name (const char *name)
++{
++  /* Not set.  */
++  size_t namelen = strlen (name);
++  /* Name too long.  The limit is arbitrary and prevents stack overflow
++     issues later.  */
++  if (__glibc_unlikely (namelen > 255))
++    return 0;
++  /* Directory traversal attempt.  */
++  static const char slashdot[4] = {'/', '.', '.', '/'};
++  if (__glibc_unlikely (memmem (name, namelen,
++				slashdot, sizeof (slashdot)) != NULL))
++    return 0;
++  if (namelen == 2 && __glibc_unlikely (name[0] == '.' && name [1] == '.'))
++    return 0;
++  if (namelen >= 3
++      && __glibc_unlikely (((name[0] == '.'
++			     && name[1] == '.'
++			     && name[2] == '/')
++			    || (name[namelen - 3] == '/'
++				&& name[namelen - 2] == '.'
++				&& name[namelen - 1] == '.'))))
++    return 0;
++  /* If there is a slash in the name, it must start with one.  */
++  if (__glibc_unlikely (memchr (name, '/', namelen) != NULL) && name[0] != '/')
++    return 0;
++  return 1;
++}
+ 
+ struct __locale_data *
+ internal_function
+@@ -66,7 +106,7 @@
+ {
+   int mask;
+   /* Name of the locale for this category.  */
+-  char *loc_name;
++  char *loc_name = (char *) *name;
+   const char *language;
+   const char *modifier;
+   const char *territory;
+@@ -74,31 +114,39 @@
+   const char *normalized_codeset;
+   struct loaded_l10nfile *locale_file;
+ 
+-  if ((*name)[0] == '\0')
++  if (loc_name[0] == '\0')
+     {
+       /* The user decides which locale to use by setting environment
+ 	 variables.  */
+-      *name = getenv ("LC_ALL");
+-      if (*name == NULL || (*name)[0] == '\0')
+-	*name = getenv (_nl_category_names.str
++      loc_name = getenv ("LC_ALL");
++      if (!name_present (loc_name))
++	loc_name = getenv (_nl_category_names.str
+ 			+ _nl_category_name_idxs[category]);
+-      if (*name == NULL || (*name)[0] == '\0')
+-	*name = getenv ("LANG");
++      if (!name_present (loc_name))
++	loc_name = getenv ("LANG");
++      if (!name_present (loc_name))
++	loc_name = (char *) _nl_C_name;
+     }
+ 
+-  if (*name == NULL || (*name)[0] == '\0'
+-      || (__builtin_expect (__libc_enable_secure, 0)
+-	  && strchr (*name, '/') != NULL))
+-    *name = (char *) _nl_C_name;
++  /* We used to fall back to the C locale if the name contains a slash
++     character '/', but we now check for directory traversal in
++     valid_locale_name, so this is no longer necessary.  */
+ 
+-  if (__builtin_expect (strcmp (*name, _nl_C_name), 1) == 0
+-      || __builtin_expect (strcmp (*name, _nl_POSIX_name), 1) == 0)
++  if (__builtin_expect (strcmp (loc_name, _nl_C_name), 1) == 0
++      || __builtin_expect (strcmp (loc_name, _nl_POSIX_name), 1) == 0)
+     {
+       /* We need not load anything.  The needed data is contained in
+ 	 the library itself.  */
+       *name = (char *) _nl_C_name;
+       return _nl_C[category];
+     }
++  else if (!valid_locale_name (loc_name))
++    {
++      __set_errno (EINVAL);
++      return NULL;
++    }
++
++  *name = loc_name;
+ 
+   /* We really have to load some data.  First we try the archive,
+      but only if there was no LOCPATH environment variable specified.  */
+--- a/include/string.h
++++ b/include/string.h
+@@ -86,6 +86,7 @@ libc_hidden_proto (__strtok_r)
+ extern char *__strsep_g (char **__stringp, __const char *__delim);
+ libc_hidden_proto (__strsep_g)
+ libc_hidden_proto (strnlen)
++libc_hidden_proto (memmem)
+ 
+ libc_hidden_builtin_proto (memchr)
+ libc_hidden_builtin_proto (memcpy)
+--- a/string/memmem.c
++++ b/string/memmem.c
+@@ -74,5 +74,6 @@ memmem (const void *haystack_start, size_t haystack_len,
+   else
+     return two_way_long_needle (haystack, haystack_len, needle, needle_len);
+ }
++libc_hidden_def (memmem)
+ 
+ #undef LONG_NEEDLE_THRESHOLD
+
--- eglibc-2.13.orig/debian/patches/any/cvs-vfprintf.diff
+++ eglibc-2.13/debian/patches/any/cvs-vfprintf.diff
@@ -0,0 +1,298 @@
+2014-12-15  Jeff Law  <law@redhat.com>
+
+	[BZ #16617]
+	* stdio-common/vfprintf.c (vfprintf): Allocate large specs array
+	on the heap.  (CVE-2012-3406)
+	* stdio-common/bug23-2.c, stdio-common/bug23-3.c: New file.
+	* stdio-common/bug23-4.c: New file.  Test case by Joseph Myers.
+	* stdio-common/Makefile (tests): Add bug23-2, bug23-3, bug23-4.
+
+2013-03-05  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
+	* stdio-common/vfprintf.c (vfprintf): Check malloc return; don't
+	call free(NULL).
+
+--- a/stdio-common/vfprintf.c
++++ b/stdio-common/vfprintf.c
+@@ -251,6 +251,12 @@
+   /* For the argument descriptions, which may be allocated on the heap.  */
+   void *args_malloced = NULL;
+ 
++  /* For positional argument handling.  */
++  struct printf_spec *specs;
++
++  /* Track if we malloced the SPECS array and thus must free it.  */
++  bool specs_malloced = false;
++
+   /* This table maps a character into a number representing a
+      class.  In each step there is a destination label for each
+      class.  */
+@@ -1665,8 +1671,8 @@
+     size_t nspecs = 0;
+     /* A more or less arbitrary start value.  */
+     size_t nspecs_size = 32 * sizeof (struct printf_spec);
+-    struct printf_spec *specs = alloca (nspecs_size);
+ 
++    specs = alloca (nspecs_size);
+     /* The number of arguments the format string requests.  This will
+        determine the size of the array needed to store the argument
+        attributes.  */
+@@ -1684,7 +1690,8 @@
+     /* Just a counter.  */
+     size_t cnt;
+ 
+-    free (workstart);
++    if (__builtin_expect (workstart != NULL, 0))
++      free (workstart);
+     workstart = NULL;
+ 
+     if (! LOCALE_SUPPORT)
+@@ -1708,11 +1715,39 @@
+ 	if (nspecs * sizeof (*specs) >= nspecs_size)
+ 	  {
+ 	    /* Extend the array of format specifiers.  */
++	    if (nspecs_size * 2 < nspecs_size)
++	      {
++		__set_errno (ENOMEM);
++		done = -1;
++		goto all_done;
++	      }
+ 	    struct printf_spec *old = specs;
+-	    specs = extend_alloca (specs, nspecs_size, 2 * nspecs_size);
++	    if (__libc_use_alloca (2 * nspecs_size))
++	      specs = extend_alloca (specs, nspecs_size, 2 * nspecs_size);
++	    else
++	      {
++		nspecs_size *= 2;
++		specs = malloc (nspecs_size);
++		if (specs == NULL)
++		  {
++		    __set_errno (ENOMEM);
++		    specs = old;
++		    done = -1;
++		    goto all_done;
++		  }
++	      }
+ 
+ 	    /* Copy the old array's elements to the new space.  */
+ 	    memmove (specs, old, nspecs * sizeof (*specs));
++
++	    /* If we had previously malloc'd space for SPECS, then
++	       release it after the copy is complete.  */
++	    if (specs_malloced)
++	      free (old);
++
++	    /* Now set SPECS_MALLOCED if needed.  */
++	    if (!__libc_use_alloca (nspecs_size))
++	      specs_malloced = true;
+ 	  }
+ 
+ 	/* Parse the format specifier.  */
+@@ -1939,6 +1974,11 @@
+ 	      {
+ 		workstart = (CHAR_T *) malloc ((MAX (prec, width) + 32)
+ 					       * sizeof (CHAR_T));
++		if (workstart == NULL)
++		  {
++		    done = -1;
++		    goto all_done;
++		  }
+ 		workend = workstart + (MAX (prec, width) + 32);
+ 	      }
+ 	  }
+@@ -2014,7 +2054,8 @@
+ 	    break;
+ 	  }
+ 
+-	free (workstart);
++	if (__builtin_expect (workstart != NULL, 0))
++	  free (workstart);
+ 	workstart = NULL;
+ 
+ 	/* Write the following constant string.  */
+@@ -2025,8 +2066,12 @@
+   }
+ 
+ all_done:
+-  free (args_malloced);
+-  free (workstart);
++  if (specs_malloced)
++    free (specs);
++  if (__builtin_expect (args_malloced != NULL, 0))
++    free (args_malloced);
++  if (__builtin_expect (workstart != NULL, 0))
++    free (workstart);
+   /* Unlock the stream.  */
+   _IO_funlockfile (s);
+   _IO_cleanup_region_end (0);
+--- a/stdio-common/Makefile
++++ b/stdio-common/Makefile
+@@ -68,7 +68,7 @@
+ 	 tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
+ 	 tst-fwrite bug16 bug17 tst-sprintf2 bug18 \
+ 	 bug19 tst-popen2 scanf14 scanf15 bug21 bug22 scanf16 scanf17 \
+-	 tst-setvbuf1
++	 tst-setvbuf1 bug23-2 bug23-3 bug23-4
+ tests-$(OPTION_EGLIBC_LOCALE_CODE) \
+       += tst-sscanf tst-swprintf bug15 test-vfprintf bug14 scanf13 tst-grouping
+ tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \
+--- /dev/null
++++ b/stdio-common/bug23-2.c
+@@ -0,0 +1,70 @@
++#include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
++
++static const char expected[] = "\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55\
++\n\
++a\n\
++abbcd55%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
++
++static int
++do_test (void)
++{
++  char *buf = malloc (strlen (expected) + 1);
++  snprintf (buf, strlen (expected) + 1,
++	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++	    "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++	    "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
++	    "a", "b", "c", "d", 5);
++  return strcmp (buf, expected) != 0;
++}
++
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+--- /dev/null
++++ b/stdio-common/bug23-3.c
+@@ -0,0 +1,50 @@
++#include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
++
++int
++do_test (void)
++{
++  size_t instances = 16384;
++#define X0 "\n%1$s\n" "%1$s" "%2$s" "%2$s" "%3$s" "%4$s" "%5$d" "%5$d"
++  const char *item = "\na\nabbcd55";
++#define X3 X0 X0 X0 X0 X0 X0 X0 X0
++#define X6 X3 X3 X3 X3 X3 X3 X3 X3
++#define X9 X6 X6 X6 X6 X6 X6 X6 X6
++#define X12 X9 X9 X9 X9 X9 X9 X9 X9
++#define X14 X12 X12 X12 X12
++#define TRAILER "%%%%%%%%%%%%%%%%%%%%%%%%%%"
++#define TRAILER2 TRAILER TRAILER
++  size_t length = instances * strlen (item) + strlen (TRAILER) + 1;
++
++  char *buf = malloc (length + 1);
++  snprintf (buf, length + 1,
++	    X14 TRAILER2 "\n",
++	    "a", "b", "c", "d", 5);
++
++  const char *p = buf;
++  size_t i;
++  for (i = 0; i < instances; ++i)
++    {
++      const char *expected;
++      for (expected = item; *expected; ++expected)
++	{
++	  if (*p != *expected)
++	    {
++	      printf ("mismatch at offset %zu (%zu): expected %d, got %d\n",
++		      (size_t) (p - buf), i, *expected & 0xFF, *p & 0xFF);
++	      return 1;
++	    }
++	  ++p;
++	}
++    }
++  if (strcmp (p, TRAILER "\n") != 0)
++    {
++      printf ("mismatch at trailer: [%s]\n", p);
++      return 1;
++    }
++  free (buf);
++  return 0;
++}
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+--- /dev/null
++++ b/stdio-common/bug23-4.c
+@@ -0,0 +1,31 @@
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/resource.h>
++
++#define LIMIT 1000000
++
++int
++main (void)
++{
++  struct rlimit lim;
++  getrlimit (RLIMIT_STACK, &lim);
++  lim.rlim_cur = 1048576;
++  setrlimit (RLIMIT_STACK, &lim);
++  char *fmtstr = malloc (4 * LIMIT + 1);
++  if (fmtstr == NULL)
++    abort ();
++  char *output = malloc (LIMIT + 1);
++  if (output == NULL)
++    abort ();
++  for (size_t i = 0; i < LIMIT; i++)
++    memcpy (fmtstr + 4 * i, "%1$d", 4);
++  fmtstr[4 * LIMIT] = '\0';
++  int ret = snprintf (output, LIMIT + 1, fmtstr, 0);
++  if (ret != LIMIT)
++    abort ();
++  for (size_t i = 0; i < LIMIT; i++)
++    if (output[i] != '0')
++      abort ();
++  return 0;
++}
--- eglibc-2.13.orig/debian/patches/any/cvs-iconvdata-ibm.diff
+++ eglibc-2.13/debian/patches/any/cvs-iconvdata-ibm.diff
@@ -0,0 +1,144 @@
+2014-09-03  Florian Weimer  <fweimer@redhat.com>
+
+	[BZ #17325]
+	* iconvdata/ibm1364.c (BODY): Fix check for sentinel.
+	* iconvdata/ibm932.c (BODY): Replace invalid sentinel check with
+	assert.
+	* iconvdata/ibm933.c (BODY): Fix check for sentinel.
+	* iconvdata/ibm935.c (BODY): Likewise.
+	* iconvdata/ibm937.c (BODY): Likewise.
+	* iconvdata/ibm939.c (BODY): Likewise.
+	* iconvdata/ibm943.c (BODY): Replace invalid sentinel check with
+	assert.
+	* iconvdata/Makefile (iconv-test.out): Pass module list to test
+	script.
+	* iconvdata/run-iconv-test.sh: New test loop for checking for
+	decoder crashers.
+
+--- a/iconvdata/Makefile
++++ b/iconvdata/Makefile
+@@ -379,6 +379,7 @@
+ $(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \
+ 			 $(addprefix $(objpfx),$(modules.so)) \
+ 			 $(common-objdir)/iconv/iconv_prog TESTS
++	iconv_modules="$(modules)" \
+ 	$(SHELL) -e $< $(common-objdir) '$(cross-test-wrapper)' > $@
+ 
+ $(objpfx)tst-tables.out: tst-tables.sh $(objpfx)gconv-modules \
+--- a/iconvdata/ibm1364.c
++++ b/iconvdata/ibm1364.c
+@@ -221,7 +221,8 @@
+ 	  ++rp2;							      \
+ 									      \
+ 	uint32_t res;							      \
+-	if (__builtin_expect (ch < rp2->start, 0)			      \
++	if (__builtin_expect (rp2->start == 0xffff, 0)			      \
++	    || __builtin_expect (ch < rp2->start, 0)			      \
+ 	    || (res = DB_TO_UCS4[ch + rp2->idx],			      \
+ 		__builtin_expect (res, L'\1') == L'\0' && ch != '\0'))	      \
+ 	  {								      \
+--- a/iconvdata/ibm932.c
++++ b/iconvdata/ibm932.c
+@@ -74,11 +74,12 @@
+ 	  }								      \
+ 									      \
+ 	ch = (ch * 0x100) + inptr[1];					      \
++	/* ch was less than 0xfd.  */					      \
++	assert (ch < 0xfd00);						      \
+ 	while (ch > rp2->end)						      \
+ 	  ++rp2;							      \
+ 									      \
+-	if (__builtin_expect (rp2 == NULL, 0)				      \
+-	    || __builtin_expect (ch < rp2->start, 0)			      \
++	if (__builtin_expect (ch < rp2->start, 0)			      \
+ 	    || (res = __ibm932db_to_ucs4[ch + rp2->idx],		      \
+ 	    __builtin_expect (res, '\1') == 0 && ch !=0))		      \
+ 	  {								      \
+--- a/iconvdata/ibm933.c
++++ b/iconvdata/ibm933.c
+@@ -162,7 +162,7 @@
+ 	while (ch > rp2->end)						      \
+ 	  ++rp2;							      \
+ 									      \
+-	if (__builtin_expect (rp2 == NULL, 0)				      \
++	if (__builtin_expect (rp2->start == 0xffff, 0)			      \
+ 	    || __builtin_expect (ch < rp2->start, 0)			      \
+ 	    || (res = __ibm933db_to_ucs4[ch + rp2->idx],		      \
+ 		__builtin_expect (res, L'\1') == L'\0' && ch != '\0'))	      \
+--- a/iconvdata/ibm935.c
++++ b/iconvdata/ibm935.c
+@@ -162,7 +162,7 @@
+ 	while (ch > rp2->end)						      \
+ 	  ++rp2;							      \
+ 									      \
+-	if (__builtin_expect (rp2 == NULL, 0)				      \
++	if (__builtin_expect (rp2->start == 0xffff, 0)			      \
+ 	    || __builtin_expect (ch < rp2->start, 0)			      \
+ 	    || (res = __ibm935db_to_ucs4[ch + rp2->idx],		      \
+ 		__builtin_expect (res, L'\1') == L'\0' && ch != '\0'))	      \
+--- a/iconvdata/ibm937.c
++++ b/iconvdata/ibm937.c
+@@ -162,7 +162,7 @@
+ 	while (ch > rp2->end)						      \
+ 	  ++rp2;							      \
+ 									      \
+-	if (__builtin_expect (rp2 == NULL, 0)				      \
++	if (__builtin_expect (rp2->start == 0xffff, 0)			      \
+ 	    || __builtin_expect (ch < rp2->start, 0)			      \
+ 	    || (res = __ibm937db_to_ucs4[ch + rp2->idx],		      \
+ 		__builtin_expect (res, L'\1') == L'\0' && ch != '\0'))	      \
+--- a/iconvdata/ibm939.c
++++ b/iconvdata/ibm939.c
+@@ -162,7 +162,7 @@
+ 	while (ch > rp2->end)						      \
+ 	  ++rp2;							      \
+ 									      \
+-	if (__builtin_expect (rp2 == NULL, 0)				      \
++	if (__builtin_expect (rp2->start == 0xffff, 0)			      \
+ 	    || __builtin_expect (ch < rp2->start, 0)			      \
+ 	    || (res = __ibm939db_to_ucs4[ch + rp2->idx],		      \
+ 		__builtin_expect (res, L'\1') == L'\0' && ch != '\0'))	      \
+--- a/iconvdata/ibm943.c
++++ b/iconvdata/ibm943.c
+@@ -75,11 +75,12 @@
+ 	  }								      \
+ 									      \
+ 	ch = (ch * 0x100) + inptr[1];					      \
++	/* ch was less than 0xfd.  */					      \
++	assert (ch < 0xfd00);						      \
+ 	while (ch > rp2->end)						      \
+ 	  ++rp2;							      \
+ 									      \
+-	if (__builtin_expect (rp2 == NULL, 0)				      \
+-	    || __builtin_expect (ch < rp2->start, 0)			      \
++	if (__builtin_expect (ch < rp2->start, 0)			      \
+ 	    || (res = __ibm943db_to_ucs4[ch + rp2->idx],		      \
+ 	    __builtin_expect (res, '\1') == 0 && ch !=0))		      \
+ 	  {								      \
+--- a/iconvdata/run-iconv-test.sh
++++ b/iconvdata/run-iconv-test.sh
+@@ -201,6 +201,24 @@
+ done
+ exec 5<&-
+ 
++# Check for crashes in decoders.
++printf '\016\377\377\377\377\377\377\377' > $temp1
++for from in $iconv_modules ; do
++    echo $ac_n "test decoder $from $ac_c"
++    PROG=`eval echo $ICONV`
++    if $PROG < $temp1 >/dev/null 2>&1 ; then
++	: # fall through
++    else
++	status=$?
++	if test $status -gt 1 ; then
++	    echo "/FAILED"
++	    failed=1
++	    continue
++	fi
++    fi
++    echo "OK"
++done
++
+ exit $failed
+ # Local Variables:
+ #  mode:shell-script
--- eglibc-2.13.orig/debian/patches/any/local-getaddrinfo-interface.diff
+++ eglibc-2.13/debian/patches/any/local-getaddrinfo-interface.diff
@@ -0,0 +1,27 @@
+2009-04-26  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/posix/getaddrinfo.c (rfc3484_sort): don't assign native
+	result if the result has no associated interface.
+
+---
+ sysdeps/posix/getaddrinfo.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -1456,13 +1456,13 @@
+ 
+ 	      /* Fill in the results in all the records.  */
+ 	      for (int i = 0; i < src->nresults; ++i)
+-		if (src->results[i].index == a1_index)
++		if (a1_index != -1 && src->results[i].index == a1_index)
+ 		  {
+ 		    assert (src->results[i].native == -1
+ 			    || src->results[i].native == a1_native);
+ 		    src->results[i].native = a1_native;
+ 		  }
+-		else if (src->results[i].index == a2_index)
++		else if (a2_index != -1 && src->results[i].index == a2_index)
+ 		  {
+ 		    assert (src->results[i].native == -1
+ 			    || src->results[i].native == a2_native);
--- eglibc-2.13.orig/debian/patches/any/submitted-resolv-init.diff
+++ eglibc-2.13/debian/patches/any/submitted-resolv-init.diff
@@ -0,0 +1,20 @@
+2011-07-26  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* res_send.c(__libc_res_nsend): Correctly copy the nameserver
+	address.
+
+---
+ resolv/res_send.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/resolv/res_send.c
++++ b/resolv/res_send.c
+@@ -441,7 +441,7 @@
+ 				    malloc(sizeof (struct sockaddr_in6));
+ 			if (EXT(statp).nsaddrs[n] != NULL) {
+ 				memset (mempcpy(EXT(statp).nsaddrs[n],
+-						&statp->nsaddr_list[n],
++						&statp->nsaddr_list[ns],
+ 						sizeof (struct sockaddr_in)),
+ 					'\0',
+ 					sizeof (struct sockaddr_in6)
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-defines.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-defines.diff
@@ -0,0 +1,22 @@
+
+  linuxthreads still uses these defines
+  apply only for glibc 2.6 and above
+
+---
+ config.make.in |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/config.make.in
++++ b/config.make.in
+@@ -44,6 +44,11 @@
+ all-warnings = @all_warnings@
+ 
+ elf = @elf@
++have-protected = yes
++have-z-nodelete = yes
++have-z-nodlopen = yes
++have-z-initfirst = yes
++have-z-relro = yes
+ have-z-combreloc = @libc_cv_z_combreloc@
+ have-z-execstack = @libc_cv_z_execstack@
+ have-initfini = @libc_cv_have_initfini@
--- eglibc-2.13.orig/debian/patches/any/cvs-gethostbyname.diff
+++ eglibc-2.13/debian/patches/any/cvs-gethostbyname.diff
@@ -0,0 +1,222 @@
+2013-05-21  Andreas Schwab  <schwab@suse.de>
+
+	[BZ #15014]
+	* nss/getXXbyYY_r.c (INTERNAL (REENTRANT_NAME))
+	[HANDLE_DIGITS_DOTS]: Set any_service when digits-dots parsing was
+	successful.
+	* nss/digits_dots.c (__nss_hostname_digits_dots): Remove
+	redundant variable declarations and reallocation of buffer when
+	parsing as IPv6 address.  Always set NSS status when called from
+	reentrant functions.  Use NETDB_INTERNAL instead of TRY_AGAIN when
+	buffer too small.  Correct computation of needed size.
+	* nss/Makefile (tests): Add test-digits-dots.
+	* nss/test-digits-dots.c: New test.
+
+--- a/nss/Makefile
++++ b/nss/Makefile
+@@ -47,7 +47,7 @@
+ others                  := getent
+ install-bin             := getent
+ 
+-tests			= tst-nss-test1
++tests			= tst-nss-test1 test-digits-dots
+ tests-$(OPTION_EGLIBC_INET) += test-netdb
+ xtests-$(OPTION_EGLIBC_INET) += bug-erange
+ 
+--- a/nss/digits_dots.c
++++ b/nss/digits_dots.c
+@@ -47,7 +47,10 @@
+     {
+       if (h_errnop)
+ 	*h_errnop = NETDB_INTERNAL;
+-      *result = NULL;
++      if (buffer_size == NULL)
++	*status = NSS_STATUS_TRYAGAIN;
++      else
++	*result = NULL;
+       return -1;
+     }
+ 
+@@ -84,14 +87,16 @@
+ 	}
+ 
+       size_needed = (sizeof (*host_addr)
+-		     + sizeof (*h_addr_ptrs) + strlen (name) + 1);
++		     + sizeof (*h_addr_ptrs)
++		     + sizeof (*h_alias_ptr) + strlen (name) + 1);
+ 
+       if (buffer_size == NULL)
+         {
+ 	  if (buflen < size_needed)
+ 	    {
++	      *status = NSS_STATUS_TRYAGAIN;
+ 	      if (h_errnop != NULL)
+-		*h_errnop = TRY_AGAIN;
++		*h_errnop = NETDB_INTERNAL;
+ 	      __set_errno (ERANGE);
+ 	      goto done;
+ 	    }
+@@ -110,7 +115,7 @@
+ 	      *buffer_size = 0;
+ 	      __set_errno (save);
+ 	      if (h_errnop != NULL)
+-		*h_errnop = TRY_AGAIN;
++		*h_errnop = NETDB_INTERNAL;
+ 	      *result = NULL;
+ 	      goto done;
+ 	    }
+@@ -150,7 +155,9 @@
+ 		  if (! ok)
+ 		    {
+ 		      *h_errnop = HOST_NOT_FOUND;
+-		      if (buffer_size)
++		      if (buffer_size == NULL)
++			*status = NSS_STATUS_NOTFOUND;
++		      else
+ 			*result = NULL;
+ 		      goto done;
+ 		    }
+@@ -191,7 +198,7 @@
+ 		  if (buffer_size == NULL)
+ 		    *status = NSS_STATUS_SUCCESS;
+ 		  else
+-		   *result = resbuf;
++		    *result = resbuf;
+ 		  goto done;
+ 		}
+ 
+@@ -202,15 +209,6 @@
+ 
+       if ((isxdigit (name[0]) && strchr (name, ':') != NULL) || name[0] == ':')
+ 	{
+-	  const char *cp;
+-	  char *hostname;
+-	  typedef unsigned char host_addr_t[16];
+-	  host_addr_t *host_addr;
+-	  typedef char *host_addr_list_t[2];
+-	  host_addr_list_t *h_addr_ptrs;
+-	  size_t size_needed;
+-	  int addr_size;
+-
+ 	  switch (af)
+ 	    {
+ 	    default:
+@@ -226,7 +224,10 @@
+ 	      /* This is not possible.  We cannot represent an IPv6 address
+ 		 in an `struct in_addr' variable.  */
+ 	      *h_errnop = HOST_NOT_FOUND;
+-	      *result = NULL;
++	      if (buffer_size == NULL)
++		*status = NSS_STATUS_NOTFOUND;
++	      else
++		*result = NULL;
+ 	      goto done;
+ 
+ 	    case AF_INET6:
+@@ -234,42 +235,6 @@
+ 	      break;
+ 	    }
+ 
+-	  size_needed = (sizeof (*host_addr)
+-			 + sizeof (*h_addr_ptrs) + strlen (name) + 1);
+-
+-	  if (buffer_size == NULL && buflen < size_needed)
+-	    {
+-	      if (h_errnop != NULL)
+-		*h_errnop = TRY_AGAIN;
+-	      __set_errno (ERANGE);
+-	      goto done;
+-	    }
+-	  else if (buffer_size != NULL && *buffer_size < size_needed)
+-	    {
+-	      char *new_buf;
+-	      *buffer_size = size_needed;
+-	      new_buf = realloc (*buffer, *buffer_size);
+-
+-	      if (new_buf == NULL)
+-		{
+-		  save = errno;
+-		  free (*buffer);
+-		  __set_errno (save);
+-		  *buffer = NULL;
+-		  *buffer_size = 0;
+-		  *result = NULL;
+-		  goto done;
+-		}
+-	      *buffer = new_buf;
+-	    }
+-
+-	  memset (*buffer, '\0', size_needed);
+-
+-	  host_addr = (host_addr_t *) *buffer;
+-	  h_addr_ptrs = (host_addr_list_t *)
+-	    ((char *) host_addr + sizeof (*host_addr));
+-	  hostname = (char *) h_addr_ptrs + sizeof (*h_addr_ptrs);
+-
+ 	  for (cp = name;; ++cp)
+ 	    {
+ 	      if (!*cp)
+@@ -282,7 +247,9 @@
+ 		  if (inet_pton (AF_INET6, name, host_addr) <= 0)
+ 		    {
+ 		      *h_errnop = HOST_NOT_FOUND;
+-		      if (buffer_size)
++		      if (buffer_size == NULL)
++			*status = NSS_STATUS_NOTFOUND;
++		      else
+ 			*result = NULL;
+ 		      goto done;
+ 		    }
+--- a/nss/getXXbyYY_r.c
++++ b/nss/getXXbyYY_r.c
+@@ -180,6 +180,9 @@
+     case -1:
+       return errno;
+     case 1:
++#ifdef NEED_H_ERRNO
++      any_service = true;
++#endif
+       goto done;
+     }
+ #endif
+--- /dev/null
++++ b/nss/test-digits-dots.c
+@@ -0,0 +1,38 @@
++/* Copyright (C) 2013 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, see
++   <http://www.gnu.org/licenses/>.  */
++
++/* Testcase for BZ #15014 */
++
++#include <stdlib.h>
++#include <netdb.h>
++#include <errno.h>
++
++static int
++do_test (void)
++{
++  char buf[32];
++  struct hostent *result = NULL;
++  struct hostent ret;
++  int h_err = 0;
++  int err;
++
++  err = gethostbyname_r ("1.2.3.4", &ret, buf, sizeof (buf), &result, &h_err);
++  return err == ERANGE && h_err == NETDB_INTERNAL ? EXIT_SUCCESS : EXIT_FAILURE;
++}
++
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
--- eglibc-2.13.orig/debian/patches/any/submitted-string2-strcmp.diff
+++ eglibc-2.13/debian/patches/any/submitted-string2-strcmp.diff
@@ -0,0 +1,32 @@
+2010-06-07  Aurelien Jarno  <aurelien@aurel32.net>
+
+        * string/bits/string2.h (strcmp): Use __builtin_strlen instead of
+	strlen for values known at compile-time.
+
+---
+ string/bits/string2.h |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/string/bits/string2.h
++++ b/string/bits/string2.h
+@@ -801,17 +801,17 @@
+   __extension__								      \
+   ({ size_t __s1_len, __s2_len;						      \
+      (__builtin_constant_p (s1) && __builtin_constant_p (s2)		      \
+-      && (__s1_len = strlen (s1), __s2_len = strlen (s2),		      \
++      && (__s1_len = __builtin_strlen (s1), __s2_len = __builtin_strlen (s2), \
+ 	  (!__string2_1bptr_p (s1) || __s1_len >= 4)			      \
+ 	  && (!__string2_1bptr_p (s2) || __s2_len >= 4))		      \
+       ? __builtin_strcmp (s1, s2)					      \
+       : (__builtin_constant_p (s1) && __string2_1bptr_p (s1)		      \
+-	 && (__s1_len = strlen (s1), __s1_len < 4)			      \
++	 && (__s1_len = __builtin_strlen (s1), __s1_len < 4)		      \
+ 	 ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2)		      \
+ 	    ? __builtin_strcmp (s1, s2)					      \
+ 	    : __strcmp_cg (s1, s2, __s1_len))				      \
+ 	 : (__builtin_constant_p (s2) && __string2_1bptr_p (s2)		      \
+-	    && (__s2_len = strlen (s2), __s2_len < 4)			      \
++	    && (__s2_len = __builtin_strlen (s2), __s2_len < 4)		      \
+ 	    ? (__builtin_constant_p (s1) && __string2_1bptr_p (s1)	      \
+ 	       ? __builtin_strcmp (s1, s2)				      \
+ 	       : __strcmp_gc (s1, s2, __s2_len))			      \
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-weak.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-weak.diff
@@ -0,0 +1,49 @@
+---
+ linuxthreads/sysdeps/pthread/bits/libc-lock.h |   11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/linuxthreads/sysdeps/pthread/bits/libc-lock.h
++++ b/linuxthreads/sysdeps/pthread/bits/libc-lock.h
+@@ -25,6 +25,10 @@
+ 
+ #if defined _LIBC && !defined NOT_IN_libc
+ #include <linuxthreads/internals.h>
++#else
++/* This function is called to initialize the pthread library.  */
++/* We need a prototype before it is bellow marked as weak */
++extern void __pthread_initialize (void);
+ #endif
+ 
+ /* Mutex type.  */
+@@ -158,6 +162,9 @@
+ #define __rtld_lock_init_recursive(NAME) \
+   __libc_lock_init_recursive (NAME)
+ 
++#define __rtld_lock_initialize(NAME) \
++ (void) ((NAME) = (__rtld_lock_recursive_t) _RTLD_LOCK_RECURSIVE_INITIALIZER)
++
+ /* Finalize the named lock variable, which must be locked.  It cannot be
+    used again until __libc_lock_init is called again on it.  This must be
+    called on a lock variable before the containing storage is reused.  */
+@@ -379,8 +386,10 @@
+ weak_extern (__pthread_atfork)
+ weak_extern (BP_SYM (_pthread_cleanup_push))
+ weak_extern (BP_SYM (_pthread_cleanup_pop))
++#ifdef __USE_GNU
+ weak_extern (BP_SYM (_pthread_cleanup_push_defer))
+ weak_extern (BP_SYM (_pthread_cleanup_pop_restore))
++#endif
+ # else
+ #  pragma weak __pthread_mutex_init
+ #  pragma weak __pthread_mutex_destroy
+@@ -402,8 +411,10 @@
+ #  pragma weak __pthread_once
+ #  pragma weak __pthread_initialize
+ #  pragma weak __pthread_atfork
++#ifdef __USE_GNU
+ #  pragma weak _pthread_cleanup_push_defer
+ #  pragma weak _pthread_cleanup_pop_restore
++#endif
+ #  pragma weak _pthread_cleanup_push
+ #  pragma weak _pthread_cleanup_pop
+ # endif
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-stacksize.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-stacksize.diff
@@ -0,0 +1,15 @@
+---
+ linuxthreads/pthread.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/linuxthreads/pthread.c
++++ b/linuxthreads/pthread.c
+@@ -429,6 +429,8 @@
+ #ifdef FLOATING_STACKS
+   if (limit.rlim_cur == RLIM_INFINITY)
+     limit.rlim_cur = ARCH_STACK_MAX_SIZE;
++  if (limit.rlim_cur > 4 * ARCH_STACK_MAX_SIZE)
++    limit.rlim_cur = 4 * ARCH_STACK_MAX_SIZE;
+ # ifdef NEED_SEPARATE_REGISTER_STACK
+   max_stack = limit.rlim_cur / 2;
+ # else
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-kill_other.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-kill_other.diff
@@ -0,0 +1,35 @@
+
+
+  fixes ruby 1.9 testsuite failure t916 from #542927
+
+
+---
+ linuxthreads/pthread.c |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/linuxthreads/pthread.c
++++ b/linuxthreads/pthread.c
+@@ -1222,6 +1222,15 @@
+   /* Reset the signal handlers behaviour for the signals the
+      implementation uses since this would be passed to the new
+      process.  */
++#if 1
++  /* 
++  do not do it as it is wrong.
++  the __pthread_kill_other_threads_np() is used just before exec,
++  the successfull one resets signals with handler into DFL behaviour anyway (in kernel),
++  the failed one needs the signal handler as before to allow creating of new threads
++  as already noted above
++  */
++#else     
+   sigemptyset(&sa.sa_mask);
+   sa.sa_flags = 0;
+   sa.sa_handler = SIG_DFL;
+@@ -1229,6 +1238,7 @@
+   __libc_sigaction(__pthread_sig_cancel, &sa, NULL);
+   if (__pthread_sig_debug > 0)
+     __libc_sigaction(__pthread_sig_debug, &sa, NULL);
++#endif    
+ }
+ weak_alias (__pthread_kill_other_threads_np, pthread_kill_other_threads_np)
+ 
--- eglibc-2.13.orig/debian/patches/any/cvs-reloc-sort.diff
+++ eglibc-2.13/debian/patches/any/cvs-reloc-sort.diff
@@ -0,0 +1,153 @@
+2012-01-27  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #13618]
+	* elf/dl-open.c (dl_open_worker): Sort objects by dependency before
+	relocation.
+
+---
+ elf/dl-open.c |  126 +++++++++++++++++++++++++++++++++++++++++++---------------
+ 1 file changed, 95 insertions(+), 31 deletions(-)
+
+--- a/elf/dl-open.c
++++ b/elf/dl-open.c
+@@ -303,45 +303,109 @@
+   if (GLRO(dl_lazy))
+     reloc_mode |= mode & RTLD_LAZY;
+ 
+-  /* Relocate the objects loaded.  We do this in reverse order so that copy
+-     relocs of earlier objects overwrite the data written by later objects.  */
+-
++  /* Sort the objects by dependency for the relocation process.  This
++     allows IFUNC relocations to work and it also means copy
++     relocation of dependencies are if necessary overwritten.  */
++  size_t nmaps = 0;
+   struct link_map *l = new;
+-  while (l->l_next)
+-    l = l->l_next;
+-  while (1)
++  do
++    {
++      if (! l->l_real->l_relocated)
++	++nmaps;
++      l = l->l_next;
++    }
++  while (l != NULL);
++  struct link_map *maps[nmaps];
++  nmaps = 0;
++  l = new;
++  do
+     {
+       if (! l->l_real->l_relocated)
++	maps[nmaps++] = l;
++      l = l->l_next;
++    }
++  while (l != NULL);
++  if (nmaps > 1)
++    {
++      char seen[nmaps];
++      memset (seen, '\0', nmaps);
++      size_t i = 0;
++      while (1)
+ 	{
+-#ifdef SHARED
+-	  if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
++	  ++seen[i];
++	  struct link_map *thisp = maps[i];
++
++	  /* Find the last object in the list for which the current one is
++	     a dependency and move the current object behind the object
++	     with the dependency.  */
++	  size_t k = nmaps - 1;
++	  while (k > i)
+ 	    {
+-	      /* If this here is the shared object which we want to profile
+-		 make sure the profile is started.  We can find out whether
+-		 this is necessary or not by observing the `_dl_profile_map'
+-		 variable.  If was NULL but is not NULL afterwars we must
+-		 start the profiling.  */
+-	      struct link_map *old_profile_map = GL(dl_profile_map);
+-
+-	      _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
+-
+-	      if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
+-		{
+-		  /* We must prepare the profiling.  */
+-		  _dl_start_profile ();
+-
+-		  /* Prevent unloading the object.  */
+-		  GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
+-		}
++	      struct link_map **runp = maps[k]->l_initfini;
++	      if (runp != NULL)
++		/* Look through the dependencies of the object.  */
++		while (*runp != NULL)
++		  if (__builtin_expect (*runp++ == thisp, 0))
++		    {
++		      /* Move the current object to the back past the last
++			 object with it as the dependency.  */
++		      memmove (&maps[i], &maps[i + 1],
++			       (k - i) * sizeof (maps[0]));
++		      maps[k] = thisp;
++
++		      if (seen[i + 1] > 1)
++			{
++			  ++i;
++			  goto next_clear;
++			}
++
++		      char this_seen = seen[i];
++		      memmove (&seen[i], &seen[i + 1],
++			       (k - i) * sizeof (seen[0]));
++		      seen[k] = this_seen;
++
++		      goto next;
++		    }
++
++	      --k;
+ 	    }
+-	  else
+-#endif
+-	    _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
++
++	  if (++i == nmaps)
++	    break;
++	next_clear:
++	  memset (&seen[i], 0, (nmaps - i) * sizeof (seen[0]));
++	next:;
+ 	}
++    }
++
++  for (size_t i = nmaps; i-- > 0; )
++    {
++      l = maps[i];
++
++#ifdef SHARED
++      if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
++	{
++	  /* If this here is the shared object which we want to profile
++	     make sure the profile is started.  We can find out whether
++	     this is necessary or not by observing the `_dl_profile_map'
++	     variable.  If it was NULL but is not NULL afterwars we must
++	     start the profiling.  */
++	  struct link_map *old_profile_map = GL(dl_profile_map);
+ 
+-      if (l == new)
+-	break;
+-      l = l->l_prev;
++	  _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
++
++	  if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
++	    {
++	      /* We must prepare the profiling.  */
++	      _dl_start_profile ();
++
++	      /* Prevent unloading the object.  */
++	      GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
++	    }
++	}
++      else
++#endif
++	_dl_relocate_object (l, l->l_scope, reloc_mode, 0);
+     }
+ 
+   /* If the file is not loaded now as a dependency, add the search
--- eglibc-2.13.orig/debian/patches/any/cvs-iconvdata-ibm930.diff
+++ eglibc-2.13/debian/patches/any/cvs-iconvdata-ibm930.diff
@@ -0,0 +1,26 @@
+2012-06-06  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+	[BZ #14134]
+	* iconvdata/ibm930.c (BODY) [FROM_LOOP]: Check for invalid
+	character 0xffff that matches the last element of the
+	conversion table.
+
+--- a/iconvdata/ibm930.c
++++ b/iconvdata/ibm930.c
+@@ -1,5 +1,5 @@
+ /* Conversion from and to IBM930.
+-   Copyright (C) 2000-2002, 2008 Free Software Foundation, Inc.
++   Copyright (C) 2000-2012 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+    Contributed by Masahide Washizawa <washi@yamato.ibm.co.jp>, 2000.
+ 
+@@ -162,7 +162,8 @@ enum
+ 	while (ch > rp2->end)						      \
+ 	  ++rp2;							      \
+ 									      \
+-	if (__builtin_expect (ch < rp2->start, 0)			      \
++	if (__builtin_expect (rp2->start == 0xffff, 0)			      \
++	    || __builtin_expect (ch < rp2->start, 0)			      \
+ 	    || (res = __ibm930db_to_ucs4[ch + rp2->idx],		      \
+ 		__builtin_expect (res, L'\1') == L'\0' && ch != '\0'))	      \
+ 	  {								      \
--- eglibc-2.13.orig/debian/patches/any/cvs-unique_sym_table-corruptions.diff
+++ eglibc-2.13/debian/patches/any/cvs-unique_sym_table-corruptions.diff
@@ -0,0 +1,83 @@
+2011-05-12  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #12511]
+	* elf/dl-lookup.c (enter): Don't test for copy relocation here and
+	don't set DF_1_NODELETE here.
+	(do_lookup_x): When entering new entry test for copy relocation
+	and if necessary set DF_1_NODELETE flag.
+
+---
+ elf/dl-lookup.c |   47 ++++++++++++++++++++---------------------------
+ 1 file changed, 20 insertions(+), 27 deletions(-)
+
+--- a/elf/dl-lookup.c
++++ b/elf/dl-lookup.c
+@@ -313,39 +313,21 @@
+ 		 definition we have to use it.  */
+ 	      void enter (struct unique_sym *table, size_t size,
+ 			  unsigned int hash, const char *name,
+-			  const ElfW(Sym) *sym, struct link_map *map)
++			  const ElfW(Sym) *sym, const struct link_map *map)
+ 	      {
+ 		size_t idx = hash % size;
+ 		size_t hash2 = 1 + hash % (size - 2);
+-		while (1)
++		while (table[idx].name != NULL)
+ 		  {
+-		    if (table[idx].name == NULL)
+-		      {
+-			table[idx].hashval = hash;
+-			table[idx].name = name;
+-			if ((type_class & ELF_RTYPE_CLASS_COPY) != 0)
+-			  {
+-			    table[idx].sym = ref;
+-			    table[idx].map = undef_map;
+-			  }
+-			else
+-			  {
+-			    table[idx].sym = sym;
+-			    table[idx].map = map;
+-
+-			    if (map->l_type == lt_loaded)
+-			      /* Make sure we don't unload this object by
+-				 setting the appropriate flag.  */
+-			      map->l_flags_1 |= DF_1_NODELETE;
+-			  }
+-
+-			return;
+-		      }
+-
+ 		    idx += hash2;
+ 		    if (idx >= size)
+ 		      idx -= size;
+ 		  }
++
++		table[idx].hashval = hash;
++		table[idx].name = name;
++		table[idx].sym = sym;
++		table[idx].map = map;
+ 	      }
+ 
+ 	      struct unique_sym_table *tab
+@@ -440,8 +422,19 @@
+ 		  tab->free = free;
+ 		}
+ 
+-	      enter (entries, size, new_hash, strtab + sym->st_name, sym,
+-		     (struct link_map *) map);
++	      if ((type_class & ELF_RTYPE_CLASS_COPY) != 0)
++		enter (entries, size, new_hash, strtab + sym->st_name, ref,
++		       undef_map);
++	      else
++		{
++		  enter (entries, size, new_hash, strtab + sym->st_name, sym,
++			 map);
++
++		  if (map->l_type == lt_loaded)
++		    /* Make sure we don't unload this object by
++		       setting the appropriate flag.  */
++		    ((struct link_map *) map)->l_flags_1 |= DF_1_NODELETE;
++		}
+ 	      ++tab->n_elements;
+ 
+ 	      __rtld_lock_unlock_recursive (tab->lock);
--- eglibc-2.13.orig/debian/patches/any/local-ldconfig.diff
+++ eglibc-2.13/debian/patches/any/local-ldconfig.diff
@@ -0,0 +1,70 @@
+# DP: Make it so that a missing /etc/ld.so.conf does not cause an error
+# DP: message, unless --verbose is enabled. This keeps the debian
+# DP: installer from barfing during bootstrap of the system.
+# DP:
+# DP: Updated by gotom, the previous one seems being wrong because it supresses
+# DP: _all_ warnings about "can't open configuration file". otoh, I introduce
+# DP: newer patches.  it should be checked using chroot and should be contacted
+# DP: to the upstream.
+# DP: Date: (Updated 2005-01-02 gotom)
+
+# previous patch.
+#--- elf/ldconfig.c	2003-07-08 23:26:27.000000000 +0900
+#+++ elf/ldconfig.c.debian	2003-07-08 23:29:43.000000000 +0900
+#@@ -920,26 +920,24 @@
+# {
+#   FILE *file = NULL;
+#   char *line = NULL;
+#-  const char *canon;
+#+  const char *canon = filename;
+#   size_t len = 0;
+#+  int file_fd;
+# 
+#   if (opt_chroot)
+#     {
+#       canon = chroot_canon (opt_chroot, filename);
+#-      if (canon)
+#-	file = fopen (canon, "r");
+#-      else
+#+      if (!canon)
+# 	canon = filename;
+#     }
+#-  else
+#-    {
+#-      canon = filename;
+#-      file = fopen (filename, "r");
+#-    }
+#+
+#+  if ((file_fd = open(canon, O_RDONLY | O_EXCL, 0022)) != -1)
+#+    file = fdopen (file_fd, "r");
+# 
+#   if (file == NULL)
+#     {
+#-      error (0, errno, _("Can't open configuration file %s"), canon);
+#+      if (opt_verbose)
+#+	error (0, errno, _("Can't open configuration file %s"), canon);
+#       if (canon != filename)
+# 	free ((char *) canon);
+#       return;
+
+2004-10-25  GOTO Masanori  <gotom@debian.or.jp>
+
+        * elf/ldconfig.c: Don't print error when default ld.so.conf
+          is not existed.
+
+---
+ elf/ldconfig.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/elf/ldconfig.c
++++ b/elf/ldconfig.c
+@@ -1066,7 +1066,8 @@
+ 
+   if (file == NULL)
+     {
+-      error (0, errno, _("Can't open configuration file %s"), canon);
++      if (strcmp(canon, LD_SO_CONF) != 0 || opt_verbose)
++	error (0, errno, _("Can't open configuration file %s"), canon);
+       if (canon != filename)
+ 	free ((char *) canon);
+       return;
--- eglibc-2.13.orig/debian/patches/any/cvs-CVE-2013-0242.diff
+++ eglibc-2.13/debian/patches/any/cvs-CVE-2013-0242.diff
@@ -0,0 +1,139 @@
+2013-02-12  Andreas Schwab  <schwab@suse.de>
+ 
+	[BZ #15078]
+	* posix/regexec.c (extend_buffers): Add parameter min_len.
+	(check_matching): Pass minimum needed length.
+	(clean_state_log_if_needed): Likewise.
+	(get_subexp): Likewise.
+	* posix/Makefile (tests): Add bug-regex34.
+	(bug-regex34-ENV): Define.
+	* posix/bug-regex34.c: New file.
+
+--- a/posix/bug-regex34.c
++++ b/posix/bug-regex34.c
+@@ -0,0 +1,46 @@
++/* Test re_search with multi-byte characters in UTF-8.
++   Copyright (C) 2013 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, see
++   <http://www.gnu.org/licenses/>.  */
++
++#define _GNU_SOURCE 1
++#include <stdio.h>
++#include <string.h>
++#include <locale.h>
++#include <regex.h>
++
++static int
++do_test (void)
++{
++  struct re_pattern_buffer r;
++  /* ကျွန်ုပ်x */
++  const char *s = "\xe1\x80\x80\xe1\x80\xbb\xe1\x80\xbd\xe1\x80\x94\xe1\x80\xba\xe1\x80\xaf\xe1\x80\x95\xe1\x80\xbax";
++
++  if (setlocale (LC_ALL, "en_US.UTF-8") == NULL)
++    {
++      puts ("setlocale failed");
++      return 1;
++    }
++  memset (&r, 0, sizeof (r));
++
++  re_compile_pattern ("[^x]x", 5, &r);
++  /* This was triggering a buffer overflow.  */
++  re_search (&r, s, strlen (s), 0, strlen (s), 0);
++  return 0;
++}
++
++#define TEST_FUNCTION do_test ()
++#include "../test-skeleton.c"
+--- a/posix/Makefile
++++ b/posix/Makefile
+@@ -105,7 +105,7 @@
+ 		   tst-execvp3 tst-execvp4 \
+ 		   tst-fnmatch2 tst-cpucount tst-cpuset \
+ 		   bug-getopt1 bug-getopt2 bug-getopt3 bug-getopt4 \
+-		   bug-getopt5
++		   bug-getopt5 bug-regex34
+ tests-$(OPTION_EGLIBC_LOCALE_CODE)					    \
+ 		+= tst-fnmatch tst-regexloc bug-regex1 bug-regex5 \
+ 		   bug-regex23 bug-regex25
+@@ -240,6 +240,7 @@
+ bug-regex25-ENV = LOCPATH=$(common-objpfx)localedata
+ bug-regex26-ENV = LOCPATH=$(common-objpfx)localedata
+ bug-regex30-ENV = LOCPATH=$(common-objpfx)localedata
++bug-regex34-ENV = LOCPATH=$(common-objpfx)localedata
+ tst-rxspencer-ARGS = rxspencer/tests
+ ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
+ tst-rxspencer-ARGS += --utf8 
+--- a/posix/regexec.c
++++ b/posix/regexec.c
+@@ -200,7 +200,7 @@
+ static int check_node_accept (const re_match_context_t *mctx,
+ 			      const re_token_t *node, int idx)
+      internal_function;
+-static reg_errcode_t extend_buffers (re_match_context_t *mctx)
++static reg_errcode_t extend_buffers (re_match_context_t *mctx, int min_len)
+      internal_function;
+ 
+ /* Entry point for POSIX code.  */
+@@ -1147,7 +1147,7 @@
+ 	  || (BE (next_char_idx >= mctx->input.valid_len, 0)
+ 	      && mctx->input.valid_len < mctx->input.len))
+ 	{
+-	  err = extend_buffers (mctx);
++	  err = extend_buffers (mctx, next_char_idx + 1);
+ 	  if (BE (err != REG_NOERROR, 0))
+ 	    {
+ 	      assert (err == REG_ESPACE);
+@@ -1725,7 +1725,7 @@
+ 	  && mctx->input.valid_len < mctx->input.len))
+     {
+       reg_errcode_t err;
+-      err = extend_buffers (mctx);
++      err = extend_buffers (mctx, next_state_log_idx + 1);
+       if (BE (err != REG_NOERROR, 0))
+ 	return err;
+     }
+@@ -2779,7 +2779,7 @@
+ 		  if (bkref_str_off >= mctx->input.len)
+ 		    break;
+ 
+-		  err = extend_buffers (mctx);
++		  err = extend_buffers (mctx, bkref_str_off + 1);
+ 		  if (BE (err != REG_NOERROR, 0))
+ 		    return err;
+ 
+@@ -4097,7 +4097,7 @@
+ 
+ static reg_errcode_t
+ internal_function __attribute_warn_unused_result__
+-extend_buffers (re_match_context_t *mctx)
++extend_buffers (re_match_context_t *mctx, int min_len)
+ {
+   reg_errcode_t ret;
+   re_string_t *pstr = &mctx->input;
+@@ -4106,8 +4106,10 @@
+   if (BE (INT_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0))
+     return REG_ESPACE;
+ 
+-  /* Double the lengthes of the buffers.  */
+-  ret = re_string_realloc_buffers (pstr, MIN (pstr->len, pstr->bufs_len * 2));
++  /* Double the lengthes of the buffers, but allocate at least MIN_LEN.  */
++  ret = re_string_realloc_buffers (pstr,
++				   MAX (min_len,
++					MIN (pstr->len, pstr->bufs_len * 2)));
+   if (BE (ret != REG_NOERROR, 0))
+     return ret;
+ 
--- eglibc-2.13.orig/debian/patches/any/cvs-resolv-reuse-fd.diff
+++ eglibc-2.13/debian/patches/any/cvs-resolv-reuse-fd.diff
@@ -0,0 +1,16 @@
+2014-06-03  Andreas Schwab  <schwab@suse.de>
+
+	[BZ #15946]
+	* resolv/res_send.c (send_dg): Reload file descriptor after
+	calling reopen.
+
+--- a/resolv/res_send.c
++++ b/resolv/res_send.c
+@@ -1410,6 +1410,7 @@ send_dg(res_state statp,
+ 					retval = reopen (statp, terrno, ns);
+ 					if (retval <= 0)
+ 						return retval;
++					pfd[0].fd = EXT(statp).nssocks[ns];
+ 				}
+ 			}
+ 			goto wait;
--- eglibc-2.13.orig/debian/patches/any/local-ldso-disable-hwcap.diff
+++ eglibc-2.13/debian/patches/any/local-ldso-disable-hwcap.diff
@@ -0,0 +1,80 @@
+# DP: Allow hwcap's to be disabled with the existence of a file. This
+# DP: makes it easier to do upgrades with optimized (hwcap) library
+# DP: packages.
+# DP: Author: Rewritten by Daniel Jacobowitz <dan@debian.org>
+# DP: Upstream status: Debian-Specific
+# DP: Status Details: This isn't going to be acceptable upstream, we
+# DP:                 only need it because we support in-place upgrades.
+# DP: Date: 2003-10-28, (Updated 2005-01-02 gotom, 2007-05-20 aurel32)
+
+---
+ elf/dl-cache.c  |    6 ++++++
+ elf/dl-sysdep.c |   21 +++++++++++++++++++--
+ 2 files changed, 25 insertions(+), 2 deletions(-)
+
+--- a/elf/dl-sysdep.c
++++ b/elf/dl-sysdep.c
+@@ -417,6 +417,20 @@
+   /* For TLS enabled builds always add 'tls'.  */
+   ++cnt;
+ 
++  if (__access ("/etc/ld.so.nohwcap", F_OK) == 0)
++    {
++      /* If hwcap is disabled, we only have the base directory to search.  */
++      result = (struct r_strlenpair *) malloc (sizeof (*result));
++      if (result == NULL)
++	goto no_memory;
++
++      result[0].str = (char *) result;  /* Does not really matter.  */
++      result[0].len = 0;
++
++      *sz = 1;
++      return result;
++    }
++
+   /* Create temporary data structure to generate result table.  */
+   temp = (struct r_strlenpair *) alloca (cnt * sizeof (*temp));
+   m = 0;
+@@ -496,8 +510,11 @@
+   *sz = 1 << cnt;
+   result = (struct r_strlenpair *) malloc (*sz * sizeof (*result) + total);
+   if (result == NULL)
+-    _dl_signal_error (ENOMEM, NULL, NULL,
+-		      N_("cannot create capability list"));
++    {
++    no_memory:
++      _dl_signal_error (ENOMEM, NULL, NULL,
++		     	N_("cannot create capability list"));
++    }
+ 
+   if (cnt == 1)
+     {
+--- a/elf/dl-cache.c
++++ b/elf/dl-cache.c
+@@ -245,6 +245,7 @@
+   if (cache_new != (void *) -1)
+     {
+       uint64_t platform;
++      int disable_hwcap = 0;
+ 
+       /* This is where the strings start.  */
+       cache_data = (const char *) cache_new;
+@@ -256,6 +257,9 @@
+       if (platform != (uint64_t) -1)
+ 	platform = 1ULL << platform;
+ 
++      if (__access ("/etc/ld.so.nohwcap", F_OK) == 0)
++	disable_hwcap = 1;
++
+ #define _DL_HWCAP_TLS_MASK (1LL << 63)
+       uint64_t hwcap_exclude = ~((GLRO(dl_hwcap) & GLRO(dl_hwcap_mask))
+ 				 | _DL_HWCAP_PLATFORM | _DL_HWCAP_TLS_MASK);
+@@ -266,6 +270,8 @@
+ 	continue;							      \
+       if (GLRO(dl_osversion) && lib->osversion > GLRO(dl_osversion))	      \
+ 	continue;							      \
++      if (disable_hwcap && lib->hwcap != 0)				      \
++	continue;							      \
+       if (_DL_PLATFORMS_COUNT						      \
+ 	  && (lib->hwcap & _DL_HWCAP_PLATFORM) != 0			      \
+ 	  && (lib->hwcap & _DL_HWCAP_PLATFORM) != platform)		      \
--- eglibc-2.13.orig/debian/patches/any/local-localedef-fix-trampoline.diff
+++ eglibc-2.13/debian/patches/any/local-localedef-fix-trampoline.diff
@@ -0,0 +1,57 @@
+# DP: Description: Fix localedef segfault when run under exec-shield,
+#        PaX or similar. (#231438, #198099)
+# DP: Dpatch Author: James Troup <james@nocrew.org>
+# DP: Patch Author: (probably) Jakub Jelinek <jakub@redhat.com>
+# DP: Upstream status: Unknown
+# DP: Status Details: Unknown
+# DP: Date: 2004-03-16
+
+---
+ locale/programs/3level.h |   36 ++++++++++++++++++++++++++++++++++++
+ 1 file changed, 36 insertions(+)
+
+--- a/locale/programs/3level.h
++++ b/locale/programs/3level.h
+@@ -201,6 +201,42 @@
+ 	}
+     }
+ }
++
++/* GCC ATM seems to do a poor job with pointers to nested functions passed
++   to inlined functions.  Help it a little bit with this hack.  */
++#define wchead_table_iterate(tp, fn) \
++do									      \
++  {									      \
++    struct wchead_table *t = (tp);					      \
++    uint32_t index1;							      \
++    for (index1 = 0; index1 < t->level1_size; index1++)			      \
++      {									      \
++	uint32_t lookup1 = t->level1[index1];				      \
++	if (lookup1 != ((uint32_t) ~0))					      \
++	  {								      \
++	    uint32_t lookup1_shifted = lookup1 << t->q;			      \
++	    uint32_t index2;						      \
++	    for (index2 = 0; index2 < (1 << t->q); index2++)		      \
++	      {								      \
++		uint32_t lookup2 = t->level2[index2 + lookup1_shifted];	      \
++		if (lookup2 != ((uint32_t) ~0))				      \
++		  {							      \
++		    uint32_t lookup2_shifted = lookup2 << t->p;		      \
++		    uint32_t index3;					      \
++		    for (index3 = 0; index3 < (1 << t->p); index3++)	      \
++		      {							      \
++			struct element_t *lookup3			      \
++			  = t->level3[index3 + lookup2_shifted];	      \
++			if (lookup3 != NULL)				      \
++			  fn ((((index1 << t->q) + index2) << t->p) + index3, \
++			      lookup3);					      \
++		      }							      \
++		  }							      \
++	      }								      \
++	  }								      \
++      }									      \
++  } while (0)
++
+ #endif
+ 
+ #ifndef NO_FINALIZE
--- eglibc-2.13.orig/debian/patches/any/local-fhs-linux-paths.diff
+++ eglibc-2.13/debian/patches/any/local-fhs-linux-paths.diff
@@ -0,0 +1,33 @@
+# DP: Description: Correct linux paths for FHS
+# DP: Author: Unknown
+# DP: Upstream status: Debian-Specific
+# DP: Status Details: GNU doesn't follow the FHS.
+# DP: Date: Unknown
+
+---
+ sysdeps/generic/paths.h         |    2 +-
+ sysdeps/unix/sysv/linux/paths.h |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/sysdeps/unix/sysv/linux/paths.h
++++ b/sysdeps/unix/sysv/linux/paths.h
+@@ -68,7 +68,7 @@
+ /* Provide trailing slash, since mostly used for building pathnames. */
+ #define	_PATH_DEV	"/dev/"
+ #define	_PATH_TMP	"/tmp/"
+-#define	_PATH_VARDB	"/var/db/"
++#define	_PATH_VARDB	"/var/lib/misc/"
+ #define	_PATH_VARRUN	"/var/run/"
+ #define	_PATH_VARTMP	"/var/tmp/"
+ 
+--- a/sysdeps/generic/paths.h
++++ b/sysdeps/generic/paths.h
+@@ -68,7 +68,7 @@
+ /* Provide trailing slash, since mostly used for building pathnames. */
+ #define	_PATH_DEV	"/dev/"
+ #define	_PATH_TMP	"/tmp/"
+-#define	_PATH_VARDB	"/var/db/"
++#define	_PATH_VARDB	"/var/lib/misc/"
+ #define	_PATH_VARRUN	"/var/run/"
+ #define	_PATH_VARTMP	"/var/tmp/"
+ 
--- eglibc-2.13.orig/debian/patches/any/cvs-wscanf.diff
+++ eglibc-2.13/debian/patches/any/cvs-wscanf.diff
@@ -0,0 +1,82 @@
+2015-02-05  Paul Pluzhnikov  <ppluzhnikov@google.com>
+
+	[BZ #16618]
+	* stdio-common/tst-sscanf.c (main): Test for buffer overflow.
+	* stdio-common/vfscanf.c (_IO_vfscanf_internal): Compute needed
+	size in bytes. Store needed elements in wpmax. Use needed size
+	in bytes for extend_alloca.
+
+--- a/stdio-common/tst-sscanf.c
++++ b/stdio-common/tst-sscanf.c
+@@ -232,5 +232,38 @@
+ 	}
+     }
+ 
++  /* BZ #16618
++     The test will segfault during SSCANF if the buffer overflow
++     is not fixed.  The size of `s` is such that it forces the use
++     of malloc internally and this triggers the incorrect computation.
++     Thus the value for SIZE is arbitrariy high enough that malloc
++     is used.  */
++  {
++#define SIZE 131072
++    CHAR *s = malloc ((SIZE + 1) * sizeof (*s));
++    if (s == NULL)
++      abort ();
++    for (size_t i = 0; i < SIZE; i++)
++      s[i] = L('0');
++    s[SIZE] = L('\0');
++    int i = 42;
++    /* Scan multi-digit zero into `i`.  */
++    if (SSCANF (s, L("%d"), &i) != 1)
++      {
++	printf ("FAIL: bug16618: SSCANF did not read one input item.\n");
++	result = 1;
++      }
++    if (i != 0)
++      {
++	printf ("FAIL: bug16618: Value of `i` was not zero as expected.\n");
++	result = 1;
++      }
++    free (s);
++    if (result != 1)
++      printf ("PASS: bug16618: Did not crash.\n");
++#undef SIZE
++  }
++
++
+   return result;
+ }
+--- a/stdio-common/vfscanf.c
++++ b/stdio-common/vfscanf.c
+@@ -272,9 +272,10 @@
+       if (__builtin_expect (wpsize == wpmax, 0))			    \
+ 	{								    \
+ 	  CHAR_T *old = wp;						    \
+-	  size_t newsize = (UCHAR_MAX + 1 > 2 * wpmax			    \
+-			    ? UCHAR_MAX + 1 : 2 * wpmax);		    \
+-	  if (use_malloc || !__libc_use_alloca (newsize))		    \
++	  bool fits = __builtin_expect (wpmax <= SIZE_MAX / sizeof (CHAR_T) / 2, 1); \
++	  size_t wpneed = MAX (UCHAR_MAX + 1, 2 * wpmax);		    \
++	  size_t newsize = fits ? wpneed * sizeof (CHAR_T) : SIZE_MAX;	    \
++	  if (!__libc_use_alloca (newsize))				    \
+ 	    {								    \
+ 	      wp = realloc (use_malloc ? wp : NULL, newsize);		    \
+ 	      if (wp == NULL)						    \
+@@ -286,14 +287,13 @@
+ 		}							    \
+ 	      if (! use_malloc)						    \
+ 		MEMCPY (wp, old, wpsize);				    \
+-	      wpmax = newsize;						    \
++	      wpmax = wpneed;						    \
+ 	      use_malloc = true;					    \
+ 	    }								    \
+ 	  else								    \
+ 	    {								    \
+ 	      size_t s = wpmax * sizeof (CHAR_T);			    \
+-	      wp = (CHAR_T *) extend_alloca (wp, s,			    \
+-					     newsize * sizeof (CHAR_T));    \
++	      wp = (CHAR_T *) extend_alloca (wp, s, newsize);		    \
+ 	      wpmax = s / sizeof (CHAR_T);				    \
+ 	      if (old != NULL)						    \
+ 		MEMCPY (wp, old, wpsize);				    \
--- eglibc-2.13.orig/debian/patches/any/local-libgcc-compat-ports.diff
+++ eglibc-2.13/debian/patches/any/local-libgcc-compat-ports.diff
@@ -0,0 +1,442 @@
+# DP: Description: libgcc-compat symbols for mips, arm, m68k
+# DP: Author: Guido Guenther, GOTO Masanori
+# DP: Upstream status: Not submitted
+# DP: Date: 2002-10-13, updated 2006-08-27
+
+---
+ ports/sysdeps/alpha/Makefile              |    8 ++
+ ports/sysdeps/alpha/Versions              |    2 
+ ports/sysdeps/alpha/libgcc-compat.c       |   35 +++++++++
+ ports/sysdeps/arm/Makefile                |    7 +
+ ports/sysdeps/arm/Versions                |   16 ++++
+ ports/sysdeps/arm/libgcc-compat.c         |  111 ++++++++++++++++++++++++++++++
+ ports/sysdeps/m68k/Deps                   |    1 
+ ports/sysdeps/m68k/Makefile               |    8 ++
+ ports/sysdeps/m68k/Versions               |    8 ++
+ ports/sysdeps/m68k/libgcc-compat.c        |   83 ++++++++++++++++++++++
+ ports/sysdeps/mips/mips32/Makefile        |    8 ++
+ ports/sysdeps/mips/mips32/Versions        |    8 ++
+ ports/sysdeps/mips/mips32/libgcc-compat.c |   66 +++++++++++++++++
+ 13 files changed, 361 insertions(+)
+
+--- /dev/null
++++ b/ports/sysdeps/mips/mips32/libgcc-compat.c
+@@ -0,0 +1,66 @@
++/* pre-.hidden libgcc compatibility
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Guido Guenther <agx@sigxcpu.org>
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++
++#include <stdint.h>
++#include <shlib-compat.h>
++
++#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
++
++extern int32_t __cmpdi2 (int64_t, int64_t);
++int32_t __cmpdi2_internal (int64_t u, int64_t v)
++{
++  return __cmpdi2 (u, v);
++}
++symbol_version (__cmpdi2_internal, __cmpdi2, GLIBC_2.0);
++
++
++extern int32_t __ucmpdi2 (int64_t, int64_t);
++int32_t __ucmpdi2_internal (int64_t u, int64_t v)
++{
++  return __ucmpdi2 (u, v);
++}
++symbol_version (__ucmpdi2_internal, __ucmpdi2, GLIBC_2.0);
++
++
++extern int64_t __fixdfdi (double);
++int64_t __fixdfdi_internal (double d)
++{
++  return __fixdfdi (d);
++}
++symbol_version (__fixdfdi_internal, __fixdfdi, GLIBC_2.0);
++
++
++extern double __floatdidf (int64_t);
++double __floatdidf_internal (int64_t u)
++{
++	  return __floatdidf (u);
++}
++symbol_version (__floatdidf_internal, __floatdidf, GLIBC_2.0);
++
++
++extern float floatdisf (int64_t);
++float __floatdisf_internal (int64_t u)
++{
++  return __floatdisf (u);
++}
++symbol_version (__floatdisf_internal, __floatdisf, GLIBC_2.0);
++
++#endif
+--- /dev/null
++++ b/ports/sysdeps/mips/mips32/Versions
+@@ -0,0 +1,8 @@
++libc {
++  GLIBC_2.0 {
++    # Functions from libgcc.
++    __cmpdi2; __ucmpdi2;
++    __divdi3; __moddi3; __udivdi3; __umoddi3;
++    __fixdfdi; __floatdidf; __floatdisf;
++  }
++}
+--- /dev/null
++++ b/ports/sysdeps/arm/Makefile
+@@ -0,0 +1,7 @@
++ifeq ($(subdir),csu)
++ifeq (yes,$(build-shared))
++# Compatibility
++sysdep_routines += libgcc-compat
++shared-only-routines += libgcc-compat
++endif
++endif
+--- /dev/null
++++ b/ports/sysdeps/arm/Versions
+@@ -0,0 +1,16 @@
++libc {
++  GLIBC_2.0 {
++    # Functions from libgcc.
++    __ashldi3; __ashrdi3;
++    __cmpdi2;
++    __divsi3;
++    __fixdfdi;
++    __floatdidf;
++    __floatdisf;
++    __modsi3;
++    __muldi3;
++    __ucmpdi2;
++    __udivsi3;
++    __umodsi3;
++  }
++}
+--- /dev/null
++++ b/ports/sysdeps/arm/libgcc-compat.c
+@@ -0,0 +1,111 @@
++/* pre-.hidden libgcc compatibility
++   Copyright (C) 2003 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by GOTO Masanori <gotom@debian.org>
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++
++#include <stdint.h>
++#include <shlib-compat.h>
++
++#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
++
++extern int64_t __ashldi3 (int64_t, int32_t);
++int64_t __ashldi3_internal (int64_t u, int32_t b)
++{
++  return __ashldi3 (u, b);
++}
++symbol_version (__ashldi3_internal, __ashldi3, GLIBC_2.0);
++
++extern int64_t __ashrdi3 (int64_t, int32_t);
++int32_t __ashrdi3_internal (int64_t u, int32_t b)
++{
++  return __ashrdi3 (u, b);
++}
++symbol_version (__ashrdi3_internal, __ashrdi3, GLIBC_2.0);
++
++extern int32_t __cmpdi2 (int64_t, int64_t);
++int32_t __cmpdi2_internal (int64_t u, int64_t v)
++{
++  return __cmpdi2 (u, v);
++}
++symbol_version (__cmpdi2_internal, __cmpdi2, GLIBC_2.0);
++
++extern int32_t __divsi3 (int32_t, int32_t);
++int32_t __divsi3_internal (int32_t u, int32_t v)
++{
++  return __divsi3 (u, v);
++}
++symbol_version (__divsi3_internal, __divsi3, GLIBC_2.0);
++
++extern int64_t __fixdfdi (double);
++int64_t __fixdfdi_internal (double d)
++{
++  return __fixdfdi (d);
++}
++symbol_version (__fixdfdi_internal, __fixdfdi, GLIBC_2.0);
++
++extern double __floatdidf (int64_t);
++double __floatdidf_internal (int64_t u)
++{
++  return __floatdidf (u);
++}
++symbol_version (__floatdidf_internal, __floatdidf, GLIBC_2.0);
++
++extern float __floatdisf (int64_t);
++float __floatdisf_internal (int64_t u)
++{
++  return __floatdisf (u);
++}
++symbol_version (__floatdisf_internal, __floatdisf, GLIBC_2.0);
++
++extern int32_t __modsi3 (int32_t, int32_t);
++int32_t __modsi3_internal (int32_t u, int32_t v)
++{
++  return __modsi3 (u, v);
++}
++symbol_version (__modsi3_internal, __modsi3, GLIBC_2.0);
++
++extern int64_t __muldi3 (int64_t, int64_t);
++int64_t __muldi3_internal (int64_t u, int64_t v)
++{
++  return __muldi3 (u, v);
++}
++symbol_version (__muldi3_internal, __muldi3, GLIBC_2.0);
++
++extern int32_t __ucmpdi2 (int64_t, int64_t);
++int32_t __ucmpdi2_internal (int64_t u, int64_t v)
++{
++  return __ucmpdi2 (u, v);
++}
++symbol_version (__ucmpdi2_internal, __ucmpdi2, GLIBC_2.0);
++
++extern int32_t __udivsi3 (int32_t, int32_t);
++int32_t __udivsi3_internal (int32_t u, int32_t v)
++{
++  return __udivsi3 (u, v);
++}
++symbol_version (__udivsi3_internal, __udivsi3, GLIBC_2.0);
++
++extern int32_t __umodsi3 (int32_t, int32_t);
++int32_t __umodsi3_internal (int32_t u, int32_t v)
++{
++  return __umodsi3 (u, v);
++}
++symbol_version (__umodsi3_internal, __umodsi3, GLIBC_2.0);
++
++#endif
+--- /dev/null
++++ b/ports/sysdeps/m68k/Deps
+@@ -0,0 +1 @@
++libgcc-compat.c
+--- a/ports/sysdeps/m68k/Makefile
++++ b/ports/sysdeps/m68k/Makefile
+@@ -37,3 +37,11 @@
+ # Build objects in libc_nonshared.a with -fPIC (instead of -fpic) to avoid
+ # possible linkage problems.
+ CFLAGS-.oS += -fPIC
++ 
++ifeq ($(subdir),csu)
++ifeq (yes,$(build-shared))
++# Compatibility
++sysdep_routines += libgcc-compat
++shared-only-routines += libgcc-compat
++endif
++endif
+--- a/ports/sysdeps/m68k/Versions
++++ b/ports/sysdeps/m68k/Versions
+@@ -2,6 +2,14 @@
+   GLIBC_2.0 {
+     # Functions from libgcc.
+     __divdi3; __moddi3; __udivdi3; __umoddi3;
++    __ashldi3;
++    __ashrdi3;
++    __fixdfdi;
++    __fixsfdi;
++    __fixunsdfdi;
++    __fixunssfdi;
++    __floatdidf;
++    __floatdisf;
+   }
+ }
+ libm {
+--- /dev/null
++++ b/ports/sysdeps/m68k/libgcc-compat.c
+@@ -0,0 +1,83 @@
++/* pre-.hidden libgcc compatibility
++   Copyright (C) 2003 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by GOTO Masanori <gotom@debian.org>
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++
++#include <stdint.h>
++#include <shlib-compat.h>
++
++#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
++
++extern int64_t __ashldi3 (int64_t, int32_t);
++int64_t __ashldi3_internal (int64_t u, int32_t b)
++{
++  return __ashldi3 (u, b);
++}
++symbol_version (__ashldi3_internal, __ashldi3, GLIBC_2.0);
++
++extern int64_t __ashrdi3 (int64_t, int32_t);
++int64_t __ashrdi3_internal (int64_t u, int32_t b)
++{
++  return __ashrdi3 (u, b);
++}
++symbol_version (__ashrdi3_internal, __ashrdi3, GLIBC_2.0);
++
++extern int64_t __fixdfdi (double);
++int64_t __fixdfdi_internal (double d)
++{
++  return __fixdfdi (d);
++}
++symbol_version (__fixdfdi_internal, __fixdfdi, GLIBC_2.0);
++
++extern int64_t __fixsfdi (float);
++int64_t __fixsfdi_internal (float d)
++{
++  return __fixsfdi (d);
++}
++symbol_version (__fixsfdi_internal, __fixsfdi, GLIBC_2.0);
++
++extern int64_t __fixunsdfdi (double);
++int64_t __fixunsdfdi_internal (double d)
++{
++  return __fixunsdfdi (d);
++}
++symbol_version (__fixunsdfdi_internal, __fixunsdfdi, GLIBC_2.0);
++
++extern int64_t __fixunssfdi (float);
++int64_t __fixunssfdi_internal (float d)
++{
++  return __fixunssfdi (d);
++}
++symbol_version (__fixunssfdi_internal, __fixunssfdi, GLIBC_2.0);
++
++extern double __floatdidf (int64_t);
++double __floatdidf_internal (int64_t u)
++{
++  return __floatdidf (u);
++}
++symbol_version (__floatdidf_internal, __floatdidf, GLIBC_2.0);
++
++extern float __floatdisf (int64_t);
++float __floatdisf_internal (int64_t u)
++{
++  return __floatdisf (u);
++}
++symbol_version (__floatdisf_internal, __floatdisf, GLIBC_2.0);
++
++#endif
+--- a/ports/sysdeps/mips/mips32/Makefile
++++ b/ports/sysdeps/mips/mips32/Makefile
+@@ -1,3 +1,11 @@
+ ifeq ($(filter -mabi=32,$(CC)),)
+ CC += -mabi=32
+ endif
++
++ifeq ($(subdir),csu)
++ifeq (yes,$(build-shared))
++# Compatibility
++sysdep_routines += libgcc-compat
++shared-only-routines += libgcc-compat
++endif
++endif
+--- /dev/null
++++ b/ports/sysdeps/alpha/libgcc-compat.c
+@@ -0,0 +1,35 @@
++/* pre-.hidden libgcc compatibility
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Guido Guenther <agx@sigxcpu.org>
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <stdint.h>
++#include <shlib-compat.h>
++
++#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
++
++typedef int int128_t __attribute__((__mode__(TI)));
++
++extern int128_t __multi3 (int128_t, int128_t);
++int128_t INTUSE (__multi3) (int128_t x, int128_t y)
++{
++  return __multi3 (x, y);
++}
++symbol_version (INTUSE (__multi3), __multi3, GLIBC_2.0);
++
++#endif
+--- a/ports/sysdeps/alpha/Versions
++++ b/ports/sysdeps/alpha/Versions
+@@ -3,6 +3,8 @@
+     # functions with special/multiple interfaces
+     __divqu; __remqu; __divqs; __remqs; __divlu; __remlu; __divls;
+     __remls; __divl; __reml; __divq; __remq; __divqu; __remqu;
++    # libgcc-compat
++    __multi3;
+   }
+ }
+ libm {
+--- a/ports/sysdeps/alpha/Makefile
++++ b/ports/sysdeps/alpha/Makefile
+@@ -47,3 +47,11 @@
+ # libc.so requires about 16k for the small data area, which is well
+ # below the 64k maximum.
+ pic-ccflag = -fpic
++
++ifeq ($(subdir),csu)
++ifeq (yes,$(build-shared))
++# Compatibility
++sysdep_routines += libgcc-compat
++shared-only-routines += libgcc-compat
++endif
++endif
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-thread_self.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-thread_self.diff
@@ -0,0 +1,22 @@
+2009-01-21  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* linuxthreads/descr.h (thread_self): Remove static to prevent
+	  warning.
+
+---
+ linuxthreads/descr.h |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/linuxthreads/descr.h
++++ b/linuxthreads/descr.h
+@@ -260,8 +260,8 @@
+ 
+ extern pthread_descr __pthread_find_self (void) __attribute__ ((pure));
+ 
+-static inline pthread_descr thread_self (void) __attribute__ ((pure));
+-static inline pthread_descr thread_self (void)
++extern inline pthread_descr thread_self (void) __attribute__ ((pure));
++extern inline pthread_descr thread_self (void)
+ {
+ #ifdef THREAD_SELF
+   return THREAD_SELF;
--- eglibc-2.13.orig/debian/patches/any/cvs-setlocale.diff
+++ eglibc-2.13/debian/patches/any/cvs-setlocale.diff
@@ -0,0 +1,21 @@
+2011-05-21  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #12788]
+	* locale/setlocale.c (new_composite_name): Fix test to check for
+	identical name of all categories.
+
+---
+ locale/setlocale.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/locale/setlocale.c
++++ b/locale/setlocale.c
+@@ -125,7 +125,7 @@
+ 			    _nl_global_locale.__names[i]);
+ 	last_len = strlen (name);
+ 	cumlen += _nl_category_name_sizes[i] + 1 + last_len + 1;
+-	if (i > 0 && same && strcmp (name, newnames[0]) != 0)
++	if (same && name != newnames[0] && strcmp (name, newnames[0]) != 0)
+ 	  same = 0;
+       }
+ 
--- eglibc-2.13.orig/debian/patches/any/submitted-resolv-first-query-failure.diff
+++ eglibc-2.13/debian/patches/any/submitted-resolv-first-query-failure.diff
@@ -0,0 +1,38 @@
+2012-02-02  Aurelien Jarno  <aurel32@debian.org>
+
+	* resolv/res_query.c(__libc_res_nsearch): succeed if the first
+	query fails, but the second query succeeds.
+
+---
+ resolv/res_query.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/resolv/res_query.c
++++ b/resolv/res_query.c
+@@ -378,7 +378,7 @@
+ 		ret = __libc_res_nquerydomain(statp, name, NULL, class, type,
+ 					      answer, anslen, answerp,
+ 					      answerp2, nanswerp2, resplen2);
+-		if (ret > 0 || trailing_dot)
++		if (ret > 0 || (ret == 0 && *resplen2 > 0) || trailing_dot)
+ 			return (ret);
+ 		saved_herrno = h_errno;
+ 		tried_as_is++;
+@@ -418,7 +418,7 @@
+ 						      answer, anslen, answerp,
+ 						      answerp2, nanswerp2,
+ 						      resplen2);
+-			if (ret > 0)
++			if ((ret > 0) || (ret == 0 && *resplen2 > 0))
+ 				return (ret);
+ 
+ 			if (answerp && *answerp != answer) {
+@@ -487,7 +487,7 @@
+ 		ret = __libc_res_nquerydomain(statp, name, NULL, class, type,
+ 					      answer, anslen, answerp,
+ 					      answerp2, nanswerp2, resplen2);
+-		if (ret > 0)
++		if ((ret > 0) || (ret == 0 && *resplen2 > 0))
+ 			return (ret);
+ 	}
+ 
--- eglibc-2.13.orig/debian/patches/any/cvs-CVE-2013-4458.diff
+++ eglibc-2.13/debian/patches/any/cvs-CVE-2013-4458.diff
@@ -0,0 +1,784 @@
+2013-10-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+	[BZ #16072]
+	* sysdeps/posix/getaddrinfo.c (gethosts): Allocate tmpbuf on
+	heap for large requests.
+
+2012-08-22  Jeff Law <law@redhat.com>
+
+	[BZ #14505]
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Only use gethostbyname4_r
+	if the family is PF_UNSPEC.
+
+2011-06-10  Andreas Schwab  <schwab@redhat.com>
+
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Fix logic allocating
+	tmpbuf.
+
+2011-05-20  Ulrich Drepper  <drepper@gmail.com>
+ 
+	[BZ #11869]
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Don't unconditionally use
+	alloca.
+	* include/alloca.h (extend_alloca_account): Define.
+
+2011-04-28  Maciej Babinski  <mbabinski@google.com>
+
+	[BZ #12714]
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Don't bypass
+	gethostbyname4_r when IPv6 results are possible.
+
+--- a/include/alloca.h
++++ b/include/alloca.h
+@@ -49,15 +49,24 @@
+ 
+ #if defined stackinfo_get_sp && defined stackinfo_sub_sp
+ # define alloca_account(size, avar) \
+-  ({ void *old__ = stackinfo_get_sp ();			\
+-     void *m__ = __alloca (size);			\
+-     avar += stackinfo_sub_sp (old__);			\
++  ({ void *old__ = stackinfo_get_sp ();					      \
++     void *m__ = __alloca (size);					      \
++     avar += stackinfo_sub_sp (old__);					      \
++     m__; })
++# define extend_alloca_account(buf, len, newlen, avar) \
++  ({ void *old__ = stackinfo_get_sp ();					      \
++     void *m__ = extend_alloca (buf, len, newlen);			      \
++     avar += stackinfo_sub_sp (old__);					      \
+      m__; })
+ #else
+ # define alloca_account(size, avar) \
+-  ({ size_t s__ = (size);		    \
+-     avar += s__;			    \
++  ({ size_t s__ = (size);						      \
++     avar += s__;							      \
+      __alloca (s__); })
++# define extend_alloca_account(buf, len, newlen, avar) \
++  ({ size_t s__ = (newlen);						      \
++     avar += s__;							      \
++     extend_alloca (buf, len, s__); })
+ #endif
+ 
+ #endif
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -196,7 +196,22 @@
+ 				&rc, &herrno, NULL, &localcanon));	      \
+     if (rc != ERANGE || herrno != NETDB_INTERNAL)			      \
+       break;								      \
+-    tmpbuf = extend_alloca (tmpbuf, tmpbuflen, 2 * tmpbuflen);		      \
++    if (!malloc_tmpbuf && __libc_use_alloca (alloca_used + 2 * tmpbuflen))    \
++      tmpbuf = extend_alloca_account (tmpbuf, tmpbuflen, 2 * tmpbuflen,	      \
++				      alloca_used);			      \
++    else								      \
++      {									      \
++	char *newp = realloc (malloc_tmpbuf ? tmpbuf : NULL,		      \
++			      2 * tmpbuflen);				      \
++	if (newp == NULL)						      \
++	  {								      \
++	    result = -EAI_MEMORY;					      \
++	    goto free_and_return;					      \
++	  }								      \
++	tmpbuf = newp;							      \
++	malloc_tmpbuf = true;						      \
++	tmpbuflen = 2 * tmpbuflen;					      \
++      }									      \
+   }									      \
+   if (status == NSS_STATUS_SUCCESS && rc == 0)				      \
+     h = &th;								      \
+@@ -208,7 +223,8 @@
+ 	{								      \
+ 	  __set_h_errno (herrno);					      \
+ 	  _res.options |= old_res_options & RES_USE_INET6;		      \
+-	  return -EAI_SYSTEM;						      \
++	  result = -EAI_SYSTEM;						      \
++	  goto free_and_return;						      \
+ 	}								      \
+       if (herrno == TRY_AGAIN)						      \
+ 	no_data = EAI_AGAIN;						      \
+@@ -278,6 +294,7 @@
+   bool got_ipv6 = false;
+   const char *canon = NULL;
+   const char *orig_name = name;
++  size_t alloca_used = 0;
+ 
+   if (req->ai_protocol || req->ai_socktype)
+     {
+@@ -310,7 +327,7 @@
+ 	  if (tp->name[0])
+ 	    {
+ 	      st = (struct gaih_servtuple *)
+-		__alloca (sizeof (struct gaih_servtuple));
++		alloca_account (sizeof (struct gaih_servtuple), alloca_used);
+ 
+ 	      if ((rc = gaih_inet_serv (service->name, tp, req, st)))
+ 		return rc;
+@@ -334,7 +351,8 @@
+ 		    continue;
+ 
+ 		  newp = (struct gaih_servtuple *)
+-		    __alloca (sizeof (struct gaih_servtuple));
++		    alloca_account (sizeof (struct gaih_servtuple),
++				    alloca_used);
+ 
+ 		  if ((rc = gaih_inet_serv (service->name, tp, req, newp)))
+ 		    {
+@@ -362,7 +380,7 @@
+ 
+       if (req->ai_socktype || req->ai_protocol)
+ 	{
+-	  st = __alloca (sizeof (struct gaih_servtuple));
++	  st = alloca_account (sizeof (struct gaih_servtuple), alloca_used);
+ 	  st->next = NULL;
+ 	  st->socktype = tp->socktype;
+ 	  st->protocol = ((tp->protoflag & GAI_PROTO_PROTOANY)
+@@ -379,7 +397,8 @@
+ 	      {
+ 		struct gaih_servtuple *newp;
+ 
+-		newp = __alloca (sizeof (struct gaih_servtuple));
++		newp = alloca_account (sizeof (struct gaih_servtuple),
++				       alloca_used);
+ 		newp->next = NULL;
+ 		newp->socktype = tp->socktype;
+ 		newp->protocol = tp->protocol;
+@@ -391,10 +410,17 @@
+ 	}
+     }
+ 
++  bool malloc_name = false;
++  bool malloc_addrmem = false;
++  struct gaih_addrtuple *addrmem = NULL;
++  bool malloc_canonbuf = false;
++  char *canonbuf = NULL;
++  bool malloc_tmpbuf = false;
++  char *tmpbuf = NULL;
++  int result = 0;
+   if (name != NULL)
+     {
+-      at = __alloca (sizeof (struct gaih_addrtuple));
+-
++      at = alloca_account (sizeof (struct gaih_addrtuple), alloca_used);
+       at->family = AF_UNSPEC;
+       at->scopeid = 0;
+       at->next = NULL;
+@@ -412,6 +438,7 @@
+ 	  rc = __idna_to_ascii_lz (name, &p, idn_flags);
+ 	  if (rc != IDNA_SUCCESS)
+ 	    {
++	      /* No need to jump to free_and_return here.  */
+ 	      if (rc == IDNA_MALLOC_ERROR)
+ 		return -EAI_MEMORY;
+ 	      if (rc == IDNA_DLOPEN_ERROR)
+@@ -421,10 +448,7 @@
+ 	  /* In case the output string is the same as the input string
+ 	     no new string has been allocated.  */
+ 	  if (p != name)
+-	    {
+-	      name = strdupa (p);
+-	      free (p);
+-	    }
++	    malloc_name = true;
+ 	}
+ #endif
+ 
+@@ -441,23 +465,59 @@
+ 	      at->family = AF_INET6;
+ 	    }
+ 	  else
+-	    return -EAI_ADDRFAMILY;
++	    {
++	      result = -EAI_ADDRFAMILY;
++	      goto free_and_return;
++	    }
+ 
+ 	  if (req->ai_flags & AI_CANONNAME)
+ 	    canon = name;
+ 	}
+       else if (at->family == AF_UNSPEC)
+ 	{
+-	  char *namebuf = (char *) name;
+ 	  char *scope_delim = strchr (name, SCOPE_DELIMITER);
++	  int e;
+ 
+-	  if (__builtin_expect (scope_delim != NULL, 0))
+-	    {
+-	      namebuf = alloca (scope_delim - name + 1);
+-	      *((char *) __mempcpy (namebuf, name, scope_delim - name)) = '\0';
+-	    }
++	  {
++	    bool malloc_namebuf = false;
++	    char *namebuf = (char *) name;
+ 
+-	  if (inet_pton (AF_INET6, namebuf, at->addr) > 0)
++	    if (__builtin_expect (scope_delim != NULL, 0))
++	      {
++		if (malloc_name)
++		  *scope_delim = '\0';
++		else
++		  {
++		    if (__libc_use_alloca (alloca_used
++					   + scope_delim - name + 1))
++		      {
++			namebuf = alloca_account (scope_delim - name + 1,
++						  alloca_used);
++			*((char *) __mempcpy (namebuf, name,
++					      scope_delim - name)) = '\0';
++		      }
++		    else
++		      {
++			namebuf = strndup (name, scope_delim - name);
++			if (namebuf == NULL)
++			  {
++			    assert (!malloc_name);
++			    return -EAI_MEMORY;
++			  }
++			malloc_namebuf = true;
++		      }
++		  }
++	      }
++
++	    e = inet_pton (AF_INET6, namebuf, at->addr);
++
++	    if (malloc_namebuf)
++	      free (namebuf);
++	    else if (scope_delim != NULL && malloc_name)
++	      /* Undo what we did above.  */
++	      *scope_delim = SCOPE_DELIMITER;
++	  }
++	  if (e > 0)
+ 	    {
+ 	      if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET6)
+ 		at->family = AF_INET6;
+@@ -468,7 +528,10 @@
+ 		  at->family = AF_INET;
+ 		}
+ 	      else
+-		return -EAI_ADDRFAMILY;
++		{
++		  result = -EAI_ADDRFAMILY;
++		  goto free_and_return;
++		}
+ 
+ 	      if (scope_delim != NULL)
+ 		{
+@@ -490,7 +553,10 @@
+ 		      at->scopeid = (uint32_t) strtoul (scope_delim + 1, &end,
+ 							10);
+ 		      if (*end != '\0')
+-			return GAIH_OKIFUNSPEC | -EAI_NONAME;
++			{
++			  result = GAIH_OKIFUNSPEC | -EAI_NONAME;
++			  goto free_and_return;
++			}
+ 		    }
+ 		}
+ 
+@@ -510,53 +576,81 @@
+ 	  int no_more;
+ 	  int old_res_options;
+ 
+-	  /* If we do not have to look for IPv4 and IPv6 together, use
+-	     the simple, old functions.  */
+-	  if (req->ai_family == AF_INET
+-	      || (req->ai_family == AF_INET6
+-		  && ((req->ai_flags & AI_V4MAPPED) == 0
+-		      || (req->ai_flags & AI_ALL) == 0)))
++	  /* If we do not have to look for IPv6 addresses, use
++	     the simple, old functions, which do not support
++	     IPv6 scope ids. */
++	  if (req->ai_family == AF_INET)
+ 	    {
+ 	      int family = req->ai_family;
+ 	      size_t tmpbuflen = 512;
+-	      char *tmpbuf = alloca (tmpbuflen);
++	      assert (tmpbuf == NULL);
++	      tmpbuf = alloca_account (tmpbuflen, alloca_used);
+ 	      int rc;
+ 	      struct hostent th;
+ 	      struct hostent *h;
+ 	      int herrno;
+ 
+-	    simple_again:
+ 	      while (1)
+ 		{
+ 		  rc = __gethostbyname2_r (name, family, &th, tmpbuf,
+ 					   tmpbuflen, &h, &herrno);
+ 		  if (rc != ERANGE || herrno != NETDB_INTERNAL)
+ 		    break;
+-		  tmpbuf = extend_alloca (tmpbuf, tmpbuflen, 2 * tmpbuflen);
++
++		  if (!malloc_tmpbuf
++		      && __libc_use_alloca (alloca_used + 2 * tmpbuflen))
++		    tmpbuf = extend_alloca_account (tmpbuf, tmpbuflen,
++						    2 * tmpbuflen,
++						    alloca_used);
++		  else
++		    {
++		      char *newp = realloc (malloc_tmpbuf ? tmpbuf : NULL,
++					    2 * tmpbuflen);
++		      if (newp == NULL)
++			{
++			  result = -EAI_MEMORY;
++			  goto free_and_return;
++			}
++		      tmpbuf = newp;
++		      malloc_tmpbuf = true;
++		      tmpbuflen = 2 * tmpbuflen;
++		    }
+ 		}
+ 
+ 	      if (rc == 0)
+ 		{
+-		  if (h == NULL)
++		  if (h != NULL)
+ 		    {
+-		      if (req->ai_family == AF_INET6
+-			  && (req->ai_flags & AI_V4MAPPED)
+-			  && family == AF_INET6)
++		      int i;
++		      /* We found data, count the number of addresses.  */
++		      for (i = 0; h->h_addr_list[i]; ++i)
++			;
++		      if (i > 0 && *pat != NULL)
++			--i;
++
++		      if (__libc_use_alloca (alloca_used
++					     + i * sizeof (struct gaih_addrtuple)))
++			addrmem = alloca_account (i * sizeof (struct gaih_addrtuple),
++						  alloca_used);
++		      else
+ 			{
+-			  /* Try again, this time looking for IPv4
+-			     addresses.  */
+-			  family = AF_INET;
+-			  goto simple_again;
++			  addrmem = malloc (i
++					    * sizeof (struct gaih_addrtuple));
++			  if (addrmem == NULL)
++			    {
++			      result = -EAI_MEMORY;
++			      goto free_and_return;
++			    }
++			  malloc_addrmem = true;
+ 			}
+-		    }
+-		  else
+-		    {
+-		      /* We found data, now convert it into the list.  */
+-		      for (int i = 0; h->h_addr_list[i]; ++i)
++
++		      /* Now convert it into the list.  */
++		      struct gaih_addrtuple *addrfree = addrmem;
++		      for (i = 0; h->h_addr_list[i]; ++i)
+ 			{
+ 			  if (*pat == NULL)
+ 			    {
+-			      *pat = __alloca (sizeof (struct gaih_addrtuple));
++			      *pat = addrfree++;
+ 			      (*pat)->scopeid = 0;
+ 			    }
+ 			  (*pat)->next = NULL;
+@@ -581,15 +675,16 @@
+ 		  if (herrno == NETDB_INTERNAL)
+ 		    {
+ 		      __set_h_errno (herrno);
+-		      return -EAI_SYSTEM;
++		      result = -EAI_SYSTEM;
+ 		    }
+-		  if (herrno == TRY_AGAIN)
+-		    {
+-		      return -EAI_AGAIN;
+-		    }
+-		  /* We made requests but they turned out no data.
+-		     The name is known, though.  */
+-		  return GAIH_OKIFUNSPEC | -EAI_NODATA;
++		  else if (herrno == TRY_AGAIN)
++		    result = -EAI_AGAIN;
++		  else
++		    /* We made requests but they turned out no data.
++		       The name is known, though.  */
++		    result = GAIH_OKIFUNSPEC | -EAI_NODATA;
++
++		  goto free_and_return;
+ 		}
+ 
+ 	      goto process_list;
+@@ -613,21 +708,56 @@
+ 		  bool added_canon = (req->ai_flags & AI_CANONNAME) == 0;
+ 		  char *addrs = air->addrs;
+ 
++		  if (__libc_use_alloca (alloca_used
++					 + air->naddrs * sizeof (struct gaih_addrtuple)))
++		    addrmem = alloca_account (air->naddrs
++					      * sizeof (struct gaih_addrtuple),
++					      alloca_used);
++		  else
++		    {
++		      addrmem = malloc (air->naddrs
++					* sizeof (struct gaih_addrtuple));
++		      if (addrmem == NULL)
++			{
++			  result = -EAI_MEMORY;
++			  goto free_and_return;
++			}
++		      malloc_addrmem = true;
++		    }
++
++		  struct gaih_addrtuple *addrfree = addrmem;
+ 		  for (int i = 0; i < air->naddrs; ++i)
+ 		    {
+ 		      socklen_t size = (air->family[i] == AF_INET
+ 					? INADDRSZ : IN6ADDRSZ);
+ 		      if (*pat == NULL)
+ 			{
+-			  *pat = __alloca (sizeof (struct gaih_addrtuple));
++			  *pat = addrfree++;
+ 			  (*pat)->scopeid = 0;
+ 			}
+ 		      uint32_t *pataddr = (*pat)->addr;
+ 		      (*pat)->next = NULL;
+ 		      if (added_canon || air->canon == NULL)
+ 			(*pat)->name = NULL;
+-		      else
+-			canon = (*pat)->name = strdupa (air->canon);
++		      else if (canonbuf == NULL)
++			{
++			  size_t canonlen = strlen (air->canon) + 1;
++			  if ((req->ai_flags & AI_CANONIDN) != 0
++			      && __libc_use_alloca (alloca_used + canonlen))
++			    canonbuf = alloca_account (canonlen, alloca_used);
++			  else
++			    {
++			      canonbuf = malloc (canonlen);
++			      if (canonbuf == NULL)
++				{
++				  result = -EAI_MEMORY;
++				  goto free_and_return;
++				}
++			      malloc_canonbuf = true;
++			    }
++			  canon = (*pat)->name = memcpy (canonbuf, air->canon,
++							 canonlen);
++			}
+ 
+ 		      if (air->family[i] == AF_INET
+ 			  && req->ai_family == AF_INET6
+@@ -657,20 +787,26 @@
+ 		  free (air);
+ 
+ 		  if (at->family == AF_UNSPEC)
+-		    return GAIH_OKIFUNSPEC | -EAI_NONAME;
++		    {
++		      result = GAIH_OKIFUNSPEC | -EAI_NONAME;
++		      goto free_and_return;
++		    }
+ 
+ 		  goto process_list;
+ 		}
+ 	      else if (err == 0)
+ 		/* The database contains a negative entry.  */
+-		return 0;
++		goto free_and_return;
+ 	      else if (__nss_not_use_nscd_hosts == 0)
+ 		{
+ 		  if (herrno == NETDB_INTERNAL && errno == ENOMEM)
+-		    return -EAI_MEMORY;
+-		  if (herrno == TRY_AGAIN)
+-		    return -EAI_AGAIN;
+-		  return -EAI_SYSTEM;
++		    result = -EAI_MEMORY;
++		  else if (herrno == TRY_AGAIN)
++		    result = -EAI_AGAIN;
++		  else
++		    result = -EAI_SYSTEM;
++
++		  goto free_and_return;
+ 		}
+ 	    }
+ #endif
+@@ -699,13 +835,30 @@
+ 	  _res.options &= ~RES_USE_INET6;
+ 
+ 	  size_t tmpbuflen = 1024;
+-	  char *tmpbuf = alloca (tmpbuflen);
++	  malloc_tmpbuf = !__libc_use_alloca (alloca_used + tmpbuflen);
++	  assert (tmpbuf == NULL);
++	  if (!malloc_tmpbuf)
++	    tmpbuf = alloca_account (tmpbuflen, alloca_used);
++	  else
++	    {
++	      tmpbuf = malloc (tmpbuflen);
++	      if (tmpbuf == NULL)
++		{
++		  result = -EAI_MEMORY;
++		  goto free_and_return;
++		}
++	    }
+ 
+ 	  while (!no_more)
+ 	    {
+ 	      no_data = 0;
+-	      nss_gethostbyname4_r fct4
+-		= __nss_lookup_function (nip, "gethostbyname4_r");
++	      nss_gethostbyname4_r fct4 = NULL;
++
++	      /* gethostbyname4_r sends out parallel A and AAAA queries and
++		 is thus only suitable for PF_UNSPEC.  */
++	      if (req->ai_family == PF_UNSPEC)
++		fct4 = __nss_lookup_function (nip, "gethostbyname4_r");
++
+ 	      if (fct4 != NULL)
+ 		{
+ 		  int herrno;
+@@ -728,8 +881,25 @@
+ 			    no_data = herrno == NO_DATA;
+ 			  break;
+ 			}
+-		      tmpbuf = extend_alloca (tmpbuf,
+-					      tmpbuflen, 2 * tmpbuflen);
++
++		      if (!malloc_tmpbuf
++			  && __libc_use_alloca (alloca_used + 2 * tmpbuflen))
++			tmpbuf = extend_alloca_account (tmpbuf, tmpbuflen,
++							2 * tmpbuflen,
++							alloca_used);
++		      else
++			{
++			  char *newp = realloc (malloc_tmpbuf ? tmpbuf : NULL,
++						2 * tmpbuflen);
++			  if (newp == NULL)
++			    {
++			      result = -EAI_MEMORY;
++			      goto free_and_return;
++			    }
++			  tmpbuf = newp;
++			  malloc_tmpbuf = true;
++			  tmpbuflen = 2 * tmpbuflen;
++			}
+ 		    }
+ 
+ 		  if (status == NSS_STATUS_SUCCESS)
+@@ -832,18 +1002,40 @@
+ 			      if (cfct != NULL)
+ 				{
+ 				  const size_t max_fqdn_len = 256;
+-				  char *buf = alloca (max_fqdn_len);
++				  if ((req->ai_flags & AI_CANONIDN) != 0
++				      && __libc_use_alloca (alloca_used
++							    + max_fqdn_len))
++				    canonbuf = alloca_account (max_fqdn_len,
++							       alloca_used);
++				  else
++				    {
++				      canonbuf = malloc (max_fqdn_len);
++				      if (canonbuf == NULL)
++					{
++					  result = -EAI_MEMORY;
++					  goto free_and_return;
++					}
++				      malloc_canonbuf = true;
++				    }
+ 				  char *s;
+ 
+ 				  if (DL_CALL_FCT (cfct, (at->name ?: name,
+-							  buf, max_fqdn_len,
++							  canonbuf,
++							  max_fqdn_len,
+ 							  &s, &rc, &herrno))
+ 				      == NSS_STATUS_SUCCESS)
+ 				    canon = s;
+ 				  else
+-				    /* Set to name now to avoid using
+-				       gethostbyaddr.  */
+-				    canon = name;
++				    {
++				      /* Set to name now to avoid using
++					 gethostbyaddr.  */
++				      if (malloc_canonbuf)
++					{
++					  free (canonbuf);
++					  malloc_canonbuf = false;
++					}
++				      canon = name;
++				    }
+ 				}
+ 			    }
+ 			  status = NSS_STATUS_SUCCESS;
+@@ -878,22 +1070,27 @@
+ 	    {
+ 	      /* If both requests timed out report this.  */
+ 	      if (no_data == EAI_AGAIN && no_inet6_data == EAI_AGAIN)
+-		return -EAI_AGAIN;
++		result = -EAI_AGAIN;
++	      else
++		/* We made requests but they turned out no data.  The name
++		   is known, though.  */
++		result = GAIH_OKIFUNSPEC | -EAI_NODATA;
+ 
+-	      /* We made requests but they turned out no data.  The name
+-		 is known, though.  */
+-	      return GAIH_OKIFUNSPEC | -EAI_NODATA;
++	      goto free_and_return;
+ 	    }
+ 	}
+ 
+     process_list:
+       if (at->family == AF_UNSPEC)
+-	return GAIH_OKIFUNSPEC | -EAI_NONAME;
++	{
++	  result = GAIH_OKIFUNSPEC | -EAI_NONAME;
++	  goto free_and_return;
++	}
+     }
+   else
+     {
+       struct gaih_addrtuple *atr;
+-      atr = at = __alloca (sizeof (struct gaih_addrtuple));
++      atr = at = alloca_account (sizeof (struct gaih_addrtuple), alloca_used);
+       memset (at, '\0', sizeof (struct gaih_addrtuple));
+ 
+       if (req->ai_family == AF_UNSPEC)
+@@ -932,30 +1129,56 @@
+ 	/* Only the first entry gets the canonical name.  */
+ 	if (at2 == at && (req->ai_flags & AI_CANONNAME) != 0)
+ 	  {
++	    char *tmpbuf2 = NULL;
++	    bool malloc_tmpbuf2 = false;
++
+ 	    if (canon == NULL)
+ 	      {
+ 		struct hostent *h = NULL;
+ 		int herrno;
+ 		struct hostent th;
+-		size_t tmpbuflen = 512;
+-		char *tmpbuf = NULL;
++		size_t tmpbuf2len = 512;
+ 
+ 		do
+ 		  {
+-		    tmpbuf = extend_alloca (tmpbuf, tmpbuflen, tmpbuflen * 2);
++		    if (__libc_use_alloca (alloca_used + 2 * tmpbuf2len))
++		      tmpbuf2 = extend_alloca_account (tmpbuf2, tmpbuf2len,
++						       tmpbuf2len * 2,
++						       alloca_used);
++		    else
++		      {
++			char *newp = realloc (malloc_tmpbuf2 ? tmpbuf2 : NULL,
++					      2 * tmpbuf2len);
++			if (newp == NULL)
++			  {
++			    if (malloc_tmpbuf2)
++			      free (tmpbuf2);
++			    result = -EAI_MEMORY;
++			    goto free_and_return;
++			  }
++
++			tmpbuf2 = newp;
++			tmpbuf2len = 2 * tmpbuf2len;
++			malloc_tmpbuf2 = true;
++		      }
++
+ 		    rc = __gethostbyaddr_r (at2->addr,
+ 					    ((at2->family == AF_INET6)
+ 					     ? sizeof (struct in6_addr)
+ 					     : sizeof (struct in_addr)),
+-					    at2->family, &th, tmpbuf,
+-					    tmpbuflen, &h, &herrno);
++					    at2->family, &th, tmpbuf2,
++					    tmpbuf2len, &h, &herrno);
+ 		  }
+ 		while (rc == ERANGE && herrno == NETDB_INTERNAL);
+ 
+ 		if (rc != 0 && herrno == NETDB_INTERNAL)
+ 		  {
++		    if (malloc_tmpbuf2)
++		      free (tmpbuf2);
++
+ 		    __set_h_errno (herrno);
+-		    return -EAI_SYSTEM;
++		    result = -EAI_SYSTEM;
++		    goto free_and_return;
+ 		  }
+ 
+ 		if (h != NULL)
+@@ -982,11 +1205,16 @@
+ 		int rc = __idna_to_unicode_lzlz (canon, &out, idn_flags);
+ 		if (rc != IDNA_SUCCESS)
+ 		  {
++		    if (malloc_tmpbuf2)
++		      free (tmpbuf2);
++
+ 		    if (rc == IDNA_MALLOC_ERROR)
+-		      return -EAI_MEMORY;
+-		    if (rc == IDNA_DLOPEN_ERROR)
+-		      return -EAI_SYSTEM;
+-		    return -EAI_IDN_ENCODE;
++		      result = -EAI_MEMORY;
++		    else if (rc == IDNA_DLOPEN_ERROR)
++		      result = -EAI_SYSTEM;
++		    else
++		      result = -EAI_IDN_ENCODE;
++		    goto free_and_return;
+ 		  }
+ 		/* In case the output string is the same as the input
+ 		   string no new string has been allocated and we
+@@ -1001,10 +1229,25 @@
+ #ifdef HAVE_LIBIDN
+ 	      make_copy:
+ #endif
+-		canon = strdup (canon);
+-		if (canon == NULL)
+-		  return -EAI_MEMORY;
++		if (malloc_canonbuf)
++		  /* We already allocated the string using malloc.  */
++		  malloc_canonbuf = false;
++		else
++		  {
++		    canon = strdup (canon);
++		    if (canon == NULL)
++		      {
++			if (malloc_tmpbuf2)
++			  free (tmpbuf2);
++
++			result = -EAI_MEMORY;
++			goto free_and_return;
++		      }
++		  }
+ 	      }
++
++	    if (malloc_tmpbuf2)
++	      free (tmpbuf2);
+ 	  }
+ 
+ 	family = at2->family;
+@@ -1030,7 +1273,8 @@
+ 	    if (ai == NULL)
+ 	      {
+ 		free ((char *) canon);
+-		return -EAI_MEMORY;
++		result = -EAI_MEMORY;
++		goto free_and_return;
+ 	      }
+ 
+ 	    ai->ai_flags = req->ai_flags;
+@@ -1083,7 +1327,18 @@
+ 	at2 = at2->next;
+       }
+   }
+-  return 0;
++
++ free_and_return:
++  if (malloc_name)
++    free ((char *) name);
++  if (malloc_addrmem)
++    free (addrmem);
++  if (malloc_canonbuf)
++    free (canonbuf);
++  if (malloc_tmpbuf)
++    free (tmpbuf);
++
++  return result;
+ }
+ 
+ 
--- eglibc-2.13.orig/debian/patches/any/cvs-sys-param-ARG_MAX.diff
+++ eglibc-2.13/debian/patches/any/cvs-sys-param-ARG_MAX.diff
@@ -0,0 +1,28 @@
+2011-03-05  Jonathan Nieder  <jrnieder@gmail.com>
+
+	* sysdeps/unix/sysv/linux/sys/param.h: Fix an #ifndef __undef_ARG_MAX
+	where #ifdef was intended.  The intent is to prevent ARG_MAX from
+	being defined by the kernel headers.
+
+---
+ sysdeps/unix/sysv/linux/sys/param.h |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/sysdeps/unix/sysv/linux/sys/param.h
++++ b/sysdeps/unix/sysv/linux/sys/param.h
+@@ -1,4 +1,5 @@
+-/* Copyright (C) 1995-1997,2000,2001,2003,2008 Free Software Foundation, Inc.
++/* Copyright (C) 1995-1997,2000,2001,2003,2008,2011
++   Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+@@ -28,7 +29,7 @@
+ #include <linux/param.h>
+ 
+ /* The kernel headers defines ARG_MAX.  The value is wrong, though.  */
+-#ifndef __undef_ARG_MAX
++#ifdef __undef_ARG_MAX
+ # undef ARG_MAX
+ # undef __undef_ARG_MAX
+ #endif
--- eglibc-2.13.orig/debian/patches/any/local-libgcc-compat-main.diff
+++ eglibc-2.13/debian/patches/any/local-libgcc-compat-main.diff
@@ -0,0 +1,889 @@
+# DP: Description: libgcc-compat symbols for i386, sparc, 
+#                  alpha, ia64 (derived from RedHat's), s390
+# DP: Author: Guido Guenther, GOTO Masanori
+# DP: Upstream status: Not submitted
+# DP: Date: 2002-10-13, updated 2006-05-28
+
+---
+ sysdeps/i386/Makefile                 |    5 
+ sysdeps/i386/Versions                 |    3 
+ sysdeps/i386/libgcc-compat.c          |   75 +++++++
+ sysdeps/ia64/Makefile                 |    4 
+ sysdeps/ia64/Versions                 |    4 
+ sysdeps/ia64/ia64libgcc.S             |  350 ----------------------------------
+ sysdeps/ia64/libgcc-compat.c          |  112 ++++++++++
+ sysdeps/s390/s390-32/Makefile         |    8 
+ sysdeps/s390/s390-32/Versions         |    8 
+ sysdeps/s390/s390-32/libgcc-compat.c  |   83 ++++++++
+ sysdeps/sparc/sparc32/Makefile        |    8 
+ sysdeps/sparc/sparc32/Versions        |    4 
+ sysdeps/sparc/sparc32/libgcc-compat.c |  121 +++++++++++
+ 13 files changed, 433 insertions(+), 352 deletions(-)
+
+--- /dev/null
++++ b/sysdeps/i386/libgcc-compat.c
+@@ -0,0 +1,75 @@
++/* pre-.hidden libgcc compatibility
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Guido Guenther <agx@sigxcpu.org>
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++
++#include <stdint.h>
++#include <shlib-compat.h>
++
++#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
++
++extern int32_t __cmpdi2 (int64_t, int64_t);
++int32_t __cmpdi2_internal (int64_t u, int64_t v)
++{
++  return __cmpdi2 (u, v);
++}
++symbol_version (__cmpdi2_internal, __cmpdi2, GLIBC_2.0);
++
++
++extern int32_t __ucmpdi2 (int64_t, int64_t);
++int32_t __ucmpdi2_internal (int64_t u, int64_t v)
++{
++  return __ucmpdi2 (u, v);
++}
++symbol_version (__ucmpdi2_internal, __ucmpdi2, GLIBC_2.0);
++
++
++extern int64_t __fixunsdfdi (double);
++int64_t __fixunsdfdi_internal (double d)
++{
++	  return __fixunsdfdi (d);
++}
++symbol_version (__fixunsdfdi_internal, __fixunsdfdi, GLIBC_2.0);
++
++extern int64_t __fixunssfdi (float);
++int64_t __fixunssfdi_internal (float d)
++{
++  return __fixunssfdi (d);
++}
++
++symbol_version (__fixunsfdi_internal, __fixunsfdi, GLIBC_2.0);
++
++typedef float XFtype __attribute__ ((mode (XF)));
++
++extern int64_t __fixunsxfdi (XFtype);
++int64_t __fixunsxfdi_internal (XFtype d)
++{
++  return __fixunsxfdi (d);
++}
++
++symbol_version (__fixunsxfdi_internal, __fixunsxfdi, GLIBC_2.0);
++
++extern double __floatdidf (int64_t);
++double __floatdidf_internal (int64_t u)
++{
++	  return __floatdidf (u);
++}
++symbol_version (__floatdidf_internal, __floatdidf, GLIBC_2.0);
++
++#endif
+--- a/sysdeps/i386/Makefile
++++ b/sysdeps/i386/Makefile
+@@ -9,6 +9,11 @@
+ # On i686 we must avoid generating the trampoline functions generated
+ # to get the GOT pointer.
+ CFLAGS-initfini.s += -march=i386 -mtune=i386 -fno-asynchronous-unwind-tables -fno-unwind-tables
++ifeq (yes,$(build-shared))
++# Compatibility
++sysdep_routines += libgcc-compat
++shared-only-routines += libgcc-compat
++endif
+ endif
+ 
+ ifeq ($(subdir),nptl)
+--- a/sysdeps/i386/Versions
++++ b/sysdeps/i386/Versions
+@@ -2,6 +2,9 @@
+   GLIBC_2.0 {
+     # Functions from libgcc.
+     __divdi3; __moddi3; __udivdi3; __umoddi3;
++    __cmpdi2; __ucmpdi2; 
++    __fixunsdfdi; __fixunssfdi; __fixunsxfdi;
++    __floatdidf;
+   }
+   GLIBC_2.1 {
+     # global variable
+--- /dev/null
++++ b/sysdeps/sparc/sparc32/libgcc-compat.c
+@@ -0,0 +1,121 @@
++/* pre-.hidden libgcc compatibility
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Guido Guenther <agx@sigxcpu.org>
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++
++#include <stdint.h>
++#include <shlib-compat.h>
++
++#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
++
++extern int64_t __ashldi3 (int64_t, int32_t);
++int64_t __ashldi3_internal (int64_t u, int32_t b)
++{
++  return __ashldi3 (u, b);
++}
++symbol_version (__ashldi3_internal, __ashldi3, GLIBC_2.0);
++
++
++extern int64_t __ashrdi3 (int64_t, int32_t);
++int64_t __ashrdi3_internal (int64_t u, int32_t b)
++{
++  return __ashrdi3 (u, b);
++}
++symbol_version (__ashrdi3_internal, __ashrdi3, GLIBC_2.0);
++
++
++extern int64_t __lshrdi3 (int64_t, int32_t);
++int64_t __lshrdi3_internal (int64_t u, int32_t b)
++{
++  return __lshrdi3 (u, b);
++}
++symbol_version (__lshrdi3_internal, __lshrdi3, GLIBC_2.0);
++
++extern int32_t __cmpdi2 (int64_t, int64_t);
++int32_t __cmpdi2_internal (int64_t u, int64_t v)
++{
++  return __cmpdi2 (u, v);
++}
++symbol_version (__cmpdi2_internal, __cmpdi2, GLIBC_2.0);
++
++
++extern int32_t __ucmpdi2 (int64_t, int64_t);
++int32_t __ucmpdi2_internal (int64_t u, int64_t v)
++{
++  return __ucmpdi2 (u, v);
++}
++symbol_version (__ucmpdi2_internal, __ucmpdi2, GLIBC_2.0);
++
++
++extern int64_t __fixdfdi (double);
++int64_t __fixdfdi_internal (double d)
++{
++  return __fixdfdi (d);
++}
++symbol_version (__fixdfdi_internal, __fixdfdi, GLIBC_2.0);
++
++
++extern int64_t __fixsfdi (float);
++int64_t __fixsfdi_internal (float d)
++{
++  return __fixsfdi (d);
++}
++symbol_version (__fixsfdi_internal, __fixsfdi, GLIBC_2.0);
++
++
++extern int64_t __fixunsdfdi (double);
++int64_t __fixunsdfdi_internal (double d)
++{
++	  return __fixunsdfdi (d);
++}
++symbol_version (__fixunsdfdi_internal, __fixunsdfdi, GLIBC_2.0);
++
++extern int64_t __fixunssfdi (float);
++int64_t __fixunssfdi_internal (float d)
++{
++  return __fixunssfdi (d);
++}
++
++symbol_version (__fixunssfdi_internal, __fixunssfdi, GLIBC_2.0);
++
++
++extern double __floatdidf (int64_t);
++double __floatdidf_internal (int64_t u)
++{
++	  return __floatdidf (u);
++}
++symbol_version (__floatdidf_internal, __floatdidf, GLIBC_2.0);
++
++
++extern float floatdisf (int64_t);
++float __floatdisf_internal (int64_t u)
++{
++  return __floatdisf (u);
++}
++symbol_version (__floatdisf_internal, __floatdisf, GLIBC_2.0);
++
++
++extern int64_t __muldi3 (int64_t, int64_t);
++int64_t __muldi3_internal (int64_t u, int64_t v)
++{
++  return __muldi3 (u, v);
++}
++symbol_version (__muldi3_internal, __muldi3, GLIBC_2.0);
++
++#endif
+--- a/sysdeps/sparc/sparc32/Makefile
++++ b/sysdeps/sparc/sparc32/Makefile
+@@ -24,6 +24,14 @@
+ CFLAGS-initfini.s += -mcpu=v7
+ endif
+ 
++ifeq ($(subdir),csu)
++ifeq (yes,$(build-shared))
++# Compatibility
++sysdep_routines += libgcc-compat
++shared-only-routines += libgcc-compat
++endif
++endif
++
+ # We distribute these files, even though they are generated,
+ # so as to avoid the need for a functioning m4 to build the library.
+ divrem := sdiv udiv rem urem
+--- a/sysdeps/sparc/sparc32/Versions
++++ b/sysdeps/sparc/sparc32/Versions
+@@ -1,5 +1,9 @@
+ libc {
+   GLIBC_2.0 {
+     .div; .mul; .rem; .udiv; .umul; .urem;
++    __divdi3; __moddi3; __udivdi3; __umoddi3; __muldi3;
++    __ashldi3; __ashrdi3; __lshrdi3; __cmpdi2; __ucmpdi2;
++    __fixdfdi; __fixsfdi; __fixunsdfdi; __fixunssfdi; 
++    __floatdidf; __floatdisf;
+   }
+ }
+--- a/sysdeps/ia64/Makefile
++++ b/sysdeps/ia64/Makefile
+@@ -12,8 +12,8 @@
+ 
+ ifeq (yes,$(build-shared))
+ # Compatibility
+-sysdep_routines += ia64libgcc
+-shared-only-routines += ia64libgcc
++sysdep_routines += libgcc-compat
++shared-only-routines += libgcc-compat
+ endif
+ endif
+ 
+--- a/sysdeps/ia64/Versions
++++ b/sysdeps/ia64/Versions
+@@ -10,6 +10,10 @@
+     # Functions from libgcc.
+     __divtf3; __divdf3; __divsf3; __divdi3; __moddi3; __udivdi3; __umoddi3;
+     __multi3;
++    __divsi3;
++    __modsi3;
++    __udivsi3;
++    __umodsi3;
+   }
+ }
+ libm {
+--- a/sysdeps/ia64/ia64libgcc.S
++++ /dev/null
+@@ -1,350 +0,0 @@
+-/* From the Intel IA-64 Optimization Guide, choose the minimum latency
+-   alternative.  */
+-
+-#include <sysdep.h>
+-#undef ret
+-
+-#include <shlib-compat.h>
+-
+-#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_2_6)
+-
+-/* __divtf3
+-   Compute a 80-bit IEEE double-extended quotient.
+-   farg0 holds the dividend.  farg1 holds the divisor.  */
+-
+-ENTRY(___divtf3)
+-	cmp.eq p7, p0 = r0, r0
+-	frcpa.s0 f10, p6 = farg0, farg1
+-	;;
+-(p6)	cmp.ne p7, p0 = r0, r0
+-	.pred.rel.mutex p6, p7
+-(p6)	fnma.s1 f11 = farg1, f10, f1
+-(p6)	fma.s1 f12 = farg0, f10, f0
+-	;;
+-(p6)	fma.s1 f13 = f11, f11, f0
+-(p6)	fma.s1 f14 = f11, f11, f11
+-	;;
+-(p6)	fma.s1 f11 = f13, f13, f11
+-(p6)	fma.s1 f13 = f14, f10, f10
+-	;;
+-(p6)	fma.s1 f10 = f13, f11, f10
+-(p6)	fnma.s1 f11 = farg1, f12, farg0
+-	;;
+-(p6)	fma.s1 f11 = f11, f10, f12
+-(p6)	fnma.s1 f12 = farg1, f10, f1
+-	;;
+-(p6)	fma.s1 f10 = f12, f10, f10
+-(p6)	fnma.s1 f12 = farg1, f11, farg0
+-	;;
+-(p6)	fma.s0 fret0 = f12, f10, f11
+-(p7)	mov fret0 = f10
+-	br.ret.sptk rp
+-END(___divtf3)
+-	.symver ___divtf3, __divtf3@GLIBC_2.2
+-
+-/* __divdf3
+-   Compute a 64-bit IEEE double quotient.
+-   farg0 holds the dividend.  farg1 holds the divisor.  */
+-
+-ENTRY(___divdf3)
+-	cmp.eq p7, p0 = r0, r0
+-	frcpa.s0 f10, p6 = farg0, farg1
+-	;;
+-(p6)	cmp.ne p7, p0 = r0, r0
+-	.pred.rel.mutex p6, p7
+-(p6)	fmpy.s1 f11 = farg0, f10
+-(p6)	fnma.s1 f12 = farg1, f10, f1
+-	;;
+-(p6)	fma.s1 f11 = f12, f11, f11
+-(p6)	fmpy.s1 f13 = f12, f12
+-	;;
+-(p6)	fma.s1 f10 = f12, f10, f10
+-(p6)	fma.s1 f11 = f13, f11, f11
+-	;;
+-(p6)	fmpy.s1 f12 = f13, f13
+-(p6)	fma.s1 f10 = f13, f10, f10
+-	;;
+-(p6)	fma.d.s1 f11 = f12, f11, f11
+-(p6)	fma.s1 f10 = f12, f10, f10
+-	;;
+-(p6)	fnma.d.s1 f8 = farg1, f11, farg0
+-	;;
+-(p6)	fma.d fret0 = f8, f10, f11
+-(p7)	mov fret0 = f10
+-	br.ret.sptk rp
+-	;;
+-END(___divdf3)
+-	.symver	___divdf3, __divdf3@GLIBC_2.2
+-
+-/* __divsf3
+-   Compute a 32-bit IEEE float quotient.
+-   farg0 holds the dividend.  farg1 holds the divisor.  */
+-
+-ENTRY(___divsf3)
+-	cmp.eq p7, p0 = r0, r0
+-	frcpa.s0 f10, p6 = farg0, farg1
+-	;;
+-(p6)	cmp.ne p7, p0 = r0, r0
+-	.pred.rel.mutex p6, p7
+-(p6)	fmpy.s1 f8 = farg0, f10
+-(p6)	fnma.s1 f9 = farg1, f10, f1
+-	;;
+-(p6)	fma.s1 f8 = f9, f8, f8
+-(p6)	fmpy.s1 f9 = f9, f9
+-	;;
+-(p6)	fma.s1 f8 = f9, f8, f8
+-(p6)	fmpy.s1 f9 = f9, f9
+-	;;
+-(p6)	fma.d.s1 f10 = f9, f8, f8
+-	;;
+-(p6)	fnorm.s.s0 fret0 = f10
+-(p7)	mov fret0 = f10
+-	br.ret.sptk rp
+-	;;
+-END(___divsf3)
+-	.symver	___divsf3, __divsf3@GLIBC_2.2
+-
+-/* __divdi3
+-   Compute a 64-bit integer quotient.
+-   in0 holds the dividend.  in1 holds the divisor.  */
+-
+-ENTRY(___divdi3)
+-	.regstk 2,0,0,0
+-	/* Transfer inputs to FP registers.  */
+-	setf.sig f8 = in0
+-	setf.sig f9 = in1
+-	;;
+-	/* Convert the inputs to FP, so that they won't be treated as
+-	   unsigned.  */
+-	fcvt.xf f8 = f8
+-	fcvt.xf f9 = f9
+-	;;
+-	/* Compute the reciprocal approximation.  */
+-	frcpa.s1 f10, p6 = f8, f9
+-	;;
+-	/* 3 Newton-Raphson iterations.  */
+-(p6)	fnma.s1 f11 = f9, f10, f1
+-(p6)	fmpy.s1 f12 = f8, f10
+-	;;
+-(p6)	fmpy.s1 f13 = f11, f11
+-(p6)	fma.s1 f12 = f11, f12, f12
+-	;;
+-(p6)	fma.s1 f10 = f11, f10, f10
+-(p6)	fma.s1 f11 = f13, f12, f12
+-	;;
+-(p6)	fma.s1 f10 = f13, f10, f10
+-(p6)	fnma.s1 f12 = f9, f11, f8
+-	;;
+-(p6)	fma.s1 f10 = f12, f10, f11
+-	;;
+-	/* Round quotient to an integer.  */
+-	fcvt.fx.trunc.s1 f10 = f10
+-	;;
+-	/* Transfer result to GP registers.  */
+-	getf.sig ret0 = f10
+-	br.ret.sptk rp
+-	;;
+-END(___divdi3)
+-	.symver	___divdi3, __divdi3@GLIBC_2.2
+-
+-/* __moddi3
+-   Compute a 64-bit integer modulus.
+-   in0 holds the dividend (a).  in1 holds the divisor (b).  */
+-
+-ENTRY(___moddi3)
+-	.regstk 2,0,0,0
+-	/* Transfer inputs to FP registers.  */
+-	setf.sig f14 = in0
+-	setf.sig f9 = in1
+-	;;
+-	/* Convert the inputs to FP, so that they won't be treated as
+-	   unsigned.  */
+-	fcvt.xf f8 = f14
+-	fcvt.xf f9 = f9
+-	;;
+-	/* Compute the reciprocal approximation.  */
+-	frcpa.s1 f10, p6 = f8, f9
+-	;;
+-	/* 3 Newton-Raphson iterations.  */
+-(p6)	fmpy.s1 f12 = f8, f10
+-(p6)	fnma.s1 f11 = f9, f10, f1
+-	;;
+-(p6)	fma.s1 f12 = f11, f12, f12
+-(p6)	fmpy.s1 f13 = f11, f11
+-	;;
+-(p6)	fma.s1 f10 = f11, f10, f10
+-(p6)	fma.s1 f11 = f13, f12, f12
+-	;;
+-	sub in1 = r0, in1
+-(p6)	fma.s1 f10 = f13, f10, f10
+-(p6)	fnma.s1 f12 = f9, f11, f8
+-	;;
+-	setf.sig f9 = in1
+-(p6)	fma.s1 f10 = f12, f10, f11
+-	;;
+-	fcvt.fx.trunc.s1 f10 = f10
+-	;;
+-	/* r = q * (-b) + a  */
+-	xma.l f10 = f10, f9, f14
+-	;;
+-	/* Transfer result to GP registers.  */
+-	getf.sig ret0 = f10
+-	br.ret.sptk rp
+-	;;
+-END(___moddi3)
+-	.symver ___moddi3, __moddi3@GLIBC_2.2
+-
+-/* __udivdi3
+-   Compute a 64-bit unsigned integer quotient.
+-   in0 holds the dividend.  in1 holds the divisor.  */
+-
+-ENTRY(___udivdi3)
+-	.regstk 2,0,0,0
+-	/* Transfer inputs to FP registers.  */
+-	setf.sig f8 = in0
+-	setf.sig f9 = in1
+-	;;
+-	/* Convert the inputs to FP, to avoid FP software-assist faults.  */
+-	fcvt.xuf.s1 f8 = f8
+-	fcvt.xuf.s1 f9 = f9
+-	;;
+-	/* Compute the reciprocal approximation.  */
+-	frcpa.s1 f10, p6 = f8, f9
+-	;;
+-	/* 3 Newton-Raphson iterations.  */
+-(p6)	fnma.s1 f11 = f9, f10, f1
+-(p6)	fmpy.s1 f12 = f8, f10
+-	;;
+-(p6)	fmpy.s1 f13 = f11, f11
+-(p6)	fma.s1 f12 = f11, f12, f12
+-	;;
+-(p6)	fma.s1 f10 = f11, f10, f10
+-(p6)	fma.s1 f11 = f13, f12, f12
+-	;;
+-(p6)	fma.s1 f10 = f13, f10, f10
+-(p6)	fnma.s1 f12 = f9, f11, f8
+-	;;
+-(p6)	fma.s1 f10 = f12, f10, f11
+-	;;
+-	/* Round quotient to an unsigned integer.  */
+-	fcvt.fxu.trunc.s1 f10 = f10
+-	;;
+-	/* Transfer result to GP registers.  */
+-	getf.sig ret0 = f10
+-	br.ret.sptk rp
+-	;;
+-END(___udivdi3)
+-	.symver	___udivdi3, __udivdi3@GLIBC_2.2
+-
+-/* __umoddi3
+-   Compute a 64-bit unsigned integer modulus.
+-   in0 holds the dividend (a).  in1 holds the divisor (b).  */
+-
+-ENTRY(___umoddi3)
+-	.regstk 2,0,0,0
+-	/* Transfer inputs to FP registers.  */
+-	setf.sig f14 = in0
+-	setf.sig f9 = in1
+-	;;
+-	/* Convert the inputs to FP, to avoid FP software assist faults.  */
+-	fcvt.xuf.s1 f8 = f14
+-	fcvt.xuf.s1 f9 = f9
+-	;;
+-	/* Compute the reciprocal approximation.  */
+-	frcpa.s1 f10, p6 = f8, f9
+-	;;
+-	/* 3 Newton-Raphson iterations.  */
+-(p6)	fmpy.s1 f12 = f8, f10
+-(p6)	fnma.s1 f11 = f9, f10, f1
+-	;;
+-(p6)	fma.s1 f12 = f11, f12, f12
+-(p6)	fmpy.s1 f13 = f11, f11
+-	;;
+-(p6)	fma.s1 f10 = f11, f10, f10
+-(p6)	fma.s1 f11 = f13, f12, f12
+-	;;
+-	sub in1 = r0, in1
+-(p6)	fma.s1 f10 = f13, f10, f10
+-(p6)	fnma.s1 f12 = f9, f11, f8
+-	;;
+-	setf.sig f9 = in1
+-(p6)	fma.s1 f10 = f12, f10, f11
+-	;;
+-	/* Round quotient to an unsigned integer.  */
+-	fcvt.fxu.trunc.s1 f10 = f10
+-	;;
+-	/* r = q * (-b) + a  */
+-	xma.l f10 = f10, f9, f14
+-	;;
+-	/* Transfer result to GP registers.  */
+-	getf.sig ret0 = f10
+-	br.ret.sptk rp
+-	;;
+-END(___umoddi3)
+-	.symver	___umoddi3, __umoddi3@GLIBC_2.2
+-
+-/* __multi3
+-   Compute a 128-bit multiply of 128-bit multiplicands.
+-   in0/in1 holds one multiplicand (a), in2/in3 holds the other one (b).  */
+-
+-ENTRY(___multi3)
+-	.regstk 4,0,0,0
+-	setf.sig f6 = in1
+-	movl r19 = 0xffffffff
+-	setf.sig f7 = in2
+-	;;
+-	and r14 = r19, in0
+-	;;
+-	setf.sig f10 = r14
+-	and r14 = r19, in2
+-	xmpy.l f9 = f6, f7
+-	;;
+-	setf.sig f6 = r14
+-	shr.u r14 = in0, 32
+-	;;
+-	setf.sig f7 = r14
+-	shr.u r14 = in2, 32
+-	;;
+-	setf.sig f8 = r14
+-	xmpy.l f11 = f10, f6
+-	xmpy.l f6 = f7, f6
+-	;;
+-	getf.sig r16 = f11
+-	xmpy.l f7 = f7, f8
+-	;;
+-	shr.u r14 = r16, 32
+-	and r16 = r19, r16
+-	getf.sig r17 = f6
+-	setf.sig f6 = in0
+-	;;
+-	setf.sig f11 = r14
+-	getf.sig r21 = f7
+-	setf.sig f7 = in3
+-	;;
+-	xma.l f11 = f10, f8, f11
+-	xma.l f6 = f6, f7, f9
+-	;;
+-	getf.sig r18 = f11
+-	;;
+-	add r18 = r18, r17
+-	;;
+-	and r15 = r19, r18
+-	cmp.ltu p7, p6 = r18, r17
+-	;;
+-	getf.sig r22 = f6
+-(p7)	adds r14 = 1, r19
+-	;;
+-(p7)	add r21 = r21, r14
+-	shr.u r14 = r18, 32
+-	shl r15 = r15, 32
+-	;;
+-	add r20 = r21, r14
+-	;;
+-	add ret0 = r15, r16
+-	add ret1 = r22, r20
+-	br.ret.sptk rp
+-	;;
+-END(___multi3)
+-	.symver	___multi3, __multi3@GLIBC_2.2
+-
+-#endif
+--- /dev/null
++++ b/sysdeps/ia64/libgcc-compat.c
+@@ -0,0 +1,112 @@
++/* pre-.hidden libgcc compatibility
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++
++#include <stdint.h>
++#include <shlib-compat.h>
++
++#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_2_6)
++
++typedef int int128_t __attribute__((__mode__(TI)));
++
++extern long double __divtf3 (long double, long double) attribute_hidden;
++long double INTUSE (__divtf3) (long double x, long double y)
++{
++  return __divtf3 (x, y);
++}
++symbol_version (INTUSE (__divtf3), __divtf3, GLIBC_2.2);
++
++extern double __divdf3 (double, double) attribute_hidden;
++double INTUSE (__divdf3) (double x, double y)
++{
++  return __divdf3 (x, y);
++}
++symbol_version (INTUSE (__divdf3), __divdf3, GLIBC_2.2);
++
++extern float __divsf3 (float, float) attribute_hidden;
++float INTUSE (__divsf3) (float x, float y)
++{
++  return __divsf3 (x, y);
++}
++symbol_version (INTUSE (__divsf3), __divsf3, GLIBC_2.2);
++
++extern int64_t __divdi3 (int64_t, int64_t) attribute_hidden;
++int64_t INTUSE (__divdi3) (int64_t x, int64_t y)
++{
++  return __divdi3 (x, y);
++}
++symbol_version (INTUSE (__divdi3), __divdi3, GLIBC_2.2);
++
++extern int64_t __moddi3 (int64_t, int64_t) attribute_hidden;
++int64_t INTUSE (__moddi3) (int64_t x, int64_t y)
++{
++  return __moddi3 (x, y);
++}
++symbol_version (INTUSE (__moddi3), __moddi3, GLIBC_2.2);
++
++extern uint64_t __udivdi3 (uint64_t, uint64_t) attribute_hidden;
++uint64_t INTUSE (__udivdi3) (uint64_t x, uint64_t y)
++{
++  return __udivdi3 (x, y);
++}
++symbol_version (INTUSE (__udivdi3), __udivdi3, GLIBC_2.2);
++
++extern uint64_t __umoddi3 (uint64_t, uint64_t) attribute_hidden;
++uint64_t INTUSE (__umoddi3) (uint64_t x, uint64_t y)
++{
++  return __umoddi3 (x, y);
++}
++symbol_version (INTUSE (__umoddi3), __umoddi3, GLIBC_2.2);
++
++extern int128_t __multi3 (int128_t, int128_t) attribute_hidden;
++int128_t INTUSE (__multi3) (int128_t x, int128_t y)
++{
++  return __multi3 (x, y);
++}
++symbol_version (INTUSE (__multi3), __multi3, GLIBC_2.2);
++
++extern int64_t __divsi3 (int64_t, int64_t) attribute_hidden;
++int64_t INTUSE (__divsi3) (int64_t x, int64_t y)
++{
++  return __divsi3 (x, y);
++}
++symbol_version (INTUSE (__divsi3), __divsi3, GLIBC_2.2);
++
++extern int64_t __modsi3 (int64_t, int64_t) attribute_hidden;
++int64_t INTUSE (__modsi3) (int64_t x, int64_t y)
++{
++  return __modsi3 (x, y);
++}
++symbol_version (INTUSE (__modsi3), __modsi3, GLIBC_2.2);
++
++extern uint64_t __udivsi3 (uint64_t, uint64_t) attribute_hidden;
++uint64_t INTUSE (__udivsi3) (uint64_t x, uint64_t y)
++{
++  return __udivsi3 (x, y);
++}
++symbol_version (INTUSE (__udivsi3), __udivsi3, GLIBC_2.2);
++
++extern uint64_t __umodsi3 (uint64_t, uint64_t) attribute_hidden;
++uint64_t INTUSE (__umodsi3) (uint64_t x, uint64_t y)
++{
++  return __umodsi3 (x, y);
++}
++symbol_version (INTUSE (__umodsi3), __umodsi3, GLIBC_2.2);
++
++#endif
+--- a/sysdeps/s390/s390-32/Makefile
++++ b/sysdeps/s390/s390-32/Makefile
+@@ -9,3 +9,11 @@
+ CFLAGS-dl-load.c += -Wno-unused
+ CFLAGS-dl-reloc.c += -Wno-unused
+ endif
++
++ifeq ($(subdir),csu)
++ifeq (yes,$(build-shared))
++# Compatibility
++sysdep_routines += libgcc-compat
++shared-only-routines += libgcc-compat
++endif
++endif
+--- a/sysdeps/s390/s390-32/Versions
++++ b/sysdeps/s390/s390-32/Versions
+@@ -2,5 +2,13 @@
+   GLIBC_2.0 {
+     # Functions from libgcc.
+     __divdi3; __moddi3; __udivdi3; __umoddi3;
++    __cmpdi2;
++    __fixdfdi;
++    __fixsfdi;
++    __fixunsdfdi;
++    __fixunssfdi;
++    __floatdidf;
++    __floatdisf;
++    __ucmpdi2;
+   }
+ }
+--- /dev/null
++++ b/sysdeps/s390/s390-32/libgcc-compat.c
+@@ -0,0 +1,83 @@
++/* pre-.hidden libgcc compatibility
++   Copyright (C) 2003 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by GOTO Masanori <gotom@debian.org>
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++
++#include <stdint.h>
++#include <shlib-compat.h>
++
++#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
++
++extern int32_t __cmpdi2 (int64_t, int64_t);
++int32_t __cmpdi2_internal (int64_t u, int64_t v)
++{
++  return __cmpdi2 (u, v);
++}
++symbol_version (__cmpdi2_internal, __cmpdi2, GLIBC_2.0);
++
++extern int64_t __fixdfdi (double);
++int64_t __fixdfdi_internal (double d)
++{
++  return __fixdfdi (d);
++}
++symbol_version (__fixdfdi_internal, __fixdfdi, GLIBC_2.0);
++
++extern int64_t __fixsfdi (float);
++int64_t __fixsfdi_internal (float d)
++{
++  return __fixsfdi (d);
++}
++symbol_version (__fixsfdi_internal, __fixsfdi, GLIBC_2.0);
++
++extern int64_t __fixunsdfdi (double);
++int64_t __fixunsdfdi_internal (double d)
++{
++  return __fixunsdfdi (d);
++}
++symbol_version (__fixunsdfdi_internal, __fixunsdfdi, GLIBC_2.0);
++
++extern int64_t __fixunssfdi (float);
++int64_t __fixunssfdi_internal (float d)
++{
++  return __fixunssfdi (d);
++}
++symbol_version (__fixunssfdi_internal, __fixunssfdi, GLIBC_2.0);
++
++extern double __floatdidf (int64_t);
++double __floatdidf_internal (int64_t u)
++{
++  return __floatdidf (u);
++}
++symbol_version (__floatdidf_internal, __floatdidf, GLIBC_2.0);
++
++extern float __floatdisf (int64_t);
++float __floatdisf_internal (int64_t u)
++{
++  return __floatdisf (u);
++}
++symbol_version (__floatdisf_internal, __floatdisf, GLIBC_2.0);
++
++extern int32_t __ucmpdi2 (int64_t, int64_t);
++int32_t __ucmpdi2_internal (int64_t u, int64_t v)
++{
++  return __ucmpdi2 (u, v);
++}
++symbol_version (__ucmpdi2_internal, __ucmpdi2, GLIBC_2.0);
++
++#endif
--- eglibc-2.13.orig/debian/patches/any/cvs-pthread-builtin-expect.diff
+++ eglibc-2.13/debian/patches/any/cvs-pthread-builtin-expect.diff
@@ -0,0 +1,51 @@
+2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	[BZ #14188]
+	* nptl/sysdeps/pthread/pthread.h
+	[!(defined __GNUC__ && defined __EXCEPTIONS)]
+	(pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
+	__libc_unlikely instead of __builtin_expect.
+
+2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
+	    Jakub Jelinek  <jakub@redhat.com>
+
+	[BZ #14188]
+	* misc/sys/cdefs.h (__glibc_unlikely): New macro to wrap cases
+	where __builtin_expect is unavailable.
+
+--- a/misc/sys/cdefs.h
++++ b/misc/sys/cdefs.h
+@@ -369,6 +369,12 @@
+ # endif
+ #endif
+ 
++#if __GNUC__ >= 3
++# define __glibc_unlikely(cond) __builtin_expect((cond), 0)
++#else
++# define __glibc_unlikely(cond) (cond)
++#endif
++
+ #include <bits/wordsize.h>
+ 
+ #if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
+--- a/nptl/sysdeps/pthread/pthread.h
++++ b/nptl/sysdeps/pthread/pthread.h
+@@ -659,7 +659,7 @@ __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame)
+     void *__cancel_arg = (arg);						      \
+     int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *)     \
+ 					__cancel_buf.__cancel_jmp_buf, 0);    \
+-    if (__builtin_expect (__not_first_call, 0))				      \
++    if (__glibc_unlikely (__not_first_call))				      \
+       {									      \
+ 	__cancel_routine (__cancel_arg);				      \
+ 	__pthread_unwind_next (&__cancel_buf);				      \
+@@ -694,7 +694,7 @@ extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
+     void *__cancel_arg = (arg);						      \
+     int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *)     \
+ 					__cancel_buf.__cancel_jmp_buf, 0);    \
+-    if (__builtin_expect (__not_first_call, 0))				      \
++    if (__glibc_unlikely (__not_first_call))			      \
+       {									      \
+ 	__cancel_routine (__cancel_arg);				      \
+ 	__pthread_unwind_next (&__cancel_buf);				      \
--- eglibc-2.13.orig/debian/patches/any/submitted-autotools.diff
+++ eglibc-2.13/debian/patches/any/submitted-autotools.diff
@@ -0,0 +1,677 @@
+2009-05-10  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* scripts/config.guess: update to version 2009-04-27.
+	* scripts/config.sub: ditto.
+
+---
+ scripts/config.guess |  123 ++++++++++++++++++++++++++++++---------
+ scripts/config.sub   |  159 +++++++++++++++++++++++++++++++++++++--------------
+ 2 files changed, 214 insertions(+), 68 deletions(-)
+
+--- a/scripts/config.guess
++++ b/scripts/config.guess
+@@ -1,10 +1,10 @@
+ #! /bin/sh
+ # Attempt to guess a canonical system name.
+ #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+-#   Inc.
++#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
++#   Free Software Foundation, Inc.
+ 
+-timestamp='2006-02-27'
++timestamp='2009-04-27'
+ 
+ # This file is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by
+@@ -56,8 +56,8 @@
+ GNU config.guess ($timestamp)
+ 
+ Originally written by Per Bothner.
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+-Free Software Foundation, Inc.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
++2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 
+ This is free software; see the source for copying conditions.  There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -161,6 +161,7 @@
+ 	    arm*) machine=arm-unknown ;;
+ 	    sh3el) machine=shl-unknown ;;
+ 	    sh3eb) machine=sh-unknown ;;
++	    sh5el) machine=sh5le-unknown ;;
+ 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ 	esac
+ 	# The Operating System including object format, if it has switched
+@@ -211,7 +212,7 @@
+ 	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ 	exit ;;
+     macppc:MirBSD:*:*)
+-	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
++	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ 	exit ;;
+     *:MirBSD:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+@@ -323,14 +324,30 @@
+ 	case `/usr/bin/uname -p` in
+ 	    sparc) echo sparc-icl-nx7; exit ;;
+ 	esac ;;
++    s390x:SunOS:*:*)
++	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++	exit ;;
+     sun4H:SunOS:5.*:*)
+ 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ 	exit ;;
+     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ 	exit ;;
+-    i86pc:SunOS:5.*:*)
+-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
++    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
++	eval $set_cc_for_build
++	SUN_ARCH="i386"
++	# If there is a compiler, see if it is configured for 64-bit objects.
++	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
++	# This test works for both compilers.
++	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
++	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
++		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
++		grep IS_64BIT_ARCH >/dev/null
++	    then
++		SUN_ARCH="x86_64"
++	    fi
++	fi
++	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ 	exit ;;
+     sun4*:SunOS:6*:*)
+ 	# According to config.sub, this is the proper way to canonicalize
+@@ -531,7 +548,7 @@
+ 		echo rs6000-ibm-aix3.2
+ 	fi
+ 	exit ;;
+-    *:AIX:*:[45])
++    *:AIX:*:[456])
+ 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ 		IBM_ARCH=rs6000
+@@ -771,6 +788,8 @@
+ 	case ${UNAME_MACHINE} in
+ 	    pc98)
+ 		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++	    amd64)
++		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ 	    *)
+ 		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ 	esac
+@@ -778,10 +797,7 @@
+     i*:CYGWIN*:*)
+ 	echo ${UNAME_MACHINE}-pc-cygwin
+ 	exit ;;
+-    i*:MINGW*:*)
+-	echo ${UNAME_MACHINE}-pc-mingw32
+-	exit ;;
+-    i*:MSYS_NT-*:*:*)
++    *:MINGW*:*)
+ 	echo ${UNAME_MACHINE}-pc-mingw32
+ 	exit ;;
+     i*:windows32*:*)
+@@ -791,12 +807,18 @@
+     i*:PW*:*)
+ 	echo ${UNAME_MACHINE}-pc-pw32
+ 	exit ;;
+-    x86:Interix*:[345]*)
+-	echo i586-pc-interix${UNAME_RELEASE}
+-	exit ;;
+-    EM64T:Interix*:[345]*)
+-	echo x86_64-unknown-interix${UNAME_RELEASE}
+-	exit ;;
++    *:Interix*:[3456]*)
++    	case ${UNAME_MACHINE} in
++	    x86)
++		echo i586-pc-interix${UNAME_RELEASE}
++		exit ;;
++	    EM64T | authenticamd | genuineintel)
++		echo x86_64-unknown-interix${UNAME_RELEASE}
++		exit ;;
++	    IA64)
++		echo ia64-unknown-interix${UNAME_RELEASE}
++		exit ;;
++	esac ;;
+     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ 	echo i${UNAME_MACHINE}-pc-mks
+ 	exit ;;
+@@ -830,6 +852,22 @@
+ 	echo ${UNAME_MACHINE}-pc-minix
+ 	exit ;;
+     arm*:Linux:*:*)
++	eval $set_cc_for_build
++	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
++	    | grep -q __ARM_EABI__
++	then
++	    echo ${UNAME_MACHINE}-unknown-linux-gnu
++	else
++	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
++	        | grep -q __ARM_PCS_VFP
++	    then
++	        echo ${UNAME_MACHINE}-unknown-linux-gnueabi
++	    else
++	        echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
++	    fi
++	fi
++	exit ;;
++    avr32*:Linux:*:*)
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 	exit ;;
+     cris:Linux:*:*)
+@@ -919,6 +957,9 @@
+ 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ 	exit ;;
++    padre:Linux:*:*)
++	echo sparc-unknown-linux-gnu
++	exit ;;
+     parisc:Linux:*:* | hppa:Linux:*:*)
+ 	# Look for CPU level
+ 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+@@ -948,6 +989,9 @@
+     x86_64:Linux:*:*)
+ 	echo x86_64-unknown-linux-gnu
+ 	exit ;;
++    xtensa*:Linux:*:*)
++    	echo ${UNAME_MACHINE}-unknown-linux-gnu
++	exit ;;
+     i*86:Linux:*:*)
+ 	# The BFD linker knows what the default object file format is, so
+ 	# first see if it will tell us. cd to the root directory to prevent
+@@ -966,9 +1010,6 @@
+ 	  a.out-i386-linux)
+ 		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ 		exit ;;
+-	  coff-i386)
+-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+-		exit ;;
+ 	  "")
+ 		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+ 		# one that does not give us useful --help.
+@@ -990,7 +1031,7 @@
+ 	LIBC=gnulibc1
+ 	# endif
+ 	#else
+-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun)
++	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ 	LIBC=gnu
+ 	#else
+ 	LIBC=gnuaout
+@@ -1083,8 +1124,11 @@
+     pc:*:*:*)
+ 	# Left here for compatibility:
+         # uname -m prints for DJGPP always 'pc', but it prints nothing about
+-        # the processor, so we play safe by assuming i386.
+-	echo i386-pc-msdosdjgpp
++        # the processor, so we play safe by assuming i586.
++	# Note: whatever this is, it MUST be the same as what config.sub
++	# prints for the "djgpp" host, or else GDB configury will decide that
++	# this is a cross-build.
++	echo i586-pc-msdosdjgpp
+         exit ;;
+     Intel:Mach:3*:*)
+ 	echo i386-pc-mach3
+@@ -1122,6 +1166,16 @@
+     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+           && { echo i486-ncr-sysv4; exit; } ;;
++    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
++	OS_REL='.3'
++	test -r /etc/.relid \
++	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
++	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
++	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
++	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
++	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
++	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
++	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ 	echo m68k-unknown-lynxos${UNAME_RELEASE}
+ 	exit ;;
+@@ -1197,6 +1251,9 @@
+     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+ 	echo i586-pc-beos
+ 	exit ;;
++    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
++	echo i586-pc-haiku
++	exit ;;
+     SX-4:SUPER-UX:*:*)
+ 	echo sx4-nec-superux${UNAME_RELEASE}
+ 	exit ;;
+@@ -1206,6 +1263,15 @@
+     SX-6:SUPER-UX:*:*)
+ 	echo sx6-nec-superux${UNAME_RELEASE}
+ 	exit ;;
++    SX-7:SUPER-UX:*:*)
++	echo sx7-nec-superux${UNAME_RELEASE}
++	exit ;;
++    SX-8:SUPER-UX:*:*)
++	echo sx8-nec-superux${UNAME_RELEASE}
++	exit ;;
++    SX-8R:SUPER-UX:*:*)
++	echo sx8r-nec-superux${UNAME_RELEASE}
++	exit ;;
+     Power*:Rhapsody:*:*)
+ 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ 	exit ;;
+@@ -1296,6 +1362,9 @@
+     i*86:rdos:*:*)
+ 	echo ${UNAME_MACHINE}-pc-rdos
+ 	exit ;;
++    i*86:AROS:*:*)
++	echo ${UNAME_MACHINE}-pc-aros
++	exit ;;
+ esac
+ 
+ #echo '(No uname command or uname output not recognized.)' 1>&2
+@@ -1456,9 +1525,9 @@
+ the operating system you are using. It is advised that you
+ download the most up to date version of the config scripts from
+ 
+-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
++  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+ and
+-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
++  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+ 
+ If the version you run ($0) is already up to date, please
+ send the following data and any information you think might be
+--- a/scripts/config.sub
++++ b/scripts/config.sub
+@@ -1,10 +1,10 @@
+ #! /bin/sh
+ # Configuration validation subroutine script.
+ #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+-#   Inc.
++#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
++#   Free Software Foundation, Inc.
+ 
+-timestamp='2006-02-27'
++timestamp='2009-04-17'
+ 
+ # This file is (in principle) common to ALL GNU software.
+ # The presence of a machine in this file suggests that SOME GNU software
+@@ -72,8 +72,8 @@
+ version="\
+ GNU config.sub ($timestamp)
+ 
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+-Free Software Foundation, Inc.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
++2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 
+ This is free software; see the source for copying conditions.  There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+@@ -122,6 +122,7 @@
+ case $maybe_os in
+   nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+   uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
++  kopensolaris*-gnu* | \
+   storm-chaos* | os2-emx* | rtmk-nova*)
+     os=-$maybe_os
+     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+@@ -241,20 +242,24 @@
+ 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ 	| am33_2.0 \
+-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
++	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ 	| bfin \
+ 	| c4x | clipper \
+ 	| d10v | d30v | dlx | dsp16xx \
+-	| fr30 | frv \
++	| fido | fr30 | frv \
+ 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ 	| i370 | i860 | i960 | ia64 \
+ 	| ip2k | iq2000 \
+-	| m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
++	| lm32 \
++	| m32c | m32r | m32rle | m68000 | m68k | m88k \
++	| maxq | mb | microblaze | mcore | mep | metag \
+ 	| mips | mipsbe | mipseb | mipsel | mipsle \
+ 	| mips16 \
+ 	| mips64 | mips64el \
+-	| mips64vr | mips64vrel \
++	| mips64octeon | mips64octeonel \
+ 	| mips64orion | mips64orionel \
++	| mips64r5900 | mips64r5900el \
++	| mips64vr | mips64vrel \
+ 	| mips64vr4100 | mips64vr4100el \
+ 	| mips64vr4300 | mips64vr4300el \
+ 	| mips64vr5000 | mips64vr5000el \
+@@ -267,6 +272,7 @@
+ 	| mipsisa64sr71k | mipsisa64sr71kel \
+ 	| mipstx39 | mipstx39el \
+ 	| mn10200 | mn10300 \
++	| moxie \
+ 	| mt \
+ 	| msp430 \
+ 	| nios | nios2 \
+@@ -275,19 +281,17 @@
+ 	| pdp10 | pdp11 | pj | pjl \
+ 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ 	| pyramid \
+-	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
++	| score \
++	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ 	| sh64 | sh64le \
+-	| sparc | sparc64 | sparc64b | sparc64v | sparc64v2 | sparc86x | sparclet | sparclite \
+-	| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sparcv9v2 \
+-	| strongarm \
++	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
++	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
++	| spu | strongarm \
+ 	| tahoe | thumb | tic4x | tic80 | tron \
+ 	| v850 | v850e \
+ 	| we32k \
+-	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+-	| z8k)
+-		basic_machine=$basic_machine-unknown
+-		;;
+-	m32c)
++	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
++	| z8k | z80)
+ 		basic_machine=$basic_machine-unknown
+ 		;;
+ 	m6811 | m68hc11 | m6812 | m68hc12)
+@@ -319,25 +323,28 @@
+ 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+-	| avr-* \
++	| avr-* | avr32-* \
+ 	| bfin-* | bs2000-* \
+ 	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ 	| clipper-* | craynv-* | cydra-* \
+ 	| d10v-* | d30v-* | dlx-* \
+ 	| elxsi-* \
+-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
++	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ 	| h8300-* | h8500-* \
+ 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ 	| i*86-* | i860-* | i960-* | ia64-* \
+ 	| ip2k-* | iq2000-* \
+-	| m32r-* | m32rle-* \
++	| lm32-* \
++	| m32c-* | m32r-* | m32rle-* \
+ 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+-	| m88110-* | m88k-* | maxq-* | mcore-* \
++	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ 	| mips16-* \
+ 	| mips64-* | mips64el-* \
+-	| mips64vr-* | mips64vrel-* \
++	| mips64octeon-* | mips64octeonel-* \
+ 	| mips64orion-* | mips64orionel-* \
++	| mips64r5900-* | mips64r5900el-* \
++	| mips64vr-* | mips64vrel-* \
+ 	| mips64vr4100-* | mips64vr4100el-* \
+ 	| mips64vr4300-* | mips64vr4300el-* \
+ 	| mips64vr5000-* | mips64vr5000el-* \
+@@ -359,22 +366,24 @@
+ 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ 	| pyramid-* \
+ 	| romp-* | rs6000-* \
+-	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
++	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+-	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc64v2-* | sparc86x-* | sparclet-* \
++	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ 	| sparclite-* \
+-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sparcv9v2-* | strongarm-* | sv1-* | sx?-* \
++	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ 	| tahoe-* | thumb-* \
+-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
++	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ 	| tron-* \
+ 	| v850-* | v850e-* | vax-* \
+ 	| we32k-* \
+-	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+-	| xstormy16-* | xtensa-* \
++	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
++	| xstormy16-* | xtensa*-* \
+ 	| ymp-* \
+-	| z8k-*)
++	| z8k-* | z80-*)
+ 		;;
+-	m32c-*)
++	# Recognize the basic CPU types without company name, with glob match.
++	xtensa*)
++		basic_machine=$basic_machine-unknown
+ 		;;
+ 	# Recognize the various machine names and aliases which stand
+ 	# for a CPU type and a company and sometimes even an OS.
+@@ -438,6 +447,10 @@
+ 		basic_machine=m68k-apollo
+ 		os=-bsd
+ 		;;
++	aros)
++		basic_machine=i386-pc
++		os=-aros
++		;;
+ 	aux)
+ 		basic_machine=m68k-apple
+ 		os=-aux
+@@ -446,10 +459,22 @@
+ 		basic_machine=ns32k-sequent
+ 		os=-dynix
+ 		;;
++	blackfin)
++		basic_machine=bfin-unknown
++		os=-linux
++		;;
++	blackfin-*)
++		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
++		os=-linux
++		;;
+ 	c90)
+ 		basic_machine=c90-cray
+ 		os=-unicos
+ 		;;
++        cegcc)
++		basic_machine=arm-unknown
++		os=-cegcc
++		;;
+ 	convex-c1)
+ 		basic_machine=c1-convex
+ 		os=-bsd
+@@ -478,8 +503,8 @@
+ 		basic_machine=craynv-cray
+ 		os=-unicosmp
+ 		;;
+-	cr16c)
+-		basic_machine=cr16c-unknown
++	cr16)
++		basic_machine=cr16-unknown
+ 		os=-elf
+ 		;;
+ 	crds | unos)
+@@ -517,6 +542,10 @@
+ 		basic_machine=m88k-motorola
+ 		os=-sysv3
+ 		;;
++	dicos)
++		basic_machine=i686-pc
++		os=-dicos
++		;;
+ 	djgpp)
+ 		basic_machine=i586-pc
+ 		os=-msdosdjgpp
+@@ -671,6 +700,14 @@
+ 		basic_machine=m68k-isi
+ 		os=-sysv
+ 		;;
++	m68knommu)
++		basic_machine=m68k-unknown
++		os=-linux
++		;;
++	m68knommu-*)
++		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
++		os=-linux
++		;;
+ 	m88k-omron*)
+ 		basic_machine=m88k-omron
+ 		;;
+@@ -686,6 +723,10 @@
+ 		basic_machine=i386-pc
+ 		os=-mingw32
+ 		;;
++	mingw32ce)
++		basic_machine=arm-unknown
++		os=-mingw32ce
++		;;
+ 	miniframe)
+ 		basic_machine=m68000-convergent
+ 		;;
+@@ -812,6 +853,14 @@
+ 		basic_machine=i860-intel
+ 		os=-osf
+ 		;;
++	parisc)
++		basic_machine=hppa-unknown
++		os=-linux
++		;;
++	parisc-*)
++		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
++		os=-linux
++		;;
+ 	pbd)
+ 		basic_machine=sparc-tti
+ 		;;
+@@ -913,6 +962,10 @@
+ 	sb1el)
+ 		basic_machine=mipsisa64sb1el-unknown
+ 		;;
++	sde)
++		basic_machine=mipsisa32-sde
++		os=-elf
++		;;
+ 	sei)
+ 		basic_machine=mips-sei
+ 		os=-seiux
+@@ -924,6 +977,9 @@
+ 		basic_machine=sh-hitachi
+ 		os=-hms
+ 		;;
++	sh5el)
++		basic_machine=sh5le-unknown
++		;;
+ 	sh64)
+ 		basic_machine=sh64-unknown
+ 		;;
+@@ -1013,6 +1069,10 @@
+ 		basic_machine=tic6x-unknown
+ 		os=-coff
+ 		;;
++	tile*)
++		basic_machine=tile-unknown
++		os=-linux-gnu
++		;;
+ 	tx39)
+ 		basic_machine=mipstx39-unknown
+ 		;;
+@@ -1088,6 +1148,10 @@
+ 		basic_machine=z8k-unknown
+ 		os=-sim
+ 		;;
++	z80-*-coff)
++		basic_machine=z80-unknown
++		os=-sim
++		;;
+ 	none)
+ 		basic_machine=none-none
+ 		os=-none
+@@ -1126,10 +1190,10 @@
+ 	we32k)
+ 		basic_machine=we32k-att
+ 		;;
+-	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
++	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ 		basic_machine=sh-unknown
+ 		;;
+-	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sparcv9v2)
++	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ 		basic_machine=sparc-sun
+ 		;;
+ 	cydra)
+@@ -1198,8 +1262,9 @@
+ 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
++	      | -kopensolaris* \
+ 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+-	      | -aos* \
++	      | -aos* | -aros* \
+ 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+@@ -1208,7 +1273,7 @@
+ 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+-	      | -chorusos* | -chorusrdb* \
++	      | -chorusos* | -chorusrdb* | -cegcc* \
+ 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ 	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ 	      | -uxpv* | -beos* | -mpeix* | -udk* \
+@@ -1218,7 +1283,7 @@
+ 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+-	      | -skyos* | -haiku* | -rdos*)
++	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ 	# Remember, each alternative MUST END IN *, to match a version number.
+ 		;;
+ 	-qnx*)
+@@ -1348,6 +1413,9 @@
+ 	-zvmoe)
+ 		os=-zvmoe
+ 		;;
++	-dicos*)
++		os=-dicos
++		;;
+ 	-none)
+ 		;;
+ 	*)
+@@ -1370,6 +1438,12 @@
+ # system, and we'll never get to this point.
+ 
+ case $basic_machine in
++        score-*)
++		os=-elf
++		;;
++        spu-*)
++		os=-elf
++		;;
+ 	*-acorn)
+ 		os=-riscix1.2
+ 		;;
+@@ -1379,9 +1453,9 @@
+ 	arm*-semi)
+ 		os=-aout
+ 		;;
+-    c4x-* | tic4x-*)
+-        os=-coff
+-        ;;
++        c4x-* | tic4x-*)
++        	os=-coff
++		;;
+ 	# This must come before the *-dec entry.
+ 	pdp10-*)
+ 		os=-tops20
+@@ -1407,6 +1481,9 @@
+ 	m68*-cisco)
+ 		os=-aout
+ 		;;
++        mep-*)
++		os=-elf
++		;;
+ 	mips*-cisco)
+ 		os=-elf
+ 		;;
--- eglibc-2.13.orig/debian/patches/any/submitted-setlocale-alloca.diff
+++ eglibc-2.13/debian/patches/any/submitted-setlocale-alloca.diff
@@ -0,0 +1,57 @@
+From: Florian Weimer <fweimer@redhat.com>
+Date: Wed, 28 May 2014 14:41:52 +0200
+Subject: [PATCH 1/3] setlocale: Use the heap for the copy of the locale
+ argument
+
+---
+ ChangeLog          |  5 +++++
+ locale/setlocale.c | 14 ++++++++++++--
+ 2 files changed, 17 insertions(+), 2 deletions(-)
+
+Index: eglibc-2.13/locale/setlocale.c
+===================================================================
+--- eglibc-2.13.orig/locale/setlocale.c	2014-07-08 20:49:34.000000000 +0200
++++ eglibc-2.13/locale/setlocale.c	2014-07-08 20:52:35.307469666 +0200
+@@ -244,6 +244,8 @@
+ 	 of entries of the form `CATEGORY=VALUE'.  */
+       const char *newnames[__LC_LAST];
+       struct __locale_data *newdata[__LC_LAST];
++      /* Copy of the locale argument, for in-place splitting.  */
++      char *locale_copy = NULL;
+ 
+       /* Set all name pointers to the argument name.  */
+       for (category = 0; category < __LC_LAST; ++category)
+@@ -253,7 +255,13 @@
+       if (__builtin_expect (strchr (locale, ';') != NULL, 0))
+ 	{
+ 	  /* This is a composite name.  Make a copy and split it up.  */
+-	  char *np = strdupa (locale);
++	  locale_copy = strdup (locale);
++	  if (__glibc_unlikely (locale_copy == NULL))
++	    {
++	      __libc_rwlock_unlock (__libc_setlocale_lock);
++	      return NULL;
++	    }
++	  char *np = locale_copy;
+ 	  char *cp;
+ 	  int cnt;
+ 
+@@ -271,6 +279,7 @@
+ 		{
+ 		error_return:
+ 		  __libc_rwlock_unlock (__libc_setlocale_lock);
++		  free (locale_copy);
+ 
+ 		  /* Bogus category name.  */
+ 		  ERROR_RETURN;
+@@ -363,8 +372,9 @@
+       /* Critical section left.  */
+       __libc_rwlock_unlock (__libc_setlocale_lock);
+ 
+-      /* Free the resources (the locale path variable).  */
++      /* Free the resources.  */
+       free (locale_path);
++      free (locale_copy);
+ 
+       return composite;
+     }
--- eglibc-2.13.orig/debian/patches/any/local-ld-multiarch.diff
+++ eglibc-2.13/debian/patches/any/local-ld-multiarch.diff
@@ -0,0 +1,50 @@
+2012-05-01  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* elf/Makefile(trusted-dirs.st): Fix DL_DST_LIB computation with
+	two level slibdir directories.
+
+2009-09-08  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* Makeconfig: add support for multiarch compat directories.
+
+---
+ Makeconfig   |    9 +++++++++
+ elf/Makefile |    2 +-
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+--- a/Makeconfig
++++ b/Makeconfig
+@@ -191,6 +191,11 @@
+ endif
+ inst_libdir = $(install_root)$(libdir)
+ 
++# Compat places to look for libraries
++ifndef extra_libdir
++extra_libdir = /lib:$(exec_prefix)/lib
++endif
++
+ # Where to install the shared library and dynamic linker.
+ ifndef slibdir
+ slibdir = $(exec_prefix)/lib
+@@ -523,6 +528,10 @@
+ default-rpath = $(libdir)
+ endif
+ 
++ifdef extra_libdir
++default-rpath += :$(extra_libdir)
++endif
++
+ ifndef link-extra-libs
+ link-extra-libs = $(LDLIBS-$(@F))
+ link-extra-libs-static = $(link-extra-libs)
+--- a/elf/Makefile
++++ b/elf/Makefile
+@@ -419,7 +419,7 @@
+ 	$(make-target-directory)
+ 	echo "$(subst :, ,$(default-rpath) $(user-defined-trusted-dirs))"    \
+ 	| $(AWK) -f gen-trusted-dirs.awk > ${@:st=T};
+-	echo '#define DL_DST_LIB "$(notdir $(slibdir))"' >> ${@:st=T}
++	echo '#define DL_DST_LIB "$(shell echo $(slibdir) | sed 's,/,,')"' >> ${@:st=T}
+ 	$(move-if-change) ${@:st=T} ${@:st=h}
+ 	touch $@
+ CPPFLAGS-dl-load.c = -I$(objpfx). -I$(csu-objpfx).
--- eglibc-2.13.orig/debian/patches/any/local-linuxthreads-signals.diff
+++ eglibc-2.13/debian/patches/any/local-linuxthreads-signals.diff
@@ -0,0 +1,18 @@
+---
+ linuxthreads/signals.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/linuxthreads/signals.c
++++ b/linuxthreads/signals.c
+@@ -99,9 +99,11 @@
+       if (act->sa_handler != SIG_IGN && act->sa_handler != SIG_DFL
+ 	  && sig > 0 && sig < NSIG)
+ 	{
++#if !defined(__FreeBSD_kernel__)
+ 	  if (act->sa_flags & SA_SIGINFO)
+ 	    newact.sa_handler = (__sighandler_t) __pthread_sighandler_rt;
+ 	  else
++#endif	  
+ 	    newact.sa_handler = (__sighandler_t) __pthread_sighandler;
+ 	  if (old == SIG_IGN || old == SIG_DFL || old == SIG_ERR)
+ 	    __sighandler[sig].old = (arch_sighandler_t) act->sa_handler;
--- eglibc-2.13.orig/debian/patches/any/submitted-nis-netgrp.diff
+++ eglibc-2.13/debian/patches/any/submitted-nis-netgrp.diff
@@ -0,0 +1,29 @@
+This assertion breaks applications if they redefine malloc/free functions,
+malloc_usable_size may then report wrong values.  This is true for instance
+with bash, whereas bash-static works fine because it does not use its own
+wrapper functions.  See #322011 and merged bugs.
+
+# DP: Dpatch author: Denis Barbier
+# DP: Patch author: Denis Barbier
+# DP: Upstream status: BZ692
+# DP: Date: 2006-01-12
+
+
+---
+ nis/nss_nis/nis-netgrp.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/nis/nss_nis/nis-netgrp.c
++++ b/nis/nss_nis/nis-netgrp.c
+@@ -72,7 +72,10 @@
+ 	 and the last byte is filled with NUL.  So we can simply
+ 	 use that buffer.  */
+       assert (len >= 0);
+-      assert (malloc_usable_size (netgrp->data) >= len + 1);
++      /* Call to malloc_usable_size disabled, this breaks if applications
++         redefine malloc/free with a different implementation.
++         This assert is always true, see yp_match.  */
++      /* assert (malloc_usable_size (netgrp->data) >= len + 1); */
+       assert (netgrp->data[len] == '\0');
+ 
+       netgrp->data_size = len;
--- eglibc-2.13.orig/debian/patches/any/submitted-longdouble.diff
+++ eglibc-2.13/debian/patches/any/submitted-longdouble.diff
@@ -0,0 +1,46 @@
+---
+ math/Makefile |   20 ++++++++++++++------
+ 1 file changed, 14 insertions(+), 6 deletions(-)
+
+--- a/math/Makefile
++++ b/math/Makefile
+@@ -95,13 +95,17 @@
+ 	bug-nextafter bug-nexttoward bug-tgmath1 test-tgmath-int \
+ 	test-dbl-wrap
+ tests-$(OPTION_EGLIBC_LIBM_BIG) += atest-exp atest-sincos atest-exp2
+-# We do the `long double' tests only if this data type is available and
+-# distinct from `double'.
++# We do the `long double' tests only if this data type is available.
+ test-longdouble-yes = test-ldouble test-ildoubl
+ distribute += $(test-longdouble-yes:=.c)
+ 
++ifeq ($(long-double-fcts),yes)
++# If we have distinct types then enable testing.
++test-long-double-fcts = yes
++endif
++
+ ifneq (no,$(PERL))
+-libm-tests = test-float test-double $(test-longdouble-$(long-double-fcts)) \
++libm-tests = test-float test-double $(test-longdouble-$(test-long-double-fcts)) \
+ 	test-ifloat test-idouble
+ libm-tests.o = $(addsuffix .o,$(libm-tests))
+ 
+@@ -178,11 +182,15 @@
+ ifneq ($(long-double-fcts),yes)
+ # The `double' and `long double' types are the same on this machine.
+ # We won't compile the `long double' code at all.  Tell the `double' code
+-# to define aliases for the `FUNCl' names.  To avoid type conflicts in
+-# defining those aliases, tell <math.h> to declare the `FUNCl' names with
+-# `double' instead of `long double'.
++# to define aliases for the `FUNCl' names.
++ifeq ($(header-long-double-fcts),yes)
++math-CPPFLAGS += -DNO_LONG_DOUBLE
++else
++# To avoid type conflicts in  defining those aliases, tell <math.h> to
++# declare the `FUNCl' names with `double' instead of `long double'.
+ math-CPPFLAGS += -DNO_LONG_DOUBLE -D_Mlong_double_=double
+ endif
++endif
+ 
+ # The fdlibm code generates a lot of these warnings but is otherwise clean.
+ override CFLAGS += -Wno-uninitialized
--- eglibc-2.13.orig/debian/patches/any/local-disable-test-tgmath2.diff
+++ eglibc-2.13/debian/patches/any/local-disable-test-tgmath2.diff
@@ -0,0 +1,15 @@
+---
+ math/Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/math/Makefile
++++ b/math/Makefile
+@@ -92,7 +92,7 @@
+ # Rules for the test suite.
+ tests = test-matherr test-fenv basic-test \
+ 	test-misc test-fpucw tst-definitions test-tgmath test-tgmath-ret \
+-	bug-nextafter bug-nexttoward bug-tgmath1 test-tgmath-int test-tgmath2 \
++	bug-nextafter bug-nexttoward bug-tgmath1 test-tgmath-int \
+ 	test-dbl-wrap
+ tests-$(OPTION_EGLIBC_LIBM_BIG) += atest-exp atest-sincos atest-exp2
+ # We do the `long double' tests only if this data type is available and
--- eglibc-2.13.orig/debian/patches/any/local-o_cloexec.diff
+++ eglibc-2.13/debian/patches/any/local-o_cloexec.diff
@@ -0,0 +1,22 @@
+---
+ sysdeps/unix/opendir.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sysdeps/unix/opendir.c
++++ b/sysdeps/unix/opendir.c
+@@ -146,6 +146,7 @@
+ #ifdef __ASSUME_O_CLOEXEC
+ # define check_have_o_cloexec(fd) 1
+ #else
++#ifdef O_CLOEXEC
+ static int
+ check_have_o_cloexec (int fd)
+ {
+@@ -154,6 +155,7 @@
+   return __have_o_cloexec > 0;
+ }
+ #endif
++#endif
+ 
+ 
+ DIR *
--- eglibc-2.13.orig/debian/patches/any/local-ldconfig-ignore-ld.so.diff
+++ eglibc-2.13/debian/patches/any/local-ldconfig-ignore-ld.so.diff
@@ -0,0 +1,56 @@
+diff --git a/elf/ldconfig.c b/elf/ldconfig.c
+index 4211f4c..6425f8e 100644
+--- a/elf/ldconfig.c
++++ b/elf/ldconfig.c
+@@ -450,6 +450,23 @@ chroot_stat (const char *real_path, const char *path, struct stat64 *st)
+   return ret;
+ }
+ 
++static const char * const ld_sonames[] =
++{
++  "ld-kfreebsd-x86-64.so.1",
++  "ld-linux-aarch64.so.1",
++  "ld-linux-aarch64_be.so.1",
++  "ld-linux-armhf.so.3",
++  "ld-linux-ia64.so.2",
++  "ld-linux-mipsn8.so.1",
++  "ld-linux-x32.so.2",
++  "ld-linux-x86-64.so.2",
++  "ld-linux.so.2",
++  "ld-linux.so.3",
++  "ld.so.1",
++  "ld64.so.1",
++  "ld64.so.2",
++};
++
+ /* Create a symbolic link from soname to libname in directory path.  */
+ static void
+ create_links (const char *real_path, const char *path, const char *libname,
+@@ -460,6 +477,7 @@ create_links (const char *real_path, const char *path, const char *libname,
+   struct stat64 stat_lib, stat_so, lstat_so;
+   int do_link = 1;
+   int do_remove = 1;
++  int i;
+   /* XXX: The logics in this function should be simplified.  */
+ 
+   /* Get complete path.  */
+@@ -488,6 +506,18 @@ create_links (const char *real_path, const char *path, const char *libname,
+ 	  error (0, 0, _("Can't stat %s\n"), full_libname);
+ 	  return;
+ 	}
++
++      /* Do not change the symlink pointer to the dynamic linker except for
++	 non-existing symlinks, as it might break break multiarch systems.  */
++      for (i = 0; i < sizeof (ld_sonames) / sizeof (ld_sonames[0]); i++)
++	if (__glibc_unlikely(!strcmp(soname, ld_sonames[i])))
++	  {
++	    if (opt_verbose)
++	      error (0, 0, _("%s is the dynamic linker, ignoring\n"),
++			     full_libname);
++	    do_link = 0;
++	  }
++
+       if (stat_lib.st_dev == stat_so.st_dev
+ 	  && stat_lib.st_ino == stat_so.st_ino)
+ 	/* Link is already correct.  */
+
--- eglibc-2.13.orig/debian/patches/any/cvs-getaddrinfo-idn.diff
+++ eglibc-2.13/debian/patches/any/cvs-getaddrinfo-idn.diff
@@ -0,0 +1,19 @@
+2011-07-26  Andreas Schwab  <schwab@redhat.com>
+
+	* sysdeps/posix/getaddrinfo.c (gaih_inet): Don't discard result of
+	encoding to ACE if AI_IDN.
+
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -432,7 +432,10 @@ gaih_inet (const char *name, const struct gaih_service *service,
+ 	  /* In case the output string is the same as the input string
+ 	     no new string has been allocated.  */
+ 	  if (p != name)
+-	    malloc_name = true;
++	    {
++	      name = p;
++	      malloc_name = true;
++	    }
+ 	}
+ #endif
+ 
--- eglibc-2.13.orig/debian/patches/any/submitted-fileops-and-signals.diff
+++ eglibc-2.13/debian/patches/any/submitted-fileops-and-signals.diff
@@ -0,0 +1,26 @@
+Index: glibc-2.7/libio/fileops.c
+===================================================================
+--- glibc-2.7.orig/libio/fileops.c	2007-10-23 08:46:13.000000000 -0400
++++ glibc-2.7/libio/fileops.c	2007-10-23 08:50:51.000000000 -0400
+@@ -522,10 +522,19 @@
+     fp->_cur_column = INTUSE(_IO_adjust_column) (fp->_cur_column - 1, data,
+ 						 count) + 1;
+   _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base);
+-  fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_buf_base;
+-  fp->_IO_write_end = (fp->_mode <= 0
++  if (__builtin_expect (count == to_do, 1))
++    {
++      fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_buf_base;
++      fp->_IO_write_end = (fp->_mode <= 0
+ 		       && (fp->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED))
+ 		       ? fp->_IO_buf_base : fp->_IO_buf_end);
++    }
++  else if (count > 0 && fp->_IO_write_base == data)
++    {
++      memmove (data, data+count, 
++               fp->_IO_write_ptr - fp->_IO_write_base - count);
++      fp->_IO_write_ptr -= count;
++    }
+   return count;
+ }
+ 
--- eglibc-2.13.orig/debian/patches/any/cvs-ld.so-rpath-origin.diff
+++ eglibc-2.13/debian/patches/any/cvs-ld.so-rpath-origin.diff
@@ -0,0 +1,300 @@
+2011-05-11  Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #12393]
+	* elf/dl-load.c (is_trusted_path): Remove unnecessary test.
+	(is_trusted_path_normalize): Skip initial colon.  Append slash
+	to empty buffer.  Duplicate is_trusted_path code but allow
+	constructed patch to be prefix.
+	(is_dst): Allow $ORIGIN followed by /.
+	(_dl_dst_substitute): Correct clearing of check_for_trusted.
+	Correct testing of result of is_trusted_path_normalize
+	(decompose_rpath): Fix warning.
+
+2011-05-07  Petr Baudis  <pasky@suse.cz>
+	    Ulrich Drepper  <drepper@gmail.com>
+
+	[BZ #12393]
+	* elf/dl-load.c (fillin_rpath): Move trusted path check...
+	(is_trusted_path): ...to here.
+	(is_norm_trusted_path): Add wrapper for /../ and /./ normalization.
+	(_dl_dst_substitute): Verify expanded $ORIGIN path elements
+	using is_norm_trusted_path() in setuid scripts.
+
+2011-03-14  Andreas Schwab  <schwab@redhat.com>
+
+	* elf/dl-load.c (_dl_dst_substitute): When skipping the first
+	rpath element also skip the following colon.
+	(expand_dynamic_string_token): Add is_path parameter and pass
+	down to DL_DST_REQUIRED and _dl_dst_substitute.
+	(decompose_rpath): Call expand_dynamic_string_token with
+	non-zero is_path.  Ignore empty rpaths.
+	(_dl_map_object_from_fd): Call expand_dynamic_string_token
+	with zero is_path.
+
+---
+ elf/dl-load.c |  162 +++++++++++++++++++++++++++++++++++++++++++++-------------
+ 1 file changed, 126 insertions(+), 36 deletions(-)
+
+--- a/elf/dl-load.c
++++ b/elf/dl-load.c
+@@ -168,6 +168,87 @@
+ }
+ 
+ 
++static bool
++is_trusted_path (const char *path, size_t len)
++{
++  const char *trun = system_dirs;
++
++  for (size_t idx = 0; idx < nsystem_dirs_len; ++idx)
++    {
++      if (len == system_dirs_len[idx] && memcmp (trun, path, len) == 0)
++	/* Found it.  */
++	return true;
++
++      trun += system_dirs_len[idx] + 1;
++    }
++
++  return false;
++}
++
++
++static bool
++is_trusted_path_normalize (const char *path, size_t len)
++{
++  if (len == 0)
++    return false;
++
++  if (*path == ':')
++    {
++      ++path;
++      --len;
++    }
++
++  char *npath = (char *) alloca (len + 2);
++  char *wnp = npath;
++  while (*path != '\0')
++    {
++      if (path[0] == '/')
++	{
++	  if (path[1] == '.')
++	    {
++	      if (path[2] == '.' && (path[3] == '/' || path[3] == '\0'))
++		{
++		  while (wnp > npath && *--wnp != '/')
++		    ;
++		  path += 3;
++		  continue;
++		}
++	      else if (path[2] == '/' || path[2] == '\0')
++		{
++		  path += 2;
++		  continue;
++		}
++	    }
++
++	  if (wnp > npath && wnp[-1] == '/')
++	    {
++	      ++path;
++	      continue;
++	    }
++	}
++
++      *wnp++ = *path++;
++    }
++
++  if (wnp == npath || wnp[-1] != '/')
++    *wnp++ = '/';
++
++  const char *trun = system_dirs;
++
++  for (size_t idx = 0; idx < nsystem_dirs_len; ++idx)
++    {
++      if (wnp - npath >= system_dirs_len[idx]
++	  && memcmp (trun, npath, system_dirs_len[idx]) == 0)
++	/* Found it.  */
++	return true;
++
++      trun += system_dirs_len[idx] + 1;
++    }
++
++  return false;
++}
++
++
+ static size_t
+ is_dst (const char *start, const char *name, const char *str,
+ 	int is_path, int secure)
+@@ -200,7 +281,8 @@
+     return 0;
+ 
+   if (__builtin_expect (secure, 0)
+-      && ((name[len] != '\0' && (!is_path || name[len] != ':'))
++      && ((name[len] != '\0' && name[len] != '/'
++	   && (!is_path || name[len] != ':'))
+ 	  || (name != start + 1 && (!is_path || name[-2] != ':'))))
+     return 0;
+ 
+@@ -240,13 +322,14 @@
+ 		    int is_path)
+ {
+   const char *const start = name;
+-  char *last_elem, *wp;
+ 
+   /* Now fill the result path.  While copying over the string we keep
+      track of the start of the last path element.  When we come accross
+      a DST we copy over the value or (if the value is not available)
+      leave the entire path element out.  */
+-  last_elem = wp = result;
++  char *wp = result;
++  char *last_elem = result;
++  bool check_for_trusted = false;
+ 
+   do
+     {
+@@ -265,6 +348,9 @@
+ 	      else
+ #endif
+ 		repl = l->l_origin;
++
++	      check_for_trusted = (INTUSE(__libc_enable_secure)
++				   && l->l_type == lt_executable);
+ 	    }
+ 	  else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0)
+ 	    repl = GLRO(dl_platform);
+@@ -284,6 +370,10 @@
+ 	      name += len;
+ 	      while (*name != '\0' && (!is_path || *name != ':'))
+ 		++name;
++	      /* Also skip following colon if this is the first rpath
++		 element, but keep an empty element at the end.  */
++	      if (wp == result && is_path && *name == ':' && name[1] != '\0')
++		++name;
+ 	    }
+ 	  else
+ 	    /* No DST we recognize.  */
+@@ -293,11 +383,28 @@
+ 	{
+ 	  *wp++ = *name++;
+ 	  if (is_path && *name == ':')
+-	    last_elem = wp;
++	    {
++	      /* In SUID/SGID programs, after $ORIGIN expansion the
++		 normalized path must be rooted in one of the trusted
++		 directories.  */
++	      if (__builtin_expect (check_for_trusted, false)
++		  && !is_trusted_path_normalize (last_elem, wp - last_elem))
++		wp = last_elem;
++	      else
++		last_elem = wp;
++
++	      check_for_trusted = false;
++	    }
+ 	}
+     }
+   while (*name != '\0');
+ 
++  /* In SUID/SGID programs, after $ORIGIN expansion the normalized
++     path must be rooted in one of the trusted directories.  */
++  if (__builtin_expect (check_for_trusted, false)
++      && !is_trusted_path_normalize (last_elem, wp - last_elem))
++    wp = last_elem;
++
+   *wp = '\0';
+ 
+   return result;
+@@ -310,7 +417,7 @@
+    belonging to the map is loaded.  In this case the path element
+    containing $ORIGIN is left out.  */
+ static char *
+-expand_dynamic_string_token (struct link_map *l, const char *s)
++expand_dynamic_string_token (struct link_map *l, const char *s, int is_path)
+ {
+   /* We make two runs over the string.  First we determine how large the
+      resulting string is and then we copy it over.  Since this is no
+@@ -321,7 +428,7 @@
+   char *result;
+ 
+   /* Determine the number of DST elements.  */
+-  cnt = DL_DST_COUNT (s, 1);
++  cnt = DL_DST_COUNT (s, is_path);
+ 
+   /* If we do not have to replace anything simply copy the string.  */
+   if (__builtin_expect (cnt, 0) == 0)
+@@ -335,7 +442,7 @@
+   if (result == NULL)
+     return NULL;
+ 
+-  return _dl_dst_substitute (l, s, result, 1);
++  return _dl_dst_substitute (l, s, result, is_path);
+ }
+ 
+ 
+@@ -407,33 +514,8 @@
+ 	cp[len++] = '/';
+ 
+       /* Make sure we don't use untrusted directories if we run SUID.  */
+-      if (__builtin_expect (check_trusted, 0))
+-	{
+-	  const char *trun = system_dirs;
+-	  size_t idx;
+-	  int unsecure = 1;
+-
+-	  /* All trusted directories must be complete names.  */
+-	  if (cp[0] == '/')
+-	    {
+-	      for (idx = 0; idx < nsystem_dirs_len; ++idx)
+-		{
+-		  if (len == system_dirs_len[idx]
+-		      && memcmp (trun, cp, len) == 0)
+-		    {
+-		      /* Found it.  */
+-		      unsecure = 0;
+-		      break;
+-		    }
+-
+-		  trun += system_dirs_len[idx] + 1;
+-		}
+-	    }
+-
+-	  if (unsecure)
+-	    /* Simply drop this directory.  */
+-	    continue;
+-	}
++      if (__builtin_expect (check_trusted, 0) && !is_trusted_path (cp, len))
++	continue;
+ 
+       /* See if this directory is already known.  */
+       for (dirp = GL(dl_all_dirs); dirp != NULL; dirp = dirp->next)
+@@ -551,13 +633,21 @@
+ 
+   /* Make a writable copy.  At the same time expand possible dynamic
+      string tokens.  */
+-  copy = expand_dynamic_string_token (l, rpath);
++  copy = expand_dynamic_string_token (l, rpath, 1);
+   if (copy == NULL)
+     {
+       errstring = N_("cannot create RUNPATH/RPATH copy");
+       goto signal_error;
+     }
+ 
++  /* Ignore empty rpaths.  */
++  if (*copy == 0)
++    {
++      free (copy);
++      sps->dirs = (struct r_search_path_elem **) -1;
++      return false;
++    }
++
+   /* Count the number of necessary elements in the result array.  */
+   nelems = 0;
+   for (cp = copy; *cp != '\0'; ++cp)
+@@ -2400,7 +2490,7 @@
+     {
+       /* The path may contain dynamic string tokens.  */
+       realname = (loader
+-		  ? expand_dynamic_string_token (loader, name)
++		  ? expand_dynamic_string_token (loader, name, 0)
+ 		  : local_strdup (name));
+       if (realname == NULL)
+ 	fd = -1;
--- eglibc-2.13.orig/debian/patches/locale/fix-LC_COLLATE-rules.diff
+++ eglibc-2.13/debian/patches/locale/fix-LC_COLLATE-rules.diff
@@ -0,0 +1,54 @@
+---
+ locale/programs/ld-collate.c |   16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+--- a/locale/programs/ld-collate.c
++++ b/locale/programs/ld-collate.c
+@@ -1555,6 +1555,7 @@
+   int i;
+   int need_undefined = 0;
+   struct section_list *sect;
++  enum coll_sort_rule *orules;
+   int ruleidx;
+   int nr_wide_elems = 0;
+ 
+@@ -1566,18 +1567,28 @@
+ 				"LC_COLLATE"));
+       return;
+     }
++  if (nrules == 0)
++    {
++      /* An error message has already been printed:
++          empty category description not allowed.  */
++      return;
++    }
+ 
+   /* If this assertion is hit change the type in `element_t'.  */
+   assert (nrules <= sizeof (runp->used_in_level) * 8);
+ 
+   /* Make sure that the `position' rule is used either in all sections
+      or in none.  */
++  sect = collate->sections;
++  while (sect != NULL && sect->rules == NULL)
++    sect = sect->next;
++  orules = sect->rules;
+   for (i = 0; i < nrules; ++i)
+     for (sect = collate->sections; sect != NULL; sect = sect->next)
+       if (sect != collate->current_section
+ 	  && sect->rules != NULL
+ 	  && ((sect->rules[i] & sort_position)
+-	      != (collate->current_section->rules[i] & sort_position)))
++	      != (orules[i] & sort_position)))
+ 	{
+ 	  WITH_CUR_LOCALE (error (0, 0, _("\
+ %s: `position' must be used for a specific level in all sections or none"),
+@@ -3362,6 +3373,9 @@
+ 		      no_error = 0;
+ 		    }
+ 		}
++	      /* Update current section.  */
++	      if (collate->cursor != NULL)
++	        collate->current_section = collate->cursor->section;
+ 
+ 	      lr_ignore_rest (ldfile, no_error);
+ 	    }
--- eglibc-2.13.orig/debian/patches/locale/preprocessor-collate.diff
+++ eglibc-2.13/debian/patches/locale/preprocessor-collate.diff
@@ -0,0 +1,342 @@
+Allow preprocessor-like directives.  These keywords were already
+defined in locale/programs/locfile-kw.h, an implementation for
+'define', 'undef', 'ifdef', 'else' and 'endif' is now provided in
+locale/programs/ld-collate.c.  For the moment, 'ifndef' and 'elif'
+are not implemented because they do not appear in locfile-kw.h.
+This patch is harmless, it only adds new keywords.
+
+# DP: Dpatch author: Denis Barbier
+# DP: Patch author: Denis Barbier
+# DP: Upstream status: BZ686
+# DP: Date: 2006-01-08
+
+---
+ locale/programs/ld-collate.c |  275 +++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 275 insertions(+)
+
+--- a/locale/programs/ld-collate.c
++++ b/locale/programs/ld-collate.c
+@@ -164,6 +164,24 @@
+   size_t line;
+ };
+ 
++/* Data type for toggles.  */
++struct toggle_list_t;
++
++struct toggle_list_t
++{
++  const char *name;
++
++  /* Predecessor in the list.  */
++  struct toggle_list_t *last;
++
++  /* This flag is set when a keyword is undefined.  */
++  int is_undefined;
++
++  /* Where does the branch come from.  */
++  const char *file;
++  size_t line;
++};
++
+ /* Sparse table of struct element_t *.  */
+ #define TABLE wchead_table
+ #define ELEMENT struct element_t *
+@@ -219,6 +237,9 @@
+   /* This value is used when handling ellipsis.  */
+   struct element_t ellipsis_weight;
+ 
++  /* This is a stack of .  */
++  struct toggle_list_t *flow_control;
++
+   /* Known collating elements.  */
+   hash_table elem_table;
+ 
+@@ -1467,6 +1488,56 @@
+ }
+ 
+ 
++static struct token *
++flow_skip (struct linereader *ldfile, const struct charmap_t *charmap,
++	   struct locale_collate_t *collate)
++{
++  int level = 0;
++  struct token *now;
++  enum token_t nowtok;
++  while (1)
++    {
++      lr_ignore_rest (ldfile, 0);
++      now = lr_token (ldfile, charmap, NULL, NULL, 0);
++      nowtok = now->tok;
++      if (nowtok == tok_eof)
++	break;
++      else if (nowtok == tok_ifdef || nowtok == tok_ifndef)
++	++level ;
++      else if (nowtok == tok_else)
++	{
++	  if (strcmp (collate->flow_control->name, "else") == 0)
++	    lr_error (ldfile,
++		      _("%s: `else' statement at `%s:%Zu' cannot be followed by another `else' statement"),
++		      "LC_COLLATE", collate->flow_control->name, collate->flow_control->line);
++	  if (level == 0)
++	    {
++	      collate->flow_control->name = "else";
++	      collate->flow_control->file = ldfile->fname;
++	      collate->flow_control->line = ldfile->lineno;
++	      break;
++	    }
++	}
++      else if (nowtok == tok_endif)
++	{
++	  if (level == 0)
++	    {
++	      collate->flow_control = collate->flow_control->last;
++	      break;
++	    }
++	  --level ;
++	}
++    }
++  if (nowtok == tok_eof)
++    WITH_CUR_LOCALE (error (0, 0, _("\
++%s: unterminated `%s' flow control beginning at %s:%Zu"),
++				 "LC_COLLATE", collate->flow_control->name,
++				 collate->flow_control->file,
++				 collate->flow_control->line));
++  return now;
++}
++
++
+ static void
+ collate_startup (struct linereader *ldfile, struct localedef_t *locale,
+ 		 struct localedef_t *copy_locale, int ignore_content)
+@@ -2514,6 +2585,8 @@
+   */
+   int state = 0;
+ 
++  static struct toggle_list_t *defined_keywords = NULL;
++
+   /* Get the repertoire we have to use.  */
+   if (repertoire_name != NULL)
+     repertoire = repertoire_read (repertoire_name);
+@@ -2528,6 +2601,82 @@
+ 	}
+       while (nowtok == tok_eol);
+ 
++  while (nowtok == tok_define || nowtok == tok_undef)
++    {
++      /* Ignore the rest of the line if we don't need the input of
++         this line.  */
++      if (ignore_content)
++        {
++          lr_ignore_rest (ldfile, 0);
++          now = lr_token (ldfile, charmap, result, NULL, verbose);
++          nowtok = now->tok;
++          continue;
++        }
++
++      arg = lr_token (ldfile, charmap, result, NULL, verbose);
++      if (arg->tok != tok_ident)
++        goto err_label;
++
++      if (nowtok == tok_define)
++        {
++	  struct toggle_list_t *runp = defined_keywords;
++	  char *name;
++
++	  while (runp != NULL)
++	    if (strncmp (runp->name, arg->val.str.startmb,
++	    	     arg->val.str.lenmb) == 0
++	        && runp->name[arg->val.str.lenmb] == '\0')
++              SYNTAX_ERROR (_("%s: syntax error"), "LC_COLLATE");
++	    else
++	      runp = runp->last;
++
++	  if (runp != NULL && runp->is_undefined == 0)
++	    {
++	      lr_ignore_rest (ldfile, 0);
++              SYNTAX_ERROR (_("%s: syntax error"), "LC_COLLATE");
++	    }
++
++	  if (runp == NULL)
++	    {
++	      runp = (struct toggle_list_t *) xcalloc (1, sizeof (*runp));
++	      runp->last = defined_keywords;
++	      defined_keywords = runp;
++	    }
++	  else
++	    {
++	      free ((char *) runp->name);
++	      runp->is_undefined = 0;
++	    }
++
++	  name = (char *) xmalloc (arg->val.str.lenmb + 1);
++	  memcpy (name, arg->val.str.startmb, arg->val.str.lenmb);
++	  name[arg->val.str.lenmb] = '\0';
++	  runp->name = name;
++        }
++      else
++        {
++	  struct toggle_list_t *runp = defined_keywords;
++	  while (runp != NULL)
++	    if (strncmp (runp->name, arg->val.str.startmb,
++	    	     arg->val.str.lenmb) == 0
++	        && runp->name[arg->val.str.lenmb] == '\0')
++	    {
++	      runp->is_undefined = 1;
++              SYNTAX_ERROR (_("%s: syntax error"), "LC_COLLATE");
++	    }
++	    else
++	      runp = runp->last;
++        }
++
++      lr_ignore_rest (ldfile, 1);
++      do
++        {
++          now = lr_token (ldfile, charmap, result, NULL, verbose);
++          nowtok = now->tok;
++        }
++      while (nowtok == tok_eol);
++    }
++
+   if (nowtok == tok_copy)
+     {
+       now = lr_token (ldfile, charmap, result, NULL, verbose);
+@@ -3682,6 +3831,125 @@
+ 			  repertoire, result, nowtok);
+ 	  break;
+ 
++	case tok_ifdef:
++	  /* Ignore the rest of the line if we don't need the input of
++	     this line.  */
++	  if (ignore_content)
++	    {
++	      lr_ignore_rest (ldfile, 0);
++	      break;
++	    }
++
++	  arg = lr_token (ldfile, charmap, result, NULL, verbose);
++	  if (arg->tok != tok_ident)
++	    goto err_label;
++	  else
++	    {
++	      struct toggle_list_t *runp = defined_keywords;
++	      struct toggle_list_t *flow = (struct toggle_list_t *) xcalloc (1, sizeof (*runp));
++	      flow->name = "ifdef";
++	      flow->file = ldfile->fname;
++	      flow->line = ldfile->lineno;
++	      flow->last = collate->flow_control;
++	      collate->flow_control = flow;
++
++	      while (runp != NULL)
++		if (strncmp (runp->name, arg->val.str.startmb,
++			     arg->val.str.lenmb) == 0
++		    && runp->name[arg->val.str.lenmb] == '\0')
++		  break;
++		else
++		  runp = runp->last;
++
++	      if (runp == NULL)
++		{
++		  now = flow_skip(ldfile, charmap, collate);
++		  if (now->tok == tok_eof)
++		    WITH_CUR_LOCALE (error (0, 0, _("\
++%s: unterminated `%s' flow control"), "LC_COLLATE", collate->flow_control->name));
++		}
++	    }
++	  lr_ignore_rest (ldfile, 1);
++	  break;
++
++	case tok_ifndef:
++	  /* Ignore the rest of the line if we don't need the input of
++	     this line.  */
++	  if (ignore_content)
++	    {
++	      lr_ignore_rest (ldfile, 0);
++	      break;
++	    }
++
++	  arg = lr_token (ldfile, charmap, result, NULL, verbose);
++	  if (arg->tok != tok_ident)
++	    goto err_label;
++	  else
++	    {
++	      struct toggle_list_t *runp = defined_keywords;
++	      struct toggle_list_t *flow = (struct toggle_list_t *) xcalloc (1, sizeof (*runp));
++	      flow->name = "ifndef";
++	      flow->file = ldfile->fname;
++	      flow->line = ldfile->lineno;
++	      flow->last = collate->flow_control;
++	      collate->flow_control = flow;
++
++	      while (runp != NULL)
++		if (strncmp (runp->name, arg->val.str.startmb,
++			     arg->val.str.lenmb) == 0
++		    && runp->name[arg->val.str.lenmb] == '\0')
++		  break;
++		else
++		  runp = runp->last;
++
++	      if (runp != NULL)
++		{
++		  now = flow_skip(ldfile, charmap, collate);
++		  if (now->tok == tok_eof)
++		    WITH_CUR_LOCALE (error (0, 0, _("\
++%s: unterminated `%s' flow control"), "LC_COLLATE", collate->flow_control->name));
++		}
++	    }
++	  lr_ignore_rest (ldfile, 1);
++	  break;
++
++	case tok_else:
++	  /* Ignore the rest of the line if we don't need the input of
++	     this line.  */
++	  if (ignore_content)
++	    {
++	      lr_ignore_rest (ldfile, 0);
++	      break;
++	    }
++
++	  if (strcmp (collate->flow_control->name, "else") == 0)
++	    lr_error (ldfile,
++		      _("%s: `else' statement at `%s:%Zu' cannot be followed by another `else' statement"),
++		      "LC_COLLATE", collate->flow_control->name, collate->flow_control->line);
++	  collate->flow_control->name = "else";
++	  collate->flow_control->file = ldfile->fname;
++	  collate->flow_control->line = ldfile->lineno;
++	  now = flow_skip(ldfile, charmap, collate);
++	  if (now->tok == tok_eof)
++	    WITH_CUR_LOCALE (error (0, 0, _("\
++%s: unterminated `%s' flow control"), "LC_COLLATE", collate->flow_control->name));
++	  break;
++
++	case tok_endif:
++	  /* Ignore the rest of the line if we don't need the input of
++	     this line.  */
++	  if (ignore_content)
++	    {
++	      lr_ignore_rest (ldfile, 0);
++	      break;
++	    }
++
++	  if (collate->flow_control == NULL)
++	    goto err_label;
++	  else
++	    collate->flow_control = collate->flow_control->last;
++	  break;
++
+ 	case tok_end:
+ 	  /* Next we assume `LC_COLLATE'.  */
+ 	  if (!ignore_content)
+@@ -3711,6 +3979,13 @@
+ 	      else if (state == 5)
+ 		WITH_CUR_LOCALE (error (0, 0, _("\
+ %s: missing `reorder-sections-end' keyword"), "LC_COLLATE"));
++	      if (collate->flow_control != NULL
++		  && strcmp(collate->flow_control->file, ldfile->fname) == 0)
++		WITH_CUR_LOCALE (error (0, 0, _("\
++%s: unterminated `%s' flow control beginning at %s:%Zu"),
++				 "LC_COLLATE", collate->flow_control->name,
++				 collate->flow_control->file,
++				 collate->flow_control->line));
+ 	    }
+ 	  arg = lr_token (ldfile, charmap, result, NULL, verbose);
+ 	  if (arg->tok == tok_eof)
--- eglibc-2.13.orig/debian/patches/locale/check-unknown-symbols.diff
+++ eglibc-2.13/debian/patches/locale/check-unknown-symbols.diff
@@ -0,0 +1,37 @@
+Check for unknown symbols in collation rules.  This is useful to detect
+broken locales since unknown symbols are always wrong.
+
+This request has not been submitted upstream yet.
+
+# DP: Dpatch author: Denis Barbier
+# DP: Patch author: Denis Barbier
+# DP: Upstream status: not submitted
+# DP: Date: 2006-01-08
+
+---
+ locale/programs/ld-collate.c |   12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/locale/programs/ld-collate.c
++++ b/locale/programs/ld-collate.c
+@@ -3501,8 +3501,20 @@
+ 	    }
+ 	  else if (arg != NULL)
+ 	    {
++	      void *ptr = NULL;
+ 	      symstr = arg->val.str.startmb;
+ 	      symlen = arg->val.str.lenmb;
++	      if (state != 5
++		  && find_entry (&charmap->char_table, symstr, symlen, &ptr) != 0
++		  && (repertoire == NULL ||
++		      find_entry (&repertoire->char_table, symstr, symlen, &ptr) != 0)
++		  && find_entry (&collate->elem_table, symstr, symlen, &ptr) != 0
++	          && find_entry (&collate->sym_table, symstr, symlen, &ptr) != 0)
++		{
++		  if (verbose)
++		    lr_error (ldfile, _("%s: symbol `%.*s' not known"),
++			      "LC_COLLATE", (int) symlen, symstr);
++		}
+ 	    }
+ 	  else
+ 	    {
--- eglibc-2.13.orig/debian/patches/locale/locale-print-LANGUAGE.diff
+++ eglibc-2.13/debian/patches/locale/locale-print-LANGUAGE.diff
@@ -0,0 +1,32 @@
+Comments tell that LANG has to be the first value, and LC_ALL the last
+one.  Thus LANGUAGE is printed between them.
+
+# DP: Dpatch author: Denis Barbier
+# DP: Patch author: Denis Barbier
+# DP: Upstream status: not submitted
+# DP: Date: 2006-01-08
+
+---
+ locale/programs/locale.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/locale/programs/locale.c
++++ b/locale/programs/locale.c
+@@ -796,6 +796,7 @@
+ {
+   size_t cat_no;
+   const char *lcall = getenv ("LC_ALL") ? : "";
++  const char *language = getenv ("LANGUAGE") ? : "";
+   const char *lang = getenv ("LANG") ? : "";
+ 
+   auto void get_source (const char *name);
+@@ -814,6 +815,9 @@
+   /* LANG has to be the first value.  */
+   print_assignment ("LANG", lang, false);
+ 
++  if (getenv ("POSIXLY_CORRECT") == NULL)
++    printf ("LANGUAGE=%s\n", language);
++
+   /* Now all categories in an unspecified order.  */
+   for (cat_no = 0; cat_no < NCATEGORIES; ++cat_no)
+     if (cat_no != LC_ALL)
--- eglibc-2.13.orig/debian/patches/locale/LC_IDENTIFICATION-optional-fields.diff
+++ eglibc-2.13/debian/patches/locale/LC_IDENTIFICATION-optional-fields.diff
@@ -0,0 +1,37 @@
+In LC_IDENTIFICATION, audience, application and abbreviation keywords
+are optional, thus do not report an error if they are not defined.
+
+# DP: Dpatch author: Denis Barbier
+# DP: Patch author: Denis Barbier
+# DP: Upstream status: not submitted
+# DP: Date: 2006-01-08
+
+---
+ locale/programs/ld-identification.c |    9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/locale/programs/ld-identification.c
++++ b/locale/programs/ld-identification.c
+@@ -147,6 +147,9 @@
+ 			       	"LC_IDENTIFICATION", #cat));		      \
+       identification->cat = "";						      \
+     }
++#define TEST_ELEM_OPT(cat) \
++  if (identification->cat == NULL)					      \
++    identification->cat = "";						      \
+ 
+   TEST_ELEM (title);
+   TEST_ELEM (source);
+@@ -157,9 +160,9 @@
+   TEST_ELEM (fax);
+   TEST_ELEM (language);
+   TEST_ELEM (territory);
+-  TEST_ELEM (audience);
+-  TEST_ELEM (application);
+-  TEST_ELEM (abbreviation);
++  TEST_ELEM_OPT (audience);
++  TEST_ELEM_OPT (application);
++  TEST_ELEM_OPT (abbreviation);
+   TEST_ELEM (revision);
+   TEST_ELEM (date);
+ 
--- eglibc-2.13.orig/debian/patches/locale/preprocessor-collate-uli-sucks.diff
+++ eglibc-2.13/debian/patches/locale/preprocessor-collate-uli-sucks.diff
@@ -0,0 +1,334 @@
+---
+ locale/programs/ld-collate.c |  265 -------------------------------------------
+ 1 file changed, 265 deletions(-)
+
+--- a/locale/programs/ld-collate.c
++++ b/locale/programs/ld-collate.c
+@@ -185,14 +185,6 @@
+ #include "3level.h"
+ 
+ 
+-/* Simple name list for the preprocessor.  */
+-struct name_list
+-{
+-  struct name_list *next;
+-  char str[0];
+-};
+-
+-
+ /* The real definition of the struct for the LC_COLLATE locale.  */
+ struct locale_collate_t
+ {
+@@ -254,15 +246,6 @@
+   /* The arrays with the collation sequence order.  */
+   unsigned char mbseqorder[256];
+   struct collseq_table wcseqorder;
+-
+-  /* State of the preprocessor.  */
+-  enum
+-    {
+-      else_none = 0,
+-      else_ignore,
+-      else_seen
+-    }
+-    else_action;
+ };
+ 
+ 
+@@ -270,9 +253,6 @@
+    LC_COLLATE category descriptions in all files.  */
+ static uint32_t nrules;
+ 
+-/* List of defined preprocessor symbols.  */
+-static struct name_list *defined;
+-
+ 
+ /* We need UTF-8 encoding of numbers.  */
+ static inline int
+@@ -2511,46 +2491,6 @@
+ }
+ 
+ 
+-static enum token_t
+-skip_to (struct linereader *ldfile, struct locale_collate_t *collate,
+-	 const struct charmap_t *charmap, int to_endif)
+-{
+-  while (1)
+-    {
+-      struct token *now = lr_token (ldfile, charmap, NULL, NULL, 0);
+-      enum token_t nowtok = now->tok;
+-
+-      if (nowtok == tok_eof || nowtok == tok_end)
+-	return nowtok;
+-
+-      if (nowtok == tok_ifdef || nowtok == tok_ifndef)
+-	{
+-	  lr_error (ldfile, _("%s: nested conditionals not supported"),
+-		    "LC_COLLATE");
+-	  nowtok = skip_to (ldfile, collate, charmap, tok_endif);
+-	  if (nowtok == tok_eof || nowtok == tok_end)
+-	    return nowtok;
+-	}
+-      else if (nowtok == tok_endif || (!to_endif && nowtok == tok_else))
+-	{
+-	  lr_ignore_rest (ldfile, 1);
+-	  return nowtok;
+-	}
+-      else if (!to_endif && (nowtok == tok_elifdef || nowtok == tok_elifndef))
+-	{
+-	  /* Do not read the rest of the line.  */
+-	  return nowtok;
+-	}
+-      else if (nowtok == tok_else)
+-	{
+-	  lr_error (ldfile, _("%s: more then one 'else'"), "LC_COLLATE");
+-	}
+-
+-      lr_ignore_rest (ldfile, 0);
+-    }
+-}
+-
+-
+ void
+ collate_read (struct linereader *ldfile, struct localedef_t *result,
+ 	      const struct charmap_t *charmap, const char *repertoire_name,
+@@ -2581,8 +2521,6 @@
+   /* The rest of the line containing `LC_COLLATE' must be free.  */
+   lr_ignore_rest (ldfile, 1);
+ 
+-  while (1)
+-    {
+       do
+ 	{
+ 	  now = lr_token (ldfile, charmap, result, NULL, verbose);
+@@ -2590,31 +2528,6 @@
+ 	}
+       while (nowtok == tok_eol);
+ 
+-      if (nowtok != tok_define)
+-	break;
+-
+-      if (ignore_content)
+-	lr_ignore_rest (ldfile, 0);
+-      else
+-	{
+-	  arg = lr_token (ldfile, charmap, result, NULL, verbose);
+-	  if (arg->tok != tok_ident)
+-	    SYNTAX_ERROR (_("%s: syntax error"), "LC_COLLATE");
+-	  else
+-	    {
+-	      /* Simply add the new symbol.  */
+-	      struct name_list *newsym = xmalloc (sizeof (*newsym)
+-						  + arg->val.str.lenmb + 1);
+-	      memcpy (newsym->str, arg->val.str.startmb, arg->val.str.lenmb);
+-	      newsym->str[arg->val.str.lenmb] = '\0';
+-	      newsym->next = defined;
+-	      defined = newsym;
+-
+-	      lr_ignore_rest (ldfile, 1);
+-	    }
+-	}
+-    }
+-
+   if (nowtok == tok_copy)
+     {
+       now = lr_token (ldfile, charmap, result, NULL, verbose);
+@@ -3770,7 +3683,6 @@
+ 	  break;
+ 
+ 	case tok_end:
+-	seen_end:
+ 	  /* Next we assume `LC_COLLATE'.  */
+ 	  if (!ignore_content)
+ 	    {
+@@ -3811,182 +3723,6 @@
+ 	  lr_ignore_rest (ldfile, arg->tok == tok_lc_collate);
+ 	  return;
+ 
+-	case tok_define:
+-	  if (ignore_content)
+-	    {
+-	      lr_ignore_rest (ldfile, 0);
+-	      break;
+-	    }
+-
+-	  arg = lr_token (ldfile, charmap, result, NULL, verbose);
+-	  if (arg->tok != tok_ident)
+-	    goto err_label;
+-
+-	  /* Simply add the new symbol.  */
+-	  struct name_list *newsym = xmalloc (sizeof (*newsym)
+-					      + arg->val.str.lenmb + 1);
+-	  memcpy (newsym->str, arg->val.str.startmb, arg->val.str.lenmb);
+-	  newsym->str[arg->val.str.lenmb] = '\0';
+-	  newsym->next = defined;
+-	  defined = newsym;
+-
+-	  lr_ignore_rest (ldfile, 1);
+-	  break;
+-
+-	case tok_undef:
+-	  if (ignore_content)
+-	    {
+-	      lr_ignore_rest (ldfile, 0);
+-	      break;
+-	    }
+-
+-	  arg = lr_token (ldfile, charmap, result, NULL, verbose);
+-	  if (arg->tok != tok_ident)
+-	    goto err_label;
+-
+-	  /* Remove _all_ occurrences of the symbol from the list.  */
+-	  struct name_list *prevdef = NULL;
+-	  struct name_list *curdef = defined;
+-	  while (curdef != NULL)
+-	    if (strncmp (arg->val.str.startmb, curdef->str,
+-			 arg->val.str.lenmb) == 0
+-		&& curdef->str[arg->val.str.lenmb] == '\0')
+-	      {
+-		if (prevdef == NULL)
+-		  defined = curdef->next;
+-		else
+-		  prevdef->next = curdef->next;
+-
+-		struct name_list *olddef = curdef;
+-		curdef = curdef->next;
+-
+-		free (olddef);
+-	      }
+-	    else
+-	      {
+-		prevdef = curdef;
+-		curdef = curdef->next;
+-	      }
+-
+-	  lr_ignore_rest (ldfile, 1);
+-	  break;
+-
+-	case tok_ifdef:
+-	case tok_ifndef:
+-	  if (ignore_content)
+-	    {
+-	      lr_ignore_rest (ldfile, 0);
+-	      break;
+-	    }
+-
+-	found_ifdef:
+-	  arg = lr_token (ldfile, charmap, result, NULL, verbose);
+-	  if (arg->tok != tok_ident)
+-	    goto err_label;
+-	  lr_ignore_rest (ldfile, 1);
+-
+-	  if (collate->else_action == else_none)
+-	    {
+-	      curdef = defined;
+-	      while (curdef != NULL)
+-		if (strncmp (arg->val.str.startmb, curdef->str,
+-			     arg->val.str.lenmb) == 0
+-		    && curdef->str[arg->val.str.lenmb] == '\0')
+-		  break;
+-		else
+-		  curdef = curdef->next;
+-
+-	      if ((nowtok == tok_ifdef && curdef != NULL)
+-		  || (nowtok == tok_ifndef && curdef == NULL))
+-		{
+-		  /* We have to use the if-branch.  */
+-		  collate->else_action = else_ignore;
+-		}
+-	      else
+-		{
+-		  /* We have to use the else-branch, if there is one.  */
+-		  nowtok = skip_to (ldfile, collate, charmap, 0);
+-		  if (nowtok == tok_else)
+-		    collate->else_action = else_seen;
+-		  else if (nowtok == tok_elifdef)
+-		    {
+-		      nowtok = tok_ifdef;
+-		      goto found_ifdef;
+-		    }
+-		  else if (nowtok == tok_elifndef)
+-		    {
+-		      nowtok = tok_ifndef;
+-		      goto found_ifdef;
+-		    }
+-		  else if (nowtok == tok_eof)
+-		    goto seen_eof;
+-		  else if (nowtok == tok_end)
+-		    goto seen_end;
+-		}
+-	    }
+-	  else
+-	    {
+-	      /* XXX Should it really become necessary to support nested
+-		 preprocessor handling we will push the state here.  */
+-	      lr_error (ldfile, _("%s: nested conditionals not supported"),
+-			"LC_COLLATE");
+-	      nowtok = skip_to (ldfile, collate, charmap, 1);
+-	      if (nowtok == tok_eof)
+-		goto seen_eof;
+-	      else if (nowtok == tok_end)
+-		goto seen_end;
+-	    }
+-	  break;
+-
+-	case tok_elifdef:
+-	case tok_elifndef:
+-	case tok_else:
+-	  if (ignore_content)
+-	    {
+-	      lr_ignore_rest (ldfile, 0);
+-	      break;
+-	    }
+-
+-	  lr_ignore_rest (ldfile, 1);
+-
+-	  if (collate->else_action == else_ignore)
+-	    {
+-	      /* Ignore everything until the endif.  */
+-	      nowtok = skip_to (ldfile, collate, charmap, 1);
+-	      if (nowtok == tok_eof)
+-		goto seen_eof;
+-	      else if (nowtok == tok_end)
+-		goto seen_end;
+-	    }
+-	  else
+-	    {
+-	      assert (collate->else_action == else_none);
+-	      lr_error (ldfile, _("\
+-%s: '%s' without matching 'ifdef' or 'ifndef'"), "LC_COLLATE",
+-			nowtok == tok_else ? "else"
+-			: nowtok == tok_elifdef ? "elifdef" : "elifndef");
+-	    }
+-	  break;
+-
+-	case tok_endif:
+-	  if (ignore_content)
+-	    {
+-	      lr_ignore_rest (ldfile, 0);
+-	      break;
+-	    }
+-
+-	  lr_ignore_rest (ldfile, 1);
+-
+-	  if (collate->else_action != else_ignore
+-	      && collate->else_action != else_seen)
+-	    lr_error (ldfile, _("\
+-%s: 'endif' without matching 'ifdef' or 'ifndef'"), "LC_COLLATE");
+-
+-	  /* XXX If we support nested preprocessor directives we pop
+-	     the state here.  */
+-	  collate->else_action = else_none;
+-	  break;
+-
+ 	default:
+ 	err_label:
+ 	  SYNTAX_ERROR (_("%s: syntax error"), "LC_COLLATE");
+@@ -3997,7 +3733,6 @@
+       nowtok = now->tok;
+     }
+ 
+- seen_eof:
+   /* When we come here we reached the end of the file.  */
+   lr_error (ldfile, _("%s: premature end of file"), "LC_COLLATE");
+ }
--- eglibc-2.13.orig/debian/patches/locale/LC_COLLATE-keywords-ordering.diff
+++ eglibc-2.13/debian/patches/locale/LC_COLLATE-keywords-ordering.diff
@@ -0,0 +1,108 @@
+Be less strict about keywords ordering in LC_COLLATE section, to
+ease definition of new scripts.
+
+Submitted upstream: BZ690
+
+# DP: Dpatch author: Denis Barbier
+# DP: Patch author: Denis Barbier
+# DP: Upstream status: BZ690
+# DP: Date: 2006-01-08
+
+---
+ locale/programs/ld-collate.c |   32 ++++++++++++++++++--------------
+ 1 file changed, 18 insertions(+), 14 deletions(-)
+
+--- a/locale/programs/ld-collate.c
++++ b/locale/programs/ld-collate.c
+@@ -2752,14 +2752,23 @@
+       switch (nowtok)
+ 	{
+ 	case tok_copy:
+-	  /* Allow copying other locales.  */
++	  /* Ignore the rest of the line if we don't need the input of
++	     this line.  */
++	  if (ignore_content)
++	    {
++	      lr_ignore_rest (ldfile, 0);
++	      break;
++	    }
++
+ 	  now = lr_token (ldfile, charmap, result, NULL, verbose);
+ 	  if (now->tok != tok_string)
+ 	    goto err_label;
+ 
+-	  if (! ignore_content)
+-	    load_locale (LC_COLLATE, now->val.str.startmb, repertoire_name,
+-			 charmap, result);
++	  if (state == 1 || state == 3 || state == 5)
++	    goto err_label;
++
++	  load_locale (LC_COLLATE, now->val.str.startmb, repertoire_name,
++		       charmap, result);
+ 
+ 	  lr_ignore_rest (ldfile, 1);
+ 	  break;
+@@ -2773,9 +2782,6 @@
+ 	      break;
+ 	    }
+ 
+-	  if (state != 0)
+-	    goto err_label;
+-
+ 	  arg = lr_token (ldfile, charmap, result, NULL, verbose);
+ 	  if (arg->tok != tok_number)
+ 	    goto err_label;
+@@ -2796,7 +2802,7 @@
+ 	      break;
+ 	    }
+ 
+-	  if (state != 0)
++	  if (state == 1 || state == 3 || state == 5)
+ 	    goto err_label;
+ 
+ 	  arg = lr_token (ldfile, charmap, result, repertoire, verbose);
+@@ -2843,7 +2849,7 @@
+ 	      break;
+ 	    }
+ 
+-	  if (state != 0 && state != 2)
++	  if (state == 1 || state == 3 || state == 5)
+ 	    goto err_label;
+ 
+ 	  arg = lr_token (ldfile, charmap, result, repertoire, verbose);
+@@ -2909,7 +2915,7 @@
+ 	      break;
+ 	    }
+ 
+-	  if (state != 0 && state != 2)
++	  if (state == 1 || state == 3 || state == 5)
+ 	    goto err_label;
+ 
+ 	  arg = lr_token (ldfile, charmap, result, repertoire, verbose);
+@@ -3055,7 +3061,7 @@
+ 	      break;
+ 	    }
+ 
+-	  if (state != 0)
++	  if (state == 1 || state == 3 || state == 5)
+ 	    goto err_label;
+ 
+ 	  arg = lr_token (ldfile, charmap, result, repertoire, verbose);
+@@ -3176,7 +3182,7 @@
+ 	      break;
+ 	    }
+ 
+-	  if (state != 0 && state != 1 && state != 2)
++	  if (state == 3 || state == 5)
+ 	    goto err_label;
+ 	  state = 1;
+ 
+@@ -3487,8 +3493,6 @@
+ %s: missing `reorder-end' keyword"), "LC_COLLATE"));
+ 	      state = 4;
+ 	    }
+-	  else if (state != 2 && state != 4)
+-	    goto err_label;
+ 	  state = 5;
+ 
+ 	  /* Get the name of the sections we are adding after.  */
--- eglibc-2.13.orig/debian/patches/kfreebsd/local-config_h_in.patch
+++ eglibc-2.13/debian/patches/kfreebsd/local-config_h_in.patch
@@ -0,0 +1,20 @@
+2009-05-23  Aurelien Jarno <aurelien@aurel32.net>
+
+	* config.h.in (__KFREEBSD_KERNEL_VERSION): Add.
+
+---
+ config.h.in |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/config.h.in
++++ b/config.h.in
+@@ -159,6 +159,9 @@
+ /* Linux specific: minimum supported kernel version.  */
+ #undef	__LINUX_KERNEL_VERSION
+ 
++/* kFreeBSD specific: minimum supported kernel version.  */
++#undef	__KFREEBSD_KERNEL_VERSION
++
+ /* Override abi-tags ABI version if necessary.  */
+ #undef  __ABI_TAG_VERSION
+ 
--- eglibc-2.13.orig/debian/patches/kfreebsd/local-initgroups-order.diff
+++ eglibc-2.13/debian/patches/kfreebsd/local-initgroups-order.diff
@@ -0,0 +1,38 @@
+
+ setgroups(size, groups) changes egid on kfreebsd, 
+ precisely groups[0] is the new egid
+
+ initgroups(user, gid) prepares the "groups" list
+ via internal_getgrouplist(). 
+ It puts supplied gid as the first entry in all but NSCD cases.
+ Fix the remaining NSCD case, see #698102, #699593.
+
+
+--- a/nscd/nscd_initgroups.c
++++ b/nscd/nscd_initgroups.c
+@@ -145,15 +145,23 @@
+     }
+ 
+   /* Check whether GROUP is part of the mix.  If not, add it.  */
++  /* The GROUP have to be in the first entry */
+   if (retval >= 0)
+     {
+       int cnt;
++      gid_t sg, tg;
++      sg = group;
+       for (cnt = 0; cnt < retval; ++cnt)
+-	if ((*groupsp)[cnt] == group)
++      {
++        tg = (*groupsp)[cnt];
++        (*groupsp)[cnt] = sg;
++        if (tg == group)
+ 	  break;
++        sg = tg;
++      }  
+ 
+       if (cnt == retval)
+-	(*groupsp)[retval++] = group;
++	(*groupsp)[retval++] = sg;
+     }
+ 
+  out_close:
--- eglibc-2.13.orig/debian/patches/kfreebsd/local-dosavesse.diff
+++ eglibc-2.13/debian/patches/kfreebsd/local-dosavesse.diff
@@ -0,0 +1,116 @@
+ unfortunately, it does not work
+ in mean time use local-nosavesse.diff 
+
+--- a/linuxthreads/descr.h
++++ b/linuxthreads/descr.h
+@@ -114,6 +114,7 @@
+   /* This overlaps tcbhead_t (see tls.h), as used for TLS without threads.  */
+   union
+   {
++    tcbhead_t tcbheader;
+     struct
+     {
+       void *tcb;		/* Pointer to the TCB.  This is not always
+--- a/linuxthreads/sysdeps/x86_64/tcb-offsets.sym
++++ b/linuxthreads/sysdeps/x86_64/tcb-offsets.sym
+@@ -3,3 +3,4 @@
+ 
+ MULTIPLE_THREADS_OFFSET		offsetof (tcbhead_t, multiple_threads)
+ POINTER_GUARD			offsetof (tcbhead_t, pointer_guard)
++RTLD_SAVESPACE_SSE		offsetof (tcbhead_t, rtld_savespace_sse)
+--- a/linuxthreads/sysdeps/x86_64/tls.h
++++ b/linuxthreads/sysdeps/x86_64/tls.h
+@@ -26,6 +26,7 @@
+ # include <stdbool.h>
+ # include <stddef.h>
+ # include <stdint.h>
++# include <xmmintrin.h>
+ 
+ /* Type for the dtv.  */
+ typedef union dtv
+@@ -46,6 +47,7 @@
+   dtv_t *dtv;
+   void *self;		/* Pointer to the thread descriptor.  */
+   int multiple_threads;
++  int __unused1;
+   uintptr_t sysinfo;
+   uintptr_t stack_guard;
+   uintptr_t pointer_guard;
+@@ -53,7 +55,13 @@
+   long gscope_flag;
+ # else
+   int gscope_flag;
++  int __unused2;
+ # endif
++  void *__padding1[7];
++  int rtld_must_xmm_save;
++  int __unused3;
++   /* Have space for the post-AVX register size.  */
++  __m128 rtld_savespace_sse[8][4];
+ } tcbhead_t;
+ 
+ #else /* __ASSEMBLER__ */
+@@ -77,13 +85,19 @@
+ #  define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
+ 
+ /* Alignment requirements for the initial TCB.  */
+-#  define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
++//#  define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
++// Normally the above would be correct  But we have to store post-AVX
++// vector registers in the TCB and we want the storage to be aligned.
++// unfortunately there isn't yet a type for these values and hence no
++// 32-byte alignment requirement.  Make this explicit, for now.
++#  define TLS_INIT_TCB_ALIGN 32
+ 
+ /* This is the size of the TCB.  */
+ #  define TLS_TCB_SIZE sizeof (struct _pthread_descr_struct)
+ 
+ /* Alignment requirements for the TCB.  */
+ #  define TLS_TCB_ALIGN __alignof__ (struct _pthread_descr_struct)
++// It is already 32B aligned
+ 
+ /* The TCB can have any size and the memory following the address the
+    thread pointer points to is unspecified.  Allocate the TCB there.  */
+@@ -189,7 +203,42 @@
+ #define THREAD_GSCOPE_WAIT() \
+   do { /* GL(dl_wait_lookup_done) () */ } while (0)
+ 
++
++# ifdef SHARED
++/* Defined in dl-trampoline.S.  */
++extern void _dl_x86_64_save_sse (void);
++extern void _dl_x86_64_restore_sse (void);
++
++# define RTLD_CHECK_FOREIGN_CALL \
++  (THREAD_GETMEM (THREAD_SELF, p_header.tcbheader.rtld_must_xmm_save) != 0)
++
++/* NB: Don't use the xchg operation because that would imply a lock
++   prefix which is expensive and unnecessary.  The cache line is also
++   not contested at all.  */
++#  define RTLD_ENABLE_FOREIGN_CALL \
++  int old_rtld_must_xmm_save = THREAD_GETMEM (THREAD_SELF,		      \
++					      p_header.tcbheader.rtld_must_xmm_save); \
++  THREAD_SETMEM (THREAD_SELF, p_header.tcbheader.rtld_must_xmm_save, 1)
++
++#  define RTLD_PREPARE_FOREIGN_CALL \
++  do if (THREAD_GETMEM (THREAD_SELF, p_header.tcbheader.rtld_must_xmm_save))  \
++    {									      \
++      _dl_x86_64_save_sse ();						      \
++      THREAD_SETMEM (THREAD_SELF, p_header.tcbheader.rtld_must_xmm_save, 0);  \
++    }									      \
++  while (0)
++
++#  define RTLD_FINALIZE_FOREIGN_CALL \
++  do {									      \
++    if (THREAD_GETMEM (THREAD_SELF, p_header.tcbheader.rtld_must_xmm_save) == 0) \
++      _dl_x86_64_restore_sse ();					      \
++    THREAD_SETMEM (THREAD_SELF, p_header.tcbheader.rtld_must_xmm_save,	      \
++		   old_rtld_must_xmm_save);				      \
++  } while (0)
++# endif
++
+ # endif	/* HAVE_TLS_SUPPORT */
++
+ #endif /* __ASSEMBLER__ */
+ 
+ #endif	/* tls.h */
--- eglibc-2.13.orig/debian/patches/kfreebsd/local-sysdeps.diff
+++ eglibc-2.13/debian/patches/kfreebsd/local-sysdeps.diff
@@ -0,0 +1,29593 @@
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/Dist
+@@ -0,0 +1,29 @@
++bits/mcontext.h
++bits/stat16.h
++fpu.h
++machine/pal.h
++net/ethernet.h
++net/if_arp.h
++net/if_ether.h
++net/if_dl.h
++net/route.h
++nfs/nfs.h
++regdef.h
++sa_len.c
++stat16conv.c
++statfsconv.c
++sys/acl.h
++sys/extattr.h
++sys/io.h
++sys/jail.h
++sys/linker.h
++sys/mount.h
++sys/perm.h
++sys/rfork.h
++sys/rtprio.h
++sys/syslimits.h
++sys/timex.h
++sys/vm86.h
++sys_lseek.S
++sysarch.h
++ucontext_i.h
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/Implies
+@@ -0,0 +1,11 @@
++# The kernel include files come from the 'kernel-include' add-on.
++# This is actually added by configure.in.
++#/usr/src/sys/
++
++# One of two possible utmp file formats.
++# This is actually added by configure.in.
++#unix/bsd/bsd4.4/kfreebsd/utmp-xyz
++
++# The gnu subdirectory exists for things common to Linux-based, Hurd-based
++# and kFreeBSD-based GNU systems.
++gnu
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/Makefile
+@@ -0,0 +1,135 @@
++# Use bash, not /bin/sh, for executing scripts, because the native
++# FreeBSD /bin/sh does not interpret the  IFS="<tab>" read ...  command
++# in localedata/tst-fmon.sh correctly.
++SHELL = bash
++
++# Additional header files to be installed in $prefix/include:
++
++ifeq ($(subdir),misc)
++sysdep_headers += \
++ kenv.h \
++ sys/mount.h \
++ sys/kd.h \
++ sys/rfork.h
++endif
++
++ifeq ($(subdir),stdlib)
++sysdep_headers += \
++ bits/mcontext.h
++endif
++
++# Additional functions, and particular system calls:
++
++ifeq ($(subdir),csu)
++# For <errno.h>.
++sysdep_routines += errno-loc
++endif
++
++ifeq ($(subdir),assert)
++CFLAGS-assert.c += -DFATAL_PREPARE_INCLUDE='<fatal-prepare.h>'
++CFLAGS-assert-perr.c += -DFATAL_PREPARE_INCLUDE='<fatal-prepare.h>'
++endif
++
++ifeq ($(subdir),io)
++# For <unistd.h>.
++sysdep_routines += sys_access sys_faccessat sys_fchownat sys_fexecve sys_getcwd sys_linkat sys_lseek sys_freebsd6_lseek sys_readlinkat sys_symlinkat sys_unlinkat
++# For <fcntl.h>.
++sysdep_routines += sys_open sys_openat open_2
++# For <sys/stat.h>.
++sysdep_routines += sys_fchmodat sys_fstat sys_fstatat sys_lstat sys_mkdirat sys_mkfifoat sys_mknod sys_mknodat sys_nfstat sys_nlstat sys_nstat sys_stat lchflags
++# For <sys/statfs.h>.
++sysdep_routines += fstatfs64 statfs64 sys_fstatfs sys_statfs
++# For <stdio.h>
++sysdep_routines += sys_renameat
++# For <sys/times.h>.
++sysdep_routines += sys_futimesat
++# Other.
++sysdep_routines += lchmod
++endif
++
++ifeq ($(subdir),dirent)
++# For <dirent.h>.
++sysdep_routines += sys_getdents sys_getdirentries getdirentries getdirentries64
++endif
++
++ifeq ($(subdir),misc)
++# For <kenv.h>.
++sysdep_routines += kenv
++# For <sched.h>.
++sysdep_routines += clone start_thread
++# For <unistd.h>.
++sysdep_routines += sys_ftruncate sys_freebsd6_ftruncate sys_truncate sys_freebsd6_truncate getosreldate
++# For <sys/acl.h>.
++sysdep_routines += acl_aclcheck_fd acl_aclcheck_file acl_delete_fd acl_delete_file acl_get_fd acl_get_file acl_set_fd acl_set_file
++# For <sys/extattr.h>.
++sysdep_routines += extattrctl extattr_delete_file extattr_get_file extattr_set_file
++# For <sys/jail.h>.
++sysdep_routines += jail jail_attach jail_remove jail_get jail_set
++# For <sys/ktrace.h>.
++sysdep_routines += ktrace utrace
++# For <sys/linker.h>.
++sysdep_routines += kldfind kldfirstmod kldload kldnext kldstat kldsym kldunload kldunloadf
++# For <sys/mman.h>.
++sysdep_routines += minherit sys_mmap sys_freebsd6_mmap sys_munmap
++# For <sys/mount.h>.
++sysdep_routines += fhopen sys_fhstat sys_fhstatfs fhstat fhstat64 fhstatfs fhstatfs64 getfh getfsstat getfsstat64 sys_getfsstat getmntinfo getmntinfo64 mount nmount unmount
++# For <sys/rfork.h>.
++sysdep_routines += rfork
++# For <sys/rtprio.h>.
++sysdep_routines += rtprio
++# For <sys/socket.h>.
++sysdep_routines += bsd_sendfile
++# For <sys/stat.h>.
++sysdep_routines += devname
++# For <sys/sysctl.h>.
++sysdep_routines += sysctl sysctlbyname sysctlnametomib
++# For <sys/uio.h>.
++sysdep_routines += sys_readv sys_writev
++# Other.
++sysdep_routines += swapon swapoff sys_aio_cancel sys_aio_error sys_aio_read sys_aio_return sys_aio_suspend sys_aio_waitcomplete sys_aio_write sys_lio_listio issetugid modfind modfnext modnext modstat obreak quotactl rfork sysarch undelete yield
++# for INLINE_SYSCALL
++sysdep_routines += sys_fork sys_execve sys_sigaction sys_close sys_fcntl
++sysdep_routines += sys_clock_getres sys_clock_gettime sys_clock_settime
++sysdep_routines += sys_ktimer_create sys_ktimer_gettime sys_ktimer_settime sys_ktimer_getoverrun sys_ktimer_delete
++sysdep_routines += sys_shm_open sys_shm_unlink sys_pselect sys_semctl
++endif
++
++ifeq ($(subdir),posix)
++# For <unistd.h>.
++sysdep_routines += sys_getlogin sys_pread sys_freebsd6_pread sys_pwrite sys_freebsd6_pwrite sys_setlogin sys_read sys_write
++# for <sched.h>
++sysdep_routines += sys_cpuset_getaffinity sys_cpuset_setaffinity
++endif
++
++ifeq ($(subdir),inet)
++sysdep_headers += net/ethernet.h net/if_ether.h
++endif
++
++ifeq ($(subdir),time)
++# For <sys/timex.h>.
++sysdep_routines += ntp_adjtime ntp_gettime
++endif
++
++ifeq ($(subdir),socket)
++sysdep_routines += sa_len sys_bind sys_connect sys_sendto
++endif
++
++# Linuxthreads dependencies.
++
++ifeq ($(subdir),posix)
++sysdep_headers += bits/initspin.h
++endif
++
++# Don't compile the ctype glue code, since we have a much better <ctype.h>
++# than the old non-GNU C library.
++inhibit-glue = yes
++
++# Special ELF hacks.
++ifeq ($(subdir),elf)
++sysdep-rtld-routines += dl-brk dl-sbrk
++sysdep_routines += sys_umtx
++endif
++
++ifeq ($(subdir),sunrpc)
++sysdep_headers += nfs/nfs.h
++endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/Versions
+@@ -0,0 +1,121 @@
++libc {
++  # The comment lines with "#errlist-compat" are magic; see errlist-compat.awk.
++  # When you get an error from errlist-compat.awk, you need to add a new
++  # version here.  Don't do this blindly, since this means changing the ABI
++  # for all GNU/kFreeBSD configurations.
++
++  GLIBC_2.2.6 {
++    # c*
++    clone;
++
++    # e*
++    extattrctl; extattr_delete_file; extattr_get_file; extattr_set_file;
++
++    # f*
++    fhopen; fhstat; fhstatfs; futimes;
++
++    # g*
++    getdents; getfh; getfsstat; getfsstat64; getmntinfo; getmntinfo64;
++    getresgid; getresuid;
++
++    # i*
++    issetugid;
++
++    # j*
++    jail;
++
++    # k*
++    kldfind; kldfirstmod; kldload; kldnext; kldstat; kldsym; kldunload; kldunloadf;
++    ktrace;
++
++    # l*
++    lchmod; lutimes;
++
++    # m*
++    minherit; modfind; modfnext; modnext; modstat; mount;
++
++    # n*
++    nmount; ntp_adjtime; ntp_gettime;
++
++    # q*
++    quotactl;
++
++    # r*
++    rfork; rtprio;
++
++    # s*
++    sendfile; setresgid; setresuid; swapoff; swapon; sysarch; sysctl; sysctlbyname;
++
++    # u*
++    undelete; unmount; utrace;
++
++    # see <sys/acl.h>.
++    __acl_aclcheck_fd; __acl_aclcheck_file; __acl_delete_fd; __acl_delete_file;
++    __acl_get_fd; __acl_get_file; __acl_set_fd; __acl_set_file;
++
++    # see <errno.h>.
++    __errno_location;
++
++    # see <sys/sysctl.h>.
++    __sysctl;
++
++    # Questionable system calls. These functions may be removed at any moment.
++    __syscall_aio_cancel; __syscall_aio_error; __syscall_aio_read;
++    __syscall_aio_return; __syscall_aio_suspend; __syscall_aio_waitcomplete;
++    __syscall_aio_write; __syscall_lio_listio;
++    __syscall_obreak;
++    __syscall_yield;
++  }
++  GLIBC_2.3 {
++    #errlist-compat     87
++    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
++  }
++  GLIBC_2.3.4 {
++    # f*
++    fhstat64; fhstatfs64;
++    kqueue; kevent;
++
++    #errlist-compat     93
++    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
++
++    # functions used in inline functions or macros
++    __libc_sa_len;
++  }
++  GLIBC_2.10 {
++    devname;
++    devname_r;
++    kenv;
++    sysctlnametomib;
++  }
++  GLIBC_2.11 {
++    lchflags;
++    #errlist-compat 94
++    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
++  }
++  GLIBC_2.13 {
++    jail_attach;
++    jail_remove;
++    jail_get;
++    jail_set;
++  }
++  GLIBC_PRIVATE {
++    # needed by libpthread.
++    __clone; __libc_fork; __libc_sigaction; __kernel_getosreldate;
++    # needed by libpthread as INLINE_SYSCALL:
++    __syscall_fork;
++    __syscall_open; __syscall_close;
++    __syscall_read; __syscall_write;
++    __syscall_wait4; __syscall_fcntl;
++    # needed by librt as INLINE_SYSCALL:
++    __syscall_clock_getres; __syscall_clock_gettime; __syscall_clock_settime;
++    __syscall_ktimer_create; __syscall_ktimer_gettime; __syscall_ktimer_settime; __syscall_ktimer_getoverrun; __syscall_ktimer_delete;
++    __syscall_shm_open; __syscall_shm_unlink;
++    # misc fixes for FreeBSD:
++    __syscall_freebsd6_lseek; __syscall_freebsd6_pread; __syscall_freebsd6_pwrite;
++    __syscall_lseek; __syscall_pread; __syscall_pwrite;
++    __syscall_connect; __syscall_sendto;
++    __syscall_cpuset_getaffinity ; __syscall_cpuset_setaffinity;
++     # global variable used in brk()
++    _end;
++  }
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/_G_config.h
+@@ -0,0 +1,100 @@
++/* This file is needed by libio to define various configuration parameters.
++   These are always the same in the GNU C library.  */
++
++#ifndef _G_config_h
++#define _G_config_h 1
++
++/* Define types for libio in terms of the standard internal type names.  */
++
++#include <bits/types.h>
++#define __need_size_t
++#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
++# define __need_wchar_t
++#endif
++#define __need_NULL
++#include <stddef.h>
++#define __need_mbstate_t
++#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
++# define __need_wint_t
++#endif
++#include <wchar.h>
++#define _G_size_t	size_t
++typedef struct
++{
++  __off_t __pos;
++  __mbstate_t __state;
++} _G_fpos_t;
++typedef struct
++{
++  __off64_t __pos;
++  __mbstate_t __state;
++} _G_fpos64_t;
++#define _G_ssize_t	__ssize_t
++#define _G_off_t	__off_t
++#define _G_off64_t	__off64_t
++#define	_G_pid_t	__pid_t
++#define	_G_uid_t	__uid_t
++#define _G_wchar_t	wchar_t
++#define _G_wint_t	wint_t
++#define _G_stat64	stat64
++#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
++# include <gconv.h>
++typedef union
++{
++  struct __gconv_info __cd;
++  struct
++  {
++    struct __gconv_info __cd;
++    struct __gconv_step_data __data;
++  } __combined;
++} _G_iconv_t;
++#endif
++
++typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
++typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
++typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
++typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
++
++#define _G_HAVE_BOOL 1
++
++
++/* These library features are always available in the GNU C library.  */
++#define _G_HAVE_ATEXIT 1
++#define _G_HAVE_SYS_CDEFS 1
++#define _G_HAVE_SYS_WAIT 1
++#define _G_NEED_STDARG_H 1
++#define _G_va_list __gnuc_va_list
++
++#define _G_HAVE_PRINTF_FP 1
++#define _G_HAVE_MMAP 1
++#define _G_HAVE_LONG_DOUBLE_IO 1
++#define _G_HAVE_IO_FILE_OPEN 1
++#define _G_HAVE_IO_GETLINE_INFO 1
++
++#define _G_IO_IO_FILE_VERSION 0x20001
++
++#define _G_OPEN64	__open64
++#define _G_LSEEK64	__lseek64
++#define _G_MMAP64	__mmap64
++#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf)
++
++/* This is defined by <bits/stat.h> if `st_blksize' exists.  */
++#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)
++
++#define _G_BUFSIZ 8192
++
++/* These are the vtbl details for ELF.  */
++#define _G_NAMES_HAVE_UNDERSCORE 0
++#define _G_VTABLE_LABEL_HAS_LENGTH 1
++#define _G_USING_THUNKS	1
++#define _G_VTABLE_LABEL_PREFIX "__vt_"
++#define _G_VTABLE_LABEL_PREFIX_ID __vt_
++
++
++#if defined __cplusplus || defined __STDC__
++# define _G_ARGS(ARGLIST) ARGLIST
++#else
++# define _G_ARGS(ARGLIST) ()
++#endif
++
++#endif	/* _G_config.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/a.out.h
+@@ -0,0 +1,140 @@
++#ifndef __A_OUT_GNU_H__
++#define __A_OUT_GNU_H__
++
++#define __GNU_EXEC_MACROS__
++
++struct exec
++{
++  unsigned long a_info;	/* Use macros N_MAGIC, etc for access.  */
++  unsigned int a_text;	/* Length of text, in bytes.  */
++  unsigned int a_data;	/* Length of data, in bytes.  */
++  unsigned int a_bss;	/* Length of uninitialized data area for file, in bytes.  */
++  unsigned int a_syms;	/* Length of symbol table data in file, in bytes.  */
++  unsigned int a_entry;	/* Start address.  */
++  unsigned int a_trsize;/* Length of relocation info for text, in bytes.  */
++  unsigned int a_drsize;/* Length of relocation info for data, in bytes.  */
++};
++
++enum machine_type
++{
++  M_OLDSUN2 = 0,
++  M_68010 = 1,
++  M_68020 = 2,
++  M_SPARC = 3,
++  M_386 = 100,
++  M_MIPS1 = 151,
++  M_MIPS2 = 152
++};
++
++#define N_MAGIC(exec)	((exec).a_info & 0xffff)
++#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff))
++#define N_FLAGS(exec)	(((exec).a_info >> 24) & 0xff)
++#define N_SET_INFO(exec, magic, type, flags) \
++  ((exec).a_info = ((magic) & 0xffff)					\
++   | (((int)(type) & 0xff) << 16)					\
++   | (((flags) & 0xff) << 24))
++#define N_SET_MAGIC(exec, magic) \
++  ((exec).a_info = ((exec).a_info & 0xffff0000) | ((magic) & 0xffff))
++#define N_SET_MACHTYPE(exec, machtype) \
++  ((exec).a_info =							\
++   ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16))
++#define N_SET_FLAGS(exec, flags) \
++  ((exec).a_info =							\
++   ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))
++
++/* Code indicating object file or impure executable.  */
++#define OMAGIC 0407
++/* Code indicating pure executable.  */
++#define NMAGIC 0410
++/* Code indicating demand-paged executable.  */
++#define ZMAGIC 0413
++/* This indicates a demand-paged executable with the header in the text. 
++   The first page is unmapped to help trap NULL pointer references.  */
++#define QMAGIC 0314
++/* Code indicating core file.  */
++#define CMAGIC 0421
++
++#define N_TRSIZE(a)	((a).a_trsize)
++#define N_DRSIZE(a)	((a).a_drsize)
++#define N_SYMSIZE(a)	((a).a_syms)
++#define N_BADMAG(x) \
++  (N_MAGIC(x) != OMAGIC	&& N_MAGIC(x) != NMAGIC				\
++   && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC)
++#define _N_HDROFF(x)	(1024 - sizeof (struct exec))
++#define N_TXTOFF(x) \
++  (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) :	\
++   (N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec)))
++#define N_DATOFF(x)	(N_TXTOFF(x) + (x).a_text)
++#define N_TRELOFF(x)	(N_DATOFF(x) + (x).a_data)
++#define N_DRELOFF(x)	(N_TRELOFF(x) + N_TRSIZE(x))
++#define N_SYMOFF(x)	(N_DRELOFF(x) + N_DRSIZE(x))
++#define N_STROFF(x)	(N_SYMOFF(x) + N_SYMSIZE(x))
++
++/* Address of text segment in memory after it is loaded.  */
++#define N_TXTADDR(x)	(N_MAGIC(x) == QMAGIC ? 4096 : 0)
++
++/* Address of data segment in memory after it is loaded.  */
++#define SEGMENT_SIZE	1024
++
++#define _N_SEGMENT_ROUND(x) (((x) + SEGMENT_SIZE - 1) & ~(SEGMENT_SIZE - 1))
++#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text)
++
++#define N_DATADDR(x) \
++  (N_MAGIC(x)==OMAGIC? (_N_TXTENDADDR(x))				\
++   : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
++#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
++
++#if !defined (N_NLIST_DECLARED)
++struct nlist
++{
++  union 
++  {
++  char *n_name;
++  union
++    {
++      char *n_name;
++      struct nlist *n_next;
++      long n_strx;
++    } n_un;
++  } __attribute__ ((__transparent_union__)); 
++  unsigned char n_type;
++  char n_other;
++  short n_desc;
++  unsigned long n_value;
++};
++#endif /* no N_NLIST_DECLARED.  */
++
++#define N_UNDF	0
++#define N_ABS	2
++#define N_TEXT	4
++#define N_DATA	6
++#define N_BSS	8
++#define N_FN	15
++#define N_EXT	1
++#define N_TYPE	036
++#define N_STAB	0340
++#define N_INDR	0xa
++#define	N_SETA	0x14	/* Absolute set element symbol.  */
++#define	N_SETT	0x16	/* Text set element symbol.  */
++#define	N_SETD	0x18	/* Data set element symbol.  */
++#define	N_SETB	0x1A	/* Bss set element symbol.  */
++#define N_SETV	0x1C	/* Pointer to set vector in data area.  */
++
++#if !defined (N_RELOCATION_INFO_DECLARED)
++/* This structure describes a single relocation to be performed.
++   The text-relocation section of the file is a vector of these structures,
++   all of which apply to the text section.
++   Likewise, the data-relocation section applies to the data section.  */
++
++struct relocation_info
++{
++  int r_address;
++  unsigned int r_symbolnum:24;
++  unsigned int r_pcrel:1;
++  unsigned int r_length:2;
++  unsigned int r_extern:1;
++  unsigned int r_pad:4;
++};
++#endif /* no N_RELOCATION_INFO_DECLARED.  */
++
++#endif /* __A_OUT_GNU_H__ */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/access.c
+@@ -0,0 +1,68 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stddef.h>
++#include <stdio.h>
++#include <string.h>
++#include <unistd.h>
++#include <sys/types.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <sysdep.h>
++
++/*
++   The FreeBSD kernel do not test file access correctly when the 
++   process' real user ID is superuser. In particular, they always return
++   zero when testing execute permissions without regard to whether the 
++   file is executable.
++
++   While this behaviour conforms to POSIX.1-2008, it is explicitely 
++   discouraged. This wrapper implements the recommended behaviour.
++ */
++
++extern int __syscall_access (const char *path, int mode);
++libc_hidden_proto (__syscall_access)
++
++int
++__access (const char *path, int mode)
++{
++  struct stat64 stats;
++
++  if ((__getuid() != 0) || !(mode & X_OK))
++    return __syscall_access (path, mode);
++
++  /* Althought the super-user can read and write any file, 
++     the file-system might be i.e. read-only. Do the check. */
++     
++  if (__syscall_access (path, mode))
++    return -1;
++    
++  if (stat64 (path, &stats))
++    return -1;
++
++  /* The super-user can execute any file that anyone can execute. */
++  if (stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))
++    return 0;
++
++  __set_errno (EACCES);
++  return -1;
++}
++
++weak_alias (__access, access)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bind.c
+@@ -0,0 +1,60 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Aurelien Jarno <aurelien@aurel32.net>, 2005.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/socket.h>
++#include <sysdep.h>
++
++/* According to POSIX.1-2004 the len argument specifies the length of
++   the sockaddr structure pointed to by the addrarg argument. However
++   the FreeBSD kernel waits the actual length of the address stored
++   there. The code below emulate this behaviour. */
++
++extern int __libc_sa_len (sa_family_t __af);
++extern int __libc_sa_len_internal (sa_family_t __af);
++
++extern int __syscall_bind (int fd, __CONST_SOCKADDR_ARG addr,
++			   socklen_t addrlen) __THROW;
++libc_hidden_proto (__syscall_bind)
++
++/* Open a connection on socket FD to peer at ADDR (which LEN bytes long).
++   For connectionless socket types, just set the default address to send to
++   and the only address from which to accept transmissions.
++   Return 0 on success, -1 for errors.  */
++
++int
++__bind (int fd, __CONST_SOCKADDR_ARG addr, socklen_t addrlen)
++{
++  socklen_t new_addrlen;
++
++#ifndef NOT_IN_libc
++  new_addrlen = INTUSE(__libc_sa_len) ((addr.__sockaddr__)->sa_family);
++#else
++  new_addrlen = __libc_sa_len ((addr.__sockaddr__)->sa_family);
++#endif
++
++  /* Only allow a smaller size, otherwise it could lead to
++    stack corruption */
++  if ((new_addrlen != 0) && (new_addrlen < addrlen))
++    addrlen = new_addrlen;
++
++  /* We pass 3 arguments.  */
++  return INLINE_SYSCALL (bind, 3, fd, addr.__sockaddr__, addrlen);
++}
++
++weak_alias (__bind, bind)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/dirent.h
+@@ -0,0 +1,52 @@
++/* Directory entry structure `struct dirent'.  FreeBSD version.
++   Copyright (C) 1996-1998,2001-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _DIRENT_H
++# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
++#endif
++
++struct dirent
++  {
++    unsigned int d_ino;		/* File serial number.  */
++    unsigned short int d_reclen; /* Length of the whole `struct dirent'.  */
++    unsigned char d_type;	/* File type, possibly unknown.  */
++    unsigned char d_namlen;	/* Length of the file name.  */
++
++    /* Only this member is in the POSIX standard.  */
++    char d_name[256];		/* File name (actually longer).  */
++  };
++
++#ifdef __USE_LARGEFILE64
++struct dirent64
++  {
++    unsigned int d_ino;		/* File serial number.  */
++    unsigned short int d_reclen; /* Length of the whole `struct dirent'.  */
++    unsigned char d_type;	/* File type, possibly unknown.  */
++    unsigned char d_namlen;	/* Length of the file name.  */
++
++    /* Only this member is in the POSIX standard.  */
++    char d_name[256];		/* File name (actually longer).  */
++  };
++#endif
++
++#define d_fileno        d_ino   /* Backwards compatibility.  */
++
++#define _DIRENT_HAVE_D_RECLEN 1
++#define _DIRENT_HAVE_D_NAMLEN 1
++#define _DIRENT_HAVE_D_TYPE 1
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/elf.h
+@@ -0,0 +1,37 @@
++/* This file defines standard ELF types, structures, and macros.
++   Copyright (C) 1995-2003,2004,2005,2006,2007,2008,2009,2010
++	Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _BITS_ELF_H
++#define _BITS_ELF_H
++
++__BEGIN_DECLS
++
++#define	AT_EXECPATH	15	/* Path to the executable. */
++#define	AT_CANARY	16	/* Canary for SSP. */
++#define	AT_CANARYLEN	17	/* Length of the canary. */
++#define	AT_OSRELDATE	18	/* OSRELDATE. */
++#define	AT_NCPUS	19	/* Number of CPUs. */
++#define	AT_PAGESIZES	20	/* Pagesizes. */
++#define	AT_PAGESIZESLEN	21	/* Number of pagesizes. */
++#define	AT_STACKPROT	23	/* Initial stack protection. */
++
++__END_DECLS
++
++#endif	/* elf.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/errno.h
+@@ -0,0 +1,192 @@
++/*-
++ * Copyright (c) 1982, 1986, 1989, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ * (c) UNIX System Laboratories, Inc.
++ * All or some portions of this file are derived from material licensed
++ * to the University of California by American Telephone and Telegraph
++ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
++ * the permission of UNIX System Laboratories, Inc.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)errno.h	8.5 (Berkeley) 1/21/94
++ * $FreeBSD$
++ */
++
++#ifdef _ERRNO_H
++
++# undef EDOM
++# undef EILSEQ
++# undef ERANGE
++
++#define	EPERM		1		/* Operation not permitted */
++#define	ENOENT		2		/* No such file or directory */
++#define	ESRCH		3		/* No such process */
++#define	EINTR		4		/* Interrupted system call */
++#define	EIO		5		/* Input/output error */
++#define	ENXIO		6		/* Device not configured */
++#define	E2BIG		7		/* Argument list too long */
++#define	ENOEXEC		8		/* Exec format error */
++#define	EBADF		9		/* Bad file descriptor */
++#define	ECHILD		10		/* No child processes */
++#define	EDEADLK		11		/* Resource deadlock avoided */
++					/* 11 was EAGAIN */
++#define	ENOMEM		12		/* Cannot allocate memory */
++#define	EACCES		13		/* Permission denied */
++#define	EFAULT		14		/* Bad address */
++#define	ENOTBLK		15		/* Block device required */
++#define	EBUSY		16		/* Device busy */
++#define	EEXIST		17		/* File exists */
++#define	EXDEV		18		/* Cross-device link */
++#define	ENODEV		19		/* Operation not supported by device */
++#define	ENOTDIR		20		/* Not a directory */
++#define	EISDIR		21		/* Is a directory */
++#define	EINVAL		22		/* Invalid argument */
++#define	ENFILE		23		/* Too many open files in system */
++#define	EMFILE		24		/* Too many open files */
++#define	ENOTTY		25		/* Inappropriate ioctl for device */
++#define	ETXTBSY		26		/* Text file busy */
++#define	EFBIG		27		/* File too large */
++#define	ENOSPC		28		/* No space left on device */
++#define	ESPIPE		29		/* Illegal seek */
++#define	EROFS		30		/* Read-only filesystem */
++#define	EMLINK		31		/* Too many links */
++#define	EPIPE		32		/* Broken pipe */
++
++/* math software */
++#define	EDOM		33		/* Numerical argument out of domain */
++#define	ERANGE		34		/* Result too large */
++
++/* non-blocking and interrupt i/o */
++#define	EAGAIN		35		/* Resource temporarily unavailable */
++#define	EWOULDBLOCK	EAGAIN		/* Operation would block */
++#define	EINPROGRESS	36		/* Operation now in progress */
++#define	EALREADY	37		/* Operation already in progress */
++
++/* ipc/network software -- argument errors */
++#define	ENOTSOCK	38		/* Socket operation on non-socket */
++#define	EDESTADDRREQ	39		/* Destination address required */
++#define	EMSGSIZE	40		/* Message too long */
++#define	EPROTOTYPE	41		/* Protocol wrong type for socket */
++#define	ENOPROTOOPT	42		/* Protocol not available */
++#define	EPROTONOSUPPORT	43		/* Protocol not supported */
++#define	ESOCKTNOSUPPORT	44		/* Socket type not supported */
++#define	EOPNOTSUPP	45		/* Operation not supported */
++#define	ENOTSUP		EOPNOTSUPP	/* Operation not supported */
++#define	EPFNOSUPPORT	46		/* Protocol family not supported */
++#define	EAFNOSUPPORT	47		/* Address family not supported by protocol family */
++#define	EADDRINUSE	48		/* Address already in use */
++#define	EADDRNOTAVAIL	49		/* Can't assign requested address */
++
++/* ipc/network software -- operational errors */
++#define	ENETDOWN	50		/* Network is down */
++#define	ENETUNREACH	51		/* Network is unreachable */
++#define	ENETRESET	52		/* Network dropped connection on reset */
++#define	ECONNABORTED	53		/* Software caused connection abort */
++#define	ECONNRESET	54		/* Connection reset by peer */
++#define	ENOBUFS		55		/* No buffer space available */
++#define	EISCONN		56		/* Socket is already connected */
++#define	ENOTCONN	57		/* Socket is not connected */
++#define	ESHUTDOWN	58		/* Can't send after socket shutdown */
++#define	ETOOMANYREFS	59		/* Too many references: can't splice */
++#define	ETIMEDOUT	60		/* Operation timed out */
++#define	ECONNREFUSED	61		/* Connection refused */
++
++#define	ELOOP		62		/* Too many levels of symbolic links */
++#define	ENAMETOOLONG	63		/* File name too long */
++
++/* should be rearranged */
++#define	EHOSTDOWN	64		/* Host is down */
++#define	EHOSTUNREACH	65		/* No route to host */
++#define	ENOTEMPTY	66		/* Directory not empty */
++
++/* quotas & mush */
++#define	EPROCLIM	67		/* Too many processes */
++#define	EUSERS		68		/* Too many users */
++#define	EDQUOT		69		/* Disc quota exceeded */
++
++/* Network File System */
++#define	ESTALE		70		/* Stale NFS file handle */
++#define	EREMOTE		71		/* Too many levels of remote in path */
++#define	EBADRPC		72		/* RPC struct is bad */
++#define	ERPCMISMATCH	73		/* RPC version wrong */
++#define	EPROGUNAVAIL	74		/* RPC prog. not avail */
++#define	EPROGMISMATCH	75		/* Program version wrong */
++#define	EPROCUNAVAIL	76		/* Bad procedure for program */
++
++#define	ENOLCK		77		/* No locks available */
++#define	ENOSYS		78		/* Function not implemented */
++
++#define	EFTYPE		79		/* Inappropriate file type or format */
++#define	EAUTH		80		/* Authentication error */
++#define	ENEEDAUTH	81		/* Need authenticator */
++#define	EIDRM		82		/* Identifier removed */
++#define	ENOMSG		83		/* No message of desired type */
++#define	EOVERFLOW	84		/* Value too large to be stored in data type */
++#define	ECANCELED	85		/* Operation canceled */
++#define	EILSEQ		86		/* Illegal byte sequence */
++#define	ENOATTR		87		/* Attribute not found */
++
++#define	EDOOFUS		88		/* Programming error */
++
++#define	EBADMSG		89		/* Bad message */
++#define	EMULTIHOP	90		/* Multihop attempted */
++#define	ENOLINK		91		/* Link has been severed */
++#define	EPROTO		92		/* Protocol error */
++
++#define	ENOTCAPABLE	93		/* Capabilities insufficient */
++
++#define	ELAST		93		/* Must be equal largest errno */
++
++#ifdef _KERNEL
++/* pseudo-errors returned inside kernel to modify return to process */
++#define	ERESTART	(-1)		/* restart syscall */
++#define	EJUSTRETURN	(-2)		/* don't modify regs, just return */
++#define	ENOIOCTL	(-3)		/* ioctl not handled by this layer */
++#define	EDIRIOCTL	(-4)		/* do direct ioctl in GEOM */
++#endif
++
++# ifndef __ASSEMBLER__
++/* Function to get address of global `errno' variable.  */
++extern int *__errno_location (void) __THROW __attribute__ ((__const__));
++
++#  if !defined _LIBC || defined _LIBC_REENTRANT
++/* When using threads, errno is a per-thread value.  */
++#   define errno (*__errno_location ())
++#  endif
++# endif /* !__ASSEMBLER__ */
++#endif /* _ERRNO_H */
++
++#if !defined _ERRNO_H && defined __need_Emath
++/* This is ugly but the kernel header is not clean enough.  We must
++   define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is
++   defined.  */
++
++#define	EDOM		33		/* Numerical argument out of domain */
++#define	ERANGE		34		/* Result too large */
++#define	EILSEQ		86		/* Illegal byte sequence */
++
++#endif /* !_ERRNO_H && __need_Emath */
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/fcntl.h
+@@ -0,0 +1,186 @@
++/* O_*, F_*, FD_* bit values for FreeBSD.
++   Copyright (C) 1991-1992, 1997, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef	_FCNTL_H
++# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
++#endif
++
++#include <sys/types.h>
++#include <bits/wordsize.h>
++#ifdef __USE_GNU
++# include <bits/uio.h>
++#endif
++
++
++/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
++   located on an ext2 file system */
++#define O_ACCMODE	   0003
++#define O_RDONLY	     00
++#define O_WRONLY	     01
++#define O_RDWR		     02
++#define O_CREAT		  01000	/* not fcntl */
++#define O_EXCL		  04000	/* not fcntl */
++#define O_NOCTTY	0100000	/* not fcntl */
++#define O_TRUNC		  02000	/* not fcntl */
++#define O_APPEND	    010
++#define O_NONBLOCK	     04
++#define O_NDELAY	O_NONBLOCK
++#define O_SYNC		   0200
++#define O_FSYNC		 O_SYNC
++#define O_ASYNC		   0100
++
++#ifdef __USE_GNU
++# define O_DIRECT	0200000	/* Direct disk access.	*/
++enum { O_DIRECTORY = 0 };	/* Must be a directory.	 */
++enum { O_NOATIME = 0};          /* Do not set atime.  */
++# define O_NOFOLLOW	   0400	/* Do not follow links.	 */
++#endif
++
++#ifdef __USE_BSD
++#define O_SHLOCK	    020 /* Open with shared file lock.  */
++#define O_EXLOCK	    040 /* Open with shared exclusive lock.  */
++#endif
++
++/* For now FreeBSD has synchronisity options for data and read operations.
++   We define the symbols here but let them do the same as O_SYNC since
++   this is a superset.	*/
++#if defined __USE_POSIX199309 || defined __USE_UNIX98
++# define O_DSYNC	O_SYNC	/* Synchronize data.  */
++# define O_RSYNC	O_SYNC	/* Synchronize read operations.	 */
++#endif
++
++#if _POSIX_C_SOURCE >= 200809L
++#define O_TTY_INIT	0x00080000	/* Restore default termios attributes */
++/* Defining O_CLOEXEC would break kfreebsd 8.1, see #635192 */
++/* #define O_CLOEXEC	0x00100000 */
++#endif
++
++/* Since 'off_t' is 64-bit, O_LARGEFILE is a no-op.  */
++#define O_LARGEFILE	0
++
++#ifdef __USE_BSD
++/* Bits in the file status flags returned by F_GETFL.
++   These are all the O_* flags, plus FREAD and FWRITE, which are
++   independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was
++   given to `open'.  */
++#define FREAD		1
++#define	FWRITE		2
++#endif
++
++#ifdef __USE_ATFILE
++# define AT_FDCWD		-100	/* Special value used to indicate
++					   the *at functions should use the
++					   current working directory. */
++# define AT_EACCESS		0x100	/* Test access permitted for
++					   effective IDs, not real IDs.  */
++# define AT_SYMLINK_NOFOLLOW	0x200	/* Do not follow symbolic links.  */
++# define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
++# define AT_REMOVEDIR		0x800	/* Remove directory instead of
++					   unlinking file.  */
++#endif
++
++/*
++ * We are out of bits in f_flag (which is a short).  However,
++ * the flag bits not set in FMASK are only meaningful in the
++ * initial open syscall.  Those bits can thus be given a
++ * different meaning for fcntl(2).
++ */
++#ifdef __USE_BSD
++/*
++ * Set by shm_open(3) to get automatic MAP_ASYNC behavior
++ * for POSIX shared memory objects (which are otherwise
++ * implemented as plain files).
++ */
++#define FPOSIXSHM	O_NOFOLLOW
++#endif
++
++/* Values for the second argument to `fcntl'.  */
++#define F_DUPFD		0	/* Duplicate file descriptor.  */
++#define F_GETFD		1	/* Get file descriptor flags.  */
++#define F_SETFD		2	/* Set file descriptor flags.  */
++#define F_GETFL		3	/* Get file status flags.  */
++#define F_SETFL		4	/* Set file status flags.  */
++#define F_GETLK		7	/* Get record locking info.  */
++#define F_SETLK		8	/* Set record locking info (non-blocking).  */
++#define F_SETLKW	9	/* Set record locking info (blocking).	*/
++/* Not necessary, we always have 64-bit offsets.  */
++#define F_GETLK64	7	/* Get record locking info.  */
++#define F_SETLK64	8	/* Set record locking info (non-blocking).  */
++#define F_SETLKW64	9	/* Set record locking info (blocking).	*/
++
++#if defined __USE_BSD || defined __USE_UNIX98
++# define F_SETOWN	5	/* Get owner of socket (receiver of SIGIO).  */
++# define F_GETOWN	6	/* Set owner of socket (receiver of SIGIO).  */
++#endif
++
++/* For F_[GET|SET]FD.  */
++#define FD_CLOEXEC	1	/* actually anything with low bit set goes */
++
++/* For posix fcntl() and `l_type' field of a `struct flock' for lockf().  */
++#define F_RDLCK		1	/* Read lock.  */
++#define F_WRLCK		3	/* Write lock.	*/
++#define F_UNLCK		2	/* Remove lock.	 */
++
++#ifdef __USE_BSD
++/* Operations for bsd flock(), also used by the kernel implementation.	*/
++# define LOCK_SH	1	/* shared lock */
++# define LOCK_EX	2	/* exclusive lock */
++# define LOCK_NB	4	/* or'd with one of the above to prevent
++				   blocking */
++# define LOCK_UN	8	/* remove lock */
++#endif
++
++struct flock
++  {
++    __off_t l_start;	/* Offset where the lock begins.  */
++    __off_t l_len;	/* Size of the locked area; zero means until EOF.  */
++    __pid_t l_pid;	/* Process holding the lock.  */
++    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.	*/
++    short int l_whence;	/* Where `l_start' is relative to (like `lseek').  */
++    int	__l_sysid;	/* remote system id or zero for local */
++  };
++
++#ifdef __USE_LARGEFILE64
++struct flock64
++  {
++    __off64_t l_start;	/* Offset where the lock begins.  */
++    __off64_t l_len;	/* Size of the locked area; zero means until EOF.  */
++    __pid_t l_pid;	/* Process holding the lock.  */
++    short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.	*/
++    short int l_whence;	/* Where `l_start' is relative to (like `lseek').  */
++    int	__l_sysid;	/* remote system id or zero for local */
++  };
++#endif
++
++/* Define some more compatibility macros to be backward compatible with
++   BSD systems which did not managed to hide these kernel macros.  */
++#ifdef	__USE_BSD
++# define FAPPEND	O_APPEND
++# define FFSYNC		O_FSYNC
++# define FASYNC		O_ASYNC
++# define FNONBLOCK	O_NONBLOCK
++# define FNDELAY	O_NDELAY
++
++#define FCREAT		O_CREAT
++#define FEXCL		O_EXCL
++#define FTRUNC		O_TRUNC
++#define FNOCTTY		O_NOCTTY
++#define FSYNC		O_SYNC
++#endif /* Use BSD.  */
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/in.h
+@@ -0,0 +1,308 @@
++/* Copyright (C) 1997, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/* FreeBSD version.  */
++
++#ifndef _NETINET_IN_H
++# error "Never use <bits/in.h> directly; include <netinet/in.h> instead."
++#endif
++
++
++/* Link numbers.  */
++#define	IMPLINK_IP		155
++#define	IMPLINK_LOWEXPER	156
++#define	IMPLINK_HIGHEXPER	158
++
++#define IPPROTO_DIVERT          258             /* divert pseudo-protocol */
++
++/* To select the IP level.  */
++#define SOL_IP	0
++
++/*
++ * Options for use with [gs]etsockopt at the IP level.
++ * First word of comment is data type; bool is stored in int.
++ */
++#define	IP_OPTIONS		1    /* buf/ip_opts; set/get IP options */
++#define	IP_HDRINCL		2    /* int; header is included with data */
++#define	IP_TOS			3    /* int; IP type of service and preced. */
++#define	IP_TTL			4    /* int; IP time to live */
++#define	IP_RECVOPTS		5    /* bool; receive all IP opts w/dgram */
++#define	IP_RECVRETOPTS		6    /* bool; receive IP opts for response */
++#define	IP_RECVDSTADDR		7    /* bool; receive IP dst addr w/dgram */
++#define	IP_SENDSRCADDR		IP_RECVDSTADDR /* cmsg_type to set src addr */
++#define	IP_RETOPTS		8    /* ip_opts; set/get IP options */
++#define	IP_MULTICAST_IF		9    /* struct in_addr *or* struct ip_mreqn;
++				      * set/get IP multicast i/f  */
++#define	IP_MULTICAST_TTL	10   /* u_char; set/get IP multicast ttl */
++#define	IP_MULTICAST_LOOP	11   /* u_char; set/get IP multicast loopback */
++#define	IP_ADD_MEMBERSHIP	12   /* ip_mreq; add an IP group membership */
++#define	IP_DROP_MEMBERSHIP	13   /* ip_mreq; drop an IP group membership */
++#define	IP_MULTICAST_VIF	14   /* set/get IP mcast virt. iface */
++#define	IP_RSVP_ON		15   /* enable RSVP in kernel */
++#define	IP_RSVP_OFF		16   /* disable RSVP in kernel */
++#define	IP_RSVP_VIF_ON		17   /* set RSVP per-vif socket */
++#define	IP_RSVP_VIF_OFF		18   /* unset RSVP per-vif socket */
++#define	IP_PORTRANGE		19   /* int; range to choose for unspec port */
++#define	IP_RECVIF		20   /* bool; receive reception if w/dgram */
++/* for IPSEC */
++#define	IP_IPSEC_POLICY		21   /* int; set/get security policy */
++#define	IP_FAITH		22   /* bool; accept FAITH'ed connections */
++
++#define	IP_ONESBCAST		23   /* bool: send all-ones broadcast */
++#define	IP_NONLOCALOK		24   /* bool: allow bind to spoof non-local addresses;
++					requires kernel compile option IP_NONLOCALBIND */
++
++#define	IP_FW_TABLE_ADD		40   /* add entry */
++#define	IP_FW_TABLE_DEL		41   /* delete entry */
++#define	IP_FW_TABLE_FLUSH	42   /* flush table */
++#define	IP_FW_TABLE_GETSIZE	43   /* get table size */
++#define	IP_FW_TABLE_LIST	44   /* list table contents */
++
++#define	IP_FW_ADD		50   /* add a firewall rule to chain */
++#define	IP_FW_DEL		51   /* delete a firewall rule from chain */
++#define	IP_FW_FLUSH		52   /* flush firewall rule chain */
++#define	IP_FW_ZERO		53   /* clear single/all firewall counter(s) */
++#define	IP_FW_GET		54   /* get entire firewall rule chain */
++#define	IP_FW_RESETLOG		55   /* reset logging counters */
++
++#define IP_FW_NAT_CFG           56   /* add/config a nat rule */
++#define IP_FW_NAT_DEL           57   /* delete a nat rule */
++#define IP_FW_NAT_GET_CONFIG    58   /* get configuration of a nat rule */
++#define IP_FW_NAT_GET_LOG       59   /* get log of a nat rule */
++
++#define	IP_DUMMYNET_CONFIGURE	60   /* add/configure a dummynet pipe */
++#define	IP_DUMMYNET_DEL		61   /* delete a dummynet pipe from chain */
++#define	IP_DUMMYNET_FLUSH	62   /* flush dummynet */
++#define	IP_DUMMYNET_GET		64   /* get entire dummynet pipes */
++
++#define	IP_RECVTTL		65   /* bool; receive IP TTL w/dgram */
++#define	IP_MINTTL		66   /* minimum TTL for packet or drop */
++#define	IP_DONTFRAG		67   /* don't fragment packet */
++
++/* IPv4 Source Filter Multicast API [RFC3678] */
++#define	IP_ADD_SOURCE_MEMBERSHIP	70   /* join a source-specific group */
++#define	IP_DROP_SOURCE_MEMBERSHIP	71   /* drop a single source */
++#define	IP_BLOCK_SOURCE			72   /* block a source */
++#define	IP_UNBLOCK_SOURCE		73   /* unblock a source */
++
++/* The following option is private; do not use it from user applications. */
++#define	IP_MSFILTER			74   /* set/get filter list */
++
++/* Protocol Independent Multicast API [RFC3678] */
++#define	MCAST_JOIN_GROUP		80   /* join an any-source group */
++#define	MCAST_LEAVE_GROUP		81   /* leave all sources for group */
++#define	MCAST_JOIN_SOURCE_GROUP		82   /* join a source-specific group */
++#define	MCAST_LEAVE_SOURCE_GROUP	83   /* leave a single source */
++#define	MCAST_BLOCK_SOURCE		84   /* block a source */
++#define	MCAST_UNBLOCK_SOURCE		85   /* unblock a source */
++
++/*
++ * Defaults and limits for options
++ */
++#define	IP_DEFAULT_MULTICAST_TTL  1	/* normally limit m'casts to 1 hop  */
++#define	IP_DEFAULT_MULTICAST_LOOP 1	/* normally hear sends if a member  */
++
++/*
++ * The imo_membership vector for each socket is now dynamically allocated at
++ * run-time, bounded by USHRT_MAX, and is reallocated when needed, sized
++ * according to a power-of-two increment.
++ */
++#define	IP_MIN_MEMBERSHIPS	31
++#define	IP_MAX_MEMBERSHIPS	4095
++#define	IP_MAX_SOURCE_FILTER	1024	/* # of filters per socket, per group */
++
++/*
++ * Filter modes; also used to represent per-socket filter mode internally.
++ */
++ 
++#define MCAST_UNDEFINED 0       /* fmode: not yet defined */
++#define	MCAST_INCLUDE	1	/* fmode: include these source(s) */
++#define	MCAST_EXCLUDE	2	/* fmode: exclude these source(s) */
++
++/*
++ * Argument for IP_PORTRANGE:
++ * - which range to search when port is unspecified at bind() or connect()
++ */
++#define	IP_PORTRANGE_DEFAULT	0	/* default range */
++#define	IP_PORTRANGE_HIGH	1	/* "high" - request firewall bypass */
++#define	IP_PORTRANGE_LOW	2	/* "low" - vouchsafe security */
++
++/*
++ * Names for IP sysctl objects
++ */
++#define	IPCTL_FORWARDING	1	/* act as router */
++#define	IPCTL_SENDREDIRECTS	2	/* may send redirects when forwarding */
++#define	IPCTL_DEFTTL		3	/* default TTL */
++#ifdef notyet
++#define	IPCTL_DEFMTU		4	/* default MTU */
++#endif
++#define IPCTL_RTEXPIRE		5	/* cloned route expiration time */
++#define IPCTL_RTMINEXPIRE	6	/* min value for expiration time */
++#define IPCTL_RTMAXCACHE	7	/* trigger level for dynamic expire */
++#define	IPCTL_SOURCEROUTE	8	/* may perform source routes */
++#define	IPCTL_DIRECTEDBROADCAST	9	/* may re-broadcast received packets */
++#define IPCTL_INTRQMAXLEN	10	/* max length of netisr queue */
++#define	IPCTL_INTRQDROPS	11	/* number of netisr q drops */
++#define	IPCTL_STATS		12	/* ipstat structure */
++#define	IPCTL_ACCEPTSOURCEROUTE	13	/* may accept source routed packets */
++#define	IPCTL_FASTFORWARDING	14	/* use fast IP forwarding code */
++#define	IPCTL_KEEPFAITH		15	/* FAITH IPv4->IPv6 translater ctl */
++#define	IPCTL_GIF_TTL		16	/* default TTL for gif encap packet */
++#define	IPCTL_MAXID		17
++
++/* Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS.
++   The `ip_dst' field is used for the first-hop gateway when using a
++   source route (this gets put into the header proper).  */
++struct ip_opts
++  {
++    struct in_addr ip_dst;	/* First hop; zero without source route.  */
++    char ip_opts[40];		/* Actually variable in size.  */
++  };
++
++/* Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
++   The first word in the comment at the right is the data type used;
++   "bool" means a boolean value stored in an `int'.  */
++#define IPV6_SOCKOPT_RESERVED1	3  /* reserved for future use */
++#define IPV6_UNICAST_HOPS	4  /* int; IP6 hops */
++#define IPV6_MULTICAST_IF	9  /* u_int; set/get IP6 multicast i/f  */
++#define IPV6_MULTICAST_HOPS	10 /* int; set/get IP6 multicast hops */
++#define IPV6_MULTICAST_LOOP	11 /* u_int; set/get IP6 multicast loopback */
++#define IPV6_JOIN_GROUP		12 /* ip6_mreq; join a group membership */
++#define IPV6_LEAVE_GROUP	13 /* ip6_mreq; leave a group membership */
++#define IPV6_PORTRANGE		14 /* int; range to choose for unspec port */
++#define ICMP6_FILTER		18 /* icmp6_filter; icmp6 filter */
++
++#define IPV6_CHECKSUM		26 /* int; checksum offset for raw socket */
++#define IPV6_V6ONLY		27 /* bool; make AF_INET6 sockets v6 only */
++
++#define IPV6_IPSEC_POLICY	28 /* struct; get/set security policy */
++#define IPV6_FAITH		29 /* bool; accept FAITH'ed connections */
++
++#define IPV6_FW_ADD		30 /* add a firewall rule to chain */
++#define IPV6_FW_DEL		31 /* delete a firewall rule from chain */
++#define IPV6_FW_FLUSH		32 /* flush firewall rule chain */
++#define IPV6_FW_ZERO		33 /* clear single/all firewall counter(s) */
++#define IPV6_FW_GET		34 /* get entire firewall rule chain */
++#define IPV6_RTHDRDSTOPTS	35 /* ip6_dest; send dst option before rthdr */
++
++#define IPV6_RECVPKTINFO	36 /* bool; recv if, dst addr */
++#define IPV6_RECVHOPLIMIT	37 /* bool; recv hop limit */
++#define IPV6_RECVRTHDR		38 /* bool; recv routing header */
++#define IPV6_RECVHOPOPTS	39 /* bool; recv hop-by-hop option */
++#define IPV6_RECVDSTOPTS	40 /* bool; recv dst option after rthdr */
++
++#define IPV6_USE_MIN_MTU	42 /* bool; send packets at the minimum MTU */
++#define IPV6_RECVPATHMTU	43 /* bool; notify an according MTU */
++#define IPV6_PATHMTU		44 /* mtuinfo; get the current path MTU (sopt),
++				      4 bytes int; MTU notification (cmsg) */
++
++#define IPV6_PKTINFO		46 /* in6_pktinfo; send if, src addr */
++#define IPV6_HOPLIMIT		47 /* int; send hop limit */
++#define IPV6_NEXTHOP		48 /* sockaddr; next hop addr */
++#define IPV6_HOPOPTS		49 /* ip6_hbh; send hop-by-hop option */
++#define IPV6_DSTOPTS		50 /* ip6_dest; send dst option befor rthdr */
++#define IPV6_RTHDR		51 /* ip6_rthdr; send routing header */
++
++#define IPV6_RECVTCLASS		57 /* bool; recv traffic class values */
++
++#define IPV6_AUTOFLOWLABEL	59 /* bool; attach flowlabel automagically */
++
++#define IPV6_TCLASS		61 /* int; send traffic class value */
++#define IPV6_DONTFRAG		62 /* bool; disable IPv6 fragmentation */
++
++#define IPV6_PREFER_TEMPADDR	63 /* int; prefer temporary addresses as
++                                    * the source address.
++				    */
++
++/* Obsolete synonyms for the above.  */
++#define IPV6_ADD_MEMBERSHIP	IPV6_JOIN_GROUP
++#define IPV6_DROP_MEMBERSHIP	IPV6_LEAVE_GROUP
++#define IPV6_RXHOPOPTS		IPV6_HOPOPTS
++#define IPV6_RXDSTOPTS		IPV6_DSTOPTS
++
++/* Socket level values for IPv6.  */
++#define SOL_IPV6	41
++#define SOL_ICMPV6	58
++
++/*
++ * Defaults and limits for options
++ */
++#define IPV6_DEFAULT_MULTICAST_HOPS 1   /* normally limit m'casts to 1 hop */
++#define IPV6_DEFAULT_MULTICAST_LOOP 1   /* normally hear sends if a member */
++
++/*
++ * Argument for IPV6_PORTRANGE:
++ * - which range to search when port is unspecified at bind() or connect()
++ */
++#define IPV6_PORTRANGE_DEFAULT  0       /* default range */
++#define IPV6_PORTRANGE_HIGH     1       /* "high" - request firewall bypass */
++#define IPV6_PORTRANGE_LOW      2       /* "low" - vouchsafe security */
++
++/* Routing header options for IPv6.  */
++#define IPV6_RTHDR_LOOSE	0	/* Hop doesn't need to be neighbour. */
++#define IPV6_RTHDR_STRICT	1	/* Hop must be a neighbour.  */
++
++#define IPV6_RTHDR_TYPE_0	0	/* IPv6 Routing header type 0.  */
++
++/*
++ * Names for IP sysctl objects
++ */
++#define IPV6CTL_FORWARDING	1	/* act as router */
++#define IPV6CTL_SENDREDIRECTS	2	/* may send redirects when forwarding*/
++#define IPV6CTL_DEFHLIM		3	/* default Hop-Limit */
++#define IPV6CTL_FORWSRCRT	5	/* forward source-routed dgrams */
++#define IPV6CTL_STATS		6	/* stats */
++#define IPV6CTL_MRTSTATS	7	/* multicast forwarding stats */
++#define IPV6CTL_MRTPROTO	8	/* multicast routing protocol */
++#define IPV6CTL_MAXFRAGPACKETS	9	/* max packets reassembly queue */
++#define IPV6CTL_SOURCECHECK	10	/* verify source route and intf */
++#define IPV6CTL_SOURCECHECK_LOGINT 11	/* minimume logging interval */
++#define IPV6CTL_ACCEPT_RTADV	12
++#define IPV6CTL_KEEPFAITH	13
++#define IPV6CTL_LOG_INTERVAL	14
++#define IPV6CTL_HDRNESTLIMIT	15
++#define IPV6CTL_DAD_COUNT	16
++#define IPV6CTL_AUTO_FLOWLABEL	17
++#define IPV6CTL_DEFMCASTHLIM	18
++#define IPV6CTL_GIF_HLIM	19	/* default HLIM for gif encap packet */
++#define IPV6CTL_KAME_VERSION	20
++#define IPV6CTL_USE_DEPRECATED	21	/* use deprecated addr (RFC2462 5.5.4) */
++#define IPV6CTL_RR_PRUNE	22	/* walk timer for router renumbering */
++#define IPV6CTL_V6ONLY		24
++#define IPV6CTL_RTEXPIRE	25	/* cloned route expiration time */
++#define IPV6CTL_RTMINEXPIRE	26	/* min value for expiration time */
++#define IPV6CTL_RTMAXCACHE	27	/* trigger level for dynamic expire */
++
++#define IPV6CTL_USETEMPADDR	32	/* use temporary addresses (RFC3041) */
++#define IPV6CTL_TEMPPLTIME	33	/* preferred lifetime for tmpaddrs */
++#define IPV6CTL_TEMPVLTIME	34	/* valid lifetime for tmpaddrs */
++#define IPV6CTL_AUTO_LINKLOCAL	35	/* automatic link-local addr assign */
++#define IPV6CTL_RIP6STATS	36	/* raw_ip6 stats */
++#define IPV6CTL_PREFER_TEMPADDR	37	/* prefer temporary addr as src */
++#define IPV6CTL_ADDRCTLPOLICY	38	/* get/set address selection policy */
++#define IPV6CTL_USE_DEFAULTZONE	39	/* use default scope zone */
++
++#define IPV6CTL_MAXFRAGS	41	/* max fragments */
++#define IPV6CTL_MCAST_PMTU	44	/* enable pMTU discovery for multicast? */
++
++/* New entries should be added here from current IPV6CTL_MAXID value. */
++/* to define items, should talk with KAME guys first, for *BSD compatibility */
++/* 42-44 is already used in KAME */
++#define IPV6CTL_STEALTH		45
++#define	ICMPV6CTL_ND6_ONLINKNSRFC4861	47
++#define IPV6CTL_MAXID		48
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/ioctl-types.h
+@@ -0,0 +1,37 @@
++/* Structure types for pre-termios terminal ioctls.  FreeBSD version.
++   Copyright (C) 1996, 1997, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_IOCTL_H
++# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
++#endif
++
++/* Many systems that have TIOCGWINSZ define TIOCGSIZE for source
++   compatibility with Sun; they define `struct ttysize' to have identical
++   layout as `struct winsize' and #define TIOCGSIZE to be TIOCGWINSZ
++   (likewise TIOCSSIZE and TIOCSWINSZ).  */
++/* struct ttysize is in FreeBSD originally defined in <sys/ioctl.h>,
++   which is replaced by GLIBC version -> define here */
++struct ttysize
++{
++  unsigned short int ts_lines;
++  unsigned short int ts_cols;
++  unsigned short int ts_xxx;
++  unsigned short int ts_yyy;
++};
++#define	_IOT_ttysize	_IOT_winsize
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/ioctls.h
+@@ -0,0 +1,50 @@
++/*-
++ * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)ioctl.h	8.6 (Berkeley) 3/28/94
++ */
++
++#ifndef	_IOCTLS_H_
++#define	_IOCTLS_H_
++
++#include <sys/ioccom.h>
++
++#include <sys/ttycom.h>
++
++/*
++ *	@(#)ioctl.h	8.6 (Berkeley) 3/28/94
++ */
++
++#define	TIOCGSIZE	TIOCGWINSZ
++#define	TIOCSSIZE	TIOCSWINSZ
++
++#include <sys/filio.h>
++
++#include <sys/sockio.h>
++
++#endif /* !_IOCTLS_H_ */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/ipc.h
+@@ -0,0 +1,56 @@
++/* Copyright (C) 1995-1997, 1999, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_IPC_H
++# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
++#endif
++
++#include <bits/types.h>
++
++/* Mode bits for `msgget', `semget', and `shmget'.  */
++#define IPC_CREAT	01000		/* create key if key does not exist */
++#define IPC_EXCL	02000		/* fail if key exists */
++#define IPC_NOWAIT	04000		/* return error on wait */
++
++/* Control commands for `msgctl', `semctl', and `shmctl'.  */
++#define IPC_RMID	0		/* remove identifier */
++#define IPC_SET		1		/* set `ipc_perm' options */
++#define IPC_STAT	2		/* get `ipc_perm' options */
++
++/* Special key values.  */
++#define IPC_PRIVATE	((key_t) 0)	/* private key */
++
++#ifdef __USE_BSD
++/* Common mode bits.  */
++# define IPC_R		0400		/* read permission, same as S_IRUSR */
++# define IPC_W		0200		/* write permission, same as S_IWUSR */
++# define IPC_M		0x1000		/* control permission */
++#endif
++
++
++/* Data structure used to pass permission information to IPC operations.  */
++struct ipc_perm
++  {
++    __uint16_t /* yuck! */ cuid;	/* creator's user ID */
++    __uint16_t /* yuck! */ cgid;	/* creator's group ID */
++    __uint16_t /* yuck! */ uid;		/* owner's user ID */
++    __uint16_t /* yuck! */ gid;		/* owner's group ID */
++    __mode_t mode;			/* read/write permission */
++    __uint16_t __seq;
++    __key_t __key;
++  };
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/local_lim.h
+@@ -0,0 +1,25 @@
++/* Minimum guaranteed maximum values for system limits.  kFreeBSD version.
++   Copyright (C) 2011 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/param.h>
++
++/* BSD userland provides MAXHOSTNAMELEN via <sys/param.h>.  GNU
++   userland provides HOST_NAME_MAX via <limits.h>.  This makes
++   both worlds happy.  */
++#define HOST_NAME_MAX MAXHOSTNAMELEN
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/mman.h
+@@ -0,0 +1,130 @@
++/* Definitions for POSIX memory map interface.  FreeBSD version.
++   Copyright (C) 1994-1998, 2000-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_MMAN_H
++# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
++#endif
++
++#include <features.h>
++#include <stddef.h>
++
++/* Protections are chosen from these bits, OR'd together.  The
++   implementation does not necessarily support PROT_EXEC or PROT_WRITE
++   without PROT_READ.  The only guarantees are that no writing will be
++   allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
++
++#define	PROT_NONE	 0x00	/* No access.  */
++#define	PROT_READ	 0x01	/* Pages can be read.  */
++#define	PROT_WRITE	 0x02	/* Pages can be written.  */
++#define	PROT_EXEC	 0x04	/* Pages can be executed.  */
++
++/* Flags contain mapping type, sharing type and options.  */
++
++/* Mapping type (must choose one and only one of these).  */
++#ifdef __USE_BSD
++# define MAP_FILE	 0x0000	/* Mapped from a file or device.  */
++# define MAP_ANON	 0x1000	/* Allocated from anonymous virtual memory.  */
++# define MAP_TYPE	 0x1000	/* Mask for type field.  */
++# ifdef __USE_MISC
++#  define MAP_ANONYMOUS  MAP_ANON /* Linux name. */
++# endif
++#endif
++
++/* Sharing types (must choose one and only one of these).  */
++#define	MAP_SHARED	 0x0001	/* Share changes.  */
++#define	MAP_PRIVATE	 0x0002	/* Changes private; copy pages on write.  */
++#ifdef __USE_BSD
++# define MAP_COPY MAP_PRIVATE	/* Virtual copy of region at mapping time.  */
++#endif
++
++/* Other flags.  */
++#define	MAP_FIXED	 0x0010	/* Map address must be exactly as requested. */
++#ifdef __USE_BSD
++#define MAP_RENAME	 0x0020 /* Sun: rename private pages to file */
++#define MAP_NORESERVE	 0x0040 /* Sun: don't reserve needed swap area */
++#define MAP_RESERVED0080 0x0080	/* previously misimplemented MAP_INHERIT */
++#define MAP_RESERVED0100 0x0100	/* previously unimplemented MAP_NOEXTEND */
++# define MAP_HASSEMPHORE 0x0200	/* Region may contain semaphores.  */
++# define MAP_STACK	 0x0400	/* Region grows down, like a stack.  */
++# define MAP_NOSYNC	 0x0800	/* Try to avoid flushing to the disk.  */
++# define MAP_NOCORE	0x20000	/* Don't include these pages in a core dump.  */
++#endif
++
++/* Advice to `madvise'.  */
++#ifdef __USE_BSD
++# define MADV_NORMAL	 0	/* No further special treatment.  */
++# define MADV_RANDOM	 1	/* Expect random page references.  */
++# define MADV_SEQUENTIAL 2	/* Expect sequential page references.  */
++# define MADV_WILLNEED	 3	/* Will need these pages.  */
++# define MADV_DONTNEED	 4	/* Don't need these pages.  */
++# define MADV_FREE	 5	/* Don't need these pages, they contain junk. */
++# define MADV_NOSYNC	 6	/* Try to avoid flushing to the disk.  */
++# define MADV_AUTOSYNC	 7	/* Use the default flushing strategy.  */
++# define MADV_NOCORE	 8	/* Don't include these pages in a core dump.  */
++# define MADV_CORE	 9	/* Include pages in a core dump (default).  */
++# define MADV_PROTECT	10	/* protect process from pageout kill */
++#endif
++
++/* The POSIX people had to invent similar names for the same things.  */
++#ifdef __USE_XOPEN2K
++# define POSIX_MADV_NORMAL	0 /* No further special treatment.  */
++# define POSIX_MADV_RANDOM	1 /* Expect random page references.  */
++# define POSIX_MADV_SEQUENTIAL	2 /* Expect sequential page references.  */
++# define POSIX_MADV_WILLNEED	3 /* Will need these pages.  */
++# define POSIX_MADV_DONTNEED	4 /* Don't need these pages.  */
++#endif
++
++/* Flags to `msync'.  */
++#define MS_ASYNC	1		/* Sync memory asynchronously.  */
++#define MS_SYNC		0		/* Synchronous memory sync.  */
++#define MS_INVALIDATE	2		/* Invalidate the caches.  */
++
++/* Flags for `mlockall' (can be OR'd together).  */
++#define MCL_CURRENT	1		/* Lock all currently mapped pages.  */
++#define MCL_FUTURE	2		/* Lock all additions to address
++					   space.  */
++
++/* Flags for 'minherit'.  */
++#ifdef __USE_BSD
++# define INHERIT_SHARE	0
++# define INHERIT_COPY	1
++# define INHERIT_NONE	2
++#endif
++
++
++/*
++ * Return bits from mincore
++ */
++#ifdef __USE_MISC
++#define	MINCORE_INCORE	 	 0x1 /* Page is incore */
++#define	MINCORE_REFERENCED	 0x2 /* Page has been referenced by us */
++#define	MINCORE_MODIFIED	 0x4 /* Page has been modified by us */
++#define	MINCORE_REFERENCED_OTHER 0x8 /* Page has been referenced */
++#define	MINCORE_MODIFIED_OTHER	0x10 /* Page has been modified */
++#endif /* Use MISC */
++
++#ifdef __USE_BSD
++
++__BEGIN_DECLS
++
++extern int minherit (void *__addr, size_t __len, int __inherit);
++
++__END_DECLS
++
++#endif /* Use BSD */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/msq.h
+@@ -0,0 +1,69 @@
++/* Copyright (C) 1995, 1997, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_MSG_H
++#error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
++#endif
++
++#include <bits/types.h>
++
++/* Define options for message queue functions.  */
++#define MSG_NOERROR	010000	/* no error if message is too big */
++
++/* Types used in the structure definition.  */
++typedef unsigned long int msgqnum_t;
++typedef unsigned long int msglen_t;
++
++
++/* Structure of record for one message inside the kernel.
++   The type `struct __msg' is opaque.  */
++struct msqid_ds
++{
++  struct ipc_perm msg_perm;	/* structure describing operation permission */
++  void *__msg_first;
++  void *__msg_last;
++  msglen_t __msg_cbytes;	/* current number of bytes on queue */
++  msgqnum_t msg_qnum;		/* number of messages currently on queue */
++  msglen_t msg_qbytes;		/* max number of bytes allowed on queue */
++  __pid_t msg_lspid;		/* pid of last msgsnd() */
++  __pid_t msg_lrpid;		/* pid of last msgrcv() */
++  __time_t msg_stime;		/* time of last msgsnd command */
++  long __unused1;
++  __time_t msg_rtime;		/* time of last msgrcv command */
++  long __unused2;
++  __time_t msg_ctime;		/* time of last change */
++  long __unused3;
++  long __unused4[4];
++};
++
++#ifdef __USE_MISC
++
++# define msg_cbytes	__msg_cbytes
++
++/* buffer for msgctl calls IPC_INFO, MSG_INFO */
++struct msginfo
++  {
++    int msgmax;
++    int msgmni;
++    int msgmnb;
++    int msgtql;
++    int msgssz;
++    int msgseg;
++  };
++
++#endif /* __USE_MISC */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/poll.h
+@@ -0,0 +1,62 @@
++/* Copyright (C) 1997, 2001-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_POLL_H
++# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
++#endif
++
++/* Event types that can be polled for.  These bits may be set in `events'
++   to indicate the interesting event types; they will appear in `revents'
++   to indicate the status of the file descriptor.  */
++#define POLLIN		0x0001		/* There is data to read.  */
++#define POLLPRI		0x0002		/* There is urgent data to read.  */
++#define POLLOUT		0x0004		/* Writing now will not block.  */
++
++#ifdef __USE_XOPEN
++/* These values are defined in XPG4.2.  */
++# define POLLRDNORM	0x0040		/* Normal data may be read.  */
++# define POLLRDBAND	0x0080		/* Priority data may be read.  */
++# define POLLWRNORM	POLLOUT		/* Writing now will not block.  */
++# define POLLWRBAND	0x0100		/* Priority data may be written.  */
++#endif
++
++#ifdef __USE_BSD
++/* General FreeBSD extension (currently only supported for sockets): */
++# define POLLINIGNEOF	0x2000		/* like POLLIN, except ignore EOF */
++#endif
++
++/* Event types always implicitly polled for.  These bits need not be set in
++   `events', but they will appear in `revents' to indicate the status of
++   the file descriptor.  */
++#define POLLERR		0x0008		/* Error condition.  */
++#define POLLHUP		0x0010		/* Hung up.  */
++#define POLLNVAL	0x0020		/* Invalid polling request.  */
++
++#ifdef __USE_BSD
++
++# define POLLSTANDARD	(POLLIN|POLLPRI|POLLOUT|POLLRDNORM|POLLRDBAND|\
++			POLLWRBAND|POLLERR|POLLHUP|POLLNVAL)
++
++/*
++ * Request that poll() wait forever.
++ * XXX in SYSV, this is defined in stropts.h, which is not included
++ * by poll.h.
++ */
++#define INFTIM		(-1)
++
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/posix_opt.h
+@@ -0,0 +1,90 @@
++/* Define POSIX options for FreeBSD.
++   Copyright (C) 1996-1997, 1999, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/*
++ * Never include this file directly; use <unistd.h> instead.
++ */
++
++#ifndef	_BITS_POSIX_OPT_H
++#define	_BITS_POSIX_OPT_H	1
++
++/* Job control is supported.  */
++#define	_POSIX_JOB_CONTROL	1
++
++/* Processes have a saved set-user-ID and a saved set-group-ID.  */
++#define	_POSIX_SAVED_IDS	1
++
++/* Priority scheduling is supported.  */
++#define	_POSIX_PRIORITY_SCHEDULING	1
++
++/* Synchronizing file data is supported.  */
++#define	_POSIX_SYNCHRONIZED_IO	1
++
++/* The fsync function is present.  */
++#define	_POSIX_FSYNC	1
++
++/* Mapping of files to memory is supported.  */
++#define	_POSIX_MAPPED_FILES	1
++
++/* Locking of all memory is supported.  */
++#define	_POSIX_MEMLOCK	1
++
++/* Locking of ranges of memory is supported.  */
++#define	_POSIX_MEMLOCK_RANGE	1
++
++/* Setting of memory protections is supported.  */
++#define	_POSIX_MEMORY_PROTECTION	1
++
++/* Implementation supports `poll' function.  */
++#define	_POSIX_POLL	1
++
++/* Implementation supports `select' and `pselect' functions.  */
++#define	_POSIX_SELECT	1
++
++/* XPG4.2 shared memory is supported.  */
++#define	_XOPEN_SHM	1
++
++/* X/Open realtime support is available.  */
++#define _XOPEN_REALTIME	1
++
++/* Only root can change owner of file.  */
++#define	_POSIX_CHOWN_RESTRICTED	1
++
++/* `c_cc' member of 'struct termios' structure can be disabled by
++   using the value _POSIX_VDISABLE.  */
++#define	_POSIX_VDISABLE	((unsigned char)'\377')
++
++/* The LFS interface is available, except for the asynchronous I/O.  */
++#define _LFS_LARGEFILE		1
++#define _LFS64_LARGEFILE	1
++#define _LFS64_STDIO		1
++
++/* POSIX timers are available.  */
++#define _POSIX_TIMERS 1
++
++/* GNU libc provides regular expression handling.  */
++#define _POSIX_REGEXP	1
++
++/* We have a POSIX shell.  */
++#define _POSIX_SHELL	1
++
++/* The `spawn' function family is supported.  */
++#define _POSIX_SPAWN	200912L
++
++#endif /* bits/posix_opt.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/resource.h
+@@ -0,0 +1,211 @@
++/* Bit values & structures for resource limits.  FreeBSD version.
++   Copyright (C) 1994, 1996-1998, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_RESOURCE_H
++# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
++#endif
++
++#include <bits/types.h>
++#include <sys/_types.h>
++
++/* Transmute defines to enumerations.  The macro re-definitions are
++   necessary because some programs want to test for operating system
++   features with #ifdef RUSAGE_SELF.  In ISO C the reflexive
++   definition is a no-op.
++
++   These are the values for FreeBSD.  Earlier BSD systems have a subset of
++   these kinds of resource limit.  */
++
++/* Kinds of resource limit.  */
++enum __rlimit_resource
++{
++  /* Per-process CPU limit, in seconds.  */
++  RLIMIT_CPU = 0,
++#define	RLIMIT_CPU RLIMIT_CPU
++
++  /* Largest file that can be created, in bytes.  */
++  RLIMIT_FSIZE = 1,
++#define	RLIMIT_FSIZE RLIMIT_FSIZE
++
++  /* Maximum size of data segment, in bytes.  */
++  RLIMIT_DATA = 2,
++#define	RLIMIT_DATA RLIMIT_DATA
++
++  /* Maximum size of stack segment, in bytes.  */
++  RLIMIT_STACK = 3,
++#define	RLIMIT_STACK RLIMIT_STACK
++
++  /* Largest core file that can be created, in bytes.  */
++  RLIMIT_CORE = 4,
++#define	RLIMIT_CORE RLIMIT_CORE
++
++  /* Largest resident set size, in bytes.
++     This affects swapping; processes that are exceeding their
++     resident set size will be more likely to have physical memory
++     taken from them.  */
++  __RLIMIT_RSS = 5,
++#define	RLIMIT_RSS __RLIMIT_RSS
++
++  /* Locked-in-memory address space.  */
++  __RLIMIT_MEMLOCK = 6,
++#define	RLIMIT_MEMLOCK __RLIMIT_MEMLOCK
++
++  /* Number of processes.  */
++  __RLIMIT_NPROC = 7,
++#define	RLIMIT_NPROC __RLIMIT_NPROC
++
++  /* Number of open files.  */
++  RLIMIT_NOFILE = 8,
++#define	RLIMIT_NOFILE RLIMIT_NOFILE
++
++  /* Maximum size of all socket buffers.  */
++  __RLIMIT_SBSIZE = 9,
++#define RLIMIT_SBSIZE __RLIMIT_SBSIZE
++
++  /* Address space limit.  */
++  RLIMIT_AS = 10,
++#define RLIMIT_AS RLIMIT_AS
++
++  __RLIMIT_NLIMITS = 11,
++  __RLIM_NLIMITS = __RLIMIT_NLIMITS
++#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
++#define RLIM_NLIMITS __RLIM_NLIMITS
++};
++
++/* Value to indicate that there is no limit.  */
++#define RLIM_INFINITY 0x7fffffffffffffffLL
++#ifdef __USE_LARGEFILE64
++# define RLIM64_INFINITY 0x7fffffffffffffffLL
++#endif
++
++
++/* Type for resource quantity measurement.  */
++typedef __rlim_t rlim_t;
++#ifdef __USE_LARGEFILE64
++typedef __rlim64_t rlim64_t;
++#endif
++
++struct rlimit
++  {
++    /* The current (soft) limit.  */
++    rlim_t rlim_cur;
++    /* The hard limit.  */
++    rlim_t rlim_max;
++  };
++
++#ifdef __USE_LARGEFILE64
++struct rlimit64
++  {
++    /* The current (soft) limit.  */
++    rlim64_t rlim_cur;
++    /* The hard limit.  */
++    rlim64_t rlim_max;
++ };
++#endif
++
++struct orlimit {
++	__int32_t	rlim_cur;	/* current (soft) limit */
++	__int32_t	rlim_max;	/* maximum value for rlim_cur */
++};
++
++struct loadavg {
++	__fixpt_t	ldavg[3];
++	long		fscale;
++};
++
++#define	CP_USER		0
++#define	CP_NICE		1
++#define	CP_SYS		2
++#define	CP_INTR		3
++#define	CP_IDLE		4
++#define	CPUSTATES	5
++
++/* Whose usage statistics do you want?  */
++enum __rusage_who
++{
++  /* The calling process.  */
++  RUSAGE_SELF = 0,
++#define RUSAGE_SELF RUSAGE_SELF
++
++  /* All of its terminated child processes.  */
++  RUSAGE_CHILDREN = -1
++#define RUSAGE_CHILDREN RUSAGE_CHILDREN
++};
++
++#define __need_timeval
++#include <bits/time.h>		/* For `struct timeval'.  */
++
++/* Structure which says how much of each resource has been used.  */
++struct rusage
++  {
++    /* Total amount of user time used.  */
++    struct timeval ru_utime;
++    /* Total amount of system time used.  */
++    struct timeval ru_stime;
++    /* Maximum resident set size (in kilobytes).  */
++    long int ru_maxrss;
++    /* Amount of sharing of text segment memory
++       with other processes (kilobyte-seconds).  */
++    long int ru_ixrss;
++    /* Amount of data segment memory used (kilobyte-seconds).  */
++    long int ru_idrss;
++    /* Amount of stack memory used (kilobyte-seconds).  */
++    long int ru_isrss;
++    /* Number of soft page faults (i.e. those serviced by reclaiming
++       a page from the list of pages awaiting reallocation.  */
++    long int ru_minflt;
++    /* Number of hard page faults (i.e. those that required I/O).  */
++    long int ru_majflt;
++    /* Number of times a process was swapped out of physical memory.  */
++    long int ru_nswap;
++    /* Number of input operations via the file system.  Note: This
++       and `ru_oublock' do not include operations with the cache.  */
++    long int ru_inblock;
++    /* Number of output operations via the file system.  */
++    long int ru_oublock;
++    /* Number of IPC messages sent.  */
++    long int ru_msgsnd;
++    /* Number of IPC messages received.  */
++    long int ru_msgrcv;
++    /* Number of signals delivered.  */
++    long int ru_nsignals;
++    /* Number of voluntary context switches, i.e. because the process
++       gave up the process before it had to (usually to wait for some
++       resource to be available).  */
++    long int ru_nvcsw;
++    /* Number of involuntary context switches, i.e. a higher priority process
++       became runnable or the current process used up its time slice.  */
++    long int ru_nivcsw;
++  };
++
++/* Priority limits.  */
++#define PRIO_MIN	-20	/* Minimum priority a process can have.  */
++#define PRIO_MAX	20	/* Maximum priority a process can have.  */
++
++/* The type of the WHICH argument to `getpriority' and `setpriority',
++   indicating what flavor of entity the WHO argument specifies.  */
++enum __priority_which
++{
++  PRIO_PROCESS = 0,		/* WHO is a process ID.  */
++#define PRIO_PROCESS PRIO_PROCESS
++  PRIO_PGRP = 1,		/* WHO is a process group ID.  */
++#define PRIO_PGRP PRIO_PGRP
++  PRIO_USER = 2			/* WHO is a user ID.  */
++#define PRIO_USER PRIO_USER
++};
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/sched.h
+@@ -0,0 +1,183 @@
++/* Definitions of constants and data structure for POSIX 1003.1b-1993
++   scheduling interface.
++   Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008
++   Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef __need_schedparam
++
++#ifndef _SCHED_H
++# error "Never include <bits/sched.h> directly; use <sched.h> instead."
++#endif
++
++
++/* Scheduling algorithms.  */
++#define SCHED_OTHER	2
++#define SCHED_FIFO	1
++#define SCHED_RR	3
++
++
++#ifdef __USE_MISC
++/* Cloning flags.  */
++# define CSIGNAL       0x000000ff /* Signal mask to be sent at exit.  */
++# define CLONE_VM      0x00000100 /* Set if VM shared between processes.  */
++# define CLONE_FS      0x00000200 /* Set if fs info shared between processes.  */
++# define CLONE_FILES   0x00000400 /* Set if open files shared between processes.  */
++# define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared.  */
++# define CLONE_PTRACE  0x00002000 /* Set if tracing continues on the child.  */
++# define CLONE_VFORK   0x00004000 /* Set if the parent wants the child to
++				     wake it up on mm_release.  */
++# define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */
++#endif
++
++/* The official definition.  */
++struct sched_param
++  {
++    int __sched_priority;
++  };
++
++__BEGIN_DECLS
++
++#ifdef __USE_MISC
++/* Clone current process.  */
++extern int clone (int (*__fn) (void *__arg), void *__child_stack,
++		  int __flags, void *__arg) __THROW;
++
++/* Unshare the specified resources.  */
++extern int unshare (int __flags) __THROW;
++
++/* Get index of currently used CPU.  */
++extern int sched_getcpu (void) __THROW;
++#endif
++
++__END_DECLS
++
++#endif	/* need schedparam */
++
++#if !defined __defined_schedparam \
++    && (defined __need_schedparam || defined _SCHED_H)
++# define __defined_schedparam	1
++/* Data structure to describe a process' schedulability.  */
++struct __sched_param
++  {
++    int __sched_priority;
++  };
++# undef __need_schedparam
++#endif
++
++
++#if defined _SCHED_H && !defined __cpu_set_t_defined
++# define __cpu_set_t_defined
++/* Size definition for CPU sets.  */
++# define __CPU_SETSIZE	128
++# define __NCPUBITS	(8 * sizeof (__cpu_mask))
++
++/* Type for array elements in 'cpu_set_t'.  */
++typedef unsigned long int __cpu_mask;
++
++/* Basic access functions.  */
++# define __CPUELT(cpu)	((cpu) / __NCPUBITS)
++# define __CPUMASK(cpu)	((__cpu_mask) 1 << ((cpu) % __NCPUBITS))
++
++/* Data structure to describe CPU mask.  */
++typedef struct
++{
++  __cpu_mask __bits[__CPU_SETSIZE / __NCPUBITS];
++} cpu_set_t;
++
++/* Access functions for CPU masks.  */
++# if __GNUC_PREREQ (2, 91)
++#  define __CPU_ZERO_S(setsize, cpusetp) \
++  do __builtin_memset (cpusetp, '\0', setsize); while (0)
++# else
++#  define __CPU_ZERO_S(setsize, cpusetp) \
++  do {									      \
++    size_t __i;								      \
++    size_t __imax = (setsize) / sizeof (__cpu_mask);			      \
++    __cpu_mask *__bits = (cpusetp)->__bits;				      \
++    for (__i = 0; __i < __imax; ++__i)					      \
++      __bits[__i] = 0;							      \
++  } while (0)
++# endif
++# define __CPU_SET_S(cpu, setsize, cpusetp) \
++  (__extension__							      \
++   ({ size_t __cpu = (cpu);						      \
++      __cpu < 8 * (setsize)						      \
++      ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]		      \
++	 |= __CPUMASK (__cpu))						      \
++      : 0; }))
++# define __CPU_CLR_S(cpu, setsize, cpusetp) \
++  (__extension__							      \
++   ({ size_t __cpu = (cpu);						      \
++      __cpu < 8 * (setsize)						      \
++      ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]		      \
++	 &= ~__CPUMASK (__cpu))						      \
++      : 0; }))
++# define __CPU_ISSET_S(cpu, setsize, cpusetp) \
++  (__extension__							      \
++   ({ size_t __cpu = (cpu);						      \
++      __cpu < 8 * (setsize)						      \
++      ? ((((__const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]	      \
++	  & __CPUMASK (__cpu))) != 0					      \
++      : 0; }))
++
++# define __CPU_COUNT_S(setsize, cpusetp) \
++  __sched_cpucount (setsize, cpusetp)
++
++# if __GNUC_PREREQ (2, 91)
++#  define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
++  (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
++# else
++#  define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
++  (__extension__							      \
++   ({ __const __cpu_mask *__arr1 = (cpusetp1)->__bits;				      \
++      __const __cpu_mask *__arr2 = (cpusetp2)->__bits;				      \
++      size_t __imax = (setsize) / sizeof (__cpu_mask);			      \
++      size_t __i;							      \
++      for (__i = 0; __i < __imax; ++__i)				      \
++	if (__bits[__i] != __bits[__i])					      \
++	  break;							      \
++      __i == __imax; }))
++# endif
++
++# define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \
++  (__extension__							      \
++   ({ cpu_set_t *__dest = (destset);					      \
++      __const __cpu_mask *__arr1 = (srcset1)->__bits;				      \
++      __const __cpu_mask *__arr2 = (srcset2)->__bits;				      \
++      size_t __imax = (setsize) / sizeof (__cpu_mask);			      \
++      size_t __i;							      \
++      for (__i = 0; __i < __imax; ++__i)				      \
++	((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i];    \
++      __dest; }))
++
++# define __CPU_ALLOC_SIZE(count) \
++  ((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask))
++# define __CPU_ALLOC(count) __sched_cpualloc (count)
++# define __CPU_FREE(cpuset) __sched_cpufree (cpuset)
++
++__BEGIN_DECLS
++
++extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
++  __THROW;
++extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur;
++extern void __sched_cpufree (cpu_set_t *__set) __THROW;
++
++__END_DECLS
++
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/sem.h
+@@ -0,0 +1,95 @@
++/* Copyright (C) 1995-1998, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_SEM_H
++# error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
++#endif
++
++#include <sys/types.h>
++
++/* Flags for `semop'.  */
++#define SEM_UNDO	0x1000		/* undo the operation on exit */
++
++/* Commands for `semctl'.  */
++#define GETPID		4		/* get sempid */
++#define GETVAL		5		/* get semval */
++#define GETALL		6		/* get all semval's */
++#define GETNCNT		3		/* get semncnt */
++#define GETZCNT		7		/* get semzcnt */
++#define SETVAL		8		/* set semval */
++#define SETALL		9		/* set all semval's */
++
++#ifdef __USE_BSD
++# define SEM_R		IPC_R		/* read permission for user */
++# define SEM_A		IPC_W		/* alter permission for user */
++#endif
++
++
++/* Data structure describing a set of semaphores.  */
++struct semid_ds
++{
++  struct ipc_perm sem_perm;		/* operation permission struct */
++  void *__sem_base;
++  unsigned short int sem_nsems;		/* number of semaphores in set */
++  __time_t sem_otime;			/* last semop() time */
++  long __unused1;
++  __time_t sem_ctime;			/* last time changed by semctl() */
++  long __unused2;
++  long __unused3[4];
++};
++
++/* The user should define a union like the following to use it for arguments
++   for `semctl'.
++
++   union semun
++   {
++     int val;				<= value for SETVAL
++     struct semid_ds *buf;		<= buffer for IPC_STAT & IPC_SET
++     unsigned short int *array;		<= array for GETALL & SETALL
++     struct seminfo *__buf;		<= buffer for IPC_INFO
++   };
++
++   Previous versions of this file used to define this union but this is
++   incorrect.  One can test the macro _SEM_SEMUN_UNDEFINED to see whether
++   one must define the union or not.  */
++#define _SEM_SEMUN_UNDEFINED	1
++
++#ifdef __USE_MISC
++
++/* ipcs ctl cmds */
++# define SEM_STAT 10
++# define SEM_INFO 11
++
++/*
++ * semaphore info struct
++ */
++struct seminfo {
++        int     semmap,         /* # of entries in semaphore map */
++                semmni,         /* # of semaphore identifiers */
++                semmns,         /* # of semaphores in system */
++                semmnu,         /* # of undo structures in system */
++                semmsl,         /* max # of semaphores per id */
++                semopm,         /* max # of operations per semop call */
++                semume,         /* max # of undo entries per process */
++                semusz,         /* size in bytes of undo structure */
++                semvmx,         /* semaphore maximum value */
++                semaem;         /* adjust on exit max value */
++};
++
++#endif
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/shm.h
+@@ -0,0 +1,90 @@
++/* Copyright (C) 1995-1997, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_SHM_H
++# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
++#endif
++
++#include <bits/types.h>
++
++/* Permission flag for shmget.  */
++#ifdef __USE_BSD
++# define SHM_R		IPC_R		/* read permission for user */
++# define SHM_W		IPC_W		/* write permission for user */
++#endif
++
++/* Flags for `shmat'.  */
++#define SHM_RDONLY	010000		/* attach read-only else read-write */
++#define SHM_RND		020000		/* round attach address to SHMLBA */
++
++/* Commands for `shmctl'.  */
++#define SHM_LOCK	11		/* lock segment (root only) */
++#define SHM_UNLOCK	12		/* unlock segment (root only) */
++
++__BEGIN_DECLS
++
++/* Segment low boundary address multiple.  */
++#define SHMLBA		(__getpagesize ())
++extern int __getpagesize (void) __THROW __attribute__ ((__const__));
++
++
++/* Type to count number of attaches.  */
++typedef unsigned short int shmatt_t;
++
++/* Data structure describing a set of semaphores.  */
++struct shmid_ds
++  {
++    struct ipc_perm shm_perm;		/* operation permission struct */
++    int shm_segsz;			/* size of segment in bytes */
++    __pid_t shm_lpid;			/* pid of last shmop */
++    __pid_t shm_cpid;			/* pid of creator */
++    shmatt_t shm_nattch;		/* number of current attaches */
++    __time_t shm_atime;			/* time of last shmat() */
++    __time_t shm_dtime;			/* time of last shmdt() */
++    __time_t shm_ctime;			/* time of last change by shmctl() */
++    void *__shm_internal;
++  };
++
++#ifdef __USE_MISC
++
++/* ipcs ctl commands */
++# define SHM_STAT 	13
++# define SHM_INFO 	14
++
++struct shminfo
++  {
++        int     shmmax,         /* max shared memory segment size (bytes) */
++                shmmin,         /* min shared memory segment size (bytes) */
++                shmmni,         /* max number of shared memory identifiers */
++                shmseg,         /* max shared memory segments per process */
++                shmall;         /* max amount of shared memory (pages) */
++  };
++
++struct shm_info
++  {
++    int used_ids;
++    unsigned long int shm_tot;	/* total allocated shm */
++    unsigned long int shm_rss;	/* total resident shm */
++    unsigned long int shm_swp;	/* total swapped shm */
++    unsigned long int swap_attempts;
++    unsigned long int swap_successes;
++  };
++
++#endif /* __USE_MISC */
++
++__END_DECLS
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/sigaction.h
+@@ -0,0 +1,76 @@
++/* Copyright (C) 1991-1992,1996-1998,2001-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SIGNAL_H
++# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
++#endif
++
++/* These definitions match those used by the FreeBSD kernel.  */
++
++/* Structure describing the action to be taken when a signal arrives.  */
++struct sigaction
++  {
++    /* Signal handler.  */
++#ifdef __USE_POSIX199309
++    union
++      {
++	/* Used if SA_SIGINFO is not set.  */
++	__sighandler_t sa_handler;
++	/* Used if SA_SIGINFO is set.  */
++	void (*sa_sigaction) (int, siginfo_t *, void *);
++      }
++    __sigaction_handler;
++# define sa_handler	__sigaction_handler.sa_handler
++# define sa_sigaction	__sigaction_handler.sa_sigaction
++#else
++    __sighandler_t sa_handler;
++#endif
++
++    /* Special flags.  */
++    int sa_flags;
++
++    /* Additional set of signals to be blocked.  */
++    __sigset_t sa_mask;
++  };
++
++/* Bits in `sa_flags'.  */
++#if defined __USE_UNIX98 || defined __USE_MISC
++# define SA_ONSTACK	0x0001	/* Take signal on signal stack.  */
++# define SA_RESTART	0x0002	/* Restart syscall on signal return.  */
++# define SA_RESETHAND	0x0004	/* Reset to SIG_DFL on entry to handler.  */
++# define SA_NODEFER	0x0010	/* Don't automatically block the signal when
++				    its handler is being executed.  */
++# define SA_NOCLDWAIT	0x0020	/* Don't save zombie processes.  */
++# define SA_SIGINFO	0x0040	/* Provide additional info to the handler.  */
++#endif
++#define	SA_NOCLDSTOP	0x0008	/* Don't send SIGCHLD when children stop.  */
++
++#ifdef __USE_MISC
++# define SA_INTERRUPT	0	/* Historical no-op ("not SA_RESTART").  */
++
++/* Some aliases for the SA_ constants.  */
++# define SA_NOMASK    SA_NODEFER
++# define SA_ONESHOT   SA_RESETHAND
++# define SA_STACK     SA_ONSTACK
++#endif
++
++
++/* Values for the HOW argument to `sigprocmask'.  */
++#define	SIG_BLOCK	1	/* Block signals.  */
++#define	SIG_UNBLOCK	2	/* Unblock signals.  */
++#define	SIG_SETMASK	3	/* Set the set of blocked signals.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/siginfo.h
+@@ -0,0 +1,235 @@
++/* siginfo_t, sigevent and constants.  FreeBSD version.
++   Copyright (C) 1997-1998, 2000-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#if !defined _SIGNAL_H && !defined __need_siginfo_t \
++    && !defined __need_sigevent_t
++# error "Never include this file directly.  Use <signal.h> instead"
++#endif
++
++#if (!defined __have_sigval_t \
++     && (defined _SIGNAL_H || defined __need_siginfo_t \
++	 || defined __need_sigevent_t))
++# define __have_sigval_t 1
++
++/* Type for data associated with a signal.  */
++typedef union sigval
++  {
++    int sival_int;
++    void *sival_ptr;
++  } sigval_t;
++#endif
++
++#if (!defined __have_siginfo_t \
++     && (defined _SIGNAL_H || defined __need_siginfo_t))
++# define __have_siginfo_t	1
++
++typedef struct siginfo
++  {
++    int si_signo;		/* Signal number.  */
++    int si_errno;		/* If non-zero, an errno value associated with
++				   this signal, as defined in <errno.h>.  */
++    int si_code;		/* Signal code.  */
++    int si_pid;			/* Sending process ID.  */
++    unsigned int si_uid;	/* Real user ID of sending process.  */
++    int si_status;		/* Exit value or signal.  */
++    void *si_addr;		/* Address of faulting instruction.  */
++    union sigval si_value;	/* Signal value.  */
++    long int si_band;		/* Band event for SIGPOLL.  */
++    int __si_spare[7];
++  } siginfo_t;
++
++
++/* Values for `si_code'.  Positive values are reserved for kernel-generated
++   signals.  */
++enum
++{
++  SI_ASYNCIO = 0x10004,		/* Sent by AIO completion.  */
++# define SI_ASYNCIO	SI_ASYNCIO
++  SI_MESGQ = 0x10005,		/* Sent by real time mesq state change.  */
++# define SI_MESGQ	SI_MESGQ
++  SI_TIMER = 0x10003,		/* Sent by timer expiration.  */
++# define SI_TIMER	SI_TIMER
++  SI_QUEUE = 0x10002,		/* Sent by sigqueue.  */
++# define SI_QUEUE	SI_QUEUE
++  SI_USER = 0x10001,		/* Sent by kill, sigsend, raise.  */
++# define SI_USER	SI_USER
++  SI_KERNEL = 0x10006,
++# define SI_KERNEL	SI_KERNEL
++  SI_LWP = 0x10007,		/* Sent by thr_kill.  */
++# define SI_LWP		SI_LWP
++  SI_UNDEFINED = 0
++# define SI_UNDEFINED	SI_UNDEFINED
++};
++
++/* `si_code' values for SIGILL signal.  */
++enum
++{
++  ILL_ILLOPC = 1,		/* Illegal opcode.  */
++# define ILL_ILLOPC	ILL_ILLOPC
++  ILL_ILLOPN,			/* Illegal operand.  */
++# define ILL_ILLOPN	ILL_ILLOPN
++  ILL_ILLADR,			/* Illegal addressing mode.  */
++# define ILL_ILLADR	ILL_ILLADR
++  ILL_ILLTRP,			/* Illegal trap. */
++# define ILL_ILLTRP	ILL_ILLTRP
++  ILL_PRVOPC,			/* Privileged opcode.  */
++# define ILL_PRVOPC	ILL_PRVOPC
++  ILL_PRVREG,			/* Privileged register.  */
++# define ILL_PRVREG	ILL_PRVREG
++  ILL_COPROC,			/* Coprocessor error.  */
++# define ILL_COPROC	ILL_COPROC
++  ILL_BADSTK			/* Internal stack error.  */
++# define ILL_BADSTK	ILL_BADSTK
++};
++
++/* `si_code' values for SIGFPE signal.  */
++enum
++{
++  FPE_INTOVF = 1,		/* Integer overflow.  */
++# define FPE_INTOVF	FPE_INTOVF
++  FPE_INTDIV,			/* Integer divide by zero.  */
++# define FPE_INTDIV	FPE_INTDIV
++  FPE_FLTDIV,			/* Floating point divide by zero.  */
++# define FPE_FLTDIV	FPE_FLTDIV
++  FPE_FLTOVF,			/* Floating point overflow.  */
++# define FPE_FLTOVF	FPE_FLTOVF
++  FPE_FLTUND,			/* Floating point underflow.  */
++# define FPE_FLTUND	FPE_FLTUND
++  FPE_FLTRES,			/* Floating point inexact result.  */
++# define FPE_FLTRES	FPE_FLTRES
++  FPE_FLTINV,			/* Floating point invalid operation.  */
++# define FPE_FLTINV	FPE_FLTINV
++  FPE_FLTSUB			/* Subscript out of range.  */
++# define FPE_FLTSUB	FPE_FLTSUB
++};
++
++/* `si_code' values for SIGSEGV signal.  */
++enum
++{
++  SEGV_MAPERR = 1,		/* Address not mapped to object.  */
++# define SEGV_MAPERR	SEGV_MAPERR
++  SEGV_ACCERR			/* Invalid permissions for mapped object.  */
++# define SEGV_ACCERR	SEGV_ACCERR
++};
++
++/* `si_code' values for SIGBUS signal.  */
++enum
++{
++  BUS_ADRALN = 1,		/* Invalid address alignment.  */
++# define BUS_ADRALN	BUS_ADRALN
++  BUS_ADRERR,			/* Non-existant physical address.  */
++# define BUS_ADRERR	BUS_ADRERR
++  BUS_OBJERR			/* Object specific hardware error.  */
++# define BUS_OBJERR	BUS_OBJERR
++};
++
++/* `si_code' values for SIGTRAP signal.  */
++enum
++{
++  TRAP_BRKPT = 1,		/* Process breakpoint.  */
++# define TRAP_BRKPT	TRAP_BRKPT
++  TRAP_TRACE			/* Process trace trap.  */
++# define TRAP_TRACE	TRAP_TRACE
++};
++
++/* `si_code' values for SIGCHLD signal.  */
++/* XXX These are only used by the waitid() function, not by the kernel.  */
++enum
++{
++  CLD_EXITED = 1,		/* Child has exited.  */
++# define CLD_EXITED	CLD_EXITED
++  CLD_KILLED,			/* Child was killed.  */
++# define CLD_KILLED	CLD_KILLED
++  CLD_DUMPED,			/* Child terminated abnormally.  */
++# define CLD_DUMPED	CLD_DUMPED
++  CLD_TRAPPED,			/* Traced child has trapped.  */
++# define CLD_TRAPPED	CLD_TRAPPED
++  CLD_STOPPED,			/* Child has stopped.  */
++# define CLD_STOPPED	CLD_STOPPED
++  CLD_CONTINUED			/* Stopped child has continued.  */
++# define CLD_CONTINUED	CLD_CONTINUED
++};
++
++/* `si_code' values for SIGPOLL signal.  */
++enum
++{
++  POLL_IN = 1,			/* Data input available.  */
++# define POLL_IN	POLL_IN
++  POLL_OUT,			/* Output buffers available.  */
++# define POLL_OUT	POLL_OUT
++  POLL_MSG,			/* Input message available.   */
++# define POLL_MSG	POLL_MSG
++  POLL_ERR,			/* I/O error.  */
++# define POLL_ERR	POLL_ERR
++  POLL_PRI,			/* High priority input available.  */
++# define POLL_PRI	POLL_PRI
++  POLL_HUP			/* Device disconnected.  */
++# define POLL_HUP	POLL_HUP
++};
++
++# undef __need_siginfo_t
++#endif	/* !have siginfo_t && (have _SIGNAL_H || need siginfo_t).  */
++
++
++#if (defined _SIGNAL_H || defined __need_sigevent_t) \
++    && !defined __have_sigevent_t
++# define __have_sigevent_t	1
++
++#include <sys/_types.h>		/* __lwpid_t */
++
++/* Structure to transport application-defined values with signals.  */
++
++typedef struct sigevent
++  {
++    int sigev_notify;
++    int sigev_signo;
++    sigval_t sigev_value;
++    union
++    {
++      __lwpid_t threadid;
++      struct
++      {
++	void (*function) (sigval_t);	/* Function to start.  */
++	void *attributes;		/* Really pthread_attr_t.  */
++      } thread;
++    } un;
++  } sigevent_t;
++
++#define sigev_notify_kqueue	sigev_signo
++#define sigev_notify_function	un.thread.function
++#define sigev_notify_attributes	un.thread.attributes
++#define sigev_notify_thread_id	un.threadid
++
++/* `sigev_notify' values.  */
++enum
++{
++  SIGEV_SIGNAL = 1,		/* Notify via signal.  */
++# define SIGEV_SIGNAL	SIGEV_SIGNAL
++  SIGEV_NONE = 0,		/* Other notification: meaningless.  */
++# define SIGEV_NONE	SIGEV_NONE
++  /* Not yet supported by the kernel.  */
++  SIGEV_THREAD = 2,		/* Deliver via thread creation.  */
++# define SIGEV_THREAD	SIGEV_THREAD
++  SIGEV_KEVENT = 3,
++# define SIGEV_KEVENT	SIGEV_KEVENT
++  SIGEV_THREAD_ID = 4,
++# define SIGEV_THREAD_ID	SIGEV_THREAD_ID
++};
++
++#endif	/* have _SIGNAL_H.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/signum.h
+@@ -0,0 +1,84 @@
++/* Signal number definitions.  FreeBSD version.
++   Copyright (C) 1991-1993, 1996, 1998, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifdef	_SIGNAL_H
++
++/* This file defines the fake signal functions and signal
++   number constants for 4.2 or 4.3 BSD-derived Unix system.  */
++
++/* Fake signal functions.  */
++#define	SIG_ERR	((__sighandler_t) -1) /* Error return.  */
++#define	SIG_DFL	((__sighandler_t) 0) /* Default action.  */
++#define	SIG_IGN	((__sighandler_t) 1) /* Ignore signal.  */
++
++#define	SIG_CATCH ((__sighandler_t) 2) /* FreeBSD specific ? */
++#define	SIG_HOLD  ((__sighandler_t) 3) /* Add signal to hold mask.  */
++
++/* Signals.  */
++#define	SIGHUP		1	/* Hangup (POSIX).  */
++#define	SIGINT		2	/* Interrupt (ANSI).  */
++#define	SIGQUIT		3	/* Quit (POSIX).  */
++#define	SIGILL		4	/* Illegal instruction (ANSI).  */
++#define	SIGABRT		SIGIOT	/* Abort (ANSI).  */
++#define	SIGTRAP		5	/* Trace trap (POSIX).  */
++#define	SIGIOT		6	/* IOT trap (4.2 BSD).  */
++#define	SIGEMT		7	/* EMT trap (4.2 BSD).  */
++#define	SIGFPE		8	/* Floating-point exception (ANSI).  */
++#define	SIGKILL		9	/* Kill, unblockable (POSIX).  */
++#define	SIGBUS		10	/* Bus error (4.2 BSD).  */
++#define	SIGSEGV		11	/* Segmentation violation (ANSI).  */
++#define	SIGSYS		12	/* Bad argument to system call (4.2 BSD).  */
++#define	SIGPIPE		13	/* Broken pipe (POSIX).  */
++#define	SIGALRM		14	/* Alarm clock (POSIX).  */
++#define	SIGTERM		15	/* Termination (ANSI).  */
++#define	SIGURG		16	/* Urgent condition on socket (4.2 BSD).  */
++#define	SIGSTOP		17	/* Stop, unblockable (POSIX).  */
++#define	SIGTSTP		18	/* Keyboard stop (POSIX).  */
++#define	SIGCONT		19	/* Continue (POSIX).  */
++#define	SIGCHLD		20	/* Child status has changed (POSIX).  */
++#define	SIGCLD		SIGCHLD	/* Same as SIGCHLD (System V).  */
++#define	SIGTTIN		21	/* Background read from tty (POSIX).  */
++#define	SIGTTOU		22	/* Background write to tty (POSIX).  */
++#define	SIGIO		23	/* I/O now possible (4.2 BSD).  */
++#define	SIGPOLL		SIGIO	/* Pollable event occurred (System V).  */
++#define	SIGXCPU		24	/* CPU limit exceeded (4.2 BSD).  */
++#define	SIGXFSZ		25	/* File size limit exceeded (4.2 BSD).  */
++#define	SIGVTALRM	26	/* Virtual alarm clock (4.2 BSD).  */
++#define	SIGPROF		27	/* Profiling alarm clock (4.2 BSD).  */
++#define	SIGWINCH	28	/* Window size change (4.3 BSD, Sun).  */
++#define SIGINFO		29	/* Information request (4.4 BSD).  */
++#define	SIGUSR1		30	/* User-defined signal 1 (POSIX).  */
++#define	SIGUSR2		31	/* User-defined signal 2 (POSIX).  */
++/* Signals 32 and 33 are reserved for system libraries. */
++
++/* Signal 34 is used (but not reserved) by thread library.
++   See PTHREAD_SIGBASE in kernel-features.h.  */
++
++#define	_NSIG		129	/* Biggest signal number + 1
++				   (including real-time signals).  */
++
++#define SIGRTMIN	(__libc_current_sigrtmin ())
++#define SIGRTMAX	(__libc_current_sigrtmax ())
++
++/* These are the hard limits of the kernel.  These values should not be
++   used directly at user level.  */
++#define __SIGRTMIN	65	/* be in sync with FreeBSD kernel */
++#define __SIGRTMAX	126	/* be in sync with FreeBSD kernel */
++
++#endif	/* <signal.h> included.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/sigset.h
+@@ -0,0 +1,140 @@
++/* __sig_atomic_t, __sigset_t, and related definitions.  FreeBSD version.
++   Copyright (C) 1994-1996, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef	_SIGSET_H_types
++# define _SIGSET_H_types	1
++
++typedef int __sig_atomic_t;
++
++/* A `sigset_t' has a bit for each signal.  */
++__extension__ typedef struct
++  {
++    __extension__ union
++      {
++        unsigned int __sigbits[4];
++        unsigned int __bits[4];
++      };
++  } __sigset_t;
++
++#endif
++
++
++/* We only want to define these functions if <signal.h> was actually
++   included; otherwise we were included just to define the types.  Since we
++   are namespace-clean, it wouldn't hurt to define extra macros.  But
++   trouble can be caused by functions being defined (e.g., any global
++   register vars declared later will cause compilation errors).  */
++
++#if !defined _SIGSET_H_fns && defined _SIGNAL_H
++# define _SIGSET_H_fns 1
++
++# ifndef _EXTERN_INLINE
++#  define _EXTERN_INLINE __extern_inline
++# endif
++
++/* Return a mask that includes the bit for SIG only.  */
++# define __sigmask(sig)	((unsigned int) 1 << ((sig) - 1) % 32)
++
++/* Return the word index for SIG.  */
++# define __sigword(sig)	(((sig) - 1) >> 5)
++
++# if defined __GNUC__ && __GNUC__ >= 2
++#  define __sigemptyset(set) \
++  (__extension__ ({ sigset_t *__set = (set);				      \
++		    __set->__sigbits[0] = 0; __set->__sigbits[1] = 0;	      \
++		    __set->__sigbits[2] = 0; __set->__sigbits[3] = 0;	      \
++		    0; }))
++#  define __sigfillset(set) \
++  (__extension__ ({ sigset_t *__set = (set);				      \
++		    __set->__sigbits[0] = ~0; __set->__sigbits[1] = ~0;	      \
++		    __set->__sigbits[2] = ~0; __set->__sigbits[3] = ~0;	      \
++		    0; }))
++
++#  ifdef __USE_GNU
++/* The POSIX does not specify for handling the whole signal set in one
++   command.  This is often wanted and so we define three more functions
++   here.  */
++#   define __sigisemptyset(set) \
++  (__extension__ ({ const sigset_t *__set = (set);			      \
++		    __set->__sigbits[0] == 0				      \
++		    && __set->__sigbits[1] == 0				      \
++		    && __set->__sigbits[2] == 0				      \
++		    && __set->__sigbits[3] == 0; }))
++#   define __sigandset(dest, left, right) \
++  (__extension__ ({ sigset_t *__dest = (dest);				      \
++		    const sigset_t *__left = (left);			      \
++		    const sigset_t *__right = (right);			      \
++		    __dest->__sigbits[0] =				      \
++		      __left->__sigbits[0] & __right->__sigbits[0];	      \
++		    __dest->__sigbits[1] =				      \
++		      __left->__sigbits[1] & __right->__sigbits[1];	      \
++		    __dest->__sigbits[2] =				      \
++		      __left->__sigbits[2] & __right->__sigbits[2];	      \
++		    __dest->__sigbits[3] =				      \
++		      __left->__sigbits[3] & __right->__sigbits[3];	      \
++		    0; }))
++#   define __sigorset(dest, left, right) \
++  (__extension__ ({ sigset_t *__dest = (dest);				      \
++		    const sigset_t *__left = (left);			      \
++		    const sigset_t *__right = (right);			      \
++		    __dest->__sigbits[0] =				      \
++		      __left->__sigbits[0] | __right->__sigbits[0];	      \
++		    __dest->__sigbits[1] =				      \
++		      __left->__sigbits[1] | __right->__sigbits[1];	      \
++		    __dest->__sigbits[2] =				      \
++		      __left->__sigbits[2] | __right->__sigbits[2];	      \
++		    __dest->__sigbits[3] =				      \
++		      __left->__sigbits[3] | __right->__sigbits[3];	      \
++		    0; }))
++#  endif
++# endif
++
++/* These functions needn't check for a bogus signal number -- error
++   checking is done in the non __ versions.  */
++
++extern int __sigismember (__const __sigset_t *, int);
++extern int __sigaddset (__sigset_t *, int);
++extern int __sigdelset (__sigset_t *, int);
++
++# ifdef __USE_EXTERN_INLINES
++
++_EXTERN_INLINE int
++__sigismember (__const __sigset_t *__set, int __sig)
++{
++  return (__set->__sigbits[__sigword (__sig)] & __sigmask (__sig) ? 1 : 0);
++}
++
++_EXTERN_INLINE int
++__sigaddset (__sigset_t *__set, int __sig)
++{
++  __set->__sigbits[__sigword (__sig)] |= __sigmask (__sig);
++  return 0;
++}
++
++_EXTERN_INLINE int
++__sigdelset (__sigset_t *__set, int __sig)
++{
++  __set->__sigbits[__sigword (__sig)] &= ~__sigmask (__sig);
++  return 0;
++}
++
++# endif
++
++
++#endif /* ! _SIGSET_H_fns.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/socket.h
+@@ -0,0 +1,397 @@
++/* System-specific socket constants and types.  FreeBSD version.
++   Copyright (C) 1991-1992,1994-1999,2000-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Library General Public License as
++   published by the Free Software Foundation; either version 2 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Library General Public License for more details.
++
++   You should have received a copy of the GNU Library General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#ifndef __BITS_SOCKET_H
++#define __BITS_SOCKET_H	1
++
++#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
++# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
++#endif
++
++#define	__need_size_t
++#define __need_NULL
++#include <stddef.h>
++
++#include <limits.h>		/* XXX Is this allowed?  */
++#include <bits/types.h>
++
++/* Type for length arguments in socket calls.  */
++#ifndef __socklen_t_defined
++typedef __socklen_t socklen_t;
++# define __socklen_t_defined
++#endif
++
++
++/* Types of sockets.  */
++enum __socket_type
++{
++  SOCK_STREAM = 1,		/* Sequenced, reliable, connection-based
++				   byte streams.  */
++#define SOCK_STREAM SOCK_STREAM
++  SOCK_DGRAM = 2,		/* Connectionless, unreliable datagrams
++				   of fixed maximum length.  */
++#define SOCK_DGRAM SOCK_DGRAM
++  SOCK_RAW = 3,			/* Raw protocol interface.  */
++#define SOCK_RAW SOCK_RAW
++  SOCK_RDM = 4,			/* Reliably-delivered messages.  */
++#define SOCK_RDM SOCK_RDM
++  SOCK_SEQPACKET = 5		/* Sequenced, reliable, connection-based,
++				   datagrams of fixed maximum length.  */
++#define SOCK_SEQPACKET SOCK_SEQPACKET
++};
++
++/*
++ * Structure used by kernel to pass protocol
++ * information in raw sockets.
++ */
++struct sockproto {
++	unsigned short	sp_family;		/* address family */
++	unsigned short	sp_protocol;		/* protocol */
++};
++
++/* Protocol families.  */
++#define	PF_UNSPEC	0	/* Unspecified.  */
++#define	PF_LOCAL	1	/* Local to host (pipes and file-domain).  */
++#define	PF_UNIX		PF_LOCAL /* Old BSD name for PF_LOCAL.  */
++#define	PF_FILE		PF_LOCAL /* POSIX name for PF_LOCAL.  */
++#define	PF_INET		2	/* IP protocol family.  */
++#define	PF_IMPLINK	3	/* ARPAnet IMP protocol.  */
++#define	PF_PUP		4	/* PUP protocols.  */
++#define	PF_CHAOS	5	/* MIT Chaos protocols.  */
++#define	PF_NETBIOS	6	/* SMB protocols.  */
++#define	PF_ISO		7	/* ISO protocols.  */
++#define	PF_OSI		PF_ISO
++#define	PF_ECMA		8	/* ECMA protocols.  */
++#define	PF_DATAKIT	9	/* AT&T Datakit protocols.  */
++#define	PF_CCITT	10	/* CCITT protocols (X.25 et al).  */
++#define	PF_SNA		11	/* IBM SNA protocol.  */
++#define	PF_DECnet	12	/* DECnet protocols.  */
++#define	PF_DLI		13	/* Direct data link interface.  */
++#define	PF_LAT		14	/* DEC Local Area Transport protocol.  */
++#define	PF_HYLINK	15	/* NSC Hyperchannel protocol.  */
++#define	PF_APPLETALK	16	/* Don't use this.  */
++#define	PF_ROUTE	17	/* Internal Routing Protocol.  */
++#define	PF_LINK		18	/* Link layer interface.  */
++#define	PF_XTP		19	/* eXpress Transfer Protocol (no AF).  */
++#define	PF_COIP		20	/* Connection-oriented IP, aka ST II.  */
++#define	PF_CNT		21	/* Computer Network Technology.  */
++#define PF_RTIP		22	/* Help Identify RTIP packets.  **/
++#define	PF_IPX		23	/* Novell Internet Protocol.  */
++#define	PF_SIP		24	/* Simple Internet Protocol.  */
++#define PF_PIP		25	/* Help Identify PIP packets.  */
++#define PF_ISDN		26	/* Integrated Services Digital Network.  */
++#define PF_KEY		27	/* Internal key-management function.  */
++#define PF_INET6	28	/* IP version 6.  */
++#define PF_NATM		29	/* Native ATM access.  */
++#define PF_ATM		30	/* ATM.  */
++#define PF_HDRCMPLT	31	/* Used by BPF to not rewrite headers in
++				   interface output routine.  */
++#define PF_NETGRAPH	32	/* Netgraph sockets.  */
++#define	PF_MAX		33
++
++/* Address families.  */
++#define	AF_UNSPEC	PF_UNSPEC
++#define	AF_LOCAL	PF_LOCAL
++#define	AF_UNIX		PF_UNIX
++#define	AF_FILE		PF_FILE
++#define	AF_INET		PF_INET
++#define	AF_IMPLINK	PF_IMPLINK
++#define	AF_PUP		PF_PUP
++#define	AF_CHAOS	PF_CHAOS
++#define	AF_NETBIOS	PF_NETBIOS
++#define	AF_ISO		PF_ISO
++#define	AF_OSI		PF_OSI
++#define	AF_ECMA		PF_ECMA
++#define	AF_DATAKIT	PF_DATAKIT
++#define	AF_CCITT	PF_CCITT
++#define	AF_SNA		PF_SNA
++#define	AF_DECnet	PF_DECnet
++#define	AF_DLI		PF_DLI
++#define	AF_LAT		PF_LAT
++#define	AF_HYLINK	PF_HYLINK
++#define	AF_APPLETALK	PF_APPLETALK
++#define	AF_ROUTE	PF_ROUTE
++#define	AF_LINK		PF_LINK
++#define	pseudo_AF_XTP	PF_XTP
++#define	AF_COIP		PF_COIP
++#define	AF_CNT		PF_CNT
++#define pseudo_AF_RTIP	PF_RTIP
++#define	AF_IPX		PF_IPX
++#define	AF_SIP		PF_SIP
++#define pseudo_AF_PIP	PF_PIP
++#define AF_ISDN		PF_ISDN
++#define AF_E164		AF_ISDN		/* CCITT E.164 recommendation.  */
++#define pseudo_AF_KEY	PF_KEY
++#define AF_INET6	PF_INET6
++#define AF_NATM		PF_NATM
++#define AF_ATM		PF_ATM
++#define pseudo_AF_HDRCMPLT PF_HDRCMPLT
++#define AF_NETGRAPH	PF_NETGRAPH
++#define	AF_MAX		PF_MAX
++
++/* Maximum queue length specifiable by listen.  */
++#define SOMAXCONN	128	/* 5 on the original 4.4 BSD.  */
++
++/* Get the definition of the macro to define the common sockaddr members.  */
++#include <bits/sockaddr.h>
++
++/* Structure describing a generic socket address.  */
++struct sockaddr
++  {
++    __SOCKADDR_COMMON (sa_);	/* Common data: address family and length.  */
++    char sa_data[14];		/* Address data.  */
++  };
++
++
++/* Structure large enough to hold any socket address (with the historical
++   exception of AF_UNIX).  We reserve 128 bytes.  */
++#if ULONG_MAX > 0xffffffff
++# define __ss_aligntype	__uint64_t
++#else
++# define __ss_aligntype	__uint32_t
++#endif
++#define _SS_SIZE	128
++#define _SS_PADSIZE	(_SS_SIZE - (2 * sizeof (__ss_aligntype)))
++
++struct sockaddr_storage
++  {
++    __SOCKADDR_COMMON (ss_);	/* Address family, etc.  */
++    __ss_aligntype __ss_align;	/* Force desired alignment.  */
++    char __ss_padding[_SS_PADSIZE];
++  };
++
++
++/* Bits in the FLAGS argument to `send', `recv', et al.  */
++enum
++  {
++    MSG_OOB		= 0x01,	/* Process out-of-band data.  */
++#define MSG_OOB MSG_OOB
++    MSG_PEEK		= 0x02,	/* Peek at incoming messages.  */
++#define MSG_PEEK MSG_PEEK
++    MSG_DONTROUTE	= 0x04,	/* Don't use local routing.  */
++#define MSG_DONTROUTE MSG_DONTROUTE
++    MSG_EOR		= 0x08,	/* Data completes record.  */
++#define MSG_EOR MSG_EOR
++    MSG_TRUNC		= 0x10,	/* Data discarded before delivery.  */
++#define MSG_TRUNC MSG_TRUNC
++    MSG_CTRUNC		= 0x20,	/* Control data lost before delivery.  */
++#define MSG_CTRUNC MSG_CTRUNC
++    MSG_WAITALL		= 0x40,	/* Wait for full request or error.  */
++#define MSG_WAITALL MSG_WAITALL
++    MSG_DONTWAIT	= 0x80,	/* This message should be nonblocking.  */
++#define MSG_DONTWAIT MSG_DONTWAIT
++    MSG_EOF		= 0x100, /* Data completes connection.  */
++#define MSG_EOF MSG_EOF
++    MSG_NOTIFICATION	= 0x2000,/* SCTP notification */
++#define MSG_NOTIFICATION MSG_NOTIFICATION
++    MSG_NBIO		= 0x4000,/*FIONBIO mode, used by fifofs */
++#define MSG_NBIO MSG_NBIO
++    MSG_COMPAT		= 0x8000,/* Used in sendit().  */
++#define MSG_COMPAT MSG_COMPAT
++    MSG_NOSIGNAL	= 0x20000 /* do not generate SIGPIPE on EOF */
++#define MSG_NOSIGNAL MSG_NOSIGNAL
++  };
++
++
++/* Structure describing messages sent by
++   `sendmsg' and received by `recvmsg'.  */
++struct msghdr
++  {
++    void *msg_name;		/* Address to send to/receive from.  */
++    socklen_t msg_namelen;	/* Length of address data.  */
++
++    struct iovec *msg_iov;	/* Vector of data to send/receive into.  */
++    int msg_iovlen;		/* Number of elements in the vector.  */
++
++    void *msg_control;		/* Ancillary data (eg BSD filedesc passing). */
++    socklen_t msg_controllen;	/* Ancillary data buffer length.  */
++
++    int msg_flags;		/* Flags in received message.  */
++  };
++
++/* Structure used for storage of ancillary data object information.  */
++struct cmsghdr
++  {
++    socklen_t cmsg_len;		/* Length of data in cmsg_data plus length
++				   of cmsghdr structure.  */
++    int cmsg_level;		/* Originating protocol.  */
++    int cmsg_type;		/* Protocol specific type.  */
++#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
++    __extension__ unsigned char __cmsg_data  __flexarr __attribute__ ((aligned (__alignof__(size_t)))); /* Ancillary data.  */
++#endif
++  };
++
++#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
++
++#define CMSG_FIRSTHDR(mhdr) \
++  ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr)		      \
++   ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
++
++#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
++			   & (size_t) ~(sizeof (size_t) - 1))
++#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
++			 + CMSG_ALIGN (sizeof (struct cmsghdr)))
++#define CMSG_LEN(len)   (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
++
++/* Ancillary data object manipulation macros.  */
++#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
++# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
++#else
++# define CMSG_DATA(cmsg) ((unsigned char *) (cmsg) + CMSG_ALIGN(sizeof (struct cmsghdr)))
++#endif
++
++extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
++				      struct cmsghdr *__cmsg) __THROW;
++#ifdef __USE_EXTERN_INLINES
++# ifndef _EXTERN_INLINE
++#  define _EXTERN_INLINE __extern_inline
++# endif
++_EXTERN_INLINE struct cmsghdr *
++__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
++{
++  if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
++    /* The kernel header does this so there may be a reason.  */
++    return 0;
++
++  __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
++			       + CMSG_ALIGN (__cmsg->cmsg_len));
++  if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
++					+ __mhdr->msg_controllen)
++      || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
++	  > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
++    /* No more entries.  */
++    return 0;
++  return __cmsg;
++}
++#endif	/* Use `extern inline'.  */
++
++/* Socket level message types.  */
++enum
++  {
++    SCM_RIGHTS = 0x01,		/* Access rights (array of int).  */
++#define SCM_RIGHTS SCM_RIGHTS
++    SCM_TIMESTAMP = 0x02,	/* Timestamp (struct timeval).  */
++#define SCM_TIMESTAMP SCM_TIMESTAMP
++    SCM_CREDS = 0x03		/* Process creds (struct cmsgcred).  */
++#define SCM_CREDS SCM_CREDS
++  };
++
++/* Unfortunately, BSD practice dictates this structure be of fixed size.
++   If there are more than CMGROUP_MAX groups, the list is truncated.
++   (On GNU systems, the `cmcred_euid' field is just the first in the
++   list of effective UIDs.)  */
++#define CMGROUP_MAX	16
++
++/* Structure delivered by SCM_CREDS.  This describes the identity of the
++   sender of the data simultaneously received on the socket.  By BSD
++   convention, this is included only when a sender on a AF_LOCAL socket
++   sends cmsg data of this type and size; the sender's structure is
++   ignored, and the system fills in the various IDs of the sender process.  */
++struct cmsgcred
++  {
++    __pid_t cmcred_pid;
++    __uid_t cmcred_uid;
++    __uid_t cmcred_euid;
++    __gid_t cmcred_gid;
++    short cmcred_ngroups;
++    __gid_t cmcred_groups[CMGROUP_MAX];
++  };
++
++/* Protocol number used to manipulate socket-level options
++   with `getsockopt' and `setsockopt'.  */
++#define	SOL_SOCKET	0xffff
++
++/* Socket-level options for `getsockopt' and `setsockopt'.  */
++enum
++  {
++    SO_DEBUG = 0x0001,		/* Record debugging information.  */
++#define SO_DEBUG SO_DEBUG
++    SO_ACCEPTCONN = 0x0002,	/* Accept connections on socket.  */
++#define SO_ACCEPTCONN SO_ACCEPTCONN
++    SO_REUSEADDR = 0x0004,	/* Allow reuse of local addresses.  */
++#define SO_REUSEADDR SO_REUSEADDR
++    SO_KEEPALIVE = 0x0008,	/* Keep connections alive and send
++				   SIGPIPE when they die.  */
++#define SO_KEEPALIVE SO_KEEPALIVE
++    SO_DONTROUTE = 0x0010,	/* Don't do local routing.  */
++#define SO_DONTROUTE SO_DONTROUTE
++    SO_BROADCAST = 0x0020,	/* Allow transmission of
++				   broadcast messages.  */
++#define SO_BROADCAST SO_BROADCAST
++    SO_USELOOPBACK = 0x0040,	/* Use the software loopback to avoid
++				   hardware use when possible.  */
++#define SO_USELOOPBACK SO_USELOOPBACK
++    SO_LINGER = 0x0080,		/* Block on close of a reliable
++				   socket to transmit pending data.  */
++#define SO_LINGER SO_LINGER
++    SO_OOBINLINE = 0x0100,	/* Receive out-of-band data in-band.  */
++#define SO_OOBINLINE SO_OOBINLINE
++    SO_REUSEPORT = 0x0200,	/* Allow local address and port reuse.  */
++#define SO_REUSEPORT SO_REUSEPORT
++    SO_TIMESTAMP = 0x0400,	/* Timestamp received dgram traffic.  */
++#define SO_TIMESTAMP SO_TIMESTAMP
++    SO_SNDBUF = 0x1001,		/* Send buffer size.  */
++#define SO_SNDBUF SO_SNDBUF
++    SO_RCVBUF = 0x1002,		/* Receive buffer.  */
++#define SO_RCVBUF SO_RCVBUF
++    SO_SNDLOWAT = 0x1003,	/* Send low-water mark.  */
++#define SO_SNDLOWAT SO_SNDLOWAT
++    SO_RCVLOWAT = 0x1004,	/* Receive low-water mark.  */
++#define SO_RCVLOWAT SO_RCVLOWAT
++    SO_SNDTIMEO = 0x1005,	/* Send timeout.  */
++#define SO_SNDTIMEO SO_SNDTIMEO
++    SO_RCVTIMEO = 0x1006,	/* Receive timeout.  */
++#define SO_RCVTIMEO SO_RCVTIMEO
++    SO_ERROR = 0x1007,		/* Get and clear error status.  */
++#define SO_ERROR SO_ERROR
++    SO_STYLE = 0x1008,		/* Get socket connection style.  */
++#define SO_STYLE SO_STYLE
++    SO_TYPE = SO_STYLE		/* Compatible name for SO_STYLE.  */
++#define SO_TYPE SO_TYPE
++  };
++
++/* Socket options. */
++#define LOCAL_PEERCRED          0x001   /* retrieve peer credentials */
++#define LOCAL_CREDS             0x002   /* pass credentials to receiver */
++#define LOCAL_CONNWAIT          0x004   /* connects block until accepted */
++
++/* Structure used to manipulate the SO_LINGER option.  */
++struct linger
++  {
++    int l_onoff;		/* Nonzero to linger on close.  */
++    int l_linger;		/* Time to linger.  */
++  };
++
++
++#ifdef __USE_BSD
++
++struct sf_hdtr;
++
++__BEGIN_DECLS
++
++extern int bsd_sendfile (int __in_fd, int __out_sock,
++			 __off_t __in_offset, size_t __nbytes,
++			 struct sf_hdtr *__hdtr, __off_t *__sockbytes,
++			 int __flags) __THROW;
++
++__END_DECLS
++
++#endif /* Use BSD */
++
++#endif	/* bits/socket.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/stat.h
+@@ -0,0 +1,219 @@
++/* Copyright (C) 1992, 1996-1997, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#if !defined _SYS_STAT_H && !defined _FCNTL_H
++# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
++#endif
++
++#ifndef _BITS_STAT_H
++#define _BITS_STAT_H   1
++
++/* This structure needs to be defined in accordance with the
++   implementation of __stat, __fstat, and __lstat.  */
++
++#include <bits/types.h>
++
++/* Versions of the 'struct stat' data structure.  */
++#define _STAT_VER_ostat	0	/* 'struct ostat' in /usr/src/sys/sys/stat.h */
++#define _STAT_VER_stat	1	/* 'struct stat' in /usr/src/sys/sys/stat.h */
++#define _STAT_VER_nstat	2	/* 'struct nstat' in /usr/src/sys/sys/stat.h */
++#define _STAT_VER_gstat 3	/* glibc's 'struct stat' without LFS */
++/* By default we use _STAT_VER_gstat, but we support also _STAT_VER_stat */
++#define _STAT_VER	_STAT_VER_gstat
++
++/* Structure describing file characteristics.  */
++struct stat
++  {
++    __dev_t st_dev;		/* Device containing the file.  */
++#ifndef __USE_FILE_OFFSET64
++    __ino_t st_ino;		/* File serial number.  */
++#else
++    __ino64_t st_ino;		/* File serial number.	*/
++#endif
++
++    __mode_t st_mode;		/* File mode.  */
++    __mode_t __pad_mode;	/* __mode_t is 16 bit, fill to 32 bit to retain previous ABI */
++    __nlink_t st_nlink;		/* Link count.  */
++    __nlink_t __pad_nlink;	/* __nlink_t is 16 bit, fill to 32 bit to retain previous ABI */
++
++    __uid_t st_uid;		/* User ID of the file's owner.  */
++    __gid_t st_gid;		/* Group ID of the file's group.  */
++
++    __dev_t st_rdev;		/* Device number, if device.  */
++
++#if defined __USE_MISC || defined __USE_XOPEN2K8
++    /* Nanosecond resolution timestamps are stored in a format
++       equivalent to 'struct timespec'.  This is the type used
++       whenever possible but the Unix namespace rules do not allow the
++       identifier 'timespec' to appear in the <sys/stat.h> header.
++       Therefore we have to handle the use of this header in strictly
++       standard-compliant sources special.  */
++    struct timespec st_atim;		/* Time of last access.  */
++    struct timespec st_mtim;		/* Time of last modification.  */
++    struct timespec st_ctim;		/* Time of last status change.  */
++# define st_atime st_atim.tv_sec	/* Backward compatibility.  */
++# define st_mtime st_mtim.tv_sec
++# define st_ctime st_ctim.tv_sec
++#else
++    __time_t st_atime;		/* Time of last access.  */
++    long int st_atimensec;	/* Nanoseconds of last access.  */
++    __time_t st_mtime;		/* Time of last modification.  */
++    long int st_mtimensec;	/* Nanoseconds of last modification.  */
++    __time_t st_ctime;		/* Time of last status change.  */
++    long int st_ctimensec;	/* Nanoseconds of last status change.  */
++#endif
++
++    __off_t st_size;		/* Size of file, in bytes.  */
++
++    __blkcnt_t st_blocks;	/* Number of 512-byte blocks allocated.  */
++
++    __blksize_t st_blksize;	/* Optimal block size for I/O.  */
++#define _STATBUF_ST_BLKSIZE	/* Tell code we have this member.  */
++
++    __uint32_t st_flags;	/* User defined flags.  */
++
++    __uint32_t st_gen;		/* Generation number.  */
++
++    __quad_t __unused1[2];
++  };
++
++#ifdef __USE_LARGEFILE64
++struct stat64
++  {
++    __dev_t st_dev;		/* Device containing the file.  */
++    __ino64_t st_ino;		/* File serial number.	*/
++
++    __mode_t st_mode;		/* File mode.  */
++    __mode_t __pad_mode;	/* __mode_t is 16 bit, fill to 32 bit to retain previous ABI */
++    __nlink_t st_nlink;		/* Link count.  */
++    __nlink_t __pad_nlink;	/* __nlink_t is 16 bit, fill to 32 bit to retain previous ABI */
++
++    __uid_t st_uid;		/* User ID of the file's owner.  */
++    __gid_t st_gid;		/* Group ID of the file's group.  */
++
++    __dev_t st_rdev;		/* Device number, if device.  */
++
++#if defined __USE_MISC || defined __USE_XOPEN2K8
++    /* Nanosecond resolution timestamps are stored in a format
++       equivalent to 'struct timespec'.  This is the type used
++       whenever possible but the Unix namespace rules do not allow the
++       identifier 'timespec' to appear in the <sys/stat.h> header.
++       Therefore we have to handle the use of this header in strictly
++       standard-compliant sources special.  */
++    struct timespec st_atim;		/* Time of last access.  */
++    struct timespec st_mtim;		/* Time of last modification.  */
++    struct timespec st_ctim;		/* Time of last status change.  */
++# define st_atime st_atim.tv_sec	/* Backward compatibility.  */
++# define st_mtime st_mtim.tv_sec
++# define st_ctime st_ctim.tv_sec
++#else
++    __time_t st_atime;		/* Time of last access.  */
++    long int st_atimensec;	/* Nanoseconds of last access.  */
++    __time_t st_mtime;		/* Time of last modification.  */
++    long int st_mtimensec;	/* Nanoseconds of last modification.  */
++    __time_t st_ctime;		/* Time of last status change.  */
++    long int st_ctimensec;	/* Nanoseconds of last status change.  */
++#endif
++
++    __off_t st_size;		/* Size of file, in bytes.  */
++
++    __blkcnt_t st_blocks;	/* Number of 512-byte blocks allocated.  */
++
++    __blksize_t st_blksize;	/* Optimal block size for I/O.  */
++
++    __uint32_t st_flags;	/* User defined flags.  */
++
++    __uint32_t st_gen;		/* Generation number.  */
++
++    __quad_t __unused1[2];
++  };
++#endif
++
++/* Encoding of the file mode.  These are the standard Unix values,
++   but POSIX.1 does not specify what values should be used.  */
++
++#define __S_IFMT	0170000	/* These bits determine file type.  */
++
++/* File types.  */
++#define __S_IFDIR	0040000	/* Directory.  */
++#define __S_IFCHR	0020000	/* Character device.  */
++#define __S_IFBLK	0060000	/* Block device.  */
++#define __S_IFREG	0100000	/* Regular file.  */
++#define __S_IFLNK	0120000	/* Symbolic link.  */
++#define __S_IFSOCK	0140000	/* Socket.  */
++#define __S_IFWHT	0160000	/* Whiteout.  */
++#define __S_IFIFO	0010000	/* FIFO.  */
++
++/* POSIX.1b objects.  */
++#define __S_TYPEISMQ(buf) 0
++#define __S_TYPEISSEM(buf) 0
++#define __S_TYPEISSHM(buf) 0
++
++/* Protection bits.  */
++
++#define __S_ISUID	04000	/* Set user ID on execution.  */
++#define __S_ISGID	02000	/* Set group ID on execution.  */
++#define __S_ISVTX	01000	/* Save swapped text after use (sticky).  */
++#define __S_IREAD	0400	/* Read by owner.  */
++#define __S_IWRITE	0200	/* Write by owner.  */
++#define __S_IEXEC	0100	/* Execute by owner.  */
++
++#ifdef __USE_BSD
++
++/* Definitions of flags stored in file flags word.  */
++
++/* Super-user and owner changeable flags.  */
++# define UF_SETTABLE	0x0000ffff	/* mask of owner changeable flags */
++# define UF_NODUMP	0x00000001	/* do not dump file */
++# define UF_IMMUTABLE	0x00000002	/* file may not be changed */
++# define UF_APPEND	0x00000004	/* writes to file may only append */
++# define UF_OPAQUE	0x00000008	/* directory is opaque wrt. union */
++# define UF_NOUNLINK	0x00000010	/* file may not be removed or renamed */
++
++/* Super-user changeable flags.  */
++# define SF_SETTABLE	0xffff0000	/* mask of superuser changeable flags */
++# define SF_ARCHIVED	0x00010000	/* file is archived */
++# define SF_IMMUTABLE	0x00020000	/* file may not be changed */
++# define SF_APPEND	0x00040000	/* writes to file may only append */
++# define SF_NOUNLINK	0x00100000	/* file may not be removed or renamed */
++# define SF_SNAPSHOT	0x00200000	/* snapshot inode */
++
++__BEGIN_DECLS
++
++/* Set file flags for FILE to FLAGS.  */
++extern int chflags (__const char *__file, unsigned long int __flags) __THROW;
++
++/* Set file flags of the file referred to by FD to FLAGS.  */
++extern int fchflags (int __fd, unsigned long int __flags) __THROW;
++
++/* Set file flags for FILE to FLAGS without following symlinks.  */
++extern int lchflags(__const char *__file, int __flags);
++
++/* Get device name in /dev with a device number of dev and a file type
++   matching the one encoded in type.  */
++extern char *devname(__dev_t dev, __mode_t type) __THROW;
++
++/* Store at most BUFLEN characters of the device name in /dev with a 
++   device number of dev and a file type matching the one encoded in type.  */
++extern char *devname_r(__dev_t dev, __mode_t type, char *buf, int buflen) __THROW;
++
++__END_DECLS
++
++#endif /* __USE_BSD */
++
++#endif /* bits/stat.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/stat16.h
+@@ -0,0 +1,56 @@
++/* Copyright (C) 2002, 2006, 2010 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/* This structure corresponds to the standard FreeBSD 'struct stat'
++   (i.e. _STAT_VER_stat), and is used by the stat() system call family. */
++
++struct stat16
++  {
++    __dev_t st_dev;		/* Device containing the file.  */
++    __ino_t st_ino;		/* File serial number.  */
++
++    __uint16_t st_mode;		/* File mode.  */
++    __uint16_t st_nlink;	/* Link count.  */
++
++    __uid_t st_uid;		/* User ID of the file's owner.  */
++    __gid_t st_gid;		/* Group ID of the file's group.  */
++
++    __dev_t st_rdev;		/* Device number, if device.  */
++
++    struct  timespec st_atimespec;  /* time of last access */
++    struct  timespec st_mtimespec;  /* time of last data modification */
++    struct  timespec st_ctimespec;  /* time of last file status change */
++
++    __off_t st_size;		/* Size of file, in bytes.  */
++
++    __blkcnt_t st_blocks;	/* Number of 512-byte blocks allocated.  */
++
++    __blksize_t st_blksize;	/* Optimal block size for I/O.  */
++
++    __uint32_t st_flags;	/* User defined flags.  */
++
++    __uint32_t st_gen;		/* Generation number.  */
++
++    __uint32_t __unused1;
++
++    __time_t st_birthtime;	/* Time of file creation.  */
++    long int st_birthtimensec;	/* Nanoseconds of file creation.  */
++
++#define _BIRTH_PADSIZE     (16 - sizeof(__time_t) - sizeof (long int))
++    char __birth_padding[_BIRTH_PADSIZE];
++  };
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/statfs.h
+@@ -0,0 +1,91 @@
++/* Definition of `struct statfs', information about a filesystem.
++   Copyright (C) 1996-1997, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _BITS_STATFS_H
++#define _BITS_STATFS_H	1
++
++#if !defined _SYS_STATFS_H && !defined _SYS_MOUNT_H
++# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
++#endif
++
++#include <bits/types.h>
++
++struct statfs
++  {
++    unsigned long f_version;
++    unsigned long f_bsize;
++    unsigned long f_iosize;
++#ifndef __USE_FILE_OFFSET64
++    __fsblkcnt_t f_blocks;
++    __fsblkcnt_t f_bfree;
++    __fsblkcnt_t f_bavail;
++    __fsfilcnt_t f_files;
++    __fsfilcnt_t f_ffree;
++#else
++    __fsblkcnt64_t f_blocks;
++    __fsblkcnt64_t f_bfree;
++    __fsblkcnt64_t f_bavail;
++    __fsfilcnt64_t f_files;
++    __fsfilcnt64_t f_ffree;
++#endif
++    __fsid_t f_fsid;
++    __uid_t f_owner;
++    int f_type;
++    int f_flags;
++    unsigned long int f_syncwrites;
++    unsigned long int f_asyncwrites;
++    char f_fstypename[16];
++    char f_mntonname[80];
++    unsigned long int f_syncreads;
++    unsigned long int f_asyncreads;
++    unsigned short f_namemax;
++    char f_mntfromname[80];
++    short __unused3;
++    long __unused4[2];
++  };
++
++#ifdef __USE_LARGEFILE64
++struct statfs64
++  {
++    unsigned long f_version;
++    unsigned long f_bsize;
++    unsigned long f_iosize;
++    __fsblkcnt64_t f_blocks;
++    __fsblkcnt64_t f_bfree;
++    __fsblkcnt64_t f_bavail;
++    __fsfilcnt64_t f_files;
++    __fsfilcnt64_t f_ffree;
++    __fsid_t f_fsid;
++    __uid_t f_owner;
++    int f_type;
++    int f_flags;
++    unsigned long int f_syncwrites;
++    unsigned long int f_asyncwrites;
++    char f_fstypename[16];
++    char f_mntonname[80];
++    unsigned long int f_syncreads;
++    unsigned long int f_asyncreads;
++    unsigned short f_namemax;
++    char f_mntfromname[80];
++    short __unused3;
++    long __unused4[2];
++  };
++#endif
++
++#endif /* _BITS_STATFS_H */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/statvfs.h
+@@ -0,0 +1,97 @@
++/* Definition of `struct statvfs', information about a filesystem.
++   Copyright (C) 1998, 2000-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_STATVFS_H
++# error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead."
++#endif
++
++#include <bits/types.h>
++
++#if __WORDSIZE == 32
++#define _STATVFSBUF_F_UNUSED
++#endif
++
++struct statvfs
++  {
++    unsigned long int f_bsize;
++    unsigned long int f_frsize;
++#ifndef __USE_FILE_OFFSET64
++    __fsblkcnt_t f_blocks;
++    __fsblkcnt_t f_bfree;
++    __fsblkcnt_t f_bavail;
++    __fsfilcnt_t f_files;
++    __fsfilcnt_t f_ffree;
++    __fsfilcnt_t f_favail;
++#else
++    __fsblkcnt64_t f_blocks;
++    __fsblkcnt64_t f_bfree;
++    __fsblkcnt64_t f_bavail;
++    __fsfilcnt64_t f_files;
++    __fsfilcnt64_t f_ffree;
++    __fsfilcnt64_t f_favail;
++#endif
++    unsigned long int f_fsid;
++#ifdef _STATVFSBUF_F_UNUSED
++    int __f_unused;
++#endif
++    unsigned long int f_flag;
++    unsigned long int f_namemax;
++    unsigned int f_spare[6];
++  };
++
++#ifdef __USE_LARGEFILE64
++struct statvfs64
++  {
++    unsigned long int f_bsize;
++    unsigned long int f_frsize;
++    __fsblkcnt64_t f_blocks;
++    __fsblkcnt64_t f_bfree;
++    __fsblkcnt64_t f_bavail;
++    __fsfilcnt64_t f_files;
++    __fsfilcnt64_t f_ffree;
++    __fsfilcnt64_t f_favail;
++    unsigned long int f_fsid;
++#ifdef _STATVFSBUF_F_UNUSED
++    int __f_unused;
++#endif
++    unsigned long int f_flag;
++    unsigned long int f_namemax;
++    unsigned int f_spare[6];
++  };
++#endif
++
++/* Definitions for the flag in `f_flag'.  */
++enum
++{
++  ST_RDONLY = 1,		/* Mount read-only.  */
++#define ST_RDONLY	ST_RDONLY
++  ST_NOSUID = 2			/* Ignore suid and sgid bits.  */
++#define ST_NOSUID	ST_NOSUID
++#ifdef __USE_GNU
++  ,
++  ST_NODEV = 4,			/* Disallow access to device special files.  */
++# define ST_NODEV	ST_NODEV
++  ST_NOEXEC = 8,		/* Disallow program execution.  */
++# define ST_NOEXEC	ST_NOEXEC
++  ST_SYNCHRONOUS = 16,		/* Writes are synced at once.  */
++# define ST_SYNCHRONOUS	ST_SYNCHRONOUS
++  ST_NOATIME = 0x10000000	/* Do not update access times.  */
++# define ST_NOATIME	ST_NOATIME
++#endif	/* Use GNU.  */
++};
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/sys_errlist.h
+@@ -0,0 +1,33 @@
++/* Declare sys_errlist and sys_nerr, or don't.  Compatibility (do) version.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _STDIO_H
++# error "Never include <bits/sys_errlist.h> directly; use <stdio.h> instead."
++#endif
++
++/* sys_errlist and sys_nerr are deprecated.  Use strerror instead.  */
++
++#ifdef  __USE_BSD
++extern int sys_nerr;
++extern __const char *__const sys_errlist[];
++#endif
++#ifdef  __USE_GNU
++extern int _sys_nerr;
++extern __const char *__const _sys_errlist[];
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/syslog-path.h
+@@ -0,0 +1,31 @@
++/* <bits/syslog-path.h> -- _PATH_LOG definition
++   Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_SYSLOG_H
++# error "Never include this file directly.  Use <sys/syslog.h> instead"
++#endif
++
++#ifndef _BITS_SYSLOG_PATH_H
++#define _BITS_SYSLOG_PATH_H 1
++
++/* On kFreeBSD, named pipes are not allowed in /dev (devfs), so we pick this
++   alternate path. */
++#define _PATH_LOG	"/var/run/log"
++
++#endif /* bits/syslog-path.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/termios.h
+@@ -0,0 +1,253 @@
++/* termios type and macro definitions.  FreeBSD version.
++   Copyright (C) 1993-1994,1996-1997,1999,2001-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _TERMIOS_H
++# error "Never include <bits/termios.h> directly; use <termios.h> instead."
++#endif
++
++/* These macros are also defined in some <bits/ioctls.h> files (with
++   numerically identical values), but this serves to shut up cpp's
++   complaining. */
++#ifdef __USE_BSD
++
++# ifdef MDMBUF
++#  undef MDMBUF
++# endif
++# ifdef FLUSHO
++#  undef FLUSHO
++# endif
++# ifdef PENDIN
++#  undef PENDIN
++# endif
++
++#endif /* __USE_BSD */
++
++#ifdef ECHO
++# undef ECHO
++#endif
++#ifdef TOSTOP
++# undef TOSTOP
++#endif
++#ifdef NOFLSH
++# undef NOFLSH
++#endif
++
++
++typedef unsigned char	cc_t;
++typedef unsigned int	speed_t;
++typedef unsigned int	tcflag_t;
++
++#define NCCS 20
++struct termios
++  {
++    tcflag_t c_iflag;		/* input mode flags */
++    tcflag_t c_oflag;		/* output mode flags */
++    tcflag_t c_cflag;		/* control mode flags */
++    tcflag_t c_lflag;		/* local mode flags */
++    cc_t c_cc[NCCS];		/* control characters */
++    speed_t c_ispeed;		/* input speed */
++    speed_t c_ospeed;		/* output speed */
++#define __ispeed c_ispeed
++#define __ospeed c_ospeed
++#define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
++#define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
++  };
++
++/* c_cc characters */
++#define VEOF 0
++#define VEOL 1
++#define VEOL2 2
++#define VERASE 3
++#define VWERASE 4
++#define VKILL 5
++#define VREPRINT 6
++#ifdef __USE_BSD
++# define VERASE2 7
++#endif
++#define VINTR 8
++#define VQUIT 9
++#define VSUSP 10
++#ifdef __USE_BSD
++# define VDSUSP 11
++#endif
++#define VSTART 12
++#define VSTOP 13
++#define VLNEXT 14
++#define VDISCARD 15
++#define VMIN 16
++#define VTIME 17
++#ifdef __USE_BSD
++# define VSTATUS 18
++#endif
++
++/* c_iflag bits */
++#define IGNBRK	0000001
++#define BRKINT	0000002
++#define IGNPAR	0000004
++#define PARMRK	0000010
++#define INPCK	0000020
++#define ISTRIP	0000040
++#define INLCR	0000100
++#define IGNCR	0000200
++#define ICRNL	0000400
++#define IXON	0001000
++#define IXOFF	0002000
++#define IXANY	0004000
++#define IMAXBEL	0020000
++
++/* c_oflag bits */
++#define	OPOST	(1 << 0)	/* Perform output processing.  */
++#define	ONLCR	(1 << 1)	/* Map NL to CR-NL on output.  */
++#if defined __USE_MISC || defined __USE_XOPEN
++# define TAB0   (0 << 2)	/* no tab delay and expansion */
++# define TAB3   (1 << 2)	/* expand tabs to spaces */
++# define TABDLY	TAB3		/* tab delay mask */
++# define OXTABS	TAB3
++# define XTABS	TAB3
++#endif
++#ifdef	__USE_BSD
++# define ONOEOT	(1 << 3)	/* Discard EOT (^D) on output.  */
++#endif
++#define	OCRNL	(1 << 4)	/* map CR to NL on output */
++#define	ONOCR	(1 << 5)	/* no CR output at column 0 */
++#define	ONLRET	(1 << 6)	/* NL performs CR function */
++
++/* c_cflag bit meaning */
++#ifdef	__USE_BSD
++# define CIGNORE	(1 << 0)	/* Ignore these control flags.  */
++#endif
++#define	CSIZE	(CS5|CS6|CS7|CS8)	/* Number of bits per byte (mask).  */
++#define	CS5	(0 << 8)	/* 5 bits per byte.  */
++#define	CS6	(1 << 8)	/* 6 bits per byte.  */
++#define	CS7	(2 << 8)	/* 7 bits per byte.  */
++#define	CS8	(3 << 8)	/* 8 bits per byte.  */
++#define	CSTOPB	(1 << 10)	/* Two stop bits instead of one.  */
++#define	CREAD	(1 << 11)	/* Enable receiver.  */
++#define	PARENB	(1 << 12)	/* Parity enable.  */
++#define	PARODD	(1 << 13)	/* Odd parity instead of even.  */
++#define	HUPCL	(1 << 14)	/* Hang up on last close.  */
++#define	CLOCAL	(1 << 15)	/* Ignore modem status lines.  */
++#ifdef	__USE_BSD
++# define CCTS_OFLOW	(1 << 16)	/* CTS flow control of output.  */
++# define CRTS_IFLOW	(1 << 17)	/* RTS flow control of input.  */
++# define CRTSCTS	(CCTS_OFLOW|CRTS_IFLOW)	/* CTS/RTS flow control.  */
++# define CDTR_IFLOW	(1 << 18)	/* DTR flow control of input.  */
++# define CDSR_OFLOW	(1 << 19)	/* DSR flow control of output.  */
++# define CCAR_OFLOW	(1 << 20)	/* DCD flow control of output.  */
++# define MDMBUF		(1 << 20)	/* Carrier flow control of output.  */
++#endif
++
++/* c_lflag bits */
++#ifdef	__USE_BSD
++# define ECHOKE	(1 << 0)	/* Visual erase for KILL.  */
++#endif
++#define	_ECHOE	(1 << 1)	/* Visual erase for ERASE.  */
++#define	ECHOE	_ECHOE
++#define	_ECHOK	(1 << 2)	/* Echo NL after KILL.  */
++#define	ECHOK	_ECHOK
++#define	_ECHO	(1 << 3)	/* Enable echo.  */
++#define	ECHO	_ECHO
++#define	_ECHONL	(1 << 4)	/* Echo NL even if ECHO is off.  */
++#define	ECHONL	_ECHONL
++#ifdef	__USE_BSD
++# define ECHOPRT	(1 << 5)	/* Hardcopy visual erase.  */
++# define ECHOCTL	(1 << 6)	/* Echo control characters as ^X.  */
++#endif
++#define	_ISIG	(1 << 7)	/* Enable signals.  */
++#define	ISIG	_ISIG
++#define	_ICANON	(1 << 8)	/* Do erase and kill processing.  */
++#define	ICANON	_ICANON
++#ifdef	__USE_BSD
++# define ALTWERASE (1 << 9)	/* Alternate WERASE algorithm.  */
++#endif
++#define	_IEXTEN	(1 << 10)	/* Enable DISCARD and LNEXT.  */
++#define	IEXTEN	_IEXTEN
++#define	_EXTPROC (1 << 11)	/* External processing.  */
++#define EXTPROC	_EXTPROC
++#define	_TOSTOP	(1 << 22)	/* Send SIGTTOU for background output.  */
++#define	TOSTOP	_TOSTOP
++#ifdef	__USE_BSD
++# define FLUSHO	(1 << 23)	/* Output being flushed (state).  */
++# define NOKERNINFO (1 << 25)	/* Disable VSTATUS.  */
++# define PENDIN	(1 << 29)	/* Retype pending input (state).  */
++#endif
++#define	_NOFLSH	(1 << 31)	/* Disable flush after interrupt.  */
++#define	NOFLSH	_NOFLSH
++
++  /* Input and output baud rates.  */
++#define	B0	0		/* Hang up.  */
++#define	B50	50		/* 50 baud.  */
++#define	B75	75		/* 75 baud.  */
++#define	B110	110		/* 110 baud.  */
++#define	B134	134		/* 134.5 baud.  */
++#define	B150	150		/* 150 baud.  */
++#define	B200	200		/* 200 baud.  */
++#define	B300	300		/* 300 baud.  */
++#define	B600	600		/* 600 baud.  */
++#define	B1200	1200		/* 1200 baud.  */
++#define	B1800	1800		/* 1800 baud.  */
++#define	B2400	2400		/* 2400 baud.  */
++#define	B4800	4800		/* 4800 baud.  */
++#define	B9600	9600		/* 9600 baud.  */
++#define	B19200	19200		/* 19200 baud.  */
++#define	B38400	38400		/* 38400 baud.  */
++#define B76800	76800
++#ifdef	__USE_MISC
++# define EXTA	19200
++# define EXTB	38400
++#endif
++#define B7200	7200
++#define B14400	14400
++#define B28800	28800
++#define	B57600	57600
++#define	B115200	115200
++#define	B230400	230400
++#define	B460800	460800
++#define	B500000	500000
++#define	B576000	576000
++#define	B921600	921600
++#define	B1000000 1000000
++#define	B1152000 1152000
++#define	B1500000 1500000
++#define	B2000000 2000000
++#define	B2500000 2500000
++#define	B3000000 3000000
++#define	B3500000 3500000
++#define	B4000000 4000000
++#define	__MAX_BAUD B4000000
++
++/* tcflow() and TCXONC use these */
++#define	TCOOFF		1
++#define	TCOON		2
++#define	TCIOFF		3
++#define	TCION		4
++
++/* tcflush() and TCFLSH use these */
++#define	TCIFLUSH	1
++#define	TCOFLUSH	2
++#define	TCIOFLUSH	3
++
++/* tcsetattr uses these */
++#define	TCSANOW		0
++#define	TCSADRAIN	1
++#define	TCSAFLUSH	2
++#ifdef	__USE_BSD
++# define TCSASOFT	0x10	/* Flag: Don't alter hardware state.  */
++#endif
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/time.h
+@@ -0,0 +1,98 @@
++/* System-dependent timing definitions.  FreeBSD version.
++   Copyright (C) 1996-1997, 1999, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/*
++ * Never include this file directly; use <time.h> instead.
++ */
++
++#ifndef __need_timeval
++# ifndef _BITS_TIME_H
++#  define _BITS_TIME_H	1
++
++/* ISO/IEC 9899:1990 7.12.1: <time.h>
++   The macro `CLOCKS_PER_SEC' is the number per second of the value
++   returned by the `clock' function. */
++/* CAE XSH, Issue 4, Version 2: <time.h>
++   The value of CLOCKS_PER_SEC is required to be 1 million on all
++   XSI-conformant systems. */
++#  define CLOCKS_PER_SEC  1000000l
++
++#  if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K
++/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
++   presents the real value for clock ticks per second for the system.  */
++#   define CLK_TCK 128
++#  endif
++
++#  ifdef __USE_POSIX199309
++/* Identifier for system-wide realtime clock.  */
++#   define CLOCK_REALTIME		0
++/* High-resolution timer from the CPU.  */
++#   define CLOCK_PROCESS_CPUTIME_ID	2
++/* Thread-specific CPU-time clock.  */
++#   define CLOCK_THREAD_CPUTIME_ID	3
++/* Monotonic system-wide clock.  */
++#   define CLOCK_MONOTONIC		4
++/* These are BSD specific clocks.  */
++#   ifdef __USE_BSD
++#    define CLOCK_VIRTUAL		1
++#    define CLOCK_PROF			2
++#    define CLOCK_UPTIME    5               /* FreeBSD-specific. */
++#    define CLOCK_UPTIME_PRECISE    7       /* FreeBSD-specific. */
++#    define CLOCK_UPTIME_FAST       8       /* FreeBSD-specific. */
++#    define CLOCK_REALTIME_PRECISE  9       /* FreeBSD-specific. */
++#    define CLOCK_REALTIME_FAST     10      /* FreeBSD-specific. */
++#    define CLOCK_MONOTONIC_PRECISE 11      /* FreeBSD-specific. */
++#    define CLOCK_MONOTONIC_FAST    12      /* FreeBSD-specific. */
++#    define CLOCK_SECOND    13              /* FreeBSD-specific. */
++#   endif
++
++/* Flag to indicate time is absolute.  */
++#   define TIMER_RELTIME	0   /* relative timer */
++#   define TIMER_ABSTIME	1   /* absolute timer */
++#  endif
++
++
++/* Getkerninfo clock information structure */
++struct clockinfo
++  {
++    int hz;		/* clock frequency */
++    int tick;		/* micro-seconds per hz tick */
++    int spare;
++    int stathz;		/* statistics clock frequency */
++    int profhz;		/* profiling clock frequency */
++  };
++
++# endif	/* bits/time.h */
++#endif
++
++#ifdef __need_timeval
++# undef __need_timeval
++# ifndef _STRUCT_TIMEVAL
++#  define _STRUCT_TIMEVAL	1
++#  include <bits/types.h>
++
++/* A time value that is accurate to the nearest
++   microsecond but also has a range of years.  */
++struct timeval
++  {
++    __time_t tv_sec;		/* Seconds.  */
++    __suseconds_t tv_usec;	/* Microseconds.  */
++  };
++# endif	/* struct timeval */
++#endif	/* need timeval */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/typesizes.h
+@@ -0,0 +1,91 @@
++/* bits/typesizes.h -- underlying types for *_t.  kFreeBSD version.
++   Copyright (C) 2002, 2003, 2010, 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _BITS_TYPES_H
++# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
++#endif
++
++#ifndef	_BITS_TYPESIZES_H
++#define	_BITS_TYPESIZES_H	1
++
++/* See <bits/types.h> for the meaning of these macros.  This file exists so
++   that <bits/types.h> need not vary across different GNU platforms.  */
++
++#define __DEV_T_TYPE		__U32_TYPE
++#define __UID_T_TYPE		__U32_TYPE
++#define __GID_T_TYPE		__U32_TYPE
++#define __INO_T_TYPE		__U32_TYPE
++#define __INO64_T_TYPE		__UQUAD_TYPE
++#define __MODE_T_TYPE		__U16_TYPE
++#define __NLINK_T_TYPE		__U16_TYPE
++#define __OFF_T_TYPE		__SQUAD_TYPE
++#define __OFF64_T_TYPE		__SQUAD_TYPE
++#define __PID_T_TYPE		__S32_TYPE
++#define __RLIM_T_TYPE		__SQUAD_TYPE
++#define __RLIM64_T_TYPE		__SQUAD_TYPE
++#define	__BLKCNT_T_TYPE		__SQUAD_TYPE
++#define	__BLKCNT64_T_TYPE	__SQUAD_TYPE
++#define	__FSBLKCNT_T_TYPE	__ULONGWORD_TYPE
++#define	__FSBLKCNT64_T_TYPE	__UQUAD_TYPE
++#define	__FSFILCNT_T_TYPE	__ULONGWORD_TYPE
++#define	__FSFILCNT64_T_TYPE	__UQUAD_TYPE
++#define	__ID_T_TYPE		__U32_TYPE
++
++#if defined(__arm__) || defined(__powerpc__)
++#define __CLOCK_T_TYPE		__U32_TYPE
++#elif defined(__i386__)
++/* clock_t is unsigned in FreeBSD/i386, but it's too late to fix that now... */
++#define __CLOCK_T_TYPE		__S32_TYPE
++#else
++#define __CLOCK_T_TYPE		__S32_TYPE
++#endif
++
++/*
++ * This one is a bit tricky.  It needs to match the size
++ * in the sys/${arch}/include/_types.h typedefs.
++ *
++ * However, for i386 and amd64 we started with __SLONGWORD_TYPE
++ * and we need to maintain ABI.  Even if size is the same, using
++ * a different type may affect C++ ABI (this distinction is
++ * necessary to implement function overload), so it must stay
++ * with __SLONGWORD_TYPE.
++ */
++#if defined(__i386__) || defined(__amd64__)
++#define __TIME_T_TYPE		__SLONGWORD_TYPE
++#elif defined(__powerpc__) && !defined(__LP64__)
++#define __TIME_T_TYPE		__S32_TYPE
++#else
++#define __TIME_T_TYPE		__S64_TYPE
++#endif
++#define __USECONDS_T_TYPE	__U32_TYPE
++#define __SUSECONDS_T_TYPE	__SLONGWORD_TYPE
++#define __DADDR_T_TYPE		__SQUAD_TYPE
++#define __SWBLK_T_TYPE		__S32_TYPE
++#define __KEY_T_TYPE		__SLONGWORD_TYPE
++#define __CLOCKID_T_TYPE	__S32_TYPE
++#define __TIMER_T_TYPE		__S32_TYPE
++#define __BLKSIZE_T_TYPE	__U32_TYPE
++#define __FSID_T_TYPE		union { int __val[2]; int val[2]; }
++#define __SSIZE_T_TYPE		__SWORD_TYPE
++
++/* Number of descriptors that can fit in an `fd_set'.  */
++#define	__FD_SETSIZE		1024
++
++
++#endif /* bits/typesizes.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/uio.h
+@@ -0,0 +1,55 @@
++/* Copyright (C) 1996-1997, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#if !defined _SYS_UIO_H && !defined _FCNTL_H
++# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead."
++#endif
++
++#ifndef _BITS_UIO_H
++#define _BITS_UIO_H     1
++
++#include <sys/types.h>
++
++
++/* `struct iovec' -- Structure describing a section of memory.  */
++
++struct iovec
++{
++  /* Starting address.  */
++  __ptr_t iov_base;
++  /* Length in bytes.  */
++  size_t iov_len;
++};
++
++/* Maximum number of 'struct iovec's that can be passed to a readv() or
++   writev() system call.  For larger arrays of 'struct iovec', the libc
++   uses a single read() or write() call to guarantee atomicity.  */
++#define UIO_MAXIOV	1024
++
++#ifdef __USE_BSD
++enum    uio_rw { UIO_READ, UIO_WRITE };
++
++/* Segment flag values. */
++enum uio_seg {
++        UIO_USERSPACE,          /* from user data space */
++        UIO_SYSSPACE,           /* from system space */
++        UIO_NOCOPY              /* don't copy, already in object */
++};
++#endif
++
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/utsname.h
+@@ -0,0 +1,27 @@
++/* Copyright (C) 1997, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_UTSNAME_H
++# error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
++#endif
++
++/* Length of the entries in 'struct utsname' is 32.  */
++#define _UTSNAME_LENGTH 32
++
++/* But the version entry is longer.  */
++#define _UTSNAME_VERSION_LENGTH 256
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/waitflags.h
+@@ -0,0 +1,37 @@
++/* Definitions of flag bits for `waitpid' et al.
++   Copyright (C) 1992, 1996-1997, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#if !defined _SYS_WAIT_H && !defined _STDLIB_H
++# error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead."
++#endif
++
++
++/* Bits in the third argument to `waitpid'.  */
++#define	WNOHANG		1	/* Don't block waiting.  */
++#define	WUNTRACED	2	/* Report status of stopped children.  */
++
++/* Bits in the fourth argument to `waitid'.  */
++#define	WSTOPPED	2	/* Report stopped child (same as WUNTRACED). */
++#define	WCONTINUED	4	/* Report continued child.  */
++#define	WNOWAIT		8	/* Poll only. Don't delete the proc entry. */
++
++#define __WCLONE	0x80000000	/* Wait for cloned process.  */
++#ifdef __USE_BSD
++# define WLINUXCLONE	__WCLONE	/* FreeBSD name for __WCLONE.  */
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/waitstatus.h
+@@ -0,0 +1,105 @@
++/* Definitions of status bits for `wait' et al.
++   Copyright (C) 1992,1994,1996,1997,2000,2004 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#if !defined _SYS_WAIT_H && !defined _STDLIB_H
++# error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead."
++#endif
++
++
++/* If WIFEXITED(STATUS), the low-order 8 bits of the status.  */
++#define	__WEXITSTATUS(status)	(((status) & 0xff00) >> 8)
++
++/* If WIFSIGNALED(STATUS), the terminating signal.  */
++#define	__WTERMSIG(status)	((status) & 0x7f)
++
++/* If WIFSTOPPED(STATUS), the signal that stopped the child.  */
++#define	__WSTOPSIG(status)	__WEXITSTATUS(status)
++
++/* Nonzero if STATUS indicates normal termination.  */
++#define	__WIFEXITED(status)	(__WTERMSIG(status) == 0)
++
++/* Nonzero if STATUS indicates termination by a signal.  */
++#define __WIFSIGNALED(status) \
++  (((signed char) (((status) & 0x7f) + 1) >> 1) > 0)
++
++/* Nonzero if STATUS indicates the child is stopped.  */
++#define	__WIFSTOPPED(status)	(((status) & 0x7f) == 0x7f)
++
++/* Nonzero if STATUS indicates the child continued after a stop.  We only
++   define this if <bits/waitflags.h> provides the WCONTINUED flag bit.  */
++#ifdef WCONTINUED
++# define __WIFCONTINUED(status)	((status) == __W_CONTINUED)
++#endif
++
++/* Nonzero if STATUS indicates the child dumped core.  */
++#define	__WCOREDUMP(status)	((status) & __WCOREFLAG)
++
++/* Macros for constructing status values.  */
++#define	__W_EXITCODE(ret, sig)	((ret) << 8 | (sig))
++#define	__W_STOPCODE(sig)	((sig) << 8 | 0x7f)
++
++/* Linux uses 0xffff, BSD uses SIGCONT */
++#define __W_CONTINUED		0x13
++#define	__WCOREFLAG		0x80
++
++
++#ifdef	__USE_BSD
++
++# include <endian.h>
++
++union wait
++  {
++    int w_status;
++    struct
++      {
++# if	__BYTE_ORDER == __LITTLE_ENDIAN
++	unsigned int __w_termsig:7; /* Terminating signal.  */
++	unsigned int __w_coredump:1; /* Set if dumped core.  */
++	unsigned int __w_retcode:8; /* Return code if exited normally.  */
++	unsigned int:16;
++# endif				/* Little endian.  */
++# if	__BYTE_ORDER == __BIG_ENDIAN
++	unsigned int:16;
++	unsigned int __w_retcode:8;
++	unsigned int __w_coredump:1;
++	unsigned int __w_termsig:7;
++# endif				/* Big endian.  */
++      } __wait_terminated;
++    struct
++      {
++# if	__BYTE_ORDER == __LITTLE_ENDIAN
++	unsigned int __w_stopval:8; /* W_STOPPED if stopped.  */
++	unsigned int __w_stopsig:8; /* Stopping signal.  */
++	unsigned int:16;
++# endif				/* Little endian.  */
++# if	__BYTE_ORDER == __BIG_ENDIAN
++	unsigned int:16;
++	unsigned int __w_stopsig:8; /* Stopping signal.  */
++	unsigned int __w_stopval:8; /* W_STOPPED if stopped.  */
++# endif				/* Big endian.  */
++      } __wait_stopped;
++  };
++
++# define w_termsig	__wait_terminated.__w_termsig
++# define w_coredump	__wait_terminated.__w_coredump
++# define w_retcode	__wait_terminated.__w_retcode
++# define w_stopsig	__wait_stopped.__w_stopsig
++# define w_stopval	__wait_stopped.__w_stopval
++
++#endif	/* Use BSD.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/brk.c
+@@ -0,0 +1,50 @@
++/* Copyright (C) 2004, 2010 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Robert Millan
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <unistd.h>
++#include <sysdep.h>
++
++extern int __syscall_obreak (void *addr);
++libc_hidden_proto (__syscall_obreak)
++
++extern void _end;
++
++/* sbrk.c expects this.  */
++void *__curbrk = &_end;
++
++/* Set the end of the process's data space to ADDR.
++   Return 0 if successful, -1 if not.  */
++int
++__brk (addr)
++     void *addr;
++{
++  if (addr < &_end)
++    return 0;
++
++  if (INLINE_SYSCALL (obreak, 1, addr) == -1)
++    {
++      __set_errno (ENOMEM);
++      return -1;
++    }
++
++  __curbrk = addr;
++  return 0;
++}
++weak_alias (__brk, brk)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/check_fds.c
+@@ -0,0 +1 @@
++void __libc_check_standard_fds (void) {;}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/check_native.c
+@@ -0,0 +1,42 @@
++/* Determine whether interfaces use native transport.  Dummy version.
++   Copyright (C) 2008 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <assert.h>
++#include <errno.h>
++#include <ifaddrs.h>
++#include <stddef.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <time.h>
++#include <unistd.h>
++#include <net/if.h>
++#include <net/if_arp.h>
++#include <sys/ioctl.h>
++
++#include <not-cancel.h>
++
++
++void
++__check_native (uint32_t a1_index, int *a1_native,
++		uint32_t a2_index, int *a2_native)
++{
++
++#warning __check_native() not yet implemented
++  return;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/check_pf.c
+@@ -0,0 +1 @@
++#include <inet/check_pf.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/clock_getres.c
+@@ -0,0 +1,42 @@
++/* Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++
++int __syscall_clock_getres(clockid_t clock_id, struct timespec *tp);
++libc_hidden_proto (__syscall_clock_getres)
++
++# define SYSDEP_GETRES \
++	case CLOCK_REALTIME:		\
++	case CLOCK_MONOTONIC:		\
++	case CLOCK_REALTIME_FAST:	\
++	case CLOCK_REALTIME_PRECISE:	\
++	case CLOCK_MONOTONIC_FAST:	\
++	case CLOCK_MONOTONIC_PRECISE:	\
++	case CLOCK_UPTIME:		\
++	case CLOCK_UPTIME_FAST:		\
++	case CLOCK_UPTIME_PRECISE:	\
++	case CLOCK_VIRTUAL:		\
++	case CLOCK_SECOND:		\
++    retval = INLINE_SYSCALL (clock_getres, 2, clock_id, res);		      \
++    break
++
++/* We handled the REALTIME clock here.  */
++# define HANDLED_REALTIME	1
++
++#include <sysdeps/posix/clock_getres.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/clock_gettime.c
+@@ -0,0 +1,42 @@
++/* Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++#include "kernel-posix-cpu-timers.h"
++
++int __syscall_clock_gettime(clockid_t clock_id, struct timespec *tp);
++libc_hidden_proto (__syscall_clock_gettime)
++
++# define SYSDEP_GETTIME \
++	case CLOCK_REALTIME:		\
++	case CLOCK_MONOTONIC:		\
++	case CLOCK_REALTIME_FAST:	\
++	case CLOCK_REALTIME_PRECISE:	\
++	case CLOCK_MONOTONIC_FAST:	\
++	case CLOCK_MONOTONIC_PRECISE:	\
++	case CLOCK_UPTIME:		\
++	case CLOCK_UPTIME_FAST:		\
++	case CLOCK_UPTIME_PRECISE:	\
++	case CLOCK_VIRTUAL:		\
++	case CLOCK_SECOND:		\
++    retval = INLINE_SYSCALL (clock_gettime, 2, clock_id, tp);		      \
++    break
++
++/* We handled the REALTIME clock here.  */
++# define HANDLED_REALTIME	1
++#include <sysdeps/unix/clock_gettime.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/clock_settime.c
+@@ -0,0 +1,32 @@
++/* Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++#include "kernel-posix-cpu-timers.h"
++
++int __syscall_clock_settime(clockid_t clock_id, const struct timespec *tp);
++libc_hidden_proto (__syscall_clock_settime)
++
++# define SYSDEP_SETTIME \
++  case CLOCK_REALTIME:							      \
++    retval = INLINE_SYSCALL (clock_settime, 2, clock_id, tp);		      \
++    break
++/* We handled the REALTIME clock here.  */
++# define HANDLED_REALTIME	1
++
++#include <sysdeps/unix/clock_settime.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/clone.c
+@@ -0,0 +1,122 @@
++/* Create a thread.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#define __clone __no_broken_clone_decl
++#include <sched.h>
++#include <sys/rfork.h>
++#include <errno.h>
++#include <signal.h>
++#include <stddef.h>
++#include <getosreldate.h>
++#undef __clone
++
++/* __start_thread (flags, child_stack, fn, arg)
++   is roughly equivalent to
++
++     int retval = __rfork (flags);
++     if (retval == 0)
++       {
++         // Here we are in the child thread.
++         %stackpointer = child_stack;
++         _exit (fn (arg));
++       }
++     return retval;
++
++   but it cannot be done in portable C because it must access fn and arg
++   after having replaced the stack pointer.  */
++
++extern int __start_thread (int flags, void *child_stack,
++			   int (*fn) (void *), void *arg);
++
++int __clone (int (*fn) (void *), void *child_stack, int flags, void *arg)
++{
++  int rfork_flags = RFPROC;
++
++  if (fn == NULL || child_stack == NULL)
++    {
++      __set_errno (EINVAL);
++      return -1;
++    }
++
++  /* This implementation of clone() does not support all Linux flags.  */
++  if (flags & ~(CSIGNAL | CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND
++		| CLONE_VFORK | CLONE_SYSVSEM))
++    {
++      __set_errno (EINVAL);
++      return -1;
++    }
++
++  if ((flags & CSIGNAL) != SIGCHLD)
++  {
++    if (__kernel_getosreldate() >= 802510)
++                /* we slightly cheat here, */
++                /* the 9.x snapshot prior to r223966 does not support it too */
++    {
++      if ((flags & CSIGNAL) & ~RFTSIGMASK)
++	{
++	  __set_errno (EINVAL);
++	  return -1;
++	}
++        rfork_flags |= (RFTSIGZMB | RFTSIGFLAGS(flags & CSIGNAL));
++    }
++    else
++    {
++      if ((flags & CSIGNAL) & ~RFTHPNMASK)
++	{
++	  __set_errno (EINVAL);
++	  return -1;
++	}
++      if ((flags & CSIGNAL) == 0)
++        rfork_flags |= (RFLINUXTHPN | ((SIGCHLD) <<  RFTHPNSHIFT));
++      else
++        rfork_flags |= (RFLINUXTHPN | ((flags & CSIGNAL) <<  RFTHPNSHIFT));
++    }
++  } 
++  if (flags & CLONE_VM)
++    rfork_flags |= RFMEM;
++
++  if (flags & CLONE_FS)
++    /* Sharing the filesystem related info (umask, cwd, root dir)
++       is not supported by rfork.  Ignore this; let's hope programs
++       will set their umask and cwd before spawning threads.  */
++    ;
++
++  if (flags & CLONE_SYSVSEM)
++    /* Ignore this; it has been introduced into linuxthreads in post 2.4 glibc */
++    ;
++
++  if (!(flags & CLONE_FILES))
++    rfork_flags |= RFFDG;
++
++  if (flags & CLONE_SIGHAND)
++    {
++      rfork_flags |= RFSIGSHARE;
++      /* Also set the undocumented flag RFTHREAD.  It has the effect that when
++	 the thread leader exits, all threads belonging to it are killed.  */
++      rfork_flags |= RFTHREAD;
++    }
++
++  if (flags & CLONE_VFORK)
++    rfork_flags |= RFPPWAIT;
++
++  return __start_thread (rfork_flags, child_stack, fn, arg);
++}
++
++weak_alias (__clone, clone)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/configure
+@@ -0,0 +1,353 @@
++# This file is generated from configure.in by Autoconf.  DO NOT EDIT!
++ # Local configure fragment for sysdeps/unix/bsd/bsd4.4/kfreebsd.
++
++case "$machine" in
++  x86_64*)
++	echo "Adding extra sysnames for kfreebsd/x86_64/elf"
++	sysnames="ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/elf $sysnames"
++    ;;
++  mips*)
++	echo "Adding extra sysnames for kfreebsd/mips/elf"
++	sysnames="ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/elf $sysnames"
++    ;;
++esac
++
++# The kFreeBSD headers can be found in
++#   /usr/src/sys/
++# Check whether this directory is available.
++if test -z "$sysheaders" &&
++   test "x$cross_compiling" = xno &&
++   test -d /usr/src/sys/ ; then
++  sysheaders="/usr/src/sys/"
++  ccheaders=`$CC -print-file-name=include`
++      SYSINCLUDES="-I $sysheaders"
++fi
++
++# Don't bother trying to generate any glue code to be compatible with the
++# existing system library, because we are the only system library.
++inhibit_glue=yes
++
++if test -n "$sysheaders"; then
++  OLD_CPPFLAGS=$CPPFLAGS
++  CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
++fi
++
++
++echo "$as_me:$LINENO: checking for egrep" >&5
++echo $ECHO_N "checking for egrep... $ECHO_C" >&6
++if test "${ac_cv_prog_egrep+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
++    then ac_cv_prog_egrep='grep -E'
++    else ac_cv_prog_egrep='egrep'
++    fi
++fi
++echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
++echo "${ECHO_T}$ac_cv_prog_egrep" >&6
++ EGREP=$ac_cv_prog_egrep
++
++
++echo "$as_me:$LINENO: checking installed kFreeBSD kernel header files" >&5
++echo $ECHO_N "checking installed kFreeBSD kernel header files... $ECHO_C" >&6
++if test "${libc_cv_kfreebsd600+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h.  */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h.  */
++#include <osreldate.h>
++#if !defined(__FreeBSD_kernel_version) && defined(__FreeBSD_version)
++#define __FreeBSD_kernel_version __FreeBSD_version
++#endif
++#if !defined __FreeBSD_kernel_version || __FreeBSD_kernel_version <  (6 *100000+ 0 *1000+ 0) /* 6.0.0 */
++eat flaming death
++#endif
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "eat flaming death" >/dev/null 2>&1; then
++  libc_cv_kfreebsd600='TOO OLD!'
++else
++  libc_cv_kfreebsd600='6.0.0 or later'
++fi
++rm -f conftest*
++
++fi
++echo "$as_me:$LINENO: result: $libc_cv_kfreebsd600" >&5
++echo "${ECHO_T}$libc_cv_kfreebsd600" >&6
++if test "$libc_cv_kfreebsd600" != '6.0.0 or later'; then
++  { { echo "$as_me:$LINENO: error: GNU libc requires kernel header files from
++kFreeBSD 6.0.0 or later to be installed before configuring.
++The kernel header files are found usually in /usr/src/sys/; make sure
++these directories use files from kFreeBSD 6.0.0 or later.
++This check uses <osreldate.h>, so
++make sure that file was built correctly when installing the kernel header
++files.  To use kernel headers not from /usr/src/sys/, use the
++configure option --with-headers." >&5
++echo "$as_me: error: GNU libc requires kernel header files from
++kFreeBSD 6.0.0 or later to be installed before configuring.
++The kernel header files are found usually in /usr/src/sys/; make sure
++these directories use files from kFreeBSD 6.0.0 or later.
++This check uses <osreldate.h>, so
++make sure that file was built correctly when installing the kernel header
++files.  To use kernel headers not from /usr/src/sys/, use the
++configure option --with-headers." >&2;}
++   { (exit 1); exit 1; }; }
++fi
++
++# Check whether --enable-compatible-utmp or --disable-compatible-utmp was given.
++if test "${enable_compatible_utmp+set}" = set; then
++  enableval="$enable_compatible_utmp"
++  enable_utmp_compat=$enableval
++else
++  enable_utmp_compat=no
++fi;
++if test "$enable_utmp_compat" = no; then
++  utmp_subdir=utmp-utmpx
++else
++  utmp_subdir=utmp-compat
++fi
++sysnames="$sysnames sysdeps/unix/bsd/bsd4.4/kfreebsd/$utmp_subdir"
++
++# If the user gave a minimal version number test whether the available
++# kernel headers are young enough.  Additionally we have minimal
++# kernel versions for some architectures.  If a previous configure fragment
++# set arch_minimum_kernel already, let that override our defaults here.
++# Note that we presume such a fragment has set libc_cv_gcc_unwind_find_fde
++# if appropriate too.
++test -n "$arch_minimum_kernel" ||
++case "$machine" in
++  i386*)
++    libc_cv_gcc_unwind_find_fde=yes
++    arch_minimum_kernel=6.0.0
++    ;;
++  x86_64*)
++    arch_minimum_kernel=6.0.0
++    ;;
++  *)
++    arch_minimum_kernel=6.0.0
++    ;;
++esac
++if test -n "$minimum_kernel"; then
++
++  user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
++  arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
++
++  if test $user_version -lt $arch_version; then
++    { echo "$as_me:$LINENO: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&5
++echo "$as_me: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&2;}
++    minimum_kernel=$arch_minimum_kernel
++  fi
++else
++  if test $arch_minimum_kernel != '6.0.0'; then
++    minimum_kernel=$arch_minimum_kernel
++  fi
++fi
++
++if test -n "$minimum_kernel"; then
++  echo "$as_me:$LINENO: checking for kernel header at least $minimum_kernel" >&5
++echo $ECHO_N "checking for kernel header at least $minimum_kernel... $ECHO_C" >&6
++  hdrnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 100000 + \2 * 1000 + \3)/'`;
++  decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
++  abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
++  cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h.  */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h.  */
++#include <osreldate.h>
++#if !defined(__FreeBSD_kernel_version) && defined(__FreeBSD_version)
++#define __FreeBSD_kernel_version __FreeBSD_version
++#endif
++#if __FreeBSD_kernel_version < $hdrnum
++eat flaming death
++#endif
++_ACEOF
++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
++  $EGREP "eat flaming death" >/dev/null 2>&1; then
++  libc_minimum_kernel='too old!'
++else
++  libc_minimum_kernel=ok
++fi
++rm -f conftest*
++
++  echo "$as_me:$LINENO: result: $libc_minimum_kernel" >&5
++echo "${ECHO_T}$libc_minimum_kernel" >&6
++  if test "$libc_minimum_kernel" = ok; then
++    cat >>confdefs.h <<_ACEOF
++#define __KFREEBSD_KERNEL_VERSION $decnum
++_ACEOF
++
++    cat >>confdefs.h <<_ACEOF
++#define __ABI_TAG_VERSION $abinum
++_ACEOF
++
++  else
++    { { echo "$as_me:$LINENO: error: *** The available kernel headers are older than the requested
++*** compatible kernel version" >&5
++echo "$as_me: error: *** The available kernel headers are older than the requested
++*** compatible kernel version" >&2;}
++   { (exit 1); exit 1; }; }
++  fi
++fi
++
++if test -n "$sysheaders"; then
++  CPPFLAGS=$OLD_CPPFLAGS
++fi
++# The Linux filesystem standard prescribes where to place "essential"
++# files.  I.e., when the installation prefix is "/usr" we have to place
++# shared library objects and the configuration files on the root partition
++# in /lib and /etc.
++case "$prefix" in
++/usr | /usr/)
++  # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
++  case $machine in
++  sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
++  mips/mips64/n64/* )
++    libc_cv_slibdir="/lib64"
++    if test "$libdir" = '${exec_prefix}/lib'; then
++      libdir='${exec_prefix}/lib64';
++      # Locale data can be shared between 32bit and 64bit libraries
++      libc_cv_localedir='${exec_prefix}/lib/locale'
++    fi
++    ;;
++  mips/mips64/n32/* )
++    libc_cv_slibdir="/lib32"
++    if test "$libdir" = '${exec_prefix}/lib'; then
++      libdir='${exec_prefix}/lib32';
++      # Locale data can be shared between 32bit and 64bit libraries
++      libc_cv_localedir='${exec_prefix}/lib/locale'
++    fi
++    ;;
++  *)
++    libc_cv_slibdir="/lib"
++    ;;
++  esac
++  # Allow the user to override the path with --sysconfdir
++  if test $sysconfdir = '${prefix}/etc'; then
++    libc_cv_sysconfdir=/etc
++  else
++    libc_cv_sysconfdir=$sysconfdir
++   fi
++  libc_cv_rootsbindir="/sbin"
++  ;;
++esac
++
++
++# Put exception handling support into libc, so that not every shared
++# library needs to include it.
++# FIXME: Does not work yet.
++libc_cv_gcc_unwind_find_fde=no
++
++
++# Under kFreeBSD the LinuxThreads or (may be later) NPTL add-on should be available.
++case $add_ons in
++  # Only one of the add-ons should be available.
++  *linuxthreads*nptl*|*nptl*linuxthreads*)
++    echo "\
++*** LinuxThreads and NPTL add-ons are both available.  Only one must be used."
++    exit 1
++    ;;
++  # It is available.  Good.
++  *linuxthreads*)
++    linuxthreads_missing=
++    ;;
++  *nptl*)
++    linuxthreads_missing=
++    ;;
++  *)
++    linuxthreads_missing=yes
++    ;;
++esac
++
++if test "$linuxthreads_missing"; then
++  if test $enable_sanity = yes; then
++    echo "\
++*** On GNU/kFreeBSD systems it is normal to compile GNU libc with the
++*** \`linuxthreads' add-on.  Without that, the library will be
++*** incompatible with normal GNU/kFreeBSD systems.
++*** If you really mean to not use this add-on, run configure again
++*** using the extra parameter \`--disable-sanity-checks'."
++    exit 1
++  else
++    echo "\
++*** WARNING: Are you sure you do not want to use the \`linuxthreads'
++*** add-on?"
++  fi
++fi
++
++if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
++  if test $enable_sanity = yes; then
++    echo "\
++*** On GNU/kFreeBSD systems the GNU C Library should not be installed into
++*** /usr/local since this might make your system totally unusable.
++*** We strongly advise to use a different prefix.  For details read the FAQ.
++*** If you really mean to do this, run configure again using the extra
++*** parameter \`--disable-sanity-checks'."
++    exit 1
++  else
++    echo "\
++*** WARNING: Do you really want to install the GNU C Library into /usr/local?
++*** This might make your system totally unusable, for details read the FAQ."
++  fi
++fi
++
++
++# One kFreeBSD we use ldconfig.
++use_ldconfig=yes
++
++# We need some extensions to the `ldd' script.
++case "$machine" in
++  x86_64*)
++    ldd_rewrite_script=../ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/ldd-rewrite.sed
++    ;;
++  *)
++    ;;
++esac
++
++
++if test $host = $build; then
++  # If $prefix/include/{net,scsi} are symlinks, make install will
++  # clobber what they're linked to (probably a kernel tree).
++  # test -L ought to work on all Linux boxes.
++  if test "x$prefix" != xNONE; then
++    ac_prefix=$prefix
++  else
++    ac_prefix=$ac_default_prefix
++  fi
++  echo "$as_me:$LINENO: checking for symlinks in ${ac_prefix}/include" >&5
++echo $ECHO_N "checking for symlinks in ${ac_prefix}/include... $ECHO_C" >&6
++  ac_message=
++  if test -L ${ac_prefix}/include/net; then
++    ac_message="$ac_message
++   ${ac_prefix}/include/net is a symlink"
++  fi
++  if test -L ${ac_prefix}/include/scsi; then
++    ac_message="$ac_message
++   ${ac_prefix}/include/scsi is a symlink"
++  fi
++  if test -n "$ac_message"; then
++    { { echo "$as_me:$LINENO: error: $ac_message
++\`make install' will destroy the target of the link(s).
++Delete the links and re-run configure, or better still, move the entire
++${ac_prefix}/include directory out of the way." >&5
++echo "$as_me: error: $ac_message
++\`make install' will destroy the target of the link(s).
++Delete the links and re-run configure, or better still, move the entire
++${ac_prefix}/include directory out of the way." >&2;}
++   { (exit 1); exit 1; }; }
++  else
++    echo "$as_me:$LINENO: result: ok" >&5
++echo "${ECHO_T}ok" >&6
++  fi
++fi
++
++# We support internal syscalls.
++# It is advertised as inlined syscalls availability ...
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_INLINED_SYSCALLS 1
++_ACEOF
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/configure.in
+@@ -0,0 +1,277 @@
++GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
++# Local configure fragment for sysdeps/unix/bsd/bsd4.4/kfreebsd.
++
++case "$machine" in
++  x86_64*)
++	echo "Adding extra sysnames for kfreebsd/x86_64/elf"
++	sysnames="ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/elf $sysnames"
++    ;;
++  mips*)
++	echo "Adding extra sysnames for kfreebsd/mips/elf"
++	sysnames="ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/elf $sysnames"
++    ;;
++esac
++
++# The kFreeBSD headers can be found in
++#   /usr/src/sys/
++# Check whether this directory is available.
++if test -z "$sysheaders" &&
++   test "x$cross_compiling" = xno &&
++   test -d /usr/src/sys/ ; then
++  sysheaders="/usr/src/sys/"
++  ccheaders=`$CC -print-file-name=include`
++  dnl We don't have to use -nostdinc.  We just want one more directory
++  dnl to be used.
++  SYSINCLUDES="-I $sysheaders"
++fi
++
++# Don't bother trying to generate any glue code to be compatible with the
++# existing system library, because we are the only system library.
++inhibit_glue=yes
++
++define([LIBC_KFREEBSD_VERSION],[6.0.0])dnl
++if test -n "$sysheaders"; then
++  OLD_CPPFLAGS=$CPPFLAGS
++  CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
++fi
++define([libc_cv_kfreebsdVER], [libc_cv_kfreebsd]patsubst(LIBC_KFREEBSD_VERSION,[\.]))dnl
++AC_CACHE_CHECK(installed kFreeBSD kernel header files, libc_cv_kfreebsdVER, [dnl
++AC_EGREP_CPP([eat flaming death], [#include <osreldate.h>
++#if !defined(__FreeBSD_kernel_version) && defined(__FreeBSD_version)
++#define __FreeBSD_kernel_version __FreeBSD_version
++#endif
++#if !defined __FreeBSD_kernel_version || __FreeBSD_kernel_version < ]dnl
++patsubst(LIBC_KFREEBSD_VERSION,[^\([^.]*\)\.\([^.]*\)\.\([^.]*\)$],dnl
++[ (\1 *100000+ \2 *1000+ \3) /* \1.\2.\3 */])[
++eat flaming death
++#endif],
++	     libc_cv_kfreebsdVER='TOO OLD!',
++	     libc_cv_kfreebsdVER='LIBC_KFREEBSD_VERSION or later')])
++if test "$libc_cv_kfreebsdVER" != 'LIBC_KFREEBSD_VERSION or later'; then
++  AC_MSG_ERROR([GNU libc requires kernel header files from
++kFreeBSD LIBC_KFREEBSD_VERSION or later to be installed before configuring.
++The kernel header files are found usually in /usr/src/sys/; make sure
++these directories use files from kFreeBSD LIBC_KFREEBSD_VERSION or later.
++This check uses <osreldate.h>, so
++make sure that file was built correctly when installing the kernel header
++files.  To use kernel headers not from /usr/src/sys/, use the
++configure option --with-headers.])
++fi
++
++AC_ARG_ENABLE(compatible-utmp, dnl
++[  --disable-compatible-utmp  use a struct utmp which is the same as struct
++                          utmpx, as on kFreeBSD, but incompatible with FreeBSD],
++              enable_utmp_compat=$enableval, enable_utmp_compat=no)
++if test "$enable_utmp_compat" = no; then
++  utmp_subdir=utmp-utmpx
++else
++  utmp_subdir=utmp-compat
++fi
++sysnames="$sysnames sysdeps/unix/bsd/bsd4.4/kfreebsd/$utmp_subdir"
++
++# If the user gave a minimal version number test whether the available
++# kernel headers are young enough.  Additionally we have minimal
++# kernel versions for some architectures.  If a previous configure fragment
++# set arch_minimum_kernel already, let that override our defaults here.
++# Note that we presume such a fragment has set libc_cv_gcc_unwind_find_fde
++# if appropriate too.
++test -n "$arch_minimum_kernel" ||
++case "$machine" in
++  i386*)
++    libc_cv_gcc_unwind_find_fde=yes
++    arch_minimum_kernel=6.0.0
++    ;;
++  x86_64*)
++    arch_minimum_kernel=6.0.0
++    ;;
++  *)
++    arch_minimum_kernel=6.0.0
++    ;;
++esac
++if test -n "$minimum_kernel"; then
++  changequote(,)
++  user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
++  arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
++  changequote([,])
++  if test $user_version -lt $arch_version; then
++    AC_MSG_WARN([minimum kernel version reset to $arch_minimum_kernel])
++    minimum_kernel=$arch_minimum_kernel
++  fi
++else
++  if test $arch_minimum_kernel != '6.0.0'; then
++    minimum_kernel=$arch_minimum_kernel
++  fi
++fi
++
++if test -n "$minimum_kernel"; then
++  AC_MSG_CHECKING(for kernel header at least $minimum_kernel)
++changequote(,)dnl
++  hdrnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 100000 + \2 * 1000 + \3)/'`;
++  decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
++  abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
++changequote([,])dnl
++  AC_EGREP_CPP([eat flaming death], [#include <osreldate.h>
++#if !defined(__FreeBSD_kernel_version) && defined(__FreeBSD_version)
++#define __FreeBSD_kernel_version __FreeBSD_version
++#endif
++#if __FreeBSD_kernel_version < $hdrnum
++eat flaming death
++#endif], libc_minimum_kernel='too old!', libc_minimum_kernel=ok)
++  AC_MSG_RESULT($libc_minimum_kernel)
++  if test "$libc_minimum_kernel" = ok; then
++    AC_DEFINE_UNQUOTED(__KFREEBSD_KERNEL_VERSION, $decnum)
++    AC_DEFINE_UNQUOTED(__ABI_TAG_VERSION, $abinum)
++  else
++    AC_MSG_ERROR([*** The available kernel headers are older than the requested
++*** compatible kernel version])
++  fi
++fi
++
++if test -n "$sysheaders"; then
++  CPPFLAGS=$OLD_CPPFLAGS
++fi
++# The Linux filesystem standard prescribes where to place "essential"
++# files.  I.e., when the installation prefix is "/usr" we have to place
++# shared library objects and the configuration files on the root partition
++# in /lib and /etc.
++case "$prefix" in
++/usr | /usr/)
++  # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
++  case $machine in
++  sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
++  mips/mips64/n64/* )
++    libc_cv_slibdir="/lib64"
++    if test "$libdir" = '${exec_prefix}/lib'; then
++      libdir='${exec_prefix}/lib64';
++      # Locale data can be shared between 32bit and 64bit libraries
++      libc_cv_localedir='${exec_prefix}/lib/locale'
++    fi
++    ;;
++  mips/mips64/n32/* )
++    libc_cv_slibdir="/lib32"
++    if test "$libdir" = '${exec_prefix}/lib'; then
++      libdir='${exec_prefix}/lib32';
++      # Locale data can be shared between 32bit and 64bit libraries
++      libc_cv_localedir='${exec_prefix}/lib/locale'
++    fi
++    ;;
++  *)
++    libc_cv_slibdir="/lib"
++    ;;
++  esac
++  # Allow the user to override the path with --sysconfdir
++  if test $sysconfdir = '${prefix}/etc'; then
++    libc_cv_sysconfdir=/etc
++  else
++    libc_cv_sysconfdir=$sysconfdir
++   fi
++  libc_cv_rootsbindir="/sbin"
++  ;;
++esac
++
++
++# Put exception handling support into libc, so that not every shared
++# library needs to include it.
++# FIXME: Does not work yet.
++libc_cv_gcc_unwind_find_fde=no
++
++
++# Under kFreeBSD the LinuxThreads or (may be later) NPTL add-on should be available.
++case $add_ons in
++  # Only one of the add-ons should be available.
++  *linuxthreads*nptl*|*nptl*linuxthreads*)
++    echo "\
++*** LinuxThreads and NPTL add-ons are both available.  Only one must be used."
++    exit 1
++    ;;
++  # It is available.  Good.
++  *linuxthreads*)
++    linuxthreads_missing=
++    ;;
++  *nptl*)
++    linuxthreads_missing=
++    ;;
++  *)
++    linuxthreads_missing=yes
++    ;;
++esac
++
++if test "$linuxthreads_missing"; then
++  if test $enable_sanity = yes; then
++    echo "\
++*** On GNU/kFreeBSD systems it is normal to compile GNU libc with the
++*** \`linuxthreads' add-on.  Without that, the library will be
++*** incompatible with normal GNU/kFreeBSD systems.
++*** If you really mean to not use this add-on, run configure again
++*** using the extra parameter \`--disable-sanity-checks'."
++    exit 1
++  else
++    echo "\
++*** WARNING: Are you sure you do not want to use the \`linuxthreads'
++*** add-on?"
++  fi
++fi
++
++if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
++  if test $enable_sanity = yes; then
++    echo "\
++*** On GNU/kFreeBSD systems the GNU C Library should not be installed into
++*** /usr/local since this might make your system totally unusable.
++*** We strongly advise to use a different prefix.  For details read the FAQ.
++*** If you really mean to do this, run configure again using the extra
++*** parameter \`--disable-sanity-checks'."
++    exit 1
++  else
++    echo "\
++*** WARNING: Do you really want to install the GNU C Library into /usr/local?
++*** This might make your system totally unusable, for details read the FAQ."
++  fi
++fi
++
++
++# One kFreeBSD we use ldconfig.
++use_ldconfig=yes
++
++# We need some extensions to the `ldd' script.
++changequote(,)
++case "$machine" in
++  x86_64*)
++    ldd_rewrite_script=../ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/ldd-rewrite.sed
++    ;;
++  *)
++    ;;
++esac
++changequote([,])
++
++if test $host = $build; then
++  # If $prefix/include/{net,scsi} are symlinks, make install will
++  # clobber what they're linked to (probably a kernel tree).
++  # test -L ought to work on all Linux boxes.
++  if test "x$prefix" != xNONE; then
++    ac_prefix=$prefix
++  else
++    ac_prefix=$ac_default_prefix
++  fi
++  AC_MSG_CHECKING([for symlinks in ${ac_prefix}/include])
++  ac_message=
++  if test -L ${ac_prefix}/include/net; then
++    ac_message="$ac_message
++   ${ac_prefix}/include/net is a symlink"
++  fi
++  if test -L ${ac_prefix}/include/scsi; then
++    ac_message="$ac_message
++   ${ac_prefix}/include/scsi is a symlink"
++  fi
++  if test -n "$ac_message"; then
++    AC_MSG_ERROR([$ac_message
++\`make install' will destroy the target of the link(s).
++Delete the links and re-run configure, or better still, move the entire
++${ac_prefix}/include directory out of the way.])
++  else
++    AC_MSG_RESULT(ok)
++  fi
++fi
++
++# We support internal syscalls.
++# It is advertised as inlined syscalls availability ...
++AC_DEFINE(HAVE_INLINED_SYSCALLS)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/connect.c
+@@ -0,0 +1,69 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Aurelien Jarno <aurelien@aurel32.net>, 2005.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/socket.h>
++#include <sysdep.h>
++#include <sysdep-cancel.h>
++
++/* According to POSIX.1-2004 the len argument specifies the length of
++   the sockaddr structure pointed to by the addrarg argument. However
++   the FreeBSD kernel waits the actual length of the address stored
++   there. The code below emulate this behaviour.  */
++
++extern int __libc_sa_len (sa_family_t __af);
++extern int __libc_sa_len_internal (sa_family_t __af);
++
++extern int __syscall_connect (int fd, __CONST_SOCKADDR_ARG addr,
++			      socklen_t addrlen);
++libc_hidden_proto (__syscall_connect)
++
++/* Open a connection on socket FD to peer at ADDR (which LEN bytes long).
++   For connectionless socket types, just set the default address to send to
++   and the only address from which to accept transmissions.
++   Return 0 on success, -1 for errors.  */
++
++int
++__libc_connect (int fd, __CONST_SOCKADDR_ARG addr, socklen_t addrlen)
++{
++  socklen_t new_addrlen;
++
++#ifndef NOT_IN_libc
++  new_addrlen = INTUSE(__libc_sa_len) ((addr.__sockaddr__)->sa_family);
++#else
++  new_addrlen = __libc_sa_len ((addr.__sockaddr__)->sa_family);
++#endif
++
++  /* Only allow a smaller size, otherwise it could lead to
++    stack corruption */
++  if ((new_addrlen != 0) && (new_addrlen < addrlen))
++    addrlen = new_addrlen;
++
++  /* We pass 3 arguments.  */
++  if (SINGLE_THREAD_P)
++    return INLINE_SYSCALL (connect, 3, fd, addr.__sockaddr__, addrlen);
++
++  int oldtype = LIBC_CANCEL_ASYNC ();
++  int result = INLINE_SYSCALL (connect, 3, fd, addr.__sockaddr__, addrlen);
++  LIBC_CANCEL_RESET (oldtype);
++  return result;
++}
++
++strong_alias (__libc_connect, __connect_internal)
++weak_alias (__libc_connect, __connect)
++weak_alias (__libc_connect, connect)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/devname.c
+@@ -0,0 +1,69 @@
++/*
++ * Copyright (c) 1989, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ */
++
++
++#include <stdio.h>
++#include <sys/param.h>
++#include <sys/stat.h>
++#include <sys/sysctl.h>
++
++char *
++__devname_r(__dev_t dev, __mode_t type, char *buf, int len)
++{
++	int i;
++	size_t j;
++	const char *r;
++
++	if ((type & S_IFMT) == S_IFCHR) {
++		j = len;
++		i = __sysctlbyname("kern.devname", buf, &j, &dev, sizeof (dev));
++		if (i == 0)
++		    return (buf);
++	}
++
++	/* Finally just format it */
++	if (dev == NODEV)
++		r = "#NODEV";
++	else 
++		r = "#%c:%d:0x%x";
++	__snprintf(buf, len, r,
++	    (type & S_IFMT) == S_IFCHR ? 'C' : 'B', major(dev), minor(dev));
++	return (buf);
++}
++
++
++char *
++__devname(__dev_t dev, __mode_t type)
++{
++	static char buf[SPECNAMELEN + 1];
++
++	return(__devname_r(dev, type, buf, sizeof(buf)));
++}
++weak_alias (__devname_r, devname_r)
++weak_alias (__devname, devname)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-execstack.c
+@@ -0,0 +1,58 @@
++/* Stack executability handling for GNU dynamic linker.  Linux version.
++   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <ldsodefs.h>
++#include <sys/mman.h>
++#include <errno.h>
++#include <libintl.h>
++#include <stdbool.h>
++#include <stackinfo.h>
++#include <caller.h>
++
++
++extern int __stack_prot attribute_relro attribute_hidden;
++
++
++int
++internal_function
++_dl_make_stack_executable (void **stack_endp)
++{
++  /* This gives us the highest/lowest page that needs to be changed.  */
++  uintptr_t page = ((uintptr_t) *stack_endp
++		    & -(intptr_t) GLRO(dl_pagesize));
++
++  /* Challenge the caller.  */
++  if (__builtin_expect (__check_caller (RETURN_ADDRESS (0),
++					allow_ldso|allow_libpthread) != 0, 0)
++      || __builtin_expect (*stack_endp != __libc_stack_end, 0))
++    return EPERM;
++
++  if (__builtin_expect (__mprotect ((void *) page, GLRO(dl_pagesize),
++				    __stack_prot) != 0, 0))
++    return errno;
++
++  /* Clear the address.  */
++  *stack_endp = NULL;
++
++  /* Remember that we changed the permission.  */
++  GL(dl_stack_flags) |= PF_X;
++
++  return 0;
++}
++rtld_hidden_def (_dl_make_stack_executable)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-origin.c
+@@ -0,0 +1,123 @@
++/* Find path of executable.
++   Copyright (C) 1998, 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <assert.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++#include <sys/param.h>
++#include <ldsodefs.h>
++#include <sysdep.h>
++
++#include <dl-dst.h>
++
++const char *_self_program_name_from_auxv attribute_hidden;
++
++static int
++_dl_self_name(char *buf, int buflen)
++{
++  int len, wdlen;
++
++  /* try /proc/self/exe symlink. */  
++  len = __readlink("/proc/self/exe", buf, buflen);
++
++  if (len > 0 && buf[0] == '/')
++    return len;
++
++  if (!_self_program_name_from_auxv)
++    return -1;
++
++  len = strlen(_self_program_name_from_auxv);
++  if (len > 0 && _self_program_name_from_auxv[0] == '/')
++  {
++    /* absolute file name */
++    if (len < buflen)
++    {
++      strcpy(buf, _self_program_name_from_auxv);
++      return len;
++    }
++    memcpy(buf, _self_program_name_from_auxv, buflen);
++    buf[buflen - 1] = 0;
++    return buflen - 1;
++  };
++  
++  /* relative file name, do our best */
++  if (NULL == __getcwd(buf, buflen))
++    return -1;
++  
++  wdlen = strlen(buf);
++  buf[wdlen] = '/';
++  if ((wdlen + len + 1) < buflen)
++  {
++    strcpy(buf + wdlen + 1, _self_program_name_from_auxv);
++    return wdlen + len + 1;
++  }
++  memcpy(buf + wdlen + 1, _self_program_name_from_auxv, buflen - wdlen - 1);  
++  buf[buflen - 1] = 0;
++  return buflen - 1;  
++}
++
++
++
++const char *
++_dl_get_origin (void)
++{
++  char linkval[2*PATH_MAX];
++  char *result;
++  int len;
++
++  len = _dl_self_name(linkval, sizeof(linkval));
++
++  if (len > 0)
++    {
++      /* We can use this value.  */
++      while (len > 1 && linkval[len - 1] != '/')
++	--len;
++      result = (char *) malloc (len + 1);
++      if (result == NULL)
++	result = (char *) -1;
++      else if (len == 1)
++	memcpy (result, "/", 2);
++      else
++	*((char *) __mempcpy (result, linkval, len - 1)) = '\0';
++    }
++  else
++    {
++      result = (char *) -1;
++      /* We use the environment variable LD_ORIGIN_PATH.  If it is set make
++	 a copy and strip out trailing slashes.  */
++      if (GLRO(dl_origin_path) != NULL)
++	{
++	  size_t len = strlen (GLRO(dl_origin_path));
++	  result = (char *) malloc (len + 1);
++	  if (result == NULL)
++	    result = (char *) -1;
++	  else
++	    {
++	      char *cp = __mempcpy (result, GLRO(dl_origin_path), len);
++	      while (cp > result + 1 && cp[-1] == '/')
++		--cp;
++	      *cp = '\0';
++	    }
++	}
++    }
++
++  return result;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-osinfo.h
+@@ -0,0 +1,98 @@
++/* Operating system specific code  for generic dynamic loader functions.
++   Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <string.h>
++#include <fcntl.h>
++#include <sys/sysctl.h>
++#include <sys/utsname.h>
++#include <kernel-features.h>
++
++#ifndef MIN
++# define MIN(a,b) (((a)<(b))?(a):(b))
++#endif
++
++#ifdef SHARED
++/* This is the function used in the dynamic linker to print the fatal error
++   message.  */
++static inline void
++__attribute__ ((__noreturn__))
++dl_fatal (const char *str)
++{
++  _dl_dprintf (2, str);
++  _exit (1);
++}
++#endif
++
++#define DL_SYSDEP_OSCHECK(FATAL)					      \
++  do {									      \
++    /* Test whether the kernel is new enough.  This test is only performed    \
++       if the library is not compiled to run on all kernels.  */	      \
++									      \
++    int version = _dl_discover_osversion ();				      \
++    if (__builtin_expect (version >= 0, 1))				      \
++      {									      \
++	if (__builtin_expect (GLRO(dl_osversion) == 0, 1)		      \
++	    || GLRO(dl_osversion) > version)				      \
++	  GLRO(dl_osversion) = version;					      \
++									      \
++	/* Now we can test with the required version.  */		      \
++	if (__KFREEBSD_KERNEL_VERSION > 0 && 				      \
++	    version < __KFREEBSD_KERNEL_VERSION)   			      \
++	  /* Not sufficent.  */						      \
++	  FATAL ("FATAL: kernel too old\n");				      \
++      }									      \
++    else if (__KFREEBSD_KERNEL_VERSION > 0)				      \
++      FATAL ("FATAL: cannot determine kernel version\n");		      \
++  } while (0)
++
++static inline uintptr_t __attribute__ ((always_inline))
++_dl_setup_stack_chk_guard (void *dl_random)
++{
++  uintptr_t ret;
++#ifdef ENABLE_STACKGUARD_RANDOMIZE
++  int fd = __open ("/dev/urandom", O_RDONLY);
++  if (fd >= 0)
++    {
++      ssize_t reslen = __read (fd, &ret, sizeof (ret));
++      __close (fd);
++      if (reslen == (ssize_t) sizeof (ret))
++        return ret;
++    }
++#endif
++  ret = 0;
++  unsigned char *p = (unsigned char *) &ret;
++  p[sizeof (ret) - 1] = 255;
++  p[sizeof (ret) - 2] = '\n';
++  return ret;
++}
++
++static inline uintptr_t __attribute__ ((always_inline))
++_dl_setup_pointer_guard (void *dl_random, uintptr_t stack_chk_guard)
++{
++  uintptr_t ret;
++
++  ret = stack_chk_guard;
++# ifndef HP_TIMING_NONAVAIL
++  hp_timing_t now;
++  HP_TIMING_NOW (now);
++  ret ^= now;
++# endif
++  return ret;
++}
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-support.c
+@@ -0,0 +1,44 @@
++/* Dynamic linker system dependencies for GNU/kFreeBSD.
++   Copyright (C) 2011 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#define _dl_aux_init _dl_aux_init_ignored_code
++#include <elf/dl-support.c>
++#include <bits/elf.h>
++#undef _dl_aux_init
++
++#ifdef HAVE_AUX_VECTOR
++void
++internal_function
++_dl_aux_init (ElfW(auxv_t) *av)
++{
++  for (; av->a_type != AT_NULL; ++av)
++    switch (av->a_type)
++      {
++      case AT_PAGESZ:
++	GLRO(dl_pagesize) = av->a_un.a_val;
++	break;
++      case AT_PHDR:
++	GL(dl_phdr) = (void *) av->a_un.a_val;
++	break;
++      case AT_PHNUM:
++	GL(dl_phnum) = av->a_un.a_val;
++	break;
++      }
++}
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-sysdep.c
+@@ -0,0 +1,253 @@
++/* Dynamic linker system dependencies for GNU/kFreeBSD.
++   Copyright (C) 1995-1998,2000-2008,2009,2010,2011
++        Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/* For SHARED, use the generic dynamic linker system interface code. */
++/* otherwise the code is in dl-support.c */
++
++#include <string.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <sys/sysctl.h>
++#include <ldsodefs.h>
++#include <kernel-features.h>
++
++#ifdef SHARED
++# define _dl_sysdep_start _dl_sysdep_start_ignored_code
++# define _dl_show_auxv _dl_show_auxv_ignored_code
++# include <elf/dl-sysdep.c>
++# include <bits/elf.h>
++# undef _dl_sysdep_start
++# undef _dl_show_auxv
++
++extern const char *_self_program_name_from_auxv attribute_hidden;
++
++ElfW(Addr)
++_dl_sysdep_start (void **start_argptr,
++		  void (*dl_main) (const ElfW(Phdr) *phdr, ElfW(Word) phnum,
++				   ElfW(Addr) *user_entry, ElfW(auxv_t) *auxv))
++{
++  const ElfW(Phdr) *phdr = NULL;
++  ElfW(Word) phnum = 0;
++  ElfW(Addr) user_entry;
++  ElfW(auxv_t) *av;
++  uid_t uid = 0;
++  gid_t gid = 0;
++#ifdef NEED_DL_SYSINFO
++  uintptr_t new_sysinfo = 0;
++#endif
++
++  __libc_stack_end = DL_STACK_END (start_argptr);
++  DL_FIND_ARG_COMPONENTS (start_argptr, _dl_argc, INTUSE(_dl_argv), _environ,
++			  _dl_auxv);
++
++  user_entry = (ElfW(Addr)) ENTRY_POINT;
++  GLRO(dl_platform) = NULL; /* Default to nothing known about the platform.  */
++
++  for (av = _dl_auxv; av->a_type != AT_NULL; av++)
++    switch (av->a_type)
++      {
++      case AT_PHDR:
++	phdr = (void *) av->a_un.a_val;
++	break;
++      case AT_PHNUM:
++	phnum = av->a_un.a_val;
++	break;
++      case AT_PAGESZ:
++	GLRO(dl_pagesize) = av->a_un.a_val;
++	break;
++      case AT_ENTRY:
++	user_entry = av->a_un.a_val;
++	break;
++      case AT_EXECPATH:
++	_self_program_name_from_auxv = (char *) av->a_un.a_val;
++	break;
++#ifdef NEED_DL_BASE_ADDR
++      case AT_BASE:
++	_dl_base_addr = av->a_un.a_val;
++	break;
++#endif
++      }
++
++    {
++      /* Fill in the values we have not gotten from the kernel through the
++	 auxiliary vector.  */
++#  undef SEE
++#  define SEE(UID, var, uid) \
++   var ^= __get##uid ()
++      SEE (UID, uid, uid);
++      SEE (EUID, uid, euid);
++      SEE (GID, gid, gid);
++      SEE (EGID, gid, egid);
++
++      /* If one of the two pairs of IDs does not match this is a setuid
++	 or setgid run.  */
++      INTUSE(__libc_enable_secure) = uid | gid;
++    }
++
++#ifndef HAVE_AUX_PAGESIZE
++  if (GLRO(dl_pagesize) == 0)
++    GLRO(dl_pagesize) = __getpagesize ();
++#endif
++
++#if defined NEED_DL_SYSINFO
++  /* Only set the sysinfo value if we also have the vsyscall DSO.  */
++  if (GLRO(dl_sysinfo_dso) != 0 && new_sysinfo)
++    GLRO(dl_sysinfo) = new_sysinfo;
++#endif
++
++#ifdef DL_SYSDEP_INIT
++  DL_SYSDEP_INIT;
++#endif
++
++#ifdef DL_PLATFORM_INIT
++  DL_PLATFORM_INIT;
++#endif
++
++  /* Determine the length of the platform name.  */
++  if (GLRO(dl_platform) != NULL)
++    GLRO(dl_platformlen) = strlen (GLRO(dl_platform));
++
++  if (__sbrk (0) == _end)
++    /* The dynamic linker was run as a program, and so the initial break
++       starts just after our bss, at &_end.  The malloc in dl-minimal.c
++       will consume the rest of this page, so tell the kernel to move the
++       break up that far.  When the user program examines its break, it
++       will see this new value and not clobber our data.  */
++    __sbrk (GLRO(dl_pagesize)
++	    - ((_end - (char *) 0) & (GLRO(dl_pagesize) - 1)));
++
++  /* If this is a SUID program we make sure that FDs 0, 1, and 2 are
++     allocated.  If necessary we are doing it ourself.  If it is not
++     possible we stop the program.  */
++  if (__builtin_expect (INTUSE(__libc_enable_secure), 0))
++    __libc_check_standard_fds ();
++
++  (*dl_main) (phdr, phnum, &user_entry, _dl_auxv);
++  return user_entry;
++}
++
++void
++internal_function
++_dl_show_auxv (void)
++{
++  char buf[64];
++  ElfW(auxv_t) *av;
++
++  /* Terminate string.  */
++  buf[63] = '\0';
++
++  /* The following code assumes that the AT_* values are encoded
++     starting from 0 with AT_NULL, 1 for AT_IGNORE, and all other values
++     close by (otherwise the array will be too large).  In case we have
++     to support a platform where these requirements are not fulfilled
++     some alternative implementation has to be used.  */
++  for (av = _dl_auxv; av->a_type != AT_NULL; ++av)
++    {
++      static const struct
++      {
++	const char label[17];
++	enum { unknown = 0, dec, hex, str, ignore } form : 8;
++      } auxvars[] =
++	{
++	  [AT_EXECFD - 2] =		{ "EXECFD:       ", dec },
++	  [AT_PHDR - 2] =		{ "PHDR:         0x", hex },
++	  [AT_PHENT - 2] =		{ "PHENT:        ", dec },
++	  [AT_PHNUM - 2] =		{ "PHNUM:        ", dec },
++	  [AT_PAGESZ - 2] =		{ "PAGESZ:       ", dec },
++	  [AT_BASE - 2] =		{ "BASE:         0x", hex },
++	  [AT_FLAGS - 2] =		{ "FLAGS:        0x", hex },
++	  [AT_ENTRY - 2] =		{ "ENTRY:        0x", hex },
++#ifndef __powerpc__
++	  /* For some odd reason these are not in sys/powerpc/include/elf.h.  */
++	  [AT_NOTELF - 2] =		{ "NOTELF:       ", hex },
++	  [AT_UID - 2] =		{ "UID:          ", dec },
++	  [AT_EUID - 2] =		{ "EUID:         ", dec },
++	  [AT_GID - 2] =		{ "GID:          ", dec },
++	  [AT_EGID - 2] =		{ "EGID:         ", dec },
++#endif
++	  [AT_EXECPATH - 2] =		{ "EXECPATH:     ", str },
++	  [AT_CANARY - 2] =		{ "CANARY:       0x", hex },
++	  [AT_CANARYLEN - 2] =		{ "CANARYLEN:    ", dec },
++	  [AT_OSRELDATE - 2] =		{ "OSRELDATE:    ", dec },
++	  [AT_NCPUS - 2] =		{ "NCPUS:        ", dec },
++	  [AT_PAGESIZES - 2] =		{ "PAGESIZES:    0x", hex },
++	  [AT_PAGESIZESLEN - 2] =	{ "PAGESIZESLEN: ", dec },
++	  [AT_STACKPROT - 2] =		{ "STACKPROT:    0x", hex },
++	};
++      unsigned int idx = (unsigned int) (av->a_type - 2);
++
++      if ((unsigned int) av->a_type < 2u || auxvars[idx].form == ignore)
++	continue;
++
++      assert (AT_NULL == 0);
++      assert (AT_IGNORE == 1);
++
++      if (idx < sizeof (auxvars) / sizeof (auxvars[0])
++	  && auxvars[idx].form != unknown)
++	{
++	  const char *val = (char *) av->a_un.a_val;
++
++	  if (__builtin_expect (auxvars[idx].form, dec) == dec)
++	    val = _itoa ((unsigned long int) av->a_un.a_val,
++			 buf + sizeof buf - 1, 10, 0);
++	  else if (__builtin_expect (auxvars[idx].form, hex) == hex)
++	    val = _itoa ((unsigned long int) av->a_un.a_val,
++			 buf + sizeof buf - 1, 16, 0);
++
++	  _dl_printf ("AT_%s%s\n", auxvars[idx].label, val);
++
++	  continue;
++	}
++
++      /* Unknown value: print a generic line.  */
++      char buf2[17];
++      buf2[sizeof (buf2) - 1] = '\0';
++      const char *val2 = _itoa ((unsigned long int) av->a_un.a_val,
++				buf2 + sizeof buf2 - 1, 16, 0);
++      const char *val =  _itoa ((unsigned long int) av->a_type,
++				buf + sizeof buf - 1, 16, 0);
++      _dl_printf ("AT_??? (0x%s): 0x%s\n", val, val2);
++    }
++}
++#endif
++
++int
++attribute_hidden
++_dl_discover_osversion (void)
++{
++  int request[2] = { CTL_KERN, KERN_OSRELDATE };
++  size_t len;
++  int version;
++
++  len = sizeof(version);
++  if (__sysctl (request, 2, &version, &len, NULL, 0) < 0)
++    return -1;
++    
++/*
++ *   scheme is:  <major><two digit minor>Rxx
++ *		'R' is 0 if release branch or x.0-CURRENT before RELENG_*_0
++ *		is created, otherwise 1.
++ */
++
++  /* Convert to the GLIBC versioning system */
++  return ((version / 100000) << 16)		/* major */
++	 | (((version % 100000) / 1000) << 8)   /* minor 	0 -  99 */
++	 | ((version % 200));			/* subrelease 	0 - 199 */
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/dl-sysdep.h
+@@ -0,0 +1,26 @@
++/* System-specific settings for dynamic linker code.  Linux version.
++   Copyright (C) 2005, 2008 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include_next <dl-sysdep.h>
++
++#ifndef __ASSEMBLER__
++/* Get version of the OS.  */
++extern int _dl_discover_osversion (void) attribute_hidden;
++# define HAVE_DL_DISCOVER_OSVERSION	1
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/faccessat.c
+@@ -0,0 +1,198 @@
++/* Test for access to file, relative to open directory.  Linux version.
++   Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stddef.h>
++#include <stdio.h>
++#include <string.h>
++#include <unistd.h>
++#include <sys/types.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <kernel-features.h>
++#include <sysdep.h>
++
++extern int __syscall_faccessat (int fd, const char *path, int mode, int flag);
++libc_hidden_proto (__syscall_faccessat)
++
++/*
++   The FreeBSD kernel do not test file access correctly when the 
++   process' real user ID is superuser. In particular, they always return
++   zero when testing execute permissions without regard to whether the 
++   file is executable.
++
++   While this behaviour conforms to POSIX.1-2008, it is explicitely 
++   discouraged. This wrapper implements the recommended behaviour.
++ */
++
++int
++faccessat (fd, file, mode, flag)
++     int fd;
++     const char *file;
++     int mode;
++     int flag;
++{
++# ifndef __ASSUME_ATFCTS
++  if (__have_atfcts >= 0)
++# endif
++    {
++      int result = INLINE_SYSCALL (faccessat, 4, fd, file, mode, flag);
++# ifndef __ASSUME_ATFCTS
++      if (result == -1 && errno == ENOSYS)
++	__have_atfcts = -1;
++      else
++# endif
++      {
++        if ((result == 0) && (mode & X_OK))
++        {
++          uid_t uid = (flag & AT_EACCESS) ? __geteuid () : __getuid ();
++          if (uid == 0)
++          {
++            struct stat64 stats;
++            if (fstatat64 (fd, file, &stats, flag & AT_SYMLINK_NOFOLLOW))
++              return -1;
++            if ((stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) == 0)
++            {
++              __set_errno (EACCES);
++              return -1;
++	    }
++          }
++	}
++	return result;
++      }	
++    }
++
++#ifndef __ASSUME_ATFCTS
++  if (flag & ~(AT_SYMLINK_NOFOLLOW | AT_EACCESS))
++    {
++      __set_errno (EINVAL);
++      return -1;
++    }
++
++  if ((!(flag & AT_EACCESS) || !__libc_enable_secure)
++      && !(flag & AT_SYMLINK_NOFOLLOW))
++    {
++      /* If we are not set-uid or set-gid, access does the same.  */
++      if (fd != AT_FDCWD && file[0] != '/')
++	{
++	  int mib[4];
++	  size_t kf_len = 0;
++	  char *kf_buf, *kf_bufp;
++	  size_t filelen;
++
++	  if (fd < 0)
++	    {
++	      __set_errno (EBADF);
++	      return -1;
++	    }
++
++	  filelen = strlen (file);
++	  if (__builtin_expect (filelen == 0, 0))
++	    {
++	      __set_errno (ENOENT);
++	      return -1;
++	    }
++
++	  mib[0] = CTL_KERN;
++	  mib[1] = KERN_PROC;
++	  mib[2] = KERN_PROC_FILEDESC;
++	  mib[3] = __getpid ();
++
++	  if (__sysctl (mib, 4, NULL, &kf_len, NULL, 0) != 0)
++	    {
++	      __set_errno (ENOSYS);
++	      return -1;
++	    }
++
++	  kf_buf = alloca (kf_len + filelen);
++	  if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
++	    {
++	      __set_errno (ENOSYS);
++	      return -1;
++	    }
++
++	  kf_bufp = kf_buf;
++	  while (kf_bufp < kf_buf + kf_len)
++	    {
++	      struct kinfo_file *kf =
++		(struct kinfo_file *) (uintptr_t) kf_bufp;
++
++	      if (kf->kf_fd == fd)
++		{
++		  if (kf->kf_type != KF_TYPE_VNODE ||
++		      kf->kf_vnode_type != KF_VTYPE_VDIR)
++		    {
++		      __set_errno (ENOTDIR);
++		      return -1;
++		    }
++
++		  strcat (kf->kf_path, "/");
++		  strcat (kf->kf_path, file);
++		  file = kf->kf_path;
++		  break;
++		}
++	      kf_bufp += kf->kf_structsize;
++	    }
++
++	  if (kf_bufp >= kf_buf + kf_len)
++	    {
++	      __set_errno (EBADF);
++	      return -1;
++	    }
++	}
++
++      return __access (file, mode);
++    }
++#endif
++
++  struct stat64 stats;
++  if (fstatat64 (fd, file, &stats, flag & AT_SYMLINK_NOFOLLOW))
++    return -1;
++
++  mode &= (X_OK | W_OK | R_OK);	/* Clear any bogus bits. */
++#if R_OK != S_IROTH || W_OK != S_IWOTH || X_OK != S_IXOTH
++# error Oops, portability assumptions incorrect.
++#endif
++
++  if (mode == F_OK)
++    return 0;			/* The file exists. */
++
++  uid_t uid = (flag & AT_EACCESS) ? __geteuid () : __getuid ();
++
++  /* The super-user can read and write any file, and execute any file
++     that anyone can execute. */
++  if (uid == 0 && ((mode & X_OK) == 0
++		   || (stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))))
++    return 0;
++
++  int granted = (uid == stats.st_uid
++		 ? (unsigned int) (stats.st_mode & (mode << 6)) >> 6
++		 : (stats.st_gid == ((flag & AT_EACCESS)
++				     ? __getegid () : __getgid ())
++		    || __group_member (stats.st_gid))
++		 ? (unsigned int) (stats.st_mode & (mode << 3)) >> 3
++		 : (stats.st_mode & mode));
++
++  if (granted == mode)
++    return 0;
++
++  __set_errno (EACCES);
++  return -1;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fchmodat.c
+@@ -0,0 +1,138 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stddef.h>
++#include <stdio.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sysdep.h>
++#include <sys/stat.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <kernel-features.h>
++
++extern int __syscall_fchmodat (int fd, const char *path,
++			       mode_t mode, int flag);
++libc_hidden_proto (__syscall_fchmodat)
++
++/* This is specific to kFreeBSD. */
++extern int __lchmod (__const char *__file, __mode_t __mode);
++
++int
++fchmodat (fd, file, mode, flag)
++     int fd;
++     const char *file;
++     mode_t mode;
++     int flag;
++{
++# ifndef __ASSUME_ATFCTS
++  if (__have_atfcts >= 0)
++# endif
++    {
++      int result = INLINE_SYSCALL (fchmodat, 4, fd, file, mode, flag);
++# ifndef __ASSUME_ATFCTS
++      if (result == -1 && errno == ENOSYS)
++	__have_atfcts = -1;
++      else
++# endif
++	return result;
++    }
++
++#ifndef __ASSUME_ATFCTS
++  if (flag & ~AT_SYMLINK_NOFOLLOW)
++    {
++      __set_errno (EINVAL);
++      return -1;
++    }
++
++  if (fd != AT_FDCWD && file[0] != '/')
++    {
++      int mib[4];
++      size_t kf_len = 0;
++      char *kf_buf, *kf_bufp;
++      size_t filelen;
++
++      if (fd < 0)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++
++      filelen = strlen (file);
++      if (__builtin_expect (filelen == 0, 0))
++	{
++	  __set_errno (ENOENT);
++	  return -1;
++	}
++
++      mib[0] = CTL_KERN;
++      mib[1] = KERN_PROC;
++      mib[2] = KERN_PROC_FILEDESC;
++      mib[3] = __getpid ();
++
++      if (__sysctl (mib, 4, NULL, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_buf = alloca (kf_len + filelen);
++      if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_bufp = kf_buf;
++      while (kf_bufp < kf_buf + kf_len)
++	{
++	  struct kinfo_file *kf = (struct kinfo_file *) (uintptr_t) kf_bufp;
++
++	  if (kf->kf_fd == fd)
++	    {
++	      if (kf->kf_type != KF_TYPE_VNODE ||
++		  kf->kf_vnode_type != KF_VTYPE_VDIR)
++		{
++		  __set_errno (ENOTDIR);
++		  return -1;
++		}
++
++	      strcat (kf->kf_path, "/");
++	      strcat (kf->kf_path, file);
++	      file = kf->kf_path;
++	      break;
++	    }
++	  kf_bufp += kf->kf_structsize;
++	}
++
++      if (kf_bufp >= kf_buf + kf_len)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++    }
++
++  if (flag & AT_SYMLINK_NOFOLLOW)
++    return __lchmod(file, mode);
++  else
++    return __chmod(file, mode);
++#endif
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fchownat.c
+@@ -0,0 +1,137 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stddef.h>
++#include <stdio.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sysdep.h>
++#include <unistd.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <kernel-features.h>
++
++extern int __syscall_fchownat (int fd, const char *path, uid_t uid,
++			       gid_t gid, int flag);
++libc_hidden_proto (__syscall_fchownat)
++
++/* Change the owner and group of FILE.  */
++int
++fchownat (fd, file, owner, group, flag)
++     int fd;
++     const char *file;
++     uid_t owner;
++     gid_t group;
++     int flag;
++{
++# ifndef __ASSUME_ATFCTS
++  if (__have_atfcts >= 0)
++# endif
++    {
++      int result = INLINE_SYSCALL (fchownat, 5, fd, file, owner, group, flag);
++# ifndef __ASSUME_ATFCTS
++      if (result == -1 && errno == ENOSYS)
++	__have_atfcts = -1;
++      else
++# endif
++	return result;
++    }
++
++#ifndef __ASSUME_ATFCTS
++  if (flag & ~AT_SYMLINK_NOFOLLOW)
++    {
++      __set_errno (EINVAL);
++      return -1;
++    }
++
++  if (fd != AT_FDCWD && file[0] != '/')
++    {
++      int mib[4];
++      size_t kf_len = 0;
++      char *kf_buf, *kf_bufp;
++      size_t filelen;
++
++      if (fd < 0)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++
++      filelen = strlen (file);
++      if (__builtin_expect (filelen == 0, 0))
++	{
++	  __set_errno (ENOENT);
++	  return -1;
++	}
++
++      mib[0] = CTL_KERN;
++      mib[1] = KERN_PROC;
++      mib[2] = KERN_PROC_FILEDESC;
++      mib[3] = __getpid ();
++
++      if (__sysctl (mib, 4, NULL, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_buf = alloca (kf_len + filelen);
++      if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_bufp = kf_buf;
++      while (kf_bufp < kf_buf + kf_len)
++	{
++	  struct kinfo_file *kf = (struct kinfo_file *) (uintptr_t) kf_bufp;
++
++	  if (kf->kf_fd == fd)
++	    {
++	      if (kf->kf_type != KF_TYPE_VNODE ||
++		  kf->kf_vnode_type != KF_VTYPE_VDIR)
++		{
++		  __set_errno (ENOTDIR);
++		  return -1;
++		}
++
++	      strcat (kf->kf_path, "/");
++	      strcat (kf->kf_path, file);
++	      file = kf->kf_path;
++	      break;
++	    }
++	  kf_bufp += kf->kf_structsize;
++	}
++
++      if (kf_bufp >= kf_buf + kf_len)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++    }
++
++  if (flag & AT_SYMLINK_NOFOLLOW)
++    return __lchown(file, owner, group);
++  else
++    return __chown(file, owner, group);
++#endif
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fcntl.c
+@@ -0,0 +1,69 @@
++/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <assert.h>
++#include <errno.h>
++#include <sysdep-cancel.h>	/* Must come before <fcntl.h>.  */
++#include <fcntl.h>
++#include <stdarg.h>
++
++#include <sys/syscall.h>
++
++
++#ifndef NO_CANCELLATION
++int
++__fcntl_nocancel (int fd, int cmd, ...)
++{
++  va_list ap;
++  void *arg;
++
++  va_start (ap, cmd);
++  arg = va_arg (ap, void *);
++  va_end (ap);
++
++  return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
++}
++#endif
++
++
++int
++__libc_fcntl (int fd, int cmd, ...)
++{
++  va_list ap;
++  void *arg;
++
++  va_start (ap, cmd);
++  arg = va_arg (ap, void *);
++  va_end (ap);
++
++  if (SINGLE_THREAD_P || cmd != F_SETLKW)
++    return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
++
++  int oldtype = LIBC_CANCEL_ASYNC ();
++
++  int result = INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
++
++  LIBC_CANCEL_RESET (oldtype);
++
++  return result;
++}
++libc_hidden_def (__libc_fcntl)
++
++weak_alias (__libc_fcntl, __fcntl)
++libc_hidden_weak (__fcntl)
++weak_alias (__libc_fcntl, fcntl)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fexecve.c
+@@ -0,0 +1,103 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stddef.h>
++#include <stdio.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sysdep.h>
++#include <unistd.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <kernel-features.h>
++
++extern int __syscall_fexecve (int fd, char *const argv[], char *const envp[]);
++libc_hidden_proto (__syscall_fexecve);
++
++/* Execute the file FD refers to, overlaying the running program image.
++   ARGV and ENVP are passed to the new program, as for `execve'.  */
++int
++fexecve (fd, argv, envp)
++     int fd;
++     char *const argv[];
++     char *const envp[];
++{
++# ifndef __ASSUME_ATFCTS
++  if (__have_atfcts >= 0)
++# endif
++    {
++      int result = INLINE_SYSCALL (fexecve, 3, fd, argv, envp);
++# ifndef __ASSUME_ATFCTS
++      if (result == -1 && errno == ENOSYS)
++	__have_atfcts = -1;
++      else
++# endif
++	return result;
++    }
++
++#ifndef __ASSUME_ATFCTS
++  if (fd < 0 || argv == NULL || envp == NULL)
++    {
++      __set_errno (EINVAL);
++      return -1;
++    }
++
++  int mib[4];
++  size_t kf_len = 0;
++  char *kf_buf, *kf_bufp;
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC;
++  mib[2] = KERN_PROC_FILEDESC;
++  mib[3] = __getpid ();
++
++  if (__sysctl (mib, 4, NULL, &kf_len, NULL, 0) != 0)
++    {
++      __set_errno (ENOSYS);
++      return -1;
++    }
++
++  kf_buf = alloca (kf_len);
++  if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
++    {
++      __set_errno (ENOSYS);
++      return -1;
++    }
++
++  kf_bufp = kf_buf;
++  while (kf_bufp < kf_buf + kf_len)
++    {
++      struct kinfo_file *kf = (struct kinfo_file *) (uintptr_t) kf_bufp;
++
++      if (kf->kf_fd == fd)
++	{
++	  if (kf->kf_type == KF_TYPE_VNODE &&
++	      kf->kf_vnode_type == KF_VTYPE_VREG)
++	    return __execve (kf->kf_path, argv, envp);
++	  break;
++	}
++      kf_bufp += kf->kf_structsize;
++    }
++
++  __set_errno (EINVAL);
++  return -1;
++#endif
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fhstat.c
+@@ -0,0 +1,40 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/mount.h>
++#include <sys/stat.h>
++#include <sysdep.h>
++
++#include "stat16conv.c"
++
++int
++__fhstat (const fhandle_t *fhp, struct stat *buf)
++{
++  struct stat16 buf16;
++
++  if (__syscall_fhstat (fhp, &buf16) < 0)
++    return -1;
++
++  /* Convert a 'struct stat16' to 'struct stat'.  */
++  stat16_to_stat (&buf16, buf);
++
++  return 0;
++}
++
++weak_alias (__fhstat, fhstat)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fhstat64.c
+@@ -0,0 +1,38 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/mount.h>
++#include <sys/stat.h>
++#include <sysdep.h>
++
++#include "stat16conv.c"
++
++int
++fhstat64 (const fhandle_t *fhp, struct stat64 *buf)
++{
++  struct stat16 buf16;
++
++  if (__syscall_fhstat (fhp, &buf16) < 0)
++    return -1;
++
++  /* Convert a 'struct stat16' to 'struct stat64'.  */
++  stat16_to_stat64 (&buf16, buf);
++
++  return 0;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fhstatfs.c
+@@ -0,0 +1,35 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Petr Salinger, 2006.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/mount.h>
++
++#include "statfsconv.c"
++
++int
++fhstatfs (const fhandle_t *fhp, struct statfs *buf)
++{
++  struct statfs_fbsd5 kbuf;
++
++  if (__syscall_fhstatfs (fhp, &kbuf) < 0)
++    return -1;
++
++  statfs5_to_statfs (&kbuf, buf);
++
++  return 0;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fhstatfs64.c
+@@ -0,0 +1,36 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/mount.h>
++
++#include "statfsconv.c"
++
++int
++fhstatfs64 (const fhandle_t *fhp, struct statfs64 *buf)
++{
++  struct statfs_fbsd5 kbuf;
++
++  if (__syscall_fhstatfs (fhp, &kbuf) < 0)
++    return -1;
++
++  /* Convert a 'struct statfs' to 'struct statfs64'.  */
++  statfs5_to_statfs64 (&kbuf, buf);
++
++  return 0;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fstatfs.c
+@@ -0,0 +1,38 @@
++/* Return information about the filesystem on which FD resides.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Petr Salinger, 2006.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/statfs.h>
++
++#include "statfsconv.c"
++
++/* Return information about the filesystem on which FD resides.  */
++int
++__fstatfs (int fd, struct statfs *buf)
++{
++  struct statfs_fbsd5 kbuf;
++
++  if (__syscall_fstatfs (fd, &kbuf) < 0)
++    return -1;
++
++  statfs5_to_statfs (&kbuf, buf);
++
++  return 0;
++}
++weak_alias (__fstatfs, fstatfs)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fstatfs64.c
+@@ -0,0 +1,40 @@
++/* Return information about the filesystem on which FD resides.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/statfs.h>
++
++#include "statfsconv.c"
++
++/* Return information about the filesystem on which FD resides.  */
++int
++__fstatfs64 (int fd, struct statfs64 *buf)
++{
++  struct statfs_fbsd5 kbuf;
++
++  if (__syscall_fstatfs (fd, &kbuf) < 0)
++    return -1;
++
++  /* Convert a 'struct statfs' to 'struct statfs64'.  */
++  statfs5_to_statfs64 (&kbuf, buf);
++
++  return 0;
++}
++
++weak_alias (__fstatfs64, fstatfs64)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fstatvfs.c
+@@ -0,0 +1,40 @@
++/* Return information about the filesystem on which FD resides.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/statvfs.h>
++#include <sys/statfs.h>
++
++#include "statfsconv.c"
++
++/* Return information about the filesystem on which FD resides.  */
++int
++fstatvfs (int fd, struct statvfs *buf)
++{
++  struct statfs_fbsd5 kbuf;
++
++  if (__syscall_fstatfs (fd, &kbuf) < 0)
++    return -1;
++
++  /* Convert a 'struct statfs' to 'struct statvfs'.  */
++  statfs5_to_statvfs (&kbuf, buf);
++
++  return 0;
++}
++libc_hidden_def (fstatvfs)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fstatvfs64.c
+@@ -0,0 +1,41 @@
++/* Return information about the filesystem on which FD resides.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/statvfs.h>
++#include <sys/statfs.h>
++
++#include "statfsconv.c"
++
++/* Return information about the filesystem on which FD resides.  */
++int
++__fstatvfs64 (int fd, struct statvfs64 *buf)
++{
++  struct statfs_fbsd5 kbuf;
++
++  if (__syscall_fstatfs (fd, &kbuf) < 0)
++    return -1;
++
++  /* Convert a 'struct statfs' to 'struct statvfs64'.  */
++  statfs5_to_statvfs64 (&kbuf, buf);
++
++  return 0;
++}
++
++weak_alias (__fstatvfs64, fstatvfs64)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ftruncate.c
+@@ -0,0 +1,52 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <unistd.h>
++#include <sys/types.h>
++#include <sysdep.h>
++#include <errno.h>
++
++extern int __syscall_ftruncate (int __fd, __off_t __length) __THROW;
++libc_hidden_proto (__syscall_ftruncate)
++extern int __syscall_freebsd6_ftruncate (int __fd, int __unused1,
++				__off_t __length) __THROW;
++libc_hidden_proto (__syscall_freebsd6_ftruncate)
++
++int
++__ftruncate (int fd, __off_t length)
++{
++  int result;
++
++  /* First try the new syscall. */
++  result = INLINE_SYSCALL (ftruncate, 2, fd, length);
++
++#ifndef __ASSUME_TRUNCATE_SYSCALL
++  if (result == -1 && errno == ENOSYS)
++    /* New syscall not available, us the old one. */
++    result = INLINE_SYSCALL (freebsd6_ftruncate, 3, fd, 0, length);
++#endif
++
++  return result;
++}
++
++weak_alias (__ftruncate, ftruncate)
++
++/* 'ftruncate64' is the same as 'ftruncate', because __off64_t == __off_t.  */
++strong_alias (__ftruncate, __ftruncate64)
++weak_alias (__ftruncate64, ftruncate64)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ftruncate64.c
+@@ -0,0 +1 @@
++/* 'ftruncate64' is the same as 'ftruncate', because __off64_t == __off_t.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/futimesat.c
+@@ -0,0 +1,138 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stddef.h>
++#include <stdio.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sysdep.h>
++#include <sys/time.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <kernel-features.h>
++
++extern int __syscall_futimesat (int fd, const char *path,
++				const struct timeval *times);
++libc_hidden_proto (__syscall_futimesat)
++
++/* Change the access time of FILE relative to FD to TVP[0] and
++   the modification time of FILE to TVP[1].  */
++int
++futimesat (fd, file, tvp)
++     int fd;
++     const char *file;
++     const struct timeval tvp[2];
++{
++# ifndef __ASSUME_ATFCTS
++  if (__have_atfcts >= 0)
++# endif
++    {
++      int result;
++
++      if (file == NULL)
++	return __futimes (fd, tvp);
++
++      result = INLINE_SYSCALL (futimesat, 3, fd, file, tvp);
++# ifndef __ASSUME_ATFCTS
++      if (result == -1 && errno == ENOSYS)
++	__have_atfcts = -1;
++      else
++# endif
++	return result;
++    }
++
++#ifndef __ASSUME_ATFCTS
++  if ((file == NULL) || (fd != AT_FDCWD && file[0] != '/'))
++    {
++      int mib[4];
++      size_t kf_len = 0;
++      char *kf_buf, *kf_bufp;
++      size_t filelen;
++
++      if (fd < 0)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++
++      filelen = strlen (file);
++      if (__builtin_expect (filelen == 0, 0))
++	{
++	  __set_errno (ENOENT);
++	  return -1;
++	}
++
++      mib[0] = CTL_KERN;
++      mib[1] = KERN_PROC;
++      mib[2] = KERN_PROC_FILEDESC;
++      mib[3] = __getpid ();
++
++      if (__sysctl (mib, 4, NULL, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      if (file == NULL)
++	kf_buf = alloca (kf_len);
++      else
++	kf_buf = alloca (kf_len + filelen);
++
++      if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_bufp = kf_buf;
++      while (kf_bufp < kf_buf + kf_len)
++	{
++	  struct kinfo_file *kf = (struct kinfo_file *) (uintptr_t) kf_bufp;
++
++	  if (kf->kf_fd == fd)
++	    {
++	      if (kf->kf_type != KF_TYPE_VNODE ||
++		  kf->kf_vnode_type != KF_VTYPE_VDIR)
++		{
++		  __set_errno (ENOTDIR);
++		  return -1;
++		}
++	      if (file != NULL)
++		{
++		  strcat (kf->kf_path, "/");
++		  strcat (kf->kf_path, file);
++		}
++	      file = kf->kf_path;
++	      break;
++	    }
++	  kf_bufp += kf->kf_structsize;
++	}
++
++      if (kf_bufp >= kf_buf + kf_len)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++    }
++
++  return __utimes(file, tvp);
++#endif
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fxstat.c
+@@ -0,0 +1,48 @@
++/* fxstat using FreeBSD fstat, nfstat system calls.
++   Copyright (C) 1991,1995-1997,2000,2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <stddef.h>
++#include <sys/stat.h>
++#include <bp-checks.h>
++
++#include "stat16conv.c"
++
++int
++__fxstat (int vers, int fd, struct stat *buf)
++{
++  if (__builtin_expect (vers == _STAT_VER, 1))
++    {
++      struct stat16 buf16;
++      int result = __syscall_fstat (fd, __ptrvalue (&buf16));
++      if (result == 0)
++	stat16_to_stat (&buf16, buf);
++      return result;
++    }
++  else if (__builtin_expect (vers == _STAT_VER_stat, 1))
++    return __syscall_fstat (fd, CHECK_1 ((struct stat16 *) buf));
++  else
++    {
++      __set_errno (EINVAL);
++      return -1;
++    }
++}
++hidden_def (__fxstat)
++
++weak_alias (__fxstat, _fxstat)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fxstat64.c
+@@ -0,0 +1,44 @@
++/* fxstat using FreeBSD fstat, nfstat system calls.
++   Copyright (C) 1991,1995-1997,2000,2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <stddef.h>
++#include <sys/stat.h>
++#include <bp-checks.h>
++
++#include "stat16conv.c"
++
++int
++__fxstat64 (int vers, int fd, struct stat64 *buf)
++{
++  if (__builtin_expect (vers == _STAT_VER, 1))
++    {
++      struct stat16 buf16;
++      int result = __syscall_fstat (fd, __ptrvalue (&buf16));
++      if (result == 0)
++	stat16_to_stat64 (&buf16, buf);
++      return result;
++    }
++  else
++    {
++      __set_errno (EINVAL);
++      return -1;
++    }
++}
++hidden_def (__fxstat64)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fxstatat.c
+@@ -0,0 +1,158 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stddef.h>
++#include <stdio.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sysdep.h>
++#include <sys/stat.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <kernel-features.h>
++#include <bp-checks.h>
++
++#include "stat16conv.c"
++
++extern int __syscall_fstatat (int fd, const char *path,
++			      struct stat16 *buf, int flag);
++libc_hidden_proto (__syscall_fstatat)
++
++/* Get information about the file NAME relative to FD in ST.  */
++int
++__fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
++{
++# ifndef __ASSUME_ATFCTS
++  if (__have_atfcts >= 0)
++# endif
++    {
++      int result;
++
++      if (__builtin_expect (vers == _STAT_VER, 1))
++	{
++	  struct stat16 buf16;
++	  result =
++	    INLINE_SYSCALL (fstatat, 4, fd, CHECK_STRING (file),
++			    __ptrvalue (&buf16), flag);
++	  if (result == 0)
++	    stat16_to_stat (&buf16, st);
++	}
++      else if (__builtin_expect (vers == _STAT_VER_stat, 1))
++	{
++	  result =
++	    INLINE_SYSCALL (fstatat, 4, fd, CHECK_STRING (file),
++			    CHECK_1 ((struct stat16 *) st), flag);
++	}
++      else
++	{
++	  __set_errno (EINVAL);
++	  return -1;
++	}
++# ifndef __ASSUME_ATFCTS
++      if (result == -1 && errno == ENOSYS)
++	__have_atfcts = -1;
++      else
++# endif
++	return result;
++    }
++
++#ifndef __ASSUME_ATFCTS
++  if (flag & ~AT_SYMLINK_NOFOLLOW)
++    {
++      __set_errno (EINVAL);
++      return -1;
++    }
++
++  if (fd != AT_FDCWD && file[0] != '/')
++    {
++      int mib[4];
++      size_t kf_len = 0;
++      char *kf_buf, *kf_bufp;
++      size_t filelen;
++
++      if (fd < 0)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++
++      filelen = strlen (file);
++      if (__builtin_expect (filelen == 0, 0))
++	{
++	  __set_errno (ENOENT);
++	  return -1;
++	}
++
++      mib[0] = CTL_KERN;
++      mib[1] = KERN_PROC;
++      mib[2] = KERN_PROC_FILEDESC;
++      mib[3] = __getpid ();
++
++      if (__sysctl (mib, 4, NULL, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_buf = alloca (kf_len + filelen);
++      if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_bufp = kf_buf;
++      while (kf_bufp < kf_buf + kf_len)
++	{
++	  struct kinfo_file *kf = (struct kinfo_file *) (uintptr_t) kf_bufp;
++
++	  if (kf->kf_fd == fd)
++	    {
++	      if (kf->kf_type != KF_TYPE_VNODE ||
++		  kf->kf_vnode_type != KF_VTYPE_VDIR)
++		{
++		  __set_errno (ENOTDIR);
++		  return -1;
++		}
++
++	      strcat (kf->kf_path, "/");
++	      strcat (kf->kf_path, file);
++	      file = kf->kf_path;
++	      break;
++	    }
++	  kf_bufp += kf->kf_structsize;
++	}
++
++      if (kf_bufp >= kf_buf + kf_len)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++    }
++
++  if (flag & AT_SYMLINK_NOFOLLOW)
++    return __lxstat (vers, file, st);
++  else
++    return __xstat (vers, file, st);
++#endif
++}
++
++libc_hidden_def (__fxstatat)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fxstatat64.c
+@@ -0,0 +1,152 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stddef.h>
++#include <stdio.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sysdep.h>
++#include <sys/stat.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <kernel-features.h>
++#include <bp-checks.h>
++
++#include "stat16conv.c"
++
++extern int __syscall_fstatat (int fd, const char *path,
++			      struct stat16 *buf, int flag);
++libc_hidden_proto (__syscall_fstatat)
++
++/* Get information about the file NAME relative to FD in ST.  */
++int
++__fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
++{
++# ifndef __ASSUME_ATFCTS
++  if (__have_atfcts >= 0)
++# endif
++    {
++      int result;
++
++      if (__builtin_expect (vers == _STAT_VER, 1))
++	{
++	  struct stat16 buf16;
++	  result =
++	    INLINE_SYSCALL (fstatat, 4, fd, CHECK_STRING (file),
++			    __ptrvalue (&buf16), flag);
++	  if (result == 0)
++	    stat16_to_stat64 (&buf16, st);
++	}
++      else
++	{
++	  __set_errno (EINVAL);
++	  return -1;
++	}
++# ifndef __ASSUME_ATFCTS
++      if (result == -1 && errno == ENOSYS)
++	__have_atfcts = -1;
++      else
++# endif
++	return result;
++    }
++
++#ifndef __ASSUME_ATFCTS
++  if (flag & ~AT_SYMLINK_NOFOLLOW)
++    {
++      __set_errno (EINVAL);
++      return -1;
++    }
++
++  if (fd != AT_FDCWD && file[0] != '/')
++    {
++      int mib[4];
++      size_t kf_len = 0;
++      char *kf_buf, *kf_bufp;
++      size_t filelen;
++
++      if (fd < 0)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++
++      filelen = strlen (file);
++      if (__builtin_expect (filelen == 0, 0))
++	{
++	  __set_errno (ENOENT);
++	  return -1;
++	}
++
++      mib[0] = CTL_KERN;
++      mib[1] = KERN_PROC;
++      mib[2] = KERN_PROC_FILEDESC;
++      mib[3] = __getpid ();
++
++      if (__sysctl (mib, 4, NULL, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_buf = alloca (kf_len + filelen);
++      if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_bufp = kf_buf;
++      while (kf_bufp < kf_buf + kf_len)
++	{
++	  struct kinfo_file *kf = (struct kinfo_file *) (uintptr_t) kf_bufp;
++
++	  if (kf->kf_fd == fd)
++	    {
++	      if (kf->kf_type != KF_TYPE_VNODE ||
++		  kf->kf_vnode_type != KF_VTYPE_VDIR)
++		{
++		  __set_errno (ENOTDIR);
++		  return -1;
++		}
++
++	      strcat (kf->kf_path, "/");
++	      strcat (kf->kf_path, file);
++	      file = kf->kf_path;
++	      break;
++	    }
++	  kf_bufp += kf->kf_structsize;
++	}
++
++      if (kf_bufp >= kf_buf + kf_len)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++    }
++
++  if (flag & AT_SYMLINK_NOFOLLOW)
++    return __lxstat64 (vers, file, st);
++  else
++    return __xstat64 (vers, file, st);
++#endif
++}
++
++libc_hidden_def (__fxstatat64)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getcwd.c
+@@ -0,0 +1,91 @@
++/* Determine current working directory.  FreeBSD version.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <limits.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++
++#include <sysdep.h>
++#include <bp-checks.h>
++
++/* The system calls only makes a lookup in the VFS cache, which can easily
++   fail.  Therefore we use the generic version as a fallback.  */
++extern int __syscall_getcwd (char *__unbounded buf, unsigned int size);
++libc_hidden_proto (__syscall_getcwd)
++
++static char *generic_getcwd (char *buf, size_t size) internal_function;
++
++char *
++__getcwd (char *buf, size_t size)
++{
++  char tmpbuf[PATH_MAX];
++
++  if (INLINE_SYSCALL (getcwd, 2, tmpbuf, PATH_MAX) >= 0)
++    {
++      size_t len = strlen (tmpbuf) + 1;
++
++      if (size == 0)
++	{
++	  if (__builtin_expect (buf != NULL, 0))
++	    {
++	      __set_errno (EINVAL);
++	      return NULL;
++	    }
++
++	  buf = (char *) malloc (len);
++	  if (__builtin_expect (buf == NULL, 0))
++	    {
++	      __set_errno (ENOMEM);
++	      return NULL;
++	    }
++	}
++      else
++	{
++	  if (size < len)
++	    {
++	      __set_errno (ERANGE);
++	      return NULL;
++	    }
++
++	  if (buf == NULL)
++	    {
++	      buf = (char *) malloc (size);
++	      if (__builtin_expect (buf == NULL, 0))
++		{
++		  __set_errno (ENOMEM);
++		  return NULL;
++		}
++	    }
++	}
++
++      memcpy (buf, tmpbuf, len);
++      return buf;
++    }
++  return generic_getcwd (buf, size);
++}
++
++weak_alias (__getcwd, getcwd)
++
++/* Get the code for the generic version.  */
++#define GETCWD_RETURN_TYPE	static char * internal_function
++#define __getcwd		generic_getcwd
++#include <sysdeps/posix/getcwd.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getdents.c
+@@ -0,0 +1,90 @@
++/* Read directory entries, 3 argument function.  FreeBSD version.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <dirent.h>
++#include <sys/types.h>
++#include <errno.h>
++#include <sysdep.h>
++
++#if 1
++
++/* Use the 3-argument system call.  */
++
++extern int __syscall_getdents (int fd, char *buf, size_t nbytes);
++libc_hidden_proto (__syscall_getdents)
++
++/* Read directory entries from FD into BUF, reading at most NBYTES.
++   Returns the number of bytes read; zero when at end of directory; or
++   -1 for errors.  */
++ssize_t
++internal_function
++__getdents (int fd, char *buf, size_t nbytes)
++{
++  return __syscall_getdents (fd, buf, nbytes);
++}
++
++/* Export getdents().  Not an internal_function.  */
++ssize_t
++getdents (int fd, char *buf, size_t nbytes)
++{
++  return __syscall_getdents (fd, buf, nbytes);
++}
++
++#else
++
++/* Use the 4-argument system call.  */
++
++extern int __syscall_getdirentries (int fd, char *buf, unsigned int nbytes,
++				    long *basep);
++
++/* Read directory entries from FD into BUF, reading at most NBYTES.
++   Returns the number of bytes read; zero when at end of directory; or
++   -1 for errors.  */
++ssize_t
++internal_function
++__getdents (int fd, char *buf, size_t nbytes)
++{
++  /* On 64-bit platforms, the system call differs from this function
++     because it takes an 'unsigned int', not a 'size_t'.  */
++  unsigned int nbytes32;
++
++  nbytes32 = nbytes;
++  if (nbytes32 == nbytes)
++    return __syscall_getdirentries (fd, buf, nbytes32, NULL);
++  else
++    {
++      /* NBYTES is too large.  */
++      __set_errno (EINVAL);
++      return -1;
++    }
++}
++
++/* Export getdents().  Not an internal_function.  */
++ssize_t
++getdents (int fd, char *buf, size_t nbytes)
++{
++  return __getdents (fd, buf, nbytes);
++}
++
++#endif
++
++/* Since 'struct dirent64' == 'struct dirent', the functions '__getdents64'
++   and '__getdents' are equal.  */
++strong_alias (__getdents, __getdents64)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getdents64.c
+@@ -0,0 +1 @@
++/* We have the function getdirentries64 in file getdirentries64.c.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getdirentries.c
+@@ -0,0 +1,100 @@
++/* Read directory entries, 4 argument function.  FreeBSD version.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef GETDIRENTRIES
++# define GETDIRENTRIES getdirentries
++# define OFF_T off_t
++#endif
++
++#include <dirent.h>
++#include <sys/types.h>
++#include <unistd.h>
++#include <errno.h>
++#include <sysdep.h>
++
++#if 1
++
++/* Use the 4-argument system call.  */
++
++extern int __syscall_getdirentries (int fd, char *buf, unsigned int nbytes,
++				    long *basep);
++
++/* Read directory entries from FD into BUF, reading at most NBYTES.
++   Reading starts at offset *BASEP, and *BASEP is updated with the new
++   position after reading.  Returns the number of bytes read; zero when at
++   end of directory; or -1 for errors.  */
++/* FIXME: This is not what this function does.  It starts reading at the
++   current position of FD, not at *BASEP.  */
++ssize_t
++GETDIRENTRIES (int fd, char *buf, size_t nbytes, OFF_T *basep)
++{
++  /* On 32-bit platforms, the system call differs from this function because
++     it takes a 'long *', not an 'OFF_T *'.  On 64-bit platforms, the system
++     call differs from this function because it takes an 'unsigned int', not
++     a 'size_t'.  */
++  unsigned int nbytes32;
++
++  nbytes32 = nbytes;
++  if (nbytes32 == nbytes)
++    {
++      long base;
++      int result = __syscall_getdirentries (fd, buf, nbytes32, &base);
++
++      if (result >= 0 && basep != NULL)
++	*basep = base;
++      return result;
++    }
++  else
++    {
++      /* NBYTES is too large.  */
++      __set_errno (EINVAL);
++      return -1;
++    }
++}
++
++#else
++
++/* Use the 3-argument system call.  */
++
++extern int __syscall_getdents (int fd, char *buf, size_t nbytes);
++
++/* Read directory entries from FD into BUF, reading at most NBYTES.
++   Reading starts at offset *BASEP, and *BASEP is updated with the new
++   position after reading.  Returns the number of bytes read; zero when at
++   end of directory; or -1 for errors.  */
++/* FIXME: This is not what this function does.  It starts reading at the
++   current position of FD, not at *BASEP.  */
++ssize_t
++GETDIRENTRIES (int fd, char *buf, size_t nbytes, OFF_T *basep)
++{
++  OFF_T base = 0;
++  ssize_t result;
++
++  if (basep)
++    base = __lseek (fd, (off_t) 0, SEEK_CUR);
++
++  result = __syscall_getdents (fd, buf, nbytes);
++
++  if (basep && result >= 0)
++    *basep = base;
++  return result;
++}
++
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getdirentries64.c
+@@ -0,0 +1,5 @@
++/* Since 'struct dirent64' == 'struct dirent', the functions 'getdirentries64'
++   and 'getdirentries' differ only in the type of the BASEP argument.  */
++#define GETDIRENTRIES getdirentries64
++#define OFF_T off64_t
++#include <getdirentries.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getdomain.c
+@@ -0,0 +1,50 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <unistd.h>
++#include <sys/sysctl.h>
++#include <errno.h>
++
++/* Put the name of the current domain in no more than LEN bytes of NAME.
++   The result is null-terminated if LEN is large enough for the full
++   name and the terminator.  */
++
++int
++getdomainname (char *name, size_t len)
++{
++  /* Fetch the "kern.domainname" sysctl value.  */
++  int request[2] = { CTL_KERN, KERN_NISDOMAINNAME };
++  size_t result_len = len;
++
++  if (__sysctl (request, 2, name, &result_len, NULL, 0) < 0)
++    {
++      if (errno == ENOMEM)
++	__set_errno (ENAMETOOLONG);
++      return -1;
++    }
++
++  if (result_len >= len)
++    {
++      __set_errno (ENAMETOOLONG);
++      return -1;
++    }
++
++  name[result_len] = '\0';
++  return 0;
++}
++libc_hidden_def (getdomainname)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getfsstat.c
+@@ -0,0 +1,49 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Petr Salinger, 2006.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/mount.h>
++#include <alloca.h>
++
++#include "statfsconv.c"
++
++int
++__getfsstat (struct statfs *buf, long bufsize, int flags)
++{
++  long bufcount;
++  struct statfs_fbsd5 *tmpbuf;
++  int count, i;
++
++  if (bufsize < 0)
++    bufsize = 0;
++  bufcount = bufsize / sizeof (struct statfs);
++
++  if ((bufcount == 0) || (buf == NULL))
++    tmpbuf = NULL;
++  else
++    tmpbuf = alloca(bufcount * sizeof (struct statfs_fbsd5));
++
++  count = __syscall_getfsstat (tmpbuf, bufcount * sizeof (struct statfs_fbsd5), flags);
++  if (tmpbuf && count > 0)
++    for (i = count - 1; i >= 0; i--)
++      statfs5_to_statfs (&tmpbuf[i], &buf[i]);
++
++  return count;
++}
++
++weak_alias (__getfsstat, getfsstat)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getfsstat64.c
+@@ -0,0 +1,49 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/mount.h>
++#include <alloca.h>
++
++#include "statfsconv.c"
++
++int
++__getfsstat64 (struct statfs64 *buf, long bufsize, int flags)
++{
++  long bufcount;
++  struct statfs_fbsd5 *tmpbuf;
++  int count, i;
++
++  if (bufsize < 0)
++    bufsize = 0;
++  bufcount = bufsize / sizeof (struct statfs64);
++
++  if ((bufcount == 0) || (buf == NULL))
++    tmpbuf = NULL;
++  else
++    tmpbuf = alloca(bufcount * sizeof (struct statfs_fbsd5));
++
++  count = __syscall_getfsstat (tmpbuf, bufcount * sizeof (struct statfs_fbsd5), flags);
++  if (tmpbuf && count > 0)
++    for (i = count - 1; i >= 0; i--)
++      statfs5_to_statfs64 (&tmpbuf[i], &buf[i]);
++
++  return count;
++}
++
++weak_alias (__getfsstat64, getfsstat64)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/gethostid.c
+@@ -0,0 +1,37 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <unistd.h>
++#include <sys/sysctl.h>
++
++/* Return the current machine's Internet number.  */
++long int
++gethostid (void)
++{
++  /* Fetch sysctl value of "kern.hostid".  */
++  int request[2] = { CTL_KERN, KERN_HOSTID };
++  int result;
++  size_t result_len = sizeof (result);
++
++  if (__sysctl (request, 2, &result, &result_len, NULL, 0) < 0)
++    /* Dummy result.  */
++    return 0;
++
++  return result;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/gethostname.c
+@@ -0,0 +1,52 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <unistd.h>
++#include <sys/sysctl.h>
++#include <errno.h>
++
++/* Put the name of the current host in no more than LEN bytes of NAME.
++   The result is null-terminated if LEN is large enough for the full
++   name and the terminator.  */
++
++int
++__gethostname (char *name, size_t len)
++{
++  /* Fetch the "kern.hostname" sysctl value.  */
++  int request[2] = { CTL_KERN, KERN_HOSTNAME };
++  size_t result_len = len;
++
++  if (__sysctl (request, 2, name, &result_len, NULL, 0) < 0)
++    {
++      if (errno == ENOMEM)
++	__set_errno (ENAMETOOLONG);
++      return -1;
++    }
++
++  if (result_len >= len)
++    {
++      __set_errno (ENAMETOOLONG);
++      return -1;
++    }
++
++  name[result_len] = '\0';
++  return 0;
++}
++
++weak_alias (__gethostname, gethostname)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getloadavg.c
+@@ -0,0 +1,53 @@
++/* Get system load averages.  FreeBSD version.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <stdlib.h>
++#include <sys/sysctl.h>
++
++struct loadavg
++  {
++    unsigned int ldavg[3];
++    long fscale;
++  };
++
++/* Put the 1 minute, 5 minute and 15 minute load averages into the first
++   NELEM elements of LOADAVG.  Return the number written (never more than
++   three, but may be less than NELEM), or -1 if an error occurred.  */
++int
++getloadavg (double loadavg[], int nelem)
++{
++  if (nelem > 3)
++    nelem = 3;
++  if (nelem > 0)
++    {
++      /* Fetch the "vm.loadavg" sysctl value.  */
++      int request[2] = { CTL_VM, VM_LOADAVG };
++      struct loadavg result;
++      size_t result_len = sizeof (result);
++      int i;
++
++      if (__sysctl (request, 2, &result, &result_len, NULL, 0) < 0)
++	return -1;
++
++      for (i = 0; i < nelem; i++)
++	loadavg[i] = (double) result.ldavg[i] / (double) result.fscale;
++    }
++  return nelem;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getlogin.c
+@@ -0,0 +1,50 @@
++/* Non-reentrant function to return the current login name.  FreeBSD version.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++#include <sys/param.h>
++#include <sysdep.h>
++
++/* Defined in getlogin_r.c.  */
++extern char *__getlogin_cache;
++extern char __getlogin_cache_room[MAXLOGNAME];
++
++extern int __syscall_getlogin (char *__name, size_t __name_len);
++libc_hidden_proto (__syscall_getlogin)
++
++/* Return the login name of the user, or NULL if it can't be determined.
++   The returned pointer, if not NULL, is good only until the next call.  */
++
++char *
++getlogin (void)
++{
++  if (__getlogin_cache == NULL)
++    {
++      if (INLINE_SYSCALL (getlogin, 2, __getlogin_cache_room, MAXLOGNAME) < 0)
++	return NULL;
++      /* The system call should return a NULL terminated name.  */
++      if (__memchr (__getlogin_cache_room, '\0', MAXLOGNAME) == NULL)
++	abort ();
++      __getlogin_cache = __getlogin_cache_room;
++    }
++  return (__getlogin_cache[0] ? __getlogin_cache : NULL);
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getlogin_r.c
+@@ -0,0 +1,70 @@
++/* Reentrant function to return the current login name.  FreeBSD version.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++#include <sys/param.h>
++#include <sysdep.h>
++
++/* Cache the system call's return value.  */
++char *__getlogin_cache;
++/* The kernel never returns more than MAXLOGNAME bytes, therefore we don't
++   need more than that either.  */
++char __getlogin_cache_room[MAXLOGNAME];
++
++extern int __syscall_getlogin (char *__name, size_t __name_len);
++libc_hidden_proto (__syscall_getlogin)
++
++/* Return at most NAME_LEN characters of the login name of the user in NAME.
++   If it cannot be determined or some other error occurred, return the error
++   code.  Otherwise return 0.
++   Note that the getlogin_r function in FreeBSD libc returns a 'char *',
++   but SUSV2 wants a return type of 'int'.  */
++
++int
++getlogin_r (char *name, size_t name_len)
++{
++  size_t len;
++
++  if (__getlogin_cache == NULL)
++    {
++      if (INLINE_SYSCALL (getlogin, 2, __getlogin_cache_room, MAXLOGNAME) < 0)
++	return -1;
++      /* The system call should return a NULL terminated name.  */
++      if (__memchr (__getlogin_cache_room, '\0', MAXLOGNAME) == NULL)
++	abort ();
++      __getlogin_cache = __getlogin_cache_room;
++    }
++
++  len = strlen (__getlogin_cache);
++  if (__builtin_expect (len < name_len, 1))
++    {
++      memcpy (name, __getlogin_cache, len + 1);
++      return 0;
++    }
++  else
++    {
++      __set_errno (ERANGE);
++      return -1;
++    }
++}
++libc_hidden_def (getlogin_r)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getmntinfo.c
+@@ -0,0 +1,80 @@
++/* Return list of mounted filesystems.  FreeBSD version.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/mount.h>
++#include <stdlib.h>
++#include <errno.h>
++
++static int mntbufsize;
++static struct statfs *mntbuf;
++
++/* Return list of mounted filesystems.
++   Inherently not multithread-safe.  */
++int
++__getmntinfo (struct statfs **mntbufp, int flags)
++{
++  for (;;)
++    {
++      int count = __getfsstat (NULL, 0, flags);
++      int count2;
++
++      if (count < 0)
++	return 0;
++
++      if (count == 0)
++	{
++	  __set_errno (0);
++	  return 0;
++	}
++
++      if (count > mntbufsize)
++	{
++	  if (mntbuf != NULL)
++	    free (mntbuf);
++	  mntbufsize = 0;
++	  mntbuf = (struct statfs *) malloc (count * sizeof (struct statfs));
++	  if (mntbuf == NULL)
++	    {
++	      __set_errno (ENOMEM);
++	      return 0;
++	    }
++	  mntbufsize = count;
++	}
++
++      count2 = __getfsstat (mntbuf, count * sizeof (struct statfs), flags);
++
++      if (count2 < 0)
++	return 0;
++
++      if (count2 == 0)
++	{
++	  __set_errno (0);
++	  return 0;
++	}
++
++      if (count2 <= count)
++	{
++	  *mntbufp = mntbuf;
++	  return count2;
++	}
++    }
++}
++
++weak_alias (__getmntinfo, getmntinfo)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getmntinfo64.c
+@@ -0,0 +1,78 @@
++/* Return list of mounted filesystems.  FreeBSD version.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/mount.h>
++#include <stdlib.h>
++#include <errno.h>
++
++static int mntbufsize;
++static struct statfs64 *mntbuf;
++
++/* Return list of mounted filesystems.
++   Inherently not multithread-safe.  */
++int
++getmntinfo64 (struct statfs64 **mntbufp, int flags)
++{
++  for (;;)
++    {
++      int count = __getfsstat64 (NULL, 0, flags);
++      int count2;
++
++      if (count < 0)
++	return 0;
++
++      if (count == 0)
++	{
++	  __set_errno (0);
++	  return 0;
++	}
++
++      if (count > mntbufsize)
++	{
++	  if (mntbuf != NULL)
++	    free (mntbuf);
++	  mntbufsize = 0;
++	  mntbuf = (struct statfs64 *) malloc (count * sizeof (struct statfs64));
++	  if (mntbuf == NULL)
++	    {
++	      __set_errno (ENOMEM);
++	      return 0;
++	    }
++	  mntbufsize = count;
++	}
++
++      count2 = __getfsstat64 (mntbuf, count * sizeof (struct statfs64), flags);
++
++      if (count2 < 0)
++	return 0;
++
++      if (count2 == 0)
++	{
++	  __set_errno (0);
++	  return 0;
++	}
++
++      if (count2 <= count)
++	{
++	  *mntbufp = mntbuf;
++	  return count2;
++	}
++    }
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getosreldate.c
+@@ -0,0 +1,76 @@
++/*
++ * Copyright (c) 1989, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ */
++
++#include <stddef.h>
++#include <sys/sysctl.h>
++#include <stdlib.h>
++#include <getosreldate.h>
++
++int
++__kernel_getosreldate(void)
++{
++    static int osreldate;
++
++    int mib[2];
++    size_t size;
++
++    if (osreldate == 0)
++    {
++	mib[0] = CTL_KERN;
++	mib[1] = KERN_OSRELDATE;
++	size = sizeof osreldate;
++	if (__sysctl(mib, 2, &osreldate, &size, NULL, 0) == -1)
++		return (-1);
++    }		
++    return (osreldate);
++}
++
++int
++__getosreldate(void)
++{
++    static int osreldate;
++
++    int mib[2];
++    size_t size;
++    char *temp;
++
++    if (osreldate == 0)
++    {
++	if ((temp = getenv("OSVERSION"))) {
++		osreldate = atoi(temp);
++		return (osreldate);
++	}
++
++	osreldate = __kernel_getosreldate ();
++    }		
++    return (osreldate);
++}
++libc_hidden_def (__kernel_getosreldate)
++libc_hidden_def (__getosreldate)
++weak_alias (__getosreldate, getosreldate)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getosreldate.h
+@@ -0,0 +1,4 @@
++int __kernel_getosreldate (void);
++int __getosreldate (void);
++libc_hidden_proto (__kernel_getosreldate)
++libc_hidden_proto (__getosreldate)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getpagesize.c
+@@ -0,0 +1,42 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <unistd.h>
++#include <sys/sysctl.h>
++
++/* Return the system page size.  */
++int
++__getpagesize (void)
++{
++  static int cached_pagesize /* = 0 */;
++
++  if (cached_pagesize == 0)
++    {
++      /* Fetch sysctl value of "hw.pagesize".  */
++      int request[2] = { CTL_HW, HW_PAGESIZE };
++      size_t result_len = sizeof (cached_pagesize);
++
++      if (__sysctl (request, 2, &cached_pagesize, &result_len, NULL, 0) < 0)
++	return -1;
++    }
++  return cached_pagesize;
++}
++libc_hidden_def (__getpagesize)
++
++weak_alias (__getpagesize, getpagesize)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getpt.c
+@@ -0,0 +1,92 @@
++/* Copyright (C) 1998-1999, 2000-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <string.h>
++#include <unistd.h>
++#include <sys/ioctl.h>
++
++
++/* Prefix for master pseudo terminal nodes.  */
++#define _PATH_PTY "/dev/pty"
++
++
++/* Letters indicating a series of pseudo terminals.  */
++#ifndef PTYNAME1
++#define PTYNAME1 "pqrs"
++#endif
++const char __libc_ptyname1[] attribute_hidden = PTYNAME1;
++
++/* Letters indicating the position within a series.  */
++#ifndef PTYNAME2
++#define PTYNAME2 "0123456789abcdefghijklmnopqrstuv";
++#endif
++const char __libc_ptyname2[] attribute_hidden = PTYNAME2;
++
++
++/* Open a master pseudo terminal and return its file descriptor.  */
++int
++__posix_openpt (int oflag)
++{
++  char buf[sizeof (_PATH_PTY) + 2];
++  const char *p, *q;
++  char *s;
++
++  s = __mempcpy (buf, _PATH_PTY, sizeof (_PATH_PTY) - 1);
++  /* s[0] and s[1] will be filled in the loop.  */
++  s[2] = '\0';
++
++  for (p = __libc_ptyname1; *p != '\0'; ++p)
++    {
++      s[0] = *p;
++
++      for (q = __libc_ptyname2; *q != '\0'; ++q)
++	{
++	  int fd;
++
++	  s[1] = *q;
++
++	  fd = __open (buf, oflag);
++	  if (fd >= 0)
++	    {
++	      if (!(oflag & O_NOCTTY))
++		__ioctl (fd, TIOCSCTTY, NULL);
++
++	      return fd;
++	    }
++
++	  if (errno == ENOENT)
++	    return -1;
++	}
++    }
++
++  __set_errno (ENOENT);
++  return -1;
++}
++
++weak_alias (__posix_openpt, posix_openpt)
++
++
++int
++__getpt (void)
++{
++  return __posix_openpt (O_RDWR);
++}
++
++weak_alias (__getpt, getpt)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getrlimit64.c
+@@ -0,0 +1 @@
++/* 'getrlimit64' is the same as 'getrlimit', because __rlim64_t == __rlim_t.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getsysstats.c
+@@ -0,0 +1,109 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/sysctl.h>
++#include <unistd.h>
++#include <stddef.h>
++
++
++int
++__get_nprocs (void)
++{
++  /* Fetch sysctl value of "hw.ncpu".  */
++  int request[2] = { CTL_HW, HW_NCPU };
++  int result;
++  size_t result_len = sizeof (result);
++
++  if (__sysctl (request, 2, &result, &result_len, NULL, 0) < 0)
++    /* Dummy result.  */
++    return 1;
++
++  return result;
++}
++
++weak_alias (__get_nprocs, get_nprocs)
++
++
++int
++__get_nprocs_conf (void)
++{
++  /* We don't know how to distinguish between configured and active CPUs.  */
++  return __get_nprocs ();
++}
++
++weak_alias (__get_nprocs_conf, get_nprocs_conf)
++
++
++long int
++__get_phys_pages (void)
++{
++  /* Fetch sysctl value of "hw.physmem".  This is a little smaller than
++     the real installed memory size, but so what.  */
++  int request[2] = { CTL_HW, HW_PHYSMEM };
++  unsigned long int result;
++  size_t result_len = sizeof (result);
++
++  if (__sysctl (request, 2, &result, &result_len, NULL, 0) < 0)
++    return -1;
++
++  return result / __getpagesize();
++}
++
++weak_alias (__get_phys_pages, get_phys_pages)
++
++
++long int
++__get_avphys_pages (void)
++{
++#if 1
++  int result1;
++  int result2;
++  {
++    /* Fetch sysctl value of "vm.stats.vm.v_inactive_count".  */
++    size_t result_len = sizeof (result1);
++
++    if (__sysctlbyname ("vm.stats.vm.v_inactive_count", &result1, &result_len,
++			NULL, 0) < 0)
++      return -1;
++  }
++  {
++    /* Fetch sysctl value of "vm.stats.vm.v_free_count".  */
++    size_t result_len = sizeof (result2);
++
++    if (__sysctlbyname ("vm.stats.vm.v_free_count", &result2, &result_len,
++			NULL, 0) < 0)
++      return -1;
++  }
++
++  return result1 + result2;
++#else
++  /* This does not appear to work.  */
++  /* Fetch v_inactive_count field of sysctl value of "vm.vmmeter".  */
++  int request[2] = { CTL_VM, VM_METER };
++  struct vmmeter result;
++  size_t result_len = sizeof (result);
++
++  if (__sysctl (request, 2, &result, &result_len, NULL, 0) < 0)
++    return -1;
++
++  return result.v_inactive_count;
++#endif
++}
++
++weak_alias (__get_avphys_pages, get_avphys_pages)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/getvfsbyname.c
+@@ -0,0 +1,71 @@
++/*
++ * Copyright (c) 1995
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ */
++
++#include <stddef.h>
++#include <sys/mount.h>
++#include <sys/sysctl.h>
++#include <errno.h>
++#include <stdlib.h>
++#include <string.h>
++
++/*
++ * Given a filesystem name, determine if it is resident in the kernel,
++ * and if it is resident, return its xvfsconf structure.
++ */
++int
++__getvfsbyname(fsname, vfcp)
++	const char *fsname;
++	struct xvfsconf *vfcp;
++{
++	struct xvfsconf *xvfsp;
++	size_t buflen;
++	int cnt, i;
++
++	if (sysctlbyname("vfs.conflist", NULL, &buflen, NULL, 0) < 0)
++		return (-1);
++	xvfsp = malloc(buflen);
++	if (xvfsp == NULL)
++		return (-1);
++	if (sysctlbyname("vfs.conflist", xvfsp, &buflen, NULL, 0) < 0) {
++		free(xvfsp);
++		return (-1);
++	}
++	cnt = buflen / sizeof(struct xvfsconf);
++	for (i = 0; i < cnt; i++) {
++		if (strcmp(fsname, xvfsp[i].vfc_name) == 0) {
++			memcpy(vfcp, xvfsp + i, sizeof(struct xvfsconf));
++			free(xvfsp);
++			return (0);
++		}
++	}
++	free(xvfsp);
++	__set_errno (ENOENT);
++	return (-1);
++}
++weak_alias (__getvfsbyname, getvfsbyname)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/glob.c
+@@ -0,0 +1,3 @@
++/* 'glob64' is different from 'glob', because
++   'struct stat64' != 'struct stat'.  */
++#include <posix/glob.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/glob64.c
+@@ -0,0 +1,3 @@
++/* 'glob64' is different from 'glob', because
++   'struct stat64' != 'struct stat'.  */
++#include <sysdeps/gnu/glob64.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/gtty.c
+@@ -0,0 +1,2 @@
++/* use stub only variant */
++#include <misc/gtty.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/Makefile
+@@ -0,0 +1,23 @@
++ifeq ($(subdir),linuxthreads)
++CFLAGS-pt-initfini.s += -fno-asynchronous-unwind-tables
++endif
++
++# Additional header files to be installed in $prefix/include:
++
++ifeq ($(subdir),misc)
++sysdep_headers += \
++ sys/io.h \
++ sys/perm.h \
++ sys/vm86.h
++endif
++
++# Additional functions, and particular system calls:
++
++ifeq ($(subdir),misc)
++# For <sys/io.h> and <sys/perm.h>.
++sysdep_routines += i386_get_ioperm i386_set_ioperm iopl
++# For <sys/vm86.h>.
++sysdep_routines += i386_vm86
++# For <machine/sysarch.h>.
++sysdep_routines += i386_get_ldt i386_set_ldt
++endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/Versions
+@@ -0,0 +1,7 @@
++libc {
++  GLIBC_2.2.6 {
++    i386_get_ioperm; i386_set_ioperm; i386_vm86;
++    ioperm; iopl;
++    i386_get_ldt; i386_set_ldt;
++  }
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/____longjmp_chk.S
+@@ -0,0 +1,7 @@
++/* Jump to the position specified by ENV, causing the
++   setjmp call there to return VAL, or 1 if VAL is 0.
++   void __longjmp (__jmp_buf env, int val).  */
++      
++#warning longjmp_chk unimplemented
++#define __longjmp ____longjmp_chk
++#include<__longjmp.S>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/bits/mcontext.h
+@@ -0,0 +1,111 @@
++/* Machine-dependent processor state structure for FreeBSD.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.  i386 version.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#if !defined _SYS_UCONTEXT_H
++# error "Never use <bits/mcontext.h> directly; include <sys/ucontext.h> instead."
++#endif
++
++/*-
++ * Copyright (c) 1999 Marcel Moolenaar
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer
++ *    in this position and unchanged.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 3. The name of the author may not be used to endorse or promote products
++ *    derived from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ *
++ * based on $FreeBSD: src/sys/i386/include/ucontext.h,v 1.10 2002/12/02 19:58:55 deischen Exp $
++ */
++
++/* Whole processor state.  */
++typedef struct
++  {
++    /*
++     * The first 20 fields must match the definition of
++     * sigcontext. So that we can support sigcontext
++     * and ucontext_t at the same time.
++     */
++
++    int mc_onstack;		/* Nonzero if running on sigstack.  */
++
++    /* Segment registers.  */
++    int mc_gs;
++    int mc_fs;
++    int mc_es;
++    int mc_ds;
++
++    /* "General" registers.  These members are in the order that the i386
++       `pusha' and `popa' instructions use (`popa' ignores %esp).  */
++    int mc_edi;
++    int mc_esi;
++    int mc_ebp;
++    int mc_isp;			/* Not used; sc_esp is used instead.  */
++    int mc_ebx;
++    int mc_edx;
++    int mc_ecx;
++    int mc_eax;
++
++    int mc_trapno;
++    int mc_err;
++
++    int mc_eip;			/* Instruction pointer.  */
++    int mc_cs;			/* Code segment register.  */
++
++    int mc_efl;			/* Processor flags.  */
++
++    int mc_esp;			/* This stack pointer is used.  */
++    int mc_ss;			/* Stack segment register.  */
++
++    int mc_len;			/* sizeof(mcontext_t) */
++#define	_MC_FPFMT_NODEV		0x10000	/* device not present or configured */
++#define	_MC_FPFMT_387		0x10001
++#define	_MC_FPFMT_XMM		0x10002
++    int mc_fpformat;
++#define	_MC_FPOWNED_NONE	0x20000	/* FP state not used */
++#define	_MC_FPOWNED_FPU		0x20001	/* FP state came from FPU */
++#define	_MC_FPOWNED_PCB		0x20002	/* FP state came from PCB */
++    int mc_ownedfp;
++    int mc_spare1[1];		/* align next field to 16 bytes */
++    /*
++     * See <machine/npx.h> for the internals of mc_fpstate[].
++     */
++    int mc_fpstate[128] __attribute__((aligned(16)));
++    int mc_spare2[8];
++  } mcontext_t;
++
++/* Traditional BSD names for some members.  */
++#define mc_eflags	mc_efl
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/bits/sigcontext.h
+@@ -0,0 +1,97 @@
++/* Machine-dependent signal context structure for FreeBSD.  i386 version.
++   Copyright (C) 1991-1992,1994,1997,2001-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
++# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
++#endif
++
++#ifndef _BITS_SIGCONTEXT_H
++#define _BITS_SIGCONTEXT_H  1
++
++/* State of this thread when the signal was taken.
++   The unions below are for compatibility with Linux (whose sigcontext
++   components don't have sc_ prefix) */
++__extension__ struct sigcontext
++  {
++    __sigset_t 	sc_mask;		/* Blocked signals to restore.  */
++    int 	sc_onstack;		/* Nonzero if running on sigstack.  */
++
++    /* Segment registers.  */
++    union { int sc_gs; int gs; };
++    union { int sc_fs; int fs; };
++    union { int sc_es; int es; };
++    union { int sc_ds; int ds; };
++
++    /* "General" registers.  These members are in the order that the i386
++       `pusha' and `popa' instructions use (`popa' ignores %esp).  */
++    union { int sc_edi; int edi; };
++    union { int sc_esi; int esi; };
++    union { int sc_ebp; int ebp; };
++    union { int sc_isp; int isp; };		/* Not used; sc_esp is used instead.  */
++    union { int sc_ebx; int ebx; };
++    union { int sc_edx; int edx; };
++    union { int sc_ecx; int ecx; };
++    union { int sc_eax; int eax; };
++
++    union { int sc_trapno; int trapno; };
++    union { int sc_err; int err; };
++
++    union { int sc_eip; int eip; };		/* Instruction pointer.  */
++    union { int sc_cs; int cs; };		/* Code segment register.  */
++
++    union { int sc_efl; int eflags; }; 		/* Processor flags.  */
++
++    union { int sc_esp; int esp; };		/* This stack pointer is used.  */
++    union { int sc_ss; int ss; };		/* Stack segment register.  */
++
++    int     sc_len;                 /* sizeof(mcontext_t) */
++    /*
++     * XXX - See <machine/ucontext.h> and <machine/npx.h> for
++     *       the following fields.
++     */
++    int     sc_fpformat;
++    int     sc_ownedfp;
++    int     sc_spare1[1];
++    int     sc_fpstate[128] __attribute__((aligned(16)));
++    int     sc_spare2[8];
++  };
++
++/* Traditional BSD names for some members.  */
++#define sc_sp		sc_esp		/* Stack pointer.  */
++#define sc_fp		sc_ebp		/* Frame pointer.  */
++#define sc_pc		sc_eip		/* Process counter.  */
++#define sc_ps		sc_efl
++#define sc_eflags	sc_efl
++
++#if 1 /* FIXME: These need verification.  */
++
++/* Codes for SIGILL.  */
++#define ILL_PRIVIN_FAULT	1
++#define ILL_ALIGN_FAULT		14
++#define ILL_FPOP_FAULT		24
++
++/* Codes for SIGBUS.  */
++#define BUS_PAGE_FAULT		12
++#define BUS_SEGNP_FAULT		26
++#define BUS_STK_FAULT		27
++#define BUS_SEGM_FAULT		29
++
++#endif
++
++#endif /* _BITS_SIGCONTEXT_H */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/dl-machine.h
+@@ -0,0 +1,145 @@
++/* Machine-dependent ELF dynamic relocation inline functions.
++   FreeBSD i386 specific version of dl_platform_init()
++   Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Petr Salinger, 2006.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++
++/* For FreeBSD we redefine an initialization function.
++   This is called very early in dl_sysdep_start.  */
++
++#if 0
++Under FreeBSD:
++#define AT_EXECPATH     15      /* Path to the executable. */
++
++Under Linux:
++#define AT_PLATFORM     15      /* String identifying platform.  */
++
++Filled entries from kernel:
++
++        if (args->execfd != -1)
++                AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd);
++        AUXARGS_ENTRY(pos, AT_PHDR, args->phdr);    
++        AUXARGS_ENTRY(pos, AT_PHENT, args->phent);  
++        AUXARGS_ENTRY(pos, AT_PHNUM, args->phnum);  
++        AUXARGS_ENTRY(pos, AT_PAGESZ, args->pagesz);
++        AUXARGS_ENTRY(pos, AT_FLAGS, args->flags);
++        AUXARGS_ENTRY(pos, AT_ENTRY, args->entry);
++        AUXARGS_ENTRY(pos, AT_BASE, args->base);
++        if (imgp->execpathp != 0)
++                AUXARGS_ENTRY(pos, AT_EXECPATH, imgp->execpathp);
++        AUXARGS_ENTRY(pos, AT_NULL, 0);
++                                                                                                                
++#endif
++
++#include_next <dl-machine.h>
++
++#undef  DL_PLATFORM_INIT
++#define DL_PLATFORM_INIT dl_platform_kfreebsd_i386_init ()
++
++#ifndef _DL_MACHINE_KFREEBSD
++#define _DL_MACHINE_KFREEBSD
++
++#define X86_EFLAGS_AC   0x00040000 /* Alignment Check */
++#define X86_EFLAGS_ID   0x00200000 /* CPUID detection flag */
++
++static inline int try_flip_flags(int val)
++{
++    int ret;
++    __asm__(
++	"pushfl\n\t"
++	"pushfl\n\t"
++	"popl %%ecx\n\t"
++	"xorl %%ecx,%%eax\n\t"
++	"pushl %%eax\n\t"
++	"popfl\n\t"
++	"pushfl\n\t"
++	"popl %%eax\n\t"
++	"xorl %%ecx,%%eax\n\t"
++	"popfl\n\t"
++	: "=a" (ret)
++	: "0" (val)
++        : "cx"
++    );
++    return ret;
++}
++
++static inline void cpuid(int op, int *eax, int *edx)
++{
++    __asm__(
++	"push %%ebx\n\t"
++	"cpuid\n\t"
++	"pop %%ebx\n\t"
++	: "=a" (*eax),
++	  "=d" (*edx)
++	: "0" (op)
++	: "cx"
++    );
++}
++
++static inline void __attribute__ ((unused))
++dl_platform_kfreebsd_i386_init (void)
++{
++	/* we don't have reasonable AT_PLATFORM from kernel
++	   try to use cpuid to get one, also guess AT_HWCAP */
++
++	int val, hwcap;
++
++	val = try_flip_flags(X86_EFLAGS_AC | X86_EFLAGS_ID);
++
++	if (!(val & X86_EFLAGS_AC))
++	{
++		/* 386 */
++		GLRO(dl_platform) = GLRO(dl_x86_platforms)[0];
++		GLRO(dl_hwcap) = 0;
++	}
++	else if (!(val & X86_EFLAGS_ID))
++	{
++		/* 486 */
++		GLRO(dl_platform) = GLRO(dl_x86_platforms)[1];
++		GLRO(dl_hwcap) = 0;
++	}
++	else
++	{
++	    cpuid(0, &val, &hwcap);
++	    if (val == 0)
++	    {
++		/* 486 */
++		GLRO(dl_platform) = GLRO(dl_x86_platforms)[1];
++		GLRO(dl_hwcap) = 0;
++	    }
++	    else
++	    {
++		cpuid(1, &val, &hwcap);
++		GLRO(dl_hwcap) = hwcap;
++		switch (val & 0xf00)
++		{
++		case 0x400: /* 486 */
++			GLRO(dl_platform) = GLRO(dl_x86_platforms)[1];
++		break;
++		case 0x500: /* 586 */
++			GLRO(dl_platform) = GLRO(dl_x86_platforms)[2];
++		break;
++		default:    /* 686 */
++			GLRO(dl_platform) = GLRO(dl_x86_platforms)[3];
++		}
++            }
++	}
++}
++
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/dl-procinfo.h
+@@ -0,0 +1 @@
++#include <sysdeps/unix/sysv/linux/i386/dl-procinfo.h>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/get_clockfreq.c
+@@ -0,0 +1 @@
++#include <sysdeps/unix/sysv/linux/i386/get_clockfreq.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/getcontext.S
+@@ -0,0 +1,38 @@
++/* Save current context.
++   Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++
++.text
++ENTRY(__getcontext)
++        clc
++        movl 0(%esp), %ecx	/* save the return PC value */
++
++        DO_CALL (getcontext, 1)
++        jb SYSCALL_ERROR_LABEL
++
++        addl $4, %esp		/* remove stale return address */
++        jmp  *%ecx
++
++L(pseudo_end):
++	ret
++
++PSEUDO_END(__getcontext)
++
++weak_alias(__getcontext, getcontext)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/i386_get_ioperm.c
+@@ -0,0 +1,36 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/perm.h>
++#include <sysarch.h>
++
++int
++i386_get_ioperm (unsigned long int from, unsigned long int *num, int *turned_on)
++{
++  struct i386_ioperm_args args;
++
++  args.start = from;
++
++  if (__sysarch (I386_GET_IOPERM, &args) < 0)
++    return -1;
++
++  *num = args.length;
++  *turned_on = args.enable;
++
++  return 0;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/i386_get_ldt.c
+@@ -0,0 +1,38 @@
++/* Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   Contributed by Robert Millan  <robertmh@gnu.org>
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/cdefs.h>
++#include <machine/segments.h>
++#include <machine/sysarch.h>
++
++int
++i386_get_ldt (int from, union descriptor *descs, int num)
++{
++  struct i386_ldt_args args;
++
++  args.start = from;
++  args.descs = descs;
++  args.num = num;
++
++  if (__sysarch (I386_GET_LDT, &args) < 0)
++    return -1;
++
++  return 0;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/i386_set_ioperm.c
+@@ -0,0 +1,34 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/perm.h>
++#include <sysarch.h>
++
++int
++i386_set_ioperm (unsigned long int from, unsigned long int num, int turn_on)
++{
++  struct i386_ioperm_args args;
++
++  args.start = from;
++  args.length = num;
++  args.enable = turn_on;
++
++  return __sysarch (I386_SET_IOPERM, &args);
++}
++
++strong_alias (i386_set_ioperm, ioperm)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/i386_set_ldt.c
+@@ -0,0 +1,38 @@
++/* Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   Contributed by Robert Millan  <robertmh@gnu.org>
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/cdefs.h>
++#include <machine/segments.h>
++#include <machine/sysarch.h>
++
++int
++i386_set_ldt (int from, union descriptor *descs, int num)
++{
++  struct i386_ldt_args args;
++
++  args.start = from;
++  args.descs = descs;
++  args.num = num;
++
++  if (__sysarch (I386_SET_LDT, &args) < 0)
++    return -1;
++
++  return 0;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/i386_vm86.c
+@@ -0,0 +1,31 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/vm86.h>
++#include <sysarch.h>
++
++int
++i386_vm86 (int cmd, void *arg)
++{
++  struct i386_vm86_args args;
++
++  args.sub_op = cmd;
++  args.sub_args = arg;
++
++  return __sysarch (I386_VM86, &args);
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/i486/linuxthreads/pt-machine.h
+@@ -0,0 +1,8 @@
++
++/* i486+ is almost same as plain i386 version */
++#include_next <pt-machine.h>
++
++/* but compare-and-swap is always available  */
++
++#undef TEST_FOR_COMPARE_AND_SWAP
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/i586/linuxthreads/pt-machine.h
+@@ -0,0 +1,8 @@
++
++/* i486+ is almost same as plain i386 version */
++#include_next <pt-machine.h>
++
++/* but compare-and-swap is always available  */
++
++#undef TEST_FOR_COMPARE_AND_SWAP
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/i686/linuxthreads/pt-machine.h
+@@ -0,0 +1,8 @@
++
++/* i486+ is almost same as plain i386 version */
++#include_next <pt-machine.h>
++
++/* but compare-and-swap is always available  */
++
++#undef TEST_FOR_COMPARE_AND_SWAP
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/iopl.c
+@@ -0,0 +1,54 @@
++/* Copyright (C) 2004 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Robert Millan <robertmh@gnu.org>
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>	/* open */
++#include <unistd.h>	/* close */
++
++static int __iopl_fd = -1;
++
++int
++iopl (int level)
++  {
++    switch (level)
++      {
++        case 3:
++          if (__iopl_fd != -1)
++            return 0;
++
++          __iopl_fd = __open ("/dev/io", O_RDWR);
++          if (__iopl_fd == -1)
++            {
++              if (errno == EACCES)
++                __set_errno (EPERM);
++              return -1;
++            }
++          return 0;
++
++        case 0:
++          if (__iopl_fd != -1)
++            if (__close (__iopl_fd) == -1)
++              return 1;
++          return 0;
++
++        default:
++          __set_errno (EINVAL);
++          return -1;
++      }
++  }
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/ldconfig.h
+@@ -0,0 +1,37 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdeps/generic/ldconfig.h>
++
++#define SYSDEP_KNOWN_INTERPRETER_NAMES \
++  { "/lib/ld.so.1", FLAG_ELF_LIBC6 },				\
++  { "/libexec/ld-elf.so.1", FLAG_ELF_LIBC5 },
++
++#define SYSDEP_KNOWN_LIBRARY_NAMES \
++  { "libc.so.0.1", FLAG_ELF_LIBC6 },				\
++  { "libm.so.1", FLAG_ELF_LIBC6 },				\
++  { "libc.so.4", FLAG_ELF_LIBC5 },				\
++  { "libm.so.4", FLAG_ELF_LIBC5 },				\
++  { "libc.so.5", FLAG_ELF_LIBC5 },				\
++  { "libm.so.5", FLAG_ELF_LIBC5 },				\
++  { "libc.so.6", FLAG_ELF_LIBC5 },				\
++  { "libm.so.6", FLAG_ELF_LIBC5 },				\
++  { "libc.so.7", FLAG_ELF_LIBC5 },				\
++  { "libm.so.7", FLAG_ELF_LIBC5 },				\
++  { "libc.so.8", FLAG_ELF_LIBC5 },				\
++  { "libm.so.8", FLAG_ELF_LIBC5 },
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/linuxthreads/pt-machine.h
+@@ -0,0 +1,76 @@
++/* Machine-dependent pthreads configuration and inline functions.
++   ix86 version for FreeBSD.
++   Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Petr Salinger, 2005.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#ifndef _FREEBSD_PT_MACHINE_H
++#define _FREEBSD_PT_MACHINE_H   1
++
++/*
++  some parts are common with linux/i386 version
++
++  linux specific parts should be in
++  linuxthreads/sysdeps/unix/sysv/linux/i386/
++  but they are included directly in
++  linuxthreads/sysdeps/i386/
++
++  so include them
++
++ */
++
++#include <linuxthreads/sysdeps/i386/pt-machine.h>
++#include <linuxthreads/sysdeps/i386/useldt.h>
++
++/* hack them */
++
++#ifndef __ASSEMBLER__
++
++#undef INIT_THREAD_SELF
++#undef FREE_THREAD
++
++/* The P4 and above really want some help to prevent overheating.  */
++#define BUSY_WAIT_NOP   __asm__ ("rep; nop")
++
++/* and add few FreeBSD specifics */
++
++#include <sysarch.h>
++
++/* Initialize the thread-unique value. */
++
++#define INIT_THREAD_SELF(descr, nr)		\
++{						\
++  long tmp;					\
++  tmp = (long) descr;				\
++  if (sysarch(I386_SET_GSBASE, &tmp)  != 0)	\
++  {						\
++    abort();					\
++  }						\
++}
++
++#define FREE_THREAD(descr, nr) do { } while (0)
++
++#endif /* __ASSEMBLER__ */
++
++/* We want the OS to assign stack addresses.  */
++#define FLOATING_STACKS 1
++
++/* Maximum size of the stack if the rlimit is unlimited.  */
++#define ARCH_STACK_MAX_SIZE     8*1024*1024
++
++#endif /* _FREEBSD_PT_MACHINE_H  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/linuxthreads/sysdep-cancel.h
+@@ -0,0 +1,166 @@
++/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
++   Modification for FreeBSD by Petr Salinger, 2005.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++#include <tls.h>
++#include <pt-machine.h>
++#ifndef __ASSEMBLER__
++# include <linuxthreads/internals.h>
++#endif
++
++#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
++
++# undef PSEUDO
++# define PSEUDO(name, syscall_name, args)				      \
++  .text;								      \
++  ENTRY (name)								      \
++    SINGLE_THREAD_P;							      \
++    jne L(pseudo_cancel);						      \
++    DO_CALL (syscall_name, args);					      \
++    jb SYSCALL_ERROR_LABEL;						      \
++    ret;								      \
++  L(pseudo_cancel):							      \
++    CENABLE								      \
++    movl %eax, %ecx;							      \
++    movl $SYS_ify (syscall_name), %eax;					      \
++    int $0x80;								      \
++    PUSHRESULT;							      	      \
++    movl %ecx, %eax; 							      \
++    CDISABLE;							 	      \
++    POPRESULT;							      	      \
++    jb SYSCALL_ERROR_LABEL;						      \
++  L(pseudo_end):
++
++/*
++  on FreeBSD some syscalls return result in pair edx+eax,
++  therefore proper way would be
++
++# define PUSHRESULT	pushl %edx; pushl %eax; pushfl
++# define POPRESULT	popfl; popl %eax; popl %edx
++
++  for FreeBSD 5.4 affected syscalls are
++
++	lseek()
++	fork()
++	vfork()
++	rfork()
++	pipe()
++
++   none of them is cancelable, therefore
++*/
++
++# define PUSHRESULT	pushl %eax; cfi_adjust_cfa_offset (4);  pushfl;    cfi_adjust_cfa_offset (4)
++# define POPRESULT	popfl;      cfi_adjust_cfa_offset (-4); popl %eax; cfi_adjust_cfa_offset (-4)
++
++# ifdef IS_IN_libpthread
++#  define CENABLE	call __pthread_enable_asynccancel;
++#  define CDISABLE	call __pthread_disable_asynccancel
++# elif defined IS_IN_librt
++#  ifdef PIC
++#   define CENABLE	pushl %ebx; \
++			cfi_adjust_cfa_offset (4); \
++			cfi_rel_offset (ebx, 0); \
++			call __i686.get_pc_thunk.bx; \
++			addl     $_GLOBAL_OFFSET_TABLE_, %ebx; \
++			call __librt_enable_asynccancel@PLT; \
++			popl %ebx; \
++			cfi_adjust_cfa_offset (-4); \
++			cfi_restore (ebx);
++#   define CDISABLE	pushl %ebx; \
++			cfi_adjust_cfa_offset (4); \
++			cfi_rel_offset (ebx, 0); \
++			call __i686.get_pc_thunk.bx; \
++			addl     $_GLOBAL_OFFSET_TABLE_, %ebx; \
++			call __librt_disable_asynccancel@PLT; \
++			popl %ebx; \
++			cfi_adjust_cfa_offset (-4); \
++			cfi_restore (ebx);
++#  else
++#   define CENABLE	call __librt_enable_asynccancel;
++#   define CDISABLE	call __librt_disable_asynccancel
++#  endif
++# else
++#  define CENABLE	call __libc_enable_asynccancel;
++#  define CDISABLE	call __libc_disable_asynccancel
++# endif
++
++#if !defined NOT_IN_libc
++# define __local_multiple_threads __libc_multiple_threads
++#elif defined IS_IN_libpthread
++# define __local_multiple_threads __pthread_multiple_threads
++#else
++# define __local_multiple_threads __librt_multiple_threads
++#endif
++
++# ifndef __ASSEMBLER__
++#  if defined FLOATING_STACKS && USE___THREAD && defined PIC
++#   define SINGLE_THREAD_P \
++  __builtin_expect (THREAD_GETMEM (THREAD_SELF,				      \
++				   p_header.data.multiple_threads) == 0, 1)
++#  else
++extern int __local_multiple_threads
++#   if !defined NOT_IN_libc || defined IS_IN_libpthread
++  attribute_hidden;
++#   else
++  ;
++#   endif
++#   define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
++#  endif
++# else
++#  if !defined PIC
++#   define SINGLE_THREAD_P cmpl $0, __local_multiple_threads
++#  elif defined FLOATING_STACKS && USE___THREAD
++#   define SINGLE_THREAD_P cmpl $0, %gs:MULTIPLE_THREADS_OFFSET
++#  else
++#   if !defined NOT_IN_libc || defined IS_IN_libpthread
++#    define __SINGLE_THREAD_CMP cmpl $0, __local_multiple_threads@GOTOFF(%ecx)
++#   else
++#    define __SINGLE_THREAD_CMP \
++  movl __local_multiple_threads@GOT(%ecx), %ecx;\
++  cmpl $0, (%ecx)
++#   endif
++#   if !defined HAVE_HIDDEN || !USE___THREAD
++#    define SINGLE_THREAD_P \
++  SETUP_PIC_REG (cx);				\
++  addl $_GLOBAL_OFFSET_TABLE_, %ecx;		\
++  __SINGLE_THREAD_CMP
++#   else
++#    define SINGLE_THREAD_P \
++  call __i686.get_pc_thunk.cx;			\
++  addl $_GLOBAL_OFFSET_TABLE_, %ecx;		\
++  __SINGLE_THREAD_CMP
++#   endif
++#  endif
++# endif
++
++#elif !defined __ASSEMBLER__
++
++/* This code should never be used but we define it anyhow.  */
++# define SINGLE_THREAD_P (1)
++# define NO_CANCELLATION 1
++
++#endif
++
++#ifndef __ASSEMBLER__
++# define RTLD_SINGLE_THREAD_P \
++  __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
++                                     p_header.data.multiple_threads) == 0, 1)
++#endif
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/linuxthreads/tls.h
+@@ -0,0 +1,93 @@
++/* Definition for thread-local data handling.  linuxthreads/i386 version.
++   Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Modification for FreeBSD by Petr Salinger, 2005.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _FREEBSD_TLS_H
++#define _FREEBSD_TLS_H
++
++#include <linuxthreads/sysdeps/i386/tls.h>
++
++/* We can support TLS only if the floating-stack support is available.
++   To avoid bothering with the TLS support code at all,
++   use configure --without-tls.
++
++   We need USE_TLS to be consistently defined, for ldsodefs.h conditionals.
++   But some of the code below can cause problems in building libpthread
++*/
++
++#if defined HAVE_TLS_SUPPORT \
++    && (defined FLOATING_STACKS || !defined IS_IN_libpthread)
++
++# ifndef __ASSEMBLER__
++
++#undef TLS_INIT_TP
++#undef TLS_SETUP_GS_SEGMENT
++
++#include <sysarch.h>
++#include <sys/syscall.h>
++
++
++/* Code to initially initialize the thread pointer.  This might need
++   special attention since 'errno' is not yet available and if the
++   operation can cause a failure 'errno' must not be touched. */
++
++#  define TLS_DO_SET_GSBASE(descr)		\
++({                                      	\
++  long base = (long) descr;             	\
++  int result;                           	\
++  asm volatile (                        	\
++                "pushl %3\n\t"          	\
++                "pushl %2\n\t"          	\
++                "pushl %1\n\t"       		\
++                "int $0x80\n\t"         	\
++                "popl %3\n\t"        		\
++                "popl %3\n\t"        		\
++                "popl %3\n\t"        		\
++                : "=a" (result)         	\
++                : "0" (SYS_sysarch),     	\
++                  "i" (I386_SET_GSBASE),       	\
++                  "d" (&base)			\
++                : "memory", "cc" );    		\
++  result;                                       \
++})
++
++#   define TLS_SETUP_GS_SEGMENT(descr, secondcall)                            \
++  (TLS_DO_SET_GSBASE(descr)                                                   \
++   ? "set_thread_area failed when setting up thread-local storage\n" : NULL)
++
++/*   The value of this macro is null if successful, or an error string.  */
++
++#  define TLS_INIT_TP(descr, secondcall)				      \
++  ({									      \
++    void *_descr = (descr);						      \
++    tcbhead_t *head = _descr;						      \
++									      \
++    head->tcb = _descr;							      \
++    /* For now the thread descriptor is at the same address.  */	      \
++    head->self = _descr;						      \
++									      \
++    INIT_SYSINFO;							      \
++    TLS_SETUP_GS_SEGMENT (_descr, secondcall);				      \
++  })
++
++# endif /* __ASSEMBLER__ */
++
++#endif	/* HAVE_TLS_SUPPORT && (FLOATING_STACKS || !IS_IN_libpthread) */
++
++#endif	/* _FREEBSD_TLS_H */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/linuxthreads/vfork.S
+@@ -0,0 +1,69 @@
++/* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++
++/* Clone the calling process, but without copying the whole address space.
++   The calling process is suspended until the new process exits or is
++   replaced by a call to `execve'.  Return -1 for errors, 0 to the new process,
++   and the process ID of the new process to the old process.  */
++
++ENTRY (__vfork)
++
++# ifdef SHARED
++	call	__i686.get_pc_thunk.cx
++	addl	$_GLOBAL_OFFSET_TABLE_, %ecx
++	cmpl	$0, __libc_pthread_functions@GOTOFF(%ecx)
++# else
++	.weak	pthread_create
++	movl	$pthread_create, %eax
++	testl	%eax, %eax
++# endif
++	jne	HIDDEN_JUMPTARGET (__fork)
++
++	/* Pop the return PC value into ECX.  */
++	popl	%ecx
++	cfi_adjust_cfa_offset(-4)
++
++	/* Perform the system call.  */
++	DO_CALL (vfork, 0)
++	jb	L(error)	/* Branch forward if it failed.  */
++
++	/* In the parent process, %edx == 0, %eax == child pid.  */
++	/* In the child process, %edx == 1, %eax == parent pid.  */
++
++	/* Change %eax to be 0 in the child process.  */
++	decl	%edx
++	andl	%edx, %eax
++
++	/* Jump to the return PC.  */
++	jmp	*%ecx
++
++L(error):
++	/* Push back the return PC.  */
++	pushl	%ecx
++	cfi_adjust_cfa_offset(4)
++
++	/* Branch to the error handler, hidden in PSEUDO_END.  */
++	jmp	SYSCALL_ERROR_LABEL
++L(pseudo_end):
++	ret
++PSEUDO_END (__vfork)
++libc_hidden_def (__vfork)
++
++weak_alias (__vfork, vfork)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/makecontext.S
+@@ -0,0 +1,113 @@
++/* Create new context.
++   Copyright (C) 2001,02 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++
++#include <ucontext_i.h>
++
++
++ENTRY(__makecontext)
++	movl	4(%esp), %eax
++
++	/* Load the address of the function we are supposed to run.  */
++	movl	8(%esp), %ecx
++
++	/* Compute the address of the stack.  The information comes from
++	   to us_stack element.  */
++	movl	oSS_SP(%eax), %edx
++	movl	%ecx, oEIP(%eax)
++	addl	oSS_SIZE(%eax), %edx
++
++	/* Put the next context on the new stack (from the uc_link
++	   element).  */
++	movl	oLINK(%eax), %ecx
++	movl	%ecx, -4(%edx)
++
++	/* Remember the number of parameters for the exit handler since
++	   it has to remove them.  We store the number in the EBX register
++	   which the function we will call must preserve.  */
++	movl	12(%esp), %ecx
++	movl	%ecx, oEBX(%eax)
++
++	/* Make room on the new stack for the parameters.  */
++	negl	%ecx
++	leal	-8(%edx,%ecx,4), %edx
++	negl	%ecx
++	/* Store the future stack pointer.  */
++	movl	%edx, oESP(%eax)
++
++	/* Copy all the parameters.  */
++	jecxz	2f
++1:	movl	12(%esp,%ecx,4), %eax
++	movl	%eax, (%edx,%ecx,4)
++	decl	%ecx
++	jnz	1b
++2:
++
++	/* If the function we call returns we must continue with the
++	   context which is given in the uc_link element.  To do this
++	   set the return address for the function the user provides
++	   to a little bit of helper code which does the magic (see
++	   below).  */
++#ifdef PIC
++	call	1f
++1:	popl	%ecx
++	addl	$L(exitcode)-1b, %ecx
++	movl	%ecx, (%edx)
++#else
++	movl	$L(exitcode), (%edx)
++#endif
++	/* 'makecontext' returns no value.  */
++	ret
++
++	/* This is the helper code which gets called if a function which
++	   is registered with 'makecontext' returns.  In this case we
++	   have to install the context listed in the uc_link element of
++	   the context 'makecontext' manipulated at the time of the
++	   'makecontext' call.  If the pointer is NULL the process must
++	   terminate.  */
++L(exitcode):
++	/* This removes the parameters passed to the function given to
++	   'makecontext' from the stack.  EBX contains the number of
++	   parameters (see above).  */
++	leal	(%esp,%ebx,4), %esp
++
++#ifdef	PIC
++	call	1f
++1:	popl	%ebx
++	addl	$_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx
++#endif
++	popl	%eax			/* This is the next context.  */
++	testl	%eax, %eax
++	je	2f			/* If it is zero exit.  */
++
++	pushl	%eax
++	call	JUMPTARGET(__setcontext)
++	/* If this returns (which can happen if the syscall fails) we'll
++	   exit the program with the return error value (-1).  */
++
++2:	pushl	%eax
++	call	HIDDEN_JUMPTARGET(exit)
++	/* The 'exit' call should never return.  In case it does cause
++	   the process to terminate.  */
++	hlt
++END(__makecontext)
++
++weak_alias(__makecontext, makecontext)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/rfork.S
+@@ -0,0 +1,44 @@
++/* Copyright (C) 1991-1992, 1994-1995, 1997, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++
++.text;
++ENTRY (__rfork)
++	/* save the return PC value into ECX,
++	   preserve stack frame with argument  */
++	movl 0(%esp), %ecx;
++	DO_CALL (rfork, 1)
++	jb SYSCALL_ERROR_LABEL;
++	/* R1 is now 0 for the parent and 1 for the child.  Decrement it to
++	   make it -1 (all bits set) for the parent, and 0 (no bits set)
++	   for the child.  Then AND it with R0, so the parent gets
++	   R0&-1==R0, and the child gets R0&0==0.  */
++	decl %edx
++	andl %edx, %eax
++
++	popl %edx
++	cfi_adjust_cfa_offset(-4)
++	jmp  *%ecx
++
++L(pseudo_end):
++	ret
++PSEUDO_END (__rfork)
++
++weak_alias (__rfork, rfork)
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/sigcontextinfo.h
+@@ -0,0 +1,35 @@
++/* Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/*
++native FreeBSD:
++        sighandler(int signum, int code,       struct sigcontext * sg, void * fault_ip)
++posix like:
++        sighandler(int signum, siginfo_t * si, struct sigcontext * sg, void * fault_ip)
++*/
++
++#define SIGCONTEXT long _code, struct sigcontext * _sg, void *
++#define SIGCONTEXT_EXTRA_ARGS _code, _sg,
++
++/* really, really, rest of glibc expects that struct sigcontext is the last argument */
++#define GET_PC(ctx)	((void *) (_sg)->sc_eip)
++#define GET_FRAME(ctx)	((void *) (_sg)->sc_ebp)
++#define GET_STACK(ctx)	((void *) (_sg)->sc_esp)
++
++#define CALL_SIGHANDLER(handler, signo, ctx) \
++  (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/start_thread.S
+@@ -0,0 +1,207 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/* __start_thread (flags, stack, func, arg)
++   calls __rfork (flags), and in the child sets the stack pointer and then
++   calls _exit (func (arg)).
++   It cannot be done in portable C.  */
++
++#include <sysdep.h>
++#include <asm-syntax.h>
++#define SIG_SETMASK	3
++
++	.text
++ENTRY (__start_thread)
++	/* End FDE now, because in the child the unwind info will be
++	   wrong.  */
++	cfi_endproc
++
++	/* There is a window of a few instructions, right after the rfork
++	   system call, where the handling of a signal would write garbage
++	   into the stack shared by the parent and the child (assuming
++	   RFMEM is set in flags).  To solve this: 1. We block all signals
++	   around the rfork system call and unblock them afterwards in
++	   the parent and in the child (but only after changing the stack
++	   pointer).  2. The child accesses only values passed in registers
++	   and on its own stack.  This way, if the parent is scheduled to
++	   run first, and handles a signal, it will not affect the child;
++	   and if the child runs first, and handles a signal, it will use
++	   the child's stack and not affect the parent.
++	   We need to pass 7 words of info to the child: stack, func, arg,
++	   and the signal mask to restore.  Since we have only 4 call-saved
++	   registers available (%ebx, %esi, %edi, %ebp), we pass only the
++	   stack pointer in a register, and the rest through the child's
++	   stack.  */
++	pushl	%ebp
++	movl	%esp, %ebp
++	subl	$36, %esp
++	movl	%ebx, 32(%esp)
++
++	movl	8(%ebp), %eax	/* flags */
++	testl	$32, %eax	/* flags & RFMEM */
++	jz	L(simple)
++
++	/* Block all signals.  */
++	movl	$-1, %eax
++	movl	%eax, 16(%esp)
++	movl	%eax, 20(%esp)
++	movl	%eax, 24(%esp)
++	movl	%eax, 28(%esp)
++	leal	16(%esp), %eax
++	movl	$SIG_SETMASK, 4(%esp)
++	movl	%eax, 8(%esp)
++	movl	%eax, 12(%esp)
++	DO_CALL (sigprocmask, 3)
++	jb	L(error)
++
++	/* Copy all info to the child's stack.  */
++	movl	12(%ebp), %ebx	/* stack */
++	subl	$32, %ebx	/* room for func, arg, sigset_t */
++	andl	$-16, %ebx	/* make it 16-bytes aligned */
++	movl	16(%ebp), %eax	/* func */
++	movl	20(%ebp), %edx	/* arg */
++	movl	%eax, 4(%ebx)
++	movl	%edx, (%ebx)
++	movl	16(%esp), %eax	/* sigset_t word 0 */
++	movl	20(%esp), %edx	/* sigset_t word 1 */
++	movl	%eax, 16(%ebx)
++	movl	%edx, 20(%ebx)
++	movl	24(%esp), %eax	/* sigset_t word 2 */
++	movl	28(%esp), %edx	/* sigset_t word 3 */
++	movl	%eax, 24(%ebx)
++	movl	%edx, 28(%ebx)
++
++	/* Perform the rfork system call.  */
++	movl	8(%ebp), %eax	/* flags */
++	movl	%eax, 4(%esp)
++	DO_CALL (rfork, 1)
++	jb	L(error_unmask)
++
++	/* %edx is now 0 for the parent and 1 for the child.  */
++	testl	%edx, %edx
++	jnz	L(child)
++
++	/* Save the child pid, currently in %eax.  */
++	movl	%eax, %ebx
++
++	/* Restore the previous signal mask.  */
++	leal	16(%esp), %eax
++	movl	$SIG_SETMASK, 4(%esp)
++	movl	%eax, 8(%esp)
++	movl	$0, 12(%esp)
++	DO_CALL (sigprocmask, 3)
++
++	/* Return the child pid, currently in %ebx.  */
++	movl	%ebx, %eax
++	addl	$32, %esp
++	popl	%ebx
++	popl	%ebp
++	ret
++
++L(child):/* Here we are in the child thread.  */
++
++	/* Set the stack pointer.  */
++	movl	%ebx, %esp
++	/* Terminate the stack frame.  */
++	subl	%ebp, %ebp
++
++	movl	4(%esp), %edi
++
++	/* Restore the previous signal mask.  */
++	leal	16(%esp), %eax
++	movl	$SIG_SETMASK, 4(%esp)
++	movl	%eax, 8(%esp)
++	movl	$0, 12(%esp)
++	DO_CALL (sigprocmask, 3)
++
++L(child1):
++	/* Call func (arg).  */
++	call	*%edi
++
++	/* Call _exit.  */
++#ifdef PIC
++	call	L(here)
++L(here):
++	popl	%ebx
++	addl	$_GLOBAL_OFFSET_TABLE_+[.-L(here)], %ebx
++#endif
++	pushl	%eax
++	call	HIDDEN_JUMPTARGET (_exit)
++
++L(simple):/* Simple case without signal mask handling.  */
++
++	/* Copy all info to the child's stack.  */
++	movl	12(%ebp), %ebx	/* stack */
++	subl	$8, %ebx	/* room for func, arg */
++	andl	$-16, %ebx	/* make it 16-bytes aligned */
++	movl	16(%ebp), %eax	/* func */
++	movl	20(%ebp), %edx	/* arg */
++	movl	%eax, 4(%ebx)
++	movl	%edx, (%ebx)
++
++	/* Perform the rfork system call.  */
++	movl	8(%ebp), %eax	/* flags */
++	movl	%eax, 4(%esp)
++	DO_CALL (rfork, 1)
++	jb	L(error)
++
++	/* %edx is now 0 for the parent and 1 for the child.  */
++	testl	%edx, %edx
++	jnz	L(simple_child)
++
++	/* Return the child pid, currently in %eax.  */
++	addl	$32, %esp
++	popl	%ebx
++	popl	%ebp
++L(pseudo_end):
++	ret
++
++L(simple_child):/* Here we are in the child thread.  */
++
++	/* Set the stack pointer.  */
++	movl	%ebx, %esp
++	/* Terminate the stack frame.  */
++	subl	%ebp, %ebp
++
++	movl	4(%esp), %edi
++
++	jmp	L(child1)
++
++L(error_unmask):
++
++	/* Save the error code, currently in %eax.  */
++	movl	%eax, %ebx
++
++	/* Restore the previous signal mask.  */
++	leal	16(%esp), %eax
++	movl	$SIG_SETMASK, 4(%esp)
++	movl	%eax, 8(%esp)
++	movl	$0, 12(%esp)
++	DO_CALL (sigprocmask, 3)
++
++	/* load saved error code */
++	movl	%ebx, %eax
++
++L(error):
++	addl	$32, %esp
++	popl	%ebx
++	popl	%ebp
++	jmp	SYSCALL_ERROR_LABEL
++	cfi_startproc
++PSEUDO_END (__start_thread)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/swapcontext.S
+@@ -0,0 +1,32 @@
++/* swap current context.
++   Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++
++.text
++ENTRY(__swapcontext)
++        clc
++        DO_CALL (swapcontext, 2)
++        jb SYSCALL_ERROR_LABEL
++L(pseudo_end):
++	ret
++
++PSEUDO_END(__swapcontext)
++
++weak_alias(__swapcontext, swapcontext)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/sys/io.h
+@@ -0,0 +1,184 @@
++/* Copyright (C) 1996, 2000, 2002, 2004 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef	_SYS_IO_H
++#define	_SYS_IO_H	1
++
++#ifdef _MACHINE_CPUFUNC_H_
++#error "This header must not be used in combination with <machine/cpufunc.h>."
++#endif
++
++#include <features.h>
++
++__BEGIN_DECLS
++
++/* If TURN_ON is TRUE, request for permission to do direct i/o on the
++   port numbers in the range [FROM,FROM+NUM-1].  Otherwise, turn I/O
++   permission off for that range.  This call requires root privileges.
++
++   Portability note: not all kFreeBSD platforms support this call.  Most
++   platforms based on the PC I/O architecture probably will, however. */
++extern int ioperm (unsigned long int __from, unsigned long int __num,
++                   int __turn_on) __THROW;
++
++/* Set the I/O privilege level to LEVEL.  If LEVEL>3, permission to
++   access any I/O port is granted.  This call requires root
++   privileges. */
++extern int iopl (int __level) __THROW;
++
++#if defined __GNUC__ && __GNUC__ >= 2
++
++static __inline unsigned char
++inb (unsigned short int port)
++{
++  unsigned char _v;
++
++  __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (port));
++  return _v;
++}
++
++static __inline unsigned char
++inb_p (unsigned short int port)
++{
++  unsigned char _v;
++
++  __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (port));
++  return _v;
++}
++
++static __inline unsigned short int
++inw (unsigned short int port)
++{
++  unsigned short _v;
++
++  __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (port));
++  return _v;
++}
++
++static __inline unsigned short int
++inw_p (unsigned short int port)
++{
++  unsigned short int _v;
++
++  __asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (port));
++  return _v;
++}
++
++static __inline unsigned int
++inl (unsigned short int port)
++{
++  unsigned int _v;
++
++  __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (port));
++  return _v;
++}
++
++static __inline unsigned int
++inl_p (unsigned short int port)
++{
++  unsigned int _v;
++  __asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (port));
++  return _v;
++}
++
++static __inline void
++outb (unsigned char value, unsigned short int port)
++{
++  __asm__ __volatile__ ("outb %b0,%w1": :"a" (value), "Nd" (port));
++}
++
++static __inline void
++outb_p (unsigned char value, unsigned short int port)
++{
++  __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (value),
++			"Nd" (port));
++}
++
++static __inline void
++outw (unsigned short int value, unsigned short int port)
++{
++  __asm__ __volatile__ ("outw %w0,%w1": :"a" (value), "Nd" (port));
++
++}
++
++static __inline void
++outw_p (unsigned short int value, unsigned short int port)
++{
++  __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (value),
++			"Nd" (port));
++}
++
++static __inline void
++outl (unsigned int value, unsigned short int port)
++{
++  __asm__ __volatile__ ("outl %0,%w1": :"a" (value), "Nd" (port));
++}
++
++static __inline void
++outl_p (unsigned int value, unsigned short int port)
++{
++  __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (value),
++			"Nd" (port));
++}
++
++static __inline void
++insb (unsigned short int port, void *addr, unsigned long int count)
++{
++  __asm__ __volatile__ ("cld ; rep ; insb":"=D" (addr),
++			"=c" (count):"d" (port), "0" (addr), "1" (count));
++}
++
++static __inline void
++insw (unsigned short int port, void *addr, unsigned long int count)
++{
++  __asm__ __volatile__ ("cld ; rep ; insw":"=D" (addr),
++			"=c" (count):"d" (port), "0" (addr), "1" (count));
++}
++
++static __inline void
++insl (unsigned short int port, void *addr, unsigned long int count)
++{
++  __asm__ __volatile__ ("cld ; rep ; insl":"=D" (addr),
++			"=c" (count):"d" (port), "0" (addr), "1" (count));
++}
++
++static __inline void
++outsb (unsigned short int port, const void *addr, unsigned long int count)
++{
++  __asm__ __volatile__ ("cld ; rep ; outsb":"=S" (addr),
++			"=c" (count):"d" (port), "0" (addr), "1" (count));
++}
++
++static __inline void
++outsw (unsigned short int port, const void *addr, unsigned long int count)
++{
++  __asm__ __volatile__ ("cld ; rep ; outsw":"=S" (addr),
++			"=c" (count):"d" (port), "0" (addr), "1" (count));
++}
++
++static __inline void
++outsl (unsigned short int port, const void *addr, unsigned long int count)
++{
++  __asm__ __volatile__ ("cld ; rep ; outsl":"=S" (addr),
++			"=c" (count):"d" (port), "0" (addr), "1" (count));
++}
++
++#endif	/* GNU C */
++
++__END_DECLS
++#endif /* _SYS_IO_H */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/sys/perm.h
+@@ -0,0 +1,43 @@
++/* Copyright (C) 1996, 1999, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_PERM_H
++#define _SYS_PERM_H	1
++
++#include <features.h>
++
++__BEGIN_DECLS
++
++/* Set port input/output permissions.  */
++extern int ioperm (unsigned long int __from, unsigned long int __num,
++		   int __turn_on) __THROW;
++
++
++/* Change I/O privilege level.  */
++extern int iopl (int __level) __THROW;
++
++extern int i386_set_ioperm (unsigned long int __from, unsigned long int __num,
++			    int __turn_on) __THROW;
++
++/* Retrieve a contiguous range of port input/output permissions.  */
++extern int i386_get_ioperm (unsigned long int __from, unsigned long int *__num,
++			    int *__turned_on) __THROW;
++
++__END_DECLS
++
++#endif	/* _SYS_PERM_H */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/sys/vm86.h
+@@ -0,0 +1,53 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_VM86_H
++#define _SYS_VM86_H	1
++
++#include <features.h>
++
++/* Possible values for the 'cmd' argument to i386_vm86.  */
++enum
++  {
++    VM86_INIT = 1,
++#define VM86_INIT VM86_INIT
++    VM86_GET_VME = 3
++#define VM86_GET_VME VM86_GET_VME
++  };
++
++/* Argument structure for VM86_INIT.  */
++struct vm86_init_args
++  {
++    int debug;
++    int cpu_type;
++    unsigned char int_map[32];
++  };
++
++/* Argument structure for VM86_GET_VME.  */
++struct vm86_vme_args
++  {
++    int state;
++  };
++
++__BEGIN_DECLS
++
++extern int i386_vm86 (int __cmd, void *__arg);
++
++__END_DECLS
++
++#endif	/* _SYS_VM86_H */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/sys_fork.S
+@@ -0,0 +1,34 @@
++/* Copyright (C) 1991-1992, 1994-1995, 1997, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++
++.text;
++ENTRY (__syscall_fork)
++	DO_CALL (fork, 0)
++	jb SYSCALL_ERROR_LABEL;
++	/* R1 is now 0 for the parent and 1 for the child.  Decrement it to
++	   make it -1 (all bits set) for the parent, and 0 (no bits set)
++	   for the child.  Then AND it with R0, so the parent gets
++	   R0&-1==R0, and the child gets R0&0==0.  */
++	decl r1
++	andl r1, r0
++L(pseudo_end):
++	ret
++PSEUDO_END (__syscall_fork)
++libc_hidden_def (__syscall_fork)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/sys_freebsd6_lseek.S
+@@ -0,0 +1,32 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++
++/* lseek returns a 64-bit result in %eax, %edx.  This means that in the
++   error case we have to set both %eax and %edx to -1.  */
++
++PSEUDO_NOERRNO(__syscall_freebsd6_lseek, freebsd6_lseek, 4)
++        jnb L(no_error)
++	call SYSCALL_ERROR_LABEL;
++	orl $-1, %edx;
++L(pseudo_end):
++L(no_error):
++	ret
++PSEUDO_END(__syscall_freebsd6_lseek)
++libc_hidden_def (__syscall_freebsd6_lseek)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/sys_lseek.S
+@@ -0,0 +1,32 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++
++/* lseek returns a 64-bit result in %eax, %edx.  This means that in the
++   error case we have to set both %eax and %edx to -1.  */
++
++PSEUDO_NOERRNO(__syscall_lseek, lseek, 3)
++        jnb L(no_error)
++	call SYSCALL_ERROR_LABEL;
++	orl $-1, %edx;
++L(pseudo_end):
++L(no_error):
++	ret
++PSEUDO_END(__syscall_lseek)
++libc_hidden_def (__syscall_lseek)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/sysarch.h
+@@ -0,0 +1,81 @@
++/* Parameters for the architecture specific system call.  i386 version.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYSARCH_H
++#define _SYSARCH_H	1
++
++#include <features.h>
++
++/* Function that can be used as first argument to 'sysarch'.  */
++enum
++  {
++    I386_GET_LDT = 0,
++#define I386_GET_LDT I386_GET_LDT
++    I386_SET_LDT = 1,
++#define I386_SET_LDT I386_SET_LDT
++    I386_GET_IOPERM = 3,
++#define I386_GET_IOPERM I386_GET_IOPERM
++    I386_SET_IOPERM = 4,
++#define I386_SET_IOPERM I386_SET_IOPERM
++    I386_VM86 = 6,
++#define I386_VM86 I386_VM86
++    I386_GET_FSBASE = 7,
++#define I386_GET_FSBASE I386_GET_FSBASE
++    I386_SET_FSBASE = 8,
++#define I386_SET_FSBASE I386_SET_FSBASE
++    I386_GET_GSBASE = 9,
++#define I386_GET_GSBASE I386_GET_GSBASE
++    I386_SET_GSBASE = 10
++#define I386_SET_GSBASE I386_SET_GSBASE
++  };
++
++/* Argument struct for I386_GET_LDT and I386_SET_LDT.  */
++struct i386_ldt_args
++  {
++    int start;
++    union descriptor *descs;
++    int num;
++  };
++
++/* Argument struct for I386_GET_IOPERM and I386_SET_IOPERM.  */
++struct i386_ioperm_args
++  {
++    unsigned int start;
++    unsigned int length;
++    int enable;
++  };
++
++/* Argument struct for I386_VM86.  */
++struct i386_vm86_args
++  {
++    int sub_op;
++    void *sub_args;
++  };
++
++__BEGIN_DECLS
++
++extern int sysarch (int __cmd, void *__arg);
++
++#ifdef _LIBC
++extern int __sysarch (int __cmd, void *__arg);
++#endif
++
++__END_DECLS
++
++#endif /* _SYSARCH_H */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/syscall.S
+@@ -0,0 +1,34 @@
++/* Copyright (C) 1993, 1995-1998, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++
++	  .text;
++ENTRY (__syscall)
++	popl %ecx		/* Pop return address into %ecx.  */
++	cfi_adjust_cfa_offset (-4)
++	movl 0(%esp), %eax	/* Load syscall number into %eax. */
++	int $0x80		/* Do the system call.  */
++	pushl %ecx		/* Push back return address.  */
++	cfi_adjust_cfa_offset (4)
++	jb SYSCALL_ERROR_LABEL;	/* Jump to error handler if error.  */
++
++L(pseudo_end):
++	ret			/* Return to caller.  */
++PSEUDO_END (__syscall)
++weak_alias (__syscall, syscall)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/syscalls-internal.h
+@@ -0,0 +1,88 @@
++/* generally used "internal syscalls"
++   Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef KFREEBSD_INTERNAL_SYSCALLS_H
++#define KFREEBSD_INTERNAL_SYSCALLS_H
++
++#include <sys/syscall.h>
++
++/* 
++   for now, we do not care whether syscall succeeded,
++   we do not have defined 
++   INTERNAL_SYSCALL_ERROR_P and INTERNAL_SYSCALL_ERRNO
++   we do not store errno at all
++   to be sure, we return void
++*/
++
++#undef INTERNAL_SYSCALL_DECL
++#undef INTERNAL_SYSCALL_NCS
++#undef INTERNAL_SYSCALL
++#undef INTERNAL_SYSCALL_ERROR_P
++#undef INTERNAL_SYSCALL_ERRNO
++
++#define INTERNAL_SYSCALL_DECL(err)		\
++  do { } while (0)
++
++#define INTERNAL_SYSCALL(name, err, nr, args...) \
++  INTERNAL_SYSCALL_##name(name, err, nr, ##args)
++     
++     
++#define INTERNAL_SYSCALL_close(name, err, nr, fd) \
++(void)({                                        \
++  register long int _a1 = (long int) (fd);	\
++  register long int result;			\
++  asm volatile (                                \
++                "pushl %2\n\t"                  \
++                "pushl %1\n\t"                  \
++                "int $0x80\n\t"                 \
++                "popl %2\n\t"                   \
++                "popl %2\n\t"                   \
++                : "=a" (result)                 \
++                : "0" ((long int) SYS_##name),	\
++                  "d" (_a1)                   	\
++                : "memory", "cc" );             \
++  result;                                       \
++})
++
++#define INTERNAL_SYSCALL_writev(name, err, nr, fd, iov, cnt) \
++(void)({                                        \
++  register long int _a1 = (long int) (fd);	\
++  register long int _a2 = (long int) (iov);	\
++  register long int _a3 = (long int) (cnt);	\
++  register long int result;			\
++  register long int _trash;			\
++  asm volatile (                                \
++                "pushl %5\n\t"                  \
++                "pushl %4\n\t"                  \
++                "pushl %3\n\t"                  \
++                "pushl %2\n\t"                  \
++                "int $0x80\n\t"                 \
++                "addl $16,%%esp\n\t"		\
++                : "=a" (result),		\
++                  "=d" (_trash)                 \
++                : "0" ((long int) SYS_##name),	\
++                  "ri" (_a1),			\
++                  "ri" (_a2),			\
++                  "ri" (_a3)			\
++              /*   may be even "g" constraint could be used */ \
++              /*   but we have to worry about esp register and esp based address */ \
++                : "memory", "cc" );             \
++  result;                                       \
++})
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/sysdep.S
+@@ -0,0 +1,38 @@
++/* Copyright (C) 1995-1998, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++
++/* The following code is only used in the shared library when we
++   compile the reentrant version.  Otherwise each system call defines
++   its own version.  */
++
++#ifndef PIC
++
++/* The syscall stubs jump here when they detect an error.
++   The code for FreeBSD is identical to the canonical Unix/i386 code.  */
++
++#undef CALL_MCOUNT
++#define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %eax.  */
++
++	.text
++ENTRY (__syscall_error)
++#define __syscall_error __syscall_error_1
++#include <sysdeps/unix/i386/sysdep.S>
++
++#endif	/* !PIC */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/sysdep.h
+@@ -0,0 +1,240 @@
++/* Copyright (C) 1992,1993,1995-2000,2002,2003,2004
++   Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper, <drepper@gnu.org>, August 1995.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _FREEBSD_I386_SYSDEP_H
++#define _FREEBSD_I386_SYSDEP_H 1
++
++/* There is some commonality.  */
++#include <sysdeps/unix/i386/sysdep.h>
++#include <bp-sym.h>
++#include <bp-asm.h>
++/* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO.  */
++#include <dl-sysdep.h>
++#include <tls.h>
++
++#if defined __i686 && defined __ASSEMBLER__
++#undef __i686
++#define __i686 __i686
++#endif
++
++#ifdef __ASSEMBLER__
++
++/* We don't want the label for the error handle to be global when we define
++   it here.  */
++#ifdef PIC
++# define SYSCALL_ERROR_LABEL 0f
++#else
++# define SYSCALL_ERROR_LABEL syscall_error
++#endif
++
++#undef	PSEUDO
++#define	PSEUDO(name, syscall_name, args)				      \
++  .text;								      \
++  ENTRY (name)								      \
++    DO_CALL (syscall_name, args);					      \
++    jb SYSCALL_ERROR_LABEL;						      \
++  L(pseudo_end):
++
++#undef	PSEUDO_END
++#define	PSEUDO_END(name)						      \
++  SYSCALL_ERROR_HANDLER							      \
++  END (name)
++
++#undef	PSEUDO_NOERRNO
++#define	PSEUDO_NOERRNO(name, syscall_name, args)			      \
++  .text;								      \
++  ENTRY (name)								      \
++    DO_CALL (syscall_name, args)
++
++#undef	PSEUDO_END_NOERRNO
++#define	PSEUDO_END_NOERRNO(name)					      \
++  END (name)
++
++#define ret_NOERRNO ret
++
++/* The function has to return the error code.  */
++#undef	PSEUDO_ERRVAL
++#define	PSEUDO_ERRVAL(name, syscall_name, args) \
++  .text;								      \
++  ENTRY (name)								      \
++    DO_CALL (syscall_name, args);					      \
++
++#undef	PSEUDO_END_ERRVAL
++#define	PSEUDO_END_ERRVAL(name) \
++  END (name)
++
++#define ret_ERRVAL ret
++
++#ifndef PIC
++# define SYSCALL_ERROR_HANDLER	/* Nothing here; code in sysdep.S is used.  */
++#else
++
++# if RTLD_PRIVATE_ERRNO
++#  define SYSCALL_ERROR_HANDLER						      \
++0:SETUP_PIC_REG(cx);							      \
++  addl $_GLOBAL_OFFSET_TABLE_, %ecx;					      \
++  movl %eax, rtld_errno@GOTOFF(%ecx);					      \
++  orl $-1, %eax;							      \
++  jmp L(pseudo_end);
++
++# elif defined _LIBC_REENTRANT
++
++#  if USE___THREAD
++#   ifndef NOT_IN_libc
++#    define SYSCALL_ERROR_ERRNO __libc_errno
++#   else
++#    define SYSCALL_ERROR_ERRNO errno
++#   endif
++#   define SYSCALL_ERROR_HANDLER					      \
++0:SETUP_PIC_REG (cx);							      \
++  addl $_GLOBAL_OFFSET_TABLE_, %ecx;					      \
++  movl SYSCALL_ERROR_ERRNO@GOTNTPOFF(%ecx), %ecx;			      \
++  SYSCALL_ERROR_HANDLER_TLS_STORE (%eax, %ecx);				      \
++  orl $-1, %eax;							      \
++  jmp L(pseudo_end);
++#   ifndef NO_TLS_DIRECT_SEG_REFS
++#    define SYSCALL_ERROR_HANDLER_TLS_STORE(src, destoff)		      \
++  movl src, %gs:(destoff)
++#   else
++#    define SYSCALL_ERROR_HANDLER_TLS_STORE(src, destoff)		      \
++  addl %gs:0, destoff;							      \
++  movl src, (destoff)
++#   endif
++#  else
++#   define SYSCALL_ERROR_HANDLER					      \
++0:pushl %ebx;								      \
++  cfi_adjust_cfa_offset (4);                                                  \
++  cfi_rel_offset (ebx, 0);                                                    \
++  SETUP_PIC_REG (bx);							      \
++  addl $_GLOBAL_OFFSET_TABLE_, %ebx;					      \
++  pushl %eax;								      \
++  cfi_adjust_cfa_offset (4);                                                  \
++  PUSH_ERRNO_LOCATION_RETURN;						      \
++  call BP_SYM (__errno_location)@PLT;					      \
++  POP_ERRNO_LOCATION_RETURN;						      \
++  popl %ecx;								      \
++  cfi_adjust_cfa_offset (-4);                                                 \
++  popl %ebx;								      \
++  cfi_adjust_cfa_offset (-4);                                                 \
++  cfi_restore (ebx);                                                          \
++  movl %ecx, (%eax);							      \
++  orl $-1, %eax;							      \
++  jmp L(pseudo_end);
++/* A quick note: it is assumed that the call to `__errno_location' does
++   not modify the stack!  */
++#  endif
++# else
++/* Store (%eax) into errno through the GOT.  */
++#  define SYSCALL_ERROR_HANDLER						      \
++0:SETUP_PIC_REG(cx);							      \
++  addl $_GLOBAL_OFFSET_TABLE_, %ecx;					      \
++  movl errno@GOT(%ecx), %ecx;						      \
++  movl %eax, (%ecx);							      \
++  orl $-1, %eax;							      \
++  jmp L(pseudo_end);
++# endif	/* _LIBC_REENTRANT */
++#endif	/* PIC */
++
++/*
++    FreeBSD expects the system call arguments on the stack,
++   syscall number is in %eax.
++   return value is in %eax + %edx
++   error is signaled via cflags.
++   all other data registers are preserved
++
++	syscall number	%eax	     call-clobbered
++
++   The stack layout upon entering the function is:
++
++	20(%esp)	Arg# 5
++	16(%esp)	Arg# 4
++	12(%esp)	Arg# 3
++	 8(%esp)	Arg# 2
++	 4(%esp)	Arg# 1
++	  (%esp)	Return address
++
++   (Of course a function with say 3 arguments does not have entries for
++   arguments 4 and 5.)
++
++*/
++
++#undef	DO_CALL
++#define DO_CALL(syscall_name, args)			      		      \
++    movl $SYS_ify (syscall_name), %eax;					      \
++    int $0x80								      \
++
++#else	/* !__ASSEMBLER__ */
++
++#include <syscalls-inline.h>
++
++/* Consistency check for position-independent code.  */
++#ifdef __PIC__
++# define check_consistency()						      \
++  ({ int __res;								      \
++     __asm__ __volatile__						      \
++       ("call __i686.get_pc_thunk.cx;"					      \
++	"addl $_GLOBAL_OFFSET_TABLE_, %%ecx;"				      \
++	"subl %%ebx, %%ecx;"						      \
++	"je 1f;"							      \
++	"ud2;"								      \
++	"1:\n"								      \
++	".section .gnu.linkonce.t.__i686.get_pc_thunk.cx,\"ax\",@progbits;"   \
++	".globl __i686.get_pc_thunk.cx;"				      \
++	".hidden __i686.get_pc_thunk.cx;"				      \
++	".type __i686.get_pc_thunk.cx,@function;"			      \
++	"__i686.get_pc_thunk.cx:"					      \
++	"movl (%%esp), %%ecx;"						      \
++	"ret;"								      \
++	".previous"							      \
++	: "=c" (__res));						      \
++     __res; })
++#endif
++
++#endif	/* __ASSEMBLER__ */
++
++
++/* Pointer mangling support.  */
++#if defined NOT_IN_libc && defined IS_IN_rtld
++/* We cannot use the thread descriptor because in ld.so we use setjmp
++   earlier than the descriptor is initialized.  Using a global variable
++   is too complicated here since we have no PC-relative addressing mode.  */
++#else
++# ifdef __ASSEMBLER__
++#  define PTR_MANGLE(reg)	xorl %gs:POINTER_GUARD, reg;		      \
++				roll $9, reg
++#  define PTR_DEMANGLE(reg)	rorl $9, reg;				      \
++				xorl %gs:POINTER_GUARD, reg
++# else
++#  define PTR_MANGLE(var)	asm ("xorl %%gs:%c2, %0\n"		      \
++				     "roll $9, %0"			      \
++				     : "=r" (var)			      \
++				     : "0" (var),			      \
++				       "i" (offsetof (tcbhead_t,	      \
++						      pointer_guard)))
++#  define PTR_DEMANGLE(var)	asm ("rorl $9, %0\n"			      \
++				     "xorl %%gs:%c2, %0"		      \
++				     : "=r" (var)			      \
++				     : "0" (var),			      \
++				       "i" (offsetof (tcbhead_t,	      \
++						      pointer_guard)))
++# endif
++#endif
++
++#endif /* _FREEBSD_I386_SYSDEP_H */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/ucontext_i.h
+@@ -0,0 +1,38 @@
++/* Offsets and other constants needed in the *context() function
++   implementation.
++   Copyright (C) 2001 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/* Offsets of the fields in the ucontext_t structure.  */
++#define oSIGMASK	0
++#define oGS		20
++#define oFS		24
++#define oEDI		36
++#define oESI		40
++#define oEBP		44
++#define oEBX		52
++#define oEDX		56
++#define oECX		60
++#define oEAX		64
++
++#define oEIP		76
++#define oESP		88
++
++#define oLINK		656
++#define oSS_SP		660
++#define oSS_SIZE	664
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/vfork.S
+@@ -0,0 +1,58 @@
++/* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++
++/* Clone the calling process, but without copying the whole address space.
++   The calling process is suspended until the new process exits or is
++   replaced by a call to `execve'.  Return -1 for errors, 0 to the new process,
++   and the process ID of the new process to the old process.  */
++
++ENTRY (__vfork)
++
++	/* Pop the return PC value into ECX.  */
++	popl	%ecx
++	cfi_adjust_cfa_offset(-4)
++
++	/* Perform the system call.  */
++	DO_CALL (vfork, 0)
++	jb	L(error)	/* Branch forward if it failed.  */
++
++	/* In the parent process, %edx == 0, %eax == child pid.  */
++	/* In the child process, %edx == 1, %eax == parent pid.  */
++
++	/* Change %eax to be 0 in the child process.  */
++	decl	%edx
++	andl	%edx, %eax
++
++	/* Jump to the return PC.  */
++	jmp	*%ecx
++
++L(error):
++	/* Push back the return PC.  */
++	pushl	%ecx
++	cfi_adjust_cfa_offset(4)
++
++	/* Branch to the error handler, hidden in PSEUDO_END.  */
++	jmp	SYSCALL_ERROR_LABEL
++L(pseudo_end):
++	ret
++PSEUDO_END (__vfork)
++libc_hidden_def (__vfork)
++
++weak_alias (__vfork, vfork)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/if_index.c
+@@ -0,0 +1,311 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <net/if.h>
++#include <sys/sysctl.h>
++#include <sys/socket.h>
++#include <net/route.h>
++#include <net/if_dl.h>
++#include <alloca.h>
++#include <stdlib.h>
++#include <errno.h>
++#include <string.h>
++
++
++typedef int (*if_fn) (void *private, unsigned int index, const char *name);
++
++/* Iterate through all present interfaces.
++   Call FN once for every interface, returning immediately if FN returns
++   a nonzero value.  */
++static void
++if_iterate (if_fn fn, void *private)
++{
++  int request[6] = { CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, 0 };
++  char *buf;
++  size_t bufsize = 512;
++  char *bufend;
++  char *p;
++
++  /* Call the kernel function sysctl_iflist() in /usr/src/sys/net/rtsock.c.  */
++  for (;;)
++    {
++      buf = alloca (bufsize);
++      if (__sysctl (request, 6, buf, &bufsize, NULL, 0) >= 0)
++	break;
++      if (errno != ENOMEM)
++	return;
++      bufsize *= 2;
++    }
++
++  bufend = buf + bufsize;
++  for (p = buf; p < bufend; )
++    {
++      struct if_msghdr *msg = (struct if_msghdr *) p;
++
++      if (msg->ifm_version != RTM_VERSION)
++	abort ();
++
++      switch (msg->ifm_type)
++	{
++	case RTM_IFINFO:
++	  if (msg->ifm_addrs & RTA_IFP)
++	    {
++	      unsigned int index;
++	      struct sockaddr_dl *sdl;
++	      char namebuf[IFNAMSIZ + 1];
++	      size_t namelen;
++
++	      index = msg->ifm_index;
++	      if (index == 0)
++		abort ();
++
++	      /* FIXME: 'struct if_msghdr' contains a 'struct if_data' which in turns
++	         contains 'unsigned long' values. Their size therefore depends on
++		 the running kernel (32 or 64 bits). This should be fixed in the
++		 compat layer of the kernel. Meanwhile just workaround the bug here/ */
++#if 0
++	      sdl = (struct sockaddr_dl *) (msg + 1);
++#else
++	      sdl = (struct sockaddr_dl *) (p + msg->ifm_msglen - sizeof(struct sockaddr_dl) - 2);
++#endif
++	      namelen = sdl->sdl_nlen;
++	      /* Avoid overflowing namebuf[].  */
++	      if (namelen > IFNAMSIZ)
++		namelen = IFNAMSIZ;
++	      memcpy (namebuf, sdl->sdl_data, namelen);
++	      namebuf[namelen] = '\0';
++
++	      /* Call FN now.  */
++	      if (fn (private, index, namebuf))
++		return;
++	    }
++	  break;
++
++	case RTM_NEWADDR:
++	  break;
++
++	default:
++	  abort ();
++	}
++
++      p += msg->ifm_msglen;
++    }
++}
++
++/* ------------------------------------------------------------------------- */
++
++struct nametoindex_locals
++  {
++    const char *name;
++    unsigned int index;
++  };
++
++static int
++nametoindex_aux (void *private, unsigned int index, const char *name)
++{
++  struct nametoindex_locals *l = (struct nametoindex_locals *) private;
++  if (strcmp (name, l->name) == 0)
++    {
++      l->index = index;
++      return 1;
++    }
++  return 0;
++}
++
++/* Return the index of an interface given by name.  */
++unsigned int
++if_nametoindex (const char *ifname)
++{
++  struct nametoindex_locals l;
++
++  l.name = ifname;
++  l.index = 0;
++  if_iterate (nametoindex_aux, &l);
++
++  return l.index;
++}
++libc_hidden_def (if_nametoindex)
++
++/* ------------------------------------------------------------------------- */
++
++struct indextoname_locals
++  {
++    unsigned int index;
++    char *name;
++    char *retval;
++  };
++
++static int
++indextoname_aux (void *private, unsigned int index, const char *name)
++{
++  struct indextoname_locals *l = (struct indextoname_locals *) private;
++  if (index == l->index)
++    {
++      strncpy (l->name, name, IF_NAMESIZE);
++      l->retval = l->name;
++      return 1;
++    }
++  __set_errno (ENXIO);
++  return 0;
++}
++
++/* Return the name of an interface given by name.  */
++char *
++if_indextoname (unsigned int ifindex, char *ifname)
++{
++  struct indextoname_locals l;
++
++  l.index = ifindex;
++  l.name = ifname;
++  l.retval = NULL;
++  if_iterate (indextoname_aux, &l);
++  return l.retval;
++}
++libc_hidden_def (if_indextoname)
++
++/* ------------------------------------------------------------------------- */
++
++struct nameindex_locals
++  {
++    /* Resizable array of 'struct if_nameindex'.  */
++    struct if_nameindex *s_array;
++    size_t s_len;
++    size_t s_allocated;
++    /* Resizable array of char.  */
++    char *c_array;
++    size_t c_len;
++    size_t c_allocated;
++    /* Out-of-memory indicator.  */
++    int oom;
++  };
++
++static void
++add_s (struct nameindex_locals *l, unsigned int index, char *name)
++{
++  if (l->s_len == l->s_allocated)
++    {
++      size_t new_allocated = 2 * l->s_allocated + 1;
++      struct if_nameindex *new_array =
++	(struct if_nameindex *)
++	realloc (l->s_array, new_allocated * sizeof (struct if_nameindex));
++      if (new_array == NULL)
++	{
++	  l->oom = 1;
++	  return;
++	}
++      l->s_array = new_array;
++      l->s_allocated = new_allocated;
++    }
++  /* Now l->s_len < l->s_allocated.  */
++  l->s_array[l->s_len].if_index = index;
++  l->s_array[l->s_len].if_name = name;
++  l->s_len++;
++}
++
++static __inline size_t
++add_c (struct nameindex_locals *l, const char *name)
++{
++  size_t n = strlen (name) + 1;
++  size_t result_offset;
++  if (l->c_len + n > l->c_allocated)
++    {
++      size_t new_allocated =
++	(l->c_len + n < 2 * l->c_allocated + 1
++	 ? 2 * l->c_allocated + 1
++	 : l->c_len + n);
++      char *new_array = (char *) realloc (l->c_array, new_allocated);
++      if (new_array == NULL)
++	{
++	  l->oom = 1;
++	  return 0;
++	}
++      l->c_array = new_array;
++      l->c_allocated = new_allocated;
++    }
++  /* Now l->c_len + n <= l->c_allocated.  */
++  result_offset = l->c_len;
++  memcpy (l->c_array + l->c_len, name, n);
++  l->c_len += n;
++  return result_offset;
++}
++
++static int
++nameindex_aux (void *private, unsigned int index, const char *name)
++{
++  struct nameindex_locals *l = (struct nameindex_locals *) private;
++
++  size_t name_offset = add_c (l, name);
++  if (!l->oom)
++    {
++      add_s (l, index, (char *) NULL + name_offset);
++      if (!l->oom)
++	return 0;
++    }
++  return 1;
++}
++
++/* Return an array of 'struct if_nameindex', one for each present
++   interface.  */
++struct if_nameindex *
++if_nameindex (void)
++{
++  struct nameindex_locals l;
++
++  l.s_array = NULL; l.s_len = 0; l.s_allocated = 0;
++  l.c_array = NULL; l.c_len = 0; l.c_allocated = 0;
++  l.oom = 0;
++  if_iterate (nameindex_aux, &l);
++  if (!l.oom)
++    {
++      /* Convert all offsets to real pointers.  */
++      struct if_nameindex *p;
++      struct if_nameindex *p_end;
++
++      for (p = l.s_array, p_end = p + l.s_len; p < p_end; p++)
++	p->if_name = l.c_array + (p->if_name - (char *) NULL);
++
++      /* Add a terminating entry.  */
++      add_s (&l, 0, NULL);
++    }
++  if (l.oom)
++    {
++      free (l.s_array);
++      free (l.c_array);
++      __set_errno (ENOMEM);
++      return NULL;
++    }
++  return l.s_array;
++}
++libc_hidden_def (if_nameindex)
++
++/* ------------------------------------------------------------------------- */
++
++/* Free an array returned by if_nameindex().  */
++void
++if_freenameindex (struct if_nameindex *ifn)
++{
++  if (ifn != NULL)
++    {
++      /* Free c_array.  */
++      free (ifn[0].if_name);
++      /* Free s_array.  */
++      free (ifn);
++    }
++}
++libc_hidden_def (if_freenameindex)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ifaddrs.c
+@@ -0,0 +1,362 @@
++/*	$KAME: getifaddrs.c,v 1.9 2001/08/20 02:31:20 itojun Exp $	*/
++
++/*
++ * Copyright (c) 1995, 1999
++ *	Berkeley Software Design, Inc.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ *
++ * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	BSDI getifaddrs.c,v 2.12 2000/02/23 14:51:59 dab Exp
++ */
++
++#include <sys/cdefs.h>
++
++ /*
++__FBSDID("$FreeBSD: src/lib/libc/net/getifaddrs.c,v 1.6 2002/07/25 08:08:30 ume Exp $");
++ */
++
++#include <sys/types.h>
++#include <sys/ioctl.h>
++#include <sys/socket.h>
++#include <sys/sysctl.h>
++#include <net/if.h>
++
++#ifdef	NET_RT_IFLIST
++#include <sys/param.h>
++#include <net/route.h>
++#include <sys/sysctl.h>
++#include <net/if_dl.h>
++#else
++#error NET_RT_IFLIST is required
++#endif
++
++#include <errno.h>
++#include <ifaddrs.h>
++#include <stdlib.h>
++#include <string.h>
++
++#if !defined(AF_LINK)
++#define	SA_LEN(sa)	sizeof(struct sockaddr)
++#endif
++
++#if !defined(SA_LEN)
++#define	SA_LEN(sa)	(sa)->sa_len
++#endif
++
++#define	SALIGN	(sizeof(long) - 1)
++#define	SA_RLEN(sa)	((sa)->sa_len ? (((sa)->sa_len + SALIGN) & ~SALIGN) : (SALIGN + 1))
++
++#ifndef	ALIGNBYTES
++/*
++ * On systems with a routing socket, ALIGNBYTES should match the value
++ * that the kernel uses when building the messages.
++ */
++#define	ALIGNBYTES	XXX
++#endif
++#ifndef	ALIGN
++#define	ALIGN(p)	(((u_long)(p) + ALIGNBYTES) &~ ALIGNBYTES)
++#endif
++
++#define	HAVE_IFM_DATA
++#define MAX_SYSCTL_TRY 5
++
++int
++getifaddrs(struct ifaddrs **pif)
++{
++	int icnt = 1;
++	int dcnt = 0;
++	int ncnt = 0;
++#ifdef	NET_RT_IFLIST
++	int ntry = 0;
++	int mib[6];
++	size_t needed;
++	char *buf;
++	char *next;
++	struct ifaddrs *cif = 0;
++	char *p, *p0;
++	struct rt_msghdr *rtm;
++	struct if_msghdr *ifm;
++	struct ifa_msghdr *ifam;
++	struct sockaddr_dl *dl;
++	struct sockaddr *sa;
++	struct ifaddrs *ifa, *ift;
++	u_short idx = 0;
++#else	/* NET_RT_IFLIST */
++#endif	/* NET_RT_IFLIST */
++	int i;
++	size_t len, alen;
++	char *data;
++	char *names;
++
++#ifdef	NET_RT_IFLIST
++	mib[0] = CTL_NET;
++	mib[1] = PF_ROUTE;
++	mib[2] = 0;             /* protocol */
++	mib[3] = 0;             /* wildcard address family */
++	mib[4] = NET_RT_IFLIST;
++	mib[5] = 0;             /* no flags */
++	do {
++		/*
++		 * We'll try to get addresses several times in case that
++		 * the number of addresses is unexpectedly increased during
++		 * the two sysctl calls.  This should rarely happen, but we'll
++		 * try to do our best for applications that assume success of
++		 * this library (which should usually be the case).
++		 * Portability note: since FreeBSD does not add margin of
++		 * memory at the first sysctl, the possibility of failure on
++		 * the second sysctl call is a bit higher.
++		 */
++
++		if (__sysctl(mib, 6, NULL, &needed, NULL, 0) < 0)
++			return (-1);
++		if ((buf = malloc(needed)) == NULL)
++			return (-1);
++		if (__sysctl(mib, 6, buf, &needed, NULL, 0) < 0) {
++			if (errno != ENOMEM || ++ntry >= MAX_SYSCTL_TRY) {
++				free(buf);
++				return (-1);
++			}
++			free(buf);
++			buf = NULL;
++		}
++	} while (buf == NULL);
++
++	for (next = buf; next < buf + needed; next += rtm->rtm_msglen) {
++		rtm = (struct rt_msghdr *)(void *)next;
++		if (rtm->rtm_version != RTM_VERSION)
++			continue;
++		switch (rtm->rtm_type) {
++		case RTM_IFINFO:
++			ifm = (struct if_msghdr *)(void *)rtm;
++			if (ifm->ifm_addrs & RTA_IFP) {
++				idx = ifm->ifm_index;
++				++icnt;
++				dl = (struct sockaddr_dl *)(void *)(ifm + 1);
++				dcnt += SA_RLEN((struct sockaddr *)(void*)dl) +
++				    ALIGNBYTES;
++#ifdef	HAVE_IFM_DATA
++				dcnt += sizeof(ifm->ifm_data);
++#endif	/* HAVE_IFM_DATA */
++				ncnt += dl->sdl_nlen + 1;
++			} else
++				idx = 0;
++			break;
++
++		case RTM_NEWADDR:
++			ifam = (struct ifa_msghdr *)(void *)rtm;
++			if (idx && ifam->ifam_index != idx)
++			{
++				errno = EINVAL;		/* this cannot happen */
++				return -1;
++			};
++#define	RTA_MASKS	(RTA_NETMASK | RTA_IFA | RTA_BRD)
++			if (idx == 0 || (ifam->ifam_addrs & RTA_MASKS) == 0)
++				break;
++			p = (char *)(void *)(ifam + 1);
++			++icnt;
++#ifdef	HAVE_IFAM_DATA
++			dcnt += sizeof(ifam->ifam_data) + ALIGNBYTES;
++#endif	/* HAVE_IFAM_DATA */
++			/* Scan to look for length of address */
++			alen = 0;
++			for (p0 = p, i = 0; i < RTAX_MAX; i++) {
++				if ((RTA_MASKS & ifam->ifam_addrs & (1 << i))
++				    == 0)
++					continue;
++				sa = (struct sockaddr *)(void *)p;
++				len = SA_RLEN(sa);
++				if (i == RTAX_IFA) {
++					alen = len;
++					break;
++				}
++				p += len;
++			}
++			for (p = p0, i = 0; i < RTAX_MAX; i++) {
++				if ((RTA_MASKS & ifam->ifam_addrs & (1 << i))
++				    == 0)
++					continue;
++				sa = (struct sockaddr *)(void *)p;
++				len = SA_RLEN(sa);
++				if (i == RTAX_NETMASK && SA_LEN(sa) == 0)
++					dcnt += alen;
++				else
++					dcnt += len;
++				p += len;
++			}
++			break;
++		}
++	}
++#else	/* NET_RT_IFLIST */
++#endif	/* NET_RT_IFLIST */
++
++	if (icnt + dcnt + ncnt == 1) {
++		*pif = NULL;
++		free(buf);
++		return (0);
++	}
++	data = malloc(sizeof(struct ifaddrs) * icnt + dcnt + ncnt);
++	if (data == NULL) {
++		free(buf);
++		return(-1);
++	}
++
++	ifa = (struct ifaddrs *)(void *)data;
++	data += sizeof(struct ifaddrs) * icnt;
++	names = data + dcnt;
++
++	memset(ifa, 0, sizeof(struct ifaddrs) * icnt);
++	ift = ifa;
++
++#ifdef	NET_RT_IFLIST
++	idx = 0;
++	for (next = buf; next < buf + needed; next += rtm->rtm_msglen) {
++		rtm = (struct rt_msghdr *)(void *)next;
++		if (rtm->rtm_version != RTM_VERSION)
++			continue;
++		switch (rtm->rtm_type) {
++		case RTM_IFINFO:
++			ifm = (struct if_msghdr *)(void *)rtm;
++			if (ifm->ifm_addrs & RTA_IFP) {
++				idx = ifm->ifm_index;
++				dl = (struct sockaddr_dl *)(void *)(ifm + 1);
++
++				cif = ift;
++				ift->ifa_name = names;
++				ift->ifa_flags = (int)ifm->ifm_flags;
++				memcpy(names, dl->sdl_data,
++				    (size_t)dl->sdl_nlen);
++				names[dl->sdl_nlen] = 0;
++				names += dl->sdl_nlen + 1;
++
++				ift->ifa_addr = (struct sockaddr *)(void *)data;
++				memcpy(data, dl,
++				    (size_t)SA_LEN((struct sockaddr *)
++				    (void *)dl));
++				data += SA_RLEN((struct sockaddr *)(void *)dl);
++
++#ifdef	HAVE_IFM_DATA
++				/* ifm_data needs to be aligned */
++				ift->ifa_data = data = (void *)ALIGN(data);
++				memcpy(data, &ifm->ifm_data, sizeof(ifm->ifm_data));
++ 				data += sizeof(ifm->ifm_data);
++#else	/* HAVE_IFM_DATA */
++				ift->ifa_data = NULL;
++#endif	/* HAVE_IFM_DATA */
++
++				ift = (ift->ifa_next = ift + 1);
++			} else
++				idx = 0;
++			break;
++
++		case RTM_NEWADDR:
++			ifam = (struct ifa_msghdr *)(void *)rtm;
++			if (idx && ifam->ifam_index != idx)
++			{
++				errno = EINVAL;		/* this cannot happen */
++				return -1;
++			};
++			if (idx == 0 || (ifam->ifam_addrs & RTA_MASKS) == 0)
++				break;
++			ift->ifa_name = cif->ifa_name;
++			ift->ifa_flags = cif->ifa_flags;
++			ift->ifa_data = NULL;
++			p = (char *)(void *)(ifam + 1);
++			/* Scan to look for length of address */
++			alen = 0;
++			for (p0 = p, i = 0; i < RTAX_MAX; i++) {
++				if ((RTA_MASKS & ifam->ifam_addrs & (1 << i))
++				    == 0)
++					continue;
++				sa = (struct sockaddr *)(void *)p;
++				len = SA_RLEN(sa);
++				if (i == RTAX_IFA) {
++					alen = len;
++					break;
++				}
++				p += len;
++			}
++			for (p = p0, i = 0; i < RTAX_MAX; i++) {
++				if ((RTA_MASKS & ifam->ifam_addrs & (1 << i))
++				    == 0)
++					continue;
++				sa = (struct sockaddr *)(void *)p;
++				len = SA_RLEN(sa);
++				switch (i) {
++				case RTAX_IFA:
++					ift->ifa_addr =
++					    (struct sockaddr *)(void *)data;
++					memcpy(data, p, len);
++					data += len;
++					break;
++
++				case RTAX_NETMASK:
++					ift->ifa_netmask =
++					    (struct sockaddr *)(void *)data;
++					if (SA_LEN(sa) == 0) {
++						memset(data, 0, alen);
++						data += alen;
++						break;
++					}
++					memcpy(data, p, len);
++					data += len;
++					break;
++
++				case RTAX_BRD:
++					ift->ifa_broadaddr =
++					    (struct sockaddr *)(void *)data;
++					memcpy(data, p, len);
++					data += len;
++					break;
++				}
++				p += len;
++			}
++
++#ifdef	HAVE_IFAM_DATA
++			/* ifam_data needs to be aligned */
++			ift->ifa_data = data = (void *)ALIGN(data);
++			memcpy(data, &ifam->ifam_data, sizeof(ifam->ifam_data));
++			data += sizeof(ifam->ifam_data);
++#endif	/* HAVE_IFAM_DATA */
++
++			ift = (ift->ifa_next = ift + 1);
++			break;
++		}
++	}
++
++	free(buf);
++#else	/* NET_RT_IFLIST */
++#endif	/* NET_RT_IFLIST */
++	if (--ift >= ifa) {
++		ift->ifa_next = NULL;
++		*pif = ifa;
++	} else {
++		*pif = NULL;
++		free(ifa);
++	}
++	return (0);
++}
++libc_hidden_def (getifaddrs)
++
++void
++freeifaddrs(struct ifaddrs *ifp)
++{
++
++	free(ifp);
++}
++libc_hidden_def (freeifaddrs)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ifreq.c
+@@ -0,0 +1,93 @@
++/* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <net/if.h>
++#include <sys/socket.h>
++#include <sys/ioctl.h>
++
++#include <ifreq.h>
++
++/* The FreeBSD ioctl SIOCGIFCONF returns the list if interfaces as a
++   concatenation of records of different size, each having at least
++   sizeof (struct ifreq) bytes.  */
++
++
++void
++__ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd)
++{
++  int fd = sockfd;
++  struct ifconf ifc;
++  int rq_len;
++  int nifs;
++  char *ifstart;
++  char *ifend;
++  struct ifreq *ifr;
++  /* FreeBSD has many interfaces, many of them are usually down.  */
++# define RQ_IFS	16
++  /* We have to assume all records are of limited size, so that we know
++     when we can stop enlarging the buffer.  */
++# define RQ_MAXSIZE 256
++
++  if (fd < 0)
++    fd = __opensock ();
++  if (fd < 0)
++    {
++      *num_ifs = 0;
++      *ifreqs = NULL;
++      return;
++    }
++
++  ifc.ifc_buf = NULL;
++  rq_len = RQ_IFS * sizeof (struct ifreq) + RQ_MAXSIZE;
++  for (;;)
++    {
++      ifc.ifc_len = rq_len;
++      ifc.ifc_buf = realloc (ifc.ifc_buf, ifc.ifc_len);
++      if (ifc.ifc_buf == NULL || __ioctl (fd, SIOCGIFCONF, &ifc) < 0)
++	{
++	  if (ifc.ifc_buf)
++	    free (ifc.ifc_buf);
++
++	  if (fd != sockfd)
++	    __close (fd);
++	  *num_ifs = 0;
++	  *ifreqs = NULL;
++	  return;
++	}
++      if (ifc.ifc_len + RQ_MAXSIZE <= rq_len)
++	break;
++      rq_len *= 2;
++    }
++
++  nifs = 0;
++  ifstart = (char *) ifc.ifc_buf;
++  ifend = ifstart + ifc.ifc_len;
++  for (ifr = (struct ifreq *) ifstart;
++       (char *) ifr < ifend;
++       ifr = __if_nextreq (ifr))
++    nifs++;
++
++  if (fd != sockfd)
++    __close (fd);
++
++  *num_ifs = nifs;
++  *ifreqs = realloc (ifc.ifc_buf, ifc.ifc_len);
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/init-first.c
+@@ -0,0 +1,135 @@
++/* Initialization code run first thing by the ELF startup code.
++   Copyright (C) 1995-2004, 2005, 2007 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <fcntl.h>
++#include <unistd.h>
++#include <sysdep.h>
++#include <signal.h>
++#include <fpu_control.h>
++#include <sys/param.h>
++#include <sys/types.h>
++#include <libc-internal.h>
++
++#include <ldsodefs.h>
++
++extern int __syscall_sigaction (int __sig,  const struct sigaction *__act, struct sigaction *__oact) __THROW;
++libc_hidden_proto (__syscall_sigaction)
++
++/* Set nonzero if we have to be prepared for more then one libc being
++   used in the process.  Safe assumption if initializer never runs.  */
++int __libc_multiple_libcs attribute_hidden = 1;
++
++/* Remember the command line argument and enviroment contents for
++   later calls of initializers for dynamic libraries.  */
++int __libc_argc attribute_hidden;
++char **__libc_argv attribute_hidden;
++
++
++void
++__libc_init_first (int argc, char **argv, char **envp)
++{
++#ifdef SHARED
++  /* For DSOs we do not need __libc_init_first but instead _init.  */
++}
++
++void
++attribute_hidden
++_init (int argc, char **argv, char **envp)
++{
++#endif
++#ifdef USE_NONOPTION_FLAGS
++  extern void __getopt_clean_environment (char **);
++#endif
++
++  __libc_multiple_libcs = &_dl_starting_up && !_dl_starting_up;
++
++  /* Make sure we don't initialize twice.  */
++  if (!__libc_multiple_libcs)
++    {
++      /* Set the FPU control word to the proper default value if the
++	 kernel would use a different value.  (In a static program we
++	 don't have this information.)  */
++#if 0
++      /* at least on kFreeBSD set it even if SHARED,
++      fixes "make check" failures like math/test-fpucw.out */
++#ifdef SHARED
++      if (__fpu_control != GLRO(dl_fpu_control))
++#endif
++#endif
++	__setfpucw (__fpu_control);
++    }
++
++  /* By default on kFreeBSD when a call to non existing syscall is
++     made, the program is terminated. As we want to be able to detect
++     missing syscalls and provide a fallback code, we ignore the SIGSYS
++     signal. */
++  {
++    struct sigaction act;
++    
++    act.sa_handler = SIG_IGN;
++    __sigemptyset (&act.sa_mask);
++    act.sa_flags = 0;
++    
++    INLINE_SYSCALL (sigaction, 3, SIGSYS, &act, NULL); 
++  }  
++
++  /* Save the command-line arguments.  */
++  __libc_argc = argc;
++  __libc_argv = argv;
++  __environ = envp;
++
++#ifndef SHARED
++  __libc_init_secure ();
++
++  /* First the initialization which normally would be done by the
++     dynamic linker.  */
++  _dl_non_dynamic_init ();
++#endif
++
++#ifdef VDSO_SETUP
++  VDSO_SETUP ();
++#endif
++
++  __init_misc (argc, argv, envp);
++
++#ifdef USE_NONOPTION_FLAGS
++  /* This is a hack to make the special getopt in GNU libc working.  */
++  __getopt_clean_environment (envp);
++#endif
++
++#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS
++  __libc_global_ctors ();
++#endif
++}
++
++
++/* This function is defined here so that if this file ever gets into
++   ld.so we will get a link error.  Having this file silently included
++   in ld.so causes disaster, because the _init definition above will
++   cause ld.so to gain an init function, which is not a cool thing. */
++
++extern void _dl_start (void) __attribute__ ((noreturn));
++
++void
++_dl_start (void)
++{
++  abort ();
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/kenv.h
+@@ -0,0 +1,39 @@
++/*-
++ * Copyright (c) 2002 Maxime Henrion <mux@FreeBSD.org>
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ * $FreeBSD: src/include/kenv.h,v 1.2.8.1 2009/04/15 03:14:26 kensmith Exp $
++ */
++
++#ifndef _KENV_H_
++#define _KENV_H 	1
++
++#include <sys/cdefs.h>
++#include <sys/kenv.h>
++
++__BEGIN_DECLS
++int kenv(int action, const char *name, char *value, int len);
++__END_DECLS
++
++#endif /* !_KENV_H */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/kernel-features.h
+@@ -0,0 +1,92 @@
++/* Set flags signalling availability of kernel features based on given
++   kernel version number.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef __KFREEBSD_KERNEL_VERSION
++/* We assume the worst; all kernels should be supported.  */
++# define __KFREEBSD_KERNEL_VERSION	0
++#endif
++
++/* The encoding for __KFREEBSD_KERNEL_VERSION is defined the following
++   way: the major, minor, and subminor all get a byte with the major
++   number being in the highest byte.  This means we can do numeric
++   comparisons.
++
++   In the following we will define certain symbols depending on
++   whether the describes kernel feature is available in the kernel
++   version given by __KFREEBSD_KERNEL_VERSION.  We are not always exactly
++   recording the correct versions in which the features were
++   introduced.  If somebody cares these values can afterwards be
++   corrected.  */
++
++/* 
++   The used encoding corresponds to the following in elf/dl-load.c:
++
++            osversion = (abi_note[5] & 0xff) * 65536
++                        + (abi_note[6] & 0xff) * 256
++                        + (abi_note[7] & 0xff);
++            if (abi_note[4] != __ABI_TAG_OS
++                || (GLRO(dl_osversion) && GLRO(dl_osversion) < osversion))
++            
++   Therefore, the __KFREEBSD_KERNEL_VERSION have different value compared to
++   __FreeBSD_version/__FreeBSD_kernel__version. 
++   The transformation is not just prepend 0x to __FreeBSD_kernel_version.
++
++   For changes see i.e.
++   http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html
++*/
++
++/* Real-time signals introduced in FreeBSD 7.x.  */
++#if __KFREEBSD_KERNEL_VERSION >= 0x70032
++# define __ASSUME_REALTIME_SIGNALS	1
++#endif
++
++/* Use signals #32, #33, #34 for internal linuxthreads communication */
++#define PTHREAD_SIGBASE 32
++
++/* The `ftruncate' syscall was introduced in kFreeBSD 7.0. */
++#if __KFREEBSD_KERNEL_VERSION >= 0x70032
++# define __ASSUME_TRUNCATE_SYSCALL	1
++#endif
++
++/* The `lseek' syscall was introduced in kFreeBSD 7.0. */
++#if __KFREEBSD_KERNEL_VERSION >= 0x70032
++# define __ASSUME_LSEEK_SYSCALL		1
++#endif
++
++/* The `mmap' syscall was introduced in kFreeBSD 7.0. */
++#if __KFREEBSD_KERNEL_VERSION >= 0x70032
++# define __ASSUME_MMAP_SYSCALL		1
++#endif
++
++/* The `pread' and `pwrite' syscalls were introduced in kFreeBSD 7.0. */
++#if __KFREEBSD_KERNEL_VERSION >= 0x70032
++# define __ASSUME_PREAD_PWRITE_SYSCALLS	1
++#endif
++
++/* The `shm_*' syscalls were introduced in kFreeBSD 8.0 */
++#if __KFREEBSD_KERNEL_VERSION >= 0x8000C
++# define __ASSUME_SHMFCTS		1
++#endif
++
++/* The `*at' syscalls were introduced in kFreeBSD 8.0. */
++#if __KFREEBSD_KERNEL_VERSION >= 0x8001D
++# define __ASSUME_ATFCTS		1
++#endif
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/kernel-posix-cpu-timers.h
+@@ -0,0 +1,5 @@
++/* Parameters for the FreeBSD kernel ABI for CPU clocks.  */
++
++#define CPUCLOCK_WHICH(clock)   ((clock) & (clockid_t) CPUCLOCK_CLOCK_MASK)
++#define CPUCLOCK_CLOCK_MASK     7
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ldsodefs.h
+@@ -0,0 +1,58 @@
++/* Run-time dynamic linker data structures for loaded ELF shared objects.
++   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef	_LDSODEFS_H
++
++/* Get the real definitions.  */
++#include_next <ldsodefs.h>
++
++/* Now define our stuff.  */
++
++/* FreeBSD puts some extra information into an auxiliary vector when it
++   execs ELF executables.  Note that it uses AT_* values of 10 and 11
++   to denote something different than AT_NOTELF and AT_UID, but this is
++   not a problem since elf/dl-support.c ignores these AT_* values.  */
++#define HAVE_AUX_VECTOR
++
++/* Used by static binaries to check the auxiliary vector.  */
++extern void _dl_aux_init (ElfW(auxv_t) *av) internal_function;
++
++/* Initialization which is normally done by the dynamic linker.  */
++extern void _dl_non_dynamic_init (void) internal_function;
++
++/* Contrary to most kernels which use ELFOSABI_SYSV aka ELFOSABI_NONE,
++   FreeBSD uses ELFOSABI_FREEBSD for the OSABI field. */
++#define VALID_ELF_HEADER(hdr,exp,size)	(memcmp (hdr, expected2, size) == 0)
++#define VALID_ELF_OSABI(osabi)		(osabi == ELFOSABI_FREEBSD)
++#define VALID_ELF_ABIVERSION(osabi,ver) (ver == 0)
++#define MORE_ELF_HEADER_DATA \
++  static const unsigned char expected2[EI_PAD] =	\
++  {							\
++    [EI_MAG0] = ELFMAG0,				\
++    [EI_MAG1] = ELFMAG1,				\
++    [EI_MAG2] = ELFMAG2,				\
++    [EI_MAG3] = ELFMAG3,				\
++    [EI_CLASS] = ELFW(CLASS),				\
++    [EI_DATA] = byteorder,				\
++    [EI_VERSION] = EV_CURRENT,				\
++    [EI_OSABI] = ELFOSABI_FREEBSD,			\
++    [EI_ABIVERSION] = 0					\
++  }
++
++#endif /* ldsodefs.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linkat.c
+@@ -0,0 +1,181 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stddef.h>
++#include <stdio.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sysdep.h>
++#include <stdio.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <kernel-features.h>
++
++extern int __syscall_linkat (int fd1, const char *path1, int fd2,
++			       const char *path2, int flags);
++libc_hidden_proto (__syscall_linkat)
++
++/* Make a link to FROM named TO but relative paths in TO and FROM are
++   interpreted relative to FROMFD and TOFD respectively.  */
++int
++linkat (fromfd, from, tofd, to, flags)
++     int fromfd;
++     const char *from;
++     int tofd;
++     const char *to;
++     int flags;
++{
++# ifndef __ASSUME_ATFCTS
++  if (__have_atfcts >= 0)
++# endif
++    {
++      int result = INLINE_SYSCALL (linkat, 5, fromfd, from, tofd, to, flags);
++# ifndef __ASSUME_ATFCTS
++      if (result == -1 && errno == ENOSYS)
++	__have_atfcts = -1;
++      else
++# endif
++	return result;
++    }
++
++#ifndef __ASSUME_ATFCTS
++  /* Without kernel support we cannot handle AT_SYMLINK_FOLLOW.  */
++  if (flags != 0)
++    {
++      __set_errno (EINVAL);
++      return -1;
++    }
++
++  if ((fromfd != AT_FDCWD && from[0] != '/')
++      || (tofd != AT_FDCWD && to[0] != '/'))
++    {
++      int mib[4];
++      size_t kf_len = 0;
++      char *kf_buf, *kf_bufp;
++      size_t fromlen, tolen;
++
++      if ((fromfd < 0) || (tofd < 0))
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++
++      fromlen = strlen (from);
++      tolen = strlen (to);
++      if (__builtin_expect (fromlen == 0, 0)
++	  || __builtin_expect (tolen == 0, 0))
++	{
++	  __set_errno (ENOENT);
++	  return -1;
++	}
++
++      mib[0] = CTL_KERN;
++      mib[1] = KERN_PROC;
++      mib[2] = KERN_PROC_FILEDESC;
++      mib[3] = __getpid ();
++
++      if (__sysctl (mib, 4, NULL, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_buf = alloca (kf_len);
++      if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      if (fromfd != AT_FDCWD && from[0] != '/')
++	{
++	  kf_bufp = kf_buf;
++	  while (kf_bufp < kf_buf + kf_len)
++	    {
++	      struct kinfo_file *kf =
++		(struct kinfo_file *) (uintptr_t) kf_bufp;
++
++	      if (kf->kf_fd == fromfd)
++		{
++		  char *buf;
++		  if (kf->kf_type != KF_TYPE_VNODE ||
++		      kf->kf_vnode_type != KF_VTYPE_VDIR)
++		    {
++		      __set_errno (ENOTDIR);
++		      return -1;
++		    }
++
++		  buf = alloca (strlen (kf->kf_path) + fromlen + 2);
++		  strcpy(buf, kf->kf_path);
++		  strcat (buf, "/");
++		  strcat (buf, from);
++		  from = buf;
++		  break;
++		}
++	      kf_bufp += kf->kf_structsize;
++	    }
++
++	  if (kf_bufp >= kf_buf + kf_len)
++	    {
++	      __set_errno (EBADF);
++	      return -1;
++	    }
++	}
++
++      if (tofd != AT_FDCWD && to[0] != '/')
++	{
++	  kf_bufp = kf_buf;
++	  while (kf_bufp < kf_buf + kf_len)
++	    {
++	      struct kinfo_file *kf =
++		(struct kinfo_file *) (uintptr_t) kf_bufp;
++
++	      if (kf->kf_fd == tofd)
++		{
++		  char *buf;
++		  if (kf->kf_type != KF_TYPE_VNODE ||
++		      kf->kf_vnode_type != KF_VTYPE_VDIR)
++		    {
++		      __set_errno (ENOTDIR);
++		      return -1;
++		    }
++
++		  buf = alloca (strlen (kf->kf_path) + tolen + 2);
++		  strcpy(buf, kf->kf_path);
++		  strcat (buf, "/");
++		  strcat (buf, to);
++		  to = buf;
++		  break;
++		}
++	      kf_bufp += kf->kf_structsize;
++	    }
++
++	  if (kf_bufp >= kf_buf + kf_len)
++	    {
++	      __set_errno (EBADF);
++	      return -1;
++	    }
++	}
++    }
++  
++  return __link (from, to);
++#endif
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/Implies
+@@ -0,0 +1 @@
++pthread
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/Makefile
+@@ -0,0 +1,8 @@
++ifeq ($(subdir),linuxthreads)
++sysdep_routines += register-atfork unregister-atfork
++libpthread-routines += ptw-sigprocmask ptw-ioctl
++endif
++
++ifeq ($(subdir),rt)
++librt-sysdep_routines += timer_routines
++endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/Versions
+@@ -0,0 +1,5 @@
++libc {
++  GLIBC_2.3.2 {
++    __register_atfork;
++  }
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/allocrtsig.c
+@@ -0,0 +1 @@
++#include <linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/bits/local_lim.h
+@@ -0,0 +1,48 @@
++/* Minimum guaranteed maximum values for system limits.  FreeBSD version.
++   Copyright (C) 1993-1998, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/syslimits.h>
++
++/* The number of data keys per process.  */
++#define _POSIX_THREAD_KEYS_MAX	128
++/* This is the value this implementation supports.  */
++#define PTHREAD_KEYS_MAX	1024
++
++/* Controlling the iterations of destructors for thread-specific data.  */
++#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS	4
++/* Number of iterations this implementation does.  */
++#define PTHREAD_DESTRUCTOR_ITERATIONS	_POSIX_THREAD_DESTRUCTOR_ITERATIONS
++
++/* The number of threads per process.  */
++#define _POSIX_THREAD_THREADS_MAX	64
++/* This is the value this implementation supports.  */
++#define PTHREAD_THREADS_MAX	1024
++
++/* Maximum amount by which a process can descrease its asynchronous I/O
++   priority level.  */
++#define AIO_PRIO_DELTA_MAX	20
++
++/* Minimum size for a thread.  We are free to choose a reasonable value.  */
++#define PTHREAD_STACK_MIN	16384
++
++/* Maximum number of POSIX timers available.  */
++#define TIMER_MAX	256
++
++/* Maximum number of timer expiration overruns.  */
++#define DELAYTIMER_MAX	2147483647
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/bits/posix_opt.h
+@@ -0,0 +1,190 @@
++/* Define POSIX options for FreeBSD.
++   Copyright (C) 1996-1997, 1999, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/*
++ * Never include this file directly; use <unistd.h> instead.
++ */
++
++#ifndef	_BITS_POSIX_OPT_H
++#define	_BITS_POSIX_OPT_H	1
++
++/* Job control is supported.  */
++#define	_POSIX_JOB_CONTROL	1
++
++/* Processes have a saved set-user-ID and a saved set-group-ID.  */
++#define	_POSIX_SAVED_IDS	1
++
++/* Priority scheduling is supported.  */
++#define	_POSIX_PRIORITY_SCHEDULING	200809L
++
++/* Synchronizing file data is supported.  */
++#define	_POSIX_SYNCHRONIZED_IO	200809L
++
++/* The fsync function is present.  */
++#define	_POSIX_FSYNC	200809L
++
++/* Mapping of files to memory is supported.  */
++#define	_POSIX_MAPPED_FILES	200809L
++
++/* Locking of all memory is supported.  */
++#define	_POSIX_MEMLOCK	200809L
++
++/* Locking of ranges of memory is supported.  */
++#define	_POSIX_MEMLOCK_RANGE	200809L
++
++/* Setting of memory protections is supported.  */
++#define	_POSIX_MEMORY_PROTECTION	200809L
++
++/* Only root can change owner of file.  */
++#define	_POSIX_CHOWN_RESTRICTED	1
++
++/* `c_cc' member of 'struct termios' structure can be disabled by
++   using the value _POSIX_VDISABLE.  */
++#define	_POSIX_VDISABLE	((unsigned char)'\377')
++
++/* Filenames are not silently truncated.  */
++#define	_POSIX_NO_TRUNC	1
++/* X/Open realtime support is only partially available.  */
++#define _XOPEN_REALTIME	-1
++
++/* X/Open realtime thread support is only partially available.  */
++#define _XOPEN_REALTIME_THREADS	-1
++
++/* Implementation supports `poll' function.  */
++#define	_POSIX_POLL	1
++
++/* Implementation supports `select' and `pselect' functions.  */
++#define	_POSIX_SELECT	1
++
++/* XPG4.2 shared memory is supported.  */
++#define	_XOPEN_SHM	1
++
++/* Tell we have POSIX threads.  */
++#define _POSIX_THREADS	200809L
++
++/* We have the reentrant functions described in POSIX.  */
++#define _POSIX_REENTRANT_FUNCTIONS	1
++#define _POSIX_THREAD_SAFE_FUNCTIONS	200809L
++
++/* We provide priority scheduling for threads.  */
++#define _POSIX_THREAD_PRIORITY_SCHEDULING	200809L
++
++/* We support user-defined stack sizes.  */
++#define _POSIX_THREAD_ATTR_STACKSIZE	200809L
++
++/* We support user-defined stacks.  */
++#define _POSIX_THREAD_ATTR_STACKADDR	200809L
++
++/* We support POSIX.1b semaphores, but only the non-shared form for now.  */
++#define _POSIX_SEMAPHORES	200809L
++
++/* Real-time signals are not available.  */
++#define _POSIX_REALTIME_SIGNALS	-1
++
++/* We support asynchronous I/O.  */
++#define _POSIX_ASYNCHRONOUS_IO	200809L
++#define _POSIX_ASYNC_IO		1
++/* Alternative name for Unix98.  */
++#define _LFS_ASYNCHRONOUS_IO	1
++/* Support for prioritization is not available.  */
++#define _POSIX_PRIORITIZED_IO	-1
++
++/* The LFS support in asynchronous I/O is also available.  */
++#define _LFS64_ASYNCHRONOUS_IO	1
++
++/* The rest of the LFS is also available.  */
++#define _LFS_LARGEFILE		1
++#define _LFS64_LARGEFILE	1
++#define _LFS64_STDIO		1
++
++/* POSIX shared memory objects are implemented.  */
++#define _POSIX_SHARED_MEMORY_OBJECTS	200809L
++
++/* CPU-time clocks somewhere supported.  */
++#define _POSIX_CPUTIME	0
++
++/* We support somewhere the clock also in threads.  */
++#define _POSIX_THREAD_CPUTIME	0
++
++/* GNU libc provides regular expression handling.  */
++#define _POSIX_REGEXP	1
++
++/* Reader/Writer locks are available.  */
++#define _POSIX_READER_WRITER_LOCKS	200809L
++
++/* We have a POSIX shell.  */
++#define _POSIX_SHELL	1
++
++/* We support the Timeouts option.  */
++#define _POSIX_TIMEOUTS	200809L
++
++/* We support spinlocks.  */
++#define _POSIX_SPIN_LOCKS	200809L
++
++/* The `spawn' function family is supported.  */
++#define _POSIX_SPAWN	200809L
++
++/* We have POSIX timers.  */
++#define _POSIX_TIMERS	200809L
++
++/* The barrier functions are available.  */
++#define _POSIX_BARRIERS	200809L
++
++/* POSIX message queues are not available.  */
++#define _POSIX_MESSAGE_PASSING	-1
++
++/* Thread process-shared synchronization is not supported.  */
++#define _POSIX_THREAD_PROCESS_SHARED	-1
++
++/* The monotonic clock is available.  */
++#define _POSIX_MONOTONIC_CLOCK	200809L
++
++/* The clock selection interfaces are not available.  */
++#define _POSIX_CLOCK_SELECTION	-1
++
++/* Advisory information interfaces are not available.  */
++#define _POSIX_ADVISORY_INFO	-1
++
++/* IPv6 support is available.  */
++#define _POSIX_IPV6	200809L
++
++/* Raw socket support is available.  */
++#define _POSIX_RAW_SOCKETS	200809L
++
++/* We have at least one terminal.  */
++#define _POSIX2_CHAR_TERM	200809L
++
++/* Neither process nor thread sporadic server interfaces is available.  */
++#define _POSIX_SPORADIC_SERVER	-1
++#define _POSIX_THREAD_SPORADIC_SERVER	-1
++
++/* trace.h is not available.  */
++#define _POSIX_TRACE	-1
++#define _POSIX_TRACE_EVENT_FILTER	-1
++#define _POSIX_TRACE_INHERIT	-1
++#define _POSIX_TRACE_LOG	-1
++
++/* Typed memory objects are not available.  */
++#define _POSIX_TYPED_MEMORY_OBJECTS	-1
++
++/* No support for priority inheritance or protection.  */
++#define _POSIX_THREAD_PRIO_INHERIT	-1
++#define _POSIX_THREAD_PRIO_PROTECT	-1
++
++#endif /* bits/posix_opt.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/bits/sigthread.h
+@@ -0,0 +1,38 @@
++/* Signal handling function for threaded programs.
++   Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _BITS_SIGTHREAD_H
++#define _BITS_SIGTHREAD_H	1
++
++#if !defined _SIGNAL_H && !defined _PTHREAD_H
++# error "Never include this file directly.  Use <pthread.h> instead"
++#endif
++
++/* Functions for handling signals. */
++
++/* Modify the signal mask for the calling thread.  The arguments have
++   the same meaning as for sigprocmask(2). */
++extern int pthread_sigmask (int __how,
++			    __const __sigset_t *__restrict __newmask,
++			    __sigset_t *__restrict __oldmask) __THROW;
++
++/* Send signal SIGNO to the given thread. */
++extern int pthread_kill (pthread_t __threadid, int __signo) __THROW;
++
++#endif	/* bits/sigthread.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/bits/typesizes.h
+@@ -0,0 +1,82 @@
++/* bits/typesizes.h -- underlying types for *_t.  kFreeBSD version.
++   Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _BITS_TYPES_H
++# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
++#endif
++
++#ifndef	_BITS_TYPESIZES_H
++#define	_BITS_TYPESIZES_H	1
++
++/* See <bits/types.h> for the meaning of these macros.  This file exists so
++   that <bits/types.h> need not vary across different GNU platforms.  */
++
++#define __DEV_T_TYPE		__U32_TYPE
++#define __UID_T_TYPE		__U32_TYPE
++#define __GID_T_TYPE		__U32_TYPE
++#define __INO_T_TYPE		__U32_TYPE
++#define __INO64_T_TYPE		__UQUAD_TYPE
++#define __MODE_T_TYPE		__U16_TYPE
++#define __NLINK_T_TYPE		__U16_TYPE
++#define __OFF_T_TYPE		__SQUAD_TYPE
++#define __OFF64_T_TYPE		__SQUAD_TYPE
++#define __PID_T_TYPE		__S32_TYPE
++#define __RLIM_T_TYPE		__SQUAD_TYPE
++#define __RLIM64_T_TYPE		__SQUAD_TYPE
++#define	__BLKCNT_T_TYPE		__SQUAD_TYPE
++#define	__BLKCNT64_T_TYPE	__SQUAD_TYPE
++#define	__FSBLKCNT_T_TYPE	__ULONGWORD_TYPE
++#define	__FSBLKCNT64_T_TYPE	__UQUAD_TYPE
++#define	__FSFILCNT_T_TYPE	__ULONGWORD_TYPE
++#define	__FSFILCNT64_T_TYPE	__UQUAD_TYPE
++#define	__ID_T_TYPE		__U32_TYPE
++#define __CLOCK_T_TYPE		__S32_TYPE
++
++/*
++ * This one is a bit tricky.  It needs to match the size
++ * in the sys/${arch}/include/_types.h typedefs.
++ *
++ * However, for i386 and amd64 we started with __SLONGWORD_TYPE
++ * and we need to maintain ABI.  Even if size is the same, using
++ * a different type may affect C++ ABI (this distinction is
++ * necessary to implement function overload), so it must stay
++ * with __SLONGWORD_TYPE.
++ */
++#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__)
++#define __TIME_T_TYPE		__SLONGWORD_TYPE
++#else
++#define __TIME_T_TYPE		__S64_TYPE
++#endif
++
++#define __USECONDS_T_TYPE	__U32_TYPE
++#define __SUSECONDS_T_TYPE	__SLONGWORD_TYPE
++#define __DADDR_T_TYPE		__SQUAD_TYPE
++#define __SWBLK_T_TYPE		__S32_TYPE
++#define __KEY_T_TYPE		__SLONGWORD_TYPE
++#define __CLOCKID_T_TYPE	__S32_TYPE
++#define __TIMER_T_TYPE		__S32_TYPE
++#define __BLKSIZE_T_TYPE	__U32_TYPE
++#define __FSID_T_TYPE		union { int __val[2]; int val[2]; }
++#define __SSIZE_T_TYPE		__SWORD_TYPE
++
++/* Number of descriptors that can fit in an `fd_set'.  */
++#define	__FD_SETSIZE		1024
++
++
++#endif /* bits/typesizes.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/execve.c
+@@ -0,0 +1,2 @@
++#include <linuxthreads/sysdeps/unix/sysv/linux/execve.c>
++libc_hidden_proto (__syscall_execve )
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/fatal-prepare.h
+@@ -0,0 +1,39 @@
++/* Copyright (C) 2003, 2007 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <pthread.h>
++
++/* We have to completely disable cancellation.  assert() must not be a
++   cancellation point but the implementation uses write() etc.  */
++#ifdef SHARED
++# include <pthread-functions.h>
++# define FATAL_PREPARE \
++  {									      \
++    int (*fp) (int, int *);                                                   \
++    fp = __libc_pthread_functions.ptr_pthread_setcancelstate;                 \
++    if (fp != NULL)                                                           \
++      fp (PTHREAD_CANCEL_DISABLE, NULL);                                      \
++  }
++#else
++# pragma weak pthread_setcancelstate
++# define FATAL_PREPARE \
++  {									      \
++    if (pthread_setcancelstate != NULL)					      \
++      pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL);		      \
++  }
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/fork.c
+@@ -0,0 +1 @@
++#include <linuxthreads/sysdeps/unix/sysv/linux/fork.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/fork.h
+@@ -0,0 +1 @@
++#include <linuxthreads/sysdeps/unix/sysv/linux/fork.h>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/jmp-unwind.c
+@@ -0,0 +1 @@
++#include <linuxthreads/sysdeps/unix/sysv/linux/jmp-unwind.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/kernel-posix-timers.h
+@@ -0,0 +1,126 @@
++/* Copyright (C) 2003, 2007, 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <pthread.h>
++#include <setjmp.h>
++#include <signal.h>
++#include <sys/types.h>
++#include <sys/_types.h>
++
++/* The signal used for asynchronous cancelation.  */
++#define SIGCANCEL	(PTHREAD_SIGBASE + 1)
++
++/* Signal needed for the kernel-supported POSIX timer implementation.
++   We can reuse the cancellation signal since we can distinguish
++   cancellation from timer expirations.  */
++#define SIGTIMER	SIGCANCEL
++
++/* Nonzero if the system calls are not available.  */
++extern int __no_posix_timers attribute_hidden;
++
++/* Callback to start helper thread.  */
++extern void __start_helper_thread (void) attribute_hidden;
++
++/* Control variable for helper thread creation.  */
++extern pthread_once_t __helper_once attribute_hidden;
++
++/* TID of the helper thread.  */
++extern __lwpid_t __helper_tid attribute_hidden;
++
++/* List of active SIGEV_THREAD timers.  */
++extern struct timer *__active_timer_sigev_thread attribute_hidden;
++/* Lock for the __active_timer_sigev_thread.  */
++extern pthread_mutex_t __active_timer_sigev_thread_lock attribute_hidden;
++
++
++/* Type of timers in the kernel.  */
++typedef int kernel_timer_t;
++
++
++/* Internal representation of timer.  */
++struct timer
++{
++  /* Notification mechanism.  */
++  int sigev_notify;
++
++  /* Timer ID returned by the kernel.  */
++  kernel_timer_t ktimerid;
++
++  /* All new elements must be added after ktimerid.  And if the thrfunc
++     element is not the third element anymore the memory allocation in
++     timer_create needs to be changed.  */
++
++  /* Parameters for the thread to be started for SIGEV_THREAD.  */
++  void (*thrfunc) (sigval_t);
++  sigval_t sival;
++  pthread_attr_t attr;
++
++  /* Next element in list of active SIGEV_THREAD timers.  */
++  struct timer *next;
++};
++
++extern struct timer *__all_timers[TIMER_MAX];
++
++static inline struct timer *
++__kfreebsd_timer_alloc ()
++{
++  unsigned int i;
++  struct timer *timer = malloc (sizeof (struct timer));
++
++  /* Find a free slot (and reserve it atomically).  */
++  for (i = 0; i < TIMER_MAX; i++)
++    if (atomic_compare_and_exchange_val_acq (&__all_timers[i],
++					     timer, NULL) == NULL)
++      return timer;
++
++  errno = EAGAIN;
++  return NULL;
++}
++
++static inline struct timer *
++__kfreebsd_timer_id2ptr (timer_t id)
++{
++  void *ret = NULL;
++
++  if (id >= 0 && id < TIMER_MAX)
++    ret = __all_timers[id];
++
++  if (! ret)
++    errno = EINVAL;
++
++  return ret;
++}
++
++static inline timer_t
++__kfreebsd_timer_ptr2id (struct timer *ptr)
++{
++  unsigned int i;
++  for (i = 0; i < TIMER_MAX; i++)
++    if (__all_timers[i] == ptr)
++      return i;
++
++  return -1;
++}
++
++void static inline
++__kfreebsd_timer_free (struct timer *ptr)
++{
++  __all_timers[__kfreebsd_timer_ptr2id (ptr)] = NULL;
++  free (ptr);
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/lowlevellock.h
+@@ -0,0 +1,47 @@
++/* Copyright (C) 2007 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _LOWLEVELLOCK_H
++#define _LOWLEVELLOCK_H	1
++
++#include <atomic.h>
++
++typedef union
++{
++  volatile void *	uv;	/* in fact struct umtx from <sys/umtx.h> */
++  volatile int		iv;
++  volatile long		lv;
++
++} __rtld_mrlock_t;
++
++#define UMTX_OP_WAIT	2	/*  <sys/umtx.h> */
++#define UMTX_OP_WAKE	3	/*  <sys/umtx.h> */
++
++extern int __syscall__umtx_op(void *, int, long, void*, void*);
++
++static inline void lll_futex_wake(long *umtx, unsigned int nr_wakeup)
++{
++  __syscall__umtx_op(umtx, UMTX_OP_WAKE, nr_wakeup, NULL, NULL);
++}
++
++static inline void lll_futex_wait(long *umtx, unsigned int old_val)
++{
++  __syscall__umtx_op(umtx, UMTX_OP_WAIT, old_val, NULL, NULL);
++}
++
++#endif	/* lowlevellock.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/pt-sigsuspend.S
+@@ -0,0 +1,29 @@
++/* Internal sigsuspend system call for LinuxThreads. FreeBSD version.
++   Copyright (C) 2003 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++
++#include <sysdep.h>
++
++PSEUDO_NOERRNO(__pthread_sigsuspend, sigsuspend, 1)
++	ret_NOERRNO
++PSEUDO_END_NOERRNO(__pthread_sigsuspend)
++
++PSEUDO(__syscall_sigsuspend, sigsuspend, 1)
++	ret
++PSEUDO_END(__syscall_sigsuspend)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/raise.c
+@@ -0,0 +1 @@
++#include <linuxthreads/sysdeps/unix/sysv/linux/raise.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/register-atfork.c
+@@ -0,0 +1 @@
++#include <linuxthreads/sysdeps/unix/sysv/linux/register-atfork.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/smp.h
+@@ -0,0 +1,36 @@
++/* Determine whether the host has multiple processors.  FreeBSD version.
++   Copyright (C) 1996, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Library General Public License as
++   published by the Free Software Foundation; either version 2 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Library General Public License for more details.
++
++   You should have received a copy of the GNU Library General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <sys/sysctl.h>
++
++/* Test whether the machine has more than one processor.  */
++static inline int
++is_smp_system (void)
++{
++  /* Fetch sysctl value of "hw.ncpu".  */
++  int request[] = { CTL_HW, HW_NCPU };
++  int result;
++  size_t result_len = sizeof (result);
++
++  if (__sysctl (request, 2, &result, &result_len, NULL, 0) < 0)
++    /* Dummy result.  */
++    return 0;
++
++  return (result > 1);
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/timer_create.c
+@@ -0,0 +1,226 @@
++/* Copyright (C) 2003,2004, 2007, 2009, 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <errno.h>
++#include <pthread.h>
++#include <signal.h>
++#include <stdlib.h>
++#include <string.h>
++#include <time.h>
++#include <sysdep.h>
++#include <kernel-features.h>
++#include "kernel-posix-timers.h"
++#include "kernel-posix-cpu-timers.h"
++
++
++#ifdef SYS_ktimer_create
++# ifndef __ASSUME_POSIX_TIMERS
++static int compat_timer_create (clockid_t clock_id, struct sigevent *evp,
++				timer_t *timerid);
++#  define timer_create static compat_timer_create
++#  include <linuxthreads/sysdeps/pthread/timer_create.c>
++#  undef timer_create
++
++/* Nonzero if the system calls are not available.  */
++int __no_posix_timers attribute_hidden;
++# endif
++
++# ifdef timer_create_alias
++#  define timer_create timer_create_alias
++# endif
++
++
++int
++timer_create (clock_id, evp, timerid)
++     clockid_t clock_id;
++     struct sigevent *evp;
++     timer_t *timerid;
++{
++# undef timer_create
++# ifndef __ASSUME_POSIX_TIMERS
++  if  (__no_posix_timers >= 0)
++# endif
++    {
++      /* If the user wants notification via a thread we need to handle
++	 this special.  */
++      if (evp == NULL
++	  || __builtin_expect (evp->sigev_notify != SIGEV_THREAD, 1))
++	{
++	  struct sigevent local_evp;
++
++	  struct timer *newp = __kfreebsd_timer_alloc ();
++
++	  if (newp == NULL)
++	    /* No more memory.  */
++	    return -1;
++
++	  if (evp == NULL)
++	    {
++	      /* The kernel has to pass up the timer ID which is a
++		 userlevel object.  Therefore we cannot leave it up to
++		 the kernel to determine it.  */
++	      local_evp.sigev_notify = SIGEV_SIGNAL;
++	      local_evp.sigev_signo = SIGALRM;
++	      local_evp.sigev_value.sival_ptr = newp;
++
++	      evp = &local_evp;
++	    }
++
++	  kernel_timer_t ktimerid;
++	  int retval = INLINE_SYSCALL (ktimer_create, 3, clock_id, evp,
++				       &ktimerid);
++
++# ifndef __ASSUME_POSIX_TIMERS
++	  if (retval != -1 || errno != ENOSYS)
++# endif
++	    {
++# ifndef __ASSUME_POSIX_TIMERS
++	      __no_posix_timers = 1;
++# endif
++
++	      if (retval != -1)
++		{
++		  newp->sigev_notify = (evp != NULL
++					? evp->sigev_notify : SIGEV_SIGNAL);
++		  newp->ktimerid = ktimerid;
++
++		  *timerid = __kfreebsd_timer_ptr2id (newp);
++		}
++	      else
++		{
++		  /* Cannot allocate the timer, fail.  */
++		  __kfreebsd_timer_free (newp);
++		  retval = -1;
++		}
++
++	      return retval;
++	    }
++
++	  __kfreebsd_timer_free (newp);
++
++# ifndef __ASSUME_POSIX_TIMERS
++	  /* When we come here the syscall does not exist.  Make sure we
++	     do not try to use it again.  */
++	  __no_posix_timers = -1;
++# endif
++	}
++      else
++	{
++# ifndef __ASSUME_POSIX_TIMERS
++	  /* Make sure we have the necessary kernel support.  */
++	  if (__no_posix_timers == 0)
++	    {
++	      struct timespec ts;
++	      int res;
++	      res = INLINE_SYSCALL (clock_getres, 2,
++				    CLOCK_REALTIME, &ts);
++	      __no_posix_timers = (res == -1 ? -1 : 1);
++	    }
++
++	  if (__no_posix_timers > 0)
++# endif
++	    {
++	      /* Create the helper thread.  */
++	      pthread_once (&__helper_once, __start_helper_thread);
++	      if (__helper_tid == 0)
++		{
++		  /* No resources to start the helper thread.  */
++		  __set_errno (EAGAIN);
++		  return -1;
++		}
++
++	      struct timer *newp;
++	      newp = __kfreebsd_timer_alloc ();
++	      if (newp == NULL)
++		return -1;
++
++	      /* Copy the thread parameters the user provided.  */
++	      newp->sival = evp->sigev_value;
++	      newp->thrfunc = evp->sigev_notify_function;
++	      newp->sigev_notify = SIGEV_THREAD;
++
++	      /* We cannot simply copy the thread attributes since the
++		 implementation might keep internal information for
++		 each instance.  */
++	      (void) pthread_attr_init (&newp->attr);
++	      if (evp->sigev_notify_attributes != NULL)
++		{
++		  pthread_attr_t *nattr;
++		  pthread_attr_t *oattr;
++
++		  nattr = (pthread_attr_t *) &newp->attr;
++		  oattr = (pthread_attr_t *) evp->sigev_notify_attributes;
++
++		  nattr->__schedparam = oattr->__schedparam;
++		  nattr->__schedpolicy = oattr->__schedpolicy;
++		  nattr->__guardsize = oattr->__guardsize;
++		  nattr->__stackaddr = oattr->__stackaddr;
++		  nattr->__stacksize = oattr->__stacksize;
++		}
++
++	      /* In any case set the detach flag.  */
++	      (void) pthread_attr_setdetachstate (&newp->attr,
++						  PTHREAD_CREATE_DETACHED);
++
++	      /* Create the event structure for the kernel timer.  */
++	      struct sigevent sev =
++		{ .sigev_value.sival_ptr = newp,
++		  .sigev_signo = SIGTIMER,
++		  .sigev_notify = SIGEV_THREAD_ID,
++		  .sigev_notify_thread_id = __helper_tid,
++		};
++
++	      /* Create the timer.  */
++	      int res;
++	      res = INLINE_SYSCALL (ktimer_create, 3,
++				      clock_id, &sev, &newp->ktimerid);
++	      if (res != -1)
++		{
++		  /* Add to the queue of active timers with thread
++		     delivery.  */
++		  pthread_mutex_lock (&__active_timer_sigev_thread_lock);
++		  newp->next = __active_timer_sigev_thread;
++		  __active_timer_sigev_thread = newp;
++		  pthread_mutex_unlock (&__active_timer_sigev_thread_lock);
++
++		  *timerid = __kfreebsd_timer_ptr2id (newp);
++		  return 0;
++		}
++
++	      /* Free the resources.  */
++	      __kfreebsd_timer_free (newp);
++
++	      return -1;
++	    }
++	}
++    }
++
++# ifndef __ASSUME_POSIX_TIMERS
++  /* Compatibility code.  */
++  return compat_timer_create (clock_id, evp, timerid);
++# endif
++}
++#else
++# ifdef timer_create_alias
++#  define timer_create timer_create_alias
++# endif
++/* The new system calls are not available.  Use the userlevel
++   implementation.  */
++# include <linuxthreads/sysdeps/pthread/timer_create.c>
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/timer_delete.c
+@@ -0,0 +1,117 @@
++/* Copyright (C) 2003, 2007, 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <errno.h>
++#include <stdlib.h>
++#include <time.h>
++#include <sysdep.h>
++#include <kernel-features.h>
++#include "kernel-posix-timers.h"
++
++
++#ifdef SYS_ktimer_delete
++# ifndef __ASSUME_POSIX_TIMERS
++static int compat_timer_delete (timer_t timerid);
++#  define timer_delete static compat_timer_delete
++#  include <linuxthreads/sysdeps/pthread/timer_delete.c>
++#  undef timer_delete
++# endif
++
++# ifdef timer_delete_alias
++#  define timer_delete timer_delete_alias
++# endif
++
++
++int
++timer_delete (timerid)
++     timer_t timerid;
++{
++# undef timer_delete
++# ifndef __ASSUME_POSIX_TIMERS
++  if (__no_posix_timers >= 0)
++# endif
++    {
++      struct timer *kt = __kfreebsd_timer_id2ptr (timerid);
++      if (! kt)
++	return -1;
++
++      /* Delete the kernel timer object.  */
++      int res = INLINE_SYSCALL (ktimer_delete, 1, kt->ktimerid);
++
++      if (res == 0)
++	{
++	  if (kt->sigev_notify == SIGEV_THREAD)
++	    {
++	      /* Remove the timer from the list.  */
++	      pthread_mutex_lock (&__active_timer_sigev_thread_lock);
++	      if (__active_timer_sigev_thread == kt)
++		__active_timer_sigev_thread = kt->next;
++	      else
++		{
++		  struct timer *prevp = __active_timer_sigev_thread;
++		  while (prevp->next != NULL)
++		    if (prevp->next == kt)
++		      {
++			prevp->next = kt->next;
++			break;
++		      }
++		    else
++		      prevp = prevp->next;
++		}
++	      pthread_mutex_unlock (&__active_timer_sigev_thread_lock);
++	    }
++
++# ifndef __ASSUME_POSIX_TIMERS
++	  /* We know the syscall support is available.  */
++	  __no_posix_timers = 1;
++# endif
++
++	  /* Free the memory.  */
++	  (void) __kfreebsd_timer_free (kt);
++
++	  return 0;
++	}
++
++      /* The kernel timer is not known or something else bad happened.
++	 Return the error.  */
++# ifndef __ASSUME_POSIX_TIMERS
++      if (errno != ENOSYS)
++	{
++	  __no_posix_timers = 1;
++# endif
++	  return -1;
++# ifndef __ASSUME_POSIX_TIMERS
++	}
++
++      __no_posix_timers = -1;
++# endif
++    }
++
++# ifndef __ASSUME_POSIX_TIMERS
++  return compat_timer_delete (timerid);
++# endif
++}
++#else
++# ifdef timer_delete_alias
++#  define timer_delete timer_delete_alias
++# endif
++/* The new system calls are not available.  Use the userlevel
++   implementation.  */
++# include <linuxthreads/sysdeps/pthread/timer_delete.c>
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/timer_getoverr.c
+@@ -0,0 +1,83 @@
++/* Copyright (C) 2003, 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <errno.h>
++#include <time.h>
++#include <sysdep.h>
++#include <kernel-features.h>
++#include "kernel-posix-timers.h"
++
++
++#ifdef SYS_ktimer_getoverrun
++# ifndef __ASSUME_POSIX_TIMERS
++static int compat_timer_getoverrun (timer_t timerid);
++#  define timer_getoverrun static compat_timer_getoverrun
++#  include <linuxthreads/sysdeps/pthread/timer_getoverr.c>
++#  undef timer_getoverrun
++# endif
++
++# ifdef timer_getoverrun_alias
++#  define timer_getoverrun timer_getoverrun_alias
++# endif
++
++
++int
++timer_getoverrun (timerid)
++     timer_t timerid;
++{
++# undef timer_getoverrun
++# ifndef __ASSUME_POSIX_TIMERS
++  if (__no_posix_timers >= 0)
++# endif
++    {
++      struct timer *kt = __kfreebsd_timer_id2ptr (timerid);
++      if (! kt)
++	return -1;
++
++      /* Get the information from the kernel.  */
++      int res = INLINE_SYSCALL (ktimer_getoverrun, 1, kt->ktimerid);
++
++# ifndef __ASSUME_POSIX_TIMERS
++      if (res != -1 || errno != ENOSYS)
++	{
++	  /* We know the syscall support is available.  */
++	  __no_posix_timers = 1;
++# endif
++	  return res;
++# ifndef __ASSUME_POSIX_TIMERS
++	}
++# endif
++
++# ifndef __ASSUME_POSIX_TIMERS
++      __no_posix_timers = -1;
++# endif
++    }
++
++# ifndef __ASSUME_POSIX_TIMERS
++  return compat_timer_getoverrun (timerid);
++# endif
++}
++#else
++# ifdef timer_getoverrun_alias
++#  define timer_getoverrun timer_getoverrun_alias
++# endif
++/* The new system calls are not available.  Use the userlevel
++   implementation.  */
++# include <linuxthreads/sysdeps/pthread/timer_getoverr.c>
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/timer_gettime.c
+@@ -0,0 +1,85 @@
++/* Copyright (C) 2003, 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <errno.h>
++#include <stdlib.h>
++#include <time.h>
++#include <sysdep.h>
++#include <kernel-features.h>
++#include "kernel-posix-timers.h"
++
++
++#ifdef SYS_ktimer_gettime
++# ifndef __ASSUME_POSIX_TIMERS
++static int compat_timer_gettime (timer_t timerid, struct itimerspec *value);
++#  define timer_gettime static compat_timer_gettime
++#  include <linuxthreads/sysdeps/pthread/timer_gettime.c>
++#  undef timer_gettime
++# endif
++
++# ifdef timer_gettime_alias
++#  define timer_gettime timer_gettime_alias
++# endif
++
++
++int
++timer_gettime (timerid, value)
++     timer_t timerid;
++     struct itimerspec *value;
++{
++# undef timer_gettime
++# ifndef __ASSUME_POSIX_TIMERS
++  if (__no_posix_timers >= 0)
++# endif
++    {
++      struct timer *kt = __kfreebsd_timer_id2ptr (timerid);
++      if (! kt)
++	return -1;
++
++      /* Delete the kernel timer object.  */
++      int res = INLINE_SYSCALL (ktimer_gettime, 2, kt->ktimerid, value);
++
++# ifndef __ASSUME_POSIX_TIMERS
++      if (res != -1 || errno != ENOSYS)
++	{
++	  /* We know the syscall support is available.  */
++	  __no_posix_timers = 1;
++# endif
++	  return res;
++# ifndef __ASSUME_POSIX_TIMERS
++	}
++# endif
++
++# ifndef __ASSUME_POSIX_TIMERS
++      __no_posix_timers = -1;
++# endif
++    }
++
++# ifndef __ASSUME_POSIX_TIMERS
++  return compat_timer_gettime (timerid, value);
++# endif
++}
++#else
++# ifdef timer_gettime_alias
++#  define timer_gettime timer_gettime_alias
++# endif
++/* The new system calls are not available.  Use the userlevel
++   implementation.  */
++# include <linuxthreads/sysdeps/pthread/timer_gettime.c>
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/timer_routines.c
+@@ -0,0 +1,214 @@
++/* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <errno.h>
++#include <setjmp.h>
++#include <signal.h>
++#include <stdbool.h>
++#include <sysdep.h>
++#include <sys/_types.h> /* __lwpid_t */
++#include <atomic.h>
++#include <kernel-features.h>
++#include <linuxthreads/internals.h>	/* LIBC_CANCEL_ASYNC */
++#include <semaphore.h>
++#include "kernel-posix-timers.h"
++
++/* NPTL/Linux simply casts "timer_t" to "struct timer *", but on
++   kFreeBSD timer_t may not be large enough to hold a pointer.
++   So we store the pointers here... (sigh) */
++struct timer *__all_timers[TIMER_MAX];
++
++/* List of active SIGEV_THREAD timers.  */
++struct timer *__active_timer_sigev_thread;
++/* Lock for the __active_timer_sigev_thread.  */
++pthread_mutex_t __active_timer_sigev_thread_lock = PTHREAD_MUTEX_INITIALIZER;
++
++
++struct thread_start_data
++{
++  void (*thrfunc) (sigval_t);
++  sigval_t sival;
++};
++
++/* TID of the helper thread.  */
++__lwpid_t __helper_tid attribute_hidden;
++sem_t __helper_tid_semaphore attribute_hidden;
++
++#ifdef SYS_ktimer_create
++/* Helper thread to call the user-provided function.  */
++static void *
++timer_sigev_thread (void *arg)
++{
++  /* The parent thread has all signals blocked.  This is a bit
++     surprising for user code, although valid.  We unblock all
++     signals.  */
++  sigset_t ss;
++  sigemptyset (&ss);
++  sigprocmask (SIG_SETMASK, &ss, NULL);
++
++  struct thread_start_data *td = (struct thread_start_data *) arg;
++
++  void (*thrfunc) (sigval_t) = td->thrfunc;
++  sigval_t sival = td->sival;
++
++  /* The TD object was allocated in timer_helper_thread.  */
++  free (td);
++
++  /* Call the user-provided function.  */
++  thrfunc (sival);
++
++  return NULL;
++}
++
++
++/* Helper function to support starting threads for SIGEV_THREAD.  */
++static void *
++timer_helper_thread (void *arg)
++{
++  /* Wait for the SIGTIMER signal, allowing the setXid signal, and
++     none else.  */
++  sigset_t ss;
++  sigemptyset (&ss);
++  __sigaddset (&ss, SIGTIMER);
++
++  syscall (SYS_thr_self, &__helper_tid);
++  sem_post (&__helper_tid_semaphore);
++
++  /* Endless loop of waiting for signals.  The loop is only ended when
++     the thread is canceled.  */
++  while (1)
++    {
++      siginfo_t si;
++
++      /* sigwaitinfo cannot be used here, since it deletes
++	 SIGCANCEL == SIGTIMER from the set.  */
++
++      int oldtype = LIBC_CANCEL_ASYNC ();
++
++      /* XXX The size argument hopefully will have to be changed to the
++	 real size of the user-level sigset_t.  */
++      int result = sigtimedwait (&ss, &si, NULL);
++
++      LIBC_CANCEL_RESET (oldtype);
++
++      if (result > 0)
++	{
++	  if (si.si_code == SI_TIMER)
++	    {
++	      struct timer *tk = (struct timer *) si.si_value.sival_ptr;
++
++	      /* Check the timer is still used and will not go away
++		 while we are reading the values here.  */
++	      pthread_mutex_lock (&__active_timer_sigev_thread_lock);
++
++	      struct timer *runp = __active_timer_sigev_thread;
++	      while (runp != NULL)
++		if (runp == tk)
++		  break;
++		else
++		  runp = runp->next;
++
++	      if (runp != NULL)
++		{
++		  struct thread_start_data *td = malloc (sizeof (*td));
++
++		  /* There is not much we can do if the allocation fails.  */
++		  if (td != NULL)
++		    {
++		      /* This is the signal we are waiting for.  */
++		      td->thrfunc = tk->thrfunc;
++		      td->sival = tk->sival;
++
++		      pthread_t th;
++		      (void) pthread_create (&th, &tk->attr,
++					     timer_sigev_thread, td);
++		    }
++		}
++
++	      pthread_mutex_unlock (&__active_timer_sigev_thread_lock);
++	    }
++	  else if (si.si_code == SI_LWP
++		   /* Backward compatibility (see rev 211732 in -CURRENT).  */
++		   || si.si_code == SI_USER)
++	    /* The thread is canceled.  */
++	    pthread_exit (NULL);
++	}
++    }
++}
++
++
++/* Control variable for helper thread creation.  */
++pthread_once_t __helper_once attribute_hidden;
++
++
++/* Reset variables so that after a fork a new helper thread gets started.  */
++static void
++reset_helper_control (void)
++{
++  __helper_once = PTHREAD_ONCE_INIT;
++  __helper_tid = 0;
++  sem_destroy (&__helper_tid_semaphore);
++}
++
++
++void
++attribute_hidden
++__start_helper_thread (void)
++{
++  /* The helper thread needs only very little resources
++     and should go away automatically when canceled.  */
++  pthread_attr_t attr;
++  (void) pthread_attr_init (&attr);
++  (void) pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
++
++  /* Block all signals in the helper thread but SIGSETXID.  To do this
++     thoroughly we temporarily have to block all signals here.  The
++     helper can lose wakeups if SIGCANCEL is not blocked throughout,
++     but sigfillset omits it SIGSETXID.  So, we add SIGCANCEL back
++     explicitly here.  */
++  sigset_t ss;
++  sigset_t oss;
++  sigfillset (&ss);
++  __sigaddset (&ss, SIGCANCEL);
++  sigprocmask (SIG_SETMASK, &ss, &oss);
++
++  sem_init (&__helper_tid_semaphore, 0, 0);
++
++  /* Create the helper thread for this timer.  */
++  pthread_t th;
++  int res = pthread_create (&th, &attr, timer_helper_thread, NULL);
++  if (res == 0)
++    /* We managed to start the helper thread.  */
++    sem_wait (&__helper_tid_semaphore);
++
++  /* Restore the signal mask.  */
++  sigprocmask (SIG_SETMASK, &oss, NULL);
++
++  /* No need for the attribute anymore.  */
++  (void) pthread_attr_destroy (&attr);
++
++  /* We have to make sure that after fork()ing a new helper thread can
++     be created.  */
++  pthread_atfork (NULL, NULL, reset_helper_control);
++}
++#endif
++
++#ifndef __ASSUME_POSIX_TIMERS
++# include <linuxthreads/sysdeps/pthread/timer_routines.c>
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/timer_settime.c
+@@ -0,0 +1,90 @@
++/* Copyright (C) 2003, 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <errno.h>
++#include <stdlib.h>
++#include <time.h>
++#include <sysdep.h>
++#include <kernel-features.h>
++#include "kernel-posix-timers.h"
++
++
++#ifdef SYS_ktimer_settime
++# ifndef __ASSUME_POSIX_TIMERS
++static int compat_timer_settime (timer_t timerid, int flags,
++				 const struct itimerspec *value,
++				 struct itimerspec *ovalue);
++#  define timer_settime static compat_timer_settime
++#  include <linuxthreads/sysdeps/pthread/timer_settime.c>
++#  undef timer_settime
++# endif
++
++# ifdef timer_settime_alias
++#  define timer_settime timer_settime_alias
++# endif
++
++
++int
++timer_settime (timerid, flags, value, ovalue)
++     timer_t timerid;
++     int flags;
++     const struct itimerspec *value;
++     struct itimerspec *ovalue;
++{
++# undef timer_settime
++# ifndef __ASSUME_POSIX_TIMERS
++  if (__no_posix_timers >= 0)
++# endif
++    {
++      struct timer *kt = __kfreebsd_timer_id2ptr (timerid);
++      if (! kt)
++	return -1;
++
++      /* Delete the kernel timer object.  */
++      int res = INLINE_SYSCALL (ktimer_settime, 4, kt->ktimerid, flags,
++				value, ovalue);
++
++# ifndef __ASSUME_POSIX_TIMERS
++      if (res != -1 || errno != ENOSYS)
++	{
++	  /* We know the syscall support is available.  */
++	  __no_posix_timers = 1;
++# endif
++	  return res;
++# ifndef __ASSUME_POSIX_TIMERS
++	}
++# endif
++
++# ifndef __ASSUME_POSIX_TIMERS
++      __no_posix_timers = -1;
++# endif
++    }
++
++# ifndef __ASSUME_POSIX_TIMERS
++  return compat_timer_settime (timerid, flags, value, ovalue);
++# endif
++}
++#else
++# ifdef timer_settime_alias
++#  define timer_settime timer_settime_alias
++# endif
++/* The new system calls are not available.  Use the userlevel
++   implementation.  */
++# include <linuxthreads/sysdeps/pthread/timer_settime.c>
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/unregister-atfork.c
+@@ -0,0 +1 @@
++#include <linuxthreads/sysdeps/unix/sysv/linux/unregister-atfork.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/llseek.c
+@@ -0,0 +1,6 @@
++/* We don't need a definition since the lseek64 function is what we need.  */
++/* llseek doesn't have a prototype.  Since the second parameter is a
++   64bit type, this results in wrong behaviour if no prototype is
++   provided.  */
++link_warning (llseek, "\
++the `llseek' function may be dangerous; use `lseek64' instead.")
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/lseek.c
+@@ -0,0 +1,59 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <unistd.h>
++#include <sys/types.h>
++#include <sysdep.h>
++#include <errno.h>
++
++extern __off_t __syscall_lseek (int __fd, __off_t __offset, int __whence) __THROW;
++libc_hidden_proto (__syscall_lseek)
++extern __off_t __syscall_freebsd6_lseek (int __fd, int __unused1, __off_t __offset,
++				int __whence) __THROW;
++libc_hidden_proto (__syscall_freebsd6_lseek)
++
++__off_t
++__libc_lseek (int fd, __off_t offset, int whence)
++{
++  __off_t result;
++
++  /* First try the new syscall. */
++  result = INLINE_SYSCALL (lseek, 3, fd, offset, whence);
++
++#ifndef __ASSUME_LSEEK_SYSCALL
++  if (result == -1 && errno == ENOSYS)
++    /* New syscall not available, us the old one. */
++    result = INLINE_SYSCALL (freebsd6_lseek, 4, fd, 0, offset, whence);
++#endif
++
++  return result;
++}
++
++weak_alias (__libc_lseek, __lseek)
++libc_hidden_def (__lseek)
++weak_alias (__libc_lseek, lseek)
++
++/* 'lseek64' is the same as 'lseek', because __off64_t == __off_t.  */
++strong_alias (__libc_lseek, __libc_lseek64)
++weak_alias (__libc_lseek64, __lseek64)
++weak_alias (__lseek64, lseek64)
++
++/* 'llseek' is the same as 'lseek', because __off64_t == __off_t.  */
++strong_alias (__libc_lseek, __llseek)
++weak_alias (__llseek, llseek)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/lseek64.c
+@@ -0,0 +1 @@
++/* 'lseek64' is the same as 'lseek', because __off64_t == __off_t.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/lxstat.c
+@@ -0,0 +1,49 @@
++/* lxstat using FreeBSD lstat, nlstat system calls.
++   Copyright (C) 1991,1995-1997,2000,2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <stddef.h>
++#include <sys/stat.h>
++#include <bp-checks.h>
++
++#include "stat16conv.c"
++
++int
++__lxstat (int vers, const char *file, struct stat *buf)
++{
++  if (__builtin_expect (vers == _STAT_VER, 1))
++    {
++      struct stat16 buf16;
++      int result = __syscall_lstat (CHECK_STRING (file), __ptrvalue (&buf16));
++      if (result == 0)
++	stat16_to_stat (&buf16, buf);
++      return result;
++    }
++  else if (__builtin_expect (vers == _STAT_VER_stat, 1))
++    return __syscall_lstat (CHECK_STRING (file),
++			    CHECK_1 ((struct stat16 *) buf));
++  else
++    {
++      __set_errno (EINVAL);
++      return -1;
++    }
++}
++hidden_def (__lxstat)
++
++weak_alias (__lxstat, _lxstat)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/lxstat64.c
+@@ -0,0 +1,44 @@
++/* lxstat using FreeBSD lstat, nlstat system calls.
++   Copyright (C) 1991,1995-1997,2000,2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <stddef.h>
++#include <sys/stat.h>
++#include <bp-checks.h>
++
++#include "stat16conv.c"
++
++int
++__lxstat64 (int vers, const char *file, struct stat64 *buf)
++{
++  if (__builtin_expect (vers == _STAT_VER, 1))
++    {
++      struct stat16 buf16;
++      int result = __syscall_lstat (CHECK_STRING (file), __ptrvalue (&buf16));
++      if (result == 0)
++	stat16_to_stat64 (&buf16, buf);
++      return result;
++    }
++  else
++    {
++      __set_errno (EINVAL);
++      return -1;
++    }
++}
++hidden_def (__lxstat64)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/____longjmp_chk.c
+@@ -0,0 +1,7 @@
++/* Jump to the position specified by ENV, causing the
++   setjmp call there to return VAL, or 1 if VAL is 0.
++   void __longjmp (__jmp_buf env, int val).  */
++      
++#warning longjmp_chk unimplemented
++#define __longjmp ____longjmp_chk
++#include <__longjmp.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/dl-machine.h
+@@ -0,0 +1,97 @@
++/* Machine-dependent ELF dynamic relocation inline functions.  MIPS version.
++   Copyright (C) 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010
++   Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
++   Port to kFreeBSD (kernel of FreeBSD) by Robert Millan.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include_next <dl-machine.h>
++
++/* kFreeBSD puts arguments in a different location (see start.S).  */
++#undef RTLD_START
++#define RTLD_START asm (\
++	".text\n\
++	" _RTLD_PROLOGUE(ENTRY_POINT) "\
++	" STRINGXV(SETUP_GPX($25)) "\n\
++	" STRINGXV(SETUP_GPX64($18,$25)) "\n\
++	# i386 ABI book says that the first entry of GOT holds\n\
++	# the address of the dynamic structure. Though MIPS ABI\n\
++	# doesn't say nothing about this, I emulate this here.\n\
++	" STRINGXP(PTR_LA) " $9, _DYNAMIC\n\
++	# Subtract OFFSET_GP_GOT\n\
++	" STRINGXP(PTR_S) " $9, -0x7ff0($28)\n\
++	move $9, $29\n\
++	" STRINGXP(PTR_SUBIU) " $29, 16\n\
++	\n\
++	" STRINGXP(PTR_LA) " $8, .Lcoff\n\
++	bltzal $8, .Lcoff\n\
++.Lcoff:	" STRINGXP(PTR_SUBU) " $8, $31, $8\n\
++	\n\
++	" STRINGXP(PTR_LA) " $25, _dl_start\n\
++	" STRINGXP(PTR_ADDU) " $25, $8\n\
++	jalr $25\n\
++	\n\
++	" STRINGXP(PTR_ADDIU) " $29, 16\n\
++	# Get the value of label '_dl_start_user' in t9 ($25).\n\
++	" STRINGXP(PTR_LA) " $25, _dl_start_user\n\
++	" _RTLD_EPILOGUE(ENTRY_POINT) "\
++	\n\
++	\n\
++	" _RTLD_PROLOGUE(_dl_start_user) "\
++	" STRINGXP(SETUP_GP) "\n\
++	" STRINGXV(SETUP_GP64($18,_dl_start_user)) "\n\
++	move $16, $28\n\
++	# Save the user entry point address in a saved register.\n\
++	move $17, $2\n\
++	# See if we were run as a command with the executable file\n\
++	# name as an extra leading argument.\n\
++	lw $2, _dl_skip_args\n\
++	beq $2, $0, 1f\n\
++	# Load the original argument count.\n\
++	" STRINGXP(PTR_L) " $10, 0($4)\n\
++	# Subtract _dl_skip_args from it.\n\
++	subu $10, $2\n\
++	# FIXME: unnecessary? Adjust the stack pointer to skip _dl_skip_args words.\n\
++	sll $2, " STRINGXP (PTRLOG) "\n\
++	" STRINGXP(PTR_ADDU) " $29, $2\n\
++	# Save back the modified argument count.\n\
++	" STRINGXP(PTR_S) " $10, 0($4)\n\
++1:	# Call _dl_init (struct link_map *main_map, int argc, char **argv, char **env) \n\
++	" STRINGXP(PTR_L) /* or lw???  fixme */ " $5, 0($4)\n\
++	" STRINGXP(PTR_LA) " $6, " STRINGXP (PTRSIZE) "($4)\n\
++	" STRINGXP(PTR_L) " $4, _rtld_local\n\
++	sll $7, $5, " STRINGXP (PTRLOG) "\n\
++	" STRINGXP(PTR_ADDU) " $7, $7, $6\n\
++	" STRINGXP(PTR_ADDU) " $7, $7, " STRINGXP (PTRSIZE) " \n\
++	# Make sure the stack pointer is aligned for _dl_init_internal.\n\
++	and $2, $29, -2 * " STRINGXP(SZREG) "\n\
++	" STRINGXP(PTR_S) " $29, -" STRINGXP(SZREG) "($2)\n\
++	" STRINGXP(PTR_SUBIU) " $29, $2, 32\n\
++	" STRINGXP(SAVE_GP(16)) "\n\
++	# Call the function to run the initializers.\n\
++	jal _dl_init_internal\n\
++	# Restore the stack pointer for _start.\n\
++	" STRINGXP(PTR_L)  " $29, 32-" STRINGXP(SZREG) "($29)\n\
++	# Pass our finalizer function to the user in $2 as per ELF ABI.\n\
++	" STRINGXP(PTR_LA) " $2, _dl_fini\n\
++	# Jump to the user entry point.\n\
++	move $25, $17\n\
++	jr $25\n\t"\
++	_RTLD_EPILOGUE(_dl_start_user)\
++	".previous"\
++);
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/elf/start.S
+@@ -0,0 +1,121 @@
++/* Startup code compliant to the ELF Mips ABI.
++   Copyright (C) 1995, 1997, 2000, 2001, 2002, 2003, 2004, 2010
++	Free Software Foundation, Inc.
++   Port to kFreeBSD (kernel of FreeBSD) by Robert Millan.
++
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   In addition to the permissions in the GNU Lesser General Public
++   License, the Free Software Foundation gives you unlimited
++   permission to link the compiled version of this file with other
++   programs, and to distribute those programs without any restriction
++   coming from the use of this file. (The GNU Lesser General Public
++   License restrictions do apply in other respects; for example, they
++   cover modification of the file, and distribution when not linked
++   into another program.)
++
++   Note that people who make modified versions of this file are not
++   obligated to grant this special exception for their modified
++   versions; it is their choice whether to do so. The GNU Lesser
++   General Public License gives permission to release a modified
++   version without this exception; this exception also makes it
++   possible to release a modified version which carries forward this
++   exception.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#define __ASSEMBLY__ 1
++#include <entry.h>
++#include <sgidefs.h>
++#include <sys/asm.h>
++
++#ifndef ENTRY_POINT
++#error ENTRY_POINT needs to be defined for start.S on MIPS/ELF.
++#endif
++
++/* This is the canonical entry point, usually the first thing in the text
++   segment.  The SVR4/Mips ABI (pages 3-31, 3-32) says that when the entry
++   point runs, most registers' values are unspecified, except for:
++
++   v0 ($2)	Contains a function pointer to be registered with `atexit'.
++		This is how the dynamic linker arranges to have DT_FINI
++		functions called for shared libraries that have been loaded
++		before this code runs.
++
++   a0 ($4)	Contains a pointer to the arguments and environment:
++		0(a0)			argc
++		4(a0)			argv[0]
++		...
++		(4*argc)(a0)		NULL
++		(4*(argc+1))(a0)	envp[0]
++		...
++					NULL
++   ra ($31)	The return address register is set to zero so that programs
++		that search backword through stack frames recognize the last
++		stack frame.
++*/
++
++
++/* We need to call:
++   __libc_start_main (int (*main) (int, char **, char **), int argc,
++		      char **argv, void (*init) (void), void (*fini) (void),
++		      void (*rtld_fini) (void), void *stack_end)
++*/
++	
++	.text
++	.globl ENTRY_POINT
++	.type ENTRY_POINT,@function
++ENTRY_POINT:
++#ifdef __PIC__
++	SETUP_GPX($0)
++	SETUP_GPX64($25,$0)
++#else
++	PTR_LA $28, _gp		/* Setup GP correctly if we're non-PIC.  */
++	move $31, $0
++#endif
++
++	PTR_L $5, 0($4)			/* argc */
++	PTR_ADDIU $6, $4, PTRSIZE	/* argv  */
++	PTR_LA $4, main		/* main */
++	
++	/* Allocate space on the stack for seven arguments (o32 only)
++	   and make sure the stack is aligned to double words (8 bytes) 
++	   on o32 and quad words (16 bytes) on n32 and n64.  */
++	
++	and $29, -2 * SZREG
++#if _MIPS_SIM == _ABIO32
++	PTR_SUBIU $29, 32
++#endif
++	PTR_LA $7, __libc_csu_init		/* init */
++	PTR_LA $8, __libc_csu_fini
++#if _MIPS_SIM == _ABIO32
++	PTR_S $8, 16($29)		/* fini */
++	PTR_S $2, 20($29)		/* rtld_fini */
++	PTR_S $29, 24($29)		/* stack_end */
++#else
++	move $9, $2		/* rtld_fini */
++	move $10, $29		/* stack_end */
++#endif
++	jal __libc_start_main
++hlt:	b hlt			/* Crash if somehow it does return.  */
++
++/* Define a symbol for the first piece of initialized data.  */
++	.data
++	.globl __data_start
++__data_start:
++	.long 0
++	.weak data_start
++	data_start = __data_start
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/entry.h
+@@ -0,0 +1,7 @@
++/* http://sources.redhat.com/bugzilla/show_bug.cgi?id=12297 */
++
++#ifndef __ASSEMBLY__
++extern void __start (void);
++#endif
++
++#define ENTRY_POINT __start
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/linuxthreads/pt-machine.h
+@@ -0,0 +1,49 @@
++/* Machine-dependent pthreads configuration and inline functions.
++   MIPS kFreeBSD version.
++   Copyright (C) 2001, 2002, 2003, 2004, 2010 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _FREEBSD_PT_MACHINE_H
++#define _FREEBSD_PT_MACHINE_H   1
++
++/*
++  almost all parts are common with linux version
++ */
++
++#include <linuxthreads/sysdeps/mips/pt-machine.h>
++
++#ifndef __ASSEMBLER__
++
++/* and only one FreeBSD specifics */
++
++#include <machine/sysarch.h>
++
++/* Initialize the thread-unique value. */
++
++#undef INIT_THREAD_SELF
++#define INIT_THREAD_SELF(descr, nr)			\
++  {							\
++    if (sysarch (MIPS_SET_TLS, descr) != 0)		\
++      {							\
++	abort();					\
++      }							\
++  }
++
++#endif /* !__ASSEMBLER__ */
++
++#endif /* pt-machine.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/linuxthreads/sysdep-cancel.h
+@@ -0,0 +1,29 @@
++/* Copyright (C) 2010 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Robert Millan.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h>
++
++/* workarounds for http://sources.redhat.com/bugzilla/show_bug.cgi?id=12300 */
++#ifdef __ASSEMBLER__
++# if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
++#  define RTLD_SINGLE_THREAD_P(reg) SINGLE_THREAD_P(reg)
++# endif
++#else
++# define RTLD_SINGLE_THREAD_P SINGLE_THREAD_P
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/linuxthreads/tls.h
+@@ -0,0 +1,206 @@
++/* Definitions for thread-local data handling.  linuxthreads/MIPS version.
++   Copyright (C) 2005 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _TLS_H
++#define _TLS_H
++
++#ifndef __ASSEMBLER__
++
++# include <stdbool.h>
++# include <pt-machine.h>
++# include <stddef.h>
++
++/* Type for the dtv.  */
++typedef union dtv
++{
++  size_t counter;
++  struct
++  {
++    void *val;
++    bool is_static;
++  } pointer;
++} dtv_t;
++
++# define READ_THREAD_POINTER() \
++    ({ void *__result;							      \
++       asm volatile (".set\tpush\n\t.set\tmips32r2\n\t"			      \
++		     "rdhwr\t%0, $29\n\t.set\tpop" : "=v" (__result));	      \
++       __result; })
++
++#else /* __ASSEMBLER__ */
++# include <tcb-offsets.h>
++
++/* Note: rd must be $v1 to be ABI-conformant.  */
++# define READ_THREAD_POINTER(rd) \
++	.set	push;							      \
++	.set	mips32r2;						      \
++	rdhwr	rd, $29;						      \
++	.set	pop
++#endif /* __ASSEMBLER__ */
++
++/* LinuxThreads can only use TLS if both floating stacks (in the MIPS case,
++   that means support for "rdhwr") and support from the tools are available.
++
++   We have to define USE_TLS consistently, or ldsodefs.h will lay out types
++   differently between an NPTL build and a LinuxThreads build.  It can be set
++   for libc.so and not libpthread.so, but only if we provide appropriate padding
++   in the _pthread_descr_struct.
++
++   Currently nothing defines FLOATING_STACKS.  We could assume this based on
++   kernel version once the TLS patches are available in kernel.org, but
++   it hardly seems worth it.  Use NPTL if you can.
++
++   To avoid bothering with the TLS support code at all, use configure
++   --without-tls.  */
++
++#if defined HAVE_TLS_SUPPORT \
++    && (defined FLOATING_STACKS || !defined IS_IN_libpthread)
++
++/* Signal that TLS support is available.  */
++# define USE_TLS	1
++
++/* Include padding in _pthread_descr_struct so that libc can find p_errno,
++   if libpthread will only include the padding because of the !IS_IN_libpthread
++   check.  */
++#ifndef FLOATING_STACKS
++# define INCLUDE_TLS_PADDING	1
++#endif
++
++# ifndef __ASSEMBLER__
++
++/* This layout is actually wholly private and not affected by the ABI.
++   Nor does it overlap the pthread data structure, so we need nothing
++   extra here at all.  */
++typedef struct
++{
++  dtv_t *dtv;
++  void *private;
++# ifdef __FreeBSD_kernel__
++  long gscope_flag;
++# else
++  int gscope_flag;
++# endif
++} tcbhead_t;
++
++/* This is the size of the initial TCB.  */
++#  define TLS_INIT_TCB_SIZE	0
++
++/* Alignment requirements for the initial TCB.  */
++#  define TLS_INIT_TCB_ALIGN	__alignof__ (struct _pthread_descr_struct)
++
++/* This is the size of the TCB.  */
++#  define TLS_TCB_SIZE		0
++
++/* Alignment requirements for the TCB.  */
++#  define TLS_TCB_ALIGN		__alignof__ (struct _pthread_descr_struct)
++
++/* This is the size we need before TCB.  */
++#  define TLS_PRE_TCB_SIZE \
++  (sizeof (struct _pthread_descr_struct)				      \
++   + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1)))
++
++/* The thread pointer (in hardware register $29) points to the end of
++   the TCB + 0x7000, as for PowerPC.  The pthread_descr structure is
++   immediately in front of the TCB.  */
++#define TLS_TCB_OFFSET		0x7000
++
++/* The DTV is allocated at the TP; the TCB is placed elsewhere.  */
++/* This is not really true for powerpc64.  We are following alpha
++   where the DTV pointer is first doubleword in the TCB.  */
++#  define TLS_DTV_AT_TP 1
++
++/* Install the dtv pointer.  The pointer passed is to the element with
++   index -1 which contain the length.  */
++#  define INSTALL_DTV(TCBP, DTVP) \
++  (((tcbhead_t *) (TCBP))[-1].dtv = (DTVP) + 1)
++
++/* Install new dtv for current thread.  */
++#  define INSTALL_NEW_DTV(DTV) (THREAD_DTV() = (DTV))
++
++/* Return dtv of given thread descriptor.  */
++#  define GET_DTV(TCBP)	(((tcbhead_t *) (TCBP))[-1].dtv)
++
++/* Get system call information.  */
++#  include <sysdep.h>
++#  include <machine/sysarch.h>
++
++/* Code to initially initialize the thread pointer.  This might need
++   special attention since 'errno' is not yet available and if the
++   operation can cause a failure 'errno' must not be touched.  */
++# define TLS_INIT_TP(tcbp, secondcall)					\
++  ({ INTERNAL_SYSCALL_DECL (err);					\
++  long result_var;							\
++  result_var = INTERNAL_SYSCALL (sysarch, err, 2,			\
++				 MIPS_SET_TLS,				\
++				 (char *) (tcbp) + TLS_TCB_OFFSET);	\
++  INTERNAL_SYSCALL_ERROR_P (result_var, err)				\
++    ? "unknown error" : NULL; })
++
++/* Return the address of the dtv for the current thread.  */
++# define THREAD_DTV() \
++  (((tcbhead_t *) (READ_THREAD_POINTER () - TLS_TCB_OFFSET))[-1].dtv)
++
++/* Return the thread descriptor for the current thread.  */
++#  undef THREAD_SELF
++#  define THREAD_SELF \
++    ((pthread_descr) (READ_THREAD_POINTER () \
++		      - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE))
++
++/* Get the thread descriptor definition.  */
++#  include <linuxthreads/descr.h>
++
++/* l_tls_offset == 0 is perfectly valid on MIPS, so we have to use some
++   different value to mean unset l_tls_offset.  */
++#  define NO_TLS_OFFSET	-1
++
++/* Initializing the thread pointer requires a syscall which may not be
++   available, so don't do it if we don't need to.  */
++#  define TLS_INIT_TP_EXPENSIVE 1
++
++
++// fix based on local-linuxthreads-gscope.diff from debian
++
++/* Get and set the global scope generation counter in struct pthread.  */
++#  define THREAD_GSCOPE_FLAG_UNUSED 0
++#  define THREAD_GSCOPE_FLAG_USED   1
++#  define THREAD_GSCOPE_FLAG_WAIT   2
++#  define THREAD_GSCOPE_RESET_FLAG()					\
++  do									\
++    { int __res								\
++	= atomic_exchange_rel (&THREAD_SELF->p_gscope_flag,		\
++			       THREAD_GSCOPE_FLAG_UNUSED);		\
++      if (__res == THREAD_GSCOPE_FLAG_WAIT)				\
++	lll_futex_wake (&THREAD_SELF->p_gscope_flag, 1);		\
++    }									\
++  while (0)
++#  define THREAD_GSCOPE_SET_FLAG()					\
++  do									\
++    {									\
++      THREAD_SELF->p_gscope_flag = THREAD_GSCOPE_FLAG_USED;		\
++      atomic_write_barrier ();						\
++    }									\
++  while (0)
++#  define THREAD_GSCOPE_WAIT()			\
++  GL(dl_wait_lookup_done) ()
++
++# endif /* __ASSEMBLER__ */
++
++#endif /* HAVE_TLS_SUPPORT */
++
++#endif	/* tls.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/mips32/Makefile
+@@ -0,0 +1,2 @@
++# pull in __syscall_error routine (needed by sysdep.h in this directory)
++libpthread-routines += sysdep
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/mips32/bits/mcontext.h
+@@ -0,0 +1,116 @@
++/* Machine-dependent processor state structure for kFreeBSD.
++   Copyright (C) 2010 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.  mips version.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#if !defined _SYS_UCONTEXT_H
++# error "Never use <bits/mcontext.h> directly; include <sys/ucontext.h> instead."
++#endif
++
++/*
++ * Copyright (c) 1992, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * This code is derived from software contributed to Berkeley by
++ * Ralph Campbell.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)ucontext.h	8.1 (Berkeley) 6/10/93
++ *	JNPR: ucontext.h,v 1.2 2007/08/09 11:23:32 katta
++ * $FreeBSD$
++ */
++
++typedef struct	__mcontext {
++	/*
++	 * These fields must match the corresponding fields in struct 
++	 * sigcontext which follow 'sc_mask'. That way we can support
++	 * struct sigcontext and ucontext_t at the same time.
++	 */
++	int		mc_onstack;	/* sigstack state to restore */
++	int	mc_pc;		/* pc at time of signal */
++	int	mc_regs[32];	/* processor regs 0 to 31 */
++        int      sr;             /* status register */
++        int	mullo, mulhi;	/* mullo and mulhi registers... */
++	int		mc_fpused;	/* fp has been used */
++	int	mc_fpregs[33];	/* fp regs 0 to 31 and csr */
++	int	mc_fpc_eir;	/* fp exception instruction reg */
++	int	__spare__[8];	/* XXX reserved */ 
++} mcontext_t;
++
++#define	SZREG		4
++
++/* offsets into mcontext_t */
++#define	UCTX_REG(x)	(8 + (x)*SZREG)
++
++#define	UCR_ZERO	UCTX_REG(0)
++#define	UCR_AT		UCTX_REG(1)
++#define	UCR_V0		UCTX_REG(2)
++#define	UCR_V1		UCTX_REG(3)
++#define	UCR_A0		UCTX_REG(4)
++#define	UCR_A1		UCTX_REG(5)
++#define	UCR_A2		UCTX_REG(6)
++#define	UCR_A3		UCTX_REG(7)
++#define	UCR_T0		UCTX_REG(8)
++#define	UCR_T1		UCTX_REG(9)
++#define	UCR_T2		UCTX_REG(10)
++#define	UCR_T3		UCTX_REG(11)
++#define	UCR_T4		UCTX_REG(12)
++#define	UCR_T5		UCTX_REG(13)
++#define	UCR_T6		UCTX_REG(14)
++#define	UCR_T7		UCTX_REG(15)
++#define	UCR_S0		UCTX_REG(16)
++#define	UCR_S1		UCTX_REG(17)
++#define	UCR_S2		UCTX_REG(18)
++#define	UCR_S3		UCTX_REG(19)
++#define	UCR_S4		UCTX_REG(20)
++#define	UCR_S5		UCTX_REG(21)
++#define	UCR_S6		UCTX_REG(22)
++#define	UCR_S7		UCTX_REG(23)
++#define	UCR_T8		UCTX_REG(24)
++#define	UCR_T9		UCTX_REG(25)
++#define	UCR_K0		UCTX_REG(26)
++#define	UCR_K1		UCTX_REG(27)
++#define	UCR_GP		UCTX_REG(28)
++#define	UCR_SP		UCTX_REG(29)
++#define	UCR_S8		UCTX_REG(30)
++#define	UCR_RA		UCTX_REG(31)
++#define UCR_SR          UCTX_REG(32)
++#define	UCR_MDLO	UCTX_REG(33)
++#define	UCR_MDHI	UCTX_REG(34)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/mips32/bits/sigcontext.h
+@@ -0,0 +1,92 @@
++/* Machine-dependent signal context structure for kFreeBSD.  mips version.
++   Copyright (C) 1991-1992,1994,1997,2001-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
++# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
++#endif
++
++#ifndef _BITS_SIGCONTEXT_H
++#define _BITS_SIGCONTEXT_H  1
++
++/*	$OpenBSD: signal.h,v 1.2 1999/01/27 04:10:03 imp Exp $	*/
++
++/*
++ * Copyright (c) 1992, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * This code is derived from software contributed to Berkeley by
++ * Ralph Campbell.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)signal.h	8.1 (Berkeley) 6/10/93
++ *	JNPR: signal.h,v 1.4 2007/01/08 04:58:37 katta
++ * $FreeBSD$
++ */
++
++/*
++ * Information pushed on stack when a signal is delivered.
++ * This is used by the kernel to restore state following
++ * execution of the signal handler.  It is also made available
++ * to the handler to allow it to restore state properly if
++ * a non-standard exit is performed.
++ */
++
++__extension__ struct sigcontext {
++	/*
++	 * The fields following 'sc_mask' must match the definition
++	 * of struct __mcontext. That way we can support
++	 * struct sigcontext and ucontext_t at the same
++	 * time.
++	 */
++	__sigset_t	sc_mask;	/* signal mask to restore */
++	int		sc_onstack;	/* sigstack state to restore */
++	int	sc_pc;		/* pc at time of signal */
++	int	sc_regs[32];	/* processor regs 0 to 31 */
++	int	mullo, mulhi;	/* mullo and mulhi registers... */
++	int		sc_fpused;	/* fp has been used */
++	int	sc_fpregs[33];	/* fp regs 0 to 31 and csr */
++	int	sc_fpc_eir;	/* fp exception instruction reg */
++	int		xxx[8];		/* XXX reserved */ 
++};
++
++#endif /* _BITS_SIGCONTEXT_H */
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/mips32/sysdep.h
+@@ -0,0 +1,49 @@
++/* Copyright (C) 2010 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Robert Millan.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _KFREEBSD_MIPS_SYSDEP_H
++#define _KFREEBSD_MIPS_SYSDEP_H 1
++
++/* This drags in __syscall_error, keep in sync with Makefile in
++   this directory.  */
++#include <ports/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h>
++
++/* Default INLINE_SYSCALL works but is buggy for 64-bit arguments
++   (breaks mmap, lseek...).  */
++#undef INLINE_SYSCALL
++#define INLINE_SYSCALL(name, nr, args...) __syscall_##name(args)
++
++/* Revert Linux kludge.  */
++#undef SYS_ify
++#ifdef __STDC__
++# define SYS_ify(syscall_name)  SYS_##syscall_name
++#else
++# define SYS_ify(syscall_name)  SYS_/**/syscall_name
++#endif
++
++/* Workaround for http://sources.redhat.com/bugzilla/show_bug.cgi?id=12301 */
++#ifdef __ASSEMBLER__
++/* We don't want the label for the error handler to be visible in the symbol
++   table when we define it here.  */
++#ifdef __PIC__
++# define SYSCALL_ERROR_LABEL 99b
++#endif
++#endif   /* ! __ASSEMBLER__ */
++
++#endif /* _KFREEBSD_MIPS_SYSDEP_H */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/mips64/bits/mcontext.h
+@@ -0,0 +1,116 @@
++/* Machine-dependent processor state structure for kFreeBSD.
++   Copyright (C) 2010 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.  mips version.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#if !defined _SYS_UCONTEXT_H
++# error "Never use <bits/mcontext.h> directly; include <sys/ucontext.h> instead."
++#endif
++
++/*
++ * Copyright (c) 1992, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * This code is derived from software contributed to Berkeley by
++ * Ralph Campbell.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)ucontext.h	8.1 (Berkeley) 6/10/93
++ *	JNPR: ucontext.h,v 1.2 2007/08/09 11:23:32 katta
++ * $FreeBSD$
++ */
++
++typedef struct	__mcontext {
++	/*
++	 * These fields must match the corresponding fields in struct 
++	 * sigcontext which follow 'sc_mask'. That way we can support
++	 * struct sigcontext and ucontext_t at the same time.
++	 */
++	int		mc_onstack;	/* sigstack state to restore */
++	long int	mc_pc;		/* pc at time of signal */
++	long int	mc_regs[32];	/* processor regs 0 to 31 */
++        long int      sr;             /* status register */
++        long int	mullo, mulhi;	/* mullo and mulhi registers... */
++	int		mc_fpused;	/* fp has been used */
++	long int	mc_fpregs[33];	/* fp regs 0 to 31 and csr */
++	long int	mc_fpc_eir;	/* fp exception instruction reg */
++	int	__spare__[8];	/* XXX reserved */ 
++} mcontext_t;
++
++#define	SZREG		4
++
++/* offsets into mcontext_t */
++#define	UCTX_REG(x)	(8 + (x)*SZREG)
++
++#define	UCR_ZERO	UCTX_REG(0)
++#define	UCR_AT		UCTX_REG(1)
++#define	UCR_V0		UCTX_REG(2)
++#define	UCR_V1		UCTX_REG(3)
++#define	UCR_A0		UCTX_REG(4)
++#define	UCR_A1		UCTX_REG(5)
++#define	UCR_A2		UCTX_REG(6)
++#define	UCR_A3		UCTX_REG(7)
++#define	UCR_T0		UCTX_REG(8)
++#define	UCR_T1		UCTX_REG(9)
++#define	UCR_T2		UCTX_REG(10)
++#define	UCR_T3		UCTX_REG(11)
++#define	UCR_T4		UCTX_REG(12)
++#define	UCR_T5		UCTX_REG(13)
++#define	UCR_T6		UCTX_REG(14)
++#define	UCR_T7		UCTX_REG(15)
++#define	UCR_S0		UCTX_REG(16)
++#define	UCR_S1		UCTX_REG(17)
++#define	UCR_S2		UCTX_REG(18)
++#define	UCR_S3		UCTX_REG(19)
++#define	UCR_S4		UCTX_REG(20)
++#define	UCR_S5		UCTX_REG(21)
++#define	UCR_S6		UCTX_REG(22)
++#define	UCR_S7		UCTX_REG(23)
++#define	UCR_T8		UCTX_REG(24)
++#define	UCR_T9		UCTX_REG(25)
++#define	UCR_K0		UCTX_REG(26)
++#define	UCR_K1		UCTX_REG(27)
++#define	UCR_GP		UCTX_REG(28)
++#define	UCR_SP		UCTX_REG(29)
++#define	UCR_S8		UCTX_REG(30)
++#define	UCR_RA		UCTX_REG(31)
++#define UCR_SR          UCTX_REG(32)
++#define	UCR_MDLO	UCTX_REG(33)
++#define	UCR_MDHI	UCTX_REG(34)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/mips64/bits/sigcontext.h
+@@ -0,0 +1,92 @@
++/* Machine-dependent signal context structure for kFreeBSD.  mips version.
++   Copyright (C) 1991-1992,1994,1997,2001-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
++# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
++#endif
++
++#ifndef _BITS_SIGCONTEXT_H
++#define _BITS_SIGCONTEXT_H  1
++
++/*	$OpenBSD: signal.h,v 1.2 1999/01/27 04:10:03 imp Exp $	*/
++
++/*
++ * Copyright (c) 1992, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * This code is derived from software contributed to Berkeley by
++ * Ralph Campbell.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)signal.h	8.1 (Berkeley) 6/10/93
++ *	JNPR: signal.h,v 1.4 2007/01/08 04:58:37 katta
++ * $FreeBSD$
++ */
++
++/*
++ * Information pushed on stack when a signal is delivered.
++ * This is used by the kernel to restore state following
++ * execution of the signal handler.  It is also made available
++ * to the handler to allow it to restore state properly if
++ * a non-standard exit is performed.
++ */
++
++__extension__ struct sigcontext {
++	/*
++	 * The fields following 'sc_mask' must match the definition
++	 * of struct __mcontext. That way we can support
++	 * struct sigcontext and ucontext_t at the same
++	 * time.
++	 */
++	__sigset_t	sc_mask;	/* signal mask to restore */
++	int		sc_onstack;	/* sigstack state to restore */
++	long int	sc_pc;		/* pc at time of signal */
++	long int	sc_regs[32];	/* processor regs 0 to 31 */
++	long int	mullo, mulhi;	/* mullo and mulhi registers... */
++	int		sc_fpused;	/* fp has been used */
++	long int	sc_fpregs[33];	/* fp regs 0 to 31 and csr */
++	long int	sc_fpc_eir;	/* fp exception instruction reg */
++	int		xxx[8];		/* XXX reserved */ 
++};
++
++#endif /* _BITS_SIGCONTEXT_H */
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/start_thread.S
+@@ -0,0 +1,56 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++   Modification for amd64 contributed by Petr Salinger, 2006.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/* __start_thread (flags, stack, func, arg)
++   calls __rfork (flags), and in the child sets the stack pointer and then
++   calls _exit (func (arg)).
++   It cannot be done in portable C.  */
++
++/*
++   The parameters are passed in registers:
++   rdi: flags for rfork
++   rsi: child_stack
++   rdx: func
++   rcx: arg
++*/
++
++#include <sysdep.h>
++#include <asm-syntax.h>
++
++#define SIG_SETMASK	3
++
++/* There is a window of a few instructions, right after the rfork
++   system call, where the handling of a signal would write garbage
++   into the stack shared by the parent and the child (assuming
++   RFMEM is set in flags).  To solve this: 1. We block all signals
++   around the rfork system call and unblock them afterwards in
++   the parent and in the child (but only after changing the stack
++   pointer).  2. The child accesses only values passed in registers
++   and on its own stack.  This way, if the parent is scheduled to
++   run first, and handles a signal, it will not affect the child;
++   and if the child runs first, and handles a signal, it will use
++   the child's stack and not affect the parent.
++*/
++
++/* FIXME */
++
++	.text
++ENTRY (__start_thread)
++PSEUDO_END (__start_thread)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mips/sys/tas.h
+@@ -0,0 +1,2 @@
++/* workaround for http://sources.redhat.com/bugzilla/show_bug.cgi?id=12298 */
++#include <ports/sysdeps/unix/sysv/linux/mips/sys/tas.h>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mkdirat.c
+@@ -0,0 +1,126 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write file the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Bosfilen, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stddef.h>
++#include <stdio.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sysdep.h>
++#include <sys/stat.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <kernel-features.h>
++
++extern int __syscall_mkdirat (int fd, const char *path, mode_t mode);
++libc_hidden_proto (__syscall_mkdirat)
++
++/* Create a new direcfilery with permission bits MODE.  But interpret
++   relative PATH names relative file the direcfilery associated with FD.  */
++int
++mkdirat (fd, file, mode)
++     int fd;
++     const char *file;
++     mode_t mode;
++{
++# ifndef __ASSUME_ATFCTS
++  if (__have_atfcts >= 0)
++# endif
++    {
++      int result = INLINE_SYSCALL (mkdirat, 3, fd, file, mode);
++# ifndef __ASSUME_ATFCTS
++      if (result == -1 && errno == ENOSYS)
++	__have_atfcts = -1;
++      else
++# endif
++	return result;
++    }
++
++#ifndef __ASSUME_ATFCTS
++  if (fd != AT_FDCWD && file[0] != '/')
++    {
++      int mib[4];
++      size_t kf_len = 0;
++      char *kf_buf, *kf_bufp;
++      size_t filelen;
++
++      if (fd < 0)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++
++      filelen = strlen (file);
++      if (__builtin_expect (filelen == 0, 0))
++	{
++	  __set_errno (ENOENT);
++	  return -1;
++	}
++
++      mib[0] = CTL_KERN;
++      mib[1] = KERN_PROC;
++      mib[2] = KERN_PROC_FILEDESC;
++      mib[3] = __getpid ();
++
++      if (__sysctl (mib, 4, NULL, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_buf = alloca (kf_len + filelen);
++      if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_bufp = kf_buf;
++      while (kf_bufp < kf_buf + kf_len)
++	{
++	  struct kinfo_file *kf = (struct kinfo_file *) (uintptr_t) kf_bufp;
++
++	  if (kf->kf_fd == fd)
++	    {
++	      if (kf->kf_type != KF_TYPE_VNODE ||
++		  kf->kf_vnode_type != KF_VTYPE_VDIR)
++		{
++		  __set_errno (ENOTDIR);
++		  return -1;
++		}
++
++	      strcat (kf->kf_path, "/");
++	      strcat (kf->kf_path, file);
++	      file = kf->kf_path;
++	      break;
++	    }
++	  kf_bufp += kf->kf_structsize;
++	}
++
++      if (kf_bufp >= kf_buf + kf_len)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++    }
++
++  return __mkdir (file, mode);
++#endif
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mmap.c
+@@ -0,0 +1,86 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/types.h>
++#include <sys/mman.h>
++#include <unistd.h>
++#include <errno.h>
++#include <sysdep.h>
++
++extern void *__syscall_mmap (void *__addr, size_t __len, int __prot,
++			     int __flags, int __fd, __off_t __offset) __THROW;
++libc_hidden_proto (__syscall_mmap)
++extern void *__syscall_freebsd6_mmap (void *__addr, size_t __len, int __prot,
++			     int __flags, int __fd, int __unused1,
++			     __off_t __offset) __THROW;
++libc_hidden_proto (__syscall_freebsd6_mmap)
++extern ssize_t __syscall_freebsd6_pread (int __fd, void *__buf, size_t __nbytes,
++                                int __unused1, __off_t __offset) __THROW;
++libc_hidden_proto (__syscall_freebsd6_pread)
++
++void *
++__mmap (void *addr, size_t len, int prot, int flags, int fd, __off_t offset)
++{
++  void *result;
++
++  /* Validity checks not done by the kernel.  */
++  if (offset != 0)
++    {
++      int pagesize = __getpagesize ();
++      if ((__builtin_expect (pagesize & (pagesize - 1), 0)
++        ? offset % pagesize
++	: offset & (pagesize - 1)))
++	{
++	  __set_errno (EINVAL);
++	  return (void *) (-1);
++	}
++    }
++
++  /* for ANON mapping we must pass -1 in place of fd */
++  if (flags & MAP_ANON)
++    fd = -1;
++
++  /* First try the new syscall. */
++  result = (void *) INLINE_SYSCALL (mmap, 6, addr, len, prot, flags, fd, offset);
++
++#ifndef __ASSUME_MMAP_SYSCALL
++  if (result == (void *) (-1) && errno == ENOSYS)
++    {
++      /* New syscall not available, use the old one. */
++      result = (void *) INLINE_SYSCALL (freebsd6_mmap, 7, addr, len, prot, flags, fd, 0, offset);
++      if (result != (void *) (-1) && fd >= 0 && len > 0)
++	{
++	  /* Force an update of the atime.  POSIX:2001 mandates that this happens
++	  at some time between the mmap() call and the first page-in.  Since
++	  the FreeBSD 6.0 kernel doesn't update the atime upon a page-in, we
++	  do it here.  */
++	  char dummy;
++	  INLINE_SYSCALL (freebsd6_pread, 5, fd, &dummy, 1, 0, offset);
++	}
++    }
++#endif
++
++  return result;
++}
++
++weak_alias (__mmap, mmap)
++
++/* 'mmap64' is the same as 'mmap', because __off64_t == __off_t.  */
++strong_alias (__mmap, __mmap64)
++weak_alias (__mmap64, mmap64)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/mmap64.c
+@@ -0,0 +1 @@
++/* 'mmap64' is the same as 'mmap', because __off64_t == __off_t.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/munmap.c
+@@ -0,0 +1,41 @@
++/* Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Petr Salinger, 2006.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/types.h>
++#include <sys/mman.h>
++#include <unistd.h>
++#include <errno.h>
++#include <sysdep.h>
++
++extern int __syscall_munmap (void *__addr, size_t __len) __THROW;
++libc_hidden_proto (__syscall_munmap)
++
++int
++__munmap (void *addr, size_t len)
++{
++    int pagesize = __getpagesize ();
++    if ((unsigned long) addr & (pagesize - 1))
++    {
++	__set_errno (EINVAL);
++	return -1;
++    }
++  return INLINE_SYSCALL (munmap, 2, addr, len);
++}
++
++weak_alias (__munmap, munmap)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/net/ethernet.h
+@@ -0,0 +1,77 @@
++/* Copyright (C) 1997, 1999, 2001, 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/* Based on the FreeBSD version of this file. Curiously, that file
++   lacks a copyright in the header. */
++
++#ifndef __NET_ETHERNET_H
++#define __NET_ETHERNET_H 1
++
++#include <sys/cdefs.h>
++#include <sys/types.h>
++#include <net/if_ether.h>     /* IEEE 802.3 Ethernet constants */
++
++__BEGIN_DECLS
++
++/* This is a name for the 48 bit ethernet address available on many
++   systems.  */
++struct ether_addr
++{
++  u_int8_t octet[ETH_ALEN];
++#define ether_addr_octet octet  
++} __attribute__ ((__packed__));
++
++/* 10Mb/s ethernet header */
++struct ether_header
++{
++  u_int8_t  ether_dhost[ETH_ALEN];	/* destination eth addr	*/
++  u_int8_t  ether_shost[ETH_ALEN];	/* source ether addr	*/
++  u_int16_t ether_type;		        /* packet type ID field	*/
++} __attribute__ ((__packed__));
++
++/* Ethernet protocol ID's */
++#define	ETHERTYPE_PUP		0x0200          /* Xerox PUP */
++#define	ETHERTYPE_IP		0x0800		/* IP */
++#define	ETHERTYPE_ARP		0x0806		/* Address resolution */
++#define	ETHERTYPE_REVARP	0x8035		/* Reverse ARP */
++
++#define	ETHER_ADDR_LEN	ETH_ALEN                 /* size of ethernet addr */
++#define	ETHER_TYPE_LEN	2                        /* bytes in type field */
++#define	ETHER_CRC_LEN	4                        /* bytes in CRC field */
++#define	ETHER_HDR_LEN	ETH_HLEN                 /* total octets in header */
++#define	ETHER_MIN_LEN	(ETH_ZLEN + ETHER_CRC_LEN) /* min packet length */
++#define	ETHER_MAX_LEN	(ETH_FRAME_LEN + ETHER_CRC_LEN) /* max packet length */
++
++/* make sure ethenet length is valid */
++#define	ETHER_IS_VALID_LEN(foo)	\
++	((foo) >= ETHER_MIN_LEN && (foo) <= ETHER_MAX_LEN)
++
++/*
++ * The ETHERTYPE_NTRAILER packet types starting at ETHERTYPE_TRAIL have
++ * (type-ETHERTYPE_TRAIL)*512 bytes of data followed
++ * by an ETHER type (as given above) and then the (variable-length) header.
++ */
++#define	ETHERTYPE_TRAIL		0x1000		/* Trailer packet */
++#define	ETHERTYPE_NTRAILER	16
++
++#define	ETHERMTU	ETH_DATA_LEN
++#define	ETHERMIN	(ETHER_MIN_LEN - ETHER_HDR_LEN - ETHER_CRC_LEN)
++
++__END_DECLS
++
++#endif	/* net/ethernet.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/net/if.h
+@@ -0,0 +1,451 @@
++/*-
++ * Copyright (c) 1982, 1986, 1989, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)if.h	8.1 (Berkeley) 6/10/93
++ * $FreeBSD: src/sys/net/if.h,v 1.108 2007/06/11 20:08:11 andre Exp $
++ */
++
++#ifndef _NET_IF_H_
++#define	_NET_IF_H_
++
++#include <sys/cdefs.h>
++
++#include <features.h>
++
++#include <sys/time.h>
++#include <sys/types.h>
++#include <sys/socket.h>
++
++struct ifnet;
++
++/*
++ * Length of interface external name, including terminating '\0'.
++ * Note: this is the same size as a generic device's external name.
++ */
++#define		IF_NAMESIZE	16
++#define		IFNAMSIZ	IF_NAMESIZE
++#define		IF_MAXUNIT	0x7fff	/* historical value */
++
++/*
++ * Structure used to query names of interface cloners.
++ */
++
++struct if_clonereq {
++	int	ifcr_total;		/* total cloners (out) */
++	int	ifcr_count;		/* room for this many in user buffer */
++	char	*ifcr_buffer;		/* buffer for cloner names */
++};
++
++/*
++ * Structure describing information about an interface
++ * which may be of interest to management entities.
++ */
++struct if_data {
++	/* generic interface information */
++	unsigned char	ifi_type;		/* ethernet, tokenring, etc */
++	unsigned char	ifi_physical;		/* e.g., AUI, Thinnet, 10base-T, etc */
++	unsigned char	ifi_addrlen;		/* media address length */
++	unsigned char	ifi_hdrlen;		/* media header length */
++	unsigned char	ifi_link_state;		/* current link state */
++	unsigned char	ifi_spare_char1;	/* spare byte */
++	unsigned char	ifi_spare_char2;	/* spare byte */
++	unsigned char	ifi_datalen;		/* length of this data struct */
++	unsigned long	ifi_mtu;		/* maximum transmission unit */
++	unsigned long	ifi_metric;		/* routing metric (external only) */
++	unsigned long	ifi_baudrate;		/* linespeed */
++	/* volatile statistics */
++	unsigned long	ifi_ipackets;		/* packets received on interface */
++	unsigned long	ifi_ierrors;		/* input errors on interface */
++	unsigned long	ifi_opackets;		/* packets sent on interface */
++	unsigned long	ifi_oerrors;		/* output errors on interface */
++	unsigned long	ifi_collisions;		/* collisions on csma interfaces */
++	unsigned long	ifi_ibytes;		/* total number of octets received */
++	unsigned long	ifi_obytes;		/* total number of octets sent */
++	unsigned long	ifi_imcasts;		/* packets received via multicast */
++	unsigned long	ifi_omcasts;		/* packets sent via multicast */
++	unsigned long	ifi_iqdrops;		/* dropped on input, this interface */
++	unsigned long	ifi_noproto;		/* destined for unsupported protocol */
++	unsigned long	ifi_hwassist;		/* HW offload capabilities, see IFCAP */
++	time_t	ifi_epoch;		/* uptime at attach or stat reset */
++	struct	timeval ifi_lastchange;	/* time of last administrative change */
++};
++
++/*-
++ * Interface flags are of two types: network stack owned flags, and driver
++ * owned flags.  Historically, these values were stored in the same ifnet
++ * flags field, but with the advent of fine-grained locking, they have been
++ * broken out such that the network stack is responsible for synchronizing
++ * the stack-owned fields, and the device driver the device-owned fields.
++ * Both halves can perform lockless reads of the other half's field, subject
++ * to accepting the involved races.
++ *
++ * Both sets of flags come from the same number space, and should not be
++ * permitted to conflict, as they are exposed to user space via a single
++ * field.
++ *
++ * The following symbols identify read and write requirements for fields:
++ *
++ * (i) if_flags field set by device driver before attach, read-only there
++ *     after.
++ * (n) if_flags field written only by the network stack, read by either the
++ *     stack or driver.
++ * (d) if_drv_flags field written only by the device driver, read by either
++ *     the stack or driver.
++ */
++#define	IFF_UP		0x1		/* (n) interface is up */
++#define	IFF_BROADCAST	0x2		/* (i) broadcast address valid */
++#define	IFF_DEBUG	0x4		/* (n) turn on debugging */
++#define	IFF_LOOPBACK	0x8		/* (i) is a loopback net */
++#define	IFF_POINTOPOINT	0x10		/* (i) is a point-to-point link */
++#define	IFF_SMART	0x20		/* (i) interface manages own routes */
++#define	IFF_DRV_RUNNING	0x40		/* (d) resources allocated */
++#define	IFF_NOARP	0x80		/* (n) no address resolution protocol */
++#define	IFF_PROMISC	0x100		/* (n) receive all packets */
++#define	IFF_ALLMULTI	0x200		/* (n) receive all multicast packets */
++#define	IFF_DRV_OACTIVE	0x400		/* (d) tx hardware queue is full */
++#define	IFF_SIMPLEX	0x800		/* (i) can't hear own transmissions */
++#define	IFF_LINK0	0x1000		/* per link layer defined bit */
++#define	IFF_LINK1	0x2000		/* per link layer defined bit */
++#define	IFF_LINK2	0x4000		/* per link layer defined bit */
++#define	IFF_ALTPHYS	IFF_LINK2	/* use alternate physical connection */
++#define	IFF_MULTICAST	0x8000		/* (i) supports multicast */
++#define	IFF_CANTCONFIG	0x10000		/* (i) unconfigurable using ioctl(2) */
++#define	IFF_PPROMISC	0x20000		/* (n) user-requested promisc mode */
++#define	IFF_MONITOR	0x40000		/* (n) user-requested monitor mode */
++#define	IFF_STATICARP	0x80000		/* (n) static ARP */
++#define	IFF_NEEDSGIANT	0x100000	/* (i) hold Giant over if_start calls */
++#define IFF_DYING       0x200000        /* (n) interface is winding down */
++#define	IFF_RENAMING    0x400000        /* (n) interface is being renamed */
++
++/*
++ * Old names for driver flags so that user space tools can continue to use
++ * the old (portable) names.
++ */
++#ifndef _KERNEL
++#define	IFF_RUNNING	IFF_DRV_RUNNING
++#define	IFF_OACTIVE	IFF_DRV_OACTIVE
++#endif
++
++/* flags set internally only: */
++#define	IFF_CANTCHANGE \
++	(IFF_BROADCAST|IFF_POINTOPOINT|IFF_DRV_RUNNING|IFF_DRV_OACTIVE|\
++	    IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART|IFF_PROMISC|\
++	    IFF_DYING|IFF_CANTCONFIG)
++
++/*
++ * Values for if_link_state.
++ */
++#define	LINK_STATE_UNKNOWN	0	/* link invalid/unknown */
++#define	LINK_STATE_DOWN		1	/* link is down */
++#define	LINK_STATE_UP		2	/* link is up */
++
++/*
++ * Some convenience macros used for setting ifi_baudrate.
++ * XXX 1000 vs. 1024? --thorpej@netbsd.org
++ */
++#define	IF_Kbps(x)	((x) * 1000)		/* kilobits/sec. */
++#define	IF_Mbps(x)	(IF_Kbps((x) * 1000))	/* megabits/sec. */
++#define	IF_Gbps(x)	(IF_Mbps((x) * 1000))	/* gigabits/sec. */
++
++/*
++ * Capabilities that interfaces can advertise.
++ *
++ * struct ifnet.if_capabilities
++ *   contains the optional features & capabilities a particular interface
++ *   supports (not only the driver but also the detected hw revision).
++ *   Capabilities are defined by IFCAP_* below.
++ * struct ifnet.if_capenable
++ *   contains the enabled (either by default or through ifconfig) optional
++ *   features & capabilities on this interface.
++ *   Capabilities are defined by IFCAP_* below.
++ * struct if_data.ifi_hwassist in mbuf CSUM_ flag form, controlled by above
++ *   contains the enabled optional feature & capabilites that can be used
++ *   individually per packet and are specified in the mbuf pkthdr.csum_flags
++ *   field.  IFCAP_* and CSUM_* do not match one to one and CSUM_* may be
++ *   more detailed or differenciated than IFCAP_*.
++ *   Hwassist features are defined CSUM_* in sys/mbuf.h
++ */
++#define	IFCAP_RXCSUM		0x00001  /* can offload checksum on RX */
++#define	IFCAP_TXCSUM		0x00002  /* can offload checksum on TX */
++#define	IFCAP_NETCONS		0x00004  /* can be a network console */
++#define	IFCAP_VLAN_MTU		0x00008	/* VLAN-compatible MTU */
++#define	IFCAP_VLAN_HWTAGGING	0x00010	/* hardware VLAN tag support */
++#define	IFCAP_JUMBO_MTU		0x00020	/* 9000 byte MTU supported */
++#define	IFCAP_POLLING		0x00040	/* driver supports polling */
++#define	IFCAP_VLAN_HWCSUM	0x00080	/* can do IFCAP_HWCSUM on VLANs */
++#define	IFCAP_TSO4		0x00100	/* can do TCP Segmentation Offload */
++#define	IFCAP_TSO6		0x00200	/* can do TCP6 Segmentation Offload */
++#define	IFCAP_LRO		0x00400	/* can do Large Receive Offload */
++#define	IFCAP_WOL_UCAST		0x00800	/* wake on any unicast frame */
++#define	IFCAP_WOL_MCAST		0x01000	/* wake on any multicast frame */
++#define	IFCAP_WOL_MAGIC		0x02000	/* wake on any Magic Packet */
++#define	IFCAP_TOE4		0x04000	/* interface can offload TCP */
++#define	IFCAP_TOE6		0x08000	/* interface can offload TCP6 */
++#define	IFCAP_VLAN_HWFILTER	0x10000 /* interface hw can filter vlan tag */
++#define IFCAP_POLLING_NOCOUNT   0x20000 /* polling ticks cannot be fragmented */
++#define	IFCAP_VLAN_HWTSO        0x40000 /* can do IFCAP_TSO on VLANs */
++#define	IFCAP_LINKSTATE         0x80000 /* the runtime link state is dynamic */
++
++#define	IFCAP_HWCSUM		(IFCAP_RXCSUM | IFCAP_TXCSUM)
++#define	IFCAP_TSO		(IFCAP_TSO4 | IFCAP_TSO6)
++#define	IFCAP_WOL		(IFCAP_WOL_UCAST | IFCAP_WOL_MCAST | IFCAP_WOL_MAGIC)
++#define	IFCAP_TOE		(IFCAP_TOE4 | IFCAP_TOE6)
++
++#define	IFQ_MAXLEN	50
++#define	IFNET_SLOWHZ	1		/* granularity is 1 second */
++
++/*
++ * Message format for use in obtaining information about interfaces
++ * from getkerninfo and the routing socket
++ */
++struct if_msghdr {
++	unsigned short	ifm_msglen;	/* to skip over non-understood messages */
++	unsigned char	ifm_version;	/* future binary compatibility */
++	unsigned char	ifm_type;	/* message type */
++	int	ifm_addrs;	/* like rtm_addrs */
++	int	ifm_flags;	/* value of if_flags */
++	unsigned short	ifm_index;	/* index for associated ifp */
++	struct	if_data ifm_data;/* statistics and other data about if */
++};
++
++/*
++ * Message format for use in obtaining information about interface addresses
++ * from getkerninfo and the routing socket
++ */
++struct ifa_msghdr {
++	unsigned short	ifam_msglen;	/* to skip over non-understood messages */
++	unsigned char	ifam_version;	/* future binary compatibility */
++	unsigned char	ifam_type;	/* message type */
++	int	ifam_addrs;	/* like rtm_addrs */
++	int	ifam_flags;	/* value of ifa_flags */
++	unsigned short	ifam_index;	/* index for associated ifp */
++	int	ifam_metric;	/* value of ifa_metric */
++};
++
++/*
++ * Message format for use in obtaining information about multicast addresses
++ * from the routing socket
++ */
++struct ifma_msghdr {
++	unsigned short	ifmam_msglen;	/* to skip over non-understood messages */
++	unsigned char	ifmam_version;	/* future binary compatibility */
++	unsigned char	ifmam_type;	/* message type */
++	int	ifmam_addrs;	/* like rtm_addrs */
++	int	ifmam_flags;	/* value of ifa_flags */
++	unsigned short	ifmam_index;	/* index for associated ifp */
++};
++
++/*
++ * Message format announcing the arrival or departure of a network interface.
++ */
++struct if_announcemsghdr {
++	unsigned short	ifan_msglen;	/* to skip over non-understood messages */
++	unsigned char	ifan_version;	/* future binary compatibility */
++	unsigned char	ifan_type;	/* message type */
++	unsigned short	ifan_index;	/* index for associated ifp */
++	char	ifan_name[IFNAMSIZ]; /* if name, e.g. "en0" */
++	unsigned short	ifan_what;	/* what type of announcement */
++};
++
++#define	IFAN_ARRIVAL	0	/* interface arrival */
++#define	IFAN_DEPARTURE	1	/* interface departure */
++
++/*
++ * Buffer with length to be used in SIOCGIFDESCR/SIOCSIFDESCR requests
++ */
++struct ifreq_buffer {
++	size_t  length;
++	void    *buffer;
++};
++ 
++/*
++ * Interface request structure used for socket
++ * ioctl's.  All interface ioctl's must have parameter
++ * definitions which begin with ifr_name.  The
++ * remainder may be interface specific.
++ */
++struct	ifreq {
++	char	ifr_name[IFNAMSIZ];		/* if name, e.g. "en0" */
++	union {
++		struct	sockaddr ifru_addr;
++		struct	sockaddr ifru_dstaddr;
++		struct	sockaddr ifru_broadaddr;
++		struct	sockaddr ifru_netmask;
++		struct  ifreq_buffer ifru_buffer;
++		short	ifru_flags[2];
++		short	ifru_index;
++		int	ifru_jid;
++		int	ifru_metric;
++		int	ifru_mtu;
++		int	ifru_phys;
++		int	ifru_media;
++		char *	ifru_data;
++		int	ifru_cap[2];
++	} ifr_ifru;
++#define	ifr_addr	ifr_ifru.ifru_addr	/* address */
++#define	ifr_dstaddr	ifr_ifru.ifru_dstaddr	/* other end of p-to-p link */
++#define	ifr_broadaddr	ifr_ifru.ifru_broadaddr	/* broadcast address */
++#define	ifr_netmask	ifr_ifru.ifru_netmask	/* interface net mask */
++#define	ifr_buffer      ifr_ifru.ifru_buffer    /* user supplied buffer with its length */
++#define	ifr_flags	ifr_ifru.ifru_flags[0]	/* flags (low 16 bits) */
++#define	ifr_flagshigh	ifr_ifru.ifru_flags[1]	/* flags (high 16 bits) */
++#define ifr_jid         ifr_ifru.ifru_jid       /* jail/vnet */
++#define	ifr_metric	ifr_ifru.ifru_metric	/* metric */
++#define	ifr_mtu		ifr_ifru.ifru_mtu	/* mtu */
++#define ifr_phys	ifr_ifru.ifru_phys	/* physical wire */
++#define ifr_media	ifr_ifru.ifru_media	/* physical media */
++#define	ifr_data	ifr_ifru.ifru_data	/* for use by interface */
++#define	ifr_reqcap	ifr_ifru.ifru_cap[0]	/* requested capabilities */
++#define	ifr_curcap	ifr_ifru.ifru_cap[1]	/* current capabilities */
++#define	ifr_index	ifr_ifru.ifru_index	/* interface index */
++};
++
++#define	_SIZEOF_ADDR_IFREQ(ifr) \
++	((ifr).ifr_addr.sa_len > sizeof(struct sockaddr) ? \
++	 (sizeof(struct ifreq) - sizeof(struct sockaddr) + \
++	  (ifr).ifr_addr.sa_len) : sizeof(struct ifreq))
++
++struct ifaliasreq {
++	char	ifra_name[IFNAMSIZ];		/* if name, e.g. "en0" */
++	struct	sockaddr ifra_addr;
++	struct	sockaddr ifra_broadaddr;
++	struct	sockaddr ifra_mask;
++};
++
++struct ifmediareq {
++	char	ifm_name[IFNAMSIZ];	/* if name, e.g. "en0" */
++	int	ifm_current;		/* current media options */
++	int	ifm_mask;		/* don't care mask */
++	int	ifm_status;		/* media status */
++	int	ifm_active;		/* active options */
++	int	ifm_count;		/* # entries in ifm_ulist array */
++	int	*ifm_ulist;		/* media words */
++};
++
++struct  ifdrv {
++	char            ifd_name[IFNAMSIZ];     /* if name, e.g. "en0" */
++	unsigned long   ifd_cmd;
++	size_t          ifd_len;
++	void            *ifd_data;
++};
++
++/*
++ * Structure used to retrieve aux status data from interfaces.
++ * Kernel suppliers to this interface should respect the formatting
++ * needed by ifconfig(8): each line starts with a TAB and ends with
++ * a newline.  The canonical example to copy and paste is in if_tun.c.
++ */
++
++#define	IFSTATMAX	800		/* 10 lines of text */
++struct ifstat {
++	char	ifs_name[IFNAMSIZ];	/* if name, e.g. "en0" */
++	char	ascii[IFSTATMAX + 1];
++};
++
++/*
++ * Structure used in SIOCGIFCONF request.
++ * Used to retrieve interface configuration
++ * for machine (useful for programs which
++ * must know all networks accessible).
++ */
++struct	ifconf {
++	int	ifc_len;		/* size of associated buffer */
++	union {
++		char    *ifcu_buf;
++		struct	ifreq *ifcu_req;
++	} ifc_ifcu;
++#define	ifc_buf	ifc_ifcu.ifcu_buf	/* buffer address */
++#define	ifc_req	ifc_ifcu.ifcu_req	/* array of structures returned */
++};
++
++#if defined (__amd64__) || defined (COMPAT_32BIT)
++struct ifconf32 {
++	int	ifc_len;		/* size of associated buffer */
++	union {
++		unsigned int	ifcu_buf;
++		unsigned int	ifcu_req;
++	} ifc_ifcu;
++};
++#endif
++
++/*
++ * interface groups
++ */
++
++#define	IFG_ALL		"all"		/* group contains all interfaces */
++/* XXX: will we implement this? */
++#define	IFG_EGRESS	"egress"	/* if(s) default route(s) point to */
++
++struct ifg_req {
++	union {
++		char			 ifgrqu_group[IFNAMSIZ];
++		char			 ifgrqu_member[IFNAMSIZ];
++	} ifgrq_ifgrqu;
++#define	ifgrq_group	ifgrq_ifgrqu.ifgrqu_group
++#define	ifgrq_member	ifgrq_ifgrqu.ifgrqu_member
++};
++
++/*
++ * Used to lookup groups for an interface
++ */
++struct ifgroupreq {
++	char	ifgr_name[IFNAMSIZ];
++	unsigned int	ifgr_len;
++	union {
++		char	ifgru_group[IFNAMSIZ];
++		struct	ifg_req *ifgru_groups;
++	} ifgr_ifgru;
++#define ifgr_group	ifgr_ifgru.ifgru_group
++#define ifgr_groups	ifgr_ifgru.ifgru_groups
++};
++
++/*
++ * Structure for SIOC[AGD]LIFADDR
++ */
++struct if_laddrreq {
++	char	iflr_name[IFNAMSIZ];
++	unsigned int	flags;
++#define	IFLR_PREFIX	0x8000  /* in: prefix given  out: kernel fills id */
++	unsigned int	prefixlen;         /* in/out */
++	struct	sockaddr_storage addr;   /* in/out */
++	struct	sockaddr_storage dstaddr; /* out */
++};
++
++struct if_nameindex {
++	unsigned int	if_index;	/* 1, 2, ... */
++	char		*if_name;	/* null terminated name: "le0", ... */
++};
++
++__BEGIN_DECLS
++void			 if_freenameindex(struct if_nameindex *);
++char			*if_indextoname(unsigned int, char *);
++struct if_nameindex	*if_nameindex(void);
++unsigned int		 if_nametoindex(const char *);
++__END_DECLS
++
++#endif /* !_NET_IF_H_ */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/net/if_ether.h
+@@ -0,0 +1,104 @@
++/* Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _NET_IF_ETHER_H
++#define _NET_IF_ETHER_H	1
++
++/*
++ *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
++ *	and FCS/CRC (frame check sequence).
++ */
++
++#define ETH_ALEN	6		/* Octets in one ethernet addr	 */
++#define ETH_HLEN	14		/* Total octets in header.	 */
++#define ETH_ZLEN	60		/* Min. octets in frame sans FCS */
++#define ETH_DATA_LEN	1500		/* Max. octets in payload	 */
++#define ETH_FRAME_LEN	1514		/* Max. octets in frame sans FCS */
++
++/*
++ *	These are the defined Ethernet Protocol ID's.
++ */
++
++#define ETH_P_LOOP	0x0060		/* Ethernet Loopback packet	*/
++#define ETH_P_PUP	0x0200		/* Xerox PUP packet		*/
++#define ETH_P_PUPAT	0x0201		/* Xerox PUP Addr Trans packet	*/
++#define ETH_P_IP	0x0800		/* Internet Protocol packet	*/
++#define ETH_P_X25	0x0805		/* CCITT X.25			*/
++#define ETH_P_ARP	0x0806		/* Address Resolution packet	*/
++#define	ETH_P_BPQ	0x08FF		/* G8BPQ AX.25 Ethernet Packet	[ NOT AN OFFICIALLY REGISTERED ID ] */
++#define ETH_P_IEEEPUP	0x0a00		/* Xerox IEEE802.3 PUP packet */
++#define ETH_P_IEEEPUPAT	0x0a01		/* Xerox IEEE802.3 PUP Addr Trans packet */
++#define ETH_P_DEC       0x6000          /* DEC Assigned proto           */
++#define ETH_P_DNA_DL    0x6001          /* DEC DNA Dump/Load            */
++#define ETH_P_DNA_RC    0x6002          /* DEC DNA Remote Console       */
++#define ETH_P_DNA_RT    0x6003          /* DEC DNA Routing              */
++#define ETH_P_LAT       0x6004          /* DEC LAT                      */
++#define ETH_P_DIAG      0x6005          /* DEC Diagnostics              */
++#define ETH_P_CUST      0x6006          /* DEC Customer use             */
++#define ETH_P_SCA       0x6007          /* DEC Systems Comms Arch       */
++#define ETH_P_RARP      0x8035		/* Reverse Addr Res packet	*/
++#define ETH_P_ATALK	0x809B		/* Appletalk DDP		*/
++#define ETH_P_AARP	0x80F3		/* Appletalk AARP		*/
++#define ETH_P_8021Q	0x8100          /* 802.1Q VLAN Extended Header  */
++#define ETH_P_IPX	0x8137		/* IPX over DIX			*/
++#define ETH_P_IPV6	0x86DD		/* IPv6 over bluebook		*/
++#define ETH_P_WCCP	0x883E		/* Web-cache coordination protocol
++					 * defined in draft-wilson-wrec-wccp-v2-00.txt */
++#define ETH_P_PPP_DISC	0x8863		/* PPPoE discovery messages     */
++#define ETH_P_PPP_SES	0x8864		/* PPPoE session messages	*/
++#define ETH_P_MPLS_UC	0x8847		/* MPLS Unicast traffic		*/
++#define ETH_P_MPLS_MC	0x8848		/* MPLS Multicast traffic	*/
++#define ETH_P_ATMMPOA	0x884c		/* MultiProtocol Over ATM	*/
++#define ETH_P_ATMFATE	0x8884		/* Frame-based ATM Transport
++					 * over Ethernet
++					 */
++#define ETH_P_AOE	0x88A2		/* ATA over Ethernet		*/
++
++/*
++ *	Non DIX types. Won't clash for 1500 types.
++ */
++
++#define ETH_P_802_3	0x0001		/* Dummy type for 802.3 frames  */
++#define ETH_P_AX25	0x0002		/* Dummy protocol id for AX.25  */
++#define ETH_P_ALL	0x0003		/* Every packet (be careful!!!) */
++#define ETH_P_802_2	0x0004		/* 802.2 frames 		*/
++#define ETH_P_SNAP	0x0005		/* Internal only		*/
++#define ETH_P_DDCMP     0x0006          /* DEC DDCMP: Internal only     */
++#define ETH_P_WAN_PPP   0x0007          /* Dummy type for WAN PPP frames*/
++#define ETH_P_PPP_MP    0x0008          /* Dummy type for PPP MP frames */
++#define ETH_P_LOCALTALK 0x0009		/* Localtalk pseudo type 	*/
++#define ETH_P_PPPTALK	0x0010		/* Dummy type for Atalk over PPP*/
++#define ETH_P_TR_802_2	0x0011		/* 802.2 frames 		*/
++#define ETH_P_MOBITEX	0x0015		/* Mobitex (kaz@cafe.net)	*/
++#define ETH_P_CONTROL	0x0016		/* Card specific control frames */
++#define ETH_P_IRDA	0x0017		/* Linux-IrDA			*/
++#define ETH_P_ECONET	0x0018		/* Acorn Econet			*/
++#define ETH_P_HDLC	0x0019		/* HDLC frames			*/
++#define ETH_P_ARCNET	0x001A		/* 1A for ArcNet :-)            */
++
++/*
++ *	This is an Ethernet frame header.
++ */
++
++struct ethhdr {
++	unsigned char	h_dest[ETH_ALEN];	/* destination eth addr	*/
++	unsigned char	h_source[ETH_ALEN];	/* source ether addr	*/
++	unsigned short	h_proto;		/* packet type ID field	*/
++} __attribute__((packed));
++
++#endif	/* net/if_ether.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/netinet/icmp6.h
+@@ -0,0 +1,525 @@
++/* Copyright (C) 1991-1997,2000,2006,2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _NETINET_ICMP6_H
++#define _NETINET_ICMP6_H 1
++
++#include <inttypes.h>
++#include <string.h>
++#include <sys/types.h>
++#include <netinet/in.h>
++
++#define ICMP6_FILTER 18
++
++#define ICMP6_FILTER_BLOCK		1
++#define ICMP6_FILTER_PASS		2
++#define ICMP6_FILTER_BLOCKOTHERS	3
++#define ICMP6_FILTER_PASSONLY		4
++
++#define ICMPV6_PLD_MAXLEN	1232	/* IPV6_MMTU - sizeof(struct ip6_hdr)
++					   - sizeof(struct icmp6_hdr) */
++
++struct icmp6_filter
++  {
++    uint32_t icmp6_filt[8];
++  } __attribute__ ((__packed__));
++
++struct icmp6_hdr
++  {
++    uint8_t     icmp6_type;   /* type field */
++    uint8_t     icmp6_code;   /* code field */
++    uint16_t    icmp6_cksum;  /* checksum field */
++    union
++      {
++	uint32_t  icmp6_un_data32[1]; /* type-specific field */
++	uint16_t  icmp6_un_data16[2]; /* type-specific field */
++	uint8_t   icmp6_un_data8[4];  /* type-specific field */
++      } icmp6_dataun;
++  } __attribute__ ((__packed__));
++
++#define icmp6_data32    icmp6_dataun.icmp6_un_data32
++#define icmp6_data16    icmp6_dataun.icmp6_un_data16
++#define icmp6_data8     icmp6_dataun.icmp6_un_data8
++#define icmp6_pptr      icmp6_data32[0]  /* parameter prob */
++#define icmp6_mtu       icmp6_data32[0]  /* packet too big */
++#define icmp6_id        icmp6_data16[0]  /* echo request/reply */
++#define icmp6_seq       icmp6_data16[1]  /* echo request/reply */
++#define icmp6_maxdelay  icmp6_data16[0]  /* mcast group membership */
++
++#define ICMP6_DST_UNREACH             1
++#define ICMP6_PACKET_TOO_BIG          2
++#define ICMP6_TIME_EXCEEDED           3
++#define ICMP6_PARAM_PROB              4
++
++#define ICMP6_INFOMSG_MASK  0x80    /* all informational messages */
++
++#define ICMP6_NI_SUBJ_IPV6            0 /* Query Subject is an IPv6 address */
++#define ICMP6_NI_SUBJ_FQDN            1 /* Query Subject is a Domain name */
++#define ICMP6_NI_SUBJ_IPV4            2 /* Query Subject is an IPv4 address */
++
++#define ICMP6_NI_SUCCESS              0 /* node information successful reply */
++#define ICMP6_NI_REFUSED              1 /* node information request is refused */
++#define ICMP6_NI_UNKNOWN              2 /* unknown Qtype */
++
++#define ICMP6_ECHO_REQUEST          128
++#define ICMP6_ECHO_REPLY            129
++#define MLD_LISTENER_QUERY          130
++#define MLD_LISTENER_REPORT         131
++#define MLD_LISTENER_DONE           132
++#define MLD_LISTENER_REDUCTION      MLD_LISTENER_DONE
++
++/* RFC2292 decls */
++#define ICMP6_MEMBERSHIP_QUERY      130 /* group membership query */
++#define ICMP6_MEMBERSHIP_REPORT     131 /* group membership report */
++#define ICMP6_MEMBERSHIP_REDUCTION  132 /* group membership termination */
++/* the followings are for backward compatibility to old KAME apps. */
++#define MLD6_LISTENER_QUERY         MLD_LISTENER_QUERY
++#define MLD6_LISTENER_REPORT        MLD_LISTENER_REPORT
++#define MLD6_LISTENER_DONE          MLD_LISTENER_DONE
++
++
++#define ICMP6_DST_UNREACH_NOROUTE     0 /* no route to destination */
++#define ICMP6_DST_UNREACH_ADMIN       1 /* communication with destination */
++                                        /* administratively prohibited */
++#define ICMP6_DST_UNREACH_BEYONDSCOPE 2 /* beyond scope of source address */
++#define ICMP6_DST_UNREACH_ADDR        3 /* address unreachable */
++#define ICMP6_DST_UNREACH_NOPORT      4 /* bad port */
++
++#define ICMP6_TIME_EXCEED_TRANSIT     0 /* Hop Limit == 0 in transit */
++#define ICMP6_TIME_EXCEED_REASSEMBLY  1 /* Reassembly time out */
++
++#define ICMP6_PARAMPROB_HEADER        0 /* erroneous header field */
++#define ICMP6_PARAMPROB_NEXTHEADER    1 /* unrecognized Next Header */
++#define ICMP6_PARAMPROB_OPTION        2 /* unrecognized IPv6 option */
++
++#define ICMP6_FILTER_WILLPASS(type, filterp) \
++	((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0)
++
++#define ICMP6_FILTER_WILLBLOCK(type, filterp) \
++	((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0)
++
++#define ICMP6_FILTER_SETPASS(type, filterp) \
++	((((filterp)->icmp6_filt[(type) >> 5]) |= (1 << ((type) & 31))))
++
++#define ICMP6_FILTER_SETBLOCK(type, filterp) \
++	((((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31))))
++
++#define ICMP6_FILTER_SETPASSALL(filterp) \
++	memset (filterp, 0xFF, sizeof (struct icmp6_filter));
++
++#define ICMP6_FILTER_SETBLOCKALL(filterp) \
++	memset (filterp, 0, sizeof (struct icmp6_filter));
++
++#define ND_ROUTER_SOLICIT           133
++#define ND_ROUTER_ADVERT            134
++#define ND_NEIGHBOR_SOLICIT         135
++#define ND_NEIGHBOR_ADVERT          136
++#define ND_REDIRECT                 137
++
++struct nd_router_solicit      /* router solicitation */
++  {
++    struct icmp6_hdr  nd_rs_hdr;
++    /* could be followed by options */
++  } __attribute__ ((__packed__));
++
++#define nd_rs_type               nd_rs_hdr.icmp6_type
++#define nd_rs_code               nd_rs_hdr.icmp6_code
++#define nd_rs_cksum              nd_rs_hdr.icmp6_cksum
++#define nd_rs_reserved           nd_rs_hdr.icmp6_data32[0]
++
++struct nd_router_advert       /* router advertisement */
++  {
++    struct icmp6_hdr  nd_ra_hdr;
++    uint32_t   nd_ra_reachable;   /* reachable time */
++    uint32_t   nd_ra_retransmit;  /* retransmit timer */
++    /* could be followed by options */
++  } __attribute__ ((__packed__));
++
++#define nd_ra_type               nd_ra_hdr.icmp6_type
++#define nd_ra_code               nd_ra_hdr.icmp6_code
++#define nd_ra_cksum              nd_ra_hdr.icmp6_cksum
++#define nd_ra_curhoplimit        nd_ra_hdr.icmp6_data8[0]
++#define nd_ra_flags_reserved     nd_ra_hdr.icmp6_data8[1]
++#define ND_RA_FLAG_MANAGED       0x80
++#define ND_RA_FLAG_OTHER         0x40
++#define ND_RA_FLAG_HOME_AGENT    0x20
++#define nd_ra_router_lifetime    nd_ra_hdr.icmp6_data16[1]
++
++struct nd_neighbor_solicit    /* neighbor solicitation */
++  {
++    struct icmp6_hdr  nd_ns_hdr;
++    struct in6_addr   nd_ns_target; /* target address */
++    /* could be followed by options */
++  } __attribute__ ((__packed__));
++
++#define nd_ns_type               nd_ns_hdr.icmp6_type
++#define nd_ns_code               nd_ns_hdr.icmp6_code
++#define nd_ns_cksum              nd_ns_hdr.icmp6_cksum
++#define nd_ns_reserved           nd_ns_hdr.icmp6_data32[0]
++
++struct nd_neighbor_advert     /* neighbor advertisement */
++  {
++    struct icmp6_hdr  nd_na_hdr;
++    struct in6_addr   nd_na_target; /* target address */
++    /* could be followed by options */
++  } __attribute__ ((__packed__));
++
++#define nd_na_type               nd_na_hdr.icmp6_type
++#define nd_na_code               nd_na_hdr.icmp6_code
++#define nd_na_cksum              nd_na_hdr.icmp6_cksum
++#define nd_na_flags_reserved     nd_na_hdr.icmp6_data32[0]
++#if     BYTE_ORDER == BIG_ENDIAN
++#define ND_NA_FLAG_ROUTER        0x80000000
++#define ND_NA_FLAG_SOLICITED     0x40000000
++#define ND_NA_FLAG_OVERRIDE      0x20000000
++#else   /* BYTE_ORDER == LITTLE_ENDIAN */
++#define ND_NA_FLAG_ROUTER        0x00000080
++#define ND_NA_FLAG_SOLICITED     0x00000040
++#define ND_NA_FLAG_OVERRIDE      0x00000020
++#endif
++
++struct nd_redirect            /* redirect */
++  {
++    struct icmp6_hdr  nd_rd_hdr;
++    struct in6_addr   nd_rd_target; /* target address */
++    struct in6_addr   nd_rd_dst;    /* destination address */
++    /* could be followed by options */
++  } __attribute__ ((__packed__));;
++
++#define nd_rd_type               nd_rd_hdr.icmp6_type
++#define nd_rd_code               nd_rd_hdr.icmp6_code
++#define nd_rd_cksum              nd_rd_hdr.icmp6_cksum
++#define nd_rd_reserved           nd_rd_hdr.icmp6_data32[0]
++
++struct nd_opt_hdr             /* Neighbor discovery option header */
++  {
++    uint8_t  nd_opt_type;
++    uint8_t  nd_opt_len;        /* in units of 8 octets */
++    /* followed by option specific data */
++  } __attribute__ ((__packed__));
++
++#define ND_OPT_SOURCE_LINKADDR		1
++#define ND_OPT_TARGET_LINKADDR		2
++#define ND_OPT_PREFIX_INFORMATION	3
++#define ND_OPT_REDIRECTED_HEADER	4
++#define ND_OPT_MTU			5
++#define ND_OPT_RTR_ADV_INTERVAL		7
++#define ND_OPT_HOME_AGENT_INFO		8
++
++struct nd_opt_prefix_info     /* prefix information */
++  {
++    uint8_t   nd_opt_pi_type;
++    uint8_t   nd_opt_pi_len;
++    uint8_t   nd_opt_pi_prefix_len;
++    uint8_t   nd_opt_pi_flags_reserved;
++    uint32_t  nd_opt_pi_valid_time;
++    uint32_t  nd_opt_pi_preferred_time;
++    uint32_t  nd_opt_pi_reserved2;
++    struct in6_addr  nd_opt_pi_prefix;
++  } __attribute__ ((__packed__));
++
++#define ND_OPT_PI_FLAG_ONLINK	0x80
++#define ND_OPT_PI_FLAG_AUTO	0x40
++#define ND_OPT_PI_FLAG_RADDR	0x20
++
++struct nd_opt_rd_hdr          /* redirected header */
++  {
++    uint8_t   nd_opt_rh_type;
++    uint8_t   nd_opt_rh_len;
++    uint16_t  nd_opt_rh_reserved1;
++    uint32_t  nd_opt_rh_reserved2;
++    /* followed by IP header and data */
++  } __attribute__ ((__packed__));
++
++struct nd_opt_mtu             /* MTU option */
++  {
++    uint8_t   nd_opt_mtu_type;
++    uint8_t   nd_opt_mtu_len;
++    uint16_t  nd_opt_mtu_reserved;
++    uint32_t  nd_opt_mtu_mtu;
++  } __attribute__ ((__packed__));
++
++struct mld_hdr
++  {
++    struct icmp6_hdr    mld_icmp6_hdr;
++    struct in6_addr     mld_addr; /* multicast address */
++  } __attribute__ ((__packed__));
++
++#define mld_type        mld_icmp6_hdr.icmp6_type
++#define mld_code        mld_icmp6_hdr.icmp6_code
++#define mld_cksum       mld_icmp6_hdr.icmp6_cksum
++#define mld_maxdelay    mld_icmp6_hdr.icmp6_data16[0]
++#define mld_reserved    mld_icmp6_hdr.icmp6_data16[1]
++
++/* definitions to provide backward compatibility to old KAME applications */
++#define mld6_hdr        mld_hdr
++#define mld6_type       mld_type
++#define mld6_code       mld_code
++#define mld6_cksum      mld_cksum
++#define mld6_maxdelay   mld_maxdelay
++#define mld6_reserved   mld_reserved
++#define mld6_addr       mld_addr
++
++#define ICMP6_ROUTER_RENUMBERING    138
++
++#define ICMP6_ROUTER_RENUMBERING_COMMAND  0 /* rr command */
++#define ICMP6_ROUTER_RENUMBERING_RESULT   1 /* rr result */
++#define ICMP6_ROUTER_RENUMBERING_SEQNUM_RESET   255 /* rr seq num reset */
++
++struct icmp6_router_renum    /* router renumbering header */
++  {
++    struct icmp6_hdr    rr_hdr;
++    uint8_t             rr_segnum;
++    uint8_t             rr_flags;
++    uint16_t            rr_maxdelay;
++    uint32_t            rr_reserved;
++  } __attribute__ ((__packed__));
++
++#define rr_type		rr_hdr.icmp6_type
++#define rr_code         rr_hdr.icmp6_code
++#define rr_cksum        rr_hdr.icmp6_cksum
++#define rr_seqnum       rr_hdr.icmp6_data32[0]
++
++/* Router renumbering flags */
++#define ICMP6_RR_FLAGS_TEST             0x80
++#define ICMP6_RR_FLAGS_REQRESULT        0x40
++#define ICMP6_RR_FLAGS_FORCEAPPLY       0x20
++#define ICMP6_RR_FLAGS_SPECSITE         0x10
++#define ICMP6_RR_FLAGS_PREVDONE         0x08
++
++#define ICMP6_WRUREQUEST                139     /* who are you request */
++#define ICMP6_WRUREPLY                  140     /* who are you reply */
++#define ICMP6_FQDN_QUERY                139     /* FQDN query */
++#define ICMP6_FQDN_REPLY                140     /* FQDN reply */
++#define ICMP6_NI_QUERY                  139     /* node information request */
++#define ICMP6_NI_REPLY                  140     /* node information reply */
++
++struct rr_pco_match    /* match prefix part */
++  {
++    uint8_t             rpm_code;
++    uint8_t             rpm_len;
++    uint8_t             rpm_ordinal;
++    uint8_t             rpm_matchlen;
++    uint8_t             rpm_minlen;
++    uint8_t             rpm_maxlen;
++    uint16_t            rpm_reserved;
++    struct in6_addr     rpm_prefix;
++  } __attribute__ ((__packed__));
++
++/* PCO code values */
++#define RPM_PCO_ADD             1
++#define RPM_PCO_CHANGE          2
++#define RPM_PCO_SETGLOBAL       3
++#define RPM_PCO_MAX             4
++
++struct rr_pco_use      /* use prefix part */
++  {
++    uint8_t             rpu_uselen;
++    uint8_t             rpu_keeplen;
++    uint8_t             rpu_ramask;
++    uint8_t             rpu_raflags;
++    uint32_t            rpu_vltime;
++    uint32_t            rpu_pltime;
++    uint32_t            rpu_flags;
++    struct in6_addr     rpu_prefix;
++  } __attribute__ ((__packed__));
++
++#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK  0x80
++#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO    0x40
++
++#if BYTE_ORDER == BIG_ENDIAN
++# define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80000000
++# define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40000000
++#elif BYTE_ORDER == LITTLE_ENDIAN
++# define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80
++# define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40
++#endif
++
++struct rr_result       /* router renumbering result message */
++  {
++    uint16_t            rrr_flags;
++    uint8_t             rrr_ordinal;
++    uint8_t             rrr_matchedlen;
++    uint32_t            rrr_ifid;
++    struct in6_addr     rrr_prefix;
++  } __attribute__ ((__packed__));
++
++#if BYTE_ORDER == BIG_ENDIAN
++# define ICMP6_RR_RESULT_FLAGS_OOB       0x0002
++# define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001
++#elif BYTE_ORDER == LITTLE_ENDIAN
++# define ICMP6_RR_RESULT_FLAGS_OOB       0x0200
++# define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0100
++#endif
++
++/* Mobile IPv6 extension: Advertisement Interval.  */
++struct nd_opt_adv_interval
++  {
++    uint8_t   nd_opt_adv_interval_type;
++    uint8_t   nd_opt_adv_interval_len;
++    uint16_t  nd_opt_adv_interval_reserved;
++    uint32_t  nd_opt_adv_interval_ival;
++  };
++
++/* Mobile IPv6 extension: Home Agent Info.  */
++struct nd_opt_home_agent_info
++  {
++    uint8_t   nd_opt_home_agent_info_type;
++    uint8_t   nd_opt_home_agent_info_len;
++    uint16_t  nd_opt_home_agent_info_reserved;
++    uint16_t  nd_opt_home_agent_info_preference;
++    uint16_t  nd_opt_home_agent_info_lifetime;
++  };
++
++/*-
++ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 3. Neither the name of the project nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ */
++
++/*-
++ * Copyright (c) 1982, 1986, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)ip_icmp.h	8.1 (Berkeley) 6/10/93
++ */
++
++/*
++ * IP6 route structure
++ */
++
++struct route_in6 {
++        struct  rtentry *ro_rt;
++        struct  llentry *ro_lle;
++        struct  sockaddr_in6 ro_dst;
++};
++
++/*
++ * Variables related to this implementation
++ * of the internet control message protocol version 6.
++ */
++struct icmp6errstat {
++	u_quad_t icp6errs_dst_unreach_noroute;
++	u_quad_t icp6errs_dst_unreach_admin;
++	u_quad_t icp6errs_dst_unreach_beyondscope;
++	u_quad_t icp6errs_dst_unreach_addr;
++	u_quad_t icp6errs_dst_unreach_noport;
++	u_quad_t icp6errs_packet_too_big;
++	u_quad_t icp6errs_time_exceed_transit;
++	u_quad_t icp6errs_time_exceed_reassembly;
++	u_quad_t icp6errs_paramprob_header;
++	u_quad_t icp6errs_paramprob_nextheader;
++	u_quad_t icp6errs_paramprob_option;
++	u_quad_t icp6errs_redirect; /* we regard redirect as an error here */
++	u_quad_t icp6errs_unknown;
++};
++
++struct icmp6stat {
++/* statistics related to icmp6 packets generated */
++	u_quad_t icp6s_error;		/* # of calls to icmp6_error */
++	u_quad_t icp6s_canterror;	/* no error 'cuz old was icmp */
++	u_quad_t icp6s_toofreq;		/* no error 'cuz rate limitation */
++	u_quad_t icp6s_outhist[256];
++/* statistics related to input message processed */
++	u_quad_t icp6s_badcode;		/* icmp6_code out of range */
++	u_quad_t icp6s_tooshort;	/* packet < sizeof(struct icmp6_hdr) */
++	u_quad_t icp6s_checksum;	/* bad checksum */
++	u_quad_t icp6s_badlen;		/* calculated bound mismatch */
++	/*
++	 * number of responses: this member is inherited from netinet code, but
++	 * for netinet6 code, it is already available in icp6s_outhist[].
++	 */
++	u_quad_t icp6s_reflect;
++	u_quad_t icp6s_inhist[256];	
++	u_quad_t icp6s_nd_toomanyopt;	/* too many ND options */
++	struct icmp6errstat icp6s_outerrhist;
++#define icp6s_odst_unreach_noroute \
++	icp6s_outerrhist.icp6errs_dst_unreach_noroute
++#define icp6s_odst_unreach_admin icp6s_outerrhist.icp6errs_dst_unreach_admin
++#define icp6s_odst_unreach_beyondscope \
++	icp6s_outerrhist.icp6errs_dst_unreach_beyondscope
++#define icp6s_odst_unreach_addr icp6s_outerrhist.icp6errs_dst_unreach_addr
++#define icp6s_odst_unreach_noport icp6s_outerrhist.icp6errs_dst_unreach_noport
++#define icp6s_opacket_too_big icp6s_outerrhist.icp6errs_packet_too_big
++#define icp6s_otime_exceed_transit \
++	icp6s_outerrhist.icp6errs_time_exceed_transit
++#define icp6s_otime_exceed_reassembly \
++	icp6s_outerrhist.icp6errs_time_exceed_reassembly
++#define icp6s_oparamprob_header icp6s_outerrhist.icp6errs_paramprob_header
++#define icp6s_oparamprob_nextheader \
++	icp6s_outerrhist.icp6errs_paramprob_nextheader
++#define icp6s_oparamprob_option icp6s_outerrhist.icp6errs_paramprob_option
++#define icp6s_oredirect icp6s_outerrhist.icp6errs_redirect
++#define icp6s_ounknown icp6s_outerrhist.icp6errs_unknown
++	u_quad_t icp6s_pmtuchg;		/* path MTU changes */
++	u_quad_t icp6s_nd_badopt;	/* bad ND options */
++	u_quad_t icp6s_badns;		/* bad neighbor solicitation */
++	u_quad_t icp6s_badna;		/* bad neighbor advertisement */
++	u_quad_t icp6s_badrs;		/* bad router advertisement */
++	u_quad_t icp6s_badra;		/* bad router advertisement */
++	u_quad_t icp6s_badredirect;	/* bad redirect message */
++};
++
++#endif /* netinet/icmpv6.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/netinet/if_ether.h
+@@ -0,0 +1,138 @@
++/* Copyright (C) 1996, 1997, 1999, 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef __NETINET_IF_ETHER_H
++
++#define __NETINET_IF_ETHER_H	1
++#include <features.h>
++#include <sys/types.h>
++
++#include <net/if_ether.h>
++
++#ifdef __USE_BSD
++/*
++ * Copyright (c) 1982, 1986, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)if_ether.h	8.3 (Berkeley) 5/2/95
++ *	$FreeBSD$
++ */
++
++#include <net/ethernet.h>
++#include <net/if_arp.h>
++#include <netinet/in.h>
++
++__BEGIN_DECLS
++/*
++ * Ethernet Address Resolution Protocol.
++ *
++ * See RFC 826 for protocol description.  Structure below is adapted
++ * to resolving internet addresses.  Field names used correspond to
++ * RFC 826.
++ */
++struct	ether_arp {
++	struct	arphdr ea_hdr;		/* fixed-size header */
++	u_int8_t arp_sha[ETH_ALEN];	/* sender hardware address */
++	u_int8_t arp_spa[4];		/* sender protocol address */
++	u_int8_t arp_tha[ETH_ALEN];	/* target hardware address */
++	u_int8_t arp_tpa[4];		/* target protocol address */
++};
++#define	arp_hrd	ea_hdr.ar_hrd
++#define	arp_pro	ea_hdr.ar_pro
++#define	arp_hln	ea_hdr.ar_hln
++#define	arp_pln	ea_hdr.ar_pln
++#define	arp_op	ea_hdr.ar_op
++
++struct sockaddr_inarp {
++	__SOCKADDR_COMMON (sin_);
++	in_port_t sin_port;                 /* Port number.  */
++	struct in_addr sin_addr;            /* Internet address.  */
++	struct in_addr sin_srcaddr;
++	unsigned short sin_tos;
++	unsigned short sin_other;
++#define SIN_PROXY 1
++};
++
++/*
++ * IP and ethernet specific routing flags
++ */
++#define	RTF_USETRAILERS	RTF_PROTO1	/* use trailers */
++#define RTF_ANNOUNCE	RTF_PROTO2	/* announce new arp entry */
++
++/*
++ * Macro to map an IP multicast address to an Ethernet multicast address.
++ * The high-order 25 bits of the Ethernet address are statically assigned,
++ * and the low-order 23 bits are taken from the low end of the IP address.
++ */
++#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \
++	/* struct in_addr *ipaddr; */ \
++	/* u_char enaddr[ETH_ALEN];	   */ \
++{ \
++	(enaddr)[0] = 0x01; \
++	(enaddr)[1] = 0x00; \
++	(enaddr)[2] = 0x5e; \
++	(enaddr)[3] = ((u_int8_t *)ipaddr)[1] & 0x7f; \
++	(enaddr)[4] = ((u_int8_t *)ipaddr)[2]; \
++	(enaddr)[5] = ((u_int8_t *)ipaddr)[3]; \
++}
++
++/*
++ * Macro to map an IP6 multicast address to an Ethernet multicast address.
++ * The high-order 16 bits of the Ethernet address are statically assigned,
++ * and the low-order 32 bits are taken from the low end of the IP6 address.
++ */
++#define ETHER_MAP_IPV6_MULTICAST(ip6addr, enaddr)			\
++/* struct	in6_addr *ip6addr; */					\
++/* u_char	enaddr[ETH_ALEN]; */				\
++{                                                                       \
++	(enaddr)[0] = 0x33;						\
++	(enaddr)[1] = 0x33;						\
++	(enaddr)[2] = ((u_int8_t *)ip6addr)[12];				\
++	(enaddr)[3] = ((u_int8_t *)ip6addr)[13];				\
++	(enaddr)[4] = ((u_int8_t *)ip6addr)[14];				\
++	(enaddr)[5] = ((u_int8_t *)ip6addr)[15];				\
++}
++
++__END_DECLS
++#endif /* __USE_BSD */
++
++#endif /* netinet/if_ether.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/netinet/ip_icmp.h
+@@ -0,0 +1,296 @@
++/* Copyright (C) 1991-1993, 1995-1997, 1999, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef __NETINET_IP_ICMP_H
++#define __NETINET_IP_ICMP_H    1
++
++#include <sys/cdefs.h>
++#include <sys/types.h>
++
++__BEGIN_DECLS
++
++struct icmphdr
++{
++  u_int8_t type;		/* message type */
++  u_int8_t code;		/* type sub-code */
++  u_int16_t checksum;
++  union
++  {
++    struct
++    {
++      u_int16_t	id;
++      u_int16_t	sequence;
++    } echo;			/* echo datagram */
++    u_int32_t	gateway;	/* gateway address */
++    struct
++    {
++      u_int16_t	__unused;
++      u_int16_t	mtu;
++    } frag;			/* path mtu discovery */
++  } un;
++};
++
++#define ICMP_ECHOREPLY		0	/* Echo Reply			*/
++#define ICMP_DEST_UNREACH	3	/* Destination Unreachable	*/
++#define ICMP_SOURCE_QUENCH	4	/* Source Quench		*/
++#define ICMP_REDIRECT		5	/* Redirect (change route)	*/
++#define ICMP_ECHO		8	/* Echo Request			*/
++#define ICMP_TIME_EXCEEDED	11	/* Time Exceeded		*/
++#define ICMP_PARAMETERPROB	12	/* Parameter Problem		*/
++#define ICMP_TIMESTAMP		13	/* Timestamp Request		*/
++#define ICMP_TIMESTAMPREPLY	14	/* Timestamp Reply		*/
++#define ICMP_INFO_REQUEST	15	/* Information Request		*/
++#define ICMP_INFO_REPLY		16	/* Information Reply		*/
++#define ICMP_ADDRESS		17	/* Address Mask Request		*/
++#define ICMP_ADDRESSREPLY	18	/* Address Mask Reply		*/
++#define NR_ICMP_TYPES		18
++
++
++/* Codes for UNREACH. */
++#define ICMP_NET_UNREACH	0	/* Network Unreachable		*/
++#define ICMP_HOST_UNREACH	1	/* Host Unreachable		*/
++#define ICMP_PROT_UNREACH	2	/* Protocol Unreachable		*/
++#define ICMP_PORT_UNREACH	3	/* Port Unreachable		*/
++#define ICMP_FRAG_NEEDED	4	/* Fragmentation Needed/DF set	*/
++#define ICMP_SR_FAILED		5	/* Source Route failed		*/
++#define ICMP_NET_UNKNOWN	6
++#define ICMP_HOST_UNKNOWN	7
++#define ICMP_HOST_ISOLATED	8
++#define ICMP_NET_ANO		9
++#define ICMP_HOST_ANO		10
++#define ICMP_NET_UNR_TOS	11
++#define ICMP_HOST_UNR_TOS	12
++#define ICMP_PKT_FILTERED	13	/* Packet filtered */
++#define ICMP_PREC_VIOLATION	14	/* Precedence violation */
++#define ICMP_PREC_CUTOFF	15	/* Precedence cut off */
++#define NR_ICMP_UNREACH		15	/* instead of hardcoding immediate value */
++
++/* Codes for REDIRECT. */
++#define ICMP_REDIR_NET		0	/* Redirect Net			*/
++#define ICMP_REDIR_HOST		1	/* Redirect Host		*/
++#define ICMP_REDIR_NETTOS	2	/* Redirect Net for TOS		*/
++#define ICMP_REDIR_HOSTTOS	3	/* Redirect Host for TOS	*/
++
++/* Codes for TIME_EXCEEDED. */
++#define ICMP_EXC_TTL		0	/* TTL count exceeded		*/
++#define ICMP_EXC_FRAGTIME	1	/* Fragment Reass time exceeded	*/
++
++
++#ifdef __USE_BSD
++/*
++ * Copyright (c) 1982, 1986, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)ip_icmp.h	8.1 (Berkeley) 6/10/93
++ */
++
++#include <netinet/in.h>
++#include <netinet/ip.h>
++
++/*
++ * Internal of an ICMP Router Advertisement
++ */
++struct icmp_ra_addr
++{
++  u_int32_t ira_addr;
++  u_int32_t ira_preference;
++};
++
++struct icmp
++{
++  u_int8_t  icmp_type;	/* type of message, see below */
++  u_int8_t  icmp_code;	/* type sub code */
++  u_int16_t icmp_cksum;	/* ones complement checksum of struct */
++  union
++  {
++    u_char ih_pptr;		/* ICMP_PARAMPROB */
++    struct in_addr ih_gwaddr;	/* gateway address */
++    struct ih_idseq		/* echo datagram */
++    {
++      u_int16_t icd_id;
++      u_int16_t icd_seq;
++    } ih_idseq;
++    u_int32_t ih_void;
++
++    /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
++    struct ih_pmtu
++    {
++      u_int16_t ipm_void;
++      u_int16_t ipm_nextmtu;
++    } ih_pmtu;
++
++    struct ih_rtradv
++    {
++      u_int8_t irt_num_addrs;
++      u_int8_t irt_wpa;
++      u_int16_t irt_lifetime;
++    } ih_rtradv;
++  } icmp_hun;
++#define	icmp_pptr	icmp_hun.ih_pptr
++#define	icmp_gwaddr	icmp_hun.ih_gwaddr
++#define	icmp_id		icmp_hun.ih_idseq.icd_id
++#define	icmp_seq	icmp_hun.ih_idseq.icd_seq
++#define	icmp_void	icmp_hun.ih_void
++#define	icmp_pmvoid	icmp_hun.ih_pmtu.ipm_void
++#define	icmp_nextmtu	icmp_hun.ih_pmtu.ipm_nextmtu
++#define	icmp_num_addrs	icmp_hun.ih_rtradv.irt_num_addrs
++#define	icmp_wpa	icmp_hun.ih_rtradv.irt_wpa
++#define	icmp_lifetime	icmp_hun.ih_rtradv.irt_lifetime
++  union
++  {
++    struct
++    {
++      u_int32_t its_otime;
++      u_int32_t its_rtime;
++      u_int32_t its_ttime;
++    } id_ts;
++    struct
++    {
++      struct ip idi_ip;
++      /* options and then 64 bits of data */
++    } id_ip;
++    struct icmp_ra_addr id_radv;
++    u_int32_t   id_mask;
++    u_int8_t    id_data[1];
++  } icmp_dun;
++#define	icmp_otime	icmp_dun.id_ts.its_otime
++#define	icmp_rtime	icmp_dun.id_ts.its_rtime
++#define	icmp_ttime	icmp_dun.id_ts.its_ttime
++#define	icmp_ip		icmp_dun.id_ip.idi_ip
++#define	icmp_radv	icmp_dun.id_radv
++#define	icmp_mask	icmp_dun.id_mask
++#define	icmp_data	icmp_dun.id_data
++};
++
++/*
++ * Lower bounds on packet lengths for various types.
++ * For the error advice packets must first insure that the
++ * packet is large enough to contain the returned ip header.
++ * Only then can we do the check to see if 64 bits of packet
++ * data have been returned, since we need to check the returned
++ * ip header length.
++ */
++#define	ICMP_MINLEN	8				/* abs minimum */
++#define	ICMP_TSLEN	(8 + 3 * sizeof (n_time))	/* timestamp */
++#define	ICMP_MASKLEN	12				/* address mask */
++#define	ICMP_ADVLENMIN	(8 + sizeof (struct ip) + 8)	/* min */
++#ifndef _IP_VHL
++#define	ICMP_ADVLEN(p)	(8 + ((p)->icmp_ip.ip_hl << 2) + 8)
++	/* N.B.: must separately check that ip_hl >= 5 */
++#else
++#define	ICMP_ADVLEN(p)	(8 + (IP_VHL_HL((p)->icmp_ip.ip_vhl) << 2) + 8)
++	/* N.B.: must separately check that header length >= 5 */
++#endif
++
++/*
++ * Definition of type and code field values.
++ */
++#define	ICMP_ECHOREPLY		0		/* echo reply */
++#define	ICMP_UNREACH		3		/* dest unreachable, codes: */
++#define		ICMP_UNREACH_NET	0		/* bad net */
++#define		ICMP_UNREACH_HOST	1		/* bad host */
++#define		ICMP_UNREACH_PROTOCOL	2		/* bad protocol */
++#define		ICMP_UNREACH_PORT	3		/* bad port */
++#define		ICMP_UNREACH_NEEDFRAG	4		/* IP_DF caused drop */
++#define		ICMP_UNREACH_SRCFAIL	5		/* src route failed */
++#define		ICMP_UNREACH_NET_UNKNOWN 6		/* unknown net */
++#define		ICMP_UNREACH_HOST_UNKNOWN 7		/* unknown host */
++#define		ICMP_UNREACH_ISOLATED	8		/* src host isolated */
++#define		ICMP_UNREACH_NET_PROHIB	9		/* prohibited access */
++#define		ICMP_UNREACH_HOST_PROHIB 10		/* ditto */
++#define		ICMP_UNREACH_TOSNET	11		/* bad tos for net */
++#define		ICMP_UNREACH_TOSHOST	12		/* bad tos for host */
++#define		ICMP_UNREACH_FILTER_PROHIB 13		/* admin prohib */
++#define		ICMP_UNREACH_HOST_PRECEDENCE 14		/* host prec vio. */
++#define		ICMP_UNREACH_PRECEDENCE_CUTOFF 15	/* prec cutoff */
++#define	ICMP_SOURCEQUENCH	4		/* packet lost, slow down */
++#define	ICMP_REDIRECT		5		/* shorter route, codes: */
++#define		ICMP_REDIRECT_NET	0		/* for network */
++#define		ICMP_REDIRECT_HOST	1		/* for host */
++#define		ICMP_REDIRECT_TOSNET	2		/* for tos and net */
++#define		ICMP_REDIRECT_TOSHOST	3		/* for tos and host */
++#define	ICMP_ALTHOSTADDR	6		/* alternate host address */
++#define	ICMP_ECHO		8		/* echo service */
++#define	ICMP_ROUTERADVERT	9		/* router advertisement */
++#define		ICMP_ROUTERADVERT_NORMAL		0	/* normal advertisement */
++#define		ICMP_ROUTERADVERT_NOROUTE_COMMON	16	/* selective routing */
++#define	ICMP_ROUTERSOLICIT	10		/* router solicitation */
++#define	ICMP_TIMXCEED		11		/* time exceeded, code: */
++#define		ICMP_TIMXCEED_INTRANS	0		/* ttl==0 in transit */
++#define		ICMP_TIMXCEED_REASS	1		/* ttl==0 in reass */
++#define	ICMP_PARAMPROB		12		/* ip header bad */
++#define		ICMP_PARAMPROB_ERRATPTR 0		/* error at param ptr */
++#define		ICMP_PARAMPROB_OPTABSENT 1		/* req. opt. absent */
++#define		ICMP_PARAMPROB_LENGTH 2			/* bad length */
++#define	ICMP_TSTAMP		13		/* timestamp request */
++#define	ICMP_TSTAMPREPLY	14		/* timestamp reply */
++#define	ICMP_IREQ		15		/* information request */
++#define	ICMP_IREQREPLY		16		/* information reply */
++#define	ICMP_MASKREQ		17		/* address mask request */
++#define	ICMP_MASKREPLY		18		/* address mask reply */
++#define	ICMP_TRACEROUTE		30		/* traceroute */
++#define	ICMP_DATACONVERR	31		/* data conversion error */
++#define	ICMP_MOBILE_REDIRECT	32		/* mobile host redirect */
++#define	ICMP_IPV6_WHEREAREYOU	33		/* IPv6 where-are-you */
++#define	ICMP_IPV6_IAMHERE	34		/* IPv6 i-am-here */
++#define	ICMP_MOBILE_REGREQUEST	35		/* mobile registration req */
++#define	ICMP_MOBILE_REGREPLY	36		/* mobile registration reply */
++#define	ICMP_SKIP		39		/* SKIP */
++#define	ICMP_PHOTURIS		40		/* Photuris */
++#define		ICMP_PHOTURIS_UNKNOWN_INDEX	1	/* unknown sec index */
++#define		ICMP_PHOTURIS_AUTH_FAILED	2	/* auth failed */
++#define		ICMP_PHOTURIS_DECRYPT_FAILED	3	/* decrypt failed */
++
++#define	ICMP_MAXTYPE		40
++
++#define	ICMP_INFOTYPE(type) \
++	((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
++	(type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \
++	(type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
++	(type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
++	(type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
++
++#endif /* __USE_BSD */
++
++__END_DECLS
++
++#endif /* netinet/ip_icmp.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/netinet/tcp.h
+@@ -0,0 +1,267 @@
++/* netinet/tcp.h
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/*
++ * Copyright (c) 1982, 1986, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)tcp.h	8.1 (Berkeley) 6/10/93
++ */
++
++#ifndef _NETINET_TCP_H
++#define _NETINET_TCP_H	1
++
++#include <features.h>
++#include <sys/queue.h>
++
++/*
++ * User-settable options (used with setsockopt).
++ */
++#define	TCP_NODELAY	 1	/* Don't delay send to coalesce packets  */
++#define	TCP_MAXSEG	 2	/* Set maximum segment size  */
++#define TCP_NOPUSH	 4	/* Don't push last block of write  */
++#define TCP_NOOPT	 8	/* Don't use TCP options  */
++#define TCP_MD5SIG	16	/* use MD5 digests (RFC2385) */
++#define TCP_INFO	32	/* retrieve tcp_info structure */
++#define TCP_CONGESTION  64	/* get/set congestion control algorithm */
++
++#ifdef __USE_MISC
++# include <sys/types.h>
++
++typedef	u_int32_t tcp_seq;
++typedef	u_int32_t tcp_cc;	/* connection count, per RFC 1644 */
++
++/* Miscellaneous constants */
++#define MAX_SACK_BLKS   6       /* Max # SACK blocks stored at receiver side */   
++#define TCP_MAX_SACK    4       /* MAX # SACKs sent in any segment */
++
++# ifdef __FAVOR_BSD
++/*
++ * TCP header.
++ * Per RFC 793, September, 1981.
++ */
++struct tcphdr
++  {
++    u_int16_t th_sport;		/* source port */
++    u_int16_t th_dport;		/* destination port */
++    tcp_seq th_seq;		/* sequence number */
++    tcp_seq th_ack;		/* acknowledgement number */
++#  if __BYTE_ORDER == __LITTLE_ENDIAN
++    u_int8_t th_x2:4;		/* (unused) */
++    u_int8_t th_off:4;		/* data offset */
++#  endif
++#  if __BYTE_ORDER == __BIG_ENDIAN
++    u_int8_t th_off:4;		/* data offset */
++    u_int8_t th_x2:4;		/* (unused) */
++#  endif
++    u_int8_t th_flags;
++#  define TH_FIN	0x01
++#  define TH_SYN	0x02
++#  define TH_RST	0x04
++#  define TH_PUSH	0x08
++#  define TH_ACK	0x10
++#  define TH_URG	0x20
++    u_int16_t th_win;		/* window */
++    u_int16_t th_sum;		/* checksum */
++    u_int16_t th_urp;		/* urgent pointer */
++};
++
++# else /* !__FAVOR_BSD */
++struct tcphdr
++  {
++    u_int16_t source;
++    u_int16_t dest;
++    u_int32_t seq;
++    u_int32_t ack_seq;
++#  if __BYTE_ORDER == __LITTLE_ENDIAN
++    u_int16_t res1:4;
++    u_int16_t doff:4;
++    u_int16_t fin:1;
++    u_int16_t syn:1;
++    u_int16_t rst:1;
++    u_int16_t psh:1;
++    u_int16_t ack:1;
++    u_int16_t urg:1;
++    u_int16_t res2:2;
++#  elif __BYTE_ORDER == __BIG_ENDIAN
++    u_int16_t doff:4;
++    u_int16_t res1:4;
++    u_int16_t res2:2;
++    u_int16_t urg:1;
++    u_int16_t ack:1;
++    u_int16_t psh:1;
++    u_int16_t rst:1;
++    u_int16_t syn:1;
++    u_int16_t fin:1;
++#  else
++#   error "Adjust your <bits/endian.h> defines"
++#  endif
++    u_int16_t window;
++    u_int16_t check;
++    u_int16_t urg_ptr;
++};
++# endif /* __FAVOR_BSD */
++
++enum
++{
++  TCP_ESTABLISHED = 1,
++  TCP_SYN_SENT,
++  TCP_SYN_RECV,
++  TCP_FIN_WAIT1,
++  TCP_FIN_WAIT2,
++  TCP_TIME_WAIT,
++  TCP_CLOSE,
++  TCP_CLOSE_WAIT,
++  TCP_LAST_ACK,
++  TCP_LISTEN,
++  TCP_CLOSING   /* now a valid state */
++};
++
++# define TCPOPT_EOL		0
++# define TCPOPT_NOP		1
++# define TCPOPT_MAXSEG		2
++# define    TCPOLEN_MAXSEG		4
++# define TCPOPT_WINDOW		3
++# define    TCPOLEN_WINDOW		3
++# define TCPOPT_SACK_PERMITTED	4		/* Experimental */
++# define    TCPOLEN_SACK_PERMITTED	2
++# define TCPOPT_SACK		5		/* Experimental */
++# define TCPOPT_TIMESTAMP	8
++# define    TCPOLEN_TIMESTAMP	10
++# define    TCPOLEN_TSTAMP_APPA	(TCPOLEN_TIMESTAMP+2) /* appendix A */
++# define    TCPOPT_TSTAMP_HDR	\
++    (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
++#define	TCPOPT_CC		11		/* CC options: RFC-1644 */
++#define TCPOPT_CCNEW		12
++#define TCPOPT_CCECHO		13
++#define	   TCPOLEN_CC			6
++#define	   TCPOLEN_CC_APPA		(TCPOLEN_CC+2)
++#define	   TCPOPT_CC_HDR(ccopt)		\
++    (TCPOPT_NOP<<24|TCPOPT_NOP<<16|(ccopt)<<8|TCPOLEN_CC)
++
++/*
++ * Default maximum segment size for TCP.
++ * With an IP MSS of 576, this is 536,
++ * but 512 is probably more convenient.
++ * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)).
++ */
++# define TCP_MSS	512
++
++/*
++ * Default maximum segment size for TCP6.
++ * With an IP MSS of 1280, this is 1220,
++ * but 1024 is probably more convenient.
++ * This should be defined as MIN(1024, IP6_MSS - sizeof (struct tcpip6hdr)).
++ */
++# define TCP6_MSS	1024
++
++# define TCP_MAXWIN	65535	/* largest value for (unscaled) window */
++# define TTCP_CLIENT_SND_WND 4096 /* default send window for T/TCP client */
++
++# define TCP_MAX_WINSHIFT	14	/* maximum window shift */
++
++#define TCP_MAXBURST		4	/* maximum segments in a burst */
++
++#define TCP_MAXHLEN	(0xf<<2)	/* max length of header in bytes */
++#define TCP_MAXOLEN	(TCP_MAXHLEN - sizeof (struct tcphdr))
++					/* max space left for options */
++
++# define SOL_TCP		6	/* TCP level */
++
++
++# define TCPI_OPT_TIMESTAMPS	1
++# define TCPI_OPT_SACK		2
++# define TCPI_OPT_WSCALE	4
++# define TCPI_OPT_ECN		8
++
++/* Values for tcpi_state.  */
++enum tcp_ca_state
++{
++  TCP_CA_Open = 0,
++  TCP_CA_Disorder = 1,
++  TCP_CA_CWR = 2,
++  TCP_CA_Recovery = 3,
++  TCP_CA_Loss = 4
++};
++
++struct tcp_info
++{
++  u_int8_t	tcpi_state;
++  u_int8_t	tcpi_ca_state;
++  u_int8_t	tcpi_retransmits;
++  u_int8_t	tcpi_probes;
++  u_int8_t	tcpi_backoff;
++  u_int8_t	tcpi_options;
++  u_int8_t	tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
++
++  u_int32_t	tcpi_rto;
++  u_int32_t	tcpi_ato;
++  u_int32_t	tcpi_snd_mss;
++  u_int32_t	tcpi_rcv_mss;
++
++  u_int32_t	tcpi_unacked;
++  u_int32_t	tcpi_sacked;
++  u_int32_t	tcpi_lost;
++  u_int32_t	tcpi_retrans;
++  u_int32_t	tcpi_fackets;
++
++  /* Times. */
++  u_int32_t	tcpi_last_data_sent;
++  u_int32_t	tcpi_last_ack_sent;	/* Not remembered, sorry.  */
++  u_int32_t	tcpi_last_data_recv;
++  u_int32_t	tcpi_last_ack_recv;
++
++  /* Metrics. */
++  u_int32_t	tcpi_pmtu;
++  u_int32_t	tcpi_rcv_ssthresh;
++  u_int32_t	tcpi_rtt;
++  u_int32_t	tcpi_rttvar;
++  u_int32_t	tcpi_snd_ssthresh;
++  u_int32_t	tcpi_snd_cwnd;
++  u_int32_t	tcpi_advmss;
++  u_int32_t	tcpi_reordering;
++};
++
++#endif /* Misc.  */
++
++#endif /* netinet/tcp.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/nfs/nfs.h
+@@ -0,0 +1,3 @@
++#include <stdint.h>
++#include <sys/mount.h>
++#include <nfs/nfsproto.h>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/not-cancel.h
+@@ -0,0 +1,91 @@
++/* Uncancelable versions of cancelable interfaces.  kFreeBSD version.
++   Copyright (C) 2003, 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/types.h>
++#include <sysdep.h>
++
++/* Uncancelable open.  */
++#define open_not_cancel(name, flags, mode) \
++   INLINE_SYSCALL (open, 3, (const char *) (name), (flags), (mode))
++#define open_not_cancel_2(name, flags) \
++   INLINE_SYSCALL (open, 2, (const char *) (name), (flags))
++
++/* Uncancelable openat.  */
++#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
++extern int __openat_nocancel (int fd, const char *fname, int oflag,
++			      mode_t mode) attribute_hidden;
++extern int __openat64_nocancel (int fd, const char *fname, int oflag,
++				mode_t mode) attribute_hidden;
++#else
++# define __openat_nocancel(fd, fname, oflag, mode) \
++  openat (fd, fname, oflag, mode)
++# define __openat64_nocancel(fd, fname, oflag, mode) \
++  openat64 (fd, fname, oflag, mode)
++#endif
++
++#define openat_not_cancel(fd, fname, oflag, mode) \
++  __openat_nocancel (fd, fname, oflag, mode)
++#define openat_not_cancel_3(fd, fname, oflag) \
++  __openat_nocancel (fd, fname, oflag, 0)
++#define openat64_not_cancel(fd, fname, oflag, mode) \
++  __openat64_nocancel (fd, fname, oflag, mode)
++#define openat64_not_cancel_3(fd, fname, oflag) \
++  __openat64_nocancel (fd, fname, oflag, 0)
++
++/* Uncancelable close.  */
++#define close_not_cancel(fd) \
++  INLINE_SYSCALL (close, 1, fd)
++
++#define close_not_cancel_no_status(fd) \
++  (void) ({ INTERNAL_SYSCALL_DECL (err); \
++	    INTERNAL_SYSCALL (close, err, 1, (fd)); })
++
++/* Uncancelable read.  */
++#define read_not_cancel(fd, buf, n) \
++  INLINE_SYSCALL (read, 3, (fd), (buf), (n))
++
++/* Uncancelable write.  */
++#define write_not_cancel(fd, buf, n) \
++  INLINE_SYSCALL (write, 3, (fd), (buf), (n))
++
++/* Uncancelable writev.  */
++#define writev_not_cancel_no_status(fd, iov, n) \
++  (void) ({ INTERNAL_SYSCALL_DECL (err); \
++	    INTERNAL_SYSCALL (writev, err, 3, (fd), (iov), (n)); })
++
++/* Uncancelable fcntl.  */
++#define fcntl_not_cancel(fd, cmd, val) \
++  __fcntl_nocancel (fd, cmd, val)
++
++/* Uncancelable waitpid.  */
++# define waitpid_not_cancel(pid, stat_loc, options) \
++  INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL)
++
++/* Uncancelable pause.  */
++# define pause_not_cancel() \
++  __pause_nocancel ()
++
++/* Uncancelable nanosleep.  */
++# define nanosleep_not_cancel(requested_time, remaining) \
++  INLINE_SYSCALL (nanosleep, 2, requested_time, remaining)
++
++/* Uncancelable sigsuspend.  */
++#define sigsuspend_not_cancel(set) \
++  INLINE_SYSCALL (sigsuspend, 1, set)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/nptl/Implies
+@@ -0,0 +1 @@
++pthread
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/nptl/bits/local_lim.h
+@@ -0,0 +1,48 @@
++/* Minimum guaranteed maximum values for system limits.  FreeBSD version.
++   Copyright (C) 1993-1998, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/syslimits.h>
++
++/* The number of data keys per process.  */
++#define _POSIX_THREAD_KEYS_MAX	128
++/* This is the value this implementation supports.  */
++#define PTHREAD_KEYS_MAX	1024
++
++/* Controlling the iterations of destructors for thread-specific data.  */
++#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS	4
++/* Number of iterations this implementation does.  */
++#define PTHREAD_DESTRUCTOR_ITERATIONS	_POSIX_THREAD_DESTRUCTOR_ITERATIONS
++
++/* The number of threads per process.  */
++#define _POSIX_THREAD_THREADS_MAX	64
++/* This is the value this implementation supports.  */
++#define PTHREAD_THREADS_MAX	1024
++
++/* Maximum amount by which a process can descrease its asynchronous I/O
++   priority level.  */
++#define AIO_PRIO_DELTA_MAX	20
++
++/* Minimum size for a thread.  We are free to choose a reasonable value.  */
++#define PTHREAD_STACK_MIN	16384
++
++/* Maximum number of POSIX timers available.  */
++#define TIMER_MAX	256
++
++/* Maximum number of timer expiration overruns.  */
++#define DELAYTIMER_MAX	2147483647
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/nptl/bits/posix_opt.h
+@@ -0,0 +1,190 @@
++/* Define POSIX options for FreeBSD.
++   Copyright (C) 1996-1997, 1999, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/*
++ * Never include this file directly; use <unistd.h> instead.
++ */
++
++#ifndef	_BITS_POSIX_OPT_H
++#define	_BITS_POSIX_OPT_H	1
++
++/* Job control is supported.  */
++#define	_POSIX_JOB_CONTROL	1
++
++/* Processes have a saved set-user-ID and a saved set-group-ID.  */
++#define	_POSIX_SAVED_IDS	1
++
++/* Priority scheduling is supported.  */
++#define	_POSIX_PRIORITY_SCHEDULING	200809L
++
++/* Synchronizing file data is supported.  */
++#define	_POSIX_SYNCHRONIZED_IO	200809L
++
++/* The fsync function is present.  */
++#define	_POSIX_FSYNC	200809L
++
++/* Mapping of files to memory is supported.  */
++#define	_POSIX_MAPPED_FILES	200809L
++
++/* Locking of all memory is supported.  */
++#define	_POSIX_MEMLOCK	200809L
++
++/* Locking of ranges of memory is supported.  */
++#define	_POSIX_MEMLOCK_RANGE	200809L
++
++/* Setting of memory protections is supported.  */
++#define	_POSIX_MEMORY_PROTECTION	200809L
++
++/* Only root can change owner of file.  */
++#define	_POSIX_CHOWN_RESTRICTED	1
++
++/* `c_cc' member of 'struct termios' structure can be disabled by
++   using the value _POSIX_VDISABLE.  */
++#define	_POSIX_VDISABLE	((unsigned char)'\377')
++
++/* Filenames are not silently truncated.  */
++#define	_POSIX_NO_TRUNC	1
++/* X/Open realtime support is only partially available.  */
++#define _XOPEN_REALTIME	-1
++
++/* X/Open realtime thread support is only partially available.  */
++#define _XOPEN_REALTIME_THREADS	-1
++
++/* Implementation supports `poll' function.  */
++#define	_POSIX_POLL	1
++
++/* Implementation supports `select' and `pselect' functions.  */
++#define	_POSIX_SELECT	1
++
++/* XPG4.2 shared memory is supported.  */
++#define	_XOPEN_SHM	1
++
++/* Tell we have POSIX threads.  */
++#define _POSIX_THREADS	200809L
++
++/* We have the reentrant functions described in POSIX.  */
++#define _POSIX_REENTRANT_FUNCTIONS	1
++#define _POSIX_THREAD_SAFE_FUNCTIONS	200809L
++
++/* We provide priority scheduling for threads.  */
++#define _POSIX_THREAD_PRIORITY_SCHEDULING	200809L
++
++/* We support user-defined stack sizes.  */
++#define _POSIX_THREAD_ATTR_STACKSIZE	200809L
++
++/* We support user-defined stacks.  */
++#define _POSIX_THREAD_ATTR_STACKADDR	200809L
++
++/* We support POSIX.1b semaphores, but only the non-shared form for now.  */
++#define _POSIX_SEMAPHORES	200809L
++
++/* Real-time signals are not available.  */
++#define _POSIX_REALTIME_SIGNALS	-1
++
++/* We support asynchronous I/O.  */
++#define _POSIX_ASYNCHRONOUS_IO	200809L
++#define _POSIX_ASYNC_IO		1
++/* Alternative name for Unix98.  */
++#define _LFS_ASYNCHRONOUS_IO	1
++/* Support for prioritization is not available.  */
++#define _POSIX_PRIORITIZED_IO	-1
++
++/* The LFS support in asynchronous I/O is also available.  */
++#define _LFS64_ASYNCHRONOUS_IO	1
++
++/* The rest of the LFS is also available.  */
++#define _LFS_LARGEFILE		1
++#define _LFS64_LARGEFILE	1
++#define _LFS64_STDIO		1
++
++/* POSIX shared memory objects are implemented.  */
++#define _POSIX_SHARED_MEMORY_OBJECTS	200809L
++
++/* CPU-time clocks somewhere supported.  */
++#define _POSIX_CPUTIME	0
++
++/* We support somewhere the clock also in threads.  */
++#define _POSIX_THREAD_CPUTIME	0
++
++/* GNU libc provides regular expression handling.  */
++#define _POSIX_REGEXP	1
++
++/* Reader/Writer locks are available.  */
++#define _POSIX_READER_WRITER_LOCKS	200809L
++
++/* We have a POSIX shell.  */
++#define _POSIX_SHELL	1
++
++/* We support the Timeouts option.  */
++#define _POSIX_TIMEOUTS	200809L
++
++/* We support spinlocks.  */
++#define _POSIX_SPIN_LOCKS	200809L
++
++/* The `spawn' function family is supported.  */
++#define _POSIX_SPAWN	200809L
++
++/* We have POSIX timers.  */
++#define _POSIX_TIMERS	200809L
++
++/* The barrier functions are available.  */
++#define _POSIX_BARRIERS	200809L
++
++/* POSIX message queues are not available.  */
++#define _POSIX_MESSAGE_PASSING	-1
++
++/* Thread process-shared synchronization is not supported.  */
++#define _POSIX_THREAD_PROCESS_SHARED	-1
++
++/* The monotonic clock is available.  */
++#define _POSIX_MONOTONIC_CLOCK	200809L
++
++/* The clock selection interfaces are not available.  */
++#define _POSIX_CLOCK_SELECTION	-1
++
++/* Advisory information interfaces are not available.  */
++#define _POSIX_ADVISORY_INFO	-1
++
++/* IPv6 support is available.  */
++#define _POSIX_IPV6	200809L
++
++/* Raw socket support is available.  */
++#define _POSIX_RAW_SOCKETS	200809L
++
++/* We have at least one terminal.  */
++#define _POSIX2_CHAR_TERM	200809L
++
++/* Neither process nor thread sporadic server interfaces is available.  */
++#define _POSIX_SPORADIC_SERVER	-1
++#define _POSIX_THREAD_SPORADIC_SERVER	-1
++
++/* trace.h is not available.  */
++#define _POSIX_TRACE	-1
++#define _POSIX_TRACE_EVENT_FILTER	-1
++#define _POSIX_TRACE_INHERIT	-1
++#define _POSIX_TRACE_LOG	-1
++
++/* Typed memory objects are not available.  */
++#define _POSIX_TYPED_MEMORY_OBJECTS	-1
++
++/* No support for priority inheritance or protection.  */
++#define _POSIX_THREAD_PRIO_INHERIT	-1
++#define _POSIX_THREAD_PRIO_PROTECT	-1
++
++#endif /* bits/posix_opt.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/nptl/kernel-posix-timers.h
+@@ -0,0 +1,119 @@
++/* Copyright (C) 2003, 2007, 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <pthread.h>
++#include <setjmp.h>
++#include <signal.h>
++#include <sys/types.h>
++#include <sys/_types.h>
++
++
++/* Nonzero if the system calls are not available.  */
++extern int __no_posix_timers attribute_hidden;
++
++/* Callback to start helper thread.  */
++extern void __start_helper_thread (void) attribute_hidden;
++
++/* Control variable for helper thread creation.  */
++extern pthread_once_t __helper_once attribute_hidden;
++
++/* TID of the helper thread.  */
++extern __lwpid_t __helper_tid attribute_hidden;
++
++/* List of active SIGEV_THREAD timers.  */
++extern struct timer *__active_timer_sigev_thread attribute_hidden;
++/* Lock for the __active_timer_sigev_thread.  */
++extern pthread_mutex_t __active_timer_sigev_thread_lock attribute_hidden;
++
++
++/* Type of timers in the kernel.  */
++typedef int kernel_timer_t;
++
++
++/* Internal representation of timer.  */
++struct timer
++{
++  /* Notification mechanism.  */
++  int sigev_notify;
++
++  /* Timer ID returned by the kernel.  */
++  kernel_timer_t ktimerid;
++
++  /* All new elements must be added after ktimerid.  And if the thrfunc
++     element is not the third element anymore the memory allocation in
++     timer_create needs to be changed.  */
++
++  /* Parameters for the thread to be started for SIGEV_THREAD.  */
++  void (*thrfunc) (sigval_t);
++  sigval_t sival;
++  pthread_attr_t attr;
++
++  /* Next element in list of active SIGEV_THREAD timers.  */
++  struct timer *next;
++};
++
++extern struct timer *__all_timers[TIMER_MAX];
++
++static inline struct timer *
++__kfreebsd_timer_alloc ()
++{
++  unsigned int i;
++  struct timer *timer = malloc (sizeof (struct timer));
++
++  /* Find a free slot (and reserve it atomically).  */
++  for (i = 0; i < TIMER_MAX; i++)
++    if (atomic_compare_and_exchange_val_acq (&__all_timers[i],
++					     timer, NULL) == NULL)
++      return timer;
++
++  errno = EAGAIN;
++  return NULL;
++}
++
++static inline struct timer *
++__kfreebsd_timer_id2ptr (timer_t id)
++{
++  void *ret = NULL;
++
++  if (id >= 0 && id < TIMER_MAX)
++    ret = __all_timers[id];
++
++  if (! ret)
++    errno = EINVAL;
++
++  return ret;
++}
++
++static inline timer_t
++__kfreebsd_timer_ptr2id (struct timer *ptr)
++{
++  unsigned int i;
++  for (i = 0; i < TIMER_MAX; i++)
++    if (__all_timers[i] == ptr)
++      return i;
++
++  return -1;
++}
++
++void static inline
++__kfreebsd_timer_free (struct timer *ptr)
++{
++  __all_timers[__kfreebsd_timer_ptr2id (ptr)] = NULL;
++  free (ptr);
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/nptl/timer_create.c
+@@ -0,0 +1,229 @@
++/* Copyright (C) 2003,2004, 2007, 2009, 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <errno.h>
++#include <pthread.h>
++#include <signal.h>
++#include <stdlib.h>
++#include <string.h>
++#include <time.h>
++#include <sysdep.h>
++#include <kernel-features.h>
++#include <internaltypes.h>
++#include <nptl/pthreadP.h>
++#include "kernel-posix-timers.h"
++#include "kernel-posix-cpu-timers.h"
++
++
++#ifdef SYS_ktimer_create
++# ifndef __ASSUME_POSIX_TIMERS
++static int compat_timer_create (clockid_t clock_id, struct sigevent *evp,
++				timer_t *timerid);
++#  define timer_create static compat_timer_create
++#  include <nptl/sysdeps/pthread/timer_create.c>
++#  undef timer_create
++
++/* Nonzero if the system calls are not available.  */
++int __no_posix_timers attribute_hidden;
++# endif
++
++# ifdef timer_create_alias
++#  define timer_create timer_create_alias
++# endif
++
++
++int
++timer_create (clock_id, evp, timerid)
++     clockid_t clock_id;
++     struct sigevent *evp;
++     timer_t *timerid;
++{
++# undef timer_create
++# ifndef __ASSUME_POSIX_TIMERS
++  if  (__no_posix_timers >= 0)
++# endif
++    {
++      /* If the user wants notification via a thread we need to handle
++	 this special.  */
++      if (evp == NULL
++	  || __builtin_expect (evp->sigev_notify != SIGEV_THREAD, 1))
++	{
++	  struct sigevent local_evp;
++
++	  struct timer *newp = __kfreebsd_timer_alloc ();
++
++	  if (newp == NULL)
++	    /* No more memory.  */
++	    return -1;
++
++	  if (evp == NULL)
++	    {
++	      /* The kernel has to pass up the timer ID which is a
++		 userlevel object.  Therefore we cannot leave it up to
++		 the kernel to determine it.  */
++	      local_evp.sigev_notify = SIGEV_SIGNAL;
++	      local_evp.sigev_signo = SIGALRM;
++	      local_evp.sigev_value.sival_ptr = newp;
++
++	      evp = &local_evp;
++	    }
++
++	  kernel_timer_t ktimerid;
++	  int retval = INLINE_SYSCALL (ktimer_create, 3, clock_id, evp,
++				       &ktimerid);
++
++# ifndef __ASSUME_POSIX_TIMERS
++	  if (retval != -1 || errno != ENOSYS)
++# endif
++	    {
++# ifndef __ASSUME_POSIX_TIMERS
++	      __no_posix_timers = 1;
++# endif
++
++	      if (retval != -1)
++		{
++		  newp->sigev_notify = (evp != NULL
++					? evp->sigev_notify : SIGEV_SIGNAL);
++		  newp->ktimerid = ktimerid;
++
++		  *timerid = __kfreebsd_timer_ptr2id (newp);
++		}
++	      else
++		{
++		  /* Cannot allocate the timer, fail.  */
++		  __kfreebsd_timer_free (newp);
++		  retval = -1;
++		}
++
++	      return retval;
++	    }
++
++	  __kfreebsd_timer_free (newp);
++
++# ifndef __ASSUME_POSIX_TIMERS
++	  /* When we come here the syscall does not exist.  Make sure we
++	     do not try to use it again.  */
++	  __no_posix_timers = -1;
++# endif
++	}
++      else
++	{
++# ifndef __ASSUME_POSIX_TIMERS
++	  /* Make sure we have the necessary kernel support.  */
++	  if (__no_posix_timers == 0)
++	    {
++	      struct timespec ts;
++	      int res;
++	      res = INLINE_SYSCALL (clock_getres, 2,
++				    CLOCK_REALTIME, &ts);
++	      __no_posix_timers = (res == -1 ? -1 : 1);
++	    }
++
++	  if (__no_posix_timers > 0)
++# endif
++	    {
++	      /* Create the helper thread.  */
++	      pthread_once (&__helper_once, __start_helper_thread);
++	      if (__helper_tid == 0)
++		{
++		  /* No resources to start the helper thread.  */
++		  __set_errno (EAGAIN);
++		  return -1;
++		}
++
++	      struct timer *newp;
++	      newp = __kfreebsd_timer_alloc ();
++	      if (newp == NULL)
++		return -1;
++
++	      /* Copy the thread parameters the user provided.  */
++	      newp->sival = evp->sigev_value;
++	      newp->thrfunc = evp->sigev_notify_function;
++	      newp->sigev_notify = SIGEV_THREAD;
++
++	      /* We cannot simply copy the thread attributes since the
++		 implementation might keep internal information for
++		 each instance.  */
++	      (void) pthread_attr_init (&newp->attr);
++	      if (evp->sigev_notify_attributes != NULL)
++		{
++		  struct pthread_attr *nattr;
++		  struct pthread_attr *oattr;
++
++		  nattr = (struct pthread_attr *) &newp->attr;
++		  oattr = (struct pthread_attr *) evp->sigev_notify_attributes;
++
++		  nattr->schedparam = oattr->schedparam;
++		  nattr->schedpolicy = oattr->schedpolicy;
++		  nattr->flags = oattr->flags;
++		  nattr->guardsize = oattr->guardsize;
++		  nattr->stackaddr = oattr->stackaddr;
++		  nattr->stacksize = oattr->stacksize;
++		}
++
++	      /* In any case set the detach flag.  */
++	      (void) pthread_attr_setdetachstate (&newp->attr,
++						  PTHREAD_CREATE_DETACHED);
++
++	      /* Create the event structure for the kernel timer.  */
++	      struct sigevent sev =
++		{ .sigev_value.sival_ptr = newp,
++		  .sigev_signo = SIGTIMER,
++		  .sigev_notify = SIGEV_THREAD_ID,
++		  .sigev_notify_thread_id = __helper_tid,
++		};
++
++	      /* Create the timer.  */
++	      int res;
++	      res = INLINE_SYSCALL (ktimer_create, 3,
++				      clock_id, &sev, &newp->ktimerid);
++	      if (res != -1)
++		{
++		  /* Add to the queue of active timers with thread
++		     delivery.  */
++		  pthread_mutex_lock (&__active_timer_sigev_thread_lock);
++		  newp->next = __active_timer_sigev_thread;
++		  __active_timer_sigev_thread = newp;
++		  pthread_mutex_unlock (&__active_timer_sigev_thread_lock);
++
++		  *timerid = __kfreebsd_timer_ptr2id (newp);
++		  return 0;
++		}
++
++	      /* Free the resources.  */
++	      __kfreebsd_timer_free (newp);
++
++	      return -1;
++	    }
++	}
++    }
++
++# ifndef __ASSUME_POSIX_TIMERS
++  /* Compatibility code.  */
++  return compat_timer_create (clock_id, evp, timerid);
++# endif
++}
++#else
++# ifdef timer_create_alias
++#  define timer_create timer_create_alias
++# endif
++/* The new system calls are not available.  Use the userlevel
++   implementation.  */
++# include <nptl/sysdeps/pthread/timer_create.c>
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/nptl/timer_delete.c
+@@ -0,0 +1,117 @@
++/* Copyright (C) 2003, 2007, 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <errno.h>
++#include <stdlib.h>
++#include <time.h>
++#include <sysdep.h>
++#include <kernel-features.h>
++#include "kernel-posix-timers.h"
++
++
++#ifdef SYS_ktimer_delete
++# ifndef __ASSUME_POSIX_TIMERS
++static int compat_timer_delete (timer_t timerid);
++#  define timer_delete static compat_timer_delete
++#  include <nptl/sysdeps/pthread/timer_delete.c>
++#  undef timer_delete
++# endif
++
++# ifdef timer_delete_alias
++#  define timer_delete timer_delete_alias
++# endif
++
++
++int
++timer_delete (timerid)
++     timer_t timerid;
++{
++# undef timer_delete
++# ifndef __ASSUME_POSIX_TIMERS
++  if (__no_posix_timers >= 0)
++# endif
++    {
++      struct timer *kt = __kfreebsd_timer_id2ptr (timerid);
++      if (! kt)
++	return -1;
++
++      /* Delete the kernel timer object.  */
++      int res = INLINE_SYSCALL (ktimer_delete, 1, kt->ktimerid);
++
++      if (res == 0)
++	{
++	  if (kt->sigev_notify == SIGEV_THREAD)
++	    {
++	      /* Remove the timer from the list.  */
++	      pthread_mutex_lock (&__active_timer_sigev_thread_lock);
++	      if (__active_timer_sigev_thread == kt)
++		__active_timer_sigev_thread = kt->next;
++	      else
++		{
++		  struct timer *prevp = __active_timer_sigev_thread;
++		  while (prevp->next != NULL)
++		    if (prevp->next == kt)
++		      {
++			prevp->next = kt->next;
++			break;
++		      }
++		    else
++		      prevp = prevp->next;
++		}
++	      pthread_mutex_unlock (&__active_timer_sigev_thread_lock);
++	    }
++
++# ifndef __ASSUME_POSIX_TIMERS
++	  /* We know the syscall support is available.  */
++	  __no_posix_timers = 1;
++# endif
++
++	  /* Free the memory.  */
++	  (void) __kfreebsd_timer_free (kt);
++
++	  return 0;
++	}
++
++      /* The kernel timer is not known or something else bad happened.
++	 Return the error.  */
++# ifndef __ASSUME_POSIX_TIMERS
++      if (errno != ENOSYS)
++	{
++	  __no_posix_timers = 1;
++# endif
++	  return -1;
++# ifndef __ASSUME_POSIX_TIMERS
++	}
++
++      __no_posix_timers = -1;
++# endif
++    }
++
++# ifndef __ASSUME_POSIX_TIMERS
++  return compat_timer_delete (timerid);
++# endif
++}
++#else
++# ifdef timer_delete_alias
++#  define timer_delete timer_delete_alias
++# endif
++/* The new system calls are not available.  Use the userlevel
++   implementation.  */
++# include <nptl/sysdeps/pthread/timer_delete.c>
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/nptl/timer_getoverr.c
+@@ -0,0 +1,83 @@
++/* Copyright (C) 2003, 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <errno.h>
++#include <time.h>
++#include <sysdep.h>
++#include <kernel-features.h>
++#include "kernel-posix-timers.h"
++
++
++#ifdef SYS_ktimer_getoverrun
++# ifndef __ASSUME_POSIX_TIMERS
++static int compat_timer_getoverrun (timer_t timerid);
++#  define timer_getoverrun static compat_timer_getoverrun
++#  include <nptl/sysdeps/pthread/timer_getoverr.c>
++#  undef timer_getoverrun
++# endif
++
++# ifdef timer_getoverrun_alias
++#  define timer_getoverrun timer_getoverrun_alias
++# endif
++
++
++int
++timer_getoverrun (timerid)
++     timer_t timerid;
++{
++# undef timer_getoverrun
++# ifndef __ASSUME_POSIX_TIMERS
++  if (__no_posix_timers >= 0)
++# endif
++    {
++      struct timer *kt = __kfreebsd_timer_id2ptr (timerid);
++      if (! kt)
++	return -1;
++
++      /* Get the information from the kernel.  */
++      int res = INLINE_SYSCALL (ktimer_getoverrun, 1, kt->ktimerid);
++
++# ifndef __ASSUME_POSIX_TIMERS
++      if (res != -1 || errno != ENOSYS)
++	{
++	  /* We know the syscall support is available.  */
++	  __no_posix_timers = 1;
++# endif
++	  return res;
++# ifndef __ASSUME_POSIX_TIMERS
++	}
++# endif
++
++# ifndef __ASSUME_POSIX_TIMERS
++      __no_posix_timers = -1;
++# endif
++    }
++
++# ifndef __ASSUME_POSIX_TIMERS
++  return compat_timer_getoverrun (timerid);
++# endif
++}
++#else
++# ifdef timer_getoverrun_alias
++#  define timer_getoverrun timer_getoverrun_alias
++# endif
++/* The new system calls are not available.  Use the userlevel
++   implementation.  */
++# include <nptl/sysdeps/pthread/timer_getoverr.c>
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/nptl/timer_gettime.c
+@@ -0,0 +1,85 @@
++/* Copyright (C) 2003, 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <errno.h>
++#include <stdlib.h>
++#include <time.h>
++#include <sysdep.h>
++#include <kernel-features.h>
++#include "kernel-posix-timers.h"
++
++
++#ifdef SYS_ktimer_gettime
++# ifndef __ASSUME_POSIX_TIMERS
++static int compat_timer_gettime (timer_t timerid, struct itimerspec *value);
++#  define timer_gettime static compat_timer_gettime
++#  include <nptl/sysdeps/pthread/timer_gettime.c>
++#  undef timer_gettime
++# endif
++
++# ifdef timer_gettime_alias
++#  define timer_gettime timer_gettime_alias
++# endif
++
++
++int
++timer_gettime (timerid, value)
++     timer_t timerid;
++     struct itimerspec *value;
++{
++# undef timer_gettime
++# ifndef __ASSUME_POSIX_TIMERS
++  if (__no_posix_timers >= 0)
++# endif
++    {
++      struct timer *kt = __kfreebsd_timer_id2ptr (timerid);
++      if (! kt)
++	return -1;
++
++      /* Delete the kernel timer object.  */
++      int res = INLINE_SYSCALL (ktimer_gettime, 2, kt->ktimerid, value);
++
++# ifndef __ASSUME_POSIX_TIMERS
++      if (res != -1 || errno != ENOSYS)
++	{
++	  /* We know the syscall support is available.  */
++	  __no_posix_timers = 1;
++# endif
++	  return res;
++# ifndef __ASSUME_POSIX_TIMERS
++	}
++# endif
++
++# ifndef __ASSUME_POSIX_TIMERS
++      __no_posix_timers = -1;
++# endif
++    }
++
++# ifndef __ASSUME_POSIX_TIMERS
++  return compat_timer_gettime (timerid, value);
++# endif
++}
++#else
++# ifdef timer_gettime_alias
++#  define timer_gettime timer_gettime_alias
++# endif
++/* The new system calls are not available.  Use the userlevel
++   implementation.  */
++# include <nptl/sysdeps/pthread/timer_gettime.c>
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/nptl/timer_routines.c
+@@ -0,0 +1,208 @@
++/* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <errno.h>
++#include <setjmp.h>
++#include <signal.h>
++#include <stdbool.h>
++#include <sysdep.h>
++#include <sys/_types.h> /* __lwpid_t */
++#include <atomic.h>
++#include <kernel-features.h>
++#include <nptl/pthreadP.h>
++#include "kernel-posix-timers.h"
++
++/* NPTL/Linux simply casts "timer_t" to "struct timer *", but on
++   kFreeBSD timer_t may not be large enough to hold a pointer.
++   So we store the pointers here... (sigh) */
++struct timer *__all_timers[TIMER_MAX];
++
++/* List of active SIGEV_THREAD timers.  */
++struct timer *__active_timer_sigev_thread;
++/* Lock for the __active_timer_sigev_thread.  */
++pthread_mutex_t __active_timer_sigev_thread_lock = PTHREAD_MUTEX_INITIALIZER;
++
++
++struct thread_start_data
++{
++  void (*thrfunc) (sigval_t);
++  sigval_t sival;
++};
++
++
++#ifdef SYS_ktimer_create
++/* Helper thread to call the user-provided function.  */
++static void *
++timer_sigev_thread (void *arg)
++{
++  /* The parent thread has all signals blocked.  This is a bit
++     surprising for user code, although valid.  We unblock all
++     signals.  */
++  sigset_t ss;
++  sigemptyset (&ss);
++  sigprocmask (SIG_SETMASK, &ss, NULL);
++
++  struct thread_start_data *td = (struct thread_start_data *) arg;
++
++  void (*thrfunc) (sigval_t) = td->thrfunc;
++  sigval_t sival = td->sival;
++
++  /* The TD object was allocated in timer_helper_thread.  */
++  free (td);
++
++  /* Call the user-provided function.  */
++  thrfunc (sival);
++
++  return NULL;
++}
++
++
++/* Helper function to support starting threads for SIGEV_THREAD.  */
++static void *
++timer_helper_thread (void *arg)
++{
++  /* Wait for the SIGTIMER signal, allowing the setXid signal, and
++     none else.  */
++  sigset_t ss;
++  sigemptyset (&ss);
++  __sigaddset (&ss, SIGTIMER);
++
++  /* Endless loop of waiting for signals.  The loop is only ended when
++     the thread is canceled.  */
++  while (1)
++    {
++      siginfo_t si;
++
++      /* sigwaitinfo cannot be used here, since it deletes
++	 SIGCANCEL == SIGTIMER from the set.  */
++
++      int oldtype = LIBC_CANCEL_ASYNC ();
++
++      /* XXX The size argument hopefully will have to be changed to the
++	 real size of the user-level sigset_t.  */
++      int result = sigtimedwait (&ss, &si, NULL);
++
++      LIBC_CANCEL_RESET (oldtype);
++
++      if (result > 0)
++	{
++	  if (si.si_code == SI_TIMER)
++	    {
++	      struct timer *tk = (struct timer *) si.si_value.sival_ptr;
++
++	      /* Check the timer is still used and will not go away
++		 while we are reading the values here.  */
++	      pthread_mutex_lock (&__active_timer_sigev_thread_lock);
++
++	      struct timer *runp = __active_timer_sigev_thread;
++	      while (runp != NULL)
++		if (runp == tk)
++		  break;
++		else
++		  runp = runp->next;
++
++	      if (runp != NULL)
++		{
++		  struct thread_start_data *td = malloc (sizeof (*td));
++
++		  /* There is not much we can do if the allocation fails.  */
++		  if (td != NULL)
++		    {
++		      /* This is the signal we are waiting for.  */
++		      td->thrfunc = tk->thrfunc;
++		      td->sival = tk->sival;
++
++		      pthread_t th;
++		      (void) pthread_create (&th, &tk->attr,
++					     timer_sigev_thread, td);
++		    }
++		}
++
++	      pthread_mutex_unlock (&__active_timer_sigev_thread_lock);
++	    }
++	  else if (si.si_code == SI_LWP
++		   /* Backward compatibility (see rev 211732 in -CURRENT).  */
++		   || si.si_code == SI_USER)
++	    /* The thread is canceled.  */
++	    pthread_exit (NULL);
++	}
++    }
++}
++
++
++/* Control variable for helper thread creation.  */
++pthread_once_t __helper_once attribute_hidden;
++
++
++/* TID of the helper thread.  */
++__lwpid_t __helper_tid attribute_hidden;
++
++
++/* Reset variables so that after a fork a new helper thread gets started.  */
++static void
++reset_helper_control (void)
++{
++  __helper_once = PTHREAD_ONCE_INIT;
++  __helper_tid = 0;
++}
++
++
++void
++attribute_hidden
++__start_helper_thread (void)
++{
++  /* The helper thread needs only very little resources
++     and should go away automatically when canceled.  */
++  pthread_attr_t attr;
++  (void) pthread_attr_init (&attr);
++  (void) pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
++
++  /* Block all signals in the helper thread but SIGSETXID.  To do this
++     thoroughly we temporarily have to block all signals here.  The
++     helper can lose wakeups if SIGCANCEL is not blocked throughout,
++     but sigfillset omits it SIGSETXID.  So, we add SIGCANCEL back
++     explicitly here.  */
++  sigset_t ss;
++  sigset_t oss;
++  sigfillset (&ss);
++  __sigaddset (&ss, SIGCANCEL);
++  sigprocmask (SIG_SETMASK, &ss, &oss);
++
++  /* Create the helper thread for this timer.  */
++  pthread_t th;
++  int res = pthread_create (&th, &attr, timer_helper_thread, NULL);
++  if (res == 0)
++    /* We managed to start the helper thread.  */
++    __helper_tid = ((struct pthread *) th)->tid;
++
++  /* Restore the signal mask.  */
++  sigprocmask (SIG_SETMASK, &oss, NULL);
++
++  /* No need for the attribute anymore.  */
++  (void) pthread_attr_destroy (&attr);
++
++  /* We have to make sure that after fork()ing a new helper thread can
++     be created.  */
++  pthread_atfork (NULL, NULL, reset_helper_control);
++}
++#endif
++
++#ifndef __ASSUME_POSIX_TIMERS
++# include <nptl/sysdeps/pthread/timer_routines.c>
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/nptl/timer_settime.c
+@@ -0,0 +1,90 @@
++/* Copyright (C) 2003, 2012 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public License as
++   published by the Free Software Foundation; either version 2.1 of the
++   License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; see the file COPYING.LIB.  If not,
++   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++   Boston, MA 02111-1307, USA.  */
++
++#include <errno.h>
++#include <stdlib.h>
++#include <time.h>
++#include <sysdep.h>
++#include <kernel-features.h>
++#include "kernel-posix-timers.h"
++
++
++#ifdef SYS_ktimer_settime
++# ifndef __ASSUME_POSIX_TIMERS
++static int compat_timer_settime (timer_t timerid, int flags,
++				 const struct itimerspec *value,
++				 struct itimerspec *ovalue);
++#  define timer_settime static compat_timer_settime
++#  include <nptl/sysdeps/pthread/timer_settime.c>
++#  undef timer_settime
++# endif
++
++# ifdef timer_settime_alias
++#  define timer_settime timer_settime_alias
++# endif
++
++
++int
++timer_settime (timerid, flags, value, ovalue)
++     timer_t timerid;
++     int flags;
++     const struct itimerspec *value;
++     struct itimerspec *ovalue;
++{
++# undef timer_settime
++# ifndef __ASSUME_POSIX_TIMERS
++  if (__no_posix_timers >= 0)
++# endif
++    {
++      struct timer *kt = __kfreebsd_timer_id2ptr (timerid);
++      if (! kt)
++	return -1;
++
++      /* Delete the kernel timer object.  */
++      int res = INLINE_SYSCALL (ktimer_settime, 4, kt->ktimerid, flags,
++				value, ovalue);
++
++# ifndef __ASSUME_POSIX_TIMERS
++      if (res != -1 || errno != ENOSYS)
++	{
++	  /* We know the syscall support is available.  */
++	  __no_posix_timers = 1;
++# endif
++	  return res;
++# ifndef __ASSUME_POSIX_TIMERS
++	}
++# endif
++
++# ifndef __ASSUME_POSIX_TIMERS
++      __no_posix_timers = -1;
++# endif
++    }
++
++# ifndef __ASSUME_POSIX_TIMERS
++  return compat_timer_settime (timerid, flags, value, ovalue);
++# endif
++}
++#else
++# ifdef timer_settime_alias
++#  define timer_settime timer_settime_alias
++# endif
++/* The new system calls are not available.  Use the userlevel
++   implementation.  */
++# include <nptl/sysdeps/pthread/timer_settime.c>
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ntp_gettime.c
+@@ -0,0 +1,62 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/timex.h>
++#include <sys/sysctl.h>
++#include <stddef.h>
++
++#ifndef ntptimeval
++#define ntptimeval ntptimeval4
++#endif
++
++int
++ntp_gettime (struct ntptimeval *ntv)
++{
++  /* Fetch sysctl value of "kern.ntp_pll.gettime".  */
++  /* The 'struct ntptimeval' has grown in size.  */
++  union
++    {
++      struct ntptimeval3 tv3;
++      struct ntptimeval4 tv4;
++    } tv;
++  size_t size = sizeof (tv);
++  int request[2] = { CTL_KERN, KERN_NTP_PLL };
++
++  if (__sysctl (request, 2, &tv, &size, NULL, 0) >= 0)
++    {
++      if (size == sizeof (struct ntptimeval3))
++	{
++	  if (ntv)
++	    {
++	      ntv->time = tv.tv3.time;
++	      ntv->maxerror = tv.tv3.maxerror;
++	      ntv->esterror = tv.tv3.esterror;
++	      ntv->tai = 0;
++	      ntv->time_state = tv.tv3.time_state;
++	    }
++	  return tv.tv3.time_state;
++	}
++      if (size == sizeof (struct ntptimeval4))
++	{
++	  if (ntv)
++	    *ntv = tv.tv4;
++	  return tv.tv4.time_state;
++	}
++    }
++  return TIME_ERROR;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/open.c
+@@ -0,0 +1,63 @@
++/* Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <fcntl.h>
++#include <stdarg.h>
++#include <unistd.h>
++#include <sysdep.h>
++#include <errno.h>
++#include <sys/stat.h>
++#include <sys/time.h>
++#include <sysdep-cancel.h>
++
++int
++__libc_open (const char *file, int oflag, ...)
++{
++  int mode = 0;
++  int fd;
++
++  if (oflag & O_CREAT)
++    {
++      va_list arg;
++      va_start (arg, oflag);
++      mode = va_arg (arg, int);
++      va_end (arg);
++    }
++
++  if (SINGLE_THREAD_P)
++  {
++    fd = INLINE_SYSCALL (open, 3, file, oflag, mode);
++  }
++  else
++  {
++    int oldtype = LIBC_CANCEL_ASYNC ();
++    fd = INLINE_SYSCALL (open, 3, file, oflag, mode);
++    LIBC_CANCEL_RESET (oldtype);
++  }
++  return fd;
++}
++libc_hidden_def (__libc_open)
++
++weak_alias (__libc_open, __open)
++libc_hidden_weak (__open)
++
++weak_alias (__libc_open, open)
++
++strong_alias (__libc_open, __libc_open64)
++weak_alias (__libc_open64, __open64)
++weak_alias (__libc_open64, open64)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/open64.c
+@@ -0,0 +1,2 @@
++/* 'open64' is the same as 'open', because __off64_t == __off_t and
++   O_LARGEFILE == 0.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/open_2.c
+@@ -0,0 +1,2 @@
++#include <sysdeps/unix/sysv/linux/open_2.c>
++strong_alias (__open_2, __open64_2)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/openat.c
+@@ -0,0 +1,189 @@
++/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stdarg.h>
++#include <stddef.h>
++#include <stdio.h>
++#include <unistd.h>
++#include <sysdep.h>
++#include <sys/stat.h>
++#include <sys/time.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <kernel-features.h>
++#include <sysdep-cancel.h>
++#include <not-cancel.h>
++
++extern int __syscall_openat (int fd, const char *path, int flag, mode_t mode);
++libc_hidden_proto (__syscall_openat)
++
++# ifndef __ASSUME_ATFCTS
++int __have_atfcts = 0;
++#endif
++
++/* Open FILE with access OFLAG.  Interpret relative paths relative to
++   the directory associated with FD.  If OFLAG includes O_CREAT, a
++   third argument is the file protection.  */
++int
++__openat_nocancel (fd, file, oflag, mode)
++     int fd;
++     const char *file;
++     int oflag;
++     mode_t mode;
++{
++# ifndef __ASSUME_ATFCTS
++  if (__have_atfcts >= 0)
++# endif
++    {
++      int result = INLINE_SYSCALL (openat, 4, fd, file, oflag, mode);
++# ifndef __ASSUME_ATFCTS
++      if (result == -1 && errno == ENOSYS)
++	__have_atfcts = -1;
++      else
++# endif
++	return result;
++    }
++
++#ifndef __ASSUME_ATFCTS
++  if (fd != AT_FDCWD && file[0] != '/')
++    {
++      int mib[4];
++      size_t kf_len = 0;
++      char *kf_buf, *kf_bufp;
++      size_t filelen;
++
++      if (fd < 0)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++
++      filelen = strlen (file);
++      if (__builtin_expect (filelen == 0, 0))
++	{
++	  __set_errno (ENOENT);
++	  return -1;
++	}
++
++      mib[0] = CTL_KERN;
++      mib[1] = KERN_PROC;
++      mib[2] = KERN_PROC_FILEDESC;
++      mib[3] = __getpid ();
++
++      if (__sysctl (mib, 4, NULL, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_buf = alloca (kf_len + filelen);
++      if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_bufp = kf_buf;
++      while (kf_bufp < kf_buf + kf_len)
++	{
++	  struct kinfo_file *kf = (struct kinfo_file *) (uintptr_t) kf_bufp;
++
++	  if (kf->kf_fd == fd)
++	    {
++	      if (kf->kf_type != KF_TYPE_VNODE ||
++		  kf->kf_vnode_type != KF_VTYPE_VDIR)
++		{
++		  __set_errno (ENOTDIR);
++		  return -1;
++		}
++
++	      strcat (kf->kf_path, "/");
++	      strcat (kf->kf_path, file);
++	      file = kf->kf_path;
++	      break;
++	    }
++	  kf_bufp += kf->kf_structsize;
++	}
++
++      if (kf_bufp >= kf_buf + kf_len)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++
++    }
++  return INLINE_SYSCALL (open, 3, file, oflag, mode);
++#endif
++}
++
++strong_alias (__openat_nocancel, __openat64_nocancel)
++
++/* Open FILE with access OFLAG.  Interpret relative paths relative to
++   the directory associated with FD.  If OFLAG includes O_CREAT, a
++   third argument is the file protection.  */
++int
++__openat (fd, file, oflag)
++     int fd;
++     const char *file;
++     int oflag;
++{
++  int mode = 0;
++  int result;
++
++  if (oflag & O_CREAT)
++    {
++      va_list arg;
++      va_start (arg, oflag);
++      mode = va_arg (arg, int);
++      va_end (arg);
++    }
++  
++  if (SINGLE_THREAD_P)
++    return __openat_nocancel(fd, file, oflag, mode);
++  else
++    {
++      int oldtype = LIBC_CANCEL_ASYNC ();
++      result = __openat_nocancel(fd, file, oflag, mode);
++      LIBC_CANCEL_RESET (oldtype);
++    }
++  return result;
++}
++
++libc_hidden_def (__openat)
++weak_alias (__openat, openat)
++
++/* 'openat64' is the same as 'openat', because __off64_t == __off_t.  */
++strong_alias (__openat, __openat64)
++libc_hidden_def (__openat64)
++weak_alias (__openat64, openat64)
++
++int
++__openat_2 (fd, file, oflag)
++     int fd;
++     const char *file;
++     int oflag;
++{
++  if (oflag & O_CREAT)
++    __fortify_fail ("invalid openat call: O_CREAT without mode");
++
++  return __openat (fd, file, oflag);
++}
++
++strong_alias (__openat_2, __openat64_2)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/openat64.c
+@@ -0,0 +1,2 @@
++/* 'openat64' is the same as 'openat', because __off64_t == __off_t and
++   O_LARGEFILE == 0.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/paths.h
+@@ -0,0 +1,74 @@
++/*
++ * Copyright (c) 1989, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)paths.h	8.1 (Berkeley) 6/2/93
++ */
++
++#ifndef _PATHS_H_
++#define	_PATHS_H_
++
++/* Default search path. */
++#define	_PATH_DEFPATH	"/usr/bin:/bin"
++/* All standard utilities path. */
++#define	_PATH_STDPATH \
++	"/usr/bin:/bin:/usr/sbin:/sbin"
++
++#define	_PATH_BSHELL	"/bin/sh"
++#define	_PATH_CONSOLE	"/dev/console"
++#define	_PATH_CSHELL	"/bin/csh"
++#define	_PATH_DEVDB	"/var/run/dev.db"
++#define	_PATH_DEVNULL	"/dev/null"
++#define	_PATH_DRUM	"/dev/drum"
++#define	_PATH_KLOG	"/dev/klog"
++#define	_PATH_KMEM	"/dev/kmem"
++#define	_PATH_LASTLOG	"/var/log/lastlog"
++#define	_PATH_MAILDIR	"/var/mail"
++#define	_PATH_MAN	"/usr/share/man"
++#define	_PATH_MEM	"/dev/mem"
++#define	_PATH_MNTTAB	"/etc/fstab"
++#define	_PATH_MOUNTED	"/etc/mtab"
++#define	_PATH_NOLOGIN	"/etc/nologin"
++#define	_PATH_PRESERVE	"/var/lib"
++#define	_PATH_RWHODIR	"/var/spool/rwho"
++#define	_PATH_SENDMAIL	"/usr/sbin/sendmail"
++#define	_PATH_SHADOW	"/etc/shadow"
++#define	_PATH_SHELLS	"/etc/shells"
++#define	_PATH_TTY	"/dev/tty"
++#define	_PATH_UNIX	"/kernel"
++#define _PATH_UTMP	"/var/run/utmp"
++#define	_PATH_VI	"/usr/bin/vi"
++#define _PATH_WTMP	"/var/log/wtmp"
++
++/* Provide trailing slash, since mostly used for building pathnames. */
++#define	_PATH_DEV	"/dev/"
++#define	_PATH_TMP	"/tmp/"
++#define	_PATH_VARDB	"/var/lib/misc/"
++#define	_PATH_VARRUN	"/var/run/"
++#define	_PATH_VARTMP	"/var/tmp/"
++
++#endif /* !_PATHS_H_ */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/powerpc/bits/elf.h
+@@ -0,0 +1,39 @@
++/* This file defines standard ELF types, structures, and macros.
++   Copyright (C) 2011 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _BITS_ELF_H
++#define _BITS_ELF_H
++
++__BEGIN_DECLS
++
++#define	AT_DCACHEBSIZE	10	/* Data cache block size for the processor. */
++#define	AT_ICACHEBSIZE	11	/* Instruction cache block size for the uP. */
++#define	AT_UCACHEBSIZE	12	/* Cache block size, or `0' if cache not unified. */
++#define	AT_EXECPATH	13	/* Path to the executable. */
++#define	AT_CANARY	14	/* Canary for SSP */
++#define	AT_CANARYLEN	15	/* Length of the canary. */
++#define	AT_OSRELDATE	16	/* OSRELDATE. */
++#define	AT_NCPUS	17	/* Number of CPUs. */
++#define	AT_PAGESIZES	18	/* Pagesizes. */
++#define	AT_PAGESIZESLEN	19	/* Number of pagesizes. */
++#define	AT_STACKPROT	21	/* Initial stack protection. */
++
++__END_DECLS
++
++#endif	/* elf.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/pread.c
+@@ -0,0 +1,69 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <unistd.h>
++#include <sys/types.h>
++#include <sysdep.h>
++#include <sysdep-cancel.h>
++#include <errno.h>
++
++extern ssize_t __syscall_pread (int __fd, void *__buf, size_t __nbytes,
++				__off_t __offset) __THROW;
++libc_hidden_proto(__syscall_pread)
++extern ssize_t __syscall_freebsd6_pread (int __fd, void *__buf, size_t __nbytes,
++				int __unused1, __off_t __offset) __THROW;
++libc_hidden_proto(__syscall_freebsd6_pread)
++
++ssize_t
++__libc_pread (int fd, void *buf, size_t nbytes, __off_t offset)
++{
++  ssize_t result;
++
++  if (SINGLE_THREAD_P)
++    {
++
++      /* First try the new syscall. */
++      result = INLINE_SYSCALL (pread, 4, fd, buf, nbytes, offset);
++#ifndef __ASSUME_PREAD_PWRITE_SYSCALLS
++      if (result == -1 && errno == ENOSYS)
++	/* New syscall not available, us the old one. */
++	result = INLINE_SYSCALL (freebsd6_pread, 5, fd, buf, nbytes, 0, offset);
++#endif
++      return result;
++    }
++
++  int oldtype = LIBC_CANCEL_ASYNC ();
++  /* First try the new syscall. */
++  result = INLINE_SYSCALL (pread, 4, fd, buf, nbytes, offset);
++#ifndef __ASSUME_PREAD_PWRITE_SYSCALLS
++  if (result == -1 && errno == ENOSYS)
++    /* New syscall not available, us the old one. */
++    result = INLINE_SYSCALL (freebsd6_pread, 5, fd, buf, nbytes, 0, offset);
++#endif
++  LIBC_CANCEL_RESET (oldtype);
++  return result;
++}
++
++strong_alias (__libc_pread, __pread)
++weak_alias (__pread, pread)
++
++/* 'pread64' is the same as 'pread', because __off64_t == __off_t.  */
++strong_alias (__libc_pread, __libc_pread64)
++weak_alias (__libc_pread64, __pread64)
++weak_alias (__libc_pread64, pread64)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/pread64.c
+@@ -0,0 +1 @@
++/* 'pread64' is the same as 'pread', because __off64_t == __off_t.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/preadv64.c
+@@ -0,0 +1 @@
++/* 'preadv64' is the same as 'preadv', because __off64_t == __off_t.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/prof-freq.c
+@@ -0,0 +1,47 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <libc-internal.h>
++#include <stddef.h>
++#include <sys/sysctl.h>
++
++struct clockinfo
++{
++  int hz;		/* Clock frequency.  */
++  int tick;		/* Microseconds per hz tick, = 1000000 / hz.  */
++  int tickadj;		/* Clock skew rate for adjtime().  */
++  int stathz;		/* Statistics clock frequency.  */
++  int profhz;		/* Profiling clock frequency.  */
++};
++
++int
++__profile_frequency (void)
++{
++  /* Fetch the "kern.clockrate" sysctl value.  */
++  int request[2] = { CTL_KERN, KERN_CLOCKRATE };
++  struct clockinfo result;
++  size_t result_len = sizeof (result);
++
++  if (__sysctl (request, 2, &result, &result_len, NULL, 0) < 0)
++    /* Dummy result.  */
++    return 1;
++
++  /* Yes, hz, not profhz.  On i386, the value is 100, not 1024.  */
++  return result.hz;
++}
++libc_hidden_def (__profile_frequency)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/pselect.c
+@@ -0,0 +1,72 @@
++/* Copyright (C) 2006, 2007, 2010 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <signal.h>
++#include <time.h>
++#include <sys/poll.h>
++#include <kernel-features.h>
++#include <sysdep-cancel.h>
++
++
++#ifndef __ASSUME_PSELECT
++static int __generic_pselect (int nfds, fd_set *readfds, fd_set *writefds,
++			      fd_set *exceptfds,
++			      const struct timespec *timeout,
++			      const sigset_t *sigmask);
++#endif
++
++extern int __syscall_pselect (int nfds, fd_set *readfds, fd_set *writefds,
++			      fd_set *exceptfds,
++			      const struct timespec *timeout,
++			      const sigset_t *sigmask) __THROW;
++
++int 
++__pselect (int nfds, fd_set *readfds, fd_set *writefds,
++			      fd_set *exceptfds,
++			      const struct timespec *timeout,
++			      const sigset_t *sigmask)
++{
++  int result;
++
++  if (SINGLE_THREAD_P)
++    result = INLINE_SYSCALL (pselect, 6, nfds, readfds, writefds, exceptfds, 
++			     timeout, sigmask);
++  else
++    {
++      int oldtype = LIBC_CANCEL_ASYNC ();
++      result = INLINE_SYSCALL (pselect, 6, nfds, readfds, writefds, exceptfds, 
++  			       timeout, sigmask);
++      LIBC_CANCEL_RESET (oldtype);
++    }
++
++#ifndef __ASSUME_PSELECT
++  if (result == -1 && errno == ENOSYS)
++    return __generic_pselect (nfds, readfds, writefds, exceptfds,
++                                timeout, sigmask);
++#endif
++
++  return result;
++}
++weak_alias (__pselect, pselect)
++strong_alias (__pselect, __libc_pselect)
++
++#ifndef __ASSUME_PSELECT
++# define __pselect static __generic_pselect
++# include <misc/pselect.c>
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ptsname.c
+@@ -0,0 +1,111 @@
++/* Copyright (C) 1998, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <paths.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sys/stat.h>
++#include <sys/sysmacros.h>
++#include <sys/sysctl.h>
++#include <unistd.h>
++
++
++/* Static buffer for `ptsname'.  */
++static char buffer[sizeof (_PATH_TTY) + 2];
++
++
++/* Return the pathname of the pseudo terminal slave associated with
++   the master FD is open on, or NULL on errors.
++   The returned storage is good until the next call to this function.  */
++char *
++ptsname (int fd)
++{
++  return __ptsname_r (fd, buffer, sizeof (buffer)) != 0 ? NULL : buffer;
++}
++
++/* The are declared in getpt.c.  */
++extern const char __libc_ptyname1[] attribute_hidden;
++extern const char __libc_ptyname2[] attribute_hidden;
++
++
++int
++__ptsname_internal (int fd, char *buf, size_t buflen, struct stat64 *stp)
++{
++  int saved_errno = errno;
++  char *p;
++
++  if (buf == NULL)
++    {
++      __set_errno (EINVAL);
++      return EINVAL;
++    }
++
++  /* Don't call isatty (fd) - it usually fails with errno = EAGAIN.  */
++
++  if (__fxstat64 (_STAT_VER, fd, stp) < 0)
++    return errno;
++
++  /* Check if FD really is a master pseudo terminal.  */
++  if (!(S_ISCHR (stp->st_mode)))
++    {
++      __set_errno (ENOTTY);
++      return ENOTTY;
++    }
++
++  if (buflen < sizeof (_PATH_TTY) + 2)
++    {
++      __set_errno (ERANGE);
++      return ERANGE;
++    }
++
++  /* Construct the slave's pathname.  */
++  /* instead of strlen(_PATH_DEV) we use (sizeof (_PATH_DEV) - 1)  */
++  p = __mempcpy (buf, _PATH_DEV, sizeof (_PATH_DEV) - 1);
++  buflen -= (sizeof (_PATH_DEV) - 1);
++  if(__sysctlbyname("kern.devname", p, &buflen, &stp->st_rdev, sizeof (stp->st_rdev)) < 0)
++    return errno;
++  p[0] = 't';
++
++  if (__xstat64 (_STAT_VER, buf, stp) < 0)
++    return errno;
++
++  /* Check if the pathname we're about to return might be
++     slave pseudo terminal of the given master pseudo terminal.  */
++  if (!(S_ISCHR (stp->st_mode)))
++    {
++      /* This really is a configuration problem.  */
++      __set_errno (ENOTTY);
++      return ENOTTY;
++    }
++
++  __set_errno (saved_errno);
++  return 0;
++}
++
++
++/* Store at most BUFLEN characters of the pathname of the slave pseudo
++   terminal associated with the master FD is open on in BUF.
++   Return 0 on success, otherwise an error number.  */
++int
++__ptsname_r (int fd, char *buf, size_t buflen)
++{
++  struct stat64 st;
++  return __ptsname_internal (fd, buf, buflen, &st);
++}
++weak_alias (__ptsname_r, ptsname_r)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/pwrite.c
+@@ -0,0 +1,68 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <unistd.h>
++#include <sys/types.h>
++#include <sysdep.h>
++#include <sysdep-cancel.h>
++#include <errno.h>
++
++extern ssize_t __syscall_pwrite (int __fd, const void *__buf, size_t __nbytes,
++				 __off_t __offset) __THROW;
++libc_hidden_proto(__syscall_pwrite)
++extern ssize_t __syscall_freebsd6_pwrite (int __fd, const void *__buf, size_t __nbytes,
++				 int __unused1, __off_t __offset) __THROW;
++libc_hidden_proto(__syscall_freebsd6_pwrite)
++
++ssize_t
++__libc_pwrite (int fd, const void *buf, size_t nbytes, __off_t offset)
++{
++  ssize_t result;
++
++  if (SINGLE_THREAD_P)
++    {
++      /* First try the new syscall. */
++      result = INLINE_SYSCALL (pwrite, 4, fd, buf, nbytes, offset);
++#ifndef __ASSUME_PREAD_PWRITE_SYSCALLS
++      if (result == -1 && errno == ENOSYS)
++        /* New syscall not available, us the old one. */
++        result = INLINE_SYSCALL (freebsd6_pwrite, 5, fd, buf, nbytes, 0, offset);
++#endif
++      return result;
++    }
++
++  int oldtype = LIBC_CANCEL_ASYNC ();
++  /* First try the new syscall. */
++  result = INLINE_SYSCALL (pwrite, 4, fd, buf, nbytes, offset);
++#ifndef __ASSUME_PREAD_PWRITE_SYSCALLS
++  if (result == -1 && errno == ENOSYS)
++    /* New syscall not available, us the old one. */
++    result = INLINE_SYSCALL (freebsd6_pwrite, 5, fd, buf, nbytes, 0, offset);
++#endif
++  LIBC_CANCEL_RESET (oldtype);
++  return result;
++}
++
++strong_alias (__libc_pwrite, __pwrite)
++weak_alias (__pwrite, pwrite)
++
++/* 'pwrite64' is the same as 'pwrite', because __off64_t == __off_t.  */
++strong_alias (__libc_pwrite, __libc_pwrite64)
++weak_alias (__libc_pwrite64, __pwrite64)
++weak_alias (__libc_pwrite64, pwrite64)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/pwrite64.c
+@@ -0,0 +1 @@
++/* 'pwrite64' is the same as 'pwrite', because __off64_t == __off_t.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/pwritev64.c
+@@ -0,0 +1 @@
++/* 'pwritev64' is the same as 'pwritev', because __off64_t == __off_t.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/readdir.c
+@@ -0,0 +1,11 @@
++/* 'readdir64' is the same as 'readdir', because
++   struct dirent64 == struct dirent.  */
++
++#define readdir64 __no_readdir64_decl
++#define __readdir64 __no___readdir64_decl
++#include <sysdeps/unix/readdir.c>
++#undef __readdir64
++#undef readdir64
++
++strong_alias (__readdir, __readdir64)
++weak_alias (__readdir64, readdir64)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/readdir64.c
+@@ -0,0 +1,2 @@
++/* 'readdir64' is the same as 'readdir', because
++   struct dirent64 == struct dirent.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/readdir64_r.c
+@@ -0,0 +1,2 @@
++/* 'readdir64_r' is the same as 'readdir_r', because
++   struct dirent64 == struct dirent.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/readdir_r.c
+@@ -0,0 +1,11 @@
++/* 'readdir64_r' is the same as 'readdir_r', because
++   struct dirent64 == struct dirent.  */
++
++#define readdir64_r __no_readdir64_r_decl
++#define __readdir64_r __no___readdir64_r_decl
++#include <sysdeps/unix/readdir_r.c>
++#undef __readdir64_r
++#undef readdir64_r
++
++strong_alias (__readdir_r, __readdir64_r)
++weak_alias (__readdir64_r, readdir64_r)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/readlinkat.c
+@@ -0,0 +1,130 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stddef.h>
++#include <stdio.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sysdep.h>
++#include <unistd.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <kernel-features.h>
++
++extern int __syscall_readlinkat (int fd, const char *path, char *buf, 
++				 size_t bufsize);
++libc_hidden_proto (__syscall_readlinkat)
++
++/* Read the contents of the symbolic link PATH relative to FD into no
++   more than LEN bytes of BUF.  */
++ssize_t
++readlinkat (fd, path, buf, len)
++     int fd;
++     const char *path;
++     char *buf;
++     size_t len;
++{
++# ifndef __ASSUME_ATFCTS
++  if (__have_atfcts >= 0)
++# endif
++    {
++      int result = INLINE_SYSCALL (readlinkat, 4, fd, path, buf, len);
++# ifndef __ASSUME_ATFCTS
++      if (result == -1 && errno == ENOSYS)
++	__have_atfcts = -1;
++      else
++# endif
++	return result;
++    }
++
++#ifndef __ASSUME_ATFCTS
++  if (fd != AT_FDCWD && path[0] != '/')
++    {
++      int mib[4];
++      size_t kf_len = 0;
++      char *kf_buf, *kf_bufp;
++      size_t pathlen;
++
++      if (fd < 0)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++
++      pathlen = strlen (path);
++      if (__builtin_expect (pathlen == 0, 0))
++	{
++	  __set_errno (ENOENT);
++	  return -1;
++	}
++
++      mib[0] = CTL_KERN;
++      mib[1] = KERN_PROC;
++      mib[2] = KERN_PROC_FILEDESC;
++      mib[3] = __getpid ();
++
++      if (__sysctl (mib, 4, NULL, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_buf = alloca (kf_len + pathlen);
++      if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_bufp = kf_buf;
++      while (kf_bufp < kf_buf + kf_len)
++	{
++	  struct kinfo_file *kf = (struct kinfo_file *) (uintptr_t) kf_bufp;
++
++	  if (kf->kf_fd == fd)
++	    {
++	      if (kf->kf_type != KF_TYPE_VNODE ||
++		  kf->kf_vnode_type != KF_VTYPE_VDIR)
++		{
++		  __set_errno (ENOTDIR);
++		  return -1;
++		}
++
++	      strcat (kf->kf_path, "/");
++	      strcat (kf->kf_path, path);
++	      path = kf->kf_path;
++	      break;
++	    }
++	  kf_bufp += kf->kf_structsize;
++	}
++
++      if (kf_bufp >= kf_buf + kf_len)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++    }
++
++  return __readlink (path, buf, len);
++#endif
++}
++
++libc_hidden_def (readlinkat)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/readonly-area.c
+@@ -0,0 +1,96 @@
++/* Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <stdint.h>
++#include <stdio.h>
++#include <stdio_ext.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include "libio/libioP.h"
++
++/* Return 1 if the whole area PTR .. PTR+SIZE is not writable.
++   Return -1 if it is writable.  */
++
++int
++__readonly_area (const char *ptr, size_t size)
++{
++  const void *ptr_end = ptr + size;
++
++  int mib[4];
++  size_t kve_len = 0;
++  char *kve_buf, *kve_bufp;
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC;
++  mib[2] = KERN_PROC_VMMAP;
++  mib[3] = __getpid ();
++
++  if (__sysctl (mib, 4, NULL, &kve_len, NULL, 0) != 0)
++    {
++      __set_errno (ENOSYS);
++      return 1;
++    }
++
++  kve_buf = alloca (kve_len);
++  if (__sysctl (mib, 4, kve_buf, &kve_len, NULL, 0) != 0)
++    {
++      __set_errno (ENOSYS);
++      return 1;
++    }
++
++  kve_bufp = kve_buf;
++  while (kve_bufp < kve_buf + kve_len)
++    {
++      struct kinfo_vmentry *kve = (struct kinfo_vmentry *) (uintptr_t) kve_bufp;
++      kve_bufp += kve->kve_structsize;
++
++      uintptr_t from = kve->kve_start;
++      uintptr_t to = kve->kve_end;
++
++      if (from < (uintptr_t) ptr_end && to > (uintptr_t) ptr)
++	{
++	  /* Found an entry that at least partially covers the area.  */
++	  if (!(kve->kve_protection & KVME_PROT_READ)
++	      || (kve->kve_protection & KVME_PROT_WRITE))
++	    break;
++
++	  if (from <= (uintptr_t) ptr && to >= (uintptr_t) ptr_end)
++	    {
++	      size = 0;
++	      break;
++	    }
++	  else if (from <= (uintptr_t) ptr)
++	    size -= to - (uintptr_t) ptr;
++	  else if (to >= (uintptr_t) ptr_end)
++	    size -= (uintptr_t) ptr_end - from;
++	  else
++	    size -= to - from;
++
++	  if (!size)
++	    break;
++	}
++    }
++
++  /* If the whole area between ptr and ptr_end is covered by read-only
++     VMAs, return 1.  Otherwise return -1.  */
++  return size == 0 ? 1 : -1;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/readv.c
+@@ -0,0 +1,57 @@
++/* readv for FreeBSD.
++   Copyright (C) 1997-1998, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <stddef.h>
++#include <sys/param.h>
++#include <sys/uio.h>
++
++#include <sysdep.h>
++#include <sys/syscall.h>
++#include <bp-checks.h>
++#include <sysdep-cancel.h>
++
++extern ssize_t __syscall_readv (int, __const struct iovec *__unbounded, int);
++libc_hidden_proto(__syscall_readv)
++
++static ssize_t __atomic_readv_replacement (int, __const struct iovec *,
++					   int) internal_function;
++
++ssize_t
++__libc_readv (int fd, const struct iovec *vector, int count)
++{
++  if (count <= UIO_MAXIOV)
++  {
++    if (SINGLE_THREAD_P)
++      return INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count);
++
++    int oldtype = LIBC_CANCEL_ASYNC ();
++    ssize_t result = INLINE_SYSCALL (readv, 3, fd, CHECK_N (vector, count), count);
++    LIBC_CANCEL_RESET (oldtype);
++    return result;
++
++  }
++  else
++    return __atomic_readv_replacement (fd, vector, count);
++}
++strong_alias (__libc_readv, __readv)
++weak_alias (__libc_readv, readv)
++
++#define __libc_readv static internal_function __atomic_readv_replacement
++#include <sysdeps/posix/readv.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/recv.c
+@@ -0,0 +1,41 @@
++/* Copyright (C) 2001-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/socket.h>
++#include <sysdep.h>
++#include <sysdep-cancel.h>
++
++/* The real syscall's name.  See sysdeps/unix/inet/syscalls.list.  */
++#define __syscall_recvfrom __libc_recvfrom
++ssize_t __libc_recvfrom(int s, void *buf, size_t len, int flags,
++                        struct sockaddr *from, socklen_t *fromlen);
++libc_hidden_proto (__libc_recvfrom)
++
++/* Read N bytes into BUF from socket FD.
++   Return the number of bytes read or -1 for error.  */
++
++ssize_t
++__libc_recv (int fd, void *buf, size_t n, int flags)
++{
++  return INLINE_SYSCALL (recvfrom, 6, fd, buf, n, flags, NULL, NULL);
++}
++
++weak_alias (__libc_recv, __recv)
++weak_alias (__libc_recv, recv)
++
++LIBC_CANCEL_HANDLED (); /* in __libc_recvfrom */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/remove.c
+@@ -0,0 +1,40 @@
++/* ANSI C `remove' function to delete a file or directory.  POSIX.1 version.
++   Copyright (C) 1995,96,97,2002,2003 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <stdio.h>
++#include <unistd.h>
++
++int
++remove (file)
++     const char *file;
++{
++  /* First try to unlink since this is more frequently the necessary action. */
++  if (__unlink (file) != 0
++      /* If it is indeed a directory...  */
++      /* Linux returns EISDIR, POSIX mandates EPERM */
++      && (((errno != EISDIR) && (errno != EPERM))
++	  /* ...try to remove it.  */
++	  || __rmdir (file) != 0))
++    /* Cannot remove the object for whatever reason.  */
++    return -1;
++
++  return 0;
++}
++libc_hidden_def (remove)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/renameat.c
+@@ -0,0 +1,174 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stddef.h>
++#include <stdio.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sysdep.h>
++#include <stdio.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <kernel-features.h>
++
++libc_hidden_proto (rename)
++
++extern int __syscall_renameat (int oldfd, const char *old, int newfd,
++			       const char *new);
++libc_hidden_proto (__syscall_renameat)
++
++/* Rename the file OLD relative to OLDFD to NEW relative to NEWFD.  */
++int renameat (oldfd, old, newfd, new)
++     int oldfd;
++     const char *old;
++     int newfd;
++     const char *new;
++{
++# ifndef __ASSUME_ATFCTS
++  if (__have_atfcts >= 0)
++# endif
++    {
++      int result = INLINE_SYSCALL (renameat, 4, oldfd, old, newfd, new);
++# ifndef __ASSUME_ATFCTS
++      if (result == -1 && errno == ENOSYS)
++	__have_atfcts = -1;
++      else
++# endif
++	return result;
++    }
++
++#ifndef __ASSUME_ATFCTS
++  if ((oldfd != AT_FDCWD && old[0] != '/')
++      || (newfd != AT_FDCWD && new[0] != '/'))
++    {
++      int mib[4];
++      size_t kf_len = 0;
++      char *kf_buf, *kf_bufp;
++      size_t old_filelen, new_filelen;
++
++      if ((oldfd < 0) || (newfd < 0))
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++
++      old_filelen = strlen (old);
++      new_filelen = strlen (new);
++      if (__builtin_expect (old_filelen == 0, 0)
++	  || __builtin_expect (new_filelen == 0, 0))
++	{
++	  __set_errno (ENOENT);
++	  return -1;
++	}
++
++      mib[0] = CTL_KERN;
++      mib[1] = KERN_PROC;
++      mib[2] = KERN_PROC_FILEDESC;
++      mib[3] = __getpid ();
++
++      if (__sysctl (mib, 4, NULL, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_buf = alloca (kf_len);
++      if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      if (oldfd != AT_FDCWD && old[0] != '/')
++	{
++	  kf_bufp = kf_buf;
++	  while (kf_bufp < kf_buf + kf_len)
++	    {
++	      struct kinfo_file *kf =
++		(struct kinfo_file *) (uintptr_t) kf_bufp;
++
++	      if (kf->kf_fd == oldfd)
++		{
++		  char *buf;
++		  if (kf->kf_type != KF_TYPE_VNODE ||
++		      kf->kf_vnode_type != KF_VTYPE_VDIR)
++		    {
++		      __set_errno (ENOTDIR);
++		      return -1;
++		    }
++
++		  buf = alloca (strlen (kf->kf_path) + old_filelen + 2);
++		  strcpy(buf, kf->kf_path);
++		  strcat (buf, "/");
++		  strcat (buf, old);
++		  old = buf;
++		  break;
++		}
++	      kf_bufp += kf->kf_structsize;
++	    }
++
++	  if (kf_bufp >= kf_buf + kf_len)
++	    {
++	      __set_errno (EBADF);
++	      return -1;
++	    }
++	}
++
++      if (newfd != AT_FDCWD && new[0] != '/')
++	{
++	  kf_bufp = kf_buf;
++	  while (kf_bufp < kf_buf + kf_len)
++	    {
++	      struct kinfo_file *kf =
++		(struct kinfo_file *) (uintptr_t) kf_bufp;
++
++	      if (kf->kf_fd == newfd)
++		{
++		  char *buf;
++		  if (kf->kf_type != KF_TYPE_VNODE ||
++		      kf->kf_vnode_type != KF_VTYPE_VDIR)
++		    {
++		      __set_errno (ENOTDIR);
++		      return -1;
++		    }
++
++		  buf = alloca (strlen (kf->kf_path) + new_filelen + 2);
++		  strcpy(buf, kf->kf_path);
++		  strcat (buf, "/");
++		  strcat (buf, new);
++		  new = buf;
++		  break;
++		}
++	      kf_bufp += kf->kf_structsize;
++	    }
++
++	  if (kf_bufp >= kf_buf + kf_len)
++	    {
++	      __set_errno (EBADF);
++	      return -1;
++	    }
++	}
++    }
++
++#define __rename rename /* there is no __rename */
++  return __rename (old, new);
++#endif
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/rtld-lowlevel.h
+@@ -0,0 +1,131 @@
++/* Definitions for lowlevel handling in ld.so, FreeBSD variant
++   Copyright (C) 2006-2007 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _RTLD_LOWLEVEL_H
++#define  _RTLD_LOWLEVEL_H 1
++
++#include <atomic.h>
++#include <lowlevellock.h>
++
++/* Special multi-reader lock used in ld.so.  */
++#define __RTLD_MRLOCK_WRITER 1
++#define __RTLD_MRLOCK_RWAIT 2
++#define __RTLD_MRLOCK_WWAIT 4
++#define __RTLD_MRLOCK_RBITS \
++  ~(__RTLD_MRLOCK_WRITER | __RTLD_MRLOCK_RWAIT | __RTLD_MRLOCK_WWAIT)
++#define __RTLD_MRLOCK_INC 8
++#define __RTLD_MRLOCK_TRIES 5
++
++#define __rtld_mrlock_define(CLASS,NAME) \
++  CLASS __rtld_mrlock_t NAME;
++
++
++#define _RTLD_MRLOCK_INITIALIZER 0
++#define __rtld_mrlock_initialize(NAME) \
++  (void) ((NAME).lv = 0)
++
++
++#define __rtld_mrlock_lock(lock) \
++  do {									      \
++    __label__ out;							      \
++    while (1)								      \
++      {									      \
++	int oldval;							      \
++	for (int tries = 0; tries < __RTLD_MRLOCK_TRIES; ++tries)	      \
++	  {								      \
++	    oldval = (lock).iv;						      \
++	    while (__builtin_expect ((oldval				      \
++				      & (__RTLD_MRLOCK_WRITER		      \
++					 | __RTLD_MRLOCK_WWAIT))	      \
++				     == 0, 1))				      \
++	      {								      \
++		int newval = ((oldval & __RTLD_MRLOCK_RBITS)		      \
++			      + __RTLD_MRLOCK_INC);			      \
++		int ret = atomic_compare_and_exchange_val_acq (&(lock.iv),	      \
++							       newval,	      \
++							       oldval);	      \
++		if (__builtin_expect (ret == oldval, 1))		      \
++		  goto out;						      \
++		oldval = ret;						      \
++	      }								      \
++	    atomic_delay ();						      \
++	  }								      \
++	if ((oldval & __RTLD_MRLOCK_RWAIT) == 0)			      \
++	  {								      \
++	    atomic_or (&(lock.iv), __RTLD_MRLOCK_RWAIT);			      \
++	    oldval |= __RTLD_MRLOCK_RWAIT;				      \
++	  }								      \
++	lll_futex_wait (&(lock), oldval);					      \
++      }									      \
++  out:;									      \
++  } while (0)
++
++
++#define __rtld_mrlock_unlock(lock) \
++  do {									      \
++    int oldval = atomic_exchange_and_add (&(lock.iv), -__RTLD_MRLOCK_INC);	      \
++    if (__builtin_expect ((oldval					      \
++			   & (__RTLD_MRLOCK_RBITS | __RTLD_MRLOCK_WWAIT))     \
++			  == (__RTLD_MRLOCK_INC | __RTLD_MRLOCK_WWAIT), 0))   \
++      /* We have to wake all threads since there might be some queued	      \
++	 readers already.  */						      \
++      lll_futex_wake (&(lock), 0x7fffffff);				      \
++  } while (0)
++
++
++/* There can only ever be one thread trying to get the exclusive lock.  */
++#define __rtld_mrlock_change(lock) \
++  do {									      \
++    __label__ out;							      \
++    while (1)								      \
++      {									      \
++	int oldval;							      \
++	for (int tries = 0; tries < __RTLD_MRLOCK_TRIES; ++tries)	      \
++	  {								      \
++	    oldval = lock.iv;						      \
++	    while (__builtin_expect ((oldval & __RTLD_MRLOCK_RBITS) == 0, 1)) \
++	      {								      \
++		int newval = ((oldval & __RTLD_MRLOCK_RWAIT)		      \
++			      + __RTLD_MRLOCK_WRITER);			      \
++		int ret = atomic_compare_and_exchange_val_acq (&(lock.iv),	      \
++							       newval,	      \
++							       oldval);	      \
++		if (__builtin_expect (ret == oldval, 1))		      \
++		  goto out;						      \
++		oldval = ret;						      \
++	      }								      \
++	    atomic_delay ();						      \
++	  }								      \
++	atomic_or (&(lock.iv), __RTLD_MRLOCK_WWAIT);			      \
++	oldval |= __RTLD_MRLOCK_WWAIT;					      \
++	lll_futex_wait (&(lock), oldval);					      \
++      }									      \
++  out:;									      \
++  } while (0)
++
++
++#define __rtld_mrlock_done(lock) \
++  do {				 \
++    int oldval = atomic_exchange_and_add (&(lock.iv), -__RTLD_MRLOCK_WRITER);    \
++    if (__builtin_expect ((oldval & __RTLD_MRLOCK_RWAIT) != 0, 0))	      \
++      lll_futex_wake (&(lock), 0x7fffffff);				      \
++  } while (0)
++
++
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sa_len.c
+@@ -0,0 +1,44 @@
++/* Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/socket.h>
++
++#include <netatalk/at.h>
++#include <netinet/in.h>
++#include <netipx/ipx.h>
++#include <sys/un.h>
++
++int
++__libc_sa_len (sa_family_t af)
++{
++  switch (af)
++    {
++    case AF_APPLETALK:
++      return sizeof (struct sockaddr_at);
++    case AF_INET:
++      return sizeof (struct sockaddr_in);
++    case AF_INET6:
++      return sizeof (struct sockaddr_in6);
++    case AF_IPX:
++      return sizeof (struct sockaddr_ipx);
++    case AF_LOCAL:
++      return __SOCKADDR_COMMON_SIZE + sizeof(((struct sockaddr_un *) 0)->sun_path);
++    }
++  return 0;
++}
++INTDEF(__libc_sa_len)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sbrk.c
+@@ -0,0 +1 @@
++#include <misc/sbrk.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sched_getaffinity.c
+@@ -0,0 +1,64 @@
++/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <sched.h>
++#include <string.h>
++#include <sysdep.h>
++#include <unistd.h>
++#include <sys/types.h>
++
++/* From <sys/cpuset.h> */
++#define CPU_LEVEL_WHICH         3       /* Actual mask/id for which. */
++#define CPU_WHICH_PID           2       /* Specifies a process id. */
++
++extern int __syscall_cpuset_getaffinity(int level, int which, int64_t id,
++					size_t setsize, cpu_set_t *mask);
++libc_hidden_proto(__syscall_cpuset_getaffinity)
++
++int
++__libc_sched_getaffinity (pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
++{
++  int res;
++
++  if (pid == 0)
++    {
++      pid = __getpid();
++    }
++
++  if (cpusetsize > sizeof(cpu_set_t))
++    {
++      /* Clean the rest of the memory the kernel won't do.  */
++      memset ((char *) cpuset + sizeof(cpu_set_t), '\0', cpusetsize - sizeof(cpu_set_t));
++
++      cpusetsize = sizeof(cpu_set_t);
++    }
++
++  res = INLINE_SYSCALL (cpuset_getaffinity, 5, CPU_LEVEL_WHICH,
++			CPU_WHICH_PID, pid, cpusetsize, cpuset);
++
++  if (errno == ERANGE)
++    {
++      __set_errno(EINVAL);
++    }
++
++  return res;
++}
++
++strong_alias (__libc_sched_getaffinity, __sched_getaffinity)
++weak_alias (__sched_getaffinity, sched_getaffinity)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sched_getp.c
+@@ -0,0 +1,45 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sched.h>
++#include <sys/types.h>
++#include <errno.h>
++#include <sys/rtprio.h>
++
++/* Retrieve scheduling parameters for a particular process.  */
++int
++__sched_getparam (pid_t pid, struct sched_param *param)
++{
++  /* kFreeBSD return bogus values for SYS_sched_param (see PR kern/76485);
++     fortunately the same information can be retrieved through the rtprio()
++     system call.  */
++  struct rtprio rtp;
++
++  if (__rtprio (RTP_LOOKUP, pid, &rtp) >= 0)
++    {
++      if (RTP_PRIO_IS_REALTIME (rtp.type))
++        param->sched_priority = RTP_PRIO_MAX - rtp.prio;
++      else
++        param->sched_priority = 0;
++    }
++
++  return 0;
++}
++
++weak_alias (__sched_getparam, sched_getparam)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sched_setaffinity.c
+@@ -0,0 +1,57 @@
++/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <sched.h>
++#include <string.h>
++#include <sysdep.h>
++#include <unistd.h>
++#include <sys/types.h>
++
++/* From <sys/cpuset.h> */
++#define CPU_LEVEL_WHICH         3       /* Actual mask/id for which. */
++#define CPU_WHICH_PID           2       /* Specifies a process id. */
++
++extern int __syscall_cpuset_setaffinity(int level, int which, int64_t id,
++					size_t setsize, const cpu_set_t *mask);
++libc_hidden_proto(__syscall_cpuset_setaffinity)
++
++int
++__libc_sched_setaffinity (pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset)
++{
++  int res;
++
++  if (pid == 0)
++    {
++      pid = __getpid();
++    }
++
++
++  res = INLINE_SYSCALL (cpuset_setaffinity, 5, CPU_LEVEL_WHICH,
++			CPU_WHICH_PID, pid, cpusetsize, cpuset);
++
++  if (errno == ERANGE || errno == EDEADLK)
++    {
++      __set_errno(EINVAL);
++    }
++
++  return res;
++}
++
++strong_alias (__libc_sched_setaffinity, __sched_setaffinity)
++weak_alias (__sched_setaffinity, sched_setaffinity)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/seekdir.c
+@@ -0,0 +1,2 @@
++/* Avoid <sysdeps/unix/bsd/telldir.c>, which doesn't pass the testsuite.  */
++#include <sysdeps/unix/seekdir.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/semctl.c
+@@ -0,0 +1,89 @@
++/* Copyright (C) 2004, 2010 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Robert Millan
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/*-
++ * Copyright (c) 2002 Doug Rabson
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ */
++
++#include <sysdep.h>
++#include <sys/sem.h>
++#include <stdarg.h> /* va_list */
++#include <stdlib.h> /* NULL */
++#include <unistd.h>
++
++/* union semun from FreeBSD <sys/sem.h> */
++/*
++ * semctl's arg parameter structure
++ */
++union semun
++{
++  int val;			/* value for SETVAL */
++  struct semid_ds *buf;		/* buffer for IPC_STAT & IPC_SET */
++  unsigned short *array;	/* array for GETALL & SETALL */
++};
++
++extern int __syscall_semctl (int semid, int semnum,
++                             int cmd, union semun *arg);
++libc_hidden_proto (__syscall_semctl)
++
++int
++semctl (int semid, int semnum, int cmd, ...)
++{
++  va_list ap;
++  union semun semun;
++  union semun *semun_ptr;
++
++  va_start (ap, cmd);
++  if (cmd == IPC_SET || cmd == IPC_STAT || cmd == GETALL
++      || cmd == SETVAL || cmd == SETALL)
++    {
++      semun = va_arg (ap, union semun);
++      semun_ptr = &semun;
++    }
++  else
++    {
++      semun_ptr = NULL;
++    }
++  va_end (ap);
++
++  return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd, semun_ptr);
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/send.c
+@@ -0,0 +1,47 @@
++/* Copyright (C) 2001-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/socket.h>
++#include <sysdep.h>
++#include <sysdep-cancel.h>
++
++extern ssize_t __syscall_sendto (int fd, __const __ptr_t buf,
++		                 size_t n, int flags,
++				 __CONST_SOCKADDR_ARG addr,
++				 socklen_t addrlen);
++libc_hidden_proto (__syscall_sendto)
++
++/* Send N bytes of BUF to socket FD.
++   Return the number of bytes sent or -1.  */
++
++ssize_t
++__libc_send (int fd, const void *buf, size_t n, int flags)
++{
++  if (SINGLE_THREAD_P)
++    return INLINE_SYSCALL (sendto, 6, fd, buf, n, flags, NULL, 0);
++
++  int oldtype = LIBC_CANCEL_ASYNC ();
++  int result = INLINE_SYSCALL (sendto, 6, fd, buf, n, flags, NULL, 0);
++  LIBC_CANCEL_RESET (oldtype);
++  return result;
++}
++
++weak_alias (__libc_send, __send)
++libc_hidden_weak (__send)
++
++weak_alias (__send, send)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sendto.c
+@@ -0,0 +1,73 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Aurelien Jarno <aurelien@aurel32.net>, 2005.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/socket.h>
++#include <sysdep.h>
++#include <sysdep-cancel.h>
++
++/* According to POSIX.1-2004 the len argument specifies the length of
++   the sockaddr structure pointed to by the addrarg argument. However
++   the FreeBSD kernel waits the actual length of the address stored
++   there. The code below emulate this behaviour.  */
++
++extern int __libc_sa_len (sa_family_t __af);
++extern int __libc_sa_len_internal (sa_family_t __af);
++
++extern ssize_t __syscall_sendto (int fd, __const void * buf,
++		                 size_t n, int flags,
++				 __CONST_SOCKADDR_ARG addr,
++				 socklen_t addrlen);
++libc_hidden_proto (__syscall_sendto)
++
++/* Send N bytes of BUF on socket FD to peer at address ADDR (which is
++ *    ADDR_LEN bytes long).  Returns the number sent, or -1 for errors.  */
++
++
++ssize_t
++__libc_sendto (int fd, __const void * buf, size_t n, int flags,
++	       __CONST_SOCKADDR_ARG addr, socklen_t addrlen)
++{
++  socklen_t new_addrlen;
++
++  if (addr.__sockaddr__)
++  {
++#ifndef NOT_IN_libc
++  new_addrlen = INTUSE(__libc_sa_len) ((addr.__sockaddr__)->sa_family);
++#else
++  new_addrlen = __libc_sa_len ((addr.__sockaddr__)->sa_family);
++#endif
++
++  /* Only allow a smaller size, otherwise it could lead to
++    stack corruption */
++  if ((new_addrlen != 0) && (new_addrlen < addrlen))
++    addrlen = new_addrlen;
++  }
++
++  /* We pass 6 arguments.  */
++  if (SINGLE_THREAD_P)
++    return INLINE_SYSCALL (sendto, 6, fd, buf, n, flags, addr.__sockaddr__, addrlen);
++
++  int oldtype = LIBC_CANCEL_ASYNC ();
++  int result = INLINE_SYSCALL (sendto, 6, fd, buf, n, flags, addr.__sockaddr__, addrlen);
++  LIBC_CANCEL_RESET (oldtype);
++  return result;
++}
++
++weak_alias (__libc_sendto, __sendto)
++weak_alias (__libc_sendto, sendto)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/setdomain.c
+@@ -0,0 +1,37 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <unistd.h>
++#include <sys/sysctl.h>
++
++/* Set the name of the current domain to NAME, which is LEN bytes long
++   (excluding a possible trailing NUL byte).  This call is restricted to
++   the super-user.  */
++
++int
++setdomainname (const char *name, size_t len)
++{
++  /* Set the "kern.domainname" sysctl value.  */
++  int request[2] = { CTL_KERN, KERN_NISDOMAINNAME };
++
++  if (__sysctl (request, 2, NULL, NULL, (void *) name, len) < 0)
++    return -1;
++
++  return 0;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sethostid.c
+@@ -0,0 +1,37 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <unistd.h>
++#include <sys/sysctl.h>
++
++/* Set the current machine's Internet number to ID.
++   This call is restricted to the super-user.  */
++
++int
++sethostid (long int id)
++{
++  /* Set the "kern.hostid" sysctl value.  */
++  int value = id;
++  int request[2] = { CTL_KERN, KERN_HOSTID };
++
++  if (__sysctl (request, 2, NULL, NULL, &value, sizeof (value)) < 0)
++    return -1;
++
++  return 0;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sethostname.c
+@@ -0,0 +1,37 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <unistd.h>
++#include <sys/sysctl.h>
++
++/* Set the name of the current host to NAME, which is LEN bytes long
++   (excluding a possible trailing NUL byte).  This call is restricted to
++   the super-user.  */
++
++int
++sethostname (const char *name, size_t len)
++{
++  /* Set the "kern.hostname" sysctl value.  */
++  int request[2] = { CTL_KERN, KERN_HOSTNAME };
++
++  if (__sysctl (request, 2, NULL, NULL, (void *) name, len) < 0)
++    return -1;
++
++  return 0;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/setlogin.c
+@@ -0,0 +1,34 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <unistd.h>
++#include <sysdep.h>
++
++/* Defined in getlogin_r.c.  */
++extern char *__getlogin_cache;
++
++extern int __syscall_setlogin (const char *__name);
++
++int
++setlogin (const char *name)
++{
++  /* FIXME: Not multithread-safe.  */
++  __getlogin_cache = NULL;
++  return INLINE_SYSCALL (setlogin, 1, name);
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/setrlimit64.c
+@@ -0,0 +1 @@
++/* 'setrlimit64' is the same as 'setrlimit', because __rlim64_t == __rlim_t.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/shm_open.c
+@@ -0,0 +1,65 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/stat.h>
++#include <sys/mman.h>
++#include <unistd.h>
++#include <fcntl.h>
++#include <errno.h>
++#include <sysdep.h>
++
++extern int __syscall_shm_open (const char *path, int flags, mode_t mode);
++libc_hidden_proto (__syscall_shm_open);
++
++/* Open shared memory object.   */
++int
++shm_open (const char *name, int oflag, mode_t mode)
++{
++  /* First try the new syscall. */
++  int fd = INLINE_SYSCALL (shm_open, 3, name, oflag, mode);
++
++#ifndef __ASSUME_POSIXSHM_SYSCALL
++  /* New syscall not available, use fallback code.  */
++  if (fd == -1 && errno == ENOSYS)
++    {
++      struct stat stab;
++
++      if ((oflag & O_ACCMODE) == O_WRONLY)
++	return (EINVAL);
++
++      fd = __open (name, oflag, mode);
++      if (fd != -1)
++	{
++	  if (__fstat (fd, &stab) != 0 || !S_ISREG (stab.st_mode))
++	    {
++	      __close (fd);
++	      __set_errno (EINVAL);
++	      return -1;
++	    }
++
++	  if (__fcntl (fd, F_SETFL, (int) FPOSIXSHM) != 0)
++	    {
++	      __close (fd);
++	      return -1;
++	    }
++	}
++    }
++#endif
++
++  return fd;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/shm_unlink.c
+@@ -0,0 +1,48 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/stat.h>
++#include <sys/mman.h>
++#include <unistd.h>
++#include <errno.h>
++#include <sysdep.h>
++
++extern int __syscall_shm_unlink (const char *name);
++libc_hidden_proto (__syscall_shm_unlink)
++
++libc_hidden_proto (__unlink)
++
++/* Unlink a shared memory object.  */
++int
++shm_unlink (const char *name)
++{
++  /* First try the new syscall. */
++  int result = INLINE_SYSCALL (shm_unlink, 1, name);
++
++#ifndef __ASSUME_POSIXSHM_SYSCALL
++  /* New syscall not available, simply unlink the file. */
++  if (result == -1 && errno == ENOSYS)
++# ifdef NOT_IN_libc
++    return unlink (name);
++# else
++    return __unlink (name);
++# endif
++#endif
++
++  return result;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sigaction.c
+@@ -0,0 +1,47 @@
++/* Copyright (C) 1991,1995,1996,1997,2002,2004 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sysdep.h>
++#include <errno.h>
++#include <stddef.h>
++#include <signal.h>
++
++extern int __syscall_sigaction (int __sig,  const struct sigaction *__act, struct sigaction *__oact) __THROW;
++libc_hidden_proto (__syscall_sigaction)
++
++int
++__libc_sigaction (sig, act, oact)
++     int sig;
++     const struct sigaction *act;
++     struct sigaction *oact;
++{
++  if (sig <= 0 || sig >= NSIG)
++    {
++      __set_errno (EINVAL);
++      return -1;
++    }
++
++  return INLINE_SYSCALL (sigaction, 3, sig, act, oact);
++}
++libc_hidden_def (__libc_sigaction)
++
++#ifndef LIBC_SIGACTION
++weak_alias (__libc_sigaction, __sigaction)
++libc_hidden_weak (__sigaction)
++weak_alias (__libc_sigaction, sigaction)
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sigreturn.c
+@@ -0,0 +1,3 @@
++/* The sigreturn syscall cannot be explicitly called on FreeBSD, only
++   implicitly by returning from a signal handler.  */
++#include <signal/sigreturn.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sigset-cvt-mask.h
+@@ -0,0 +1,36 @@
++/* Convert between lowlevel sigmask and libc representation of sigset_t.
++   FreeBSD version.
++   Copyright (C) 1998, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++static inline int __attribute__ ((unused))
++sigset_set_old_mask (sigset_t *set, int mask)
++{
++  set->__sigbits[0] = (unsigned int) mask;
++  set->__sigbits[1] = 0;
++  set->__sigbits[2] = 0;
++  set->__sigbits[3] = 0;
++
++  return 0;
++}
++
++static inline int __attribute__ ((unused))
++sigset_get_old_mask (const sigset_t *set)
++{
++  return (unsigned int) set->__sigbits[0];
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sigstack.c
+@@ -0,0 +1,3 @@
++/* We can reuse the Linux implementation with some tricks.  */
++#define __NR_sigaltstack 1
++#include <sysdeps/unix/sysv/linux/sigstack.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sleep.c
+@@ -0,0 +1,44 @@
++/* Implementation of the POSIX sleep function using nanosleep.
++   Copyright (C) 1996-1999, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <time.h>
++
++/* The default implementation of sleep() in sysdeps/posix/sleep.c, based on
++   SIGALRM, does not mix well with threads.  Therefore we use the nanosleep()
++   system call.  */
++unsigned int
++__sleep (unsigned int seconds)
++{
++  struct timespec ts = { tv_sec: seconds, tv_nsec: 0 };
++  int ret;
++
++  /* This is not necessary but some buggy programs depend on this.  */
++  if (seconds == 0)
++    return 0;
++
++  ret = __nanosleep (&ts, &ts);
++
++  if (ret == 0)
++    return 0;
++
++  /* Round remaining time.  */
++  return (unsigned int) ts.tv_sec + (ts.tv_nsec >= 500000000L);
++}
++
++weak_alias (__sleep, sleep)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/socket/sys/un.h
+@@ -0,0 +1,2 @@
++/* kludge to satisfy $SRC/include/sys/un.h */
++#include <kfreebsd/sys/un.h>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/stat16conv.c
+@@ -0,0 +1,84 @@
++/* Convert between different 'struct stat' formats.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <string.h>
++#include <sys/mount.h>
++#include <bits/stat16.h>
++
++extern int __syscall_fhstat (const fhandle_t *fhp, struct stat16 *buf);
++extern int __syscall_fstat (int, struct stat16 *__unbounded);
++extern int __syscall_lstat (const char *__unbounded, struct stat16 *__unbounded);
++extern int __syscall_stat (const char *__unbounded, struct stat16 *__unbounded);
++libc_hidden_proto (__syscall_fhstat)
++libc_hidden_proto (__syscall_fstat)
++libc_hidden_proto (__syscall_lstat)
++libc_hidden_proto (__syscall_stat)
++
++/* Convert a 'struct stat16' to 'struct stat'.  */
++static inline void
++stat16_to_stat (const struct stat16 *p16, struct stat *q)
++{
++  q->st_dev = p16->st_dev;
++  q->st_ino = p16->st_ino;
++  q->st_mode = p16->st_mode;
++  q->__pad_mode = 0;
++  q->st_nlink = p16->st_nlink;
++  q->__pad_nlink = 0;
++  q->st_uid = p16->st_uid;
++  q->st_gid = p16->st_gid;
++  q->st_rdev = p16->st_rdev;
++  q->st_atim = p16->st_atimespec;
++  q->st_mtim = p16->st_mtimespec;
++  q->st_ctim = p16->st_ctimespec;
++  q->st_size = p16->st_size;
++  q->st_blocks = p16->st_blocks;
++  q->st_blksize = p16->st_blksize;
++  q->st_flags = p16->st_flags;
++  q->st_gen = p16->st_gen;
++#if 0
++  memcpy (q->__unused1, p16->__unused2, sizeof (p16->__unused2));
++#endif
++}
++
++/* Convert a 'struct stat16' to 'struct stat64'.  */
++static inline void
++stat16_to_stat64 (const struct stat16 *p16, struct stat64 *q)
++{
++  q->st_dev = p16->st_dev;
++  q->st_ino = p16->st_ino;
++  q->st_mode = p16->st_mode;
++  q->__pad_mode = 0;
++  q->st_nlink = p16->st_nlink;
++  q->__pad_nlink = 0;
++  q->st_uid = p16->st_uid;
++  q->st_gid = p16->st_gid;
++  q->st_rdev = p16->st_rdev;
++  q->st_atim = p16->st_atimespec;
++  q->st_mtim = p16->st_mtimespec;
++  q->st_ctim = p16->st_ctimespec;
++  q->st_size = p16->st_size;
++  q->st_blocks = p16->st_blocks;
++  q->st_blksize = p16->st_blksize;
++  q->st_flags = p16->st_flags;
++  q->st_gen = p16->st_gen;
++#if 0
++  memcpy (q->__unused1, p16->__unused2, sizeof (p16->__unused2));
++#endif
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/statfs.c
+@@ -0,0 +1,40 @@
++/* Return information about the filesystem on which FILE resides.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Petr Salinger, 2006.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/statfs.h>
++
++#include "statfsconv.c"
++
++/* Return information about the filesystem on which FILE resides.  */
++int
++__statfs (const char *file, struct statfs *buf)
++{
++  struct statfs_fbsd5 kbuf;
++
++  if (__syscall_statfs (file, &kbuf) < 0)
++    return -1;
++
++  /* Convert a 'struct statfs' to 'struct statvfs'.  */
++  statfs5_to_statfs (&kbuf, buf);
++
++  return 0;
++}
++libc_hidden_def (__statfs)
++weak_alias (__statfs, statfs)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/statfs64.c
+@@ -0,0 +1,37 @@
++/* Return information about the filesystem on which FILE resides.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/statfs.h>
++
++#include "statfsconv.c"
++
++/* Return information about the filesystem on which FILE resides.  */
++int
++statfs64 (const char *file, struct statfs64 *buf)
++{
++  struct statfs_fbsd5 kbuf;
++
++  if (__syscall_statfs (file, &kbuf) < 0)
++    return -1;
++
++  statfs5_to_statfs64 (&kbuf, buf);
++
++  return 0;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/statfsconv.c
+@@ -0,0 +1,203 @@
++/* Convert between different 'struct statfs' and 'struct statvfs' formats.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++   Contributed by Petr Salinger, 2006.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++
++#include <stdint.h>
++#include <string.h>
++#include <sys/mount.h>
++#include <sys/syslimits.h>
++#include <sys/statvfs.h>
++#include <sys/statfs.h>
++
++/*
++ * filesystem statistics
++ */
++
++#define MFSNAMELEN	16		/* length of type name including null */
++#define MNAMELEN	88		/* size of on/from name bufs */
++
++struct statfs_fbsd5 {
++	uint32_t f_version;		/* structure version number */
++	uint32_t f_type;		/* type of filesystem */
++	uint64_t f_flags;		/* copy of mount exported flags */
++	uint64_t f_bsize;		/* filesystem fragment size */
++	uint64_t f_iosize;		/* optimal transfer block size */
++	uint64_t f_blocks;		/* total data blocks in filesystem */
++	uint64_t f_bfree;		/* free blocks in filesystem */
++	int64_t	 f_bavail;		/* free blocks avail to non-superuser */
++	uint64_t f_files;		/* total file nodes in filesystem */
++	int64_t	 f_ffree;		/* free nodes avail to non-superuser */
++	uint64_t f_syncwrites;		/* count of sync writes since mount */
++	uint64_t f_asyncwrites;		/* count of async writes since mount */
++	uint64_t f_syncreads;		/* count of sync reads since mount */
++	uint64_t f_asyncreads;		/* count of async reads since mount */
++	uint64_t f_spare[10];		/* unused spare */
++	uint32_t f_namemax;		/* maximum filename length */
++	__uid_t	 f_owner;		/* user that mounted the filesystem */
++	__fsid_t f_fsid;		/* filesystem id */
++	char	 f_charspare[80];	   /* spare string space */
++	char	 f_fstypename[MFSNAMELEN]; /* filesystem type name */
++	char	 f_mntfromname[MNAMELEN];  /* mounted filesystem */
++	char	 f_mntonname[MNAMELEN];	   /* directory on which mounted */
++};
++
++extern int __syscall_getfsstat(struct statfs_fbsd5 *buf, long bufsize, int flags);
++extern int __syscall_statfs(const char *path, struct statfs_fbsd5 *buf);
++extern int __syscall_fstatfs(int fd, struct statfs_fbsd5 *buf);
++extern int __syscall_fhstatfs(const struct fhandle *u_fhp, struct statfs_fbsd5 *buf);
++
++
++/*
++ * Convert a FreeBSD 5.x format statfs structure to an glibc format statfs structure.
++ */
++
++static inline void
++statfs5_to_statfs(const struct statfs_fbsd5 *pk, struct statfs *p32)
++{
++  memset(p32, 0, sizeof(*p32));
++
++  p32->f_version	= pk->f_version;
++  p32->f_bsize		= MIN(pk->f_bsize,  ULONG_MAX);
++  p32->f_iosize		= MIN(pk->f_iosize, ULONG_MAX);
++
++  p32->f_blocks		= MIN(pk->f_blocks, ULONG_MAX);
++  p32->f_bfree		= MIN(pk->f_bfree,  ULONG_MAX);
++  p32->f_bavail		= MIN(pk->f_bavail, ULONG_MAX);
++  p32->f_files		= MIN(pk->f_files,  ULONG_MAX);
++  p32->f_ffree		= MIN(pk->f_ffree,  ULONG_MAX);
++
++  p32->f_fsid		= pk->f_fsid;
++  p32->f_owner		= pk->f_owner;
++  p32->f_type		= pk->f_type;
++  p32->f_flags		= pk->f_flags;
++
++  p32->f_syncwrites	= MIN(pk->f_syncwrites,	 ULONG_MAX);
++  p32->f_asyncwrites	= MIN(pk->f_asyncwrites, ULONG_MAX);
++  p32->f_syncreads	= MIN(pk->f_syncreads,	 ULONG_MAX);
++  p32->f_asyncreads	= MIN(pk->f_asyncreads,	 ULONG_MAX);
++
++  p32->f_namemax	= MIN(pk->f_namemax, USHRT_MAX);
++
++  memcpy(p32->f_fstypename, pk->f_fstypename, sizeof (p32->f_fstypename));
++  memcpy(p32->f_mntonname,  pk->f_mntonname,  sizeof (p32->f_mntonname));
++  memcpy(p32->f_mntfromname,pk->f_mntfromname,sizeof (p32->f_mntfromname));
++}
++
++
++/*
++ * Convert a FreeBSD 5.x format statfs structure to an glibc format statfs64 structure.
++ */
++
++static inline void
++statfs5_to_statfs64(const struct statfs_fbsd5 *pk, struct statfs64 *p64)
++{
++  memset(p64, 0, sizeof(*p64));
++
++  p64->f_version	= pk->f_version;
++  p64->f_bsize		= MIN(pk->f_bsize,  ULONG_MAX);
++  p64->f_iosize		= MIN(pk->f_iosize, ULONG_MAX);
++
++  p64->f_blocks		= pk->f_blocks;
++  p64->f_bfree		= pk->f_bfree;
++  p64->f_bavail		= pk->f_bavail;
++  p64->f_files		= pk->f_files;
++  p64->f_ffree		= pk->f_ffree;
++
++  p64->f_fsid		= pk->f_fsid;
++  p64->f_owner		= pk->f_owner;
++  p64->f_type		= pk->f_type;
++  p64->f_flags		= pk->f_flags;
++
++  p64->f_syncwrites	= MIN(pk->f_syncwrites,	 ULONG_MAX);
++  p64->f_asyncwrites	= MIN(pk->f_asyncwrites, ULONG_MAX);
++  p64->f_syncreads	= MIN(pk->f_syncreads,	 ULONG_MAX);
++  p64->f_asyncreads	= MIN(pk->f_asyncreads,	 ULONG_MAX);
++
++  p64->f_namemax	= MIN(pk->f_namemax, USHRT_MAX);
++
++  memcpy(p64->f_fstypename, pk->f_fstypename, sizeof (p64->f_fstypename));
++  memcpy(p64->f_mntonname,  pk->f_mntonname,  sizeof (p64->f_mntonname));
++  memcpy(p64->f_mntfromname,pk->f_mntfromname,sizeof (p64->f_mntfromname));
++}
++
++
++/*
++ * Convert a FreeBSD 5.x format statfs structure to an glibc format statvfs structure.
++ */
++
++static inline void
++statfs5_to_statvfs (const struct statfs_fbsd5 *pk, struct statvfs *p32)
++{
++  /* FIXME: What is the difference between f_bsize and f_frsize ? */
++  p32->f_bsize		= MIN(pk->f_bsize,  ULONG_MAX);
++  p32->f_frsize		= MIN(pk->f_bsize,  ULONG_MAX);
++
++  p32->f_blocks		= MIN(pk->f_blocks, ULONG_MAX);
++  p32->f_bfree		= MIN(pk->f_bfree,  ULONG_MAX);
++  p32->f_bavail		= MIN(pk->f_bavail, ULONG_MAX);
++  p32->f_files		= MIN(pk->f_files,  ULONG_MAX);
++  p32->f_ffree		= MIN(pk->f_ffree,  ULONG_MAX);
++  p32->f_favail		= MIN(pk->f_ffree,  ULONG_MAX); /* Hmm.	 May be filesystem dependent.  */
++
++  memcpy(&(p32->f_fsid), &(pk->f_fsid), sizeof(__fsid_t));
++
++  p32->f_flag		=
++      (pk->f_flags & MNT_RDONLY ? ST_RDONLY : 0)
++    | (pk->f_flags & MNT_NOSUID ? ST_NOSUID : 0)
++    | (pk->f_flags & MNT_NOEXEC ? ST_NOEXEC : 0)
++    | (pk->f_flags & MNT_SYNCHRONOUS ? ST_SYNCHRONOUS : 0)
++    | (pk->f_flags & MNT_NOATIME ? ST_NOATIME : 0);
++  p32->f_namemax	= pk->f_namemax;
++
++  memset (p32->f_spare, '\0', sizeof (p32->f_spare));
++}
++
++
++/*
++ * Convert a FreeBSD 5.x format statfs structure to an glibc format statvfs64 structure.
++ */
++
++static inline void
++statfs5_to_statvfs64 (const struct statfs_fbsd5 *pk, struct statvfs64 *p64)
++{
++  /* FIXME: What is the difference between f_bsize and f_frsize ? */
++  p64->f_bsize		= MIN(pk->f_bsize,  ULONG_MAX);
++  p64->f_frsize		= MIN(pk->f_bsize,  ULONG_MAX);
++
++  p64->f_blocks		= pk->f_blocks;
++  p64->f_bfree		= pk->f_bfree;
++  p64->f_bavail		= pk->f_bavail;
++  p64->f_files		= pk->f_files;
++  p64->f_ffree		= pk->f_ffree;
++  p64->f_favail		= pk->f_ffree; /* Hmm.	May be filesystem dependent.  */
++
++  memcpy(&(p64->f_fsid), &(pk->f_fsid), sizeof(__fsid_t));
++
++  p64->f_flag		=
++      (pk->f_flags & MNT_RDONLY ? ST_RDONLY : 0)
++    | (pk->f_flags & MNT_NOSUID ? ST_NOSUID : 0)
++    | (pk->f_flags & MNT_NOEXEC ? ST_NOEXEC : 0)
++    | (pk->f_flags & MNT_SYNCHRONOUS ? ST_SYNCHRONOUS : 0)
++    | (pk->f_flags & MNT_NOATIME ? ST_NOATIME : 0);
++  p64->f_namemax	= pk->f_namemax;
++
++  memset (p64->f_spare, '\0', sizeof (p64->f_spare));
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/statvfs.c
+@@ -0,0 +1,40 @@
++/* Return information about the filesystem on which FILE resides.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/statvfs.h>
++#include <sys/statfs.h>
++
++#include "statfsconv.c"
++
++/* Return information about the filesystem on which FILE resides.  */
++int
++statvfs (const char *file, struct statvfs *buf)
++{
++  struct statfs_fbsd5 kbuf;
++
++  if (__syscall_statfs (file, &kbuf) < 0)
++    return -1;
++
++  /* Convert a 'struct statfs' to 'struct statvfs'.  */
++  statfs5_to_statvfs (&kbuf, buf);
++
++  return 0;
++}
++libc_hidden_weak (statvfs)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/statvfs64.c
+@@ -0,0 +1,41 @@
++/* Return information about the filesystem on which FILE resides.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/statvfs.h>
++#include <sys/statfs.h>
++
++#include "statfsconv.c"
++
++/* Return information about the filesystem on which FILE resides.  */
++int
++__statvfs64 (const char *file, struct statvfs64 *buf)
++{
++  struct statfs_fbsd5 kbuf;
++
++  if (__syscall_statfs (file, &kbuf) < 0)
++    return -1;
++
++  /* Convert a 'struct statfs' to 'struct statvfs64'.  */
++  statfs5_to_statvfs64 (&kbuf, buf);
++
++  return 0;
++}
++
++weak_alias (__statvfs64, statvfs64)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/stty.c
+@@ -0,0 +1,2 @@
++/* use stub only variant */
++#include <misc/stty.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/symlinkat.c
+@@ -0,0 +1,126 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stddef.h>
++#include <stdio.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sysdep.h>
++#include <unistd.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <kernel-features.h>
++
++extern int __syscall_symlinkat (const char *path1, int fd,
++				const char *path2);
++libc_hidden_proto (__syscall_symlinkat)
++
++/* Make a symbolic link to FROM named TO relative to TOFD.  */
++int
++symlinkat (from, tofd, to)
++     const char *from;
++     int tofd;
++     const char *to;
++{
++# ifndef __ASSUME_ATFCTS
++  if (__have_atfcts >= 0)
++# endif
++    {
++      int result = INLINE_SYSCALL (symlinkat, 3, from, tofd, to);
++# ifndef __ASSUME_ATFCTS
++      if (result == -1 && errno == ENOSYS)
++	__have_atfcts = -1;
++      else
++# endif
++	return result;
++    }
++
++#ifndef __ASSUME_ATFCTS
++  if (tofd != AT_FDCWD && to[0] != '/')
++    {
++      int mib[4];
++      size_t kf_len = 0;
++      char *kf_buf, *kf_bufp;
++      size_t tolen;
++
++      if (tofd < 0)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++
++      tolen = strlen (to);
++      if (__builtin_expect (tolen == 0, 0))
++	{
++	  __set_errno (ENOENT);
++	  return -1;
++	}
++
++      mib[0] = CTL_KERN;
++      mib[1] = KERN_PROC;
++      mib[2] = KERN_PROC_FILEDESC;
++      mib[3] = __getpid ();
++
++      if (__sysctl (mib, 4, NULL, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_buf = alloca (kf_len + tolen);
++      if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_bufp = kf_buf;
++      while (kf_bufp < kf_buf + kf_len)
++	{
++	  struct kinfo_file *kf = (struct kinfo_file *) (uintptr_t) kf_bufp;
++
++	  if (kf->kf_fd == tofd)
++	    {
++	      if (kf->kf_type != KF_TYPE_VNODE ||
++		  kf->kf_vnode_type != KF_VTYPE_VDIR)
++		{
++		  __set_errno (ENOTDIR);
++		  return -1;
++		}
++
++	      strcat (kf->kf_path, "/");
++	      strcat (kf->kf_path, to);
++	      to = kf->kf_path;
++	      break;
++	    }
++	  kf_bufp += kf->kf_structsize;
++	}
++
++      if (kf_bufp >= kf_buf + kf_len)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++    }
++
++  return __symlink (from, to);
++#endif
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/kd.h
+@@ -0,0 +1,25 @@
++/* Copyright (C) 2005 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_KD_H
++#define _SYS_KD_H	1
++
++#include <sys/consio.h>
++#include <sys/kbio.h>
++
++#endif	/* sys/kd.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/mount.h
+@@ -0,0 +1,521 @@
++/* Header file for handling mounted filesystems.  FreeBSD version.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_MOUNT_H
++#define _SYS_MOUNT_H	1
++
++#include <features.h>
++
++/* Retrieving the list of mounted filesystems.  */
++
++#include <sys/stat.h>
++#include <sys/statfs.h>
++#include <sys/ucred.h>
++#include <sys/queue.h>
++
++/* For getvfsbyname.  */
++#include <stddef.h>
++#include <sys/mount.h>
++#include <sys/sysctl.h>
++#include <errno.h>
++#include <stdlib.h>
++#include <string.h>
++
++/*
++ * File identifier.
++ * These are unique per filesystem on a single machine.
++ */
++#define	MAXFIDSZ	16
++
++struct fid {
++	__u_short	fid_len;		/* length of data in bytes */
++	__u_short	fid_reserved;		/* force longword alignment */
++	char		fid_data[MAXFIDSZ];	/* data (variable length) */
++};
++
++/*
++ * filesystem statistics
++ */
++#define	MFSNAMELEN	16		/* length of type name including null */
++#define	MNAMELEN	88		/* size of on/from name bufs */
++#define	STATFS_VERSION	0x20030518	/* current version number */
++
++
++/*
++ * User specifiable flags.
++ */
++#define	MNT_RDONLY	0x0000000000000001ULL /* read only filesystem */
++#define	MNT_SYNCHRONOUS	0x0000000000000002ULL /* fs written synchronously */
++#define	MNT_NOEXEC	0x0000000000000004ULL /* can't exec from filesystem */
++#define	MNT_NOSUID	0x0000000000000008ULL /* don't honor setuid fs bits */
++#define	MNT_NFS4ACLS	0x0000000000000010ULL /* enable NFS version 4 ACLs */
++#define	MNT_UNION	0x0000000000000020ULL /* union with underlying fs */
++#define	MNT_ASYNC	0x0000000000000040ULL /* fs written asynchronously */
++#define	MNT_SUIDDIR	0x0000000000100000ULL /* special SUID dir handling */
++#define	MNT_SOFTDEP	0x0000000000200000ULL /* using soft updates */
++#define	MNT_NOSYMFOLLOW	0x0000000000400000ULL /* do not follow symlinks */
++#define	MNT_GJOURNAL	0x0000000002000000ULL /* GEOM journal support enabled */
++#define	MNT_MULTILABEL	0x0000000004000000ULL /* MAC support for objects */
++#define	MNT_ACLS	0x0000000008000000ULL /* ACL support enabled */
++#define	MNT_NOATIME	0x0000000010000000ULL /* dont update file access time */
++#define	MNT_NOCLUSTERR	0x0000000040000000ULL /* disable cluster read */
++#define	MNT_NOCLUSTERW	0x0000000080000000ULL /* disable cluster write */
++#define	MNT_SUJ		0x0000000100000000ULL /* using journaled soft updates */
++
++/*
++ * NFS export related mount flags.
++ */
++#define	MNT_EXRDONLY	0x0000000000000080ULL	/* exported read only */
++#define	MNT_EXPORTED	0x0000000000000100ULL	/* filesystem is exported */
++#define	MNT_DEFEXPORTED	0x0000000000000200ULL	/* exported to the world */
++#define	MNT_EXPORTANON	0x0000000000000400ULL	/* anon uid mapping for all */
++#define	MNT_EXKERB	0x0000000000000800ULL	/* exported with Kerberos */
++#define	MNT_EXPUBLIC	0x0000000020000000ULL	/* public export (WebNFS) */
++
++/*
++ * Flags set by internal operations,
++ * but visible to the user.
++ * XXX some of these are not quite right.. (I've never seen the root flag set)
++ */
++#define	MNT_LOCAL	0x0000000000001000ULL /* filesystem is stored locally */
++#define	MNT_QUOTA	0x0000000000002000ULL /* quotas are enabled on fs */
++#define	MNT_ROOTFS	0x0000000000004000ULL /* identifies the root fs */
++#define	MNT_USER	0x0000000000008000ULL /* mounted by a user */
++#define	MNT_IGNORE	0x0000000000800000ULL /* do not show entry in df */
++
++/*
++ * Mask of flags that are visible to statfs().
++ * XXX I think that this could now become (~(MNT_CMDFLAGS))
++ * but the 'mount' program may need changing to handle this.
++ */
++#define	MNT_VISFLAGMASK	(MNT_RDONLY	| MNT_SYNCHRONOUS | MNT_NOEXEC	| \
++			MNT_NOSUID	| MNT_UNION	| MNT_SUJ	| \
++			MNT_ASYNC	| MNT_EXRDONLY	| MNT_EXPORTED	| \
++			MNT_DEFEXPORTED	| MNT_EXPORTANON| MNT_EXKERB	| \
++			MNT_LOCAL	| MNT_USER	| MNT_QUOTA	| \
++			MNT_ROOTFS	| MNT_NOATIME	| MNT_NOCLUSTERR| \
++			MNT_NOCLUSTERW	| MNT_SUIDDIR	| MNT_SOFTDEP	| \
++			MNT_IGNORE	| MNT_EXPUBLIC	| MNT_NOSYMFOLLOW | \
++			MNT_GJOURNAL	| MNT_MULTILABEL | MNT_ACLS	| \
++			MNT_NFS4ACLS)
++
++/* Mask of flags that can be updated. */
++#define	MNT_UPDATEMASK (MNT_NOSUID	| MNT_NOEXEC	| \
++			MNT_SYNCHRONOUS	| MNT_UNION	| MNT_ASYNC	| \
++			MNT_NOATIME | \
++			MNT_NOSYMFOLLOW	| MNT_IGNORE	| \
++			MNT_NOCLUSTERR	| MNT_NOCLUSTERW | MNT_SUIDDIR	| \
++			MNT_ACLS	| MNT_USER | MNT_NFS4ACLS)
++
++/*
++ * External filesystem command modifier flags.
++ * Unmount can use the MNT_FORCE flag.
++ * XXX These are not STATES and really should be somewhere else.
++ */
++#define	MNT_UPDATE	0x00010000	/* not a real mount, just an update */
++#define	MNT_DELEXPORT	0x00020000	/* delete export host lists */
++#define	MNT_RELOAD	0x00040000	/* reload filesystem data */
++#define	MNT_FORCE	0x00080000	/* force unmount or readonly change */
++#define	MNT_SNAPSHOT	0x01000000	/* snapshot the filesystem */
++#define	MNT_BYFSID	0x08000000	/* specify filesystem by ID. */
++#define MNT_CMDFLAGS   (MNT_UPDATE	| MNT_DELEXPORT	| MNT_RELOAD	| \
++			MNT_FORCE	| MNT_SNAPSHOT	| MNT_BYFSID)
++/*
++ * Internal filesystem control flags stored in mnt_kern_flag.
++ *
++ * MNTK_UNMOUNT locks the mount entry so that name lookup cannot proceed
++ * past the mount point.  This keeps the subtree stable during mounts
++ * and unmounts.
++ *
++ * MNTK_UNMOUNTF permits filesystems to detect a forced unmount while
++ * dounmount() is still waiting to lock the mountpoint. This allows
++ * the filesystem to cancel operations that might otherwise deadlock
++ * with the unmount attempt (used by NFS).
++ */
++#define MNTK_UNMOUNTF	0x00000001	/* forced unmount in progress */
++#define MNTK_ASYNC      0x00000002      /* filtered async flag */
++#define MNTK_SOFTDEP    0x00000004      /* async disabled by softdep */
++#define MNTK_NOINSMNTQ  0x00000008      /* insmntque is not allowed */
++#define MNTK_UNMOUNT	0x01000000	/* unmount in progress */
++#define	MNTK_MWAIT	0x02000000	/* waiting for unmount to finish */
++#define MNTK_WANTRDWR	0x04000000	/* upgrade to read/write requested */
++#define MNTK_SUSPEND2   0x04000000      /* block secondary writes */
++#define	MNTK_SUSPEND	0x08000000	/* request write suspension */
++#define	MNTK_SUSPENDED	0x10000000	/* write operations are suspended */
++#define MNTK_MPSAFE     0x20000000      /* Filesystem is MPSAFE. */
++#define MNTK_NOKNOTE    0x80000000      /* Don't send KNOTEs from VOP hooks */
++#define MNTK_LOOKUP_SHARED      0x40000000 /* FS supports shared lock lookups */
++
++/*
++ * Sysctl CTL_VFS definitions.
++ *
++ * Second level identifier specifies which filesystem. Second level
++ * identifier VFS_VFSCONF returns information about all filesystems.
++ * Second level identifier VFS_GENERIC is non-terminal.
++ */
++#define	VFS_VFSCONF		0	/* get configured filesystems */
++#define	VFS_GENERIC		0	/* generic filesystem information */
++/*
++ * Third level identifiers for VFS_GENERIC are given below; third
++ * level identifiers for specific filesystems are given in their
++ * mount specific header files.
++ */
++#define VFS_MAXTYPENUM	1	/* int: highest defined filesystem type */
++#define VFS_CONF	2	/* struct: vfsconf for filesystem given
++				   as next argument */
++
++/*
++ * Flags for various system call interfaces.
++ *
++ * waitfor flags to vfs_sync() and getfsstat()
++ */
++#define MNT_WAIT	1	/* synchronously wait for I/O to complete */
++#define MNT_NOWAIT	2	/* start all I/O, but do not wait for it */
++#define MNT_LAZY	3	/* push data not written by filesystem syncer */
++#define	MNT_SUSPEND	4	/* Suspend file system after sync */
++
++/*
++ * Generic file handle
++ */
++struct fhandle {
++	__fsid_t	fh_fsid;	/* Filesystem id of mount point */
++	struct		fid fh_fid;	/* Filesys specific id */
++};
++typedef struct fhandle	fhandle_t;
++
++/*
++ * Old export arguments without security flavor list
++ */
++struct oexport_args {
++	int	ex_flags;		/* export related flags */
++	uid_t	ex_root;		/* mapping for root uid */
++	struct	xucred ex_anon;		/* mapping for anonymous user */
++	struct	sockaddr *ex_addr;	/* net address to which exported */
++	__u_char ex_addrlen;		/* and the net address length */
++	struct	sockaddr *ex_mask;	/* mask of valid bits in saddr */
++	__u_char ex_masklen;		/* and the smask length */
++	char	*ex_indexfile;		/* index file for WebNFS URLs */
++};
++
++/*
++ * Export arguments for local filesystem mount calls.
++ */
++#define	MAXSECFLAVORS	5
++struct export_args {
++	int		ex_flags;		/* export related flags */
++	uid_t		ex_root;		/* mapping for root uid */
++	struct		xucred ex_anon;		/* mapping for anonymous user */
++	struct		sockaddr *ex_addr;	/* net address to which exported */
++	__u_char	ex_addrlen;		/* and the net address length */
++	struct		sockaddr *ex_mask;	/* mask of valid bits in saddr */
++	__u_char	ex_masklen;		/* and the smask length */
++	char		*ex_indexfile;		/* index file for WebNFS URLs */
++	int		ex_numsecflavors;	/* security flavor count */
++	int		ex_secflavors[MAXSECFLAVORS]; /* list of security flavors */
++};
++
++/*
++ * Structure holding information for a publicly exported filesystem
++ * (WebNFS). Currently the specs allow just for one such filesystem.
++ */
++struct nfs_public {
++	int		np_valid;	/* Do we hold valid information */
++	fhandle_t	np_handle;	/* Filehandle for pub fs (internal) */
++	struct mount	*np_mount;	/* Mountpoint of exported fs */
++	char		*np_index;	/* Index file */
++};
++
++/*
++ * Filesystem configuration information. One of these exists for each
++ * type of filesystem supported by the kernel. These are searched at
++ * mount time to identify the requested filesystem.
++ *
++ * XXX: Never change the first two arguments!
++ */
++struct vfsconf {
++	__u_int	vfc_version;		/* ABI version number */
++	char	vfc_name[MFSNAMELEN];	/* filesystem type name */
++	struct	vfsops *vfc_vfsops;	/* filesystem operations vector */
++	int	vfc_typenum;		/* historic filesystem type number */
++	int	vfc_refcount;		/* number mounted of this type */
++	int	vfc_flags;		/* permanent flags */
++	struct	vfsoptdecl *vfc_opts;	/* mount options */
++	TAILQ_ENTRY(vfsconf) vfc_list;	/* list of vfscons */
++};
++
++/* Userland version of the struct vfsconf. */
++struct xvfsconf {
++	struct	vfsops *vfc_vfsops;	/* filesystem operations vector */
++	char	vfc_name[MFSNAMELEN];	/* filesystem type name */
++	int	vfc_typenum;		/* historic filesystem type number */
++	int	vfc_refcount;		/* number mounted of this type */
++	int	vfc_flags;		/* permanent flags */
++	struct	vfsconf *vfc_next;	/* next in list */
++};
++
++#ifndef BURN_BRIDGES
++struct ovfsconf {
++	void	*vfc_vfsops;
++	char	vfc_name[32];
++	int	vfc_index;
++	int	vfc_refcount;
++	int	vfc_flags;
++};
++#endif
++
++/*
++ * NB: these flags refer to IMPLEMENTATION properties, not properties of
++ * any actual mounts; i.e., it does not make sense to change the flags.
++ */
++#define	VFCF_STATIC	0x00010000	/* statically compiled into kernel */
++#define	VFCF_NETWORK	0x00020000	/* may get data over the network */
++#define	VFCF_READONLY	0x00040000	/* writes are not implemented */
++#define VFCF_SYNTHETIC	0x00080000	/* data does not represent real files */
++#define	VFCF_LOOPBACK	0x00100000	/* aliases some other mounted FS */
++#define	VFCF_UNICODE	0x00200000	/* stores file names as Unicode*/
++#define VFCF_JAIL       0x00400000      /* can be mounted from within a jail */
++
++typedef u_int32_t fsctlop_t;
++
++struct vfsidctl {
++	int		vc_vers;	/* should be VFSIDCTL_VERS1 (below) */
++	__fsid_t	vc_fsid;	/* fsid to operate on. */
++	char		vc_fstypename[MFSNAMELEN];
++					/* type of fs 'nfs' or '*' */
++	fsctlop_t	vc_op;		/* operation VFS_CTL_* (below) */
++	void		*vc_ptr;	/* pointer to data structure. */
++	size_t		vc_len;		/* sizeof said structure. */
++	u_int32_t	vc_spare[12];	/* spare (must be zero). */
++};
++
++/* vfsidctl API version. */
++#define VFS_CTL_VERS1	0x01
++
++/*
++ * New style VFS sysctls, do not reuse/conflict with the namespace for
++ * private sysctls.
++ * All "global" sysctl ops have the 33rd bit set:
++ * 0x...1....
++ * Private sysctl ops should have the 33rd bit unset.
++ */
++#define VFS_CTL_QUERY	0x00010001	/* anything wrong? (vfsquery) */
++#define VFS_CTL_TIMEO	0x00010002	/* set timeout for vfs notification */
++#define VFS_CTL_NOLOCKS	0x00010003	/* disable file locking */
++
++struct vfsquery {
++	u_int32_t	vq_flags;
++	u_int32_t	vq_spare[31];
++};
++
++/* vfsquery flags */
++#define VQ_NOTRESP	0x0001	/* server down */
++#define VQ_NEEDAUTH	0x0002	/* server bad auth */
++#define VQ_LOWDISK	0x0004	/* we're low on space */
++#define VQ_MOUNT	0x0008	/* new filesystem arrived */
++#define VQ_UNMOUNT	0x0010	/* filesystem has left */
++#define VQ_DEAD		0x0020	/* filesystem is dead, needs force unmount */
++#define VQ_ASSIST	0x0040	/* filesystem needs assistance from external
++				   program */
++#define VQ_NOTRESPLOCK	0x0080	/* server lockd down */
++#define VQ_FLAG0100	0x0100	/* placeholder */
++#define VQ_FLAG0200	0x0200	/* placeholder */
++#define VQ_FLAG0400	0x0400	/* placeholder */
++#define VQ_FLAG0800	0x0800	/* placeholder */
++#define VQ_FLAG1000	0x1000	/* placeholder */
++#define VQ_FLAG2000	0x2000	/* placeholder */
++#define VQ_FLAG4000	0x4000	/* placeholder */
++#define VQ_FLAG8000	0x8000	/* placeholder */
++
++
++struct iovec;
++struct uio;
++
++__BEGIN_DECLS
++
++/* Mounting and unmounting filesystems.  */
++int	mount(const char *, const char *, int, void *);
++int	nmount(struct iovec *, unsigned int, int);
++int	unmount(const char *, int);
++
++/*
++ * Copyright (c) 1995
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ */
++
++/*
++ * Given a filesystem name, determine if it is resident in the kernel,
++ * and if it is resident, return its xvfsconf structure.
++ */
++static __inline int
++getvfsbyname(const char *fsname, struct xvfsconf *vfcp)
++{
++	struct xvfsconf *xvfsp;
++	size_t buflen;
++	int cnt, i;
++
++	if (sysctlbyname("vfs.conflist", NULL, &buflen, NULL, 0) < 0)
++		return (-1);
++	xvfsp = (struct xvfsconf *) malloc(buflen);
++	if (xvfsp == NULL)
++		return (-1);
++	if (sysctlbyname("vfs.conflist", xvfsp, &buflen, NULL, 0) < 0) {
++		free(xvfsp);
++		return (-1);
++	}
++	cnt = buflen / sizeof(struct xvfsconf);
++	for (i = 0; i < cnt; i++) {
++		if (strcmp(fsname, xvfsp[i].vfc_name) == 0) {
++			memcpy(vfcp, xvfsp + i, sizeof(struct xvfsconf));
++			free(xvfsp);
++			return (0);
++		}
++	}
++	free(xvfsp);
++	errno = ENOENT;
++	return (-1);
++}
++
++/* getfsstat() appears in BSD 4.4.  A variant of this API is found on OSF/1,
++   but on that system the user also needs to include <sys/fs_types.h>.  */
++
++#ifndef __USE_FILE_OFFSET64
++extern int getfsstat (struct statfs *__buf, long __bufsize,
++		      int __flags) __THROW;
++#else
++# ifdef __REDIRECT
++extern int __REDIRECT (getfsstat,
++		       (struct statfs *__buf, long __bufsize, int __flags),
++		       getfsstat64);
++# else
++#  define getfsstat getfsstat64
++# endif
++#endif
++#ifdef __USE_LARGEFILE64
++extern int getfsstat64 (struct statfs64 *__buf, long __bufsize,
++			int __flags) __THROW;
++#endif
++
++#ifdef _LIBC
++extern int __getfsstat (struct statfs *__buf, long __bufsize, int __flags);
++extern int __getfsstat64 (struct statfs64 *__buf, long __bufsize, int __flags);
++#endif
++
++/* getmntinfo() appears in BSD 4.4.  */
++
++#ifndef __USE_FILE_OFFSET64
++extern int getmntinfo (struct statfs **__mntbufp, int __flags) __THROW;
++#else
++# ifdef __REDIRECT
++extern int __REDIRECT (getmntinfo,
++		       (struct statfs **__mntbufp, int __flags),
++		       getmntinfo64);
++# else
++#  define getmntinfo getmntinfo64
++# endif
++#endif
++#ifdef __USE_LARGEFILE64
++extern int getmntinfo64 (struct statfs64 **__mntbufp, int __flags) __THROW;
++#endif
++
++#ifdef _LIBC
++extern int __getmntinfo (struct statfs **__mntbufp, int __flags);
++#endif
++
++__END_DECLS
++
++
++/* Opening files on specified mounted filesystems.
++   These system calls are reserved to the superuser, for security reasons.  */
++
++__BEGIN_DECLS
++
++/* Return in *FHP the file handle corresponding to the file or directory
++   PATH.  */
++extern int getfh (__const char *__path, fhandle_t *__fhp) __THROW;
++
++/* Return in *FHP the file handle corresponding to the file or directory
++   PATH.  */
++extern int lgetfh (__const char *__path, fhandle_t *__fhp) __THROW;
++
++/* Open a file handle *FHP, using the open() like FLAGS.  Return the
++   new file descriptor.  */
++extern int fhopen (__const fhandle_t *__fhp, int __flags) __THROW;
++
++/* Get file attributes for the file whose handle is *FHP, and return them
++   in *BUF.  Like fhopen + fstat + close.  */
++#ifndef __USE_FILE_OFFSET64
++extern int fhstat (__const fhandle_t *__fhp, struct stat *__buf) __THROW;
++#else
++# ifdef __REDIRECT
++extern int __REDIRECT (fhstat,
++		       (__const fhandle_t *__fhp, struct stat *__buf),
++		       fhstat64);
++# else
++#  define fhstat fhstat64
++# endif
++#endif
++#ifdef __USE_LARGEFILE64
++extern int fhstat64 (__const fhandle_t *__fhp, struct stat64 *__buf) __THROW;
++#endif
++
++/* Return information about the filesystem on which the file resides whose
++   handle is *FHP.  Like fhopen + fstatfs + close.  */
++#ifndef __USE_FILE_OFFSET64
++extern int fhstatfs (__const fhandle_t *__fhp, struct statfs *__buf) __THROW;
++#else
++# ifdef __REDIRECT
++extern int __REDIRECT (fhstatfs,
++		       (__const fhandle_t *__fhp, struct statfs *__buf),
++		       fhstatfs64);
++# else
++#  define fhstatfs fhstatfs64
++# endif
++#endif
++#ifdef __USE_LARGEFILE64
++extern int fhstatfs64 (__const fhandle_t *__fhp,
++		       struct statfs64 *__buf) __THROW;
++#endif
++
++__END_DECLS
++
++#endif /* _SYS_MOUNT_H */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/param.h
+@@ -0,0 +1,242 @@
++/* Copyright (C) 1995,1996,1997,2000,2001,2003 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_PARAM_H
++#define _SYS_PARAM_H	1
++
++#include <limits.h>
++#include <sys/syslimits.h>
++
++#ifndef NULL
++#define NULL 0
++#endif
++
++/*
++ * __FreeBSD_version numbers are documented in the Porter's Handbook.
++ * If you bump the version for any reason, you should update the documentation
++ * there.
++ * Currently this lives here:
++ *
++ *      doc/en_US.ISO8859-1/books/porters-handbook/book.sgml
++ *
++ * scheme is:  <major><two digit minor><0 if release branch, otherwise 1>xx
++ */
++#include <osreldate.h>
++
++/* Some inet code expects that this file defines the 'u_int32_t' type.  */
++#include <sys/types.h>
++#include <stdint.h>
++
++/* FreeBSD code expects that this file implicitly defines SIG* macros.  */
++#include <signal.h>
++
++/*
++ * Machine-independent constants (some used in following include files).
++ * Redefined constants are from POSIX 1003.1 limits file.
++ *
++ * MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>)
++ * MAXLOGNAME should be == UT_NAMESIZE+1 (see <utmp.h>)
++ */
++
++#define MAXCOMLEN       19              /* max command name remembered */
++#define MAXINTERP       32              /* max interpreter file name length */
++#define MAXLOGNAME      17              /* max login name length (incl. NUL) */
++#define MAXUPRC         CHILD_MAX       /* max simultaneous processes */
++#define NCARGS          ARG_MAX         /* max bytes for an exec function */
++#define NGROUPS         NGROUPS_MAX     /* max number groups */
++#define NOGROUP         65535           /* marker for empty group set member */
++#define MAXHOSTNAMELEN  256             /* max hostname size */
++#define SPECNAMELEN     63              /* max length of devicename */
++#define TTY_NAME_MAX	SPECNAMELEN
++
++/* BSD names for some <limits.h> values.  */
++
++#define	NBBY		CHAR_BIT
++#ifndef	NGROUPS
++# define NGROUPS	NGROUPS_MAX
++#endif
++#define	MAXSYMLINKS	32
++#define	CANBSIZ		MAX_CANON
++#define	NCARGS		ARG_MAX
++#define MAXPATHLEN	PATH_MAX
++
++/* The following is not really correct but it is a value we used for a
++   long time and which seems to be usable.  People should not use NOFILE
++   anyway.  */
++#define NOFILE		OPEN_MAX
++
++/* Bit map related macros.  */
++#define	setbit(a,i)	((a)[(i)/NBBY] |= 1<<((i)%NBBY))
++#define	clrbit(a,i)	((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
++#define	isset(a,i)	((a)[(i)/NBBY] & (1<<((i)%NBBY)))
++#define	isclr(a,i)	(((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
++
++/* Macros for counting and rounding.  */
++#ifndef howmany
++# define howmany(x, y)	(((x) + ((y) - 1)) / (y))
++#endif
++#ifdef __GNUC__
++# define roundup(x, y)	(__builtin_constant_p (y) && powerof2 (y)	      \
++			 ? (((x) + (y) - 1) & ~((y) - 1))		      \
++			 : ((((x) + ((y) - 1)) / (y)) * (y)))
++#else
++# define roundup(x, y)	((((x) + ((y) - 1)) / (y)) * (y))
++#endif
++#define	roundup2(x, y)	(((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
++#define powerof2(x)	((((x) - 1) & (x)) == 0)
++
++/* Macros for min/max.  */
++#define	MIN(a,b) (((a)<(b))?(a):(b))
++#define	MAX(a,b) (((a)>(b))?(a):(b))
++
++/* Machine type dependent parameters. */
++#include <machine/param.h>
++
++#ifndef DEV_BSHIFT
++#define DEV_BSHIFT	9               /* log2(DEV_BSIZE) */
++#endif
++#define DEV_BSIZE	(1<<DEV_BSHIFT)
++
++#ifndef BLKDEV_IOSIZE
++#define BLKDEV_IOSIZE	PAGE_SIZE        /* default block device I/O size */
++#endif
++#ifndef DFLTPHYS
++#define DFLTPHYS	(64 * 1024)     /* default max raw I/O transfer size */
++#endif
++#ifndef MAXPHYS
++#define MAXPHYS		(128 * 1024)    /* max raw I/O transfer size */
++#endif
++#ifndef MAXDUMPPGS
++#define MAXDUMPPGS	(DFLTPHYS/PAGE_SIZE)
++#ifndef MAXHOSTNAMELEN
++#define MAXHOSTNAMELEN 64 /* XXX */
++#endif /* No MAXHOSTNAMELEN.  */
++
++/*
++ * Constants related to network buffer management.
++ * MCLBYTES must be no larger than PAGE_SIZE.
++ */
++#ifndef	MSIZE
++#define MSIZE		256		/* size of an mbuf */
++#endif	/* MSIZE */
++
++#ifndef	MCLSHIFT
++#define MCLSHIFT	11		/* convert bytes to mbuf clusters */
++#endif	/* MCLSHIFT */
++
++#define MCLBYTES	(1 << MCLSHIFT)	/* size of an mbuf cluster */
++
++/*
++ * Some macros for units conversion
++ */
++
++/* clicks to bytes */
++#ifndef ctob
++#define ctob(x)	((x)<<PAGE_SHIFT)
++#endif
++
++/* bytes to clicks */
++#ifndef btoc
++#define btoc(x)	(((vm_offset_t)(x)+PAGE_MASK)>>PAGE_SHIFT)
++#endif
++
++/*
++ * btodb() is messy and perhaps slow because `bytes' may be an off_t.  We
++ * want to shift an unsigned type to avoid sign extension and we don't
++ * want to widen `bytes' unnecessarily.  Assume that the result fits in
++ * a daddr_t.
++ */
++#ifndef btodb
++#define btodb(bytes)	 		/* calculates (bytes / DEV_BSIZE) */ \
++	(sizeof (bytes) > sizeof(long) \
++	 ? (daddr_t)((unsigned long long)(bytes) >> DEV_BSHIFT) \
++	 : (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT))
++#endif
++
++#ifndef dbtob
++#define dbtob(db)			/* calculates (db * DEV_BSIZE) */ \
++	((off_t)(db) << DEV_BSHIFT)
++#endif
++
++#endif /* _NO_NAMESPACE_POLLUTION */
++
++#define	PRIMASK	0x0ff
++#define	PCATCH	0x100		/* OR'd with pri for tsleep to check signals */
++#define	PDROP	0x200	/* OR'd with pri to stop re-entry of interlock mutex */
++
++#define	NBPW	sizeof(int)	/* number of bytes per word (integer) */
++
++#define	CMASK	022		/* default file mask: S_IWGRP|S_IWOTH */
++
++#define	NODEV	(dev_t)(-1)	/* non-existent device */
++
++#define	CBLOCK	128		/* Clist block size, must be a power of 2. */
++#define CBQSIZE	(CBLOCK/NBBY)	/* Quote bytes/cblock - can do better. */
++				/* Data chars/clist. */
++#define	CBSIZE	(CBLOCK - sizeof(struct cblock *) - CBQSIZE)
++#define	CROUND	(CBLOCK - 1)	/* Clist rounding. */
++
++/*
++ * File system parameters and macros.
++ *
++ * MAXBSIZE -	Filesystems are made out of blocks of at most MAXBSIZE bytes
++ *		per block.  MAXBSIZE may be made larger without effecting
++ *		any existing filesystems as long as it does not exceed MAXPHYS,
++ *		and may be made smaller at the risk of not being able to use
++ *		filesystems which require a block size exceeding MAXBSIZE.
++ *
++ * BKVASIZE -	Nominal buffer space per buffer, in bytes.  BKVASIZE is the
++ *		minimum KVM memory reservation the kernel is willing to make.
++ *		Filesystems can of course request smaller chunks.  Actual
++ *		backing memory uses a chunk size of a page (PAGE_SIZE).
++ *
++ *		If you make BKVASIZE too small you risk seriously fragmenting
++ *		the buffer KVM map which may slow things down a bit.  If you
++ *		make it too big the kernel will not be able to optimally use
++ *		the KVM memory reserved for the buffer cache and will wind
++ *		up with too-few buffers.
++ *
++ *		The default is 16384, roughly 2x the block size used by a
++ *		normal UFS filesystem.
++ */
++#define MAXBSIZE	65536	/* must be power of 2 */
++#define BKVASIZE	16384	/* must be power of 2 */
++#define BKVAMASK	(BKVASIZE-1)
++
++/*
++ * Scale factor for scaled integers used to count %cpu time and load avgs.
++ *
++ * The number of CPU `tick's that map to a unique `%age' can be expressed
++ * by the formula (1 / (2 ^ (FSHIFT - 11))).  The maximum load average that
++ * can be calculated (assuming 32 bits) can be closely approximated using
++ * the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15).
++ *
++ * For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age',
++ * FSHIFT must be at least 11; this gives us a maximum load avg of ~1024.
++ */
++#define	FSHIFT	11		/* bits to right of fixed binary point */
++#define FSCALE	(1<<FSHIFT)
++
++#define dbtoc(db)			/* calculates devblks to pages */ \
++	((db + (ctodb(1) - 1)) >> (PAGE_SHIFT - DEV_BSHIFT))
++
++#define ctodb(db)			/* calculates pages to devblks */ \
++	((db) << (PAGE_SHIFT - DEV_BSHIFT))
++
++#endif	/* _SYS_PARAM_H_ */
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/ptrace.h
+@@ -0,0 +1,113 @@
++/*-
++ * Copyright (c) 1984, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)ptrace.h	8.2 (Berkeley) 1/4/94
++ * $FreeBSD: src/sys/sys/ptrace.h,v 1.28.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $
++ */
++ 
++#ifndef _SYS_PTRACE_H
++#define _SYS_PTRACE_H	1
++
++#include <features.h>
++#include <sys/types.h>
++
++__BEGIN_DECLS
++
++#define	PT_TRACE_ME	0	/* child declares it's being traced */
++#define	PT_READ_I	1	/* read word in child's I space */
++#define	PT_READ_D	2	/* read word in child's D space */
++/* was	PT_READ_U	3	 * read word in child's user structure */
++#define	PT_WRITE_I	4	/* write word in child's I space */
++#define	PT_WRITE_D	5	/* write word in child's D space */
++/* was	PT_WRITE_U	6	 * write word in child's user structure */
++#define	PT_CONTINUE	7	/* continue the child */
++#define	PT_KILL		8	/* kill the child process */
++#define	PT_STEP		9	/* single step the child */
++
++#define	PT_ATTACH	10	/* trace some running process */
++#define	PT_DETACH	11	/* stop tracing a process */
++#define PT_IO		12	/* do I/O to/from stopped process. */
++
++#if 0				/* our threading libray is different */
++#define	PT_LWPINFO	13	/* Info about the LWP that stopped. */
++#define PT_GETNUMLWPS	14	/* get total number of threads */
++#define PT_GETLWPLIST	15	/* get thread list */
++#endif
++
++#define PT_CLEARSTEP	16	/* turn off single step */
++#define PT_SETSTEP	17	/* turn on single step */
++#define PT_SUSPEND	18	/* suspend a thread */
++#define PT_RESUME	19	/* resume a thread */
++
++#define	PT_TO_SCE	20
++#define	PT_TO_SCX	21
++#define	PT_SYSCALL	22
++
++#define PT_GETREGS      33	/* get general-purpose registers */
++#define PT_SETREGS      34	/* set general-purpose registers */
++#define PT_GETFPREGS    35	/* get floating-point registers */
++#define PT_SETFPREGS    36	/* set floating-point registers */
++#define PT_GETDBREGS    37	/* get debugging registers */
++#define PT_SETDBREGS    38	/* set debugging registers */
++#define PT_FIRSTMACH    64	/* for machine-specific requests */
++
++struct ptrace_io_desc {
++	int	piod_op;	/* I/O operation */
++	void	*piod_offs;	/* child offset */
++	void	*piod_addr;	/* parent offset */
++	size_t	piod_len;	/* request length */
++};
++
++/*
++ * Operations in piod_op.
++ */
++#define PIOD_READ_D	1	/* Read from D space */
++#define PIOD_WRITE_D	2	/* Write to D space */
++#define PIOD_READ_I	3	/* Read from I space */
++#define PIOD_WRITE_I	4	/* Write to I space */
++
++#if 0
++/* Argument structure for PT_LWPINFO. */
++struct ptrace_lwpinfo {
++	lwpid_t	pl_lwpid;	/* LWP described. */
++	int	pl_event;	/* Event that stopped the LWP. */
++#define	PL_EVENT_NONE	0
++#define	PL_EVENT_SIGNAL	1
++	int	pl_flags;	/* LWP flags. */
++#define	PL_FLAG_SA	0x01	/* M:N thread */
++#define	PL_FLAG_BOUND	0x02	/* M:N bound thread */
++	sigset_t	pl_sigmask;	/* LWP signal mask */
++	sigset_t	pl_siglist;	/* LWP pending signal */
++};
++#endif
++
++extern int ptrace(int _request, pid_t _pid, caddr_t _addr, int _data) __THROW;
++
++__END_DECLS
++
++#endif /* _SYS_PTRACE_H */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/reboot.h
+@@ -0,0 +1,81 @@
++/*-
++ * Copyright (c) 1982, 1986, 1988, 1993, 1994
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)reboot.h	8.3 (Berkeley) 12/13/94
++ * $FreeBSD: src/sys/sys/reboot.h,v 1.26.18.1 2008/11/25 02:59:29 kensmith Exp $
++ */
++
++#ifndef _SYS_REBOOT_H_
++#define	_SYS_REBOOT_H_	1
++
++#include <features.h>
++
++/*
++ * Arguments to reboot system call.  These are passed to
++ * the boot program and on to init.
++ */
++#define	RB_AUTOBOOT	0	/* flags for system auto-booting itself */
++
++#define	RB_ASKNAME	0x001	/* ask for file name to reboot from */
++#define	RB_SINGLE	0x002	/* reboot to single user only */
++#define	RB_NOSYNC	0x004	/* dont sync before reboot */
++#define	RB_HALT		0x008	/* don't reboot, just halt */
++#define	RB_INITNAME	0x010	/* name given for /etc/init (unused) */
++#define	RB_DFLTROOT	0x020	/* use compiled-in rootdev */
++#define	RB_KDB		0x040	/* give control to kernel debugger */
++#define	RB_RDONLY	0x080	/* mount root fs read-only */
++#define	RB_DUMP		0x100	/* dump kernel memory before reboot */
++#define	RB_MINIROOT	0x200	/* mini-root present in memory at boot time */
++#define	RB_VERBOSE	0x800	/* print all potentially useful info */
++#define	RB_SERIAL	0x1000	/* use serial port as console */
++#define	RB_CDROM	0x2000	/* use cdrom as root */
++#define	RB_POWEROFF	0x4000	/* turn the power off if possible */
++#define	RB_GDB		0x8000	/* use GDB remote debugger instead of DDB */
++#define	RB_MUTE		0x10000	/* start up with the console muted */
++#define	RB_SELFTEST	0x20000	/* don't complete the boot; do selftest */
++#define	RB_RESERVED1	0x40000	/* reserved for internal use of boot blocks */
++#define	RB_RESERVED2	0x80000	/* reserved for internal use of boot blocks */
++#define	RB_PAUSE	0x100000 /* pause after each output line during probe */
++#define	RB_MULTIPLE	0x20000000	/* use multiple consoles */
++
++#define	RB_BOOTINFO	0x80000000	/* have `struct bootinfo *' arg */
++
++/* 
++ * Compatibility with Linux
++ */
++#define RB_HALT_SYSTEM	RB_HALT
++#define RB_POWER_OFF	RB_POWEROFF
++
++__BEGIN_DECLS
++
++/* Reboot or halt the system.  */
++extern int reboot (int __howto) __THROW;
++
++__END_DECLS
++
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/rfork.h
+@@ -0,0 +1,98 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/*
++ * Copyright (c) 1989, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)unistd.h	8.2 (Berkeley) 1/7/94
++ * $FreeBSD: src/sys/sys/unistd.h,v 1.22.2.1 2000/03/18 23:20:12 jasone Exp $
++ */
++
++#ifndef _SYS_RFORK_H
++#define _SYS_RFORK_H
++
++#include <features.h>
++
++/*
++ * rfork() options.
++ *
++ * XXX currently, operations without RFPROC set are not supported.
++ */
++#define RFNAMEG		(1<<0)  /* UNIMPL new plan9 `name space' */
++#define RFENVG		(1<<1)  /* UNIMPL copy plan9 `env space' */
++#define RFFDG		(1<<2)  /* copy fd table */
++#define RFNOTEG		(1<<3)  /* UNIMPL create new plan9 `note group' */
++#define RFPROC		(1<<4)  /* change child (else changes curproc) */
++#define RFMEM		(1<<5)  /* share `address space' */
++#define RFNOWAIT	(1<<6)  /* parent need not wait() on child */
++#define RFCNAMEG	(1<<10) /* UNIMPL zero plan9 `name space' */
++#define RFCENVG		(1<<11) /* UNIMPL zero plan9 `env space' */
++#define RFCFDG		(1<<12) /* zero fd table */
++#define RFTHREAD	(1<<13)	/* enable kernel thread support */
++#define RFSIGSHARE	(1<<14)	/* share signal handlers */
++#define RFLINUXTHPN     (1<<16) /* do linux clone exit parent notification */
++#define	RFSTOPPED	(1<<17) /* leave child in a stopped state */
++#define	RFHIGHPID	(1<<18) /* use a pid higher than 10 (idleproc) */
++#define	RFTSIGZMB	(1<<19) /* select signal for exit parent notification */
++#define	RFTSIGSHIFT	20      /* selected signal number is in bits 20-27  */
++#define	RFTSIGMASK	0xFF
++#define	RFTSIGNUM(flags)	(((flags) >> RFTSIGSHIFT) & RFTSIGMASK)
++#define	RFTSIGFLAGS(signum)	((signum) << RFTSIGSHIFT)
++#define RFPPWAIT	(1<<31) /* parent sleeps until child exits (vfork) */
++
++#define RFTHPNSHIFT	24	/* reserve bits 24-30 */
++#define RFTHPNMASK	0x7F    /* for compatibility with linuxthreads/clone()   */
++				/* allow to specify  "clone exit parent notification" signal */
++#define RFTHPNSIGNUM(flags)	(((flags) >> RFTHPNSHIFT) & RFTHPNMASK)
++
++__BEGIN_DECLS
++
++extern int rfork (int __flags) __THROW;
++
++#ifdef _LIBC
++extern int __rfork (int __flags);
++#endif
++
++__END_DECLS
++
++#endif /* _SYS_RFORK_H */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/socketvar.h
+@@ -0,0 +1,189 @@
++/* This header is used on many systems but for GNU we have 
++   almost everything defined in the standard header.  */
++
++#include <sys/socket.h>
++
++/*-
++ * Copyright (c) 1982, 1986, 1990, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)socketvar.h	8.3 (Berkeley) 2/19/95
++ *
++ * $FreeBSD: src/sys/sys/socketvar.h,v 1.171.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $
++ */
++
++#ifndef _SYS_SOCKETVAR_H_
++#define _SYS_SOCKETVAR_H_
++
++#include <sys/queue.h>			/* for TAILQ macros */
++#include <sys/selinfo.h>		/* for struct selinfo */
++#include <sys/_lock.h>
++#include <sys/_mutex.h>
++#include <sys/_sx.h>
++
++struct socket;
++struct vnet;
++
++struct	xsockbuf {
++	u_int	sb_cc;
++	u_int	sb_hiwat;
++	u_int	sb_mbcnt;
++	u_int   sb_mcnt;
++	u_int   sb_ccnt;
++	u_int	sb_mbmax;
++	int	sb_lowat;
++	int	sb_timeo;
++	short	sb_flags;
++};
++
++/*
++ * Variables for socket buffering.
++ */
++struct	sockbuf {
++	struct	selinfo sb_sel;	/* process selecting read/write */
++	struct	mtx sb_mtx;	/* sockbuf lock */
++	struct	sx sb_sx;	/* prevent I/O interlacing */
++	short	sb_state;	/* (c/d) socket state on sockbuf */
++#define	sb_startzero	sb_mb
++	struct	mbuf *sb_mb;	/* (c/d) the mbuf chain */
++	struct	mbuf *sb_mbtail; /* (c/d) the last mbuf in the chain */
++	struct	mbuf *sb_lastrecord;	/* (c/d) first mbuf of last
++					 * record in socket buffer */
++	struct	mbuf *sb_sndptr; /* (c/d) pointer into mbuf chain */
++	u_int	sb_sndptroff;	/* (c/d) byte offset of ptr into chain */
++	u_int	sb_cc;		/* (c/d) actual chars in buffer */
++	u_int	sb_hiwat;	/* (c/d) max actual char count */
++	u_int	sb_mbcnt;	/* (c/d) chars of mbufs used */
++	u_int   sb_mcnt;        /* (c/d) number of mbufs in buffer */
++	u_int   sb_ccnt;        /* (c/d) number of clusters in buffer */
++	u_int	sb_mbmax;	/* (c/d) max chars of mbufs to use */
++	u_int	sb_ctl;		/* (c/d) non-data chars in buffer */
++	int	sb_lowat;	/* (c/d) low water mark */
++	int	sb_timeo;	/* (c/d) timeout for read/write */
++	short	sb_flags;	/* (c/d) flags, see below */
++	int	(*sb_upcall)(struct socket *, void *, int); /* (c/d) */
++	void	*sb_upcallarg;	/* (c/d) */
++};
++
++
++/*
++ * Kernel structure per socket.
++ * Contains send and receive buffer queues,
++ * handle on protocol and pointer to protocol
++ * private data and error information.
++ */
++typedef	u_quad_t so_gen_t;
++
++
++/*-
++ * Locking key to struct socket:
++ * (a) constant after allocation, no locking required.
++ * (b) locked by SOCK_LOCK(so).
++ * (c) locked by SOCKBUF_LOCK(&so->so_rcv).
++ * (d) locked by SOCKBUF_LOCK(&so->so_snd).
++ * (e) locked by ACCEPT_LOCK().
++ * (f) not locked since integer reads/writes are atomic.
++ * (g) used only as a sleep/wakeup address, no value.
++ * (h) locked by global mutex so_global_mtx.
++ */
++struct socket {
++	int	so_count;		/* (b) reference count */
++	short	so_type;		/* (a) generic type, see socket.h */
++	short	so_options;		/* from socket call, see socket.h */
++	short	so_linger;		/* time to linger while closing */
++	short	so_state;		/* (b) internal state flags SS_* */
++	int	so_qstate;		/* (e) internal state flags SQ_* */
++	void	*so_pcb;		/* protocol control block */
++	struct	vnet *so_vnet;		/* network stack instance */
++	struct	protosw *so_proto;	/* (a) protocol handle */
++/*
++ * Variables for connection queuing.
++ * Socket where accepts occur is so_head in all subsidiary sockets.
++ * If so_head is 0, socket is not related to an accept.
++ * For head socket so_incomp queues partially completed connections,
++ * while so_comp is a queue of connections ready to be accepted.
++ * If a connection is aborted and it has so_head set, then
++ * it has to be pulled out of either so_incomp or so_comp.
++ * We allow connections to queue up based on current queue lengths
++ * and limit on number of queued connections for this socket.
++ */
++	struct	socket *so_head;	/* (e) back pointer to listen socket */
++	TAILQ_HEAD(, socket) so_incomp;	/* (e) queue of partial unaccepted connections */
++	TAILQ_HEAD(, socket) so_comp;	/* (e) queue of complete unaccepted connections */
++	TAILQ_ENTRY(socket) so_list;	/* (e) list of unaccepted connections */
++	u_short	so_qlen;		/* (e) number of unaccepted connections */
++	u_short	so_incqlen;		/* (e) number of unaccepted incomplete
++					   connections */
++	u_short	so_qlimit;		/* (e) max number queued connections */
++	short	so_timeo;		/* (g) connection timeout */
++	u_short	so_error;		/* (f) error affecting connection */
++	struct	sigio *so_sigio;	/* [sg] information for async I/O or
++					   out of band data (SIGURG) */
++	u_long	so_oobmark;		/* (c) chars to oob mark */
++	TAILQ_HEAD(, aiocblist) so_aiojobq; /* AIO ops waiting on socket */
++
++	struct sockbuf so_rcv, so_snd;
++
++	struct	ucred *so_cred;		/* (a) user credentials */
++	struct	label *so_label;	/* (b) MAC label for socket */
++	struct	label *so_peerlabel;	/* (b) cached MAC label for peer */
++	/* NB: generation count must not be first. */
++	so_gen_t so_gencnt;		/* (h) generation count */
++	void	*so_emuldata;		/* (b) private data for emulators */
++ 	struct so_accf {
++		struct	accept_filter *so_accept_filter;
++		void	*so_accept_filter_arg;	/* saved filter args */
++		char	*so_accept_filter_str;	/* saved user args */
++	} *so_accf;
++	int so_fibnum;		/* routing domain for this socket */
++};
++
++/*
++ * Externalized form of struct socket used by the sysctl(3) interface.
++ */
++struct xsocket {
++	size_t	xso_len;	/* length of this structure */
++	struct	socket *xso_so;	/* makes a convenient handle sometimes */
++	short	so_type;
++	short	so_options;
++	short	so_linger;
++	short	so_state;
++	caddr_t	so_pcb;		/* another convenient handle */
++	int	xso_protocol;
++	int	xso_family;
++	u_short	so_qlen;
++	u_short	so_incqlen;
++	u_short	so_qlimit;
++	short	so_timeo;
++	u_short	so_error;
++	pid_t	so_pgid;
++	u_long	so_oobmark;
++	struct xsockbuf so_rcv, so_snd;
++	uid_t	so_uid;		/* XXX */
++};
++
++#endif /* !_SYS_SOCKETVAR_H_ */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/swap.h
+@@ -0,0 +1,37 @@
++/* Calls to enable swapping on specified locations.  FreeBSD version.
++   Copyright (C) 1996-1997, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef __SYS_SWAP_H
++
++#define __SYS_SWAP_H	1
++#include <features.h>
++
++
++__BEGIN_DECLS
++
++/* Make the block special device PATH available to the system for swapping.
++   This call is restricted to the super-user.  */
++extern int swapon (__const char *__path) __THROW;
++
++/* Stop using block special device PATH for swapping.  */
++extern int swapoff (__const char *__path) __THROW;
++
++__END_DECLS
++
++#endif /* sys/swap.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/syscall.h
+@@ -0,0 +1,486 @@
++#ifndef _SYSCALL_H
++#define _SYSCALL_H	1
++
++/*
++ * System call numbers.
++ *
++ * DO NOT EDIT-- this file is automatically generated.
++ * $FreeBSD$
++ * created from FreeBSD: head/sys/kern/syscalls.master 224987 2011-08-18 22:51:30Z jonathan 
++ */
++
++#define	SYS_syscall	0
++#define	SYS_exit	1
++#define	SYS_fork	2
++#define	SYS_read	3
++#define	SYS_write	4
++#define	SYS_open	5
++#define	SYS_close	6
++#define	SYS_wait4	7
++				/* 8 is old creat */
++#define	SYS_link	9
++#define	SYS_unlink	10
++				/* 11 is obsolete execv */
++#define	SYS_chdir	12
++#define	SYS_fchdir	13
++#define	SYS_mknod	14
++#define	SYS_chmod	15
++#define	SYS_chown	16
++#define	SYS_break	17
++#define	SYS_freebsd4_getfsstat	18
++				/* 19 is old lseek */
++#define	SYS_getpid	20
++#define	SYS_mount	21
++#define	SYS_unmount	22
++#define	SYS_setuid	23
++#define	SYS_getuid	24
++#define	SYS_geteuid	25
++#define	SYS_ptrace	26
++#define	SYS_recvmsg	27
++#define	SYS_sendmsg	28
++#define	SYS_recvfrom	29
++#define	SYS_accept	30
++#define	SYS_getpeername	31
++#define	SYS_getsockname	32
++#define	SYS_access	33
++#define	SYS_chflags	34
++#define	SYS_fchflags	35
++#define	SYS_sync	36
++#define	SYS_kill	37
++				/* 38 is old stat */
++#define	SYS_getppid	39
++				/* 40 is old lstat */
++#define	SYS_dup	41
++#define	SYS_pipe	42
++#define	SYS_getegid	43
++#define	SYS_profil	44
++#define	SYS_ktrace	45
++				/* 46 is old sigaction */
++#define	SYS_getgid	47
++				/* 48 is old sigprocmask */
++#define	SYS_getlogin	49
++#define	SYS_setlogin	50
++#define	SYS_acct	51
++				/* 52 is old sigpending */
++#define	SYS_sigaltstack	53
++#define	SYS_ioctl	54
++#define	SYS_reboot	55
++#define	SYS_revoke	56
++#define	SYS_symlink	57
++#define	SYS_readlink	58
++#define	SYS_execve	59
++#define	SYS_umask	60
++#define	SYS_chroot	61
++				/* 62 is old fstat */
++				/* 63 is old getkerninfo */
++				/* 64 is old getpagesize */
++#define	SYS_msync	65
++#define	SYS_vfork	66
++				/* 67 is obsolete vread */
++				/* 68 is obsolete vwrite */
++#define	SYS_sbrk	69
++#define	SYS_sstk	70
++				/* 71 is old mmap */
++#define	SYS_vadvise	72
++#define	SYS_munmap	73
++#define	SYS_mprotect	74
++#define	SYS_madvise	75
++				/* 76 is obsolete vhangup */
++				/* 77 is obsolete vlimit */
++#define	SYS_mincore	78
++#define	SYS_getgroups	79
++#define	SYS_setgroups	80
++#define	SYS_getpgrp	81
++#define	SYS_setpgid	82
++#define	SYS_setitimer	83
++				/* 84 is old wait */
++#define	SYS_swapon	85
++#define	SYS_getitimer	86
++				/* 87 is old gethostname */
++				/* 88 is old sethostname */
++#define	SYS_getdtablesize	89
++#define	SYS_dup2	90
++#define	SYS_fcntl	92
++#define	SYS_select	93
++#define	SYS_fsync	95
++#define	SYS_setpriority	96
++#define	SYS_socket	97
++#define	SYS_connect	98
++				/* 99 is old accept */
++#define	SYS_getpriority	100
++				/* 101 is old send */
++				/* 102 is old recv */
++				/* 103 is old sigreturn */
++#define	SYS_bind	104
++#define	SYS_setsockopt	105
++#define	SYS_listen	106
++				/* 107 is obsolete vtimes */
++				/* 108 is old sigvec */
++				/* 109 is old sigblock */
++				/* 110 is old sigsetmask */
++				/* 111 is old sigsuspend */
++				/* 112 is old sigstack */
++				/* 113 is old recvmsg */
++				/* 114 is old sendmsg */
++				/* 115 is obsolete vtrace */
++#define	SYS_gettimeofday	116
++#define	SYS_getrusage	117
++#define	SYS_getsockopt	118
++#define	SYS_readv	120
++#define	SYS_writev	121
++#define	SYS_settimeofday	122
++#define	SYS_fchown	123
++#define	SYS_fchmod	124
++				/* 125 is old recvfrom */
++#define	SYS_setreuid	126
++#define	SYS_setregid	127
++#define	SYS_rename	128
++				/* 129 is old truncate */
++				/* 130 is old ftruncate */
++#define	SYS_flock	131
++#define	SYS_mkfifo	132
++#define	SYS_sendto	133
++#define	SYS_shutdown	134
++#define	SYS_socketpair	135
++#define	SYS_mkdir	136
++#define	SYS_rmdir	137
++#define	SYS_utimes	138
++				/* 139 is obsolete 4.2 sigreturn */
++#define	SYS_adjtime	140
++				/* 141 is old getpeername */
++				/* 142 is old gethostid */
++				/* 143 is old sethostid */
++				/* 144 is old getrlimit */
++				/* 145 is old setrlimit */
++				/* 146 is old killpg */
++#define	SYS_setsid	147
++#define	SYS_quotactl	148
++				/* 149 is old quota */
++				/* 150 is old getsockname */
++#define	SYS_nlm_syscall	154
++#define	SYS_nfssvc	155
++				/* 156 is old getdirentries */
++#define	SYS_freebsd4_statfs	157
++#define	SYS_freebsd4_fstatfs	158
++#define	SYS_lgetfh	160
++#define	SYS_getfh	161
++#define	SYS_freebsd4_getdomainname	162
++#define	SYS_freebsd4_setdomainname	163
++#define	SYS_freebsd4_uname	164
++#define	SYS_sysarch	165
++#define	SYS_rtprio	166
++#define	SYS_semsys	169
++#define	SYS_msgsys	170
++#define	SYS_shmsys	171
++#define	SYS_freebsd6_pread	173
++#define	SYS_freebsd6_pwrite	174
++#define	SYS_setfib	175
++#define	SYS_ntp_adjtime	176
++#define	SYS_setgid	181
++#define	SYS_setegid	182
++#define	SYS_seteuid	183
++#define	SYS_stat	188
++#define	SYS_fstat	189
++#define	SYS_lstat	190
++#define	SYS_pathconf	191
++#define	SYS_fpathconf	192
++#define	SYS_getrlimit	194
++#define	SYS_setrlimit	195
++#define	SYS_getdirentries	196
++#define	SYS_freebsd6_mmap	197
++#define	SYS___syscall	198
++#define	SYS_freebsd6_lseek	199
++#define	SYS_freebsd6_truncate	200
++#define	SYS_freebsd6_ftruncate	201
++#define	SYS___sysctl	202
++#define	SYS_mlock	203
++#define	SYS_munlock	204
++#define	SYS_undelete	205
++#define	SYS_futimes	206
++#define	SYS_getpgid	207
++#define	SYS_poll	209
++#define	SYS_freebsd7___semctl	220
++#define	SYS_semget	221
++#define	SYS_semop	222
++#define	SYS_freebsd7_msgctl	224
++#define	SYS_msgget	225
++#define	SYS_msgsnd	226
++#define	SYS_msgrcv	227
++#define	SYS_shmat	228
++#define	SYS_freebsd7_shmctl	229
++#define	SYS_shmdt	230
++#define	SYS_shmget	231
++#define	SYS_clock_gettime	232
++#define	SYS_clock_settime	233
++#define	SYS_clock_getres	234
++#define	SYS_ktimer_create	235
++#define	SYS_ktimer_delete	236
++#define	SYS_ktimer_settime	237
++#define	SYS_ktimer_gettime	238
++#define	SYS_ktimer_getoverrun	239
++#define	SYS_nanosleep	240
++#define	SYS_ntp_gettime	248
++#define	SYS_minherit	250
++#define	SYS_rfork	251
++#define	SYS_openbsd_poll	252
++#define	SYS_issetugid	253
++#define	SYS_lchown	254
++#define	SYS_aio_read	255
++#define	SYS_aio_write	256
++#define	SYS_lio_listio	257
++#define	SYS_getdents	272
++#define	SYS_lchmod	274
++#define	SYS_netbsd_lchown	275
++#define	SYS_lutimes	276
++#define	SYS_netbsd_msync	277
++#define	SYS_nstat	278
++#define	SYS_nfstat	279
++#define	SYS_nlstat	280
++#define	SYS_preadv	289
++#define	SYS_pwritev	290
++#define	SYS_freebsd4_fhstatfs	297
++#define	SYS_fhopen	298
++#define	SYS_fhstat	299
++#define	SYS_modnext	300
++#define	SYS_modstat	301
++#define	SYS_modfnext	302
++#define	SYS_modfind	303
++#define	SYS_kldload	304
++#define	SYS_kldunload	305
++#define	SYS_kldfind	306
++#define	SYS_kldnext	307
++#define	SYS_kldstat	308
++#define	SYS_kldfirstmod	309
++#define	SYS_getsid	310
++#define	SYS_setresuid	311
++#define	SYS_setresgid	312
++				/* 313 is obsolete signanosleep */
++#define	SYS_aio_return	314
++#define	SYS_aio_suspend	315
++#define	SYS_aio_cancel	316
++#define	SYS_aio_error	317
++#define	SYS_oaio_read	318
++#define	SYS_oaio_write	319
++#define	SYS_olio_listio	320
++#define	SYS_yield	321
++				/* 322 is obsolete thr_sleep */
++				/* 323 is obsolete thr_wakeup */
++#define	SYS_mlockall	324
++#define	SYS_munlockall	325
++#define	SYS___getcwd	326
++#define	SYS_sched_setparam	327
++#define	SYS_sched_getparam	328
++#define	SYS_sched_setscheduler	329
++#define	SYS_sched_getscheduler	330
++#define	SYS_sched_yield	331
++#define	SYS_sched_get_priority_max	332
++#define	SYS_sched_get_priority_min	333
++#define	SYS_sched_rr_get_interval	334
++#define	SYS_utrace	335
++#define	SYS_freebsd4_sendfile	336
++#define	SYS_kldsym	337
++#define	SYS_jail	338
++#define	SYS_nnpfs_syscall	339
++#define	SYS_sigprocmask	340
++#define	SYS_sigsuspend	341
++#define	SYS_freebsd4_sigaction	342
++#define	SYS_sigpending	343
++#define	SYS_freebsd4_sigreturn	344
++#define	SYS_sigtimedwait	345
++#define	SYS_sigwaitinfo	346
++#define	SYS___acl_get_file	347
++#define	SYS___acl_set_file	348
++#define	SYS___acl_get_fd	349
++#define	SYS___acl_set_fd	350
++#define	SYS___acl_delete_file	351
++#define	SYS___acl_delete_fd	352
++#define	SYS___acl_aclcheck_file	353
++#define	SYS___acl_aclcheck_fd	354
++#define	SYS_extattrctl	355
++#define	SYS_extattr_set_file	356
++#define	SYS_extattr_get_file	357
++#define	SYS_extattr_delete_file	358
++#define	SYS_aio_waitcomplete	359
++#define	SYS_getresuid	360
++#define	SYS_getresgid	361
++#define	SYS_kqueue	362
++#define	SYS_kevent	363
++#define	SYS_extattr_set_fd	371
++#define	SYS_extattr_get_fd	372
++#define	SYS_extattr_delete_fd	373
++#define	SYS___setugid	374
++#define SYS_nfsclnt	375
++#define	SYS_eaccess	376
++#define	SYS_afs3_syscall	377
++#define	SYS_nmount	378
++#define	SYS___mac_get_proc	384
++#define	SYS___mac_set_proc	385
++#define	SYS___mac_get_fd	386
++#define	SYS___mac_get_file	387
++#define	SYS___mac_set_fd	388
++#define	SYS___mac_set_file	389
++#define	SYS_kenv	390
++#define	SYS_lchflags	391
++#define	SYS_uuidgen	392
++#define	SYS_sendfile	393
++#define	SYS_mac_syscall	394
++#define	SYS_getfsstat	395
++#define	SYS_statfs	396
++#define	SYS_fstatfs	397
++#define	SYS_fhstatfs	398
++#define	SYS_ksem_close	400
++#define	SYS_ksem_post	401
++#define	SYS_ksem_wait	402
++#define	SYS_ksem_trywait	403
++#define	SYS_ksem_init	404
++#define	SYS_ksem_open	405
++#define	SYS_ksem_unlink	406
++#define	SYS_ksem_getvalue	407
++#define	SYS_ksem_destroy	408
++#define	SYS___mac_get_pid	409
++#define	SYS___mac_get_link	410
++#define	SYS___mac_set_link	411
++#define	SYS_extattr_set_link	412
++#define	SYS_extattr_get_link	413
++#define	SYS_extattr_delete_link	414
++#define	SYS___mac_execve	415
++#define	SYS_sigaction	416
++#define	SYS_sigreturn	417
++#define	SYS_getcontext	421
++#define	SYS_setcontext	422
++#define	SYS_swapcontext	423
++#define	SYS_swapoff	424
++#define	SYS___acl_get_link	425
++#define	SYS___acl_set_link	426
++#define	SYS___acl_delete_link	427
++#define	SYS___acl_aclcheck_link	428
++#define	SYS_sigwait	429
++#define	SYS_thr_create	430
++#define	SYS_thr_exit	431
++#define	SYS_thr_self	432
++#define	SYS_thr_kill	433
++#define	SYS__umtx_lock	434
++#define	SYS__umtx_unlock	435
++#define	SYS_jail_attach	436
++#define	SYS_extattr_list_fd	437
++#define	SYS_extattr_list_file	438
++#define	SYS_extattr_list_link	439
++#define	SYS_ksem_timedwait	441
++#define	SYS_thr_suspend	442
++#define	SYS_thr_wake	443
++#define	SYS_kldunloadf	444
++#define	SYS_audit	445
++#define	SYS_auditon	446
++#define	SYS_getauid	447
++#define	SYS_setauid	448
++#define	SYS_getaudit	449
++#define	SYS_setaudit	450
++#define	SYS_getaudit_addr	451
++#define	SYS_setaudit_addr	452
++#define	SYS_auditctl	453
++#define	SYS__umtx_op	454
++#define	SYS_thr_new	455
++#define	SYS_sigqueue	456
++#define	SYS_kmq_open	457
++#define	SYS_kmq_setattr	458
++#define	SYS_kmq_timedreceive	459
++#define	SYS_kmq_timedsend	460
++#define	SYS_kmq_notify	461
++#define	SYS_kmq_unlink	462
++#define	SYS_abort2	463
++#define	SYS_thr_set_name	464
++#define	SYS_aio_fsync	465
++#define	SYS_rtprio_thread	466
++#define	SYS_sctp_peeloff	471
++#define	SYS_sctp_generic_sendmsg	472
++#define	SYS_sctp_generic_sendmsg_iov	473
++#define	SYS_sctp_generic_recvmsg	474
++#define	SYS_pread	475
++#define	SYS_pwrite	476
++#define	SYS_mmap	477
++#define	SYS_lseek	478
++#define	SYS_truncate	479
++#define	SYS_ftruncate	480
++#define	SYS_thr_kill2	481
++#define	SYS_shm_open	482
++#define	SYS_shm_unlink	483
++#define	SYS_cpuset	484
++#define	SYS_cpuset_setid	485
++#define	SYS_cpuset_getid	486
++#define	SYS_cpuset_getaffinity	487
++#define	SYS_cpuset_setaffinity	488
++#define	SYS_faccessat	489
++#define	SYS_fchmodat	490
++#define	SYS_fchownat	491
++#define	SYS_fexecve	492
++#define	SYS_fstatat	493
++#define	SYS_futimesat	494
++#define	SYS_linkat	495
++#define	SYS_mkdirat	496
++#define	SYS_mkfifoat	497
++#define	SYS_mknodat	498
++#define	SYS_openat	499
++#define	SYS_readlinkat	500
++#define	SYS_renameat	501
++#define	SYS_symlinkat	502
++#define	SYS_unlinkat	503
++#define	SYS_posix_openpt	504
++#define	SYS_gssd_syscall	505
++#define	SYS_jail_get	506
++#define	SYS_jail_set	507
++#define	SYS_jail_remove	508
++#define	SYS_closefrom	509
++#define	SYS___semctl	510
++#define	SYS_msgctl	SYS_freebsd7_msgctl
++#define	SYS_shmctl	SYS_freebsd7_shmctl
++#define	SYS_lpathconf	513
++#define	SYS_cap_new	514
++#define	SYS_cap_getrights	515
++#define	SYS_cap_enter	516
++#define	SYS_cap_getmode	517
++#define	SYS_pdfork	518
++#define	SYS_pdkill	519
++#define	SYS_pdgetpid	520
++#define	SYS_pselect	522
++#define	SYS_getloginclass	523
++#define	SYS_setloginclass	524
++#define	SYS_rctl_get_racct	525
++#define	SYS_rctl_get_rules	526
++#define	SYS_rctl_get_limits	527
++#define	SYS_rctl_add_rule	528
++#define	SYS_rctl_remove_rule	529
++#define SYS_posix_fallocate	530
++#define SYS_posix_fadvise	531
++#define	SYS_MAXSYSCALL	532
++
++#define SYS_obreak	SYS_break
++#define SYS_sysctl	SYS___sysctl
++#define SYS_getcwd	SYS___getcwd
++#define SYS_setugid	SYS___setugid
++#define SYS_semctl	SYS_freebsd7___semctl
++
++#define SYS_acl_get_file	SYS___acl_get_file
++#define SYS_acl_set_file	SYS___acl_set_file
++#define SYS_acl_get_fd		SYS___acl_get_fd
++#define SYS_acl_set_fd		SYS___acl_set_fd
++#define SYS_acl_delete_file	SYS___acl_delete_file
++#define SYS_acl_delete_fd	SYS___acl_delete_fd
++#define SYS_acl_aclcheck_file	SYS___acl_aclcheck_file
++#define SYS_acl_aclcheck_fd	SYS___acl_aclcheck_fd
++#define SYS_acl_get_link	SYS___acl_get_link
++#define SYS_acl_set_link	SYS___acl_set_link
++#define SYS_acl_delete_link	SYS___acl_delete_link
++#define SYS_acl_aclcheck_link	SYS___acl_aclcheck_link
++
++#define SYS_mac_get_proc	SYS___mac_get_proc
++#define SYS_mac_set_proc	SYS___mac_set_proc
++#define SYS_mac_get_fd		SYS___mac_get_fd
++#define SYS_mac_get_file	SYS___mac_get_file
++#define SYS_mac_set_fd		SYS___mac_set_fd
++#define SYS_mac_set_file	SYS___mac_set_file
++#define SYS_mac_get_pid		SYS___mac_get_pid
++#define SYS_mac_get_link	SYS___mac_get_link
++#define SYS_mac_set_link	SYS___mac_set_link
++#define SYS_mac_execve		SYS___mac_execve
++
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/sysmacros.h
+@@ -0,0 +1,36 @@
++/* Definitions of macros to access `dev_t' values.  FreeBSD version.
++   Copyright (C) 1996-1997, 1999, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _SYS_SYSMACROS_H
++#define _SYS_SYSMACROS_H	1
++
++/* For compatibility we provide alternative names.
++
++   The problem here is that compilers other than GCC probably don't
++   have the `long long' type and so `dev_t' is actually an array.  */
++#define major(dev) ((int)(((unsigned int) (dev) >> 8) & 0xff))
++#define minor(dev) ((int)((dev) & 0xffff00ff))
++#define makedev(major, minor) (((major) << 8) | (minor))
++
++/* Access the functions with their new names.  */
++#define gnu_dev_major(dev) major (dev)
++#define gnu_dev_minor(dev) minor (dev)
++#define gnu_dev_makedev(maj, min) makedev (maj, min)
++
++#endif /* sys/sysmacros.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/ttydefaults.h
+@@ -0,0 +1,97 @@
++/*-
++ * Copyright (c) 1982, 1986, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ * (c) UNIX System Laboratories, Inc.
++ * All or some portions of this file are derived from material licensed
++ * to the University of California by American Telephone and Telegraph
++ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
++ * the permission of UNIX System Laboratories, Inc.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)ttydefaults.h	8.4 (Berkeley) 1/21/94
++ */
++
++/*
++ * System wide defaults for terminal state.  FreeBSD version.
++ */
++#ifndef _SYS_TTYDEFAULTS_H_
++#define _SYS_TTYDEFAULTS_H_
++
++/*
++ * Defaults on "first" open.
++ */
++#define TTYDEF_IFLAG	(BRKINT | ICRNL | IMAXBEL | IXON | IXANY)
++#define TTYDEF_OFLAG	(OPOST | ONLCR)
++#define TTYDEF_LFLAG	(ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
++#define TTYDEF_CFLAG	(CREAD | CS8 | HUPCL)
++#define TTYDEF_SPEED	(B9600)
++
++/*
++ * Control Character Defaults
++ */
++#define CTRL(x)	(x&037)
++#define CEOF		CTRL('d')
++#ifdef _POSIX_VDISABLE
++# define CEOL		_POSIX_VDISABLE
++#else
++# define CEOL		((unsigned char)'\377')	/* XXX avoid _POSIX_VDISABLE */
++#endif
++#define CERASE		0177
++#define CERASE2		CTRL('h')
++#define CINTR		CTRL('c')
++#define CSTATUS		CTRL('t')
++#define CKILL		CTRL('u')
++#define CMIN		1
++#define CQUIT		034		/* FS, ^\ */
++#define CSUSP		CTRL('z')
++#define CTIME		0
++#define CDSUSP		CTRL('y')
++#define CSTART		CTRL('q')
++#define CSTOP		CTRL('s')
++#define CLNEXT		CTRL('v')
++#define CDISCARD 	CTRL('o')
++#define CWERASE 	CTRL('w')
++#define CREPRINT 	CTRL('r')
++#define CEOT		CEOF
++/* compat */
++#define CBRK		CEOL
++#define CRPRNT		CREPRINT
++#define CFLUSH		CDISCARD
++
++/* PROTECTED INCLUSION ENDS HERE */
++#endif /* !_SYS_TTYDEFAULTS_H_ */
++
++/*
++ * #define TTYDEFCHARS to include an array of default control characters.
++ */
++#ifdef TTYDEFCHARS
++cc_t	ttydefchars[NCCS] = {
++	CEOF,	CEOL,	CEOL,	CERASE, CWERASE, CKILL, CREPRINT,
++	CERASE2, CINTR,	CQUIT,	CSUSP,	CDSUSP,	CSTART,	CSTOP,	CLNEXT,
++	CDISCARD, CMIN,	CTIME,  CSTATUS, _POSIX_VDISABLE
++};
++#undef TTYDEFCHARS
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/ucontext.h
+@@ -0,0 +1,48 @@
++/* Data structures for user-level context switching.  Generic version.
++   Copyright (C) 1997-1999, 2001-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/* This file's definitions suffice for any platform where all
++   the machine-specific state is described in `struct sigcontext'.  */
++
++#ifndef _SYS_UCONTEXT_H
++#define _SYS_UCONTEXT_H	1
++
++#include <features.h>
++#include <signal.h>
++
++/* We need the signal context definitions even if they are not used
++   included in <signal.h>.  */
++#include <bits/sigcontext.h>
++
++/* This include file defines the type 'mcontext_t'.  */
++#include <bits/mcontext.h>
++
++/* Userlevel context.  */
++typedef struct ucontext
++  {
++    __sigset_t uc_sigmask;
++    mcontext_t uc_mcontext;
++    struct ucontext *uc_link;
++    stack_t uc_stack;
++    int     uc_flags;
++#define UCF_SWAPPED     0x00000001      /* Used by swapcontext(3). */
++    int __unused1[4];
++  } ucontext_t;
++
++#endif /* sys/ucontext.h */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/un.h
+@@ -0,0 +1,50 @@
++/* Copyright (C) 1991, 1995, 1996, 2001 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef	_SYS_UN_H
++#define	_SYS_UN_H	1
++
++#include <sys/cdefs.h>
++
++/* Get the definition of the macro to define the common sockaddr members.  */
++#include <bits/sockaddr.h>
++
++__BEGIN_DECLS
++
++/* Structure describing the address of an AF_LOCAL (aka AF_UNIX) socket.  */
++struct sockaddr_un
++  {
++    __SOCKADDR_COMMON (sun_);
++    char sun_path[104];		/* Path name, the kernel restrict it to 104, */
++#if defined(__i386__) || defined(__amd64__)
++    char __sun_user_compat[4];  /* but former user header used 108 */
++#endif    
++  };
++
++
++#ifdef __USE_MISC
++# include <string.h>		/* For prototype of `strlen'.  */
++
++/* Evaluate to actual length of the `sockaddr_un' structure.  */
++# define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path)	      \
++		      + strlen ((ptr)->sun_path))
++#endif
++
++__END_DECLS
++
++#endif	/* sys/un.h  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/syscalls-inline.h
+@@ -0,0 +1,59 @@
++/* prototypes of generally used "inline syscalls"
++   Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef KFREEBSD_INLINE_SYSCALLS_H
++#define KFREEBSD_INLINE_SYSCALLS_H
++
++#include <sys/types.h>
++#define __need_sigset_t
++#include <signal.h>
++
++#include <syscalls-internal.h>
++
++struct iovec;
++struct rusage;
++struct timespec;
++
++int __syscall_open(const char *path, int flags, ...);
++int __syscall_close(int fd);
++libc_hidden_proto (__syscall_open)
++libc_hidden_proto (__syscall_close)
++
++ssize_t __syscall_read(int fd, void *buf, size_t nbyte);
++ssize_t __syscall_write(int fd, const void *buf, size_t nbyte);
++ssize_t __syscall_writev(int fd, const struct iovec *iovp, int iovcnt);
++libc_hidden_proto (__syscall_read)
++libc_hidden_proto (__syscall_write)
++libc_hidden_proto (__syscall_writev)
++
++ssize_t __syscall_readlink(const char *path, char *buf, size_t bufsiz);
++libc_hidden_proto (__syscall_readlink)
++
++int __syscall_fcntl(int fd, int cmd, ...);
++int __syscall_fork(void);
++int __syscall_wait4(int pid, int *status, int options, struct rusage *rusage);
++int __syscall_sigsuspend (const sigset_t *set);
++int __syscall_nanosleep (const struct timespec *requested_time, struct timespec *remaining);
++libc_hidden_proto (__syscall_fcntl)
++libc_hidden_proto (__syscall_fork)
++libc_hidden_proto (__syscall_wait4)
++libc_hidden_proto (__syscall_sigsuspend)
++libc_hidden_proto (__syscall_nanosleep)
++
++#endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/syscalls.list
+@@ -0,0 +1,199 @@
++# File name		Caller	Syscall name		# args		Strong name	Weak names
++sys_access		-	access			i:si		__syscall_access
++acl_aclcheck_fd		-	acl_aclcheck_fd		i:iip		__acl_aclcheck_fd
++acl_aclcheck_file	-	acl_aclcheck_file	i:sip		__acl_aclcheck_file
++acl_delete_fd		-	acl_delete_fd		i:ii		__acl_delete_fd
++acl_delete_file		-	acl_delete_file		i:si		__acl_delete_file
++acl_get_fd		-	acl_get_fd		i:iip		__acl_get_fd
++acl_get_file		-	acl_get_file		i:sip		__acl_get_file
++acl_set_fd		-	acl_set_fd		i:iip		__acl_set_fd
++acl_set_file		-	acl_set_file		i:sip		__acl_set_file
++sys_aio_cancel		-	aio_cancel		i:ip		__syscall_aio_cancel
++sys_aio_error		-	aio_error		i:p		__syscall_aio_error
++sys_aio_read		-	aio_read		i:p		__syscall_aio_read
++sys_aio_return		-	aio_return		i:p		__syscall_aio_return
++sys_aio_suspend		-	aio_suspend		i:bnP		__syscall_aio_suspend
++sys_aio_waitcomplete	-	aio_waitcomplete	i:pp		__syscall_aio_waitcomplete
++sys_aio_write		-	aio_write		i:p		__syscall_aio_write
++sys_clock_getres	-	clock_getres		i:ip		__syscall_clock_getres
++sys_clock_gettime	-	clock_gettime		i:ip		__syscall_clock_gettime
++sys_clock_settime	-	clock_settime		i:ip		__syscall_clock_settime
++sys_ktimer_create	-	ktimer_create		i:iPp		__syscall_ktimer_create
++sys_ktimer_gettime	-	ktimer_gettime		i:ip		__syscall_ktimer_gettime
++sys_ktimer_settime	-	ktimer_settime		i:iipp		__syscall_ktimer_settime
++sys_ktimer_getoverrun	-	ktimer_getoverrun	i:i		__syscall_ktimer_getoverrun
++sys_ktimer_delete	-	ktimer_delete		i:i		__syscall_ktimer_delete
++sys_execve		-	execve			i:ppp		__syscall_execve
++extattrctl		-	extattrctl		i:sisI		extattrctl
++extattr_delete_file	-	extattr_delete_file	i:ss		extattr_delete_file
++extattr_get_file	-	extattr_get_file	i:ssbn		extattr_get_file
++extattr_set_file	-	extattr_set_file	i:ssbn		extattr_set_file
++fhopen			-	fhopen			i:pi		fhopen
++sys_fork		-	fork			i:		__syscall_fork	fork
++sys_fhstat		-	fhstat			i:pp		__syscall_fhstat
++sys_getfsstat		-	getfsstat		i:pii		__syscall_getfsstat
++sys_statfs		-	statfs			i:sp		__syscall_statfs
++sys_fstatfs		-	fstatfs			i:ip		__syscall_fstatfs
++sys_fhstatfs		-	fhstatfs		i:pp		__syscall_fhstatfs
++sys_fstat		-	fstat			i:ip		__syscall_fstat
++sys_ftruncate		-	ftruncate		i:ii		__syscall_ftruncate
++sys_freebsd6_ftruncate	-	freebsd6_ftruncate	i:iii		__syscall_freebsd6_ftruncate
++futimes			-	futimes			i:ip		__futimes futimes
++sys_getcwd		-	getcwd			i:bn		__syscall_getcwd
++sys_getdents		-	getdents		i:ibn		__syscall_getdents
++sys_getdirentries	-	getdirentries		i:ibnP		__syscall_getdirentries
++getfh			-	getfh			i:sp		getfh
++sys_getlogin		-	getlogin		i:bn		__syscall_getlogin
++getpgid			-	getpgid			i:i		__getpgid __getpgid_internal getpgid
++getpgrp			-	getpgrp			i:		getpgrp
++getresgid		-	getresgid		i:ppp		getresgid
++getresuid		-	getresuid		i:ppp		getresuid
++getrlimit		-	getrlimit		i:ip		__getrlimit getrlimit getrlimit64
++getsid			-	getsid			i:i		getsid
++issetugid		-	issetugid		i:		issetugid
++jail			-	jail			i:p		jail
++jail_attach		-	jail_attach		i:i		jail_attach
++jail_remove		-	jail_remove		i:i		jail_remove
++jail_get		-	jail_get		i:pii		jail_get
++jail_set		-	jail_set		i:pii		jail_set
++kenv			-	kenv			i:issi		kenv
++kldfind			-	kldfind			i:s		kldfind
++kldfirstmod		-	kldfirstmod		i:i		kldfirstmod
++kldload			-	kldload			i:s		kldload
++kldnext			-	kldnext			i:i		kldnext
++kldstat			-	kldstat			i:ip		kldstat
++kldsym			-	kldsym			i:iip		kldsym
++kldunload		-	kldunload		i:i		kldunload
++kldunloadf		-	kldunloadf		i:ii		kldunloadf
++ktrace			-	ktrace			i:siii		ktrace
++lchflags		-	lchflags		i:si		lchflags
++lchmod			-	lchmod			i:si		__lchmod lchmod
++lchown			-	lchown			i:sii		__lchown lchown
++sys_lio_listio		-	lio_listio		i:ibnP		__syscall_lio_listio
++sys_lseek		-	lseek			i:iii		__syscall_lseek
++sys_freebsd6_lseek	-	freebsd6_lseek		i:iiii		__syscall_freebsd6_lseek
++sys_lstat		-	lstat			i:sp		__syscall_lstat
++lutimes			-	lutimes			i:sp		__lutimes lutimes
++posix_madvise		-	madvise			i:pii		posix_madvise
++minherit		-	minherit		i:aii		minherit
++mincore			-	mincore			i:anV		mincore
++mlock			-	mlock			i:bn		mlock
++mlockall		-	mlockall		i:i		mlockall
++mkfifo			-	mkfifo			i:si		__mkfifo mkfifo
++sys_mknod		-	mknod			i:sii		__syscall_mknod
++sys_mmap		-	mmap			b:aniiii	__syscall_mmap
++sys_freebsd6_mmap	-	freebsd6_mmap		b:aniiiii	__syscall_freebsd6_mmap
++sys_munmap		-	munmap			i:pi		__syscall_munmap
++modfind			-	modfind			i:s		modfind
++modfnext		-	modfnext		i:i		modfnext
++modnext			-	modnext			i:i		modnext
++modstat			-	modstat			i:ip		modstat
++mount			-	mount			i:ssiP		mount
++msgctl			-	msgctl			i:iip		msgctl
++msgget			-	msgget			i:ii		msgget
++msgrcv			-	msgrcv			Ci:ibnii	__libc_msgrcv msgrcv
++msgsnd			-	msgsnd			Ci:ibni		__libc_msgsnd msgsnd
++munlock			-	munlock			i:ai		munlock
++munlockall		-	munlockall		i:		munlockall
++nanosleep		-	nanosleep		Ci:pp		__libc_nanosleep __nanosleep nanosleep
++nfssvc			-	nfssvc			i:ip		nfssvc
++nlm_syscall		-	nlm_syscall		i:iiip		nlm_syscall
++nmount			-	nmount			i:pii		nmount
++sys_nfstat		-	nfstat			i:ip		__syscall_nfstat
++sys_nlstat		-	nlstat			i:sp		__syscall_nlstat
++sys_nstat		-	nstat			i:sp		__syscall_nstat
++ntp_adjtime		-	ntp_adjtime		i:p		ntp_adjtime
++obreak			-	obreak			i:a		__syscall_obreak
++sys_open		-	open			i:siv		__syscall_open
++poll			-	poll			Ci:pii		__poll poll
++sys_pread		-	pread			i:ibni		__syscall_pread
++sys_freebsd6_pread	-	freebsd6_pread		i:ibnii		__syscall_freebsd6_pread
++sys_pwrite		-	pwrite			i:ibni		__syscall_pwrite
++sys_freebsd6_pwrite	-	freebsd6_pwrite		i:ibnii		__syscall_freebsd6_pwrite
++preadv			-	preadv			Ci:ipii		__preadv  preadv  __preadv64  preadv64 
++pwritev			-	pwritev			Ci:ipii		__pwritev pwritev __pwritev64 pwritev64 
++quotactl		-	quotactl		i:siip		quotactl
++sys_readv		-	readv			i:ipi		__syscall_readv
++rfork			-	rfork			i:i		__rfork rfork
++rtprio			-	rtprio			i:iip		__rtprio rtprio
++sched_gets		-	sched_getscheduler	i:i		__sched_getscheduler sched_getscheduler
++sched_primax		-	sched_get_priority_max	i:i		__sched_get_priority_max sched_get_priority_max
++sched_primin		-	sched_get_priority_min	i:i		__sched_get_priority_min sched_get_priority_min
++sched_rr_gi		-	sched_rr_get_interval	i:ip		__sched_rr_get_interval sched_rr_get_interval
++sched_setp		-	sched_setparam		i:ip		__sched_setparam sched_setparam
++sched_sets		-	sched_setscheduler	i:iip		__sched_setscheduler sched_setscheduler
++sched_yield		-	sched_yield		i:		__sched_yield sched_yield
++semget			-	semget			i:iii		semget
++semop			-	semop			i:ipi		semop
++sys_semctl		-	semctl			i:iiip		__syscall_semctl
++bsd_sendfile		-	sendfile		i:iiiippi	bsd_sendfile
++setegid			-	setegid			i:i		setegid
++seteuid			-	seteuid			i:i		seteuid
++setgid			-	setgid			i:i		__setgid setgid
++sys_setlogin		-	setlogin		i:s		__syscall_setlogin
++setpgid			-	setpgid			i:ii		__setpgid setpgid
++setresgid		-	setresgid		i:iii		setresgid
++setresuid		-	setresuid		i:iii		setresuid
++setrlimit		-	setrlimit		i:ip		__setrlimit setrlimit setrlimit64
++setsid			-	setsid			i:		__setsid setsid
++setuid			-	setuid			i:i		__setuid setuid
++shmat			-	shmat			i:iai		shmat
++shmctl			-	shmctl			i:iip		shmctl
++shmdt			-	shmdt			i:a		shmdt
++shmget			-	shmget			i:iii		shmget
++sys_sigaction		-	sigaction		i:ipp		__syscall_sigaction
++sigpending		-	sigpending		i:p		sigpending
++sigprocmask		-	sigprocmask		i:iPP		__sigprocmask sigprocmask
++sigsuspend		-	sigsuspend		Ci:p		__sigsuspend sigsuspend
++sigwaitinfo		-	sigwaitinfo		Ci:pp		__sigwaitinfo sigwaitinfo
++sigtimedwait		-	sigtimedwait		Ci:ppP		__sigtimedwait sigtimedwait
++sigqueue		-	sigqueue		i:iii		__sigqueue sigqueue
++sys_stat		-	stat			i:sp		__syscall_stat
++sysarch			-	sysarch			i:ip		__sysarch sysarch
++sysctl			-	sysctl			i:pibNbn	__sysctl sysctl
++sys_truncate		-	truncate		i:sii		__syscall_truncate
++sys_freebsd6_truncate	-	freebsd6_truncate	i:si		__syscall_freebsd6_truncate
++undelete		-	undelete		i:s		undelete
++unmount			-	unmount			i:si		unmount
++utrace			-	utrace			i:bn		utrace
++sys_writev		-	writev			i:ipi		__syscall_writev
++yield			-	yield			i:		__syscall_yield
++wait4			-	wait4			i:iWiP		__syscall_wait4 __wait4	wait4
++sys_close		-	close			i:i		__syscall_close
++sys_fcntl		-	fcntl			i:iiF		__syscall_fcntl
++sys_write		-	write			i:ibn		__syscall_write
++sys_read		-	read			i:ibn		__syscall_read
++sys_connect		-	connect			i:ipi		__syscall_connect
++sys_bind		-	bind			i:ipi		__syscall_bind
++sys_sendto		-	sendto			i:ibnibn	__syscall_sendto
++sys_nanosleep		EXTRA	nanosleep		i:pp		__syscall_nanosleep
++sys_sigsuspend		EXTRA	sigsuspend		i:p		__syscall_sigsuspend
++swapcontext		-	swapcontext		i:pp		__swapcontext swapcontext
++swapon			-	swapon			i:s		swapon
++swapoff			-	swapoff			i:s		swapoff
++getcontext		-	getcontext		i:p		__getcontext getcontext
++setcontext		-	setcontext		i:p		__setcontext setcontext
++kqueue			EXTRA	kqueue			i:		__kqueue kqueue
++kevent			EXTRA	kevent			i:ipipip	__kevent kevent
++sys_umtx		-	_umtx_op		i:piipp		__syscall__umtx_op
++sys_cpuset_getaffinity	-	cpuset_getaffinity	i:iiiip		__syscall_cpuset_getaffinity
++sys_cpuset_setaffinity	-	cpuset_setaffinity	i:iiiip		__syscall_cpuset_setaffinity
++sys_faccessat		-	faccessat		i:isii		__syscall_faccessat
++sys_fchmodat		-	fchmodat		i:isii		__syscall_fchmodat
++sys_fchownat		-	fchownat		i:isiii		__syscall_fchownat
++sys_fexecve		-	fexecve			i:ipp		__syscall_fexecve
++sys_fstatat		-	fstatat			i:ispi		__syscall_fstatat
++sys_futimesat		-	futimesat		i:isp		__syscall_futimesat
++sys_linkat		-	linkat			i:isisi		__syscall_linkat
++sys_mkdirat		-	mkdirat			i:isi		__syscall_mkdirat
++sys_mkfifoat		-	mkfifoat		i:isi		__syscall_mkfifoat
++sys_mknodat		-	mknodat			i:isii		__syscall_mknodat
++sys_openat		-	openat			i:isii		__syscall_openat
++sys_readlinkat		-	readlinkat		i:issi		__syscall_readlinkat
++sys_renameat		-	renameat		i:isis		__syscall_renameat
++sys_symlinkat		-	symlinkat		i:sis		__syscall_symlinkat
++sys_unlinkat		-	unlinkat		i:isi		__syscall_unlinkat
++sys_shm_open		-	shm_open		i:sii		__syscall_shm_open
++sys_shm_unlink		-	shm_unlink		i:s		__syscall_shm_unlink
++readlink		-	readlink       		i:spi   	__syscall_readlink __readlink readlink
++sys_pselect		-	pselect			i:iPPPPP	__syscall_pselect
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sysconf.c
+@@ -0,0 +1,69 @@
++/* Get file-specific information about a file.
++   Copyright (C) 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stdlib.h>
++#include <sysdep.h>
++#include <time.h>
++#include <unistd.h>
++#include <hp-timing.h>
++#include <sys/sysctl.h>
++
++static long int posix_sysconf (int name);
++
++/* Get the value of the system variable NAME.  */
++long int
++__sysconf (int name)
++{
++  int request[2];
++  int value;
++  size_t len = sizeof(value);
++
++  switch(name)
++    {
++      case _SC_CPUTIME:
++      case _SC_THREAD_CPUTIME:
++#if HP_TIMING_AVAIL
++	// XXX We can add  here test for machines which cannot support a
++	// XXX usable TSC.
++	return 200809L;
++#else
++	return -1;
++#endif
++      case _SC_NGROUPS_MAX:
++	request[0] = CTL_KERN;
++	request[1] = KERN_NGROUPS;
++	if (__sysctl(request, 2, &value, &len, NULL, 0) == -1)
++	    return NGROUPS_MAX;
++	return (long)value;
++      case _SC_ARG_MAX:
++	request[0] = CTL_KERN;
++	request[1] = KERN_ARGMAX;
++	if (__sysctl(request, 2, &value, &len, NULL, 0) == -1)
++	    return ARG_MAX;
++	return (long)value;
++    }
++  return posix_sysconf (name);
++}
++
++/* Now the POSIX version.  */
++#undef __sysconf
++#define __sysconf static posix_sysconf
++#include <sysdeps/posix/sysconf.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sysctlbyname.c
+@@ -0,0 +1,38 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/sysctl.h>
++#include <string.h>
++
++/* Read or write system parameters.  */
++int
++__sysctlbyname (const char *name, void *oldval, size_t *oldlenp, const void *newval, size_t newlen)
++{
++  int request[CTL_MAXNAME+2];
++  size_t requestlen = CTL_MAXNAME+2;
++
++  if (__sysctlnametomib(name, request, &requestlen) < 0)
++    return -1;
++
++  /* Now call sysctl using the binary encoded request.  */
++  return __sysctl (request, requestlen,
++		   oldval, oldlenp, newval, newlen);
++}
++
++weak_alias (__sysctlbyname, sysctlbyname)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sysctlnametomib.c
+@@ -0,0 +1,38 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/types.h>
++#include <sys/sysctl.h>
++#include <string.h>
++
++int
++__sysctlnametomib (const char *name, int *mibp, size_t *sizep)
++{
++  /* Convert the string NAME to a binary encoded request.  The kernel
++     contains a routine for doing this, called "name2oid".  But the way
++     to call it is a little bit strange.  */
++  int name2oid_request[2] = { 0, 3 };
++  int retval;
++  
++  *sizep *= sizeof (int);
++  retval = __sysctl (name2oid_request, 2, mibp, sizep, (void *) name, strlen (name));
++  *sizep /= sizeof (int);
++  return retval;
++}
++
++weak_alias (__sysctlnametomib, sysctlnametomib)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/tcdrain.c
+@@ -0,0 +1,41 @@
++/* Copyright (C) 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <termios.h>
++#include <sys/ioctl.h>
++#include <sysdep-cancel.h>
++#include <stddef.h>
++
++/* Wait for pending output to be written on FD.  */
++int
++__libc_tcdrain (int fd)
++{
++  if (SINGLE_THREAD_P)
++    return __ioctl (fd, TIOCDRAIN);
++
++  int oldtype = LIBC_CANCEL_ASYNC ();
++
++  int result = __ioctl (fd, TIOCDRAIN);
++
++  LIBC_CANCEL_RESET (oldtype);
++
++  return result;
++}
++weak_alias (__libc_tcdrain, tcdrain)
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/tcflow.c
+@@ -0,0 +1,4 @@
++/* just use internal functions */
++#define tcgetattr __tcgetattr
++#define write __write
++#include <sysdeps/unix/bsd/tcflow.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/telldir.c
+@@ -0,0 +1,2 @@
++/* Avoid <sysdeps/unix/bsd/telldir.c>, which doesn't pass the testsuite.  */
++#include <sysdeps/unix/telldir.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/testrtsig.h
+@@ -0,0 +1,37 @@
++/* Test whether RT signals are really available.
++   Copyright (C) 2008 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/sysctl.h>
++#include <errno.h>
++#include <string.h>
++
++#include <kernel-features.h>
++#include <getosreldate.h>
++
++static int
++kernel_has_rtsig (void)
++{
++#if __ASSUME_REALTIME_SIGNALS
++  return 1;
++#else
++  if (__kernel_getosreldate () < 700050) /* FreeBSD 7.0 is 700055 */
++      return 0;
++  return 1;
++#endif
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/truncate.c
+@@ -0,0 +1,52 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <unistd.h>
++#include <sys/types.h>
++#include <sysdep.h>
++#include <errno.h>
++
++extern int __syscall_truncate (const char *__file, __off_t __length) __THROW;
++libc_hidden_proto (__syscall_truncate)
++extern int __syscall_freebsd6_truncate (const char *__file, int __unused1,
++			       __off_t __length) __THROW;
++libc_hidden_proto (__syscall_freebsd6_truncate)
++
++int
++__truncate (const char *file, __off_t length)
++{
++  int result;
++
++  /* First try the new syscall. */
++  result = INLINE_SYSCALL (truncate, 2, file, length);
++
++#ifndef __ASSUME_TRUNCATE_SYSCALL
++  if (result == -1 && errno == ENOSYS)
++    /* New syscall not available, us the old one. */
++    result = INLINE_SYSCALL (freebsd6_truncate, 3, file, 0, length);
++#endif
++
++  return result;
++}
++
++weak_alias (__truncate, truncate)
++
++/* 'truncate64' is the same as 'truncate', because __off64_t == __off_t.  */
++strong_alias (__truncate, __truncate64)
++weak_alias (__truncate64, truncate64)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/truncate64.c
+@@ -0,0 +1 @@
++/* 'truncate64' is the same as 'truncate', because __off64_t == __off_t.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ttyname.c
+@@ -0,0 +1,71 @@
++/* Copyright (C) 1991,92,93,96,97,98,2000,2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <stddef.h>
++#include <sys/types.h>
++#include <sys/ioctl.h>
++#include <termios.h>
++#include <unistd.h>
++#include <string.h>
++#include <stdlib.h>
++
++/* Static buffer in `ttyname'.  */
++libc_freeres_ptr (static char *ttyname_buf);
++
++static const char dev[] = "/dev";
++
++/* Return the pathname of the terminal FD is open on, or NULL on errors.
++   The returned storage is good only until the next call to this function.  */
++char *
++ttyname (fd)
++     int fd;
++{
++  static size_t buflen;
++  struct fiodgname_arg fgn;
++
++  /* isatty check, tcgetattr is used because it sets the correct
++     errno (EBADF resp. ENOTTY) on error.  */
++  struct termios term;
++  if (__builtin_expect (__tcgetattr (fd, &term) < 0, 0))
++    return NULL;
++
++  if (buflen == 0)
++    {
++      buflen = 4095;
++      ttyname_buf = (char *) malloc (buflen + 1);
++      if (ttyname_buf == NULL)
++	{
++	  buflen = 0;
++	  return NULL;
++	}
++    }
++
++  /* Prepare the result buffer.  */
++  memcpy (ttyname_buf, dev, sizeof (dev) - 1);
++  ttyname_buf[sizeof (dev) - 1] = '/';
++
++  fgn.buf = ttyname_buf + sizeof (dev);
++  fgn.len = buflen - sizeof (dev);
++
++  if (__ioctl(fd, FIODGNAME, &fgn) == -1)
++    {
++      return NULL; 
++    }
++
++  return ttyname_buf;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ttyname_r.c
+@@ -0,0 +1,78 @@
++/* Copyright (C) 1991,92,93,95,96,97,98,2004 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <stddef.h>
++#include <sys/types.h>
++#include <sys/ioctl.h>
++#include <termios.h>
++#include <unistd.h>
++#include <string.h>
++#include <stdlib.h>
++
++static const char dev[] = "/dev";
++
++/* Store at most BUFLEN character of the pathname of the terminal FD is
++   open on in BUF.  Return 0 on success,  otherwise an error number.  */
++int
++__ttyname_r (fd, buf, buflen)
++     int fd;
++     char *buf;
++     size_t buflen;
++{
++  int ret;
++  struct fiodgname_arg fgn;
++
++  /* Test for the absolute minimal size.  This makes life easier inside
++     the loop.  */
++  if (!buf)
++    {
++      __set_errno (EINVAL);
++      return EINVAL;
++    }
++
++  if (buflen < (int) (sizeof (dev) + 1))
++    {
++      __set_errno (ERANGE);
++      return ERANGE;
++    }
++
++  /* isatty check, tcgetattr is used because it sets the correct
++     errno (EBADF resp. ENOTTY) on error.  */
++  struct termios term;
++  if (__builtin_expect (__tcgetattr (fd, &term) < 0, 0))
++    return errno;
++
++  /* Prepare the result buffer.  */
++  memcpy (buf, dev, sizeof (dev) - 1);
++  buf[sizeof (dev) - 1] = '/';
++
++  fgn.buf = buf + sizeof (dev);
++  fgn.len = buflen - sizeof (dev);
++
++  ret = __ioctl(fd, FIODGNAME, &fgn);
++  if (ret == -1)
++    {
++      __set_errno (EBADF);
++      return EBADF;
++    }
++
++  return 0;
++}
++
++weak_alias (__ttyname_r, ttyname_r)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ulimit.c
+@@ -0,0 +1,2 @@
++/* just use linux variant */
++#include <sysdeps/unix/sysv/linux/ulimit.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/uname.c
+@@ -0,0 +1,110 @@
++/* Copyright (C) 2002, 2006 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/utsname.h>
++#include <sys/sysctl.h>
++#include <errno.h>
++#include <string.h>
++
++#define SYSNAME                "GNU/kFreeBSD"
++#define SYSNAME_LEN    13
++
++/* Check for bounds in pre-processor */
++#if SYSNAME_LEN > _UTSNAME_SYSNAME_LENGTH
++#error
++#endif
++
++/* Put information about the system in NAME.  */
++int
++__uname (struct utsname *name)
++{
++  int request[2] = { CTL_KERN };
++  size_t len;
++
++  /* Fill sysname: "uname -s". */
++  strcpy (name->sysname, SYSNAME);
++
++  /* Fill nodename: "uname -n".  Fetch sysctl "kern.hostname".  */
++  request[1] = KERN_HOSTNAME;
++  len = sizeof (name->nodename);
++  if (__sysctl (request, 2, name->nodename, &len, NULL, 0) >= 0)
++    {
++      if (len < sizeof (name->nodename))
++	name->nodename[len] = '\0';
++    }
++
++  /* Fill release: "uname -r".  Fetch sysctl "kern.osrelease".  */
++  request[1] = KERN_OSRELEASE;
++  len = sizeof (name->release);
++  if (__sysctl (request, 2, name->release, &len, NULL, 0) >= 0)
++    {
++      if (len < sizeof (name->release))
++        name->release[len] = '\0';
++    }
++
++  /* Fill version: "uname -v".  Fetch sysctl "kern.version".  */
++  request[1] = KERN_VERSION;
++  len = sizeof (name->version);
++  if (__sysctl (request, 2, name->version, &len, NULL, 0) >= 0)
++    {
++      if (len < sizeof (name->version))
++        name->version[len] = '\0';
++    }
++
++  /* Remove trailing whitespace.  Turn non-trailing whitespace to
++     spaces.  */
++  {
++    char *p0 = name->version;
++    char *p = p0 + __strnlen (p0, sizeof (name->version));
++
++    while (p > p0 && (p[-1] == '\t' || p[-1] == '\n' || p[-1] == ' '))
++      *--p = '\0';
++
++    while (p > p0)
++      {
++        --p;
++        if (*p == '\t' || *p == '\n')
++          *p = ' ';
++      }
++  }
++
++#ifdef __x86_64__
++  /* Check for bounds in pre-processor */
++# if 7 > _UTSNAME_MACHINE_LENGTH
++#  error
++# endif
++  /* Pristine FreeBSD kernel would return "amd64".  Avoid that.  */
++  strcpy (name->machine, "x86_64");
++#else
++  /* Fill machine: "uname -m".  Fetch sysctl "hw.machine".  */
++  request[0] = CTL_HW;
++  request[1] = HW_MACHINE;
++  len = sizeof (name->machine);
++  if (__sysctl (request, 2, name->machine, &len, NULL, 0) >= 0)
++    {
++      if (len < sizeof (name->machine))
++        name->machine[len] = '\0';
++    }
++#endif
++
++  return 0;
++}
++libc_hidden_def (__uname)
++weak_alias (__uname, uname)
++libc_hidden_def (uname)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/unlinkat.c
+@@ -0,0 +1,135 @@
++/* Copyright (C) 2009 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <fcntl.h>
++#include <stddef.h>
++#include <stdio.h>
++#include <stdint.h>
++#include <stdlib.h>
++#include <string.h>
++#include <sysdep.h>
++#include <unistd.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <kernel-features.h>
++
++extern int __syscall_unlinkat (int fd, const char *file, int flag);
++libc_hidden_proto (__syscall_unlinkat)
++
++libc_hidden_proto (__unlink)
++
++/* Remove the link named NAME.  */
++int
++unlinkat (fd, file, flag)
++     int fd;
++     const char *file;
++     int flag;
++{
++# ifndef __ASSUME_ATFCTS
++  if (__have_atfcts >= 0)
++# endif
++    {
++      int result = INLINE_SYSCALL (unlinkat, 3, fd, file, flag);
++# ifndef __ASSUME_ATFCTS
++      if (result == -1 && errno == ENOSYS)
++	__have_atfcts = -1;
++      else
++# endif
++	return result;
++    }
++
++#ifndef __ASSUME_ATFCTS
++  if (flag & ~AT_REMOVEDIR)
++    {
++      __set_errno (EINVAL);
++      return -1;
++    }
++
++  if (fd != AT_FDCWD && file[0] != '/')
++    {
++      int mib[4];
++      size_t kf_len = 0;
++      char *kf_buf, *kf_bufp;
++      size_t filelen;
++
++      if (fd < 0)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++
++      filelen = strlen (file);
++      if (__builtin_expect (filelen == 0, 0))
++	{
++	  __set_errno (ENOENT);
++	  return -1;
++	}
++
++      mib[0] = CTL_KERN;
++      mib[1] = KERN_PROC;
++      mib[2] = KERN_PROC_FILEDESC;
++      mib[3] = __getpid ();
++
++      if (__sysctl (mib, 4, NULL, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_buf = alloca (kf_len + filelen);
++      if (__sysctl (mib, 4, kf_buf, &kf_len, NULL, 0) != 0)
++	{
++	  __set_errno (ENOSYS);
++	  return -1;
++	}
++
++      kf_bufp = kf_buf;
++      while (kf_bufp < kf_buf + kf_len)
++	{
++	  struct kinfo_file *kf = (struct kinfo_file *) (uintptr_t) kf_bufp;
++
++	  if (kf->kf_fd == fd)
++	    {
++	      if (kf->kf_type != KF_TYPE_VNODE ||
++		  kf->kf_vnode_type != KF_VTYPE_VDIR)
++		{
++		  __set_errno (ENOTDIR);
++		  return -1;
++		}
++
++	      strcat (kf->kf_path, "/");
++	      strcat (kf->kf_path, file);
++	      file = kf->kf_path;
++	      break;
++	    }
++	  kf_bufp += kf->kf_structsize;
++	}
++
++      if (kf_bufp >= kf_buf + kf_len)
++	{
++	  __set_errno (EBADF);
++	  return -1;
++	}
++    }
++  if (flag & AT_REMOVEDIR)
++    return __rmdir (file);
++  else
++    return __unlink (file);
++#endif
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/unlockpt.c
+@@ -0,0 +1,45 @@
++/* Copyright (C) 2007 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <unistd.h>
++
++
++int
++__unlockpt (int fd)
++{
++  struct stat64 st;
++
++  /* there is no need/way to do unlocking of slave pseudo-terminal device,
++     just check whether fd might be valid master pseudo-terminal device */
++
++  if (__fxstat64 (_STAT_VER, fd, &st) < 0)
++    return -1;
++
++  if (!(S_ISCHR (st.st_mode)))
++  {
++    __set_errno (ENOTTY);
++    return -1;
++  }
++
++  return 0;
++}
++
++weak_alias (__unlockpt, unlockpt)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/usleep.c
+@@ -0,0 +1,50 @@
++/* Implementation of the BSD usleep function using nanosleep.
++   Copyright (C) 1996-1997, 1999, 2001-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <time.h>
++#include <unistd.h>
++
++int
++usleep (useconds_t useconds)
++{
++  unsigned int sec;
++  unsigned int usec;
++  struct timespec ts;
++
++  /* POSIX:2001 says that useconds >= 1000000 is invalid; nevertheless let's
++     be forgiving.  */
++  if (__builtin_expect (useconds < 1000000, 1))
++    {
++      sec = 0;
++      usec = useconds;
++    }
++  else
++    {
++      sec = useconds / 1000000;
++      usec = useconds % 1000000;
++    }
++
++  ts.tv_sec = sec;
++  ts.tv_nsec = usec * 1000;	/* Multiply as 32-bit integers.  */
++
++  /* Note the usleep() is a cancellation point.  But since we call
++     nanosleep() which itself is a cancellation point we do not have
++     to do anything here.  */
++  return __nanosleep (&ts, NULL);
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ustat.c
+@@ -0,0 +1,66 @@
++/* Return info on filesystem.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <sys/ustat.h>
++#include <sys/mount.h>
++#include <sys/stat.h>
++#include <stdlib.h>
++#include <string.h>
++#include <errno.h>
++
++int
++ustat (dev_t dev, struct ustat *ubuf)
++{
++  int mntcount;
++  struct statfs *mntlist;
++
++  /* Search for the device among the f_mntfromname fields of all mounted
++     filesystems.  */
++  mntcount = __getmntinfo (&mntlist, 0);
++  if (mntcount == 0 && errno != 0)
++    return -1;
++  if (mntcount > 0)
++    {
++      int i;
++
++      for (i = 0; i < mntcount; i++)
++	{
++	  struct statfs *mnt = &mntlist[i];
++	  struct stat statbuf;
++
++	  if ((__strnlen (mnt->f_mntfromname, sizeof (mnt->f_mntfromname))
++	       < sizeof (mnt->f_mntfromname))
++	      && __xstat (_STAT_VER, mnt->f_mntfromname, &statbuf) >= 0
++	      && S_ISBLK (statbuf.st_mode)
++	      && statbuf.st_rdev == dev)
++	    {
++	      /* Found the device.  Now produce the result.  */
++	      memset (ubuf, '\0', sizeof (struct ustat));
++	      ubuf->f_tfree = mnt->f_bfree;
++	      ubuf->f_tinode = mnt->f_ffree;
++	      return 0;
++	    }
++	}
++    }
++
++  /* DEV is not among the mounted devices.  */
++  __set_errno (EINVAL);
++  return -1;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-compat/Makefile
+@@ -0,0 +1,6 @@
++# Additional functions:
++
++ifeq ($(subdir),login)
++# For <utmpx.h>.
++sysdep_routines += utmpconv
++endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-compat/bits/utmp.h
+@@ -0,0 +1,50 @@
++/* The `struct utmp' type, describing entries in the utmp file.  For FreeBSD.
++   Copyright (C) 1993, 1996-1997, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#ifndef _UTMP_H
++# error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
++#endif
++
++#include <paths.h>
++#include <time.h>
++
++
++#define	UT_NAMESIZE	16
++#define	UT_LINESIZE	8
++#define	UT_HOSTSIZE	16
++
++
++struct lastlog
++  {
++    time_t ll_time;
++    char ll_line[UT_LINESIZE];
++    char ll_host[UT_HOSTSIZE];
++  };
++
++struct utmp
++  {
++    char ut_line[UT_LINESIZE];
++    char ut_user[UT_NAMESIZE];
++#define ut_name ut_user
++    char ut_host[UT_HOSTSIZE];
++    __time_t ut_time;
++  };
++
++
++#define _HAVE_UT_HOST 1		/* We have the ut_host field.  */
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-compat/getutmp.c
+@@ -0,0 +1,31 @@
++/* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <utmpx.h>
++#include <utmp.h>
++#include <string.h>
++
++extern int __utmpx_to_utmp (const struct utmpx *, struct utmp *);
++
++/* Copy the information in UTMPX to UTMP. */
++void
++getutmp (const struct utmpx *utmpx, struct utmp *utmp)
++{
++  if (__utmpx_to_utmp (utmpx, utmp) < 0)
++    memset (utmp, '\0', sizeof (struct utmp));
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-compat/getutmpx.c
+@@ -0,0 +1,31 @@
++/* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <utmpx.h>
++#include <utmp.h>
++#include <string.h>
++
++extern int __utmp_to_utmpx (const struct utmp *, struct utmpx *);
++
++/* Copy the information in UTMP to UTMPX. */
++void
++getutmpx (const struct utmp *utmp, struct utmpx *utmpx)
++{
++  if (__utmp_to_utmpx (utmp, utmpx) < 0)
++    memset (utmpx, '\0', sizeof (struct utmpx));
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-compat/getutxent.c
+@@ -0,0 +1,46 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <utmpx.h>
++#include <utmp.h>
++#include <stddef.h>
++
++extern int __utmp_to_utmpx (const struct utmp *, struct utmpx *);
++
++/* Static buffer to store the result.  */
++static struct utmpx buffer;
++
++struct utmpx *
++__getutxent (void)
++{
++  for (;;)
++    {
++      struct utmp *tmp = __getutent ();
++
++      if (tmp == NULL)
++	return NULL;
++
++      if (__utmp_to_utmpx (tmp, &buffer) >= 0)
++	return &buffer;
++
++      /* Skip entries that cannot be converted to utmpx.  */
++    }
++}
++
++weak_alias (__getutxent, getutxent)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-compat/getutxid.c
+@@ -0,0 +1,68 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <utmpx.h>
++#include <stddef.h>
++#include <string.h>
++
++extern struct utmpx *__getutxent (void);
++
++struct utmpx *
++getutxid (const struct utmpx *id)
++{
++  switch (id->ut_type)
++    {
++    case INIT_PROCESS:
++    case LOGIN_PROCESS:
++    case USER_PROCESS:
++    case DEAD_PROCESS:
++      for (;;)
++	{
++	  struct utmpx *next = __getutxent ();
++
++	  if (next == NULL)
++	    return NULL;
++
++	  switch (next->ut_type)
++	    {
++	    case INIT_PROCESS:
++	    case LOGIN_PROCESS:
++	    case USER_PROCESS:
++	    case DEAD_PROCESS:
++	      if (strncmp (next->ut_id, id->ut_id, sizeof (id->ut_id)) == 0)
++		return next;
++	      break;
++	    default:
++	      break;
++	    }
++	}
++
++    default:
++      for (;;)
++	{
++	  struct utmpx *next = __getutxent ();
++
++	  if (next == NULL)
++	    return NULL;
++
++	  if (next->ut_type == id->ut_type)
++	    return next;
++	}
++    }
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-compat/getutxline.c
+@@ -0,0 +1,40 @@
++/* Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <utmpx.h>
++#include <stddef.h>
++#include <string.h>
++
++extern struct utmpx *__getutxent (void);
++
++struct utmpx *
++getutxline (const struct utmpx *line)
++{
++  for (;;)
++    {
++      struct utmpx *next = __getutxent ();
++
++      if (next == NULL)
++	return NULL;
++
++      if ((next->ut_type == LOGIN_PROCESS || next->ut_type == USER_PROCESS)
++	  && strncmp (next->ut_line, line->ut_line, __UT_LINESIZE) == 0)
++	return next;
++    }
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-compat/pututxline.c
+@@ -0,0 +1,50 @@
++/* Copyright (C) 1998, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <utmpx.h>
++#include <utmp.h>
++#include <stddef.h>
++#include <string.h>
++
++extern int __utmp_to_utmpx (const struct utmp *, struct utmpx *);
++extern int __utmpx_to_utmp (const struct utmpx *, struct utmp *);
++
++/* Static buffer to store the result.  */
++static struct utmpx buffer;
++
++struct utmpx *
++pututxline (const struct utmpx *utmpx)
++{
++  struct utmp tmp;
++
++  if (__utmpx_to_utmp (utmpx, &tmp) >= 0)
++    {
++      struct utmp *tmpres = __pututline (&tmp);
++
++      if (tmpres != NULL)
++	{
++	  if (__utmp_to_utmpx (tmpres, &buffer) >= 0)
++	    return &buffer;
++
++	  /* Hmm.  We wrote a 'struct utmp' that we cannot convert back
++	     to 'struct utmpx'.  Shouldn't happen that often.  */
++	  return NULL;
++	}
++    }
++  return NULL;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-compat/updwtmpx.c
+@@ -0,0 +1,31 @@
++/* Copyright (C) 1998, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <utmpx.h>
++#include <utmp.h>
++
++extern int __utmpx_to_utmp (const struct utmpx *, struct utmp *);
++
++void
++updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
++{
++  struct utmp tmp;
++
++  if (__utmpx_to_utmp (utmpx, &tmp) >= 0)
++    __updwtmp (wtmpx_file, &tmp);
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-compat/utmp-equal.h
+@@ -0,0 +1,50 @@
++/* Copyright (C) 1996-1999,2000-2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <string.h>
++#include <utmp.h>
++
++#include <utmp-private.h>
++
++/* Test whether two entries match.  */
++static int
++__utmp_equal (const struct utmp *entry, const struct utmp *match)
++{
++  /* This implementation is consistent with the __utmp_to_utmpx function.  */
++  return
++    (!((entry->ut_line[0] == '\0' && entry->ut_name[0] == '\0'
++	&& entry->ut_host[0] == '\0')
++       || ((entry->ut_line[0] == '~' || entry->ut_line[0] == '{'
++	    || entry->ut_line[0] == '|')
++	   && entry->ut_line[1] == '\0'))
++     &&
++     !((match->ut_line[0] == '\0' && match->ut_name[0] == '\0'
++	&& match->ut_host[0] == '\0')
++       || ((match->ut_line[0] == '~' || match->ut_line[0] == '{'
++	    || match->ut_line[0] == '|')
++	   && match->ut_line[1] == '\0'))
++     &&
++#if _HAVE_UT_ID - 0
++     (entry->ut_id[0] && match->ut_id[0]
++      ? strncmp (entry->ut_id, match->ut_id, sizeof match->ut_id) == 0
++      : strncmp (entry->ut_line, match->ut_line, sizeof match->ut_line) == 0)
++#else
++     strncmp (entry->ut_line, match->ut_line, sizeof match->ut_line) == 0
++#endif
++     );
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-compat/utmp_file.c
+@@ -0,0 +1 @@
++#include <login/utmp_file.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-compat/utmpconv.c
+@@ -0,0 +1,227 @@
++/* Convert between 'struct utmp' and 'struct utmx'.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++   Contributed by Bruno Haible <bruno@clisp.org>, 2002.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++/* We reuse the 'struct utmp' file format also for 'struct utmpx' records.
++   The mapping from 'struct utmp' to 'struct utmpx' is injective; the
++   reverse mapping succeeds only when common conventions are respected.  */
++
++#include <utmp.h>
++#include <utmpx.h>
++#include <string.h>
++#include <stdlib.h>
++#include <stdio.h>
++
++/* Compare two 'struct utmpx' records.  */
++int
++__utmpx_equal (const struct utmpx *u1, const struct utmpx *u2)
++{
++  return (u1->ut_type == u2->ut_type)
++	 && (u1->ut_pid == u2->ut_pid)
++	 && (strncmp (u1->ut_line, u2->ut_line, __UT_LINESIZE) == 0)
++	 && (strncmp (u1->ut_id, u2->ut_id, sizeof (u1->ut_id)) == 0)
++	 && (strncmp (u1->ut_user, u2->ut_user, __UT_NAMESIZE) == 0)
++	 && (strncmp (u1->ut_host, u2->ut_host, __UT_HOSTSIZE) == 0)
++	 && (u1->ut_exit.e_termination == u2->ut_exit.e_termination)
++	 && (u1->ut_exit.e_exit == u2->ut_exit.e_exit)
++	 && (u1->ut_session == u2->ut_session)
++	 && (u1->ut_tv.tv_sec == u2->ut_tv.tv_sec)
++	 && (u1->ut_tv.tv_usec == u2->ut_tv.tv_usec)
++	 && (memcmp (u1->ut_addr_v6, u2->ut_addr_v6, sizeof (u1->ut_addr_v6))
++	     == 0);
++}
++
++int
++__utmp_to_utmpx (const struct utmp *u, struct utmpx *ux)
++{
++  memset (ux, '\0', sizeof (struct utmpx));
++
++  if (u->ut_line[0] == '\0' && u->ut_name[0] == '\0' && u->ut_host[0] == '\0')
++    {
++      ux->ut_type = EMPTY;
++    }
++  else
++    {
++      if (u->ut_line[0] == '~' && u->ut_line[1] == '\0')
++	{
++	  if (strncmp (u->ut_name, "runlevel", UT_NAMESIZE) == 0)
++	    ux->ut_type = RUN_LVL;
++	  else if (strncmp (u->ut_name, "reboot", UT_NAMESIZE) == 0)
++	    ux->ut_type = BOOT_TIME;
++	  else if (strncmp (u->ut_name, "acct", UT_NAMESIZE) == 0)
++	    ux->ut_type = ACCOUNTING;
++	  else
++	    return -1;
++	}
++      else if (u->ut_line[0] == '{' && u->ut_line[1] == '\0')
++	{
++	  if (strncmp (u->ut_name, "date", UT_NAMESIZE) == 0)
++	    ux->ut_type = NEW_TIME;
++	  else
++	    return -1;
++	}
++      else if (u->ut_line[0] == '|' && u->ut_line[1] == '\0')
++	{
++	  if (strncmp (u->ut_name, "date", UT_NAMESIZE) == 0)
++	    ux->ut_type = OLD_TIME;
++	  else
++	    return -1;
++	}
++      else
++	{
++	  if (strncmp (u->ut_name, "INIT", UT_NAMESIZE) == 0)
++	    ux->ut_type = INIT_PROCESS;
++	  else if (strncmp (u->ut_name, "LOGIN", UT_NAMESIZE) == 0)
++	    ux->ut_type = LOGIN_PROCESS;
++	  else if (strncmp (u->ut_name, "", UT_NAMESIZE) == 0)
++	    ux->ut_type = DEAD_PROCESS;
++	  else
++	    ux->ut_type = USER_PROCESS;
++
++	  if (ux->ut_type == LOGIN_PROCESS || ux->ut_type == USER_PROCESS)
++	    strncpy (ux->ut_user, u->ut_name, UT_NAMESIZE);
++
++	  if (strncmp (u->ut_line, "tty", 3) == 0)
++	    {
++	      strncpy (ux->ut_line, u->ut_line, UT_LINESIZE);
++	      strncpy (ux->ut_id, u->ut_line + 3, sizeof (ux->ut_id));
++	    }
++	  else
++	    {
++	      strncpy (ux->ut_id, u->ut_line, sizeof (ux->ut_id));
++	    }
++	}
++
++      strncpy (ux->ut_host, u->ut_host, UT_HOSTSIZE);
++
++      /* Hack: Recover the ut_pid from the hidden place after the host.  */
++      if (__strnlen (u->ut_host, UT_HOSTSIZE) < UT_HOSTSIZE - 2)
++	{
++	  const char *hidden = u->ut_host + strlen (u->ut_host) + 1;
++
++	  if (hidden[0] != '\0')
++	    {
++	      size_t n = UT_HOSTSIZE - strlen (u->ut_host) - 1;
++	      char buf[UT_HOSTSIZE];
++	      unsigned long pid;
++	      char *endp;
++
++	      strncpy (buf, hidden, n);
++	      buf[n] = '\0';
++
++	      pid = strtoul (buf, &endp, 10);
++	      if (endp != buf && *endp == '\0')
++		ux->ut_pid = pid;
++	    }
++	}
++
++      ux->ut_tv.tv_sec = u->ut_time;
++      ux->ut_tv.tv_usec = 0;
++    }
++
++  return 0;
++}
++
++int
++__utmpx_to_utmp (const struct utmpx *ux, struct utmp *u)
++{
++  char buf[10+1];
++
++  switch (ux->ut_type)
++    {
++    case EMPTY:
++      strncpy (u->ut_line, "", UT_LINESIZE);
++      strncpy (u->ut_name, "", UT_NAMESIZE);
++      strncpy (u->ut_host, "", UT_HOSTSIZE);
++      break;
++
++    case RUN_LVL:
++      strncpy (u->ut_line, "~", UT_LINESIZE);
++      strncpy (u->ut_name, "runlevel", UT_NAMESIZE);
++      strncpy (u->ut_host, ux->ut_host, UT_HOSTSIZE);
++      break;
++
++    case BOOT_TIME:
++      strncpy (u->ut_line, "~", UT_LINESIZE);
++      strncpy (u->ut_name, "reboot", UT_NAMESIZE);
++      strncpy (u->ut_host, ux->ut_host, UT_HOSTSIZE);
++      break;
++
++    case NEW_TIME:
++      strncpy (u->ut_line, "{", UT_LINESIZE);
++      strncpy (u->ut_name, "date", UT_NAMESIZE);
++      strncpy (u->ut_host, ux->ut_host, UT_HOSTSIZE);
++      break;
++
++    case OLD_TIME:
++      strncpy (u->ut_line, "|", UT_LINESIZE);
++      strncpy (u->ut_name, "date", UT_NAMESIZE);
++      strncpy (u->ut_host, ux->ut_host, UT_HOSTSIZE);
++      break;
++
++    case INIT_PROCESS:
++    case LOGIN_PROCESS:
++    case USER_PROCESS:
++    case DEAD_PROCESS:
++      if (ux->ut_line[0] != '\0')
++	strncpy (u->ut_line, ux->ut_line, UT_LINESIZE);
++      else
++	strncpy (u->ut_line, ux->ut_id, sizeof (ux->ut_id));
++      switch (ux->ut_type)
++	{
++	case INIT_PROCESS:
++	  strncpy (u->ut_name, "INIT", UT_NAMESIZE);
++	  break;
++	case LOGIN_PROCESS:
++	  strncpy (u->ut_name, "LOGIN", UT_NAMESIZE);
++	  break;
++	case USER_PROCESS:
++	  strncpy (u->ut_name, ux->ut_user, UT_NAMESIZE);
++	  break;
++	case DEAD_PROCESS:
++	  strncpy (u->ut_name, "", UT_NAMESIZE);
++	  break;
++	}
++      strncpy (u->ut_host, ux->ut_host, UT_HOSTSIZE);
++      break;
++
++    case ACCOUNTING:
++      strncpy (u->ut_line, "~", UT_LINESIZE);
++      strncpy (u->ut_name, "acct", UT_NAMESIZE);
++      strncpy (u->ut_host, ux->ut_host, UT_HOSTSIZE);
++      break;
++
++    default:
++      return -1;
++    }
++
++  u->ut_time = ux->ut_tv.tv_sec;
++
++  /* Hack: Put the ut_pid at a hidden place where there is likely room.  */
++  if (ux->ut_pid != 0)
++    {
++      size_t room = UT_HOSTSIZE - strlen (u->ut_host) - 1;
++
++      sprintf (buf, "%lu", (unsigned long) ux->ut_pid);
++      if (strlen (buf) <= room)
++	strncpy (u->ut_host + strlen (u->ut_host) + 1, buf, room);
++    }
++
++  return 0;
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/utmp-utmpx/utmp_file.c
+@@ -0,0 +1 @@
++#include <sysdeps/unix/sysv/linux/utmp_file.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/wait.c
+@@ -0,0 +1 @@
++#include <sysdeps/unix/sysv/linux/wait.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/wait3.c
+@@ -0,0 +1 @@
++#include <sysdeps/unix/sysv/linux/wait3.c>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/waitpid.c
+@@ -0,0 +1,56 @@
++/* Copyright (C) 1991,95,96,97,2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <sys/wait.h>
++#include <sys/types.h>
++#include <stddef.h>
++#include <sysdep-cancel.h>
++
++/* Wait for a child matching PID to die.
++   If PID is greater than 0, match any process whose process ID is PID.
++   If PID is (pid_t) -1, match any process.
++   If PID is (pid_t) 0, match any process with the
++   same process group as the current process.
++   If PID is less than -1, match any process whose
++   process group is the absolute value of PID.
++   If the WNOHANG bit is set in OPTIONS, and that child
++   is not already dead, return (pid_t) 0.  If successful,
++   return PID and store the dead child's status in STAT_LOC.
++   Return (pid_t) -1 for errors.  If the WUNTRACED bit is set in OPTIONS,
++   return status for stopped children; otherwise don't.  */
++pid_t
++__libc_waitpid (pid_t pid, int *stat_loc, int options)
++{
++  if (SINGLE_THREAD_P)
++  {
++      return INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL);
++  }
++
++  int oldtype = LIBC_CANCEL_ASYNC ();
++
++  int result = INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL);
++
++  LIBC_CANCEL_RESET (oldtype);
++
++  return result;
++}
++
++weak_alias (__libc_waitpid, __waitpid)
++libc_hidden_weak (__waitpid)
++weak_alias (__libc_waitpid, waitpid)
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/writev.c
+@@ -0,0 +1,57 @@
++/* writev for FreeBSD.
++   Copyright (C) 1997-1998, 2000, 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include <errno.h>
++#include <stddef.h>
++#include <sys/param.h>
++#include <sys/uio.h>
++
++#include <sysdep.h>
++#include <sys/syscall.h>
++#include <bp-checks.h>
++#include <sysdep-cancel.h>
++
++extern ssize_t __syscall_writev (int, const struct iovec *__unbounded, int);
++
++static ssize_t __atomic_writev_replacement (int, const struct iovec *,
++					    int) internal_function;
++
++ssize_t
++__libc_writev (int fd, const struct iovec *vector, int count)
++{
++  if (count <= UIO_MAXIOV)
++  {
++    if (SINGLE_THREAD_P)
++      return INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count);
++
++    int oldtype = LIBC_CANCEL_ASYNC ();
++    ssize_t result =  INLINE_SYSCALL (writev, 3, fd, CHECK_N (vector, count), count);
++    LIBC_CANCEL_RESET (oldtype);
++    return result;
++
++  }
++  else
++    return __atomic_writev_replacement (fd, vector, count);
++}
++strong_alias (__libc_writev, __writev)
++weak_alias (__libc_writev, writev)
++
++#define __libc_writev static internal_function __atomic_writev_replacement
++#include <sysdeps/posix/writev.c>
++
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/Makefile
+@@ -0,0 +1,17 @@
++32bit-predefine = __i386__
++64bit-predefine = __x86_64__
++
++# Additional header files to be installed in $prefix/include:
++
++ifeq ($(subdir),misc)
++sysdep_headers += \
++ sys/io.h \
++ sys/perm.h
++endif
++
++# Additional functions, and particular system calls:
++
++ifeq ($(subdir),misc)
++# For <sys/io.h> and <sys/perm.h>.
++sysdep_routines += iopl ioperm
++endif
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/Versions
+@@ -0,0 +1,8 @@
++libc {
++  GLIBC_2.3.4 {
++    iopl;
++  }
++  GLIBC_2.10 {
++    ioperm;
++  }
++}
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/____longjmp_chk.S
+@@ -0,0 +1,7 @@
++/* Jump to the position specified by ENV, causing the
++   setjmp call there to return VAL, or 1 if VAL is 0.
++   void __longjmp (__jmp_buf env, int val).  */
++      
++#warning longjmp_chk unimplemented
++#define __longjmp ____longjmp_chk
++#include<__longjmp.S>
+--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/bits/mcontext.h
+@@ -0,0 +1,167 @@
++/* Machine-dependent processor state structure for FreeBSD.
++   Copyright (C) 2002 Free Software Foundation, Inc.
++   This file is part of the GNU C Library.  x86_64 version.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#if !defined _SYS_UCONTEXT_H
++# error "Never use <bits/mcontext.h> directly; include <sys/ucontext.h> instead."
++#endif
++
++/*-
++ * Copyright (c) 2003 Peter Wemm
++ * Copyright (c) 1999 Marcel Moolenaar
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer
++ *    in this position and unchanged.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 3. The name of the author may not be used to endorse or promote products
++ *    derived from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ *
++ * based on $FreeBSD: src/sys/amd64/include/ucontext.h,v 1.18 2003/11/08 04:39:22 peter Exp $
++ */
++
++#ifdef __i386__
++
++/* Whole processor state.  */
++typedef struct
++  {
++    /*
++     * The first 20 fields must match the definition of
++     * sigcontext. So that we can support sigcontext
++     * and ucontext_t at the same time.
++     */
++
++    int mc_onstack;		/* Nonzero if running on sigstack.  */
++
++    /* Segment registers.  */
++    int mc_gs;
++    int mc_fs;
++    int mc_es;
++    int mc_ds;
++
++    /* "General" registers.  These m